Add -Wshadow=local
[deliverable/binutils-gdb.git] / gdb / gdbserver / ChangeLog
1 2018-10-04 Tom Tromey <tom@tromey.com>
2
3 * configure: Rebuild.
4
5 2018-10-04 Tom Tromey <tom@tromey.com>
6
7 * server.c (handle_status): Rename inner "thread".
8 (process_serial_event): Declare "res" in 'm' case.
9 * linux-low.c (last_thread_of_process_p, find_lwp_pid)
10 (iterate_over_lwps): Rename inner "thread".
11 (linux_qxfer_libraries_svr4): Rename inner "len".
12 * gdbthread.h (find_thread_in_random): Rename inner "thread".
13
14 2018-10-01 Gary Benson <gbenson@redhat.com>
15
16 * gdb_proc_service.h: Moved common code to
17 common/gdb_proc_service.h.
18
19 2018-10-01 Gary Benson <gbenson@redhat.com>
20
21 * gdb_proc_service.h: Synchronize comments and whitespace with
22 GDB's version of this file.
23
24 2018-09-25 Tom Tromey <tom@tromey.com>
25
26 * configure: Rebuild.
27 * configure.ac (WARN_CFLAGS): Don't remove -Wmissing-prototypes.
28
29 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
30
31 * Makefile.in (gdbserver$(EXEEXT)): Sort OBS.
32 (gdbreplay$(EXEEXT)): Sort GDBREPLAY_OBS.
33 ($(IPA_LIB)): Sort IPA_OBJS.
34
35 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
36
37 * Makefile.in: Remove references to $(ADD_DEPS).
38
39 2018-09-16 Tom Tromey <tom@tromey.com>
40
41 * remote-utils.c (remote_open): Use GNU style for metasyntactic
42 variables.
43 * gdbreplay.c (gdbreplay_usage): Use GNU style for metasyntactic
44 variables.
45
46 2018-09-05 Tom Tromey <tom@tromey.com>
47
48 * configure: Rebuild.
49
50 2018-08-28 Simon Marchi <simon.marchi@polymtl.ca>
51
52 PR build/23399
53 * tracepoint.c (IPA_SYM_STRUCT_NAME): Define.
54
55 2018-08-27 Tom Tromey <tom@tromey.com>
56
57 PR build/23087:
58 * configure: Rebuild.
59
60 2018-08-27 Tom Tromey <tom@tromey.com>
61
62 * linux-s390-low.c (s390_emit_ext, s390_emit_litpool)
63 (s390_emit_const, s390_emit_reg, s390_emit_zero_ext)
64 (s390_emit_stack_adjust, s390_emit_set_r2, s390x_emit_ext)
65 (s390x_emit_const, s390x_emit_reg, s390x_emit_zero_ext)
66 (s390x_emit_stack_adjust): Add casts to unsigned char.
67
68 2018-08-22 Simon Marchi <simon.marchi@ericsson.com>
69
70 PR gdb/23374
71 PR gdb/23375
72 * server.h (struct client_state) <disable_randomization>:
73 Initialize to 1.
74
75 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
76
77 * linux-mips-low.c (mips_collect_ptrace_register): Remove unused
78 variable.
79 (mips_supply_ptrace_register): Likewise.
80
81 2018-07-22 Tom Tromey <tom@tromey.com>
82
83 * configure: Rebuild.
84
85 2018-07-22 Tom Tromey <tom@tromey.com>
86
87 * win32-low.c (win32_create_inferior): Remove unused variables.
88 * gdbreplay.c (remote_open): Remove unused variable.
89 * remote-utils.c (remote_prepare): Remove unused variable.
90 * x86-tdesc.h (X86_TDESC_H): Define.
91 (amd64_expedite_regs): Define conditionally.
92 (i386_expedite_regs): Mark ATTRIBUTE_UNUSED.
93 * linux-x86-tdesc.c (i386_tdescs): Move inside #if.
94 * remote-utils.c (readchar): Remove unused variable.
95
96 2018-07-13 Pedro Alves <palves@redhat.com>
97
98 * linux-low.c (linux_kill): Change parameter to process_info
99 pointer instead of pid. Adjust.
100 * lynx-low.c (lynx_kill): Likewise.
101 * nto-low.c (nto_kill): Likewise.
102 * spu-low.c (spu_kill): Likewise.
103 * win32-low.c (win32_kill): Likewise.
104 * server.c (handle_v_kill, kill_inferior_callback)
105 (detach_or_kill_for_exit): Adjust.
106 * target.c (kill_inferior): Change parameter to process_info
107 pointer instead of pid. Adjust.
108 * target.h (struct target_ops) <kill>: Change parameter to
109 process_info pointer instead of pid. Adjust all implementations
110 and callers.
111 (kill_inferior): Likewise.
112
113 2018-07-13 Pedro Alves <palves@redhat.com>
114
115 * linux-low.c (linux_detach, linux_join): Change parameter to
116 process_info pointer instead of pid. Adjust.
117 * lynx-low.c (lynx_detach, lynx_join): Likewise.
118 * nto-low.c (nto_detach): Likewise.
119 * spu-low.c (spu_detach, spu_join): Likewise.
120 * win32-low.c (win32_detach, win32_join): Likewise.
121 * server.c (handle_detach, detach_or_kill_for_exit): Adjust.
122 * target.h (struct target_ops) <detach, join>: Change parameter to
123 process_info pointer instead of pid. Adjust all implementations
124 and callers.
125 (detach_inferior, join_inferior): Rename 'pid' parameter to
126 'proc'.
127
128 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
129 Jan Kratochvil <jan.kratochvil@redhat.com>
130 Paul Fertser <fercerpav@gmail.com>
131 Tsutomu Seki <sekiriki@gmail.com>
132
133 * Makefile.in (SFILES): Add '$(srcdir)/common/netstuff.c'.
134 (OBS): Add 'common/netstuff.o'.
135 (GDBREPLAY_OBS): Likewise.
136 * gdbreplay.c: Include 'wspiapi.h' and 'netstuff.h'.
137 (remote_open): Implement support for IPv6
138 connections.
139 * remote-utils.c: Include 'netstuff.h', 'filestuff.h'
140 and 'wspiapi.h'.
141 (handle_accept_event): Accept connections from IPv6 sources.
142 (remote_prepare): Handle IPv6-style hostnames; implement
143 support for IPv6 connections.
144 (remote_open): Implement support for printing connections from
145 IPv6 sources.
146
147 2018-07-11 Pedro Alves <palves@redhat.com>
148
149 PR gdb/23377
150 * mem-break.c (any_persistent_commands): Add process_info
151 parameter and use it instead of relying on the current process.
152 Change return type to bool.
153 * mem-break.h (any_persistent_commands): Add process_info
154 parameter and change return type to bool.
155 * server.c (handle_detach): Remove require_running_or_return call.
156 Look up the process_info for the process we're about to detach.
157 If not found, return back error to GDB. Adjust
158 any_persistent_commands call to pass down a process pointer.
159
160 2018-07-11 Pedro Alves <palves@redhat.com>
161
162 * i387-fp.c (i387_cache_to_fsave, cache_to_fxsave)
163 (i387_cache_to_xsave): Use regcache_raw_get_unsigned_by_name
164 instead of collect_register_by_name.
165 * regcache.c (regcache_raw_get_unsigned_by_name): New.
166 * regcache.h (regcache_raw_get_unsigned_by_name): New.
167
168 2018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
169 Pedro Alves <palves@redhat.com>
170
171 * linux-low.c (initialize_low): Call linux_proc_init_warnings.
172
173 2018-07-03 Tom Tromey <tom@tromey.com>
174
175 * linux-low.c: Update.
176 * lynx-low.c: Update.
177 * mem-break.c: Update.
178 * nto-low.c: Update.
179 * remote-utils.c: Update.
180 * server.c: Update.
181 * spu-low.c: Update.
182 * target.c: Update.
183 * win32-low.c: Update.
184
185 2018-07-03 Tom Tromey <tom@tromey.com>
186
187 * server.c: Update.
188
189 2018-07-03 Tom Tromey <tom@tromey.com>
190
191 * linux-low.c: Update.
192
193 2018-07-03 Tom Tromey <tom@tromey.com>
194
195 * target.c: Update.
196
197 2018-07-03 Tom Tromey <tom@tromey.com>
198
199 * linux-low.c: Update.
200 * linux-mips-low.c: Update.
201 * lynx-low.c: Update.
202 * nto-low.c: Update.
203 * remote-utils.c: Update.
204 * server.c: Update.
205 * spu-low.c: Update.
206 * target.c: Update.
207 * thread-db.c: Update.
208
209 2018-07-03 Tom Tromey <tom@tromey.com>
210
211 * linux-low.c: Update.
212 * linux-mips-low.c: Update.
213 * lynx-low.c: Update.
214 * mem-break.c: Update.
215 * nto-low.c: Update.
216 * remote-utils.c: Update.
217 * server.c: Update.
218 * spu-low.c: Update.
219 * target.c: Update.
220 * tracepoint.c: Update.
221
222 2018-07-03 Tom Tromey <tom@tromey.com>
223
224 * linux-low.c: Update.
225 * linux-ppc-low.c: Update.
226 * linux-x86-low.c: Update.
227 * proc-service.c: Update.
228 * server.c: Update.
229 * spu-low.c: Update.
230 * thread-db.c: Update.
231 * win32-low.c: Update.
232
233 2018-07-03 Tom Tromey <tom@tromey.com>
234
235 * linux-low.c: Update.
236 * lynx-low.c: Update.
237 * nto-low.c: Update.
238 * remote-utils.c: Update.
239 * spu-low.c: Update.
240 * thread-db.c: Update.
241 * win32-low.c: Update.
242
243 2018-06-29 Joel Brobecker <brobecker@adacore.com>
244
245 * linux-x86-tdesc.c (amd64_linux_read_description): Add missing
246 parameter in call to 'amd64_create_target_description'.
247
248 2018-06-28 Jan Kratochvil <jan.kratochvil@redhat.com>
249
250 * x86-tdesc.h: Remove executable permission flag.
251
252 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
253
254 * configure.ac: Remove AC_PREREQ, add missing quoting.
255 * configure: Re-generate.
256 * config.in: Re-generate.
257 * aclocal.m4: Re-generate.
258
259 2018-06-18 Simon Marchi <simon.marchi@ericsson.com>
260
261 * tracepoint.h (current_traceframe): Remove declaration.
262
263 2018-06-18 Alan Hayward <alan.hayward@arm.com>
264
265 * linux-aarch64-low.c (is_sve_tdesc): New function.
266 (aarch64_sve_regs_copy_to_regcache): Likewise.
267 (aarch64_sve_regs_copy_from_regcache): Likewise.
268 (aarch64_regs_info): Add SVE checks.
269 (initialize_low_arch): Initialize SVE.
270
271 2018-06-18 Alan Hayward <alan.hayward@arm.com>
272
273 * Makefile.in: Add aarch64-sve-linux-ptrace.c.
274
275 2018-06-11 Alan Hayward <alan.hayward@arm.com>
276
277 * linux-aarch64-ipa.c (get_ipa_tdesc): Add null VQ param.
278 (initialize_low_tracepoint): Likewise
279 * linux-aarch64-low.c (aarch64_arch_setup): Get VQ.
280 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Add null VQ
281 param.
282 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add VQ
283 checks.
284 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Add VQ.
285
286 2018-06-11 Alan Hayward <alan.hayward@arm.com>
287
288 * server.h (PBUFSIZ): Increase size
289
290 2018-06-11 Alan Hayward <alan.hayward@arm.com>
291
292 * regcache.c (regcache::raw_compare): New function.
293 * regcache.h (regcache::raw_compare): New declaration.
294
295 2018-06-11 Alan Hayward <alan.hayward@arm.com>
296
297 * regcache.c (new_register_cache): Use new.
298 (free_register_cache): Use delete.
299 (register_data): Use const.
300 (supply_register): Move body inside regcache.
301 (regcache::raw_supply): New override function.
302 (collect_register): Move body inside regcache.
303 (regcache::raw_collect): New override function.
304 (regcache::get_register_status): New override function.
305 * regcache.h (struct regcache): Inherit from reg_buffer_common.
306
307 2018-06-09 Tom Tromey <tom@tromey.com>
308
309 * event-loop.c (gdb_event, gdb_event_p): Remove typedefs. Don't
310 declare queue.
311 (event_queue): Use std::queue.
312 (gdb_event_xfree): Remove.
313 (initialize_event_loop, process_event, wait_for_event): Update.
314
315 2018-06-08 Stan Cox <scox@redhat.com>
316
317 * win32-low.c (win32_create_inferior): last_ptid and last_status
318 moved to client_state.
319
320 2018-06-08 Pedro Alves <palves@redhat.com>
321
322 * Makefile.in (GDBREPLAY_OBS): Add common/cleanups.o,
323 common/common-exceptions.o, common/common-utils.o,
324 common/errors.o, common/print-utils.o and utils.o.
325 * gdbreplay.c: Include "common-defs.h" instead of the two
326 'config.h's here. Don't include stdio.h, errno.h, stdlib.h,
327 string.h or alloca.h.
328 (perror_with_name): Delete.
329 (remote_open): Use xstrdup instead of strdup.
330 (main): Rename to ...
331 (captured_main): ... this.
332 (main): New.
333
334 2018-06-08 Tom Tromey <tom@tromey.com>
335
336 * linux-low.c (linux_low_read_btrace): Update.
337
338 2018-06-04 Stan Cox <scox@redhat.com>
339
340 * server.h (struct client_state): New.
341 * server.c (cont_thread, general_thread, multi_process)
342 (report_fork_events, report_vfork_events, report_exec_events)
343 (report_thread_events, swbreak_feature, hwbreak_feature)
344 (vCont_supported, disable_randomization, pass_signals)
345 (program_signals, program_signals_p, last_status, last_ptid, own_buf):
346 Moved to client_state.
347 * remote-utils.c (remote_debug, noack_mode)
348 (transport_is_reliable): Moved to client_state.
349 * tracepoint.c (current_traceframe): Moved to client_state.
350
351 Update all callers.
352 * server.c, remote-utils.c, tracepoint.c, fork-child.c,
353 linux-low.c, remote-utils.h, target.c: Use client_state.
354
355 2018-05-31 Alan Hayward <alan.hayward@arm.com>
356
357 * configure.srv: Add new c/h file.
358
359 2018-05-31 Alan Hayward <alan.hayward@arm.com>
360
361 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add
362 null VQ.
363
364 2018-05-25 Maciej W. Rozycki <macro@mips.com>
365
366 * gdb.arch/mips-fpregset-core.exp: New test.
367 * gdb.arch/mips-fpregset-core.c: New test source.
368
369 2018-05-23 Erik Kurzinger <ekurzinger@nvidia.com>
370
371 PR server/23198
372 * hostio.c (require_int): Do not report overflow for integers
373 between 0xfffffff and 0x7fffffff.
374
375 2018-05-22 Maciej W. Rozycki <macro@mips.com>
376
377 * linux-mips-low.c [HAVE_PTRACE_GETREGS] (mips_collect_register)
378 (mips_supply_register): Move outside HAVE_PTRACE_GETREGS.
379 (mips_collect_ptrace_register, mips_supply_ptrace_register): New
380 functions.
381 (the_low_target): Wire them.
382
383 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
384
385 * linux-ppc-low.c (ppc_fill_vrregset): Add vscr_offset variable.
386 Set vscr_offset to 0 in little-endian mode and 12 in big-endian
387 mode. Call collect_register_by_name with vscr using
388 vscr_offset. Zero-pad vscr and vrsave fields in collector buffer.
389 (ppc_store_vrregset): Add and set vscr_offset variable as in
390 ppc_fill_vrregset. Call supply_register_by_name with vscr using
391 vscr_offset.
392
393 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
394
395 * linux-ppc-low.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
396 (ppc_arch_setup): Change SIZEOF_VRREGS and SIZEOF_VSXREGS to
397 PPC_LINUX_SIZEOF_VRREGSET and PPC_LINUX_SIZEOF_VSXREGSET.
398
399 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
400
401 * linux-ppc-low.c (ppc_fill_vsxregset): Remove ppc_hwcap check.
402 (ppc_store_vsxregset): Likewise.
403 (ppc_fill_vrregset): Likewise.
404 (ppc_store_vrregset): Likewise.
405 (ppc_fill_evrregset): Likewise.
406 (ppc_store_evrregset): Likewise.
407 (ppc_regsets): Set VSX/VR/EVR regset sizes to 0.
408 (ppc_arch_setup): Iterate through ppc_regsets and set sizes when
409 needed.
410
411 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
412
413 * linux-ppc-low.c (ppc_arch_setup): Remove code for getting the
414 wordsize of the inferior. Call ppc_linux_target_wordsize.
415
416 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
417
418 * configure.srv (srv_tgtobj): Add arch/ppc-linux-common.o.
419 * Makefile.in (SFILES): Add arch/ppc-linux-common.c.
420 * linux-ppc-tdesc.h: Rename to linux-ppc-tdesc-init.h.
421 * linux-ppc-tdesc-init.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
422 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
423 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
424 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
425 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
426 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
427 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
428 (tdesc_powerpc_e500l): Remove.
429 * linux-ppc-ipa.c: Include arch/ppc-linux-tdesc.h and
430 linux-ppc-tdesc-init.h. Don't include linux-ppc-tdesc.h.
431 * linux-ppc-low.c: Include arch/ppc-linux-common.h,
432 arch/ppc-linux-tdesc.h, and linux-ppc-tdesc-init.h. Don't include
433 linux-ppc-tdesc.h.
434 (ppc_arch_setup): Remove target description matching code. Fill a
435 ppc_linux_features struct and call ppc_linux_match_description
436 with it.
437
438 2018-05-22 Maciej W. Rozycki <macro@mips.com>
439
440 * linux-mips-low.c (mips_cannot_fetch_register): Return 1 if the
441 width of the requested register exceeds the width of the
442 `ptrace' data type.
443 (mips_cannot_store_register): Likewise.
444
445 2018-05-21 Maciej W. Rozycki <macro@mips.com>
446
447 * linux-mips-low.c (mips_fetch_register): New function. Update
448 preceding comment.
449 (mips_store_gregset): Supply 0 rather than $restart for $zero.
450 (the_low_target): Wire `mips_fetch_register'.
451
452 2018-05-10 Joel Brobecker <brobecker@adacore.com>
453
454 * lynx-i386-low.c (LYNXOS_178): New macro.
455 [LYNXOS_178] (usr_fcontext_t): Provide a definition that matches
456 the layout on LynxOS-178.
457 (lynx_i386_fill_fpregset, lynx_i386_store_fpregset): Do not
458 handle floating point registers that are not supported by
459 LynxOS-178.
460
461 2018-05-10 Tom Tromey <tom@tromey.com>
462
463 * configure: Rebuild.
464
465 2018-05-10 Joel Brobecker <brobecker@adacore.com>
466
467 PR server/23158:
468 * tdesc.h (init_target_desc) <expedite_regs>: New parameter.
469 * tdesc.c (init_target_desc) <expedite_regs>: New parameter.
470 Use it to set the expedite_regs field in the given tdesc.
471 * x86-tdesc.h: New file.
472 * linux-aarch64-tdesc.c (aarch64_linux_read_description):
473 Adjust following the addition of the new expedite_regs parameter
474 to init_target_desc.
475 * linux-tic6x-low.c (tic6x_read_description): Likewise.
476 * linux-x86-tdesc.c: #include "x86-tdesc.h".
477 (i386_linux_read_description, amd64_linux_read_description):
478 Adjust following the addition of the new expedite_regs parameter
479 to init_target_desc.
480 * lynx-i386-low.c: #include "x86-tdesc.h".
481 (lynx_i386_arch_setup): Adjust following the addition of the new
482 expedite_regs parameter to init_target_desc.
483 * nto-x86-low.c: #include "x86-tdesc.h".
484 (nto_x86_arch_setup): Adjust following the addition of the new
485 expedite_regs parameter to init_target_desc.
486 * win32-i386-low.c: #include "x86-tdesc.h".
487 (i386_arch_setup): Adjust following the addition of the new
488 expedite_regs parameter to init_target_desc.
489
490 2018-05-10 Joel Brobecker <brobecker@adacore.com>
491
492 PR server/23158:
493 * win32-low.c (win32_create_inferior): Add call to my_wait
494 setting last_status global.
495
496 2018-05-10 Joel Brobecker <brobecker@adacore.com>
497
498 PR server/23158:
499 * win32-low.c (create_process): Only call gdb_tilde_expand if
500 inferior_cwd is not NULL.
501
502 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
503
504 * i387-fp.c (i387_cache_to_xsave): Only write x87 control
505 registers to the cache if their values have changed.
506 (i387_xsave_to_cache): Provide default values for x87 control
507 registers when these features are available, but disabled.
508 * regcache.c (supply_register_by_name_zeroed): New function.
509 * regcache.h (supply_register_by_name_zeroed): Declare new
510 function.
511
512 2018-05-07 Tom Tromey <tom@tromey.com>
513
514 * configure: Rebuild.
515
516 2018-05-04 Tom Tromey <tom@tromey.com>
517
518 * configure: Rebuild.
519
520 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
521 Pedro Alves <palves@redhat.com>
522
523 * linux-aarch64-low.c (aarch64_stopped_data_address):
524 Likewise.
525
526 2018-04-27 Tom Tromey <tom@tromey.com>
527
528 * configure: Rebuild.
529
530 2018-04-23 Tom Tromey <tom@tromey.com>
531
532 * configure: Rebuild.
533
534 2018-04-19 Simon Marchi <simon.marchi@ericsson.com>
535
536 * Makefile.in (depcomp): Add "..".
537 (all_deps_files): New and use it.
538
539 2018-04-18 Alan Hayward <alan.hayward@arm.com>
540
541 * configure.srv (aarch64*-*-linux*): Don't include xml.
542 (i[34567]86-*-cygwin*): Likewise.
543 (i[34567]86-*-linux*): Likewise.
544 (i[34567]86-*-lynxos*): Likewise.
545 (i[34567]86-*-mingw32ce*): Likewise.
546 (i[34567]86-*-mingw*): Likewise.
547 (i[34567]86-*-nto*): Likewise.
548 (tic6x-*-uclinux): Likewise.
549 (x86_64-*-linux*): Likewise.
550 (x86_64-*-mingw*): Likewise.
551 (x86_64-*-cygwin*): Likewise.
552
553 2018-04-18 Alan Hayward <alan.hayward@arm.com>
554
555 * tdesc.c: Remove xml parameter.
556
557 2018-04-18 Alan Hayward <alan.hayward@arm.com>
558
559 * server.c (get_features_xml): Remove cast.
560 * tdesc.c (void target_desc::accept): Fill in function.
561 (tdesc_get_features_xml): Remove old xml creation.
562 (print_xml_feature::visit_pre): Add xml vistor.
563 * tdesc.h (struct target_desc): Make xmltarget mutable.
564 (tdesc_get_features_xml): Remove declaration.
565
566 2018-04-18 Alan Hayward <alan.hayward@arm.com>
567
568 * tdesc.c (tdesc_architecture_name): Add new function.
569 (tdesc_osabi_name): Likewise.
570 (tdesc_get_features_xml): Use new functions.
571
572 2018-04-18 Alan Hayward <alan.hayward@arm.com>
573
574 * tdesc.c (tdesc_create_flags): Remove.
575 (tdesc_add_flag): Likewise.
576 (tdesc_named_type): Likewise.
577 (tdesc_create_union): Likewise.
578 (tdesc_create_struct): Likewise.
579 (tdesc_create_vector): Likewise.
580 (tdesc_add_bitfield): Likewise.
581 (tdesc_add_field): Likewise.
582 (tdesc_set_struct_size): Likewise.
583
584 2018-04-18 Alan Hayward <alan.hayward@arm.com>
585
586 * tdesc.c (~target_desc): Remove implictly deleted items.
587 (init_target_desc): Iterate all features.
588 (tdesc_get_features_xml): Use vector.
589 (tdesc_create_feature): Create feature.
590 * tdesc.h (tdesc_feature) Remove
591 (target_desc): Add features.
592
593 2018-04-18 Alan Hayward <alan.hayward@arm.com>
594
595 * Makefile.in: Add common/tdesc.c
596 * tdesc.c (init_target_desc): init all reg_defs from register
597 vector.
598 (tdesc_create_reg): Create tdesc_reg.
599 * tdesc.h (tdesc_feature): Add register vector.
600
601 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
602
603 * tdesc.h (struct target_desc) <features>: Change type to
604 std::vector<std::string>.
605 * tdesc.c (target_desc::~target_desc): Adjust to std::vector
606 changes.
607 (tdesc_get_features_xml): Likewise.
608 (tdesc_create_feature): Likewise.
609
610 2018-03-26 Alan Hayward <alan.hayward@arm.com>
611
612 * regcache.c (find_register_by_number): Return a ref.
613 (find_regno): Use references.
614 (register_size): Likewise.
615 (register_data): Likewise.
616 * tdesc.c (target_desc::~target_desc): Remove free calls.
617 (target_desc::operator==): Use std::vector compare.
618 (init_target_desc): Use reference.
619 (tdesc_create_reg): Use reg constructors.
620 * tdesc.h (struct target_desc): Replace pointer with object.
621
622 2018-03-23 Alan Hayward <alan.hayward@arm.com>
623
624 * regcache.c (find_register_by_number): Make static.
625 (find_regno): Use find_register_by_number
626 * regcache.h (struct reg): Remove declaration.
627
628 2018-03-23 Alan Hayward <alan.hayward@arm.com>
629
630 * tdesc.c (target_desc::~target_desc): Move to here.
631 (target_desc::operator==): Likewise.
632 * tdesc.h (target_desc::~target_desc): Move from here.
633 (target_desc::operator==): Likewise.
634
635 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
636
637 * linux-s390-low.c (s390_get_wordsize): Correct brace style.
638
639 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
640
641 * linux-s390-ipa.c (get_ipa_tdesc): Add handling for
642 S390_TDESC_GS.
643 * linux-s390-low.c (s390_get_ipa_tdesc_idx): Likewise.
644 (initialize_low_tracepoint): Call init_registers_s390x_gs_linux64
645 and init_registers_s390_gs_linux64.
646
647 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
648
649 * linux-s390-low.c (s390_fill_gs): Remove function.
650 (s390_fill_gsbc): Remove function.
651 (s390_regsets): Set fill functions for the guarded storage regsets
652 to NULL.
653
654 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
655
656 * linux-s390-low.c (s390_get_hwcap): Replace tdesc parameter by
657 the word size. Add comment.
658 (s390_get_wordsize): New function.
659 (s390_arch_setup): No longer select a temporary tdesc to fetch the
660 pswm with it. Instead, use s390_get_wordsize to determine the
661 word size first and derive the correct tdesc from that directly.
662
663 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
664
665 * Makefile.in: Include silent-rules.mk.
666 (srcdir, abs_top_srcdir, abs_srcdir, VPATH): Move up.
667 (COMPILE): Add ECHO_CXX.
668 (gdbserver$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
669 (gdbreplay$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
670 ($(IPA_LIB)): Add SILENCE and ECHO_CXXLD.
671 (version-generated.c): Add ECHO_GEN.
672 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN_GENERATED.
673 (IPAGENT_COMPILE): Add ECHO_CXX.
674 (%-generated.c): Add ECHO_REGDAT.
675
676 2018-03-14 Tom Tromey <tom@tromey.com>
677
678 PR cli/14977:
679 * ax.c (ax_printf): Special case for NULL.
680
681 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
682
683 * linux-low.c (linux_qxfer_libraries_svr4): Use
684 xml_escape_text_append.
685
686 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
687
688 * linux-low.c (linux_qxfer_libraries_svr4): Use std::string.
689
690 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
691
692 * server.c (handle_general_set): Remove unnecessary xstrdup.
693
694 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
695
696 * server.c (parse_debug_format_options): Adjust to
697 delim_string_to_char_ptr_vec changes.
698 * thread-db.c (thread_db_load_search): Adjust to
699 dirnames_to_char_ptr_vec changes.
700
701 2018-03-01 Markus Metzger <markus.t.metzger@intel.com>
702
703 * target.h (target_enable_btrace, target_disable_btrace)
704 (target_read_btrace, target_read_btrace_conf): Turn macro into
705 inline function. Throw error if target method is not defined.
706 * server.c (handle_qxfer_btrace handle_qxfer_btrace_conf): Remove
707 check for btrace target method. Be prepared to handle exceptions
708 from btrace target methods.
709
710 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
711
712 * server.c (captured_main): Change order of error message printed
713 when the current working directory cannot be found.
714
715 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
716
717 * server.c: Include "filenames.h" and "pathstuff.h".
718 (program_name): Delete variable.
719 (program_path): New anonymous class.
720 (get_exec_wrapper): Use "program_path" instead of
721 "program_name".
722 (handle_v_run): Likewise.
723 (captured_main): Likewise.
724 (process_serial_event): Likewise.
725
726 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
727
728 * Makefile.in (SFILES): Add "$(srcdir)/common/pathstuff.c".
729 (OBJS): Add "pathstuff.o".
730 * server.c (current_directory): New global variable.
731 (captured_main): Initialize "current_directory".
732
733 2018-02-26 Alan Hayward <alan.hayward@arm.com>
734
735 * tdesc.c: Use common/tdesc.h.
736 * tdesc.h: Likewise.
737
738 2018-02-20 Alan Hayward <alan.hayward@arm.com>
739 Simon Marchi <simon.marchi@ericsson.com>
740
741 * Makefile.in: Switch order of make rules.
742
743 2018-02-19 Alan Hayward <alan.hayward@arm.com>
744
745 * Makefile.in: Add common directory in build.
746 * configure.ac: Add common reference.
747 * configure: Regenerate.
748
749 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
750
751 * linux-low.c (linux_target_ops): Remove linux_supports_btrace.
752 * nto-low.c (nto_target_ops): Remove NULL for supports_btrace.
753 * spu-low.c (spu_target_ops): Likewise.
754 * win32-low.c (win32_target_ops): Likewise.
755 * server.c (supported_btrace_packets): Report packets unconditionally.
756 * target.h (target_ops) <supports_btrace>: Remove.
757 (target_supports_btrace): Remove.
758
759 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
760
761 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt)
762 (handle_btrace_disable): Change return type to void. Use exceptions
763 to report errors.
764 (handle_btrace_general_set): Catch exception and copy message to
765 return message.
766
767 2018-02-08 Tom Tromey <tom@tromey.com>
768
769 * linux-low.c (install_software_single_step_breakpoints): Use
770 make_scoped_restore.
771 * inferiors.c (make_cleanup_restore_current_thread): Remove.
772 (do_restore_current_thread_cleanup): Remove.
773 * gdbthread.h (make_cleanup_restore_current_thread): Don't
774 declare.
775
776 2018-02-08 Tom Tromey <tom@tromey.com>
777
778 * mem-break.c (set_raw_breakpoint_at): Use
779 gdb::unique_xmalloc_ptr.
780
781 2018-01-30 Pedro Alves <palves@redhat.com>
782
783 PR gdb/13211
784 * target.c (target_terminal::terminal_state): Rename to ...
785 (target_terminal::m_terminal_state): ... this.
786
787 2018-01-19 James Clarke <jrtc27@jrtc27.com>
788
789 * linux-low.c (handle_extended_wait): Surround call to
790 thread_db_notice_clone with #ifdef USE_THREAD_DB.
791
792 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
793
794 * linux-low.c (attach_proc_task_lwp_callback): Adjust to
795 linux_ptrace_attach_fail_reason_string now returning an
796 std::string.
797 (linux_attach): Likewise.
798 * thread-db.c (attach_thread): Likewise.
799
800 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
801
802 PR gdb/21559
803 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
804 checking for fs_base/gs_base fields in struct user_regs_struct.
805 * configure: Regenerate.
806
807 2018-01-16 Yao Qi <yao.qi@linaro.org>
808
809 PR gdb/18749
810 * linux-low.c (fetch_register): Call supply_register instead of
811 error.
812
813 2018-01-08 Yao Qi <yao.qi@linaro.org>
814 Simon Marchi <simon.marchi@ericsson.com>
815
816 * Makefile.in (OBS): Remove selftest.o.
817 * configure.ac: Set srv_selftest_objs if $development is true.
818 (GDBSERVER_DEPFILES): Append $srv_selftest_objs.
819 * configure: Re-generated.
820 * server.c (captured_main): Wrap variable selftest_filter with
821 GDB_SELF_TEST.
822
823 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
824
825 * server.c (parse_debug_format_options): Return std::string.
826 (handle_monitor_command, captured_main): Adjust.
827
828 2018-01-05 Pedro Alves <palves@redhat.com>
829
830 PR gdb/18653
831 * server.c (captured_main): Pass quiet=false to
832 save_original_signals_state.
833
834 2018-01-01 Joel Brobecker <brobecker@adacore.com>
835
836 * gdbreplay.c (gdbreplay_version): Update copyright year in
837 version message.
838 * server.c (gdbserver_version): Likewise.
839
840 2017-12-08 Tom Tromey <tom@tromey.com>
841
842 * ax.c (ax_printf): Update.
843
844 2017-12-07 Yao Qi <yao.qi@linaro.org>
845
846 * linux-aarch64-ipa.c (initialize_low_tracepoint): Call
847 aarch64_linux_read_description.
848 * linux-amd64-ipa.c (idx2mask): New array.
849 (get_ipa_tdesc): Move idx2mask out.
850 (initialize_low_tracepoint): Initialize target descriptions.
851 * linux-i386-ipa.c (idx2mask): New array.
852 (get_ipa_tdesc): Move idx2mask out.
853 (initialize_low_tracepoint): Initialize target descriptions.
854
855 2017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
856
857 * tdesc.c (struct tdesc_type): Change return type.
858 (tdesc_add_flag): Change parameter type.
859 (tdesc_add_bitfield): Likewise.
860 (tdesc_add_field): Likewise.
861 (tdesc_set_struct_size): Likewise.
862
863 2017-12-05 Simon Marchi <simon.marchi@ericsson.com>
864
865 * regcache.c (registers_to_string): Remove unused variable.
866
867 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
868
869 * inferiors.c (for_each_inferior_with_data): Remove.
870 * inferiors.h (for_each_inferior_with_data): Remove.
871 * server.c (handle_qxfer_threads_worker): Change parameter type.
872 (handle_qxfer_threads_proper): Use for_each_thread.
873
874 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
875
876 * inferiors.c (for_each_inferior): Remove.
877 (clear_inferiors): Use for_each_thread.
878 * inferiors.h (for_each_inferior): Remove.
879 * linux-low.c (linux_wait_for_event_filtered): Use
880 for_each_thread.
881 (linux_stabilize_threads): Likewise.
882 * regcache.c (regcache_release): Likewise.
883 * server.c (gdb_wants_all_threads_stopped): Likewise.
884 (clear_pending_status_callback): Remove.
885 (handle_status): Use for_each_thread.
886 (captured_main): Likewise.
887 * win32-low.c (child_init_thread_list): Likewise.
888 (win32_clear_inferiors): Likewise.
889 (fake_breakpoint_event): Likewise.
890
891 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
892
893 * inferiors.h (find_inferior): Remove.
894 * inferiors.c (find_inferior): Remove.
895
896 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
897
898 * linux-low.c (resume_status_pending_p): Update comment.
899 (need_step_over_p): Update comment.
900
901 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
902
903 * linux-low.c (proceed_one_lwp): Return void, change parameter
904 type.
905 (unsuspend_and_proceed_one_lwp): Likewise.
906 (proceed_all_lwps): Use for_each_thread.
907 (unstop_all_lwps): Likewise.
908
909 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
910
911 * linux-low.c (linux_resume_one_thread): Return void, take
912 parameter directly.
913 (linux_resume): Use for_each_thread.
914
915 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
916
917 * linux-low.c (send_sigstop_callback): Return void, change
918 parameter type. Rename to...
919 (send_sigstop): ... this.
920 (suspend_and_send_sigstop_callback): Return void, change parameter
921 type. Rename to...
922 (suspend_and_send_sigstop): ... this.
923 (stop_all_lwps): Use for_each_thread.
924
925 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
926
927 * linux-low.c (lwp_running): Return bool, remove unused
928 argument.
929 (linux_stabilize_threads): Use find_thread.
930
931 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
932
933 * linux-low.c (select_singlestep_lwp_callback): Remove.
934 (count_events_callback): Remove.
935 (select_event_lwp_callback): Remove.
936 (select_event_lwp): Use find_thread/for_each_thread.
937
938 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
939
940 * linux-low.c (not_stopped_callback): Return bool, take filter
941 argument directly.
942 (linux_wait_for_event_filtered): Use find_thread.
943 (linux_wait_1): Likewise.
944
945 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
946
947 * linux-low.c (same_lwp): Remove.
948 (find_lwp_pid): Use find_thread.
949
950 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
951
952 * linux-low.c (delete_lwp_callback): Remove.
953 (linux_mourn): Use for_each_thread.
954
955 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
956
957 * linux-low.c (linux_detach_lwp_callback): Return void, remove
958 args parameter, don't check for pid.
959 (linux_detach): Use for_each_thread.
960
961 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
962
963 * linux-low.c (struct counter): Remove.
964 (second_thread_of_pid_p): Remove.
965 (last_thread_of_process_p): Use find_thread.
966
967 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
968
969 * inferiors.c (find_inferior_in_random): Remove.
970 * inferiors.h (find_inferior_in_random): Remove.
971 * linux-low.c (status_pending_p_callback): Return bool, accept
972 parameter ptid directly.
973 (linux_wait_for_event_filtered): Use find_thread_in_random.
974 (linux_wait_1): Likewise.
975
976 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
977
978 * inferiors.c (find_inferior_id): Remove.
979 (find_thread_ptid): Move implemention from find_inferior_id to
980 here.
981 * inferiors.h (find_inferior_id): Remove.
982 * server.c (handle_status): Use find_thread_ptid.
983 (process_serial_event): Likewise.
984 * thread-db.c (find_one_thread): Likewise.
985 (thread_db_thread_handle): Likewise.
986 * win32-low.c (thread_rec): Likewise.
987 (child_delete_thread): Likewise.
988 (win32_thread_alive): Likewise.
989 (get_child_debug_event): Likewise.
990
991 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
992
993 * linux-mips-low.c (update_watch_registers_callback): Return
994 void, remove pid_p parameter, don't check for pid.
995 (mips_insert_point, mips_remove_point): Use for_each_thread.
996
997 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
998
999 * lynx.low (lynx_delete_thread_callback): Remove.
1000 (lynx_mourn): Use for_each_thread.
1001
1002 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1003
1004 * regcache.c (regcache_invalidate_one): Remove.
1005 (regcache_invalidate_pid): use for_each_thread.
1006
1007 2017-11-26 Tom Tromey <tom@tromey.com>
1008
1009 * linux-low.c (linux_create_inferior): Update.
1010
1011 2017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
1012
1013 * spu-low.c (spu_create_inferior): Fix typo in argument name.
1014
1015 2017-11-24 Alan Hayward <alan.hayward@arm.com>
1016
1017 * configure.srv: Add linux-aarch64-tdesc-selftest.o.
1018 * linux-aarch64-low.c (initialize_low_arch): Call init func.
1019 * linux-aarch64-tdesc-selftest.c: New file.
1020 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
1021
1022 2017-11-24 Alan Hayward <alan.hayward@arm.com>
1023
1024 * configure.srv: Add new file.
1025 * linux-aarch64-low.c (initialize_low_arch): Call init func.
1026 * linux-aarch64-tdesc-selftest.c: New file.
1027 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
1028
1029 2017-11-24 Alan Hayward <alan.hayward@arm.com>
1030
1031 * linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init.
1032 * linux-aarch64-low.c (initialize_low_arch): Remove init.
1033 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
1034
1035 2017-11-24 Alan Hayward <alan.hayward@arm.com>
1036
1037 * configure.srv: Add new files.
1038 * linux-aarch64-ipa.c (get_ipa_tdesc): Call
1039 aarch64_linux_read_description.
1040 * linux-aarch64-low.c (aarch64_linux_read_description):
1041 Merge with aarch64_arch_setup.
1042 (aarch64_arch_setup): Call aarch64_linux_read_description.
1043 * linux-aarch64-tdesc.c: New file.
1044 * linux-aarch64-tdesc.h: New file.
1045
1046 2017-11-24 Yao Qi <yao.qi@linaro.org>
1047
1048 * configure.srv: Set $srv_regobj for tic6x-linux.
1049 * linux-tic6x-low.c: Include "arch/tic6x.h" and "tdesc.h".
1050 (tic6x_read_description): Move some code to tic6x_arch_setup.
1051 (tic6x_tdesc_test): New function.
1052 (initialize_low_arch): Call selftests::register_test.
1053
1054 2017-11-22 Yao Qi <yao.qi@linaro.org>
1055
1056 * remote-utils.c (prepare_resume_reply): Use memcpy.
1057
1058 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1059
1060 * linux-low.c (kill_one_lwp_callback): Return void, take
1061 argument directly, don't filter on pid.
1062 (linux_kill): Use for_each_thread.
1063
1064 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1065
1066 * linux-low.c (need_step_over_p): Return bool, remove dummy
1067 argument.
1068 (linux_resume, proceed_all_lwps): Use find_thread.
1069
1070 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1071
1072 * linux-low.c (resume_status_pending_p): Return bool, remove
1073 flag_p argument.
1074 (linux_resume): Use find_thread.
1075
1076 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1077
1078 * linux-low.c (struct thread_resume_array): Remove.
1079 (linux_set_resume_request): Return void, take arguments
1080 directly.
1081 (linux_resume): Use for_each_thread.
1082
1083 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1084
1085 * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
1086 return bool, remove data argument.
1087 (linux_stabilize_threads): Use find_thread.
1088
1089 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1090
1091 * linux-low.c (unsuspend_one_lwp): Remove.
1092 (unsuspend_all_lwps): Use for_each_thread, inline code from
1093 unsuspend_one_lwp.
1094
1095 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1096
1097 * gdbthread.h (find_thread): Add overload with ptid_t filter.
1098 * linux-low.c (struct iterate_over_lwps_args): Remove.
1099 (iterate_over_lwps_filter): Remove.
1100 (iterate_over_lwps): Use find_thread.
1101
1102 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1103
1104 * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
1105 (linux_handle_new_gdb_connection): Use for_each_thread, inline
1106 code from reset_lwp_ptrace_options_callback.
1107
1108 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1109
1110 * linux-arm-low.c (struct update_registers_data): Remove.
1111 (update_registers_callback): Return void, take arguments
1112 directly, don't check thread's pid.
1113 (arm_insert_point, arm_remove_point): Use for_each_thread.
1114
1115 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1116
1117 * win32-low.c (continue_one_thread): Return void, take argument
1118 directly.
1119 (child_continue): Use for_each_thread.
1120
1121 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1122
1123 * win32-i386-low.c (update_debug_registers_callback): Rename
1124 to ...
1125 (update_debug_registers): ... this, return void, remove pid_p arg.
1126 (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
1127
1128 2017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1129
1130 * inferiors.h (struct process_info): Add constructor, initialize
1131 fields..
1132 <syscalls_to_catch>: Change type to std::vector<int>.
1133 * inferiors.c (add_process): Allocate process_info with new.
1134 (remove_process): Free process_info with delete.
1135 * linux-low.c (handle_extended_wait): Adjust.
1136 (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
1137 * server.c (handle_general_set): Adjust.
1138
1139 2017-11-16 Pedro Alves <palves@redhat.com>
1140
1141 * remote-utils.c (remote_close): Block SIGIO signals instead of
1142 uninstalling the SIGIO handler.
1143
1144 2017-11-16 Alan Hayward <alan.hayward@arm.com>
1145
1146 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
1147
1148 2017-11-16 Yao Qi <yao.qi@linaro.org>
1149
1150 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
1151 (tic6x_store_gregset): Likewise.
1152 (tic6x_usrregs_info): Move it up.
1153
1154 2017-11-15 Alan Hayward <alan.hayward@arm.com>
1155
1156 * Makefile.in: Update arch rules.
1157 * configure.srv: Explicitly mark arch/ files.
1158
1159 2017-11-13 Andreas Schwab <schwab@suse.de>
1160
1161 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
1162 function.
1163 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1164
1165 2017-11-06 Pedro Alves <palves@redhat.com>
1166
1167 * config.in, configure: Regenerate.
1168
1169 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1170
1171 * target.c (struct thread_search): Remove.
1172 (thread_search_callback): Remove.
1173 (prepare_to_access_memory): Use for_each_thread instead of
1174 find_inferior. Inline code from thread_search_callback.
1175
1176 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1177
1178 * server.c (struct visit_actioned_threads_data): Remove.
1179 (visit_actioned_threads): Change prototype to take arguments
1180 directly.
1181 (resume): Use find_thread instead of find_inferior.
1182
1183 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1184
1185 * server.c (queue_stop_reply_callback): Change prototype, return
1186 void.
1187 (find_status_pending_thread_callback): Remove.
1188 (handle_status): Replace find_inferior with find_thread and
1189 for_each_thread.
1190
1191 2017-10-25 Alan Hayward <alan.hayward@arm.com>
1192
1193 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
1194 with REGNO.
1195 (aarch64_store_gregset): Likewise.
1196 (aarch64_fill_fpregset): Likewise.
1197 (aarch64_store_fpregset): Likewise.
1198
1199 2017-10-21 Simon Marchi <simon.marchi@ericsson.com>
1200
1201 * gdbthread.h (find_thread, for_each_thread): New functions.
1202 * inferiors.c (thread_of_pid): Remove.
1203 (find_any_thread_of_pid): Use find_thread.
1204 * linux-low.c (num_lwps): Use for_each_thread.
1205
1206 2017-10-17 Yao Qi <yao.qi@linaro.org>
1207
1208 * Makefile.in: Remove one rule.
1209 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
1210
1211 2017-10-17 Yao Qi <yao.qi@linaro.org>
1212
1213 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
1214 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
1215
1216 2017-10-17 Yao Qi <yao.qi@linaro.org>
1217
1218 * configure.srv: Rename arm.o with arch/arm.o.
1219
1220 2017-10-17 Yao Qi <yao.qi@linaro.org>
1221
1222 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
1223 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
1224 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
1225 (arch-i386.o, arch-amd64.o): Remove rules.
1226 (arch/%.o): New rule.
1227 Update POSTCOMPILE and COMPILE.pre.
1228 * configure.ac: Invoke AC_CONFIG_COMMANDS.
1229 * configure: Re-generated.
1230 * configure.srv: Replace arch-i386.o with arch/i386.o.
1231 Replace arch-amd64.o with arch/amd64.o.
1232
1233 2017-10-16 Yao Qi <yao.qi@linaro.org>
1234
1235 * configure: Regenerated.
1236
1237 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
1238
1239 * inferiors.h: (struct inferior_list): Remove.
1240 (struct inferior_list_entry); Remove.
1241 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
1242 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
1243 get_first_inferior): Remove.
1244 (for_each_inferior, for_each_inferior_with_data, find_inferior,
1245 find_inferior_id, find_inferior_in_random): Change signature.
1246 * inferiors.c (all_threads): Change type to
1247 std::list<thread_info *>.
1248 (get_thread): Remove macro.
1249 (find_inferior, find_inferior_id): Change signature, implement
1250 using find_thread.
1251 (find_inferior_in_random): Change signature, implement using
1252 find_thread_in_random.
1253 (for_each_inferior, for_each_inferior_with_data): Change
1254 signature, implement using for_each_thread.
1255 (add_inferior_to_list, remove_inferior): Remove.
1256 (add_thread, get_first_thread, thread_of_pid,
1257 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
1258 (get_first_inferior, one_inferior_p, clear_inferior_list):
1259 Remove.
1260 (clear_inferiors, get_thread_process): Update.
1261 * gdbthread.h: Include <list>.
1262 (struct thread_info) <entry>: Remove field.
1263 <id>: New field.
1264 (all_threads): Change type to std::list<thread_info *>.
1265 (get_first_inferior): Add doc.
1266 (find_thread, for_each_thread, find_thread_in_random): New
1267 functions.
1268 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
1269 * linux-arm-low.c (update_registers_callback): Update.
1270 * linux-low.c (second_thread_of_pid_p): Update.
1271 (kill_one_lwp_callback, linux_detach_lwp_callback,
1272 delete_lwp_callback, status_pending_p_callback, same_lwp,
1273 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
1274 iterate_over_lwps, not_stopped_callback,
1275 resume_stopped_resumed_lwps, count_events_callback,
1276 select_singlestep_lwp_callback, select_event_lwp_callback,
1277 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
1278 suspend_and_send_sigstop_callback, wait_for_sigstop,
1279 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
1280 lwp_running, linux_set_resume_request, resume_status_pending_p,
1281 need_step_over_p, start_step_over, linux_resume_one_thread,
1282 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
1283 reset_lwp_ptrace_options_callback): Update.
1284 * linux-mips-low.c (update_watch_registers_callback): Update.
1285 * regcache.c (regcache_invalidate_one, regcache_invalidate):
1286 Update.
1287 (free_register_cache_thread_one): Remove.
1288 (regcache_release): Update.
1289 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
1290 handle_qxfer_threads_worker): Update.
1291 (handle_query): Update, use list iterator.
1292 (visit_actioned_threads, handle_pending_status,
1293 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
1294 clear_pending_status_callback, set_pending_status_callback,
1295 find_status_pending_thread_callback, handle_status,
1296 process_serial_event): Update.
1297 * target.c (thread_search_callback): Update.
1298 * thread-db.c (thread_db_get_tls_address): Update.
1299 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
1300 Update.
1301 * win32-i386-low.c (update_debug_registers_callback): Update.
1302 * win32-low.c (delete_thread_info, child_delete_thread,
1303 continue_one_thread, suspend_one_thread,
1304 get_child_debug_event): Adjust.
1305
1306 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
1307
1308 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
1309 * inferiors.h: Include <list>.
1310 (struct process_info) <entry>: Remove field.
1311 <pid>: New field.
1312 (pid_of): Change macro to function.
1313 (ptid_of, lwpid_of): Remove macro.
1314 (all_processes): Change type to std::list<process_info *>.
1315 (ALL_PROCESSES): Remove macro.
1316 (for_each_process, find_process): New function.
1317 * inferiors.c (all_processes): Change type to
1318 std::list<process_info *>.
1319 (find_thread_process): Adjust.
1320 (add_process): Likewise.
1321 (remove_process): Likewise.
1322 (find_process_pid): Likewise.
1323 (get_first_process): Likewise.
1324 (started_inferior_callback): Remove.
1325 (have_started_inferiors_p): Adjust.
1326 (attached_inferior_callback): Remove.
1327 (have_attached_inferiors_p): Adjust.
1328 * linux-low.c (check_zombie_leaders): Likewise.
1329 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
1330 (x86_linux_update_xmltarget): Adjust.
1331 * server.c (handle_query): Likewise.
1332 (gdb_reattached_process): Remove.
1333 (handle_status): Adjust.
1334 (kill_inferior_callback): Likewise.
1335 (detach_or_kill_inferior): Remove.
1336 (print_started_pid): Likewise.
1337 (print_attached_pid): Likewise.
1338 (detach_or_kill_for_exit): Update.
1339 (process_serial_event): Likewise.
1340 * linux-arm-low.c (arm_new_fork): Likewise.
1341
1342 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
1343
1344 * dll.h: Include <list>.
1345 (struct dll_info): Add constructor.
1346 <entry>: Remove field.
1347 (all_dlls): Change type to std::list<dll_info>.
1348 * dll.c: Include <algorithm>.
1349 (get_dll): Remove macro.
1350 (all_dlls): Change type to std::list<dll_info *>.
1351 (free_one_dll): Remove.
1352 (match_dll): Likewise.
1353 (loaded_dll): Adjust.
1354 (unloaded_dll): Adjust to all_dlls type change, use
1355 std::find_if. Inline code from match_dll.
1356 (clear_dlls): Adjust to all_dlls type change.
1357 * server.c (emit_dll_description): Remove.
1358 (handle_qxfer_libraries): Adjust to all_dlls type change,
1359 integrate emit_dll_description's functionality.
1360
1361 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
1362
1363 * linux-low.h (struct linux_target_ops) <delete_process>: New
1364 field.
1365 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
1366 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
1367 (struct linux_target_ops): Add delete_process callback.
1368 * linux-arm-low.c (arm_delete_process): New.
1369 (struct linux_target_ops): Add delete_process callback.
1370 * linux-bfin-low.c (struct linux_target_ops): Likewise.
1371 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
1372 * linux-m32r-low.c (struct linux_target_ops): Likewise.
1373 * linux-mips-low.c (mips_linux_delete_process): New.
1374 (struct linux_target_ops): Add delete_process callback.
1375 * linux-ppc-low.c (struct linux_target_ops): Likewise.
1376 * linux-s390-low.c (struct linux_target_ops): Likewise.
1377 * linux-sh-low.c (struct linux_target_ops): Likewise.
1378 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
1379 * linux-tile-low.c (struct linux_target_ops): Likewise.
1380 * linux-x86-low.c (x86_linux_delete_process): New.
1381 (struct linux_target_ops): Add delete_process callback.
1382 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
1383
1384 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
1385
1386 * linux-aarch64-low.c (the_low_target): Add thread delete
1387 callback.
1388 * linux-arm-low.c (arm_delete_thread): New function.
1389 (the_low_target): Add thread delete callback.
1390 * linux-bfin-low.c (the_low_target): Likewise.
1391 * linux-crisv32-low.c (the_low_target): Likewise.
1392 * linux-low.c (delete_lwp): Invoke delete_thread callback if
1393 set.
1394 * linux-low.h (struct linux_target_ops) <delete_thread>: New
1395 field.
1396 * linux-m32r-low.c (the_low_target): Add thread delete callback.
1397 * linux-mips-low.c (mips_linux_delete_thread): New function.
1398 (the_low_target): Add thread delete callback.
1399 * linux-ppc-low.c (the_low_target): Likewise.
1400 * linux-s390-low.c (the_low_target): Likewise.
1401 * linux-sh-low.c (the_low_target): Likewise.
1402 * linux-tic6x-low.c (the_low_target): Likewise.
1403 * linux-tile-low.c (the_low_target): Likewise.
1404 * linux-x86-low.c (the_low_target): Likewise.
1405 * linux-xtensa-low.c (the_low_target): Likewise.
1406
1407 2017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
1408
1409 * win32-low.c: Include "common-inferior.h".
1410
1411 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
1412
1413 * inferiors.c (set_inferior_cwd): New function.
1414 * server.c (handle_general_set): Handle QSetWorkingDir packet.
1415 (handle_query): Inform that QSetWorkingDir is supported.
1416 * win32-low.c (create_process): Pass the inferior's cwd to
1417 CreateProcess.
1418
1419 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
1420
1421 * inferiors.c (current_inferior_cwd): New global variable.
1422 (get_inferior_cwd): New function.
1423 * inferiors.h (struct process_info) <cwd>: New field.
1424
1425 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
1426
1427 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
1428 (OBS): Add gdb_tilde_expand.o.
1429
1430 2017-10-02 Simon Marchi <simon.marchi@ericsson.com>
1431
1432 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
1433 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
1434
1435 2017-09-29 Pedro Alves <palves@redhat.com>
1436
1437 * ax.c (gdb_parse_agent_expr): Constify.
1438 * ax.h (gdb_parse_agent_expr): Constify.
1439 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
1440 Constify.
1441 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
1442 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
1443 * remote-utils.h (read_ptid): Constify.
1444 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
1445 (process_point_options, process_serial_event): Constify.
1446 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
1447 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
1448 (cmd_qtbuffer): Constify.
1449
1450 2017-09-29 Pedro Alves <palves@redhat.com>
1451
1452 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
1453 fails.
1454
1455 2017-09-29 Pedro Alves <palves@redhat.com>
1456
1457 * linux-low.c (handle_extended_wait): Pass parent thread instead
1458 of process to thread_db_notice_clone.
1459 * linux-low.h (thread_db_notice_clone): Replace parent process
1460 parameter with parent thread parameter.
1461 * thread-db.c (find_one_thread): Add comment.
1462 (thread_db_notice_clone): Replace parent process parameter with
1463 parent thread parameter. Temporarily switch to the parent thread.
1464
1465 2017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
1466
1467 * gdbthread.h: Include "common-gdbthread.h".
1468 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
1469 "if" when validating the ptid.
1470 * remote-utils.c: Include "gdbthread.h".
1471 (prepare_resume_reply): Use "switch_to_thread".
1472 * target.c (done_accessing_memory): Likewise.
1473
1474 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
1475
1476 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
1477 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
1478 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
1479 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
1480 s390x-gs-linux64-ipa.o to ipa_obj.
1481 * linux-s390-low.c (HWCAP_S390_GS): New define.
1482 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
1483 New functions.
1484 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
1485 (s390_arch_setup): Check for guarded-storage support and choose
1486 appropriate tdesc.
1487 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
1488 init_registers_s390x_gs_linux64.
1489 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
1490 enum value.
1491 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
1492 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
1493
1494 2017-09-22 Simon Marchi <simon.marchi@ericsson.com>
1495
1496 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
1497
1498 2017-09-21 Kevin Buettner <kevinb@redhat.com>
1499
1500 * linux-low.h (struct lwp_info): Add new field, thread_handle.
1501 (thread_db_thread_handle): Declare.
1502 * linux-low.c (linux_target_ops): Initialize thread_handle.
1503 * server.c (handle_qxfer_threads_worker): Add support for
1504 "handle" attribute.
1505 * target.h (struct target_ops): Add new function pointer,
1506 thread_handle.
1507 (target_thread_handle): Define.
1508 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
1509 field in lwp.
1510 (thread_db_thread_handle): New function.
1511
1512 2017-09-21 Kevin Buettner <kevinb@redhat.com>
1513
1514 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
1515 * linux-low.h (thread_db_notice_clone): Declare.
1516 * thread-db.c (thread_db_notice_clone): New function.
1517
1518 2017-09-21 Pedro Alves <palves@redhat.com>
1519
1520 * server.c (gdb_read_memory, handle_status, process_serial_event)
1521 (handle_serial_event, handle_target_event): Adjust to
1522 set_desired_thread prototype change.
1523 * target.c (set_desired_thread): Remove 'use_general' parameter
1524 and adjust.
1525 * target.h (set_desired_thread): Remove 'use_general' parameter.
1526
1527 2017-09-20 Tom Tromey <tom@tromey.com>
1528
1529 * target.c (target_terminal::terminal_state): Define.
1530 (target_terminal::init): Rename from target_terminal_init.
1531 (target_terminal::inferior): Rename from
1532 target_terminal_inferior.
1533 (target_terminal::ours): Rename from target_terminal_ours.
1534 (target_terminal::ours_for_output, target_terminal::info): New.
1535
1536 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1537
1538 * server.c (accumulate_file_name_length): Remove.
1539 (emit_dll_description): Adjust to std::string change.
1540 (handle_qxfer_libraries): Use std::string to hold document.
1541
1542 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1543
1544 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
1545 return type of xml_escape_text.
1546 * server.c (emit_dll_description): Likewise.
1547
1548 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1549
1550 * server.c (captured_main): Accept argument for --selftest.
1551 Update run_tests call.
1552 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
1553 when registering selftests.
1554
1555 2017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
1556
1557 * regcache.c (get_thread_regcache): Update code to use "std::vector"
1558 instead of "VEC" for "target_desc.reg_defs".
1559 (regcache_cpy): Likewise.
1560 (registers_to_string): Likewise.
1561 (registers_from_string): Likewise.
1562 (find_regno): Likewise.
1563 (supply_regblock): Likewise.
1564 (regcache_raw_read_unsigned): Likewise.
1565 * tdesc.c (init_target_desc): Likewise.
1566 (tdesc_create_reg): Likewise.
1567 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
1568 (struct target_desc) <reg_defs>: Convert to "std::vector".
1569 (target_desc): Do not initialize "reg_defs".
1570 (~target_desc): Update code to use "std::vector" instead of "VEC"
1571 for "target_desc.reg_defs".
1572 (operator==): Likewise.
1573
1574 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1575
1576 * inferiors.h (thread_to_gdb_id): Remove.
1577 * inferiors.c (thread_to_gdb_id): Remove.
1578 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
1579 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
1580 lynx_store_registers, lynx_read_memory, lynx_write_memory):
1581 Likewise.
1582 * nto-low.c (nto_fetch_registers, nto_store_registers,
1583 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
1584
1585 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1586
1587 * inferiors.h (gdb_id_to_thread_id): Remove.
1588 * inferiors.c (gdb_id_to_thread_id): Remove.
1589 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
1590 removal. Move pid declaration closer to where it's used.
1591
1592 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1593
1594 * server.c (handle_detach): New function.
1595 (process_serial_event): Move code out, call handle_detach.
1596
1597 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1598
1599 * server.c (require_running): Rename to ...
1600 (require_running_or_return): ... this ...
1601 (require_running_or_break): ... and this.
1602 (handle_query, process_serial_event): Adjust.
1603
1604 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1605
1606 * linux-low.c (linux_set_resume_request): Remove unused
1607 variables.
1608
1609 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1610
1611 * server.c (first_thread_of): Remove.
1612 (process_serial_event): Replace usage of first_thread_of with
1613 find_any_thread_of_pid.
1614 * tracepoint.c (same_process_p): Remove.
1615 (gdb_agent_about_to_close): Replace usage of same_process_p with
1616 find_any_thread_of_pid.
1617 * linux-x86-low.c (same_process_callback): Remove.
1618 (x86_arch_setup_process_callback): Replace usage of
1619 same_process_callback with find_any_thread_of_pid.
1620 * thread-db.c (any_thread_of): Remove.
1621 (switch_to_process): Replace usage of any_thread_of with
1622 find_any_thread_of_pid.
1623 * inferiors.c (thread_pid_matches_callback): Remove.
1624 (find_thread_process): Adjust to use find_any_thread_of_pid.
1625
1626 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
1627
1628 * regcache.c (get_thread_regcache): Guard calls to "memset"
1629 with "!VEC_empty".
1630
1631 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
1632
1633 * linux-low.c (handle_extended_wait): Use
1634 "allocate_target_description" instead of "XNEW".
1635 * linux-x86-low.c (initialize_low_arch): Likewise.
1636
1637 2017-09-05 Yao Qi <yao.qi@linaro.org>
1638
1639 * configure.srv (srv_i386_regobj): Remove.
1640 (srv_amd64_regobj): Remove.
1641 (srv_regobj): Set it to "" for x86 non-linux targets.
1642 * linux-x86-tdesc.c (i386_linux_read_description):
1643 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
1644 (init_registers_i386): Remove the declaration.
1645 (tdesc_i386): Remove the declaration.
1646 (lynx_i386_arch_setup): Call i386_create_target_description.
1647 * nto-x86-low.c: Likewise.
1648 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
1649 [!__x86_64__]: include arch/i386.h.
1650 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
1651
1652 2017-09-05 Yao Qi <yao.qi@linaro.org>
1653
1654 * configure.srv (srv_amd64_linux_xmlfiles): Remove
1655 i386/amd64-XXX-linux from it.
1656
1657 2017-09-05 Yao Qi <yao.qi@linaro.org>
1658
1659 * configure.srv: Empty srv_amd64_linux_regobj if $development is
1660 false.
1661 (ipa_amd64_linux_regobj): Remove.
1662 (ipa_x32_linux_regobj): Remove.
1663
1664 2017-09-05 Yao Qi <yao.qi@linaro.org>
1665
1666 * Makefile.in (arch-amd64.o): New rule.
1667 * configure.srv: Append arch-amd64.o.
1668 * linux-amd64-ipa.c: Include common/x86-xstate.h.
1669 (get_ipa_tdesc): Call amd64_linux_read_description.
1670 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
1671 and init_registers_amd64_XXX.
1672 * linux-x86-low.c (x86_linux_read_description): Call
1673 amd64_linux_read_description.
1674 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
1675 (initialize_low_arch): Don't call init_registers_x32_XXX and
1676 init_registers_amd64_XXX.
1677 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
1678 and tdesc_amd64_XXX.
1679 [__x86_64__] (amd64_tdesc_test): New function.
1680 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
1681 and init_registers_amd64_XXX.
1682 * linux-x86-tdesc.c: Include arch/amd64.h.
1683 (xcr0_to_tdesc_idx): New function.
1684 (i386_linux_read_description): New function.
1685 (amd64_get_ipa_tdesc_idx): New function.
1686 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
1687 (amd64_get_ipa_tdesc): Declare.
1688
1689 2017-09-05 Yao Qi <yao.qi@linaro.org>
1690
1691 * configure.srv (srv_i386_linux_xmlfiles): Remove
1692 i386/i386-XXX-linux.xml from it.
1693
1694 2017-09-05 Yao Qi <yao.qi@linaro.org>
1695
1696 * configure.srv: Set srv_i386_linux_regobj empty if $development
1697 is false.
1698 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
1699 initialize_low_tdesc.
1700 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
1701 with #if initialize_low_tdesc.
1702 * linux-x86-tdesc-selftest.c: New file.
1703 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
1704
1705 2017-09-05 Yao Qi <yao.qi@linaro.org>
1706
1707 * Makefile.in (arch-i386.o): New rule.
1708 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
1709 (x86_64-*-linux*): Likewise.
1710 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
1711 include arch/i386.h.
1712 (i386_linux_read_description): Remove code and call
1713 i386_create_target_description.
1714 * tdesc.c (allocate_target_description): New function.
1715 * tdesc.h (set_tdesc_architecture): Remove declaration.
1716 (set_tdesc_osabi): Likewise.
1717
1718 2017-09-05 Yao Qi <yao.qi@linaro.org>
1719
1720 * linux-x86-tdesc.c: Don't include <inttypes.h>.
1721 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
1722 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
1723 .xmltarget.
1724 * server.c (get_features_xml): Call tdesc_get_features_xml.
1725 * tdesc.c (set_tdesc_architecture): New function.
1726 (set_tdesc_osabi): New function.
1727 (tdesc_get_features_xml): New function.
1728 (tdesc_create_feature): Add an argument.
1729 * tdesc.h (struct target_desc) <features>: New field.
1730 <arch, osabi>: New field.
1731 (~target_desc): xfree features, arch, and osabi.
1732 (target_desc::oerator==): Don't compare .xmltarget.
1733 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
1734 (set_tdesc_osabi): Likewise.
1735 (tdesc_get_features_xml): Likewise.
1736
1737 2017-09-05 Yao Qi <yao.qi@linaro.org>
1738
1739 * linux-x86-tdesc.c: Include selftest.h.
1740 (i386_tdesc_test): New function.
1741 (initialize_low_tdesc): Call selftests::register_test.
1742 * tdesc.h: Include regdef.h.
1743 (target_desc): Override operator == and !=.
1744
1745 2017-09-05 Yao Qi <yao.qi@linaro.org>
1746
1747 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
1748 (ipa_obj): Likewise.
1749 * linux-i386-ipa.c: Include common/x86-xstate.h
1750 (get_ipa_tdesc): Call i386_linux_read_description.
1751 (initialize_low_tracepoint): Don't call init_registers_XXX
1752 functions, call initialize_low_tdesc instead.
1753 * linux-x86-low.c (x86_linux_read_description): Call
1754 i386_linux_read_description.
1755 (initialize_low_arch): Don't call init_registers_i386_XXX
1756 functions, call initialize_low_tdesc.
1757 * linux-x86-tdesc.c: New file.
1758 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
1759 (i386_get_ipa_tdesc_idx): Declare.
1760 (i386_get_ipa_tdesc): Declare.
1761 (initialize_low_tdesc): Declare.
1762
1763 2017-09-05 Yao Qi <yao.qi@linaro.org>
1764
1765 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
1766 instead of 0.
1767
1768 2017-09-05 Yao Qi <yao.qi@linaro.org>
1769
1770 * Makefile.in (IPA_OBJS): Add vec-ipa.o
1771 * regcache.c (get_thread_regcache): Use VEC_length.
1772 (init_register_cache): Likewise.
1773 (regcache_cpy): Likewise.
1774 (registers_to_string): Iterate reg_defs via VEC_iterate.
1775 (find_regno): Likewise.
1776 (find_register_by_number): Use VEC_index.
1777 (register_size): Call find_register_by_number.
1778 (register_data): Call find_register_by_number.
1779 (supply_regblock): Use VEC_length.
1780 (regcache_raw_read_unsigned): Likewise.
1781 * tdesc.c (init_target_desc): Iterate reg_defs via
1782 VEC_iterate.
1783 (default_description): Update initializer.
1784 (copy_target_description): Don't update field num_registers.
1785 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
1786 <num_registers>: Remove.
1787
1788 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
1789
1790 * Makefile.in (.SECONDARY): Define target.
1791
1792 2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
1793
1794 * linux-low.c (linux_wait_1): Adjust.
1795 * server.c (queue_stop_reply_callback): Adjust.
1796
1797 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
1798
1799 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
1800 QEnvironmentUnset and QEnvironmentReset packets.
1801 (handle_query): Inform remote that QEnvironmentHexEncoded,
1802 QEnvironmentUnset and QEnvironmentReset are supported.
1803
1804 2017-08-25 Simon Marchi <simon.marchi@ericsson.com>
1805
1806 * inferiors.h (inferior_target_data): Rename to ...
1807 (thread_target_data): ... this.
1808 (inferior_regcache_data): Rename to ...
1809 (thread_regcache_data): ... this.
1810 (set_inferior_regcache_data): Rename to ...
1811 (set_thread_regcache_data): ... this.
1812 * inferiors.c (inferior_target_data): Rename to ...
1813 (thread_target_data): ... this.
1814 (inferior_regcache_data): Rename to ...
1815 (thread_regcache_data): ... this.
1816 (set_inferior_regcache_data): Rename to ...
1817 (set_thread_regcache_data): ... this.
1818 (free_one_thread): Update.
1819 * linux-low.h (get_thread_lwp): Update.
1820 * regcache.c (get_thread_regcache): Update.
1821 (regcache_invalidate_thread): Update.
1822 (free_register_cache_thread): Update.
1823 * win32-i386-low.c (update_debug_registers_callback): Update.
1824 (win32_get_current_dr): Update.
1825 * win32-low.c (thread_rec): Update.
1826 (delete_thread_info): Update.
1827 (continue_one_thread): Update.
1828 (suspend_one_thread): Update.
1829
1830 2017-08-24 Simon Marchi <simon.marchi@ericsson.com>
1831
1832 * inferiors.c (set_inferior_target_data): Remove.
1833 * inferiors.h (set_inferior_target_data): Remove.
1834
1835 2017-08-18 Yao Qi <yao.qi@linaro.org>
1836
1837 * Makefile.in (OBS): Add selftest.o.
1838 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
1839 * configure, config.in: Re-generated.
1840 * server.c: Include common/sefltest.h.
1841 (captured_main): Handle option --selftest.
1842
1843 2017-08-09 Yao Qi <yao.qi@linaro.org>
1844
1845 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
1846 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
1847 i386-avx-mpx.o and i386-mmx.o.
1848 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
1849 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
1850 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
1851 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
1852 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
1853 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
1854 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
1855 i386/amd64-avx-mpx.xml.
1856
1857 2017-08-09 Yao Qi <yao.qi@linaro.org>
1858
1859 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
1860 and x32-avx-avx512.o.
1861 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
1862 i386/x32-avx-avx512.xml.
1863
1864 2017-07-26 Simon Marchi <simon.marchi@ericsson.com>
1865
1866 * tracepoint.h (enum class fast_tpoint_collect_result): New
1867 enumeration.
1868 (fast_tracepoint_collecting): Change return type to
1869 fast_tpoint_collect_result.
1870 * tracepoint.c (fast_tracepoint_collecting): Likewise.
1871 * linux-low.h: Include tracepoint.h.
1872 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
1873 fast_tpoint_collect_result.
1874 * linux-low.c (handle_tracepoints): Adjust.
1875 (linux_fast_tracepoint_collecting): Change return type to
1876 fast_tpoint_collect_result.
1877 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
1878 linux_wait_1, stuck_in_jump_pad_callback,
1879 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
1880 proceed_one_lwp): Adjust to type change.
1881
1882 2017-07-10 Yao Qi <yao.qi@linaro.org>
1883
1884 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
1885
1886 2017-06-29 Yao Qi <yao.qi@linaro.org>
1887
1888 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
1889 Remove.
1890 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
1891
1892 2017-06-20 Simon Marchi <simon.marchi@ericsson.com>
1893
1894 * Makefile.in (IPA_OBJS): Sort and format one item per line.
1895
1896 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
1897
1898 * linux-low.c (linux_create_inferior): Adjust code to access the
1899 environment information via 'gdb_environ' class.
1900 * lynx-low.c (lynx_create_inferior): Likewise.
1901 * server.c (our_environ): Make it an instance of 'gdb_environ'.
1902 (get_environ): Return a pointer to 'our_environ'.
1903 (captured_main): Initialize 'our_environ'.
1904 * server.h (get_environ): Adjust prototype.
1905 * spu-low.c (spu_create_inferior): Adjust code to access the
1906 environment information via 'gdb_environ' class.
1907
1908 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1909
1910 * linux-low.c (linux_read_memory, linux_write_memory): Remove
1911 usage of "register" keyword.
1912
1913 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1914
1915 * configure: Re-generate.
1916
1917 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1918
1919 * configure: Re-generate.
1920
1921 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1922
1923 * Makefile.in (COMPILE.pre): Add "-x c++".
1924
1925 2017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
1926
1927 * fork-child.c: Conditionally include <signal.h>.
1928
1929 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1930
1931 * server.c (handle_general_set): Handle new packet
1932 "QStartupWithShell".
1933 (handle_query): Add "QStartupWithShell" to the list of supported
1934 packets.
1935 (gdbserver_usage): Add help text explaining the
1936 new "--startup-with-shell" and "--no-startup-with-shell" CLI
1937 options.
1938 (captured_main): Recognize and act upon the presence of the new
1939 CLI options.
1940
1941 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1942 Pedro Alves <palves@redhat.com>
1943
1944 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
1945 * configure: Regenerate.
1946 * configure.srv (srv_linux_obj): Add "fork-child.o" and
1947 "fork-inferior.o".
1948 (i[34567]86-*-lynxos*): Likewise.
1949 (spu*-*-*): Likewise.
1950 * fork-child.c: New file.
1951 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
1952 and "environ.h".
1953 (linux_ptrace_fun): New function.
1954 (linux_create_inferior): Adjust function prototype to reflect
1955 change on "target.h". Adjust function code to use
1956 "fork_inferior".
1957 (linux_request_interrupt): Delete "signal_pid".
1958 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
1959 (lynx_ptrace_fun): New function.
1960 (lynx_create_inferior): Adjust function prototype to reflect
1961 change on "target.h". Adjust function code to use
1962 "fork_inferior".
1963 * nto-low.c (nto_create_inferior): Adjust function prototype and
1964 code to reflect change on "target.h". Update comments.
1965 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
1966 "common-terminal.h" and "environ.h".
1967 (terminal_fd): Moved to fork-child.c.
1968 (old_foreground_pgrp): Likewise.
1969 (restore_old_foreground_pgrp): Likewise.
1970 (last_status): Make it global.
1971 (last_ptid): Likewise.
1972 (our_environ): New variable.
1973 (startup_with_shell): Likewise.
1974 (program_name): Likewise.
1975 (program_argv): Rename to...
1976 (program_args): ...this.
1977 (wrapper_argv): New variable.
1978 (start_inferior): Delete function.
1979 (get_exec_wrapper): New function.
1980 (get_exec_file): Likewise.
1981 (get_environ): Likewise.
1982 (prefork_hook): Likewise.
1983 (post_fork_inferior): Likewise.
1984 (postfork_hook): Likewise.
1985 (postfork_child_hook): Likewise.
1986 (handle_v_run): Update code to deal with arguments coming from the
1987 remote host. Update calls from "start_inferior" to
1988 "create_inferior".
1989 (captured_main): Likewise. Initialize environment variable. Call
1990 "have_job_control".
1991 * server.h (post_fork_inferior): New prototype.
1992 (get_environ): Likewise.
1993 (last_status): Declare.
1994 (last_ptid): Likewise.
1995 (signal_pid): Likewise.
1996 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
1997 (spu_ptrace_fun): New function.
1998 (spu_create_inferior): Adjust function prototype to reflect change
1999 on "target.h". Adjust function code to use "fork_inferior".
2000 * target.c (target_terminal_init): New function.
2001 (target_terminal_inferior): Likewise.
2002 (target_terminal_ours): Likewise.
2003 * target.h: Include <vector>.
2004 (struct target_ops) <create_inferior>: Update prototype.
2005 (create_inferior): Update macro.
2006 * utils.c (gdb_flush_out_err): New function.
2007 * win32-low.c (win32_create_inferior): Adjust function prototype
2008 and code to reflect change on "target.h".
2009
2010 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2011
2012 * inferiors.c (switch_to_thread): New function.
2013
2014 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2015
2016 * Makefile.in (SFILE): Add "common/job-control.c".
2017 (OBS): Add "job-control.o".
2018
2019 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
2020
2021 * Makefile: Remove "@host_makefile_frag@".
2022
2023 2017-05-05 Pedro Alves <palves@redhat.com>
2024
2025 * configure: Regenerate.
2026
2027 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
2028
2029 * configure: Regenerate.
2030
2031 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
2032
2033 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
2034 software_single_step change of return type to
2035 std::vector<CORE_ADDR>.
2036 * linux-low.c (install_software_single_step_breakpoints):
2037 Likewise.
2038 * linux-low.h (install_software_single_step_breakpoints):
2039 Likewise.
2040
2041 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
2042
2043 * remote-utils.c: Include "gdb_termios.h" instead of
2044 "terminal.h".
2045 * terminal.h: Delete file.
2046
2047 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
2048
2049 * server.c: Include <vector>.
2050 <program_argv, wrapper_argv>: Convert to std::vector.
2051 (start_inferior): Rewrite function to use C++.
2052 (handle_v_run): Likewise. Update code that calculates the argv
2053 based on the vRun packet; use C++.
2054 (captured_main): Likewise.
2055
2056 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
2057
2058 * server.c (handle_v_cont): Initialize thread_resume::thread
2059 with null_ptid.
2060
2061 2017-04-05 Pedro Alves <palves@redhat.com>
2062
2063 * configure: Regenerate.
2064
2065 2017-04-05 Pedro Alves <palves@redhat.com>
2066
2067 * gdbreplay.c (sync_error): Constify.
2068 * linux-x86-low.c (push_opcode): Constify.
2069
2070 2017-04-05 Pedro Alves <palves@redhat.com>
2071
2072 * win32-low.c (get_child_debug_event)
2073 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
2074 Report TARGET_WAITKIND_SPURIOUS instead.
2075
2076 2017-04-05 Pedro Alves <palves@redhat.com>
2077
2078 * remote-utils.c (remote_prepare, remote_open): Constify.
2079 * remote-utils.h (remote_prepare, remote_open): Constify.
2080 * server.c (captured_main): Constify 'port' handling.
2081
2082 2017-04-04 Simon Marchi <simon.marchi@ericsson.com>
2083
2084 * Makefile.in (clean): Clear .deps.
2085
2086 2017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
2087
2088 * .gitignore: Remove generated files, replace with wildcard.
2089 * (clean): Replace removal of generated files with wildcard.
2090 (version.c): Replace with...
2091 (version-generated.c): ...this.
2092 (xml-builtin.c): Replace with...
2093 (xml-builtin-generated.c): ...this.
2094 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
2095 (%.c: *regformats*): Replace with...
2096 (%-generated.c: *regformats*): ...this.
2097
2098 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
2099
2100 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
2101 (xtensa_fill_gregset): Call collect_register_by_name for
2102 threadptr register.
2103 (xtensa_store_gregset): Call supply_register_by_name for
2104 threadptr register.
2105
2106 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
2107
2108 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
2109 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
2110 (xtensa_store_gregset): Call supply_register for all registers in
2111 a0_regnum..a0_regnum + C0_NREGS range.
2112
2113 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2114
2115 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
2116 (ax-ipa.o: ax.c): Remove.
2117 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
2118 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
2119 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
2120 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
2121 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
2122
2123 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2124
2125 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
2126 (print-utils-ipa.o: ../common/print-utils.c): Remove.
2127 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
2128 (errors-ipa.o: ../common/errors.c): Remove.
2129 (format-ipa.o: ../common/format.c): Remove.
2130 (common-utils-ipa.o: ../common/common-utils.c): Remove.
2131
2132 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2133
2134 * Makefile.in (%-ipa.o: %.c): New rule.
2135 (tracepoint-ipa.o: tracepoint.c): Remove.
2136 (utils-ipa.o: utils.c): Remove.
2137 (remote-utils-ipa.o: remote-utils.c): Remove.
2138 (regcache-ipa.o: regcache.c): Remove.
2139 (i386-linux-ipa.o: i386-linux.c): Remove.
2140 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
2141 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
2142 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
2143 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
2144 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
2145 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
2146 (amd64-linux-ipa.o: amd64-linux.c): Remove.
2147 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
2148 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
2149 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
2150 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
2151 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
2152 (aarch64-ipa.o: aarch64.c): Remove.
2153 (s390-linux32-ipa.o: s390-linux32.c): Remove.
2154 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
2155 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
2156 (s390-linux64-ipa.o: s390-linux64.c): Remove.
2157 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
2158 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
2159 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
2160 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
2161 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
2162 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
2163 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
2164 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
2165 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
2166 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
2167 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
2168 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
2169 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
2170 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
2171 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
2172 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
2173 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
2174 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
2175 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
2176 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
2177 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
2178 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
2179 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
2180 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
2181 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
2182 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
2183 (tdesc-ipa.o: tdesc.c): Remove.
2184 (x32-linux-ipa.o: x32-linux.c): Remove.
2185 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
2186 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
2187
2188 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2189
2190 * Makefile.in (%.o: ../arch/%.c): New rule.
2191 (arm.o: ../arch/arm.c): Remove.
2192 (arm-linux.o: ../arch/arm-linux.c): Remove.
2193 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
2194 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
2195
2196 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2197
2198 * Makefile.in (%.o: ../nat/%.c): New rule.
2199 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
2200 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
2201 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
2202 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
2203 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
2204 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
2205 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
2206 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
2207 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
2208 (linux-personality.o: ../nat/linux-personality.c): Remove.
2209 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
2210 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
2211 (x86-linux.o: ../nat/x86-linux.c): Remove.
2212 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
2213 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
2214
2215 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2216
2217 * Makefile.in (%.o: ../common/%.c): New rule.
2218 (signals.o: ../common/signals.c): Remove.
2219 (print-utils.o: ../common/print-utils.c): Remove.
2220 (rsp-low.o: ../common/rsp-low.c): Remove.
2221 (common-utils.o: ../common/common-utils.c): Remove.
2222 (posix-strerror.o: ../common/posix-strerror.c): Remove.
2223 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
2224 (vec.o: ../common/vec.c): Remove.
2225 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
2226 (xml-utils.o: ../common/xml-utils.c): Remove.
2227 (ptid.o: ../common/ptid.c): Remove.
2228 (buffer.o: ../common/buffer.c): Remove.
2229 (format.o: ../common/format.c): Remove.
2230 (filestuff.o: ../common/filestuff.c): Remove.
2231 (agent.o: ../common/agent.c): Remove.
2232 (errors.o: ../common/errors.c): Remove.
2233 (environ.o: ../common/environ.c): Remove.
2234 (common-debug.o: ../common/common-debug.c): Remove.
2235 (cleanups.o: ../common/cleanups.c): Remove.
2236 (common-exceptions.o: ../common/common-exceptions.c): Remove.
2237 (fileio.o: ../common/fileio.c): Remove.
2238 (common-regcache.o: ../common/common-regcache.c): Remove.
2239 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
2240 (new-op.o: ../common/new-op.c): Remove.
2241 (btrace-common.o: ../common/btrace-common.c): Remove.
2242
2243 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2244
2245 * Makefile.in (%.o: ../target/%.c): New rule.
2246 (waitstatus.o: ../target/waitstatus.c): Remove.
2247
2248 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2249
2250 * Makefile.in
2251 (%.c: ../regformats/%.dat,
2252 (%.c: ../regformats/arm/%.dat,
2253 (%.c: ../regformats/i386/%.dat,
2254 (%.c: ../regformats/rs6000/%.dat): New rules.
2255 (aarch64.c): Remove.
2256 (reg-arm.c): Remove.
2257 (arm-with-iwmmxt.c): Remove.
2258 (arm-with-vfpv2.c): Remove.
2259 (arm-with-vfpv3.c): Remove.
2260 (arm-with-neon.c): Remove.
2261 (reg-bfin.c): Remove.
2262 (reg-cris.c): Remove.
2263 (reg-crisv32.c): Remove.
2264 (i386.c): Remove.
2265 (i386-linux.c): Remove.
2266 (i386-avx.c): Remove.
2267 (i386-avx-linux.c): Remove.
2268 (i386-avx-avx512.c): Remove.
2269 (i386-avx-avx512-linux.c): Remove.
2270 (i386-mpx.c): Remove.
2271 (i386-mpx-linux.c): Remove.
2272 (i386-avx-mpx-avx512-pku.c): Remove.
2273 (i386-avx-mpx-avx512-pku-linux.c): Remove.
2274 (i386-avx-mpx.c): Remove.
2275 (i386-avx-mpx-linux.c): Remove.
2276 (i386-mmx.c): Remove.
2277 (i386-mmx-linux.c): Remove.
2278 (reg-ia64.c): Remove.
2279 (reg-m32r.c): Remove.
2280 (reg-m68k.c): Remove.
2281 (reg-cf.c): Remove.
2282 (mips-linux.c): Remove.
2283 (mips-dsp-linux.c): Remove.
2284 (mips64-linux.c): Remove.
2285 (mips64-dsp-linux.c): Remove.
2286 (nios2-linux.c): Remove.
2287 (powerpc-32.c): Remove.
2288 (powerpc-32l.c): Remove.
2289 (powerpc-altivec32l.c): Remove.
2290 (powerpc-cell32l.c): Remove.
2291 (powerpc-vsx32l.c): Remove.
2292 (powerpc-isa205-32l.c): Remove.
2293 (powerpc-isa205-altivec32l.c): Remove.
2294 (powerpc-isa205-vsx32l.c): Remove.
2295 (powerpc-e500l.c): Remove.
2296 (powerpc-64l.c): Remove.
2297 (powerpc-altivec64l.c): Remove.
2298 (powerpc-cell64l.c): Remove.
2299 (powerpc-vsx64l.c): Remove.
2300 (powerpc-isa205-64l.c): Remove.
2301 (powerpc-isa205-altivec64l.c): Remove.
2302 (powerpc-isa205-vsx64l.c): Remove.
2303 (s390-linux32.c): Remove.
2304 (s390-linux32v1.c): Remove.
2305 (s390-linux32v2.c): Remove.
2306 (s390-linux64.c): Remove.
2307 (s390-linux64v1.c): Remove.
2308 (s390-linux64v2.c): Remove.
2309 (s390-te-linux64.c): Remove.
2310 (s390-vx-linux64.c): Remove.
2311 (s390-tevx-linux64.c): Remove.
2312 (s390x-linux64.c): Remove.
2313 (s390x-linux64v1.c): Remove.
2314 (s390x-linux64v2.c): Remove.
2315 (s390x-te-linux64.c): Remove.
2316 (s390x-vx-linux64.c): Remove.
2317 (s390x-tevx-linux64.c): Remove.
2318 (tic6x-c64xp-linux.c): Remove.
2319 (tic6x-c64x-linux.c): Remove.
2320 (tic6x-c62x-linux.c): Remove.
2321 (reg-sh.c): Remove.
2322 (reg-sparc64.c): Remove.
2323 (reg-spu.c): Remove.
2324 (amd64.c): Remove.
2325 (amd64-linux.c): Remove.
2326 (amd64-avx.c): Remove.
2327 (amd64-avx-linux.c): Remove.
2328 (amd64-avx-avx512.c): Remove.
2329 (amd64-avx-avx512-linux.c): Remove.
2330 (amd64-mpx.c): Remove.
2331 (amd64-mpx-linux.c): Remove.
2332 (amd64-avx-mpx-avx512-pku.c): Remove.
2333 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
2334 (amd64-avx-mpx.c): Remove.
2335 (amd64-avx-mpx-linux.c): Remove.
2336 (x32.c): Remove.
2337 (x32-linux.c): Remove.
2338 (x32-avx.c): Remove.
2339 (x32-avx-linux.c): Remove.
2340 (x32-avx-avx512.c): Remove.
2341 (x32-avx-avx512-linux.c): Remove.
2342 (reg-xtensa.c): Remove.
2343 (reg-tilegx.c): Remove.
2344 (reg-tilegx32.c): Remove.
2345
2346 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
2347
2348 * Makefile.in (SFILES): Add "common/environ.c".
2349 (OBJS): Add "common/environ.h".
2350
2351 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
2352
2353 * configure.ac: Check if the fs_base and gs_base members of
2354 `struct user_regs_struct' exist.
2355 * config.in: Regenerated.
2356 * configure: Likewise.
2357
2358 2017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
2359
2360 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
2361 target_read_memory.
2362 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
2363 (get_next_pcs_syscall_next_pc): Likewise.
2364
2365 2016-12-23 Luis Machado <lgustavo@codesourcery.com>
2366
2367 * win32-i386-low.c: Fix incorrect reference to a couple source files.
2368 * nto-x86-low.c: Likewise.
2369
2370 2016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
2371
2372 * Makefile.in: Include disable-implicit-rules.mk.
2373
2374 2016-11-23 Pedro Alves <palves@redhat.com>
2375
2376 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
2377 (debug_vprintf): Use std::chrono::steady_clock instead of
2378 gettimeofday. Use '.' instead of ':'.
2379 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
2380 (get_timestamp): Use std::chrono::steady_clock instead of
2381 gettimeofday.
2382
2383 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
2384
2385 * Makefile.in: Fix whitespace formatting.
2386
2387 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
2388
2389 * Makefile.in (SFILES, OBS): Flatten list and order
2390 alphabetically.
2391
2392 2016-11-23 Pedro Alves <palves@redhat.com>
2393
2394 * event-loop.c (handle_file_event): Use warning.
2395 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
2396 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
2397 Use warning.
2398
2399 2016-11-23 Pedro Alves <palves@redhat.com>
2400
2401 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
2402 output.
2403 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
2404 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
2405 debug_printf and debug_flush for debug output.
2406 * server.c (handle_general_set): Likewise.
2407 * thread-db.c (try_thread_db_load): Use debug_printf for debug
2408 output.
2409
2410 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
2411
2412 * Makefile.in (.c.o): Replace rule with ...
2413 (%.o: %.c): ... this one.
2414
2415 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
2416
2417 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
2418 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
2419 make.
2420 * configure.ac: Remove checks for the make program.
2421 * configure: Re-generate.
2422
2423 2016-10-28 Pedro Alves <palves@redhat.com>
2424
2425 * Makefile.in (CXX_DIALECT): Get from configure.
2426 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
2427 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
2428 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
2429 * config.in: Regenerate.
2430 * configure: Regenerate.
2431
2432 2016-10-27 Yao Qi <yao.qi@linaro.org>
2433
2434 * linux-low.c (linux_supports_range_stepping): Return true if
2435 can_software_single_step return true.
2436
2437 2016-10-27 Yao Qi <yao.qi@linaro.org>
2438
2439 * inferiors.c (find_inferior_in_random): New function.
2440 * inferiors.h (find_inferior_in_random): Declare.
2441 * linux-low.c (linux_wait_for_event_filtered): Call
2442 find_inferior_in_random instead of find_inferior.
2443
2444 2016-10-27 Yao Qi <yao.qi@linaro.org>
2445
2446 * linux-low.c (linux_wait_1): If single-step breakpoints are
2447 inserted, remove them.
2448
2449 2016-10-26 Pedro Alves <palves@redhat.com>
2450
2451 * linux-low.c (handle_extended_wait): Link parent/child fork
2452 threads.
2453 (linux_wait_1): Unlink them.
2454 (linux_set_resume_request): Ignore resume requests for
2455 already-resumed and unhandled fork child threads.
2456 * linux-low.h (struct lwp_info) <fork_relative>: New field.
2457 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
2458 New functions.
2459 (handle_v_requests) <vCont>: Don't call require_running.
2460 * server.h (in_queued_stop_replies): New declaration.
2461
2462 2016-10-24 Yao Qi <yao.qi@linaro.org>
2463
2464 PR server/20733
2465 * linux-aarch64-low.c (append_insns): Cast the return value to
2466 'uint32_t *'.
2467
2468 2016-10-10 Yao Qi <yao.qi@linaro.org>
2469
2470 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
2471
2472 2016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
2473
2474 * target.c (target_supports_multi_process): New function, moved
2475 from...
2476 * target.h (target_supports_multi_process): ... here. Remove
2477 macro.
2478
2479 2016-10-05 Tom Tromey <tom@tromey.com>
2480
2481 PR remote/20655:
2482 * tracepoint.c (handle_tracepoint_bkpts): Check
2483 ipa_error_tracepoint, not ipa_stopping_tracepoint.
2484
2485 2016-10-05 Yao Qi <yao.qi@linaro.org>
2486
2487 * configure.srv: Update the path of arm-*.xml files.
2488
2489 2016-10-05 Terry Guo <terry.guo@arm.com>
2490 Yao Qi <yao.qi@linaro.org>
2491
2492 * Makefile.in: Adjust the path of rules.
2493 * configure.srv: Update the path of xml files.
2494 * regformats/arm-with-iwmmxt.dat: Regenerated.
2495 * regformats/arm-with-neon.dat: Likewise.
2496 * regformats/arm-with-vfpv2.dat: Likewise.
2497 * regformats/arm-with-vfpv3.dat Likewise.
2498
2499 2016-09-30 Yao Qi <yao.qi@linaro.org>
2500
2501 PR gdbserver/20627
2502 * target.c (target_stop_and_wait): Don't call
2503 target_continue_no_signal, use resume_stop instead.
2504
2505 2016-09-26 Yao Qi <yao.qi@linaro.org>
2506
2507 * linux-low.c (linux_wait_1): Call debug_exit.
2508
2509 2016-09-23 Pedro Alves <palves@redhat.com>
2510
2511 * Makefile.in (SFILES): Add common/new-op.c.
2512 (OBS): Add common/new-op.o.
2513 (new-op.o): New rule.
2514
2515 2016-09-21 Simon Marchi <simon.marchi@ericsson.com>
2516
2517 * .gitinore: Ignore more files.
2518
2519 2016-09-21 Yao Qi <yao.qi@linaro.org>
2520
2521 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
2522 23.
2523
2524 2016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
2525
2526 * server.c (start_inferior): Call target_mourn_inferior instead of
2527 mourn_inferior; pass ptid_t argument to it.
2528 (resume): Likewise.
2529 (handle_target_event): Likewise.
2530 * target.c (target_mourn_inferior): New function.
2531 * target.h (mourn_inferior): Delete macro.
2532
2533 2016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
2534
2535 * linux-low.c (lwp_is_stepping): New function.
2536
2537 2016-09-06 Carl Love <cel@us.ibm.com>
2538
2539 * server.c (start_inferior): Fixed comment, requested comment change
2540 didn't get updated correctly. Removed reference to ptrace () call as
2541 it is only true on Linux systems.
2542
2543 2016-09-06 Carl Love <cel@us.ibm.com>
2544
2545 * server.c (start_inferior): Do not call
2546 function target_post_create_inferior () if the
2547 inferior process has already exited.
2548
2549 2016-09-05 Pedro Alves <palves@redhat.com>
2550
2551 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
2552 (COMPILE.pre, CC_LD): Use CXX directly.
2553 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
2554 * acinclude.m4: Don't include build-with-cxx.m4.
2555 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
2556 * configure: Regenerate.
2557
2558 2016-09-02 Akash Trehan <akash.trehan123@gmail.com>
2559
2560 PR gdb/19495
2561 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
2562 call writing data to own_buf.
2563
2564 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
2565
2566 * target.c (mywait): Call target_wait instead of
2567 the_target->wait.
2568 (target_wait): New function.
2569
2570 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
2571
2572 * server.c (start_inferior): New variable 'ptid'. Replace calls
2573 to the_target->resume by target_continue{,_no_signal}, depending
2574 on the case.
2575 * target.c (target_stop_and_wait): Call target_continue_no_signal
2576 instead of the_target->resume.
2577 (target_continue): New function.
2578
2579 2016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
2580
2581 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
2582
2583 2016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
2584
2585 PR server/20491
2586 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
2587 ps_prochandle.
2588 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
2589 * linux-arm-low.c (ps_get_thread_area): Likewise.
2590 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
2591 * linux-m68k-low.c (ps_get_thread_area): Likewise.
2592 * linux-mips-low.c (ps_get_thread_area): Likewise.
2593 * linux-nios2-low.c (ps_get_thread_area): Likewise.
2594 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
2595 * linux-x86-low.c (ps_get_thread_area): Likewise.
2596 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
2597
2598 2016-08-19 Pedro Alves <palves@redhat.com>
2599
2600 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
2601
2602 2016-08-19 Pedro Alves <palves@redhat.com>
2603
2604 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
2605 comment. Use memcpy instead of casting through unsigned long.
2606
2607 2016-08-19 Pedro Alves <palves@redhat.com>
2608
2609 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
2610 allocating around 0x80000000.
2611
2612 2016-08-19 Pedro Alves <palves@redhat.com>
2613
2614 PR gdb/20415
2615 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
2616 (x32-avx512-linux-ipa.o): New rules.
2617 * configure.ac (x86_64-*-linux*): New x32 check.
2618 * configure.srv (ipa_x32_linux_regobj): New.
2619 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
2620 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
2621 descriptions.
2622 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
2623 descriptions.
2624 * configure: Regenerate.
2625
2626 2016-08-09 Pedro Alves <palves@redhat.com>
2627
2628 PR gdb/18653
2629 * Makefile.in (OBS): Add signals-state-save-restore.o.
2630 (signals-state-save-restore.o): New rule.
2631 * config.in: Regenerate.
2632 * configure: Regenerate.
2633 * linux-low.c: Include "signals-state-save-restore.h".
2634 (linux_create_inferior): Call
2635 restore_original_signals_state.
2636 * server.c: Include "dispositions-save-restore.h".
2637 (captured_main): Call save_original_signals_state.
2638
2639 2016-08-05 Pedro Alves <palves@redhat.com>
2640
2641 * configure: Regenerate.
2642
2643 2016-08-04 Yao Qi <yao.qi@linaro.org>
2644
2645 * linux-low.c (regsets_fetch_inferior_registers): Check
2646 errno is ESRCH or not.
2647
2648 2016-08-02 Yao Qi <yao.qi@linaro.org>
2649
2650 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
2651 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
2652 (thread_db_load_search): Update.
2653 (try_thread_db_load_1): Don't look for td_ta_event_addr,
2654 td_ta_set_event and td_ta_event_getmsg.
2655
2656 2016-07-26 Pedro Alves <palves@redhat.com>
2657
2658 PR server/20414
2659 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
2660 of unsigned long for 64-bit registers and use uint32_t instead of
2661 unsigned int for 32-bit registers.
2662
2663 2016-07-26 Pedro Alves <palves@redhat.com>
2664
2665 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
2666 to 'ptrace'.
2667
2668 2016-07-21 Tom Tromey <tom@tromey.com>
2669
2670 * configure: Rebuild.
2671
2672 2016-07-21 Yao Qi <yao.qi@linaro.org>
2673
2674 * mem-break.c (find_gdb_breakpoint): Cast bp to
2675 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
2676
2677 2016-07-21 Yao Qi <yao.qi@linaro.org>
2678
2679 * server.c (handle_v_requests): Support s and S actions
2680 if target_supports_software_single_step return true.
2681
2682 2016-07-21 Yao Qi <yao.qi@linaro.org>
2683
2684 * linux-low.c (resume_stopped_resumed_lwps): If resume request
2685 is resume_step, call maybe_hw_step.
2686 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
2687 and unstop them.
2688 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
2689 breakpoints or not.
2690 (proceed_one_lwp): If resume request is resume_step, install
2691 reinsert breakpoints and call maybe_hw_step.
2692
2693 2016-07-21 Yao Qi <yao.qi@linaro.org>
2694
2695 * linux-low.c (proceed_one_lwp): Declare.
2696 (linux_resume_one_thread): Remove local variable 'step'.
2697 Lift code enqueue signal. Call proceed_one_lwp instead of
2698 linux_resume_one_lwp.
2699
2700 2016-07-21 Yao Qi <yao.qi@linaro.org>
2701
2702 * linux-low.c (linux_resume_one_thread): Call
2703 enqueue_pending_signal.
2704
2705 2016-07-21 Yao Qi <yao.qi@linaro.org>
2706
2707 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
2708 * inferiors.c (do_restore_current_thread_cleanup): New function.
2709 (make_cleanup_restore_current_thread): Likewise.
2710 * linux-low.c (install_software_single_step_breakpoints): Call
2711 make_cleanup_restore_current_thread. Switch current_thread to
2712 thread.
2713
2714 2016-07-21 Yao Qi <yao.qi@linaro.org>
2715
2716 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
2717 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
2718 (clone_one_breakpoint): Likewise.
2719 (delete_reinsert_breakpoints): Change parameter to thread.
2720 Callers updated.
2721 (has_reinsert_breakpoints): Likewise.
2722 (uninsert_reinsert_breakpoints): Likewise.
2723 (reinsert_reinsert_breakpoints): Likewise.
2724 * mem-break.h (set_reinsert_breakpoint): Update declaration.
2725 (delete_reinsert_breakpoints): Likewise.
2726 (reinsert_reinsert_breakpoints): Likewise.
2727 (uninsert_reinsert_breakpoints): Likewise.
2728 (has_reinsert_breakpoints): Likewise.
2729
2730 2016-07-21 Yao Qi <yao.qi@linaro.org>
2731
2732 * inferiors.c (get_thread_process): Make parameter const.
2733 * inferiors.h (get_thread_process): Update declaration.
2734 * mem-break.c (clone_all_breakpoints): Remove all parameters.
2735 Add new parameters child_thread and parent_thread. Callers
2736 updated.
2737 * mem-break.h (clone_all_breakpoints): Update declaration.
2738
2739 2016-07-21 Yao Qi <yao.qi@linaro.org>
2740
2741 * mem-break.c (struct breakpoint) <cond_list>: Remove.
2742 <command_list, handler>: Remove.
2743 (struct gdb_breakpoint): New.
2744 (struct other_breakpoint): New.
2745 (struct reinsert_breakpoint): New.
2746 (is_gdb_breakpoint): New function.
2747 (any_persistent_commands): Update command_list if
2748 is_gdb_breakpoint returns true.
2749 (set_breakpoint): Create breakpoints according to their types.
2750 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
2751 (set_gdb_breakpoint_1): Likewise.
2752 (set_gdb_breakpoint): Likewise.
2753 (clear_breakpoint_conditions): Change parameter type to
2754 'struct gdb_breakpoint *'.
2755 (clear_breakpoint_commands): Likewise.
2756 (clear_breakpoint_conditions_and_commands): Likewise.
2757 (add_condition_to_breakpoint): Likewise.
2758 (add_breakpoint_condition): Likewise.
2759 (add_commands_to_breakpoint): Likewise.
2760 (check_breakpoints): Check other_breakpoint.
2761 (clone_one_breakpoint): Clone breakpopint according to its type.
2762 * mem-break.h (struct gdb_breakpoint): Declare.
2763 (set_gdb_breakpoint): Update declaration.
2764 (clear_breakpoint_conditions_and_commands): Likewise.
2765 (add_breakpoint_condition): Likewise.
2766 (add_breakpoint_commands): Likewise.
2767 * server.c (process_point_options): Change parameter type to
2768 'struct gdb_breakpoint *'.
2769
2770 2016-07-21 Yao Qi <yao.qi@linaro.org>
2771
2772 * mem-break.c (set_breakpoint_at): Rename it to ...
2773 (set_breakpoint_type_at): ... it.
2774 (set_breakpoint_at): Call set_breakpoint_type_at.
2775 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
2776 * mem-break.h (set_breakpoint_at): Update comments.
2777
2778 2016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
2779
2780 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
2781 to buf parameter.
2782 (nios2_store_gregset): Likewise.
2783
2784 2016-07-01 Pedro Alves <palves@redhat.com>
2785 Antoine Tremblay <antoine.tremblay@ericsson.com>
2786
2787 * linux-low.c: Change interface to take the target lwp_info
2788 pointer directly and return void. Handle detaching from a zombie
2789 thread.
2790 (linux_detach_lwp_callback): New function.
2791 (linux_detach): Detach from the leader thread after detaching from
2792 the clone threads.
2793
2794 2016-06-28 Yao Qi <yao.qi@linaro.org>
2795
2796 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
2797 for variable new_offset.
2798 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
2799 (aarch64_ftrace_insn_reloc_cb): Likewise.
2800 (aarch64_ftrace_insn_reloc_tb): Likewise.
2801 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
2802 PRIx64 instead of PRIx32.
2803
2804 2016-06-28 Yao Qi <yao.qi@linaro.org>
2805
2806 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
2807 (the_low_target): Install arm_get_syscall_trapinfo.
2808
2809 2016-06-28 Yao Qi <yao.qi@linaro.org>
2810
2811 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
2812 function.
2813 (the_low_target): Install aarch64_get_syscall_trapinfo.
2814
2815 2016-06-28 Yao Qi <yao.qi@linaro.org>
2816
2817 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
2818 Callers updated.
2819 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
2820 Remove parameter sysno.
2821 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
2822 sysret.
2823
2824 2016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
2825
2826 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
2827 (s390_emit_ne_goto): Likewise.
2828 (s390_emit_lt_goto): Likewise.
2829 (s390_emit_le_goto): Likewise.
2830 (s390_emit_gt_goto): Likewise.
2831 (s390_emit_ge_goto): Likewise.
2832 (s390x_emit_eq_goto): Likewise.
2833 (s390x_emit_ne_goto): Likewise.
2834 (s390x_emit_lt_goto): Likewise.
2835 (s390x_emit_le_goto): Likewise.
2836 (s390x_emit_gt_goto): Likewise.
2837 (s390x_emit_ge_goto): Likewise.
2838 (s390_emit_ops_impl): Mark variable static.
2839 (s390x_emit_ops): Likewise.
2840
2841 2016-06-17 Yao Qi <yao.qi@linaro.org>
2842
2843 * linux-low.c (handle_extended_wait): Call
2844 uninsert_reinsert_breakpoints for the parent process. Remove
2845 reinsert breakpoints from the child process. Reinsert them to
2846 the parent process when vfork is done.
2847 * mem-break.c (uninsert_reinsert_breakpoints): New function.
2848 (reinsert_reinsert_breakpoints): New function.
2849 * mem-break.h (uninsert_reinsert_breakpoints): Declare
2850 (reinsert_reinsert_breakpoints): Declare.
2851
2852 2016-06-17 Yao Qi <yao.qi@linaro.org>
2853
2854 * linux-low.c (handle_extended_wait): If the parent is doing
2855 step-over, remove the reinsert breakpoints from the forked child.
2856
2857 2016-06-17 Yao Qi <yao.qi@linaro.org>
2858
2859 * linux-low.c (unsuspend_all_lwps): Declare.
2860 (linux_low_filter_event): If thread exited, call finish_step_over.
2861 If step-over is finished, unsuspend other threads.
2862
2863 2016-06-17 Yao Qi <yao.qi@linaro.org>
2864
2865 * linux-low.c (linux_resume_one_lwp_throw): Assert
2866 has_reinsert_breakpoints returns false.
2867 * mem-break.c (delete_disabled_breakpoints): Assert
2868 bp type isn't reinsert_breakpoint.
2869
2870 2016-06-17 Yao Qi <yao.qi@linaro.org>
2871
2872 * linux-low.c (maybe_hw_step): New function.
2873 (linux_resume_one_lwp_throw): Call maybe_hw_step.
2874 (finish_step_over): Switch current_thread to lwp temporarily,
2875 and assert has_reinsert_breakpoints returns true.
2876 (proceed_one_lwp): Call maybe_hw_step.
2877 * mem-break.c (has_reinsert_breakpoints): New function.
2878 * mem-break.h (has_reinsert_breakpoints): Declare.
2879
2880 2016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
2881
2882 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
2883
2884 2016-05-17 Yao Qi <yao.qi@linaro.org>
2885
2886 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
2887 instead of find_inferior.
2888
2889 2016-05-05 Yao Qi <yao.qi@linaro.org>
2890
2891 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
2892 Initialize res to zero.
2893
2894 2016-05-05 Yao Qi <yao.qi@linaro.org>
2895
2896 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
2897 to uint32_t.
2898
2899 2016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
2900
2901 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
2902 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
2903 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
2904
2905 2016-04-28 Par Olsson <par.olsson@windriver.com>
2906 Simon Marchi <simon.marchi@ericsson.com>
2907
2908 * tracepoint.c (write_inferior_int8): New function.
2909 (cmd_qtenable_disable): Write enable flag using
2910 write_inferior_int8.
2911
2912 2016-04-25 Yao Qi <yao.qi@linaro.org>
2913
2914 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
2915 (need_step_over_p): Return zero if the LWP has pending signals
2916 can be delivered on software single step target.
2917
2918 2016-04-25 Yao Qi <yao.qi@linaro.org>
2919
2920 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
2921 return instead of error.
2922
2923 2016-04-22 Yao Qi <yao.qi@linaro.org>
2924
2925 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
2926 to 23.
2927
2928 2016-04-22 Yao Qi <yao.qi@linaro.org>
2929
2930 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
2931 signal when stepping over breakpoint with software single
2932 step.
2933
2934 2016-04-21 Pedro Alves <palves@redhat.com>
2935
2936 * linux-s390-low.c (s390_collect_ptrace_register)
2937 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
2938 add casts.
2939 (s390_check_regset): Use void * instead of gdb_byte *.
2940
2941 2016-04-20 Pedro Alves <palves@redhat.com>
2942
2943 * configure: Renegerate.
2944
2945 2016-04-20 Yao Qi <yao.qi@linaro.org>
2946
2947 * linux-aarch32-low.c: Include "arch/arm-linux.h".
2948 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
2949 number 16.
2950 (arm_store_gregset): Likewise.
2951
2952 2016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
2953
2954 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
2955 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
2956 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
2957 (amd64-avx-mpx-linux.c): New rules.
2958 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
2959 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
2960 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
2961 (srv_amd64_regobj): Add amd64-avx-mpx.o.
2962 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
2963 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
2964 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
2965 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
2966 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
2967 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
2968 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
2969 * linux-x86-low.c (x86_linux_read_description): Add case for
2970 X86_XSTATE_AVX_MPX_MASK.
2971 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
2972 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
2973 init_registers_i386_avx_mpx_linux.
2974 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
2975 (initialize_low_tracepoint): Call
2976 init_registers_i386_avx_mpx_linux.
2977 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
2978 (initialize_low_tracepoint): Call
2979 init_registers_amd64_avx_mpx_linux.
2980 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
2981 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
2982 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
2983 declarations.
2984
2985 2016-04-18 Pedro Alves <palves@redhat.com>
2986
2987 * configure: Regenerate.
2988
2989 2016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
2990
2991 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
2992 (aarch64_emit_sub): Likewise.
2993
2994 2016-04-12 Pedro Alves <palves@redhat.com>
2995
2996 * utils.c (prepare_to_throw_exception): Delete.
2997
2998 2016-04-05 Simon Marchi <simon.marchi@ericsson.com>
2999
3000 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
3001
3002 2016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
3003
3004 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
3005
3006 2016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
3007
3008 * linux-aarch64-ipa.c: Add <elf.h> include.
3009 * linux-ppc-ipa.c: Add <elf.h> include.
3010 * linux-s390-ipa.c: Add <elf.h> include.
3011
3012 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
3013
3014 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
3015 (get_raw_reg_ptr): Likewise.
3016 (get_trace_state_variable_value_ptr): Likewise.
3017 (set_trace_state_variable_value_ptr): Likewise.
3018 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
3019 char *.
3020
3021 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
3022 Marcin Kościelnicki <koriakin@0x04.net>
3023
3024 PR/17221
3025 * linux-ppc-low.c (emit_insns): New function.
3026 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
3027 (ppc_emit_prologue): New function.
3028 (ppc_emit_epilogue): New function.
3029 (ppc_emit_add): New function.
3030 (ppc_emit_sub): New function.
3031 (ppc_emit_mul): New function.
3032 (ppc_emit_lsh): New function.
3033 (ppc_emit_rsh_signed): New function.
3034 (ppc_emit_rsh_unsigned): New function.
3035 (ppc_emit_ext): New function.
3036 (ppc_emit_zero_ext): New function.
3037 (ppc_emit_log_not): New function.
3038 (ppc_emit_bit_and): New function.
3039 (ppc_emit_bit_or): New function.
3040 (ppc_emit_bit_xor): New function.
3041 (ppc_emit_bit_not): New function.
3042 (ppc_emit_equal): New function.
3043 (ppc_emit_less_signed): New function.
3044 (ppc_emit_less_unsigned): New function.
3045 (ppc_emit_ref): New function.
3046 (ppc_emit_const): New function.
3047 (ppc_emit_reg): New function.
3048 (ppc_emit_pop): New function.
3049 (ppc_emit_stack_flush): New function.
3050 (ppc_emit_swap): New function.
3051 (ppc_emit_stack_adjust): New function.
3052 (ppc_emit_call): New function.
3053 (ppc_emit_int_call_1): New function.
3054 (ppc_emit_void_call_2): New function.
3055 (ppc_emit_if_goto): New function.
3056 (ppc_emit_goto): New function.
3057 (ppc_emit_eq_goto): New function.
3058 (ppc_emit_ne_goto): New function.
3059 (ppc_emit_lt_goto): New function.
3060 (ppc_emit_le_goto): New function.
3061 (ppc_emit_gt_goto): New function.
3062 (ppc_emit_ge_goto): New function.
3063 (ppc_write_goto_address): New function.
3064 (ppc_emit_ops_impl): New static variable.
3065 (ppc64v1_emit_prologue): New function.
3066 (ppc64v2_emit_prologue): New function.
3067 (ppc64_emit_epilogue): New function.
3068 (ppc64_emit_add): New function.
3069 (ppc64_emit_sub): New function.
3070 (ppc64_emit_mul): New function.
3071 (ppc64_emit_lsh): New function.
3072 (ppc64_emit_rsh_signed): New function.
3073 (ppc64_emit_rsh_unsigned): New function.
3074 (ppc64_emit_ext): New function.
3075 (ppc64_emit_zero_ext): New function.
3076 (ppc64_emit_log_not): New function.
3077 (ppc64_emit_bit_and): New function.
3078 (ppc64_emit_bit_or): New function.
3079 (ppc64_emit_bit_xor): New function.
3080 (ppc64_emit_bit_not): New function.
3081 (ppc64_emit_equal): New function.
3082 (ppc64_emit_less_signed): New function.
3083 (ppc64_emit_less_unsigned): New function.
3084 (ppc64_emit_ref): New function.
3085 (ppc64_emit_const): New function.
3086 (ppc64v1_emit_reg): New function.
3087 (ppc64v2_emit_reg): New function.
3088 (ppc64_emit_pop): New function.
3089 (ppc64_emit_stack_flush): New function.
3090 (ppc64_emit_swap): New function.
3091 (ppc64v1_emit_call): New function.
3092 (ppc64v2_emit_call): New function.
3093 (ppc64v1_emit_int_call_1): New function.
3094 (ppc64v2_emit_int_call_1): New function.
3095 (ppc64v1_emit_void_call_2): New function.
3096 (ppc64v2_emit_void_call_2): New function.
3097 (ppc64_emit_if_goto): New function.
3098 (ppc64_emit_eq_goto): New function.
3099 (ppc64_emit_ne_goto): New function.
3100 (ppc64_emit_lt_goto): New function.
3101 (ppc64_emit_le_goto): New function.
3102 (ppc64_emit_gt_goto): New function.
3103 (ppc64_emit_ge_goto): New function.
3104 (ppc64v1_emit_ops_impl): New static variable.
3105 (ppc64v2_emit_ops_impl): New static variable.
3106 (ppc_emit_ops): New function.
3107 (linux_low_target): Wire in ppc_emit_ops.
3108
3109 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
3110 Marcin Kościelnicki <koriakin@0x04.net>
3111
3112 PR/17221
3113 * Makefile.in: Add powerpc-*-ipa.o
3114 * configure.srv: Add ipa_obj for powerpc*-linux.
3115 * linux-ppc-ipa.c: New file.
3116 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
3117 includes.
3118 (PPC_FIELD): New macro.
3119 (PPC_SEXT): New macro.
3120 (PPC_OP6): New macro.
3121 (PPC_BO): New macro.
3122 (PPC_LI): New macro.
3123 (PPC_BD): New macro.
3124 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
3125 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
3126 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
3127 (ppc_get_thread_area): New function.
3128 (is_elfv2_inferior): New function.
3129 (gen_ds_form): New function.
3130 (GEN_STD): New macro.
3131 (GEN_STDU): New macro.
3132 (GEN_LD): New macro.
3133 (GEN_LDU): New macro.
3134 (gen_d_form): New function.
3135 (GEN_ADDI): New macro.
3136 (GEN_ADDIS): New macro.
3137 (GEN_LI): New macro.
3138 (GEN_LIS): New macro.
3139 (GEN_ORI): New macro.
3140 (GEN_ORIS): New macro.
3141 (GEN_LWZ): New macro.
3142 (GEN_STW): New macro.
3143 (GEN_STWU): New macro.
3144 (gen_xfx_form): New function.
3145 (GEN_MFSPR): New macro.
3146 (GEN_MTSPR): New macro.
3147 (GEN_MFCR): New macro.
3148 (GEN_MTCR): New macro.
3149 (GEN_SYNC): New macro.
3150 (GEN_LWSYNC): New macro.
3151 (gen_x_form): New function.
3152 (GEN_OR): New macro.
3153 (GEN_MR): New macro.
3154 (GEN_LWARX): New macro.
3155 (GEN_STWCX): New macro.
3156 (GEN_CMPW): New macro.
3157 (gen_md_form): New function.
3158 (GEN_RLDICL): New macro.
3159 (GEN_RLDICR): New macro.
3160 (gen_i_form): New function.
3161 (GEN_B): New macro.
3162 (GEN_BL): New macro.
3163 (gen_b_form): New function.
3164 (GEN_BNE): New macro.
3165 (GEN_LOAD): New macro.
3166 (GEN_STORE): New macro.
3167 (gen_limm): New function.
3168 (gen_atomic_xchg): New function.
3169 (gen_call): New function.
3170 (ppc_relocate_instruction): New function.
3171 (ppc_install_fast_tracepoint_jump_pad): New function.
3172 (ppc_get_min_fast_tracepoint_insn_len): New function.
3173 (ppc_get_ipa_tdesc_idx): New function.
3174 (the_low_target): Wire in the new functions.
3175 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
3176 tdescs.
3177 * linux-ppc-tdesc.h: New file.
3178
3179 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
3180
3181 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
3182 (alloc_jump_pad_buffer): New function.
3183 * linux-amd64-ipa.c: Add <sys/mman.h> include.
3184 (alloc_jump_pad_buffer): New function.
3185 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
3186 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
3187 (alloc_jump_pad_buffer): New function.
3188 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
3189 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
3190 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
3191 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
3192
3193 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
3194
3195 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
3196 * linux-amd64-ipa.c: Likewise.
3197 * linux-i386-ipa.c: Likewise.
3198 * linux-s390-ipa.c: Likewise.
3199 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
3200 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
3201 set_trace_state_variable_value_ptr.
3202 (struct ipa_sym_addresses): Likewise.
3203 (symbol_list): Likewise.
3204 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
3205 accessing gdb_collect directly.
3206 (gdb_collect_ptr_type): New typedef.
3207 (get_raw_reg_ptr_type): New typedef.
3208 (get_trace_state_variable_value_ptr_type): New typedef.
3209 (set_trace_state_variable_value_ptr_type): New typedef.
3210 (gdb_collect_ptr): New global.
3211 (get_raw_reg_ptr): New global.
3212 (get_trace_state_variable_value_ptr): New global.
3213 (set_trace_state_variable_value_ptr): New global.
3214 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
3215 accessing get_raw_reg directly.
3216 (get_get_tsv_func_addr): Likewise for
3217 get_trace_state_variable_value_ptr.
3218 (get_set_tsv_func_addr): Likewise for
3219 set_trace_state_variable_value_ptr.
3220 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
3221
3222 2016-03-30 Simon Marchi <simon.marchi@ericsson.com>
3223
3224 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
3225
3226 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
3227
3228 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
3229 packets.
3230 (relocate_instruction): Remove own_buf.
3231 * server.c (own_buf): Make global.
3232 (handle_v_requests): Make global.
3233 * server.h (own_buf): New declaration.
3234 (handle_v_requests): New prototype.
3235
3236 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
3237
3238 PR 18377
3239 * linux-s390-low.c (add_insns): New function.
3240 (s390_emit_prologue): New function.
3241 (s390_emit_epilogue): New function.
3242 (s390_emit_add): New function.
3243 (s390_emit_sub): New function.
3244 (s390_emit_mul): New function.
3245 (s390_emit_lsh): New function.
3246 (s390_emit_rsh_signed): New function.
3247 (s390_emit_rsh_unsigned): New function.
3248 (s390_emit_ext): New function.
3249 (s390_emit_log_not): New function.
3250 (s390_emit_bit_and): New function.
3251 (s390_emit_bit_or): New function.
3252 (s390_emit_bit_xor): New function.
3253 (s390_emit_bit_not): New function.
3254 (s390_emit_equal): New function.
3255 (s390_emit_less_signed): New function.
3256 (s390_emit_less_unsigned): New function.
3257 (s390_emit_ref): New function.
3258 (s390_emit_if_goto): New function.
3259 (s390_emit_goto): New function.
3260 (s390_write_goto_address): New function.
3261 (s390_emit_litpool): New function.
3262 (s390_emit_const): New function.
3263 (s390_emit_call): New function.
3264 (s390_emit_reg): New function.
3265 (s390_emit_pop): New function.
3266 (s390_emit_stack_flush): New function.
3267 (s390_emit_zero_ext): New function.
3268 (s390_emit_swap): New function.
3269 (s390_emit_stack_adjust): New function.
3270 (s390_emit_set_r2): New function.
3271 (s390_emit_int_call_1): New function.
3272 (s390_emit_void_call_2): New function.
3273 (s390_emit_eq_goto): New function.
3274 (s390_emit_ne_goto): New function.
3275 (s390_emit_lt_goto): New function.
3276 (s390_emit_le_goto): New function.
3277 (s390_emit_gt_goto): New function.
3278 (s390_emit_ge_goto): New function.
3279 (s390x_emit_prologue): New function.
3280 (s390x_emit_epilogue): New function.
3281 (s390x_emit_add): New function.
3282 (s390x_emit_sub): New function.
3283 (s390x_emit_mul): New function.
3284 (s390x_emit_lsh): New function.
3285 (s390x_emit_rsh_signed): New function.
3286 (s390x_emit_rsh_unsigned): New function.
3287 (s390x_emit_ext): New function.
3288 (s390x_emit_log_not): New function.
3289 (s390x_emit_bit_and): New function.
3290 (s390x_emit_bit_or): New function.
3291 (s390x_emit_bit_xor): New function.
3292 (s390x_emit_bit_not): New function.
3293 (s390x_emit_equal): New function.
3294 (s390x_emit_less_signed): New function.
3295 (s390x_emit_less_unsigned): New function.
3296 (s390x_emit_ref): New function.
3297 (s390x_emit_if_goto): New function.
3298 (s390x_emit_const): New function.
3299 (s390x_emit_call): New function.
3300 (s390x_emit_reg): New function.
3301 (s390x_emit_pop): New function.
3302 (s390x_emit_stack_flush): New function.
3303 (s390x_emit_zero_ext): New function.
3304 (s390x_emit_swap): New function.
3305 (s390x_emit_stack_adjust): New function.
3306 (s390x_emit_int_call_1): New function.
3307 (s390x_emit_void_call_2): New function.
3308 (s390x_emit_eq_goto): New function.
3309 (s390x_emit_ne_goto): New function.
3310 (s390x_emit_lt_goto): New function.
3311 (s390x_emit_le_goto): New function.
3312 (s390x_emit_gt_goto): New function.
3313 (s390x_emit_ge_goto): New function.
3314 (s390_emit_ops): New function.
3315 (struct linux_target_ops): Fill in emit_ops hook.
3316
3317 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
3318
3319 PR 18377
3320 * Makefile.in: Add s390 IPA files.
3321 * configure.srv: Build IPA for s390.
3322 * linux-s390-ipa.c: New file.
3323 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
3324 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
3325 (tdesc_s390_linux32): Likewise.
3326 (init_registers_s390_linux32v1): Likewise.
3327 (tdesc_s390_linux32v1): Likewise.
3328 (init_registers_s390_linux32v2): Likewise.
3329 (tdesc_s390_linux32v2): Likewise.
3330 (init_registers_s390_linux64): Likewise.
3331 (tdesc_s390_linux64): Likewise.
3332 (init_registers_s390_linux64v1): Likewise.
3333 (tdesc_s390_linux64v1): Likewise.
3334 (init_registers_s390_linux64v2): Likewise.
3335 (tdesc_s390_linux64v2): Likewise.
3336 (init_registers_s390_te_linux64): Likewise.
3337 (tdesc_s390_te_linux64): Likewise.
3338 (init_registers_s390_vx_linux64): Likewise.
3339 (tdesc_s390_vx_linux64): Likewise.
3340 (init_registers_s390_tevx_linux64): Likewise.
3341 (tdesc_s390_tevx_linux64): Likewise.
3342 (init_registers_s390x_linux64): Likewise.
3343 (tdesc_s390x_linux64): Likewise.
3344 (init_registers_s390x_linux64v1): Likewise.
3345 (tdesc_s390x_linux64v1): Likewise.
3346 (init_registers_s390x_linux64v2): Likewise.
3347 (tdesc_s390x_linux64v2): Likewise.
3348 (init_registers_s390x_te_linux64): Likewise.
3349 (tdesc_s390x_te_linux64): Likewise.
3350 (init_registers_s390x_vx_linux64): Likewise.
3351 (tdesc_s390x_vx_linux64): Likewise.
3352 (init_registers_s390x_tevx_linux64): Likewise.
3353 (tdesc_s390x_tevx_linux64): Likewise.
3354 (have_hwcap_s390_vx): New static variable.
3355 (s390_arch_setup): Fill have_hwcap_s390_vx.
3356 (s390_get_thread_area): New function.
3357 (s390_ft_entry_gpr_esa): New const.
3358 (s390_ft_entry_gpr_zarch): New const.
3359 (s390_ft_entry_misc): New const.
3360 (s390_ft_entry_fr): New const.
3361 (s390_ft_entry_vr): New const.
3362 (s390_ft_main_31): New const.
3363 (s390_ft_main_64): New const.
3364 (s390_ft_exit_fr): New const.
3365 (s390_ft_exit_vr): New const.
3366 (s390_ft_exit_misc): New const.
3367 (s390_ft_exit_gpr_esa): New const.
3368 (s390_ft_exit_gpr_zarch): New const.
3369 (append_insns): New function.
3370 (s390_relocate_instruction): New function.
3371 (s390_install_fast_tracepoint_jump_pad): New function.
3372 (s390_get_min_fast_tracepoint_insn_len): New function.
3373 (s390_get_ipa_tdesc_idx): New function.
3374 (struct linux_target_ops): Wire in the above functions.
3375 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
3376 * linux-s390-tdesc.h: New file.
3377
3378 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
3379
3380 * linux-s390-low.c (s390_supports_tracepoints): New function.
3381 (struct linux_target_ops): Fill supports_tracepoints hook.
3382
3383 2016-03-18 Yao Qi <yao.qi@linaro.org>
3384
3385 * linux-low.c (lwp_signal_can_be_delivered): New function.
3386 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
3387
3388 2016-03-18 Yao Qi <yao.qi@linaro.org>
3389
3390 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
3391 0 if signal is enqueued. Remove 'signal' from one debugging
3392 message. Move one debugging message to some lines below.
3393 Remove code setting 'signal' to 0.
3394
3395 2016-03-18 Yao Qi <yao.qi@linaro.org>
3396
3397 * linux-low.c (linux_low_filter_event): Remove redundant
3398 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
3399
3400 2016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
3401
3402 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
3403 (struct linux_target_ops): Wire in the above.
3404
3405 2016-03-03 Yao Qi <yao.qi@linaro.org>
3406
3407 * linux-low.c: Update comments to start_step_over.
3408
3409 2016-03-03 Yao Qi <yao.qi@linaro.org>
3410
3411 PR server/19736
3412 * linux-low.c (handle_extended_wait): Set child suspended
3413 if event_lwp->bp_reinsert isn't zero.
3414
3415 2016-03-02 Yao Qi <yao.qi@linaro.org>
3416
3417 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
3418 enqueue_pending_signal.
3419
3420 2016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
3421
3422 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
3423 is actually loaded.
3424
3425 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
3426
3427 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
3428 (s390_regmap_3264) [!__s390x__]: New global.
3429 (s390_collect_ptrace_register): Skip map entries containing -1.
3430 (s390_supply_ptrace_register): Ditto.
3431 (s390_fill_gprs_high): New function.
3432 (s390_store_gprs_high): New function.
3433 (s390_regsets): Add NT_S390_HIGH_GPRS.
3434 (s390_get_hwcap): Enable on 31-bit.
3435 (have_hwcap_s390_high_gprs): Enable on 31-bit.
3436 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
3437 Detect NT_S390_HIGH_GPRS.
3438 (s390_usrregs_info_3264): Enable on 31-bit.
3439 (s390_regs_info): Enable regs_info_3264 on 31-bit.
3440 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
3441
3442 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
3443
3444 PR gdb/13808
3445 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
3446 * configure.srv: Ditto.
3447 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
3448 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
3449 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
3450 (init_registers_amd64_linux): Remove prototype.
3451 (tdesc_amd64_linux): Remove declaration.
3452 (get_ipa_tdesc): New function.
3453 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
3454 initialize remaining tdescs.
3455 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
3456 (init_registers_i386_linux): Remove prototype.
3457 (tdesc_i386_linux): Remove declaration.
3458 (get_ipa_tdesc): New function.
3459 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
3460 initialize remaining tdescs.
3461 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
3462 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
3463 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
3464 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
3465 (x86_get_ipa_tdesc_idx): New function.
3466 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
3467 * linux-x86-tdesc.h: New file.
3468 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
3469 (target_get_ipa_tdesc_idx): New macro.
3470 * tracepoint.c (ipa_tdesc_idx): New macro.
3471 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
3472 (symbol_list): Add ipa_tdesc_idx.
3473 (cmd_qtstart): Write ipa_tdesc_idx in the target.
3474 (ipa_tdesc): Remove.
3475 (ipa_tdesc_idx): New variable.
3476 (get_context_regcache): Use get_ipa_tdesc.
3477 (gdb_collect): Ditto.
3478 (gdb_probe): Ditto.
3479 * tracepoint.h (get_ipa_tdesc): New prototype.
3480 (ipa_tdesc): Remove.
3481
3482 2016-02-24 Pedro Alves <palves@redhat.com>
3483
3484 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
3485 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
3486 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
3487 Factor out common code between the USE_SIGTRAP_SIGINFO and
3488 !USE_SIGTRAP_SIGINFO blocks.
3489 (linux_low_filter_event): Call save_stop_reason instead of
3490 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
3491 Update comments.
3492 (linux_wait_1): Update comments.
3493
3494 2016-02-24 Wei-cheng Wang <cole945@gmail.com>
3495
3496 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
3497 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
3498 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
3499 ppc_insert_point, ppc_remove_point.
3500
3501 2016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
3502
3503 * linux-s390-low.c (s390_supports_z_point_type): New function.
3504 (struct linux_target_ops): Wire s390_supports_z_point_type in.
3505
3506 2016-02-16 Yao Qi <yao.qi@linaro.org>
3507
3508 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
3509 PC. Get pc from regcache_read_pc.
3510
3511 2016-02-12 Yao Qi <yao.qi@linaro.org>
3512
3513 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
3514 or linux_get_pc_32bit.
3515 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
3516
3517 2016-02-12 Yao Qi <yao.qi@linaro.org>
3518
3519 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
3520 arm_linux_get_next_pcs_fixup.
3521
3522 2016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
3523
3524 * tracepoint.c (x_tracepoint_action_download): Change
3525 write_inferior_data_ptr to write_inferior_data_pointer.
3526 (cmd_qtstart): Likewise.
3527 (write_inferior_data_ptr): Remove.
3528 (download_agent_expr): Change write_inferior_data_ptr to
3529 write_inferior_data_pointer.
3530 (download_tracepoint_1): Likewise.
3531 (download_tracepoint): Likewise.
3532 (download_trace_state_variables): Likewise.
3533
3534 2016-02-11 Wei-cheng Wang <cole945@gmail.com>
3535 Marcin Kościelnicki <koriakin@0x04.net>
3536
3537 * tracepoint.c (struct tracepoint_action_ops): Remove.
3538 (struct tracepoint_action): Remove ops.
3539 (m_tracepoint_action_download, r_tracepoint_action_download)
3540 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
3541 size and offset accordingly.
3542 (m_tracepoint_action_ops, r_tracepoint_action_ops)
3543 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
3544 (tracepoint_action_send, tracepoint_action_download): New functions.
3545 Helpers for trace action handlers.
3546 (add_tracepoint_action): Remove setup actions ops.
3547 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
3548
3549 2016-02-10 Yao Qi <yao.qi@linaro.org>
3550
3551 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
3552
3553 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
3554
3555 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
3556 to AC_OUTPUT.
3557 * configure: Regenerate.
3558
3559 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
3560
3561 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
3562 void * to gdb_byte *.
3563 * linux-low.c (siginfo_fixup): Likewise.
3564 (linux_xfer_siginfo): Likewise.
3565 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
3566 Likewise.
3567 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
3568
3569 2016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
3570
3571 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
3572 to srv_tgtobj.
3573 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
3574 to srv_tgtobj.
3575 * linux-x86-low.c [__x86_64__]: Include
3576 "nat/amd64-linux-siginfo.h".
3577 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
3578 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
3579 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
3580 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
3581 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
3582 (cpt_si_fd, si_timerid, si_overrun): Move from
3583 nat/amd64-linux-siginfo.c.
3584 * Makefile.in (amd64-linux-siginfo.o:): New rule.
3585
3586 2016-01-28 Simon Marchi <simon.marchi@ericsson.com>
3587
3588 * server.c (skip_to_semicolon): Remove.
3589 (process_point_options): Use strchrnul instead of
3590 skip_to_semicolon.
3591
3592 2016-01-26 Yao Qi <yao.qi@linaro.org>
3593
3594 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
3595 * linux-low.c (install_software_single_step_breakpoints): Don't
3596 call regcache_read_pc.
3597 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
3598 argument pc.
3599
3600 2016-01-26 Yao Qi <yao.qi@linaro.org>
3601
3602 * linux-low.c (install_software_single_step_breakpoints): Call
3603 regcache_read_pc instead of get_pc.
3604
3605 2016-01-26 Yao Qi <yao.qi@linaro.org>
3606
3607 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
3608 (unblock_async_io): Rename to ...
3609 (block_unblock_async_io): ... it. New function.
3610 (enable_async_io): Don't install SIGIO handler. Unblock it
3611 instead.
3612 (disable_async_io): Don't ignore SIGIO. Block it instead.
3613 (initialize_async_io): Install SIGIO handler. Don't call
3614 unblock_async_io.
3615
3616 2016-01-26 Yao Qi <yao.qi@linaro.org>
3617
3618 * remote-utils.c (getpkt): If the buffer isn't empty, and the
3619 first character is '\003', call *the_target->request_interrupt.
3620
3621 2016-01-25 Yao Qi <yao.qi@linaro.org>
3622
3623 * remote-utils.c (new_thread_notify): Remove.
3624 (dead_thread_notify): Likewise.
3625 * remote-utils.h (new_thread_notify): Remove declaration.
3626 (dead_thread_notify): Likewise.
3627
3628 2016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
3629
3630 * gdb.trace/pending.exp: Fix expected message on continue.
3631
3632 2016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
3633
3634 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
3635 it works properly on big-endian machines where sizeof (CORE_ADDR)
3636 != sizeof (void *).
3637
3638 2016-01-21 Pedro Alves <palves@redhat.com>
3639
3640 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
3641 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
3642 * configure: Regenerate.
3643
3644 2016-01-21 Yao Qi <yao.qi@linaro.org>
3645
3646 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
3647 is_thumb and set it according to CPSR saved on the stack.
3648 (get_next_pcs_syscall_next_pc): Pass is_thumb to
3649 arm_sigreturn_next_pc.
3650
3651 2016-01-18 Yao Qi <yao.qi@linaro.org>
3652
3653 * linux-low.c (linux_set_pc_64bit): New function.
3654 (linux_get_pc_64bit): New function.
3655 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
3656 Declare.
3657 * linux-sparc-low.c (debug_threads): Remove declaration.
3658 (sparc_get_pc): Remove.
3659 (the_low_target): Use linux_get_pc_64bit instead of
3660 sparc_get_pc.
3661 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
3662 (the_low_target): Use linux_get_pc_64bit and
3663 linux_set_pc_64bit.
3664
3665 2016-01-18 Yao Qi <yao.qi@linaro.org>
3666
3667 * linux-arm-low.c (debug_threads): Remove declaration.
3668 (arm_get_pc, arm_set_pc): Remove.
3669 (the_low_target): Use linux_get_pc_32bit and
3670 linux_set_pc_32bit.
3671 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
3672 (the_low_target): Use linux_get_pc_32bit and
3673 linux_set_pc_32bit.
3674 * linux-cris-low.c (debug_threads): Remove declaration.
3675 (cris_get_pc, cris_set_pc,): Remove.
3676 (the_low_target): Use linux_get_pc_32bit and
3677 linux_set_pc_32bit.
3678 * linux-crisv32-low.c (debug_threads): Remove declaration.
3679 (cris_get_pc, cris_set_pc): Remove.
3680 (the_low_target): Use linux_get_pc_32bit and
3681 linux_set_pc_32bit.
3682 * linux-low.c: Include inttypes.h.
3683 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
3684 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
3685 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
3686 (the_low_target): Use linux_get_pc_32bit and
3687 linux_set_pc_32bit.
3688 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
3689 (the_low_target): Use linux_get_pc_32bit and
3690 linux_set_pc_32bit.
3691 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
3692 (the_low_target): Use linux_get_pc_32bit and
3693 linux_set_pc_32bit.
3694 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
3695 (the_low_target): Use linux_get_pc_32bit and
3696 linux_set_pc_32bit.
3697 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
3698 (the_low_target): Use linux_get_pc_32bit and
3699 linux_set_pc_32bit.
3700
3701 2016-01-18 Gary Benson <gbenson@redhat.com>
3702
3703 * configure.ac (AC_FUNC_FORK): New check.
3704 * config.in: Regenerate.
3705 * configure: Likewise.
3706
3707 2016-01-14 Yao Qi <yao.qi@linaro.org>
3708
3709 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
3710 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
3711 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
3712 arm_get_next_pcs_ctor.
3713
3714 2016-01-12 Josh Stone <jistone@redhat.com>
3715 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3716
3717 * inferiors.h: Include "gdb_vecs.h".
3718 (struct process_info): Add syscalls_to_catch.
3719 * inferiors.c (remove_process): Free syscalls_to_catch.
3720 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
3721 syscall_return stops.
3722 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
3723 * server.c (handle_general_set): Handle QCatchSyscalls.
3724 (handle_query): Report support for QCatchSyscalls.
3725 * target.h (struct target_ops): Add supports_catch_syscall.
3726 (target_supports_catch_syscall): New macro.
3727 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
3728 (struct lwp_info): Add syscall_state.
3729 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
3730 Maintain syscall_state and syscalls_to_catch across exec.
3731 (get_syscall_trapinfo): New function, proxy to the_low_target.
3732 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
3733 (linux_low_filter_event): Toggle syscall_state entry/return for
3734 syscall traps, and set it ignored for all others.
3735 (gdb_catching_syscalls_p): New function.
3736 (gdb_catch_this_syscall_p): New function.
3737 (linux_wait_1): Handle SYSCALL_SIGTRAP.
3738 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
3739 (linux_supports_catch_syscall): New function.
3740 (linux_target_ops): Install it.
3741 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
3742 (the_low_target): Install it.
3743
3744 2016-01-12 Mike Frysinger <vapier@gentoo.org>
3745
3746 * acinclude.m4: Include new ../warning.m4 file.
3747 * configure: Regenerated.
3748 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
3749
3750 2016-01-12 Mike Frysinger <vapier@gentoo.org>
3751
3752 * ax.c (is_goto_target): Mark static.
3753 * linux-low.c (register_addr): Likewise.
3754 (linux_fetch_registers, linux_store_registers): Likewise.
3755 * mem-break.c (any_persistent_commands): Fix old prototype.
3756 (add_commands_to_breakpoint): Mark static.
3757 * regcache.c (find_register_by_name): Delete unused func.
3758 * remote-utils.c (hex_or_minus_one): Mark static.
3759 * server.c (monitor_show_help): Mark static.
3760 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
3761 handle_v_requests): Likewise.
3762
3763 2016-01-12 Pedro Alves <palves@redhat.com>
3764
3765 Remove use of the registered trademark symbol throughout.
3766
3767 2016-01-08 Yao Qi <yao.qi@linaro.org>
3768
3769 * remote-utils.c (getpkt): If c is '\003', call target hook
3770 request_interrupt.
3771
3772 2016-01-06 Yao Qi <yao.qi@linaro.org>
3773
3774 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
3775 linux-aarch32-low.c.
3776 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3777 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
3778 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
3779 (thumb2_breakpoint): Declare.
3780 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
3781 linux-aarch32-low.h.
3782 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3783 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
3784 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
3785
3786 2016-01-01 Joel Brobecker <brobecker@adacore.com>
3787
3788 * gdbreplay.c (gdbreplay_version): Change copyright year in
3789 version message.
3790 * server.c (gdbserver_version): Likewise.
3791
3792 2015-12-28 Patrick Palka <patrick@parcs.ath.cx>
3793
3794 * server.c (crc32_table): Delete.
3795 (crc32): Use libiberty's xcrc32 function.
3796
3797 2015-12-22 Joel Brobecker <brobecker@adacore.com>
3798
3799 * lynx-low.c (lynx_delete_thread_callback): New function.
3800 (lynx_mourn): Properly delete our process and all of its
3801 threads. Remove call to clear_inferiors.
3802
3803 2015-12-22 Joel Brobecker <brobecker@adacore.com>
3804
3805 * target.c (thread_search_callback): Add check that
3806 the thread_stopped target callback is not NULL before
3807 calling it.
3808
3809 2015-12-21 Yao Qi <yao.qi@linaro.org>
3810
3811 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
3812 arm breakpoint.
3813
3814 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3815
3816 * server.c (handle_query): Call target_supports_software_single_step.
3817
3818 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3819
3820 * linux-low.c (single_step): New function.
3821 (linux_resume_one_lwp_throw): Call single_step.
3822 (start_step_over): Likewise.
3823
3824 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3825
3826 * Makefile.in (SFILES): Append arch/arm-linux.c,
3827 arch/arm-get-next-pcs.c.
3828 (arm-linux.o): New rule.
3829 (arm-get-next-pcs.o): New rule.
3830 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
3831 arm-linux.o.
3832 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
3833 to linux-aarch32-low.c.
3834 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3835 (arm_breakpoint_len, thumb_breakpoint): Likewise.
3836 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
3837 (thumb2_breakpoint_len): Likewise.
3838 (arm_is_thumb_mode): Make non-static.
3839 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
3840 from linux-aarch32-low.c.
3841 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3842 (arm_breakpoint_len, thumb_breakpoint): Likewise.
3843 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
3844 (thumb2_breakpoint_len): Likewise.
3845 (arm_is_thumb_mode): New declaration.
3846 * linux-arm-low.c: Include arch/arm-linux.h
3847 aarch/arm-get-next-pcs.h, sys/syscall.h.
3848 (get_next_pcs_ops): New struct.
3849 (get_next_pcs_addr_bits_remove): New function.
3850 (get_next_pcs_is_thumb): New function.
3851 (get_next_pcs_read_memory_unsigned_integer): Likewise.
3852 (arm_sigreturn_next_pc): Likewise.
3853 (get_next_pcs_syscall_next_pc): Likewise.
3854 (arm_gdbserver_get_next_pcs): Likewise.
3855 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
3856 Initialize.
3857 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
3858 * server.h: Include gdb_vecs.h.
3859
3860 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3861
3862 * Makefile.in (SFILES): Append common/common-regcache.c.
3863 (OBS): Append common-regcache.o.
3864 (common-regcache.o): New rule.
3865 * regcache.c (init_register_cache): Initialize cache to
3866 REG_UNAVAILABLE.
3867 (regcache_raw_read_unsigned): New function.
3868 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
3869 register_status enum.
3870
3871 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3872
3873 * linux-aarch64-low.c (the_low_targets): Rename
3874 breakpoint_reinsert_addr to get_next_pcs.
3875 * linux-arm-low.c (the_low_targets): Likewise.
3876 * linux-bfin-low.c (the_low_targets): Likewise.
3877 * linux-cris-low.c (the_low_targets): Likewise.
3878 * linux-crisv32-low.c (the_low_targets): Likewise.
3879 * linux-low.c (can_software_single_step): Likewise.
3880 (install_software_single_step_breakpoints): New function.
3881 (start_step_over): Use install_software_single_step_breakpoints.
3882 * linux-low.h: New CORE_ADDR vector.
3883 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
3884 get_next_pcs.
3885 * linux-mips-low.c (the_low_targets): Likewise.
3886 * linux-nios2-low.c (the_low_targets): Likewise.
3887 * linux-sparc-low.c (the_low_targets): Likewise.
3888
3889 2015-12-17 Pedro Alves <palves@redhat.com>
3890
3891 * linux-low.c (linux_kill_one_lwp): Remove references to
3892 LinuxThreads.
3893 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
3894 to 'kill'.
3895 (linux_init_signals): Delete.
3896 (initialize_low): Adjust.
3897 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
3898
3899 2015-12-16 Pedro Alves <palves@redhat.com>
3900
3901 * configure.ac (compiler warning flags): When testing a
3902 -Wno-foo option, check whether -Wfoo works instead.
3903 * configure: Regenerate.
3904
3905 2015-12-11 Don Breazeal <donb@codesourcery.com>
3906
3907 * server.c (process_serial_event): Don't exit from gdbserver
3908 in remote mode if there are still active inferiors.
3909
3910 2015-12-11 Yao Qi <yao.qi@linaro.org>
3911
3912 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
3913 arm_breakpoint_at if the process is 32-bit.
3914
3915 2015-12-11 Yao Qi <yao.qi@linaro.org>
3916
3917 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
3918 arm breakpoint.
3919
3920 2015-12-07 Yao Qi <yao.qi@linaro.org>
3921
3922 * configure.srv: Append arm.o to srv_tgtobj for
3923 aarch64*-*-linux* target.
3924 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
3925 from linux-arm-low.c.
3926 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3927 (arm_breakpoint_len, thumb_breakpoint): Likewise.
3928 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
3929 (thumb2_breakpoint_len): Likewise.
3930 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
3931 (arm_breakpoint_kinds): Likewise.
3932 (arm_breakpoint_kind_from_pc): Likewise.
3933 (arm_sw_breakpoint_from_kind): Likewise.
3934 (arm_breakpoint_kind_from_current_state): Likewise.
3935 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
3936 (arm_sw_breakpoint_from_kind): Declare.
3937 (arm_breakpoint_kind_from_current_state): Declare.
3938 (arm_breakpoint_at): Declare.
3939 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
3940 arm_sw_breakpoint_from_kind if process is 32-bit.
3941 (aarch64_breakpoint_kind_from_pc): New function.
3942 (aarch64_breakpoint_kind_from_current_state): New function.
3943 (the_low_target): Initialize fields breakpoint_kind_from_pc
3944 and breakpoint_kind_from_current_state.
3945 * linux-arm-low.c (arm_breakpoint_kinds): Move to
3946 linux-aarch32-low.c.
3947 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
3948 (arm_breakpoint, arm_breakpoint_len): Likewise.
3949 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
3950 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
3951 (arm_is_thumb_mode): Likewise.
3952 (arm_breakpoint_at): Likewise.
3953 (arm_breakpoint_kind_from_pc): Likewise.
3954 (arm_sw_breakpoint_from_kind): Likewise.
3955 (arm_breakpoint_kind_from_current_state): Likewise.
3956
3957 Revert:
3958 2015-08-04 Yao Qi <yao.qi@linaro.org>
3959
3960 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
3961 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
3962 * server.c (extended_protocol): Remove "static".
3963 * server.h (extended_protocol): Declare it.
3964
3965 2015-12-04 Josh Stone <jistone@redhat.com>
3966
3967 * target.h (struct target_ops) <arch_setup>: Rename to ...
3968 (struct target_ops) <post_create_inferior>: ... this.
3969 (target_arch_setup): Rename to ...
3970 (target_post_create_inferior): ... this, calling post_create_inferior.
3971 * server.c (start_inferior): Update target_arch_setup calls to
3972 target_post_create_inferior.
3973 * linux-low.c (linux_low_ptrace_options): Forward declare.
3974 (linux_arch_setup): Update its comment for general use.
3975 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
3976 (struct linux_target_ops): Use linux_post_create_inferior.
3977 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
3978 to post_create_inferior.
3979 * nto-low.c (struct nto_target_ops): Likewise.
3980 * spu-low.c (struct spu_target_ops): Likewise.
3981 * win32-low.c (struct win32_target_ops): Likewise.
3982
3983 2015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
3984
3985 * linux-arm-low.c: Remove duplicate arch/arm.h include.
3986
3987 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3988
3989 * linux-arm-low.c (arm_reinsert_addr): Remove function.
3990 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
3991 * linux-cris-low.c (cris_reinsert_addr> Remove function.
3992 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3993 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
3994 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3995 * linux-mips-low.c (mips_reinsert_addr): Remove function.
3996 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3997 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
3998 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3999 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
4000 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4001
4002 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4003
4004 * linux-low.c (linux_look_up_symbols): Don't call
4005 linux_supports_traceclone.
4006 * linux-low.h (thread_db_init): Remove use_events argument.
4007 * thread-db.c (thread_db_use_event): Remove global variable.
4008 (struct thread_db) <td_thr_event_enable_p>: Remove field.
4009 (struct thread_db) <td_create_bp>: Remove field.
4010 (thread_db_create_event): Remove function.
4011 (thread_db_enable_reporting): Likewise.
4012 (find_one_thread): Don't check for thread_db_use_events.
4013 (attach_thread): Likewise.
4014 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
4015 (try_thread_db_load_1): Don't check for thread_db_use_events.
4016 (thread_db_init): Remove use_events argument and thread events
4017 handling.
4018 (remove_thread_event_breakpoints): Remove function.
4019 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
4020
4021 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4022
4023 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
4024 New function.
4025 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4026 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
4027 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4028 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
4029 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
4030 Initialize.
4031 * linux-crisv32-low.c (cris_supports_hardware_single_step):
4032 New function.
4033 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4034 * linux-low.c (can_hardware_single_step): Use
4035 supports_hardware_single_step.
4036 (can_software_single_step): New function.
4037 (start_step_over): Call can_software_single_step.
4038 (linux_supports_hardware_single_step): New function.
4039 (struct target_ops) <supports_software_single_step>: Initialize.
4040 * linux-low.h (struct linux_target_ops)
4041 <supports_hardware_single_step>: Initialize.
4042 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
4043 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4044 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
4045 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
4046 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
4047 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4048 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
4049 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4050 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
4051 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
4052 Initialize.
4053 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
4054 (struct linux_target_ops) <tile_supports_hardware_single_step>:
4055 Initialize.
4056 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
4057 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4058 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
4059 New function.
4060 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4061 * target.h (struct target_ops): <supports_software_single_step>:
4062 New field.
4063 (target_supports_software_single_step): New macro.
4064
4065 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4066
4067 * linux-low.c (linux_wait_1): Fix pc advance condition.
4068 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
4069 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
4070
4071 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4072
4073 * linux-arm-low.c (arm_is_thumb_mode): New function.
4074 (arm_breakpoint_at): Use arm_is_thumb_mode.
4075 (arm_breakpoint_kind_from_current_state): New function.
4076 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
4077 Initialize.
4078 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
4079 (linux_breakpoint_kind_from_current_state): New function.
4080 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
4081 * linux-low.h (struct linux_target_ops)
4082 <breakpoint_kind_from_current_state>: New field.
4083 * target.h (struct target_ops): Likewise.
4084 (target_breakpoint_kind_from_current_state): New macro.
4085
4086 2015-11-30 Pedro Alves <palves@redhat.com>
4087
4088 * linux-low.c (linux_resume): Wake up the event loop before
4089 returning.
4090
4091 2015-11-30 Pedro Alves <palves@redhat.com>
4092
4093 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
4094 check.
4095 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
4096 to -1.
4097 * target.c (struct thread_search): New structure.
4098 (thread_search_callback): New function.
4099 (prev_general_thread): New global.
4100 (prepare_to_access_memory, done_accessing_memory): New functions.
4101 * target.h (prepare_to_access_memory, done_accessing_memory):
4102 Replace macros with function declarations.
4103
4104 2015-11-30 Pedro Alves <palves@redhat.com>
4105
4106 PR 14618
4107 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
4108 report TARGET_WAITKIND_NO_RESUMED.
4109 * remote-utils.c (prepare_resume_reply): Handle
4110 TARGET_WAITKIND_NO_RESUMED.
4111 * server.c (report_no_resumed): New global.
4112 (handle_query) <qSupported>: Handle "no-resumed+". Report
4113 "no-resumed+" support.
4114 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
4115 return error if the client doesn't support no-resumed events.
4116 (push_stop_notification): New function.
4117 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
4118 events if the client supports them.
4119
4120 2015-11-30 Pedro Alves <palves@redhat.com>
4121
4122 * linux-low.c (thread_still_has_status_pending_p): Don't check
4123 vCont;t here.
4124 (lwp_resumed): New function.
4125 (status_pending_p_callback): Return early if the LWP is not
4126 supposed to be resumed.
4127
4128 2015-11-30 Pedro Alves <palves@redhat.com>
4129
4130 * linux-low.c (handle_extended_wait): Assert that the LWP's
4131 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
4132 thread create events, leave the new child's status pending.
4133 (linux_low_filter_event): If GDB wants to hear about thread exit
4134 events, leave the LWP marked dead and don't delete it.
4135 (linux_wait_for_event_filtered): Don't check for thread exit.
4136 (filter_exit_event): New function.
4137 (linux_wait_1): Use it, when returning an exit event.
4138 (linux_resume_one_lwp_throw): Assert that the LWP's
4139 waitstatus is TARGET_WAITKIND_IGNORE.
4140 * remote-utils.c (prepare_resume_reply): Handle
4141 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
4142 * server.c (report_thread_events): New global.
4143 (handle_general_set): Handle QThreadEvents.
4144 (handle_query) <qSupported>: Handle and report QThreadEvents+;
4145 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
4146 TARGET_WAITKIND_THREAD_EXITED.
4147 * server.h (report_thread_events): Declare.
4148
4149 2015-11-30 Pedro Alves <palves@redhat.com>
4150
4151 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
4152 the thread's last_resume_kind was resume_stop.
4153
4154 2015-11-30 Pedro Alves <palves@redhat.com>
4155
4156 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
4157 before returning.
4158
4159 2015-11-30 Pedro Alves <palves@redhat.com>
4160
4161 * server.c (handle_v_requests): Handle vCtrlC.
4162
4163 2015-11-30 Pedro Alves <palves@redhat.com>
4164
4165 * gdbthread.h (find_any_thread_of_pid): Declare.
4166 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
4167 functions.
4168 * server.c (handle_query): If current_thread is NULL, look for
4169 another thread of the selected process.
4170
4171 2015-11-26 Daniel Colascione <dancol@dancol.org>
4172 Simon Marchi <simon.marchi@ericsson.com>
4173
4174 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
4175 * server.c (handle_qxfer_threads_worker): Refactor to include thread
4176 name in reply.
4177 * target.h (struct target_ops) <thread_name>: New field.
4178 (target_thread_name): New macro.
4179
4180 2015-11-23 Joel Brobecker <brobecker@adacore.com>
4181
4182 * regcache.h (regcache_invalidate_pid): Add declaration.
4183 * regcache.c (regcache_invalidate_pid): New function, extracted
4184 from regcache_invalidate.
4185 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
4186 Add trivial documentation comment.
4187 * lynx-low.c: Use regcache_invalidate_pid instead of
4188 regcache_invalidate.
4189
4190 2015-11-23 Joel Brobecker <brobecker@adacore.com>
4191
4192 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
4193 and Elf64_auxv_t if the target is Android.
4194
4195 2015-11-22 Doug Evans <xdje42@gmail.com>
4196
4197 * target.h: #include <sys/types.h>.
4198
4199 2015-11-19 Pedro Alves <palves@redhat.com>
4200
4201 * linux-low.c (linux_process_qsupported): Change prototype.
4202 Adjust.
4203 * linux-low.h (struct linux_target_ops) <process_qsupported>:
4204 Change prototype.
4205 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
4206 and adjust to loop over all features.
4207 * server.c (handle_query) <qSupported>: Adjust to call
4208 target_process_qsupported once, passing it a vector of unprocessed
4209 features.
4210 * target.h (struct target_ops) <process_qsupported>: Change
4211 prototype.
4212 (target_process_qsupported): Adjust.
4213
4214 2015-11-19 Pedro Alves <palves@redhat.com>
4215
4216 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
4217 mode.
4218 * configure: Regenerate.
4219
4220 2015-11-19 Pedro Alves <palves@redhat.com>
4221
4222 * configure: Regenerate.
4223
4224 2015-11-19 Yao Qi <yao.qi@linaro.org>
4225
4226 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
4227 type to uint32_t.
4228
4229 2015-11-19 Yao Qi <yao.qi@linaro.org>
4230
4231 * linux-aarch64-low.c (enum aarch64_operand_type): New.
4232 (struct aarch64_operand): Move enum out.
4233
4234 2015-11-19 Yao Qi <yao.qi@linaro.org>
4235
4236 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
4237 struct user_fpsimd_state *.
4238 (aarch64_store_fpregset): Likewise.
4239
4240 2015-11-19 Yao Qi <yao.qi@linaro.org>
4241
4242 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
4243 struct user_pt_regs *.
4244 (aarch64_store_gregset): Likewise.
4245
4246 2015-11-18 Pedro Alves <palves@redhat.com>
4247
4248 * Makefile.in (all_object_files): Add $IPA_OBJS.
4249
4250 2015-11-17 Pedro Alves <palves@redhat.com>
4251
4252 * win32-low.c (win32_resume): Use gdb_signal_from_host,
4253 GDB_SIGNAL_0 and gdb_signal_to_string.
4254
4255 2015-11-17 Pedro Alves <palves@redhat.com>
4256
4257 * win32-low.c (handle_output_debug_string): Remove parameter.
4258 (win32_kill): Remove our_status local and adjust call to
4259 handle_output_debug_string.
4260 (get_child_debug_event): Adjust call to
4261 handle_output_debug_string.
4262
4263 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4264
4265 * linux-mips-low.c (mips_fill_gregset): Add cast.
4266 (mips_store_gregset): Likewise.
4267 (mips_fill_fpregset): Likewise.
4268 (mips_store_fpregset): Likewise.
4269
4270 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4271
4272 * linux-mips-low.c (mips_add_watchpoint): Rename private to
4273 priv.
4274
4275 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4276
4277 * linux-mips-low.c (mips_linux_new_thread): Change type of
4278 watch_type to enum target_hw_bp_type.
4279
4280 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4281
4282 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
4283 Change return type to arm_hwbp_type.
4284
4285 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4286
4287 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
4288 (arm_store_gregset): Likewise.
4289 * linux-arm-low.c (arm_get_hwcap): Likewise.
4290 (arm_read_description): Likewise.
4291
4292 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4293
4294 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
4295
4296 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4297
4298 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
4299 (ppc_fill_vsxregset): Likewise.
4300 (ppc_store_vsxregset): Likewise.
4301 (ppc_fill_vrregset): Likewise.
4302 (ppc_store_vrregset): Likewise.
4303 (ppc_fill_evrregset): Likewise.
4304 (ppc_store_evrregset): Likewise.
4305
4306 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4307
4308 * linux-ppc-low.c (ppc_usrregs_info): Remove
4309 forward-declaration.
4310 (ppc_arch_setup): Move lower in file.
4311
4312 2015-10-30 Simon Marchi <simon.marchi@ericsson.com>
4313
4314 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
4315 (ps_pdwrite): Likewise.
4316
4317 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
4318
4319 * linux-arm-low.c (arm_new_thread): Move pointer dereference
4320 to after assert checks.
4321
4322 2015-10-29 Simon Marchi <simon.marchi@ericsson.com>
4323
4324 * proc-service.c (ps_pdread): Add/adjust casts.
4325 (ps_pdwrite): Add/adjust casts.
4326
4327 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
4328
4329 * server.c (handle_search_memory_1): Cast return value of
4330 memmem.
4331
4332 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
4333
4334 * server.c (write_qxfer_response): Change type of data to
4335 gdb_byte *.
4336
4337 2015-10-29 Pedro Alves <palves@redhat.com>
4338
4339 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
4340
4341 2015-10-29 Pedro Alves <palves@redhat.com>
4342
4343 * tracepoint.c (clear_installed_tracepoints): Add casts.
4344
4345 2015-10-29 Pedro Alves <palves@redhat.com>
4346
4347 * server.c (handle_v_cont, process_serial_event): Add enum
4348 gdb_signal casts to signal parsing code.
4349
4350 2015-10-29 Pedro Alves <palves@redhat.com>
4351
4352 * linux-low.h (NULL_REGSET): Define.
4353 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
4354 * linux-arm-low.c (arm_regsets): Likewise.
4355 * linux-crisv32-low.c (cris_regsets): Likewise.
4356 * linux-m68k-low.c (m68k_regsets): Likewise.
4357 * linux-mips-low.c (mips_regsets): Likewise.
4358 * linux-nios2-low.c (nios2_regsets): Likewise.
4359 * linux-ppc-low.c (ppc_regsets): Likewise.
4360 * linux-s390-low.c (s390_regsets): Likewise.
4361 * linux-sh-low.c (sh_regsets): Likewise.
4362 * linux-sparc-low.c (sparc_regsets): Likewise.
4363 * linux-tic6x-low.c (tic6x_regsets): Likewise.
4364 * linux-tile-low.c (tile_regsets): Likewise.
4365 * linux-x86-low.c (x86_regsets): Likewise.
4366 * linux-xtensa-low.c (xtensa_regsets): Likewise.
4367
4368 2015-10-29 Pedro Alves <palves@redhat.com>
4369
4370 * linux-low.h (NULL_REGSET): Define.
4371 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
4372 * linux-arm-low.c (arm_regsets): Likewise.
4373 * linux-crisv32-low.c (cris_regsets): Likewise.
4374 * linux-m68k-low.c (m68k_regsets): Likewise.
4375 * linux-mips-low.c (mips_regsets): Likewise.
4376 * linux-nios2-low.c (nios2_regsets): Likewise.
4377 * linux-ppc-low.c (ppc_regsets): Likewise.
4378 * linux-s390-low.c (s390_regsets): Likewise.
4379 * linux-sh-low.c (sh_regsets): Likewise.
4380 * linux-sparc-low.c (sparc_regsets): Likewise.
4381 * linux-tic6x-low.c (tic6x_regsets): Likewise.
4382 * linux-tile-low.c (tile_regsets): Likewise.
4383 * linux-x86-low.c (x86_regsets): Likewise.
4384 * linux-xtensa-low.c (xtensa_regsets): Likewise.
4385
4386 2015-10-26 Doug Evans <dje@google.com>
4387
4388 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
4389
4390 2015-10-26 Doug Evans <dje@google.com>
4391
4392 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
4393
4394 2015-10-26 Doug Evans <dje@google.com>
4395
4396 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
4397 for debug_printf.
4398 (attach_thread, find_new_threads_callback): Ditto.
4399
4400 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
4401
4402 * mem-break.h (set_breakpoint_data): Remove.
4403
4404 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
4405
4406 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
4407 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
4408 (initialize_low): Remove set_breakpoint_data call.
4409 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
4410 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
4411 (initialize_low): Remove set_breakpoint_data call.
4412 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
4413 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
4414 (initialize_low): Remove set_breakpoint_data call.
4415
4416 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
4417
4418 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
4419 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
4420 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
4421 * target.h (target_breakpoint_kind_from_pc): New macro.
4422
4423 2015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
4424
4425 * linux-low.c (default_breakpoint_kind_from_pc): New function.
4426 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
4427 the default breakpoint kind.
4428
4429 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4430
4431 * linux-arm-low.c (arm_supports_z_point_type): Add software
4432 breakpoint support.
4433
4434 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4435
4436 * linux-arm-low.c: Refactor breakpoint definitions.
4437 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
4438 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
4439
4440 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4441
4442 * Makefile.in: Add arm.c/o.
4443 * configure.srv: Likewise.
4444 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
4445 (arm_breakpoint_kind_from_pc): New function.
4446 (arm_sw_breakpoint_from_kind): Return proper kind.
4447 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
4448
4449 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4450
4451 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
4452 removal.
4453 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
4454 (struct raw_breakpoint) <size>: Remove.
4455 (struct raw_breakpoint) <kind>: Add.
4456 (bp_size): New function.
4457 (bp_opcode): Likewise.
4458 (find_raw_breakpoint_at): Adjust for kind.
4459 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
4460 (remove_memory_breakpoint): Adjust for kind call bp_size.
4461 (set_raw_breakpoint_at): Adjust for kind.
4462 (set_breakpoint): Likewise.
4463 (set_breakpoint_at): Call breakpoint_kind_from_pc.
4464 (delete_raw_breakpoint): Adjust for kind.
4465 (delete_breakpoint): Likewise.
4466 (find_gdb_breakpoint): Likewise.
4467 (set_gdb_breakpoint_1): Likewise.
4468 (set_gdb_breakpoint): Likewise.
4469 (delete_gdb_breakpoint_1): Likewise.
4470 (delete_gdb_breakpoint): Likewise.
4471 (uninsert_raw_breakpoint): Likewise.
4472 (reinsert_raw_breakpoint): Likewise.
4473 (set_breakpoint_data): Remove.
4474 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
4475 (check_mem_read): Adjust for kind call bp_size.
4476 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
4477 (clone_one_breakpoint): Adjust for kind.
4478 * mem-break.h (set_gdb_breakpoint): Likewise.
4479 (delete_gdb_breakpoint): Likewise.
4480 * server.c (process_serial_event): Likewise.
4481
4482 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4483
4484 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
4485 (struct linux_target_ops) <breakpoint>: Remove.
4486 (struct linux_target_ops) <breakpoint_len>: Remove.
4487 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4488 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4489 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
4490 (arm_sw_breakpoint_from_kind): New function.
4491 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
4492 (struct linux_target_ops) <breakpoint>: Remove.
4493 (struct linux_target_ops) <breakpoint_len>: Remove.
4494 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4495 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4496 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
4497 (struct linux_target_ops) <breakpoint>: Remove.
4498 (struct linux_target_ops) <breakpoint_len>: Remove.
4499 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4500 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4501 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
4502 (struct linux_target_ops) <breakpoint>: Remove.
4503 (struct linux_target_ops) <breakpoint_len>: Remove.
4504 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4505 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4506 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
4507 and sw_breakpoint_from_kind to increment the pc.
4508 (linux_breakpoint_kind_from_pc): New function.
4509 (linux_sw_breakpoint_from_kind): New function.
4510 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
4511 (initialize_low): Call breakpoint_kind_from_pc and
4512 sw_breakpoint_from_kind to replace breakpoint_data/len.
4513 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
4514 New field.
4515 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
4516 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
4517 (struct linux_target_ops) <breakpoint>: Remove.
4518 (struct linux_target_ops) <breakpoint_len>: Remove.
4519 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4520 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4521 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
4522 (struct linux_target_ops) <breakpoint>: Remove.
4523 (struct linux_target_ops) <breakpoint_len>: Remove.
4524 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4525 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4526 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
4527 (struct linux_target_ops) <breakpoint>: Remove.
4528 (struct linux_target_ops) <breakpoint_len>: Remove.
4529 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4530 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4531 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
4532 (struct linux_target_ops) <breakpoint>: Remove.
4533 (struct linux_target_ops) <breakpoint_len>: Remove.
4534 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4535 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4536 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
4537 (struct linux_target_ops) <breakpoint>: Remove.
4538 (struct linux_target_ops) <breakpoint_len>: Remove.
4539 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4540 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4541 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
4542 (struct linux_target_ops) <breakpoint>: Remove.
4543 (struct linux_target_ops) <breakpoint_len>: Remove.
4544 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4545 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4546 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
4547 (struct linux_target_ops) <breakpoint>: Remove.
4548 (struct linux_target_ops) <breakpoint_len>: Remove.
4549 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4550 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4551 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
4552 (struct linux_target_ops) <breakpoint>: Remove.
4553 (struct linux_target_ops) <breakpoint_len>: Remove.
4554 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4555 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4556 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
4557 (struct linux_target_ops) <breakpoint>: Remove.
4558 (struct linux_target_ops) <breakpoint_len>: Remove.
4559 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4560 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4561 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
4562 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
4563 (struct linux_target_ops) <breakpoint>: Remove.
4564 (struct linux_target_ops) <breakpoint_len>: Remove.
4565 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4566 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4567 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
4568 (struct linux_target_ops) <breakpoint>: Remove.
4569 (struct linux_target_ops) <breakpoint_len>: Remove.
4570 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4571 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4572
4573 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4574
4575 * linux-cris-low.c (cris_get_pc): Remove void arg.
4576
4577 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
4578
4579 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
4580 variable name.
4581
4582 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
4583
4584 * inferiors.c (thread_pid_matches_callback): New function.
4585 (find_thread_process): New function.
4586 (remove_thread): Reset current_thread.
4587 (remove_process): Assert threads have been removed first.
4588
4589 2015-10-15 Yao Qi <yao.qi@linaro.org>
4590
4591 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
4592 if it is 3.
4593 (aarch64_remove_point): Likewise.
4594 * regcache.c (regcache_register_size): New function.
4595
4596 2015-10-12 Yao Qi <yao.qi@linaro.org>
4597
4598 * linux-aarch64-low.c: Update all callers as emit_load_store
4599 is renamed to aarch64_emit_load_store.
4600
4601 2015-10-12 Yao Qi <yao.qi@linaro.org>
4602
4603 * linux-aarch64-low.c: Update all callers of function renaming
4604 from emit_insn to aarch64_emit_insn.
4605
4606 2015-10-12 Yao Qi <yao.qi@linaro.org>
4607
4608 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
4609 arch/aarch64-insn.h.
4610 (struct aarch64_memory_operand): Likewise.
4611 (ENCODE): Likewise.
4612 (emit_insn): Move to arch/aarch64-insn.c.
4613 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
4614 (emit_load_store): Move to arch/aarch64-insn.c.
4615 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
4616 (can_encode_int32): Remove.
4617
4618 2015-10-12 Yao Qi <yao.qi@linaro.org>
4619
4620 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
4621 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
4622 (aarch64_relocate_instruction): Likewise.
4623 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
4624 (struct aarch64_insn_visitor): Likewise.
4625
4626 2015-10-12 Yao Qi <yao.qi@linaro.org>
4627
4628 * linux-aarch64-low.c (struct aarch64_insn_data): New.
4629 (struct aarch64_insn_visitor): New.
4630 (struct aarch64_insn_relocation_data): New.
4631 (aarch64_ftrace_insn_reloc_b): New function.
4632 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
4633 (aarch64_ftrace_insn_reloc_cb): Likewise.
4634 (aarch64_ftrace_insn_reloc_tb): Likewise.
4635 (aarch64_ftrace_insn_reloc_adr): Likewise.
4636 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
4637 (aarch64_ftrace_insn_reloc_others): Likewise.
4638 (visitor): New.
4639 (aarch64_relocate_instruction): Use visitor.
4640
4641 2015-10-12 Yao Qi <yao.qi@linaro.org>
4642
4643 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
4644 int. Add argument buf.
4645 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
4646 aarch64_relocate_instruction.
4647
4648 2015-10-12 Yao Qi <yao.qi@linaro.org>
4649
4650 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
4651 argument insn. Remove local variable insn. Don't call
4652 target_read_uint32.
4653 (aarch64_install_fast_tracepoint_jump_pad): Call
4654 target_read_uint32.
4655
4656 2015-09-30 Yao Qi <yao.qi@linaro.org>
4657
4658 * linux-aarch64-low.c (emit_movk): Shorten a long line.
4659 (emit_load_store_pair): Likewise.
4660
4661 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
4662
4663 * dll.c (match_dll): Add cast(s).
4664 (unloaded_dll): Likewise.
4665 * linux-low.c (second_thread_of_pid_p): Likewise.
4666 (delete_lwp_callback): Likewise.
4667 (count_events_callback): Likewise.
4668 (select_event_lwp_callback): Likewise.
4669 (linux_set_resume_request): Likewise.
4670 * server.c (accumulate_file_name_length): Likewise.
4671 (emit_dll_description): Likewise.
4672 (handle_qxfer_threads_worker): Likewise.
4673 (visit_actioned_threads): Likewise.
4674 * thread-db.c (any_thread_of): Likewise.
4675 * tracepoint.c (same_process_p): Likewise.
4676 (match_blocktype): Likewise.
4677 (build_traceframe_info_xml): Likewise.
4678
4679 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
4680
4681 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
4682 assignment.
4683 (gdb_unparse_agent_expr): Likewise.
4684 * hostio.c (require_data): Likewise.
4685 (handle_pread): Likewise.
4686 * linux-low.c (disable_regset): Likewise.
4687 (fetch_register): Likewise.
4688 (store_register): Likewise.
4689 (get_dynamic): Likewise.
4690 (linux_qxfer_libraries_svr4): Likewise.
4691 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
4692 (set_fast_tracepoint_jump): Likewise.
4693 (uninsert_fast_tracepoint_jumps_at): Likewise.
4694 (reinsert_fast_tracepoint_jumps_at): Likewise.
4695 (validate_inserted_breakpoint): Likewise.
4696 (clone_agent_expr): Likewise.
4697 * regcache.c (init_register_cache): Likewise.
4698 * remote-utils.c (putpkt_binary_1): Likewise.
4699 (decode_M_packet): Likewise.
4700 (decode_X_packet): Likewise.
4701 (look_up_one_symbol): Likewise.
4702 (relocate_instruction): Likewise.
4703 (monitor_output): Likewise.
4704 * server.c (handle_search_memory): Likewise.
4705 (handle_qxfer_exec_file): Likewise.
4706 (handle_qxfer_libraries): Likewise.
4707 (handle_qxfer): Likewise.
4708 (handle_query): Likewise.
4709 (handle_v_cont): Likewise.
4710 (handle_v_run): Likewise.
4711 (captured_main): Likewise.
4712 * target.c (write_inferior_memory): Likewise.
4713 * thread-db.c (try_thread_db_load_from_dir): Likewise.
4714 * tracepoint.c (init_trace_buffer): Likewise.
4715 (add_tracepoint_action): Likewise.
4716 (add_traceframe): Likewise.
4717 (add_traceframe_block): Likewise.
4718 (cmd_qtdpsrc): Likewise.
4719 (cmd_qtdv): Likewise.
4720 (cmd_qtstatus): Likewise.
4721 (response_source): Likewise.
4722 (response_tsv): Likewise.
4723 (cmd_qtnotes): Likewise.
4724 (gdb_collect): Likewise.
4725 (initialize_tracepoint): Likewise.
4726
4727 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
4728
4729 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
4730 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
4731 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
4732 <NOP>: New.
4733 (enum aarch64_condition_codes): New enum.
4734 (w0): New static global.
4735 (fp): Likewise.
4736 (lr): Likewise.
4737 (struct aarch64_memory_operand) <type>: New
4738 MEMORY_OPERAND_POSTINDEX type.
4739 (postindex_memory_operand): New helper function.
4740 (emit_ret): New function.
4741 (emit_load_store_pair): New function, factored out of emit_stp
4742 with support for MEMORY_OPERAND_POSTINDEX.
4743 (emit_stp): Rewrite using emit_load_store_pair.
4744 (emit_ldp): New function.
4745 (emit_load_store): Likewise.
4746 (emit_ldr): Mention post-index instruction in comment.
4747 (emit_ldrh): New function.
4748 (emit_ldrb): New function.
4749 (emit_ldrsw): Mention post-index instruction in comment.
4750 (emit_str): Likewise.
4751 (emit_subs): New function.
4752 (emit_cmp): Likewise.
4753 (emit_and): Likewise.
4754 (emit_orr): Likewise.
4755 (emit_orn): Likewise.
4756 (emit_eor): Likewise.
4757 (emit_mvn): Likewise.
4758 (emit_lslv): Likewise.
4759 (emit_lsrv): Likewise.
4760 (emit_asrv): Likewise.
4761 (emit_mul): Likewise.
4762 (emit_sbfm): Likewise.
4763 (emit_sbfx): Likewise.
4764 (emit_ubfm): Likewise.
4765 (emit_ubfx): Likewise.
4766 (emit_csinc): Likewise.
4767 (emit_cset): Likewise.
4768 (emit_nop): Likewise.
4769 (emit_ops_insns): New helper function.
4770 (emit_pop): Likewise.
4771 (emit_push): Likewise.
4772 (aarch64_emit_prologue): New function.
4773 (aarch64_emit_epilogue): Likewise.
4774 (aarch64_emit_add): Likewise.
4775 (aarch64_emit_sub): Likewise.
4776 (aarch64_emit_mul): Likewise.
4777 (aarch64_emit_lsh): Likewise.
4778 (aarch64_emit_rsh_signed): Likewise.
4779 (aarch64_emit_rsh_unsigned): Likewise.
4780 (aarch64_emit_ext): Likewise.
4781 (aarch64_emit_log_not): Likewise.
4782 (aarch64_emit_bit_and): Likewise.
4783 (aarch64_emit_bit_or): Likewise.
4784 (aarch64_emit_bit_xor): Likewise.
4785 (aarch64_emit_bit_not): Likewise.
4786 (aarch64_emit_equal): Likewise.
4787 (aarch64_emit_less_signed): Likewise.
4788 (aarch64_emit_less_unsigned): Likewise.
4789 (aarch64_emit_ref): Likewise.
4790 (aarch64_emit_if_goto): Likewise.
4791 (aarch64_emit_goto): Likewise.
4792 (aarch64_write_goto_address): Likewise.
4793 (aarch64_emit_const): Likewise.
4794 (aarch64_emit_call): Likewise.
4795 (aarch64_emit_reg): Likewise.
4796 (aarch64_emit_pop): Likewise.
4797 (aarch64_emit_stack_flush): Likewise.
4798 (aarch64_emit_zero_ext): Likewise.
4799 (aarch64_emit_swap): Likewise.
4800 (aarch64_emit_stack_adjust): Likewise.
4801 (aarch64_emit_int_call_1): Likewise.
4802 (aarch64_emit_void_call_2): Likewise.
4803 (aarch64_emit_eq_goto): Likewise.
4804 (aarch64_emit_ne_goto): Likewise.
4805 (aarch64_emit_lt_goto): Likewise.
4806 (aarch64_emit_le_goto): Likewise.
4807 (aarch64_emit_gt_goto): Likewise.
4808 (aarch64_emit_ge_got): Likewise.
4809 (aarch64_emit_ops_impl): New static global variable.
4810 (aarch64_emit_ops): New target function, return
4811 &aarch64_emit_ops_impl.
4812 (struct linux_target_ops): Install it.
4813
4814 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
4815
4816 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
4817 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
4818 aarch64-ipa.o.
4819 * linux-aarch64-ipa.c: New file.
4820 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
4821 and endian.h.
4822 (aarch64_get_thread_area): New target method.
4823 (extract_signed_bitfield): New helper function.
4824 (aarch64_decode_ldr_literal): New function.
4825 (enum aarch64_opcodes): New enum.
4826 (struct aarch64_register): New struct.
4827 (struct aarch64_operand): New struct.
4828 (x0): New static global.
4829 (x1): Likewise.
4830 (x2): Likewise.
4831 (x3): Likewise.
4832 (x4): Likewise.
4833 (w2): Likewise.
4834 (ip0): Likewise.
4835 (sp): Likewise.
4836 (xzr): Likewise.
4837 (aarch64_register): New helper function.
4838 (register_operand): Likewise.
4839 (immediate_operand): Likewise.
4840 (struct aarch64_memory_operand): New struct.
4841 (offset_memory_operand): New helper function.
4842 (preindex_memory_operand): Likewise.
4843 (enum aarch64_system_control_registers): New enum.
4844 (ENCODE): New macro.
4845 (emit_insn): New helper function.
4846 (emit_b): New function.
4847 (emit_bcond): Likewise.
4848 (emit_cb): Likewise.
4849 (emit_tb): Likewise.
4850 (emit_blr): Likewise.
4851 (emit_stp): Likewise.
4852 (emit_ldp_q_offset): Likewise.
4853 (emit_stp_q_offset): Likewise.
4854 (emit_load_store): Likewise.
4855 (emit_ldr): Likewise.
4856 (emit_ldrsw): Likewise.
4857 (emit_str): Likewise.
4858 (emit_ldaxr): Likewise.
4859 (emit_stxr): Likewise.
4860 (emit_stlr): Likewise.
4861 (emit_data_processing_reg): Likewise.
4862 (emit_data_processing): Likewise.
4863 (emit_add): Likewise.
4864 (emit_sub): Likewise.
4865 (emit_mov): Likewise.
4866 (emit_movk): Likewise.
4867 (emit_mov_addr): Likewise.
4868 (emit_mrs): Likewise.
4869 (emit_msr): Likewise.
4870 (emit_sevl): Likewise.
4871 (emit_wfe): Likewise.
4872 (append_insns): Likewise.
4873 (can_encode_int32_in): New helper function.
4874 (aarch64_relocate_instruction): New function.
4875 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
4876 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
4877 (struct linux_target_ops): Install aarch64_get_thread_area,
4878 aarch64_install_fast_tracepoint_jump_pad and
4879 aarch64_get_min_fast_tracepoint_insn_len.
4880
4881 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
4882
4883 * Makefile.in (aarch64-insn.o): New rule.
4884 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
4885
4886 2015-09-21 Yao Qi <yao.qi@linaro.org>
4887
4888 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
4889
4890 2015-09-21 Yao Qi <yao.qi@linaro.org>
4891
4892 * tracepoint.c (max_jump_pad_size): Remove.
4893
4894 2015-09-18 Yao Qi <yao.qi@linaro.org>
4895
4896 * linux-aarch64-low.c: Don't include sys/uio.h.
4897 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
4898
4899 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
4900
4901 * tracepoint.c (eval_result_type): Change prototype.
4902 (condition_true_at_tracepoint): Fix argument to compiled_cond.
4903
4904 2015-09-15 Pedro Alves <palves@redhat.com>
4905
4906 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
4907 Check whether to report exec events instead of checking whether
4908 multiprocess is enabled.
4909
4910 2015-09-15 Pedro Alves <palves@redhat.com>
4911
4912 PR remote/18965
4913 * remote-utils.c (prepare_resume_reply): Merge
4914 TARGET_WAITKIND_VFORK_DONE switch case with the
4915 TARGET_WAITKIND_FORKED case.
4916
4917 2015-09-15 Yao Qi <yao.qi@linaro.org>
4918
4919 * server.c (handle_query): Check string comparison using
4920 "else if" instead of "if".
4921
4922 2015-09-15 Yao Qi <yao.qi@linaro.org>
4923
4924 * server.c (vCont_supported): New global variable.
4925 (handle_query): Set vCont_supported to 1 if "vContSupported+"
4926 matches. Append ";vContSupported+" to own_buf.
4927 (handle_v_requests): Append ";s;S" to own_buf if target supports
4928 hardware single step or vCont_supported is false.
4929 (capture_main): Set vCont_supported to zero.
4930
4931 2015-09-15 Yao Qi <yao.qi@linaro.org>
4932
4933 * linux-low.c (linux_supports_conditional_breakpoints): Rename
4934 it to ...
4935 (linux_supports_hardware_single_step): ... New function.
4936 (linux_target_ops): Update.
4937 * lynx-low.c (lynx_target_ops): Set field
4938 supports_hardware_single_step to target_can_do_hardware_single_step.
4939 * nto-low.c (nto_target_ops): Likewise.
4940 * spu-low.c (spu_target_ops): Likewise.
4941 * win32-low.c (win32_target_ops): Likewise.
4942 * target.c (target_can_do_hardware_single_step): New function.
4943 * target.h (struct target_ops) <supports_conditional_breakpoints>:
4944 Remove. <supports_hardware_single_step>: New field.
4945 (target_supports_conditional_breakpoints): Remove.
4946 (target_supports_hardware_single_step): New macro.
4947 (target_can_do_hardware_single_step): Declare.
4948 * server.c (handle_query): Use target_supports_hardware_single_step
4949 instead of target_supports_conditional_breakpoints.
4950
4951 2015-09-15 Yao Qi <yao.qi@linaro.org>
4952
4953 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
4954 function.
4955 (struct linux_target_ops the_low_target): Install
4956 aarch64_linux_siginfo_fixup.
4957
4958 2015-09-11 Don Breazeal <donb@codesourcery.com>
4959 Luis Machado <lgustavo@codesourcery.com>
4960
4961 * linux-low.c (linux_mourn): Static declaration.
4962 (linux_arch_setup): Move in front of
4963 handle_extended_wait.
4964 (linux_arch_setup_thread): New function.
4965 (handle_extended_wait): Handle exec events. Call
4966 linux_arch_setup_thread. Make event_lwp argument a
4967 pointer-to-a-pointer.
4968 (check_zombie_leaders): Do not check stopped threads.
4969 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
4970 (linux_low_filter_event): Add lwp and thread for exec'ing
4971 non-leader thread if leader thread has been deleted.
4972 Refactor code into linux_arch_setup_thread and call it.
4973 Pass child lwp pointer by reference to handle_extended_wait.
4974 (linux_wait_for_event_filtered): Update comment.
4975 (linux_wait_1): Prevent clobbering exec event status.
4976 (linux_supports_exec_events): New function.
4977 (linux_target_ops) <supports_exec_events>: Initialize new member.
4978 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
4979 new member.
4980 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
4981 * server.c (report_exec_events): New global variable.
4982 (handle_query): Handle qSupported query for exec-events feature.
4983 (captured_main): Initialize report_exec_events.
4984 * server.h (report_exec_events): Declare new global variable.
4985 * target.h (struct target_ops) <supports_exec_events>: New
4986 member.
4987 (target_supports_exec_events): New macro.
4988 * win32-low.c (win32_target_ops) <supports_exec_events>:
4989 Initialize new member.
4990
4991 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
4992
4993 * linux-low.c (linux_low_enable_btrace): Remove.
4994 (linux_target_ops): Replace linux_low_enable_btrace with
4995 linux_enable_btrace.
4996
4997 2015-09-03 Yao Qi <yao.qi@linaro.org>
4998
4999 * linux-aarch64-low.c (aarch64_insert_point): Call
5000 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
5001 returns true.
5002
5003 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
5004
5005 * linux-low.c (check_stopped_by_breakpoint): Use
5006 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
5007
5008 2015-08-27 Pedro Alves <palves@redhat.com>
5009
5010 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
5011
5012 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
5013
5014 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
5015 the XNEW-family equivalent.
5016 (compile_bytecodes): Likewise.
5017 * dll.c (loaded_dll): Likewise.
5018 * event-loop.c (append_callback_event): Likewise.
5019 (create_file_handler): Likewise.
5020 (create_file_event): Likewise.
5021 * hostio.c (handle_open): Likewise.
5022 * inferiors.c (add_thread): Likewise.
5023 (add_process): Likewise.
5024 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
5025 * linux-arm-low.c (arm_new_process): Likewise.
5026 (arm_new_thread): Likewise.
5027 * linux-low.c (add_to_pid_list): Likewise.
5028 (linux_add_process): Likewise.
5029 (handle_extended_wait): Likewise.
5030 (add_lwp): Likewise.
5031 (enqueue_one_deferred_signal): Likewise.
5032 (enqueue_pending_signal): Likewise.
5033 (linux_resume_one_lwp_throw): Likewise.
5034 (linux_resume_one_thread): Likewise.
5035 (linux_read_memory): Likewise.
5036 (linux_write_memory): Likewise.
5037 * linux-mips-low.c (mips_linux_new_process): Likewise.
5038 (mips_linux_new_thread): Likewise.
5039 (mips_add_watchpoint): Likewise.
5040 * linux-x86-low.c (initialize_low_arch): Likewise.
5041 * lynx-low.c (lynx_add_process): Likewise.
5042 * mem-break.c (set_raw_breakpoint_at): Likewise.
5043 (set_breakpoint): Likewise.
5044 (add_condition_to_breakpoint): Likewise.
5045 (add_commands_to_breakpoint): Likewise.
5046 (clone_agent_expr): Likewise.
5047 (clone_one_breakpoint): Likewise.
5048 * regcache.c (new_register_cache): Likewise.
5049 * remote-utils.c (look_up_one_symbol): Likewise.
5050 * server.c (queue_stop_reply): Likewise.
5051 (start_inferior): Likewise.
5052 (queue_stop_reply_callback): Likewise.
5053 (handle_target_event): Likewise.
5054 * spu-low.c (fetch_ppc_memory): Likewise.
5055 (store_ppc_memory): Likewise.
5056 * target.c (set_target_ops): Likewise.
5057 * thread-db.c (thread_db_load_search): Likewise.
5058 (try_thread_db_load_1): Likewise.
5059 * tracepoint.c (add_tracepoint): Likewise.
5060 (add_tracepoint_action): Likewise.
5061 (create_trace_state_variable): Likewise.
5062 (cmd_qtdpsrc): Likewise.
5063 (cmd_qtro): Likewise.
5064 (add_while_stepping_state): Likewise.
5065 * win32-low.c (child_add_thread): Likewise.
5066 (get_image_name): Likewise.
5067
5068 2015-08-25 Yao Qi <yao.qi@linaro.org>
5069
5070 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
5071
5072 2015-08-25 Yao Qi <yao.qi@linaro.org>
5073
5074 * Makefile.in (aarch64-linux.o): New rule.
5075 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
5076 srv_tgtobj.
5077 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
5078 (aarch64_init_debug_reg_state): Make it extern.
5079 (aarch64_linux_prepare_to_resume): Remove.
5080
5081 2015-08-25 Yao Qi <yao.qi@linaro.org>
5082
5083 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
5084 lwp_arch_private_info and ptid_of_lwp.
5085
5086 2015-08-25 Yao Qi <yao.qi@linaro.org>
5087
5088 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
5089 Find proc_info by find_process_pid. All callers updated.
5090
5091 2015-08-25 Yao Qi <yao.qi@linaro.org>
5092
5093 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
5094 Remove.
5095 (debug_reg_change_callback): Remove.
5096 (aarch64_notify_debug_reg_change): Remove.
5097
5098 2015-08-25 Yao Qi <yao.qi@linaro.org>
5099
5100 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
5101 Call current_lwp_ptid.
5102
5103 2015-08-25 Yao Qi <yao.qi@linaro.org>
5104
5105 * linux-aarch64-low.c (debug_reg_change_callback): Use
5106 debug_printf.
5107
5108 2015-08-25 Yao Qi <yao.qi@linaro.org>
5109
5110 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
5111
5112 2015-08-25 Yao Qi <yao.qi@linaro.org>
5113
5114 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
5115
5116 2015-08-25 Yao Qi <yao.qi@linaro.org>
5117
5118 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
5119 the code.
5120
5121 2015-08-25 Yao Qi <yao.qi@linaro.org>
5122
5123 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
5124 Remove.
5125 (debug_reg_change_callback): Remove argument entry and add argument
5126 lwp. Remove local variable thread. Don't print thread id in the
5127 debugging output. Don't check whether pid of thread equals to pid.
5128 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
5129 iterate_over_lwps instead find_inferior.
5130
5131 2015-08-24 Pedro Alves <palves@redhat.com>
5132
5133 * inferiors.c (get_first_process): New function.
5134 * inferiors.h (get_first_process): New declaration.
5135 * remote-utils.c (read_ptid): Default to the first process in the
5136 list, instead of to the current thread's process.
5137
5138 2015-08-24 Pedro Alves <palves@redhat.com>
5139
5140 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
5141 * event-loop.c: Likewise.
5142 * remote-utils.c: Likewise.
5143 * tracepoint.c: Likewise.
5144
5145 2015-08-24 Pedro Alves <palves@redhat.com>
5146
5147 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
5148 ptid_get_lwp.
5149
5150 2015-08-21 Pedro Alves <palves@redhat.com>
5151
5152 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
5153 instead of literal 1.
5154
5155 2015-08-21 Pedro Alves <palves@redhat.com>
5156
5157 * tdesc.c (default_description): Explicitly zero-initialize.
5158
5159 2015-08-21 Pedro Alves <palves@redhat.com>
5160
5161 PR gdb/18749
5162 * inferiors.c (remove_thread): Discard any pending stop reply for
5163 this thread.
5164 * server.c (remove_all_on_match_pid): Rename to ...
5165 (remove_all_on_match_ptid): ... this. Work with a filter ptid
5166 instead of a pid.
5167 (discard_queued_stop_replies): Change parameter to a ptid. Now
5168 extern.
5169 (handle_v_kill, kill_inferior_callback, captured_main)
5170 (process_serial_event): Adjust.
5171 * server.h (discard_queued_stop_replies): Declare.
5172
5173 2015-08-21 Pedro Alves <palves@redhat.com>
5174
5175 * linux-low.c (wait_for_sigstop): Always switch to no thread
5176 selected if the previously current thread dies.
5177 * lynx-low.c (lynx_request_interrupt): Use the first thread's
5178 process instead of the current thread's.
5179 * remote-utils.c (input_interrupt): Don't check if there's no
5180 current thread.
5181 * server.c (gdb_read_memory, gdb_write_memory): If setting the
5182 current thread to the general thread fails, error out.
5183 (handle_qxfer_auxv, handle_qxfer_libraries)
5184 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
5185 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
5186 (handle_query): Check if there's a thread selected instead of
5187 checking whether there's any thread in the thread list.
5188 (handle_qxfer_threads, handle_qxfer_btrace)
5189 (handle_qxfer_btrace_conf): Don't error out early if there's no
5190 thread in the thread list.
5191 (handle_v_cont, myresume): Don't set the current thread to the
5192 continue thread.
5193 (process_serial_event) <Hg handling>: Also set thread_id if the
5194 previous general thread is still alive.
5195 (process_serial_event) <g/G handling>: If setting the current
5196 thread to the general thread fails, error out.
5197 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
5198 thread's lwp instead of the current thread's.
5199 * target.c (set_desired_thread): If the desired thread was not
5200 found, leave the current thread pointing to NULL. Return an int
5201 (boolean) indicating success.
5202 * target.h (set_desired_thread): Change return type to int.
5203
5204 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
5205
5206 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
5207 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
5208 #includes.
5209 (ps_get_thread_area): New function.
5210
5211 2015-08-19 Gary Benson <gbenson@redhat.com>
5212
5213 * hostio.c (handle_pread): Do not attempt to read more data
5214 than hostio_reply_with_data can fit in a packet.
5215
5216 2015-08-18 Joel Brobecker <brobecker@adacore.com>
5217
5218 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
5219
5220 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
5221
5222 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
5223
5224 2015-08-06 Pedro Alves <palves@redhat.com>
5225
5226 * tracepoint.c (expr_eval_result): Now an int.
5227
5228 2015-08-06 Pedro Alves <palves@redhat.com>
5229
5230 * gdbthread.h (struct regcache): Forward declare.
5231 (struct thread_info) <regcache_data>: Now a struct regcache
5232 pointer.
5233 * inferiors.c (inferior_regcache_data)
5234 (set_inferior_regcache_data): Now work with struct regcache
5235 pointers.
5236 * inferiors.h (struct regcache): Forward declare.
5237 (inferior_regcache_data, set_inferior_regcache_data): Now work
5238 with struct regcache pointers.
5239 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
5240 (free_register_cache_thread): Remove struct regcache pointer
5241 casts.
5242
5243 2015-08-06 Pedro Alves <palves@redhat.com>
5244
5245 * server.c (captured_main): On error, print the exception message
5246 to stderr, and if run_once is set, throw a quit.
5247
5248 2015-08-06 Pedro Alves <palves@redhat.com>
5249
5250 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
5251 the current thread.
5252
5253 2015-08-06 Pedro Alves <palves@redhat.com>
5254
5255 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
5256 reading beyond the passed in buffer length.
5257
5258 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
5259
5260 * tracepoint.c (symbol_list) <required>: Remove.
5261
5262 2015-08-06 Pedro Alves <palves@redhat.com>
5263
5264 * linux-low.c (handle_extended_wait): Set the fork child's suspend
5265 count if stopping and suspending threads.
5266 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
5267 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
5268 (linux_detach): Complete an ongoing step-over.
5269 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
5270 throughout.
5271 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
5272 (linux_wait_1): If passing a signal to the inferior after
5273 finishing a step-over, unsuspend and re-resume all lwps. If we
5274 see a single-step event but the thread should be continuing, don't
5275 pass the trap to gdb.
5276 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
5277 internal_error instead of gdb_assert.
5278 (enqueue_pending_signal): New function.
5279 (check_ptrace_stopped_lwp_gone): Add debug output.
5280 (start_step_over): Use internal_error instead of gdb_assert.
5281 (complete_ongoing_step_over): New function.
5282 (linux_resume_one_thread): Don't resume a suspended thread.
5283 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
5284 it stepping.
5285
5286 2015-08-06 Pedro Alves <palves@redhat.com>
5287
5288 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
5289 (linux_thread_alive): Use lwp_is_marked_dead.
5290 (extended_event_reported): Delete.
5291 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
5292 instead of extended_event_reported.
5293 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
5294 as well.
5295 (lwp_is_marked_dead): New function.
5296 (lwp_running): Use lwp_is_marked_dead.
5297 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
5298 comment.
5299
5300 2015-08-06 Pedro Alves <palves@redhat.com>
5301
5302 * linux-low.c (linux_wait_1): Move fork event output out of the
5303 !report_to_gdb check. Pass event_child->waitstatus to
5304 target_waitstatus_to_string instead of ourstatus.
5305
5306 2015-08-04 Yao Qi <yao.qi@linaro.org>
5307
5308 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
5309 if current_thread is 32 bit.
5310
5311 2015-08-04 Yao Qi <yao.qi@linaro.org>
5312
5313 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
5314 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
5315 * server.c (extended_protocol): Remove "static".
5316 * server.h (extended_protocol): Declare it.
5317
5318 2015-08-04 Yao Qi <yao.qi@linaro.org>
5319
5320 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
5321 both aarch64 and aarch32.
5322 (aarch64_set_pc): Likewise.
5323
5324 2015-08-04 Yao Qi <yao.qi@linaro.org>
5325
5326 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
5327 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
5328 arm-with-neon.xml to srv_xmlfiles.
5329 * linux-aarch64-low.c: Include linux-aarch32-low.h.
5330 (is_64bit_tdesc): New function.
5331 (aarch64_linux_read_description): New function.
5332 (aarch64_arch_setup): Call aarch64_linux_read_description.
5333 (regs_info): Rename to regs_info_aarch64.
5334 (aarch64_regs_info): Return right regs_info.
5335 (initialize_low_arch): Call initialize_low_arch_aarch32.
5336
5337 2015-08-04 Yao Qi <yao.qi@linaro.org>
5338
5339 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
5340 * linux-aarch32-low.c: New file.
5341 * linux-aarch32-low.h: New file.
5342 * linux-arm-low.c (arm_fill_gregset): Move it to
5343 linux-aarch32-low.c.
5344 (arm_store_gregset): Likewise.
5345 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
5346 (arm_store_vfpregset): Call arm_store_vfpregset_num.
5347 (arm_arch_setup): Check if PTRACE_GETREGSET works.
5348 (regs_info): Rename to regs_info_arm.
5349 (arm_regs_info): Return regs_info_aarch32 if
5350 have_ptrace_getregset is 1 and target description is
5351 arm_with_neon or arm_with_vfpv3.
5352 (initialize_low_arch): Don't call init_registers_arm_with_neon.
5353 Call initialize_low_arch_aarch32 instead.
5354
5355 2015-08-04 Yao Qi <yao.qi@linaro.org>
5356
5357 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
5358 * linux-low.c: ... here.
5359 * linux-low.h (have_ptrace_getregset): Declare it.
5360
5361 2015-08-04 Pedro Alves <palves@redhat.com>
5362
5363 * thread-db.c (struct thread_db): Use new typedefs.
5364 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
5365 CHK calls.
5366 (disable_thread_event_reporting): Cast result of dlsym to
5367 destination function pointer type.
5368 (thread_db_mourn): Use td_ta_delete_ftype.
5369
5370 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
5371
5372 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
5373 arch variant.
5374 (CDX_BREAKPOINT): Define for R2.
5375 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
5376 (the_low_target): Add comments.
5377
5378 2015-07-30 Yao Qi <yao.qi@linaro.org>
5379
5380 * linux-arm-low.c (arm_hwcap): Remove it.
5381 (arm_read_description): New local variable arm_hwcap. Don't
5382 set arm_hwcap to zero.
5383
5384 2015-07-30 Yao Qi <yao.qi@linaro.org>
5385
5386 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
5387 Use regcache->tdesc instead.
5388 (arm_store_wmmxregset): Likewise.
5389 (arm_fill_vfpregset): Likewise.
5390 (arm_store_vfpregset): Likewise.
5391
5392 2015-07-30 Yao Qi <yao.qi@linaro.org>
5393
5394 * linux-arm-low.c: Include arch/arm.h.
5395 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
5396 (arm_store_gregset): Likewise.
5397
5398 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
5399
5400 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
5401 ptrace's 4th parameter.
5402
5403 2015-07-27 Yao Qi <yao.qi@linaro.org>
5404
5405 * configure.srv (case aarch64*-*-linux*): Don't set
5406 srv_linux_usrregs.
5407
5408 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
5409
5410 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
5411 sys/ptrace.h.
5412 * linux-arm-low.c: Likewise.
5413 * linux-cris-low.c: Likewise.
5414 * linux-crisv32-low.c: Likewise.
5415 * linux-low.c: Likewise.
5416 * linux-m68k-low.c: Likewise.
5417 * linux-mips-low.c: Likewise.
5418 * linux-nios2-low.c: Likewise.
5419 * linux-s390-low.c: Likewise.
5420 * linux-sparc-low.c: Likewise.
5421 * linux-tic6x-low.c: Likewise.
5422 * linux-tile-low.c: Likewise.
5423 * linux-x86-low.c: Likewise.
5424
5425 2015-07-24 Pedro Alves <palves@redhat.com>
5426
5427 * config.in: Regenerate.
5428 * configure: Regenerate.
5429
5430 2015-07-24 Pedro Alves <palves@redhat.com>
5431
5432 * acinclude.m4: Include ../ptrace.m4.
5433 * configure.ac: Call GDB_AC_PTRACE.
5434 * config.in, configure: Regenerate.
5435
5436 2015-07-24 Yao Qi <yao.qi@linaro.org>
5437
5438 * linux-low.c (linux_create_inferior): Remove setting to
5439 proc->priv->new_inferior.
5440 (linux_attach): Likewise.
5441 (linux_low_filter_event): Likewise.
5442 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
5443
5444 2015-07-24 Yao Qi <yao.qi@linaro.org>
5445
5446 * linux-low.c (linux_arch_setup): New function.
5447 (linux_low_filter_event): If proc->tdesc is NULL and
5448 proc->attached is true, call the_low_target.arch_setup.
5449 Otherwise, keep status pending, and return.
5450 (linux_resume_one_lwp_throw): Don't call get_pc if
5451 thread->while_stepping isn't NULL. Don't call
5452 get_thread_regcache if proc->tdesc is NULL.
5453 (need_step_over_p): Return 0 if proc->tdesc is NULL.
5454 (linux_target_ops): Install arch_setup.
5455 * server.c (start_inferior): Call the_target->arch_setup.
5456 * target.h (struct target_ops) <arch_setup>: New field.
5457 (target_arch_setup): New marco.
5458 * lynx-low.c (lynx_target_ops): Update.
5459 * nto-low.c (nto_target_ops): Update.
5460 * spu-low.c (spu_target_ops): Update.
5461 * win32-low.c (win32_target_ops): Update.
5462
5463 2015-07-24 Yao Qi <yao.qi@linaro.org>
5464
5465 * linux-low.c (linux_add_process): Don't set
5466 proc->priv->new_inferior.
5467 (linux_create_inferior): Set proc->priv->new_inferior to 1.
5468 (linux_attach): Likewise.
5469
5470 2015-07-24 Yao Qi <yao.qi@linaro.org>
5471
5472 * server.c (start_inferior): Code refactor.
5473
5474 2015-07-24 Yao Qi <yao.qi@linaro.org>
5475
5476 * server.c (process_serial_event): Set general_thread.
5477
5478 2015-07-21 Yao Qi <yao.qi@linaro.org>
5479
5480 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
5481 aarch64_linux_get_debug_reg_capacity.
5482
5483 2015-07-17 Yao Qi <yao.qi@linaro.org>
5484
5485 * Makefile.in (aarch64-linux-hw-point.o): New rule.
5486 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
5487 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
5488 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
5489 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
5490 (AARCH64_HWP_ALIGNMENT): Likewise.
5491 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
5492 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
5493 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
5494 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
5495 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
5496 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
5497 (struct aarch64_debug_reg_state): Likewise.
5498 (struct arch_lwp_info): Likewise.
5499 (aarch64_align_watchpoint): Likewise.
5500 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
5501 (aarch64_watchpoint_length): Likewise.
5502 (aarch64_point_encode_ctrl_reg): Likewise
5503 (aarch64_point_is_aligned): Likewise.
5504 (aarch64_align_watchpoint): Likewise.
5505 (aarch64_linux_set_debug_regs):
5506 (aarch64_dr_state_insert_one_point): Likewise.
5507 (aarch64_dr_state_remove_one_point): Likewise.
5508 (aarch64_handle_breakpoint): Likewise.
5509 (aarch64_handle_aligned_watchpoint): Likewise.
5510 (aarch64_handle_unaligned_watchpoint): Likewise.
5511 (aarch64_handle_watchpoint): Likewise.
5512
5513 2015-07-17 Yao Qi <yao.qi@linaro.org>
5514
5515 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
5516 and don't aarch64_get_debug_reg_state. All callers update.
5517 (aarch64_handle_aligned_watchpoint): Likewise.
5518 (aarch64_handle_unaligned_watchpoint): Likewise.
5519 (aarch64_handle_watchpoint): Likewise.
5520 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
5521 (aarch64_remove_point): Likewise.
5522
5523 2015-07-17 Yao Qi <yao.qi@linaro.org>
5524
5525 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
5526 debug_printf.
5527 (aarch64_handle_unaligned_watchpoint): Likewise.
5528
5529 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
5530
5531 Revert the previous 3 commits:
5532 Move gdb_regex* to common/
5533 Move linux_find_memory_regions_full & co.
5534 gdbserver build-id attribute generator
5535
5536 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
5537 Jan Kratochvil <jan.kratochvil@redhat.com>
5538
5539 gdbserver build-id attribute generator.
5540 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
5541 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
5542 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
5543 (find_phdr): New.
5544 (get_dynamic): Use find_pdhr to traverse program headers.
5545 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
5546 (compare_mapping_entry_range, struct find_memory_region_callback_data)
5547 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
5548 (get_hex_build_id): New.
5549 (linux_qxfer_libraries_svr4): Add optional build-id attribute
5550 to reply XML document.
5551
5552 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
5553 Jan Kratochvil <jan.kratochvil@redhat.com>
5554
5555 * target.c: Include target/target-utils.h and fcntl.h.
5556 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
5557 (target_fileio_read_stralloc): New functions.
5558
5559 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
5560
5561 * Makefile.in (OBS): Add gdb_regex.o.
5562 (gdb_regex.o): New.
5563 * config.in: Rebuilt.
5564 * configure: Rebuilt.
5565
5566 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
5567 Jan Kratochvil <jan.kratochvil@redhat.com>
5568
5569 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
5570 * Makefile.in (OBS): Add target-utils.o.
5571 (linux-maps.o, target-utils.o): New.
5572 * configure.srv (srv_linux_obj): Add linux-maps.o.
5573
5574 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
5575
5576 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
5577 function, return 1.
5578 (the_low_target): Install it.
5579
5580 2015-07-14 Pedro Alves <palves@redhat.com>
5581
5582 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
5583 Instead, ignore ECHILD, and throw an error for other errnos.
5584
5585 2015-07-10 Pedro Alves <palves@redhat.com>
5586
5587 * event-loop.c (struct callback_event) <data>: Change type to
5588 gdb_client_data instance instead of gdb_client_data pointer.
5589 (append_callback_event): Adjust.
5590
5591 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
5592
5593 * linux-aarch64-low.c: Add comments for each linux_target_ops
5594 method. Remove comments already covered in target_ops and
5595 linux_target_ops definitions.
5596 (the_low_target): Add comments for each unimplemented method.
5597
5598 2015-07-09 Yao Qi <yao.qi@linaro.org>
5599
5600 * linux-aarch64-low.c (aarch64_regmap): Remove.
5601 (aarch64_usrregs_info): Remove.
5602 (regs_info): Set field usrregs to NULL.
5603
5604 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
5605
5606 * linux-low.c: Include "rsp-low.h"
5607 (linux_low_encode_pt_config, linux_low_encode_raw): New.
5608 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
5609 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
5610 (handle_btrace_enable_pt): New.
5611 (handle_btrace_general_set): Support "pt".
5612 (handle_btrace_conf_general_set): Support "pt:size".
5613
5614 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
5615
5616 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
5617 Z_PACKET_SW_BP.
5618
5619 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
5620
5621 * linux-aarch64-low.c: Remove comment about endianness.
5622 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
5623 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
5624 memcmp.
5625
5626 2015-06-24 Gary Benson <gbenson@redhat.com>
5627
5628 * linux-i386-ipa.c (stdint.h): Do not include.
5629 * lynx-i386-low.c (stdint.h): Likewise.
5630 * lynx-ppc-low.c (stdint.h): Likewise.
5631 * mem-break.c (stdint.h): Likewise.
5632 * thread-db.c (stdint.h): Likewise.
5633 * tracepoint.c (stdint.h): Likewise.
5634 * win32-low.c (stdint.h): Likewise.
5635
5636 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
5637
5638 * server.c (write_qxfer_response): Update call to
5639 remote_escape_output.
5640
5641 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
5642 Jan Kratochvil <jan.kratochvil@redhat.com>
5643
5644 Merge multiple hex conversions.
5645 * gdbreplay.c (tohex): Rename to 'fromhex'.
5646 (logchar): Use fromhex.
5647
5648 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
5649
5650 * server.c (handle_qxfer_libraries): Set `version' attribute for
5651 <library-list>.
5652
5653 2015-06-10 Gary Benson <gbenson@redhat.com>
5654
5655 * target.h (struct target_ops) <multifs_open>: New field.
5656 <multifs_unlink>: Likewise.
5657 <multifs_readlink>: Likewise.
5658 * linux-low.c (nat/linux-namespaces.h): New include.
5659 (linux_target_ops): Initialize the_target->multifs_open,
5660 the_target->multifs_unlink and the_target->multifs_readlink.
5661 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
5662 * hostio.c (hostio_fs_pid): New static variable.
5663 (hostio_handle_new_gdb_connection): New function.
5664 (handle_setfs): Likewise.
5665 (handle_open): Use the_target->multifs_open as appropriate.
5666 (handle_unlink): Use the_target->multifs_unlink as appropriate.
5667 (handle_readlink): Use the_target->multifs_readlink as
5668 appropriate.
5669 (handle_vFile): Handle vFile:setfs packets.
5670 * server.c (handle_query): Call hostio_handle_new_gdb_connection
5671 after target_handle_new_gdb_connection.
5672
5673 2015-06-10 Gary Benson <gbenson@redhat.com>
5674
5675 * configure.ac (AC_CHECK_FUNCS): Add setns.
5676 * config.in: Regenerate.
5677 * configure: Likewise.
5678 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
5679 (linux-namespaces.o): New rule.
5680 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
5681
5682 2015-06-09 Gary Benson <gbenson@redhat.com>
5683
5684 * hostio.c (handle_open): Process mode argument with
5685 fileio_to_host_mode.
5686
5687 2015-06-01 Yao Qi <yao.qi@linaro.org>
5688
5689 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
5690 * linux-x86-low.c: Likewise.
5691
5692 2015-05-28 Don Breazeal <donb@codesourcery.com>
5693
5694 * linux-low.c (handle_extended_wait): Initialize
5695 thread_info.last_resume_kind for new fork children.
5696
5697 2015-05-15 Pedro Alves <palves@redhat.com>
5698
5699 * target.h (target_handle_new_gdb_connection): Rewrite using if
5700 wrapped in do/while.
5701
5702 2015-05-14 Joel Brobecker <brobecker@adacore.com>
5703
5704 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
5705 * configure, config.in: Regenerate.
5706 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
5707 Declare typedef.
5708
5709 2015-05-12 Don Breazeal <donb@codesourcery.com>
5710
5711 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
5712 PTRACE_EVENT_VFORK_DONE.
5713 (linux_low_ptrace_options, extended_event_reported): Add vfork
5714 events.
5715 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
5716 and "vforkdone" for RSP 'T' Stop Reply Packet.
5717 * server.h (report_vfork_events): Declare
5718 global variable.
5719
5720 2015-05-12 Don Breazeal <donb@codesourcery.com>
5721
5722 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
5723 (the_low_target) <new_fork>: Initialize new member.
5724 * linux-arm-low.c (arm_new_fork): New function.
5725 (the_low_target) <new_fork>: Initialize new member.
5726 * linux-low.c (handle_extended_wait): Call new target function
5727 new_fork.
5728 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
5729 * linux-mips-low.c (mips_add_watchpoint): New function
5730 extracted from mips_insert_point.
5731 (the_low_target) <new_fork>: Initialize new member.
5732 (mips_linux_new_fork): New function.
5733 (mips_insert_point): Call mips_add_watchpoint.
5734 * linux-x86-low.c (x86_linux_new_fork): New function.
5735 (the_low_target) <new_fork>: Initialize new member.
5736
5737 2015-05-12 Don Breazeal <donb@codesourcery.com>
5738
5739 * linux-low.c (handle_extended_wait): Implement return value,
5740 rename argument 'event_child' to 'event_lwp', handle
5741 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
5742 (linux_low_ptrace_options): New function.
5743 (linux_low_filter_event): Call linux_low_ptrace_options,
5744 use different argument fo linux_enable_event_reporting,
5745 use return value from handle_extended_wait.
5746 (extended_event_reported): New function.
5747 (linux_wait_1): Call extended_event_reported and set
5748 status to report fork events.
5749 (linux_write_memory): Add pid to debug message.
5750 (reset_lwp_ptrace_options_callback): New function.
5751 (linux_handle_new_gdb_connection): New function.
5752 (linux_target_ops): Initialize new structure member.
5753 * linux-low.h (struct lwp_info) <waitstatus>: New member.
5754 * lynx-low.c: Initialize new structure member.
5755 * remote-utils.c (prepare_resume_reply): Implement stop reason
5756 "fork" for "T" stop message.
5757 * server.c (handle_query): Call handle_new_gdb_connection.
5758 * server.h (report_fork_events): Declare global flag.
5759 * target.h (struct target_ops) <handle_new_gdb_connection>:
5760 New member.
5761 (target_handle_new_gdb_connection): New macro.
5762 * win32-low.c: Initialize new structure member.
5763
5764 2015-05-12 Don Breazeal <donb@codesourcery.com>
5765
5766 * mem-break.c (APPEND_TO_LIST): Define macro.
5767 (clone_agent_expr): New function.
5768 (clone_one_breakpoint): New function.
5769 (clone_all_breakpoints): New function.
5770 * mem-break.h: Declare new functions.
5771
5772 2015-05-12 Don Breazeal <donb@codesourcery.com>
5773
5774 * linux-low.c (linux_supports_fork_events): New function.
5775 (linux_supports_vfork_events): New function.
5776 (linux_target_ops): Initialize new structure members.
5777 (initialize_low): Call linux_check_ptrace_features.
5778 * lynx-low.c (lynx_target_ops): Initialize new structure
5779 members.
5780 * server.c (report_fork_events, report_vfork_events):
5781 New global flags.
5782 (handle_query): Add new features to qSupported packet and
5783 response.
5784 (captured_main): Initialize new global variables.
5785 * target.h (struct target_ops) <supports_fork_events>:
5786 New member.
5787 <supports_vfork_events>: New member.
5788 (target_supports_fork_events): New macro.
5789 (target_supports_vfork_events): New macro.
5790 * win32-low.c (win32_target_ops): Initialize new structure
5791 members.
5792
5793 2015-05-12 Gary Benson <gbenson@redhat.com>
5794
5795 * server.c (handle_qxfer_exec_file): Use current process
5796 if annex is empty.
5797
5798 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
5799
5800 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
5801 Remove HAVE_PTRACE_GETREGS conditionals.
5802 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
5803 instead of PTRACE_GETREGS and PTRACE_SETREGS.
5804
5805 2015-05-08 Yao Qi <yao.qi@linaro.org>
5806
5807 * linux-low.c (linux_supports_conditional_breakpoints): New
5808 function.
5809 (linux_target_ops): Install new target method.
5810 * lynx-low.c (lynx_target_ops): Install NULL hook for
5811 supports_conditional_breakpoints.
5812 * nto-low.c (nto_target_ops): Likewise.
5813 * spu-low.c (spu_target_ops): Likewise.
5814 * win32-low.c (win32_target_ops): Likewise.
5815 * server.c (handle_query): Check
5816 target_supports_conditional_breakpoints.
5817 * target.h (struct target_ops) <supports_conditional_breakpoints>:
5818 New field.
5819 (target_supports_conditional_breakpoints): New macro.
5820
5821 2015-05-06 Pedro Alves <palves@redhat.com>
5822
5823 PR server/18081
5824 * server.c (start_inferior): If the process exits, mourn it.
5825
5826 2015-04-21 Gary Benson <gbenson@redhat.com>
5827
5828 * hostio.c (fileio_open_flags_to_host): Factored out to
5829 fileio_to_host_openflags in common/fileio.c. Single use
5830 updated.
5831
5832 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
5833
5834 * linux-xtensa-low.c (xtensa_fill_gregset)
5835 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
5836 XCHAL_HAVE_LOOP.
5837
5838 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
5839
5840 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
5841 (regs_info): Replace usrregs pointer with NULL.
5842
5843 2015-04-17 Gary Benson <gbenson@redhat.com>
5844
5845 * target.h (struct target_ops) <pid_to_exec_file>: New field.
5846 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
5847 * server.c (handle_qxfer_exec_file): New function.
5848 (qxfer_packets): Add exec-file entry.
5849 (handle_query): Report qXfer:exec-file:read as supported packet.
5850
5851 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
5852
5853 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
5854
5855 2015-04-09 Gary Benson <gbenson@redhat.com>
5856
5857 * hostio-errno.c (errno_to_fileio_error): Remove function.
5858 Update caller to use remote_fileio_to_fio_error.
5859
5860 2015-04-09 Yao Qi <yao.qi@linaro.org>
5861
5862 * linux-low.c (linux_insert_point): Call
5863 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
5864 (linux_remove_point): Call remove_memory_breakpoint if type is
5865 raw_bkpt_type_sw.
5866 * linux-x86-low.c (x86_insert_point): Don't call
5867 insert_memory_breakpoint.
5868 (x86_remove_point): Don't call remove_memory_breakpoint.
5869
5870 2015-04-01 Pedro Alves <palves@redhat.com>
5871 Cleber Rosa <crosa@redhat.com>
5872
5873 * server.c (gdbserver_usage): Reorganize and extend the usage
5874 message.
5875
5876 2015-03-24 Pedro Alves <palves@redhat.com>
5877
5878 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
5879 output. Also dump TRAP_TRACE.
5880 (linux_low_filter_event): In debug output, distinguish a
5881 resume_stop SIGSTOP from a delayed SIGSTOP.
5882
5883 2015-03-24 Gary Benson <gbenson@redhat.com>
5884
5885 * linux-x86-low.c (x86_linux_new_thread): Moved to
5886 nat/x86-linux.c.
5887 (x86_linux_prepare_to_resume): Likewise.
5888
5889 2015-03-24 Gary Benson <gbenson@redhat.com>
5890
5891 * Makefile.in (x86-linux-dregs.o): New rule.
5892 * configure.srv: Add x86-linux-dregs.o to relevant targets.
5893 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
5894 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
5895 (x86_linux_dr_get): Likewise.
5896 (x86_linux_dr_set): Likewise.
5897 (update_debug_registers_callback): Likewise.
5898 (x86_linux_dr_set_addr): Likewise.
5899 (x86_linux_dr_get_addr): Likewise.
5900 (x86_linux_dr_set_control): Likewise.
5901 (x86_linux_dr_get_control): Likewise.
5902 (x86_linux_dr_get_status): Likewise.
5903 (x86_linux_update_debug_registers): Likewise.
5904
5905 2015-03-24 Gary Benson <gbenson@redhat.com>
5906
5907 * linux-x86-low.c (x86_linux_update_debug_registers):
5908 New function, factored out from...
5909 (x86_linux_prepare_to_resume): ...this.
5910
5911 2015-03-24 Gary Benson <gbenson@redhat.com>
5912
5913 * linux-x86-low.c (x86_linux_dr_get): Update comments.
5914 (x86_linux_dr_set): Likewise.
5915 (update_debug_registers_callback): Likewise.
5916 (x86_linux_dr_set_addr): Likewise.
5917 (x86_linux_dr_get_addr): Likewise.
5918 (x86_linux_dr_set_control): Likewise.
5919 (x86_linux_dr_get_control): Likewise.
5920 (x86_linux_dr_get_status): Likewise.
5921 (x86_linux_prepare_to_resume): Likewise.
5922
5923 2015-03-24 Gary Benson <gbenson@redhat.com>
5924
5925 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
5926 Use perror_with_name. Pass string through gettext.
5927 (x86_linux_dr_set): Likewise.
5928
5929 2015-03-24 Gary Benson <gbenson@redhat.com>
5930
5931 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
5932 (x86_linux_dr_set_addr): ...this.
5933 (x86_dr_low_get_addr): Rename to...
5934 (x86_linux_dr_get_addr): ...this.
5935 (x86_dr_low_set_control): Rename to...
5936 (x86_linux_dr_set_control): ...this.
5937 (x86_dr_low_get_control): Rename to...
5938 (x86_linux_dr_get_control): ...this.
5939 (x86_dr_low_get_status): Rename to...
5940 (x86_linux_dr_get_status): ...this.
5941 (x86_dr_low): Update with new function names.
5942
5943 2015-03-24 Gary Benson <gbenson@redhat.com>
5944
5945 * Makefile.in (x86-linux.o): New rule.
5946 * configure.srv: Add x86-linux.o to relevant targets.
5947 * linux-low.c (lwp_set_arch_private_info): New function.
5948 (lwp_arch_private_info): Likewise.
5949 * linux-x86-low.c: Include nat/x86-linux.h.
5950 (arch_lwp_info): Removed structure.
5951 (update_debug_registers_callback):
5952 Use lwp_set_debug_registers_changed.
5953 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
5954 and lwp_set_debug_registers_changed.
5955 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
5956
5957 2015-03-24 Gary Benson <gbenson@redhat.com>
5958
5959 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
5960 * linux-arm-low.c (arm_new_thread): Likewise.
5961 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
5962 * linux-mips-low.c (mips_linux_new_thread): Likewise.
5963 * linux-x86-low.c (x86_linux_new_thread): Likewise.
5964 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
5965
5966 2015-03-24 Gary Benson <gbenson@redhat.com>
5967
5968 * linux-low.c (ptid_of_lwp): New function.
5969 (lwp_is_stopped): Likewise.
5970 (lwp_stop_reason): Likewise.
5971 * linux-x86-low.c (update_debug_registers_callback):
5972 Use lwp_is_stopped.
5973 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
5974 lwp_stop_reason.
5975
5976 2015-03-24 Gary Benson <gbenson@redhat.com>
5977
5978 * linux-low.h (linux_stop_lwp): Remove declaration.
5979
5980 2015-03-24 Gary Benson <gbenson@redhat.com>
5981
5982 * linux-low.h: Include nat/linux-nat.h.
5983 * linux-low.c (iterate_over_lwps_args): New structure.
5984 (iterate_over_lwps_filter): New function.
5985 (iterate_over_lwps): Likewise.
5986 * linux-x86-low.c (update_debug_registers_callback):
5987 Update signature to what iterate_over_lwps expects.
5988 Remove PID check that iterate_over_lwps now performs.
5989 (x86_dr_low_set_addr): Use iterate_over_lwps.
5990 (x86_dr_low_set_control): Likewise.
5991
5992 2015-03-24 Gary Benson <gbenson@redhat.com>
5993
5994 * linux-x86-low.c (x86_debug_reg_state): New function.
5995 (x86_linux_prepare_to_resume): Use the above.
5996
5997 2015-03-24 Gary Benson <gbenson@redhat.com>
5998
5999 * linux-low.c (current_lwp_ptid): New function.
6000 * linux-x86-low.c: Include nat/linux-nat.h.
6001 (x86_dr_low_get_addr): Use current_lwp_ptid.
6002 (x86_dr_low_get_control): Likewise.
6003 (x86_dr_low_get_status): Likewise.
6004
6005 2015-03-20 Pedro Alves <palves@redhat.com>
6006
6007 * tracepoint.c (cmd_qtstatus): Make "str" const.
6008
6009 2015-03-20 Pedro Alves <palves@redhat.com>
6010
6011 * server.c (handle_general_set): Make "req_str" const.
6012
6013 2015-03-19 Pedro Alves <palves@redhat.com>
6014
6015 * linux-low.c (linux_resume_one_lwp): Rename to ...
6016 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
6017 instead call perror_with_name.
6018 (check_ptrace_stopped_lwp_gone): New function.
6019 (linux_resume_one_lwp): Reimplement as wrapper around
6020 linux_resume_one_lwp_throw that swallows errors if the LWP is
6021 gone.
6022
6023 2015-03-19 Pedro Alves <palves@redhat.com>
6024
6025 * linux-low.c (count_events_callback, select_event_lwp_callback):
6026 No longer check whether the thread has resume_stop as last resume
6027 kind.
6028
6029 2015-03-19 Pedro Alves <palves@redhat.com>
6030
6031 * linux-low.c (count_events_callback, select_event_lwp_callback):
6032 Use the lwp's status_pending_p field, not the thread's.
6033
6034 2015-03-19 Pedro Alves <palves@redhat.com>
6035
6036 * linux-low.c (select_event_lwp_callback): Update comments to
6037 no longer mention SIGTRAP.
6038
6039 2015-03-18 Gary Benson <gbenson@redhat.com>
6040
6041 * server.c (handle_query): Do not report vFile:fstat as supported.
6042
6043 2015-03-11 Gary Benson <gbenson@redhat.com>
6044
6045 * hostio.c (sys/types.h): New include.
6046 (sys/stat.h): Likewise.
6047 (common-remote-fileio.h): Likewise.
6048 (handle_fstat): New function.
6049 (handle_vFile): Handle vFile:fstat packets.
6050
6051 2015-03-11 Gary Benson <gbenson@redhat.com>
6052
6053 * configure.ac (AC_CHECK_MEMBERS): Add checks for
6054 struct stat.st_blocks and struct stat.st_blksize.
6055 * configure: Regenerate.
6056 * config.in: Likewise.
6057 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
6058 (OBS): Add common-remote-fileio.o.
6059 (common-remote-fileio.o): New rule.
6060
6061 2015-03-09 Pedro Alves <palves@redhat.com>
6062
6063 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
6064 'struct sockaddr' pointer in 'accept' call.
6065
6066 2015-03-09 Pedro Alves <palves@redhat.com>
6067
6068 Revert:
6069 2015-03-07 Pedro Alves <palves@redhat.com>
6070 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
6071 or <winsock2.h> here. Instead include "gdb_socket.h".
6072 (remote_open): Use union gdb_sockaddr_u.
6073 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
6074 or <winsock2.h> here. Instead include "gdb_socket.h".
6075 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
6076 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
6077 or <sys/un.h>.
6078 (init_named_socket, gdb_agent_helper_thread): Use union
6079 gdb_sockaddr_u.
6080
6081 2015-03-07 Pedro Alves <palves@redhat.com>
6082
6083 * configure.ac (build_warnings): Move
6084 -Wdeclaration-after-statement to the C-specific set.
6085 * configure: Regenerate.
6086
6087 2015-03-07 Pedro Alves <palves@redhat.com>
6088
6089 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
6090 or <winsock2.h> here. Instead include "gdb_socket.h".
6091 (remote_open): Use union gdb_sockaddr_u.
6092 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
6093 or <winsock2.h> here. Instead include "gdb_socket.h".
6094 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
6095 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
6096 or <sys/un.h>.
6097 (init_named_socket, gdb_agent_helper_thread): Use union
6098 gdb_sockaddr_u.
6099
6100 2015-03-07 Pedro Alves <palves@redhat.com>
6101
6102 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
6103 instead.
6104
6105 2015-03-06 Yao Qi <yao.qi@linaro.org>
6106
6107 * linux-aarch64-low.c (aarch64_insert_point): Use
6108 show_debug_regs as a boolean.
6109 (aarch64_remove_point): Likewise.
6110
6111 2015-03-05 Pedro Alves <palves@redhat.com>
6112
6113 * lynx-low.c (lynx_target_ops): Install NULL hooks for
6114 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
6115 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
6116 * nto-low.c (nto_target_ops): Likewise.
6117 * spu-low.c (spu_target_ops): Likewise.
6118 * win32-low.c (win32_target_ops): Likewise.
6119
6120 2015-03-04 Pedro Alves <palves@redhat.com>
6121
6122 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
6123 Decide whether a breakpoint triggered based on the SIGTRAP's
6124 siginfo.si_code.
6125 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
6126 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
6127 (linux_low_filter_event): Check for breakpoints before checking
6128 watchpoints.
6129 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
6130 siginfo.si_code.
6131 (linux_stopped_by_sw_breakpoint)
6132 (linux_supports_stopped_by_sw_breakpoint)
6133 (linux_stopped_by_hw_breakpoint)
6134 (linux_supports_stopped_by_hw_breakpoint): New functions.
6135 (linux_target_ops): Install new target methods.
6136
6137 2015-03-04 Pedro Alves <palves@redhat.com>
6138
6139 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
6140 * server.c (swbreak_feature, hwbreak_feature): New globals.
6141 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
6142 (captured_main): Clear swbreak_feature and hwbreak_feature.
6143 * server.h (swbreak_feature, hwbreak_feature): Declare.
6144 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
6145 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
6146 supports_stopped_by_hw_breakpoint>: New fields.
6147 (target_supports_stopped_by_sw_breakpoint)
6148 (target_stopped_by_sw_breakpoint)
6149 (target_supports_stopped_by_hw_breakpoint)
6150 (target_stopped_by_hw_breakpoint): Declare.
6151
6152 2015-03-04 Pedro Alves <palves@redhat.com>
6153
6154 enum lwp_stop_reason -> enum target_stop_reason
6155 * linux-low.c (check_stopped_by_breakpoint): Adjust.
6156 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
6157 (linux_wait_1, stuck_in_jump_pad_callback)
6158 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
6159 (linux_stopped_by_watchpoint):
6160 * linux-low.h (enum lwp_stop_reason): Delete.
6161 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
6162 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
6163
6164 2015-03-04 Yao Qi <yao.qi@linaro.org>
6165
6166 * Makefile.in (SFILES): Add linux-aarch64-low.c.
6167
6168 2015-03-03 Gary Benson <gbenson@redhat.com>
6169
6170 * hostio.c (handle_vFile): Fix prefix lengths.
6171
6172 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
6173
6174 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
6175 ptr_bits.
6176
6177 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
6178
6179 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
6180 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
6181 (clean): Add "rm -f" for above C files.
6182 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
6183 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
6184 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
6185 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
6186 * linux-s390-low.c (HWCAP_S390_VX): New macro.
6187 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
6188 (init_registers_s390x_vx_linux64)
6189 (init_registers_s390x_tevx_linux64)
6190 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
6191 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
6192 declarations.
6193 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
6194 (s390_store_vxrs_high): New functions.
6195 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
6196 NT_S390_VXRS_HIGH.
6197 (s390_arch_setup): Add logic for selecting one of the new target
6198 descriptions. Activate the new vector regsets if applicable.
6199 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
6200 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
6201 and init_registers_s390x_tevx_linux64.
6202
6203 2015-03-01 Pedro Alves <palves@redhat.com>
6204
6205 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
6206 parameter.
6207
6208 2015-02-27 Pedro Alves <palves@redhat.com>
6209
6210 * linux-x86-low.c (u_debugreg_offset): New function.
6211 (x86_linux_dr_get, x86_linux_dr_set): Use it.
6212
6213 2015-02-27 Pedro Alves <palves@redhat.com>
6214
6215 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
6216 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
6217 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
6218 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
6219 (ps_lsetfpregs, ps_getpid)
6220 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
6221 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
6222 (ps_lsetxregs, ps_plog): Declare.
6223
6224 2015-02-27 Pedro Alves <palves@redhat.com>
6225
6226 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
6227 IP_AGENT_EXPORT_FUNC.
6228 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
6229 IP_AGENT_EXPORT_FUNC.
6230 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
6231 (IP_AGENT_EXPORT): Delete.
6232 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
6233 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
6234 (gdb_trampoline_buffer_error, collecting, gdb_collect)
6235 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
6236 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
6237 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
6238 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
6239 (traceframe_read_count, traceframe_write_count)
6240 (traceframes_created, trace_state_variables, get_raw_reg)
6241 (get_trace_state_variable_value, set_trace_state_variable_value)
6242 (ust_loaded, helper_thread_id, cmd_buf): Use
6243 IPA_SYM_EXPORTED_NAME.
6244 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
6245 (tracepoints) Use IP_AGENT_EXPORT_VAR.
6246 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
6247 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
6248 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
6249 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
6250 EXTERN_C_PUSH/EXTERN_C_POP.
6251 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
6252 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
6253 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
6254 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
6255 (traceframe_write_count, traceframe_read_count)
6256 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
6257 (about_to_request_buffer_space, get_trace_state_variable_value)
6258 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
6259 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
6260 EXTERN_C_PUSH/EXTERN_C_POP.
6261 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
6262 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
6263 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
6264 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
6265 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
6266 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
6267 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
6268 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
6269 Define.
6270 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
6271 (IP_AGENT_EXPORT_VAR_DECL): Define.
6272 (tracing): Declare.
6273 (gdb_agent_get_raw_reg): Declare.
6274
6275 2015-02-27 Tom Tromey <tromey@redhat.com>
6276 Pedro Alves <palves@redhat.com>
6277
6278 Rename symbols whose names are reserved C++ keywords throughout.
6279
6280 2015-02-27 Pedro Alves <palves@redhat.com>
6281
6282 * Makefile.in (COMPILER): New, get it from autoconf.
6283 (CXX): Get from autoconf instead.
6284 (COMPILE.pre): Use COMPILER.
6285 (CC-LD): Rename to ...
6286 (CC_LD): ... this. Use COMPILER.
6287 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
6288 (CXX_FOR_TARGET): Default to g++ instead of gcc.
6289 * acinclude.m4: Include build-with-cxx.m4.
6290 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
6291 Disable -Werror by default if building in C++ mode.
6292 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
6293 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
6294 the C++ compiler. Save/restore CXXFLAGS too.
6295 * configure: Regenerate.
6296
6297 2015-02-27 Pedro Alves <palves@redhat.com>
6298
6299 * acinclude.m4: Include libiberty.m4.
6300 * configure.ac: Call libiberty_INIT.
6301 * config.in, configure: Regenerate.
6302
6303 2015-02-26 Pedro Alves <palves@redhat.com>
6304
6305 * linux-low.c (linux_wait_1): When incrementing the PC past a
6306 program breakpoint always use the_low_target.breakpoint_len as
6307 increment, rather than the maximum between that and
6308 the_low_target.decr_pc_after_break.
6309
6310 2015-02-23 Pedro Alves <palves@redhat.com>
6311
6312 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
6313 thread was doing a step-over; always adjust the PC if
6314 we stepped over a permanent breakpoint.
6315 (linux_wait_1): If we stepped over breakpoint that was on top of a
6316 permanent breakpoint, manually advance the PC past it.
6317
6318 2015-02-23 Pedro Alves <palves@redhat.com>
6319
6320 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
6321 modes.
6322 (x86_fill_gregset, x86_store_gregset): Use it when handling
6323 $orig_eax.
6324
6325 2015-02-20 Pedro Alves <palves@redhat.com>
6326
6327 * thread-db.c: Include "nat/linux-procfs.h".
6328 (thread_db_init): Skip listing new threads if the kernel supports
6329 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
6330
6331 2015-02-20 Pedro Alves <palves@redhat.com>
6332
6333 * linux-low.c (status_pending_p_callback): Use ptid_match.
6334
6335 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
6336
6337 PR breakpoints/16812
6338 * linux-low.c (wstatus_maybe_breakpoint): Remove.
6339 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
6340 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
6341
6342 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
6343
6344 PR breakpoints/15956
6345 * tracepoint.c (cmd_qtinit): Add check for current_thread.
6346
6347 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6348
6349 * linux-low.c (linux_low_btrace_conf): Print size.
6350 * server.c (handle_btrace_conf_general_set): New.
6351 (hanle_general_set): Call handle_btrace_conf_general_set.
6352 (handle_query): Report Qbtrace-conf:bts:size as supported.
6353
6354 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6355
6356 * linux-low.c (linux_low_enable_btrace): Update parameters.
6357 (linux_low_btrace_conf): New.
6358 (linux_target_ops)<to_btrace_conf>: Initialize.
6359 * server.c (current_btrace_conf): New.
6360 (handle_btrace_enable): Rename to ...
6361 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
6362 to target_enable_btrace. Update comment. Update users.
6363 (handle_qxfer_btrace_conf): New.
6364 (qxfer_packets): Add btrace-conf entry.
6365 (handle_query): Report qXfer:btrace-conf:read as supported packet.
6366 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
6367 (target_ops)<read_btrace_conf>: New.
6368 (target_enable_btrace): Update parameters.
6369 (target_read_btrace_conf): New.
6370
6371 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6372
6373 * server.c (handle_btrace_general_set): Remove call to
6374 target_supports_btrace.
6375 (supported_btrace_packets): New.
6376 (handle_query): Call supported_btrace_packets.
6377 * target.h: include btrace-common.h.
6378 (btrace_target_info): Removed.
6379 (supports_btrace, target_supports_btrace): Update parameters.
6380
6381 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6382
6383 * Makefile.in (SFILES): Add common/btrace-common.c.
6384 (OBS): Add common/btrace-common.o.
6385 (btrace-common.o): Add build rules.
6386 * linux-low: Include btrace-common.h.
6387 (linux_low_read_btrace): Use struct btrace_data. Call
6388 btrace_data_init and btrace_data_fini.
6389
6390 2015-02-06 Pedro Alves <palves@redhat.com>
6391
6392 * thread-db.c (find_new_threads_callback): Add debug output.
6393
6394 2015-02-04 Pedro Alves <palves@redhat.com>
6395
6396 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
6397 (resume_stopped_resumed_lwps): New function.
6398 (linux_wait_for_event_filtered): Use it.
6399
6400 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
6401
6402 * Makefile.in (SFILES): Add linux-personality.c.
6403 (linux-personality.o): New rule.
6404 * configure.srv (srv_linux_obj): Add linux-personality.o to the
6405 list of objects to be built.
6406 * linux-low.c: Include nat/linux-personality.h.
6407 (linux_create_inferior): Remove code to disable address space
6408 randomization (moved to ../nat/linux-personality.c). Create
6409 cleanup to disable address space randomization.
6410
6411 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
6412
6413 * Makefile.in (posix-strerror.o): New rule.
6414 (mingw-strerror.o): Likewise.
6415 * configure: Regenerated.
6416 * configure.ac: Source file ../common/common.host. Initialize new
6417 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
6418
6419 2015-01-14 Yao Qi <yao@codesourcery.com>
6420
6421 * Makefile.in (SFILES): Add nat/ppc-linux.c.
6422 (ppc-linux.o): New rule.
6423 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
6424 * configure.ac: AC_CHECK_FUNCS(getauxval).
6425 * config.in: Re-generated.
6426 * configure: Re-generated.
6427 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
6428 ppc64_64bit_inferior_p
6429
6430 2015-01-14 Yao Qi <yao@codesourcery.com>
6431
6432 * linux-ppc-low.c: Include "nat/ppc-linux.h".
6433 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
6434 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
6435 (PT_ORIG_R3, PT_TRAP): Likewise.
6436 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
6437 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
6438 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
6439
6440 2015-01-10 Joel Brobecker <brobecker@adacore.com>
6441
6442 * i387-fp.c (i387_cache_to_xsave): In look over
6443 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
6444 zmmh_low_space field by use of zmmh_high_space.
6445
6446 2015-01-09 Pedro Alves <palves@redhat.com>
6447
6448 * linux-low.c (step_over_bkpt): Move higher up in the file.
6449 (handle_extended_wait): Don't store the stop_pc here.
6450 (get_stop_pc): Adjust comments and rename to ...
6451 (check_stopped_by_breakpoint): ... this. Record whether the LWP
6452 stopped for a software breakpoint or hardware breakpoint.
6453 (thread_still_has_status_pending_p): New function.
6454 (status_pending_p_callback): Use
6455 thread_still_has_status_pending_p. If the event is no longer
6456 interesting, resume the LWP.
6457 (handle_tracepoints): Add assert.
6458 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
6459 (wstatus_maybe_breakpoint): New function.
6460 (cancel_breakpoint): Delete function.
6461 (check_stopped_by_watchpoint): New function, factored out from
6462 linux_low_filter_event.
6463 (lp_status_maybe_breakpoint): Delete function.
6464 (linux_low_filter_event): Remove filter_ptid argument.
6465 Leave thread group exits pending here. Store the LWP's stop PC.
6466 Always leave events pending.
6467 (linux_wait_for_event_filtered): Pull all events out of the
6468 kernel, and leave them all pending.
6469 (count_events_callback, select_event_lwp_callback): Consider all
6470 events.
6471 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
6472 (select_event_lwp): Only give preference to the stepping LWP in
6473 all-stop mode. Adjust comments.
6474 (ignore_event): New function.
6475 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
6476 references to cancel_breakpoints. Adjust to renames. Also give
6477 equal priority to all LWPs that have had events in non-stop mode.
6478 If reporting a software breakpoint event, unadjust the LWP's PC.
6479 (linux_wait): If linux_wait_1 returned an ignored event, retry.
6480 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
6481 Adjust.
6482 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
6483 (resume_status_pending_p): Use thread_still_has_status_pending_p.
6484 (linux_stopped_by_watchpoint): Adjust.
6485 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
6486 * linux-low.h (enum lwp_stop_reason): New.
6487 (struct lwp_info) <stop_pc>: Adjust comment.
6488 <stopped_by_watchpoint>: Delete field.
6489 <stop_reason>: New field.
6490 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
6491 * mem-break.c (software_breakpoint_inserted_here)
6492 (hardware_breakpoint_inserted_here): New function.
6493 * mem-break.h (software_breakpoint_inserted_here)
6494 (hardware_breakpoint_inserted_here): Declare.
6495 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
6496 (cancel_breakpoints): Delete.
6497 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
6498 (upload_fast_traceframes): Remove references to
6499 cancel_breakpoints.
6500
6501 2015-01-09 Pedro Alves <palves@redhat.com>
6502
6503 * thread-db.c (find_new_threads_callback): Ignore thread if the
6504 kernel thread ID is -1.
6505
6506 2015-01-09 Pedro Alves <palves@redhat.com>
6507
6508 * linux-low.c (linux_attach_fail_reason_string): Move to
6509 nat/linux-ptrace.c, and rename.
6510 (linux_attach_lwp): Update comment.
6511 (attach_proc_task_lwp_callback): New function.
6512 (linux_attach): Adjust to rename and use
6513 linux_proc_attach_tgid_threads.
6514 (linux_attach_fail_reason_string): Delete declaration.
6515
6516 2015-01-01 Joel Brobecker <brobecker@adacore.com>
6517
6518 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
6519 * server.c (gdbserver_version): Likewise.
6520
6521 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
6522
6523 * remote-utils.c: Include ctype.h.
6524 (input_interrupt): Explicitly handle the case when the char
6525 received is the NUL byte. Improve the printing of non-ASCII
6526 characters.
6527
6528 2014-12-16 Joel Brobecker <brobecker@adacore.com>
6529
6530 * linux-low.c (linux_low_filter_event): Update call to
6531 linux_enable_event_reporting following the addition of
6532 a new parameter to that function.
6533
6534 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
6535
6536 PR server/17457
6537 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
6538 (AARCH64_FPCR_REGNO): Likewise.
6539 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
6540 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
6541 (aarch64_store_fpregset): Likewise.
6542
6543 2014-12-15 Joel Brobecker <brobecker@adacore.com>
6544
6545 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
6546 Remove FIXME comment about assumption about N.
6547
6548 2014-12-13 Joel Brobecker <brobecker@adacore.com>
6549
6550 * configure.ac: If large-file support is disabled in GDBserver,
6551 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
6552 * configure: Regenerate.
6553
6554 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6555
6556 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
6557 warning upon ENODATA from ptrace.
6558 * linux-s390-low.c (s390_store_tdb): New.
6559 (s390_regsets): Add regset for NT_S390_TDB.
6560
6561 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6562
6563 * linux-low.c (regsets_store_inferior_registers): Skip regsets
6564 without a fill_function.
6565 * linux-s390-low.c (s390_fill_last_break): Remove.
6566 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
6567 (s390_arch_setup): Use regset's size instead of fill_function for
6568 loop end condition.
6569
6570 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6571
6572 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
6573 the regset's store function when ptrace returned an error.
6574 * regcache.c (get_thread_regcache): Invalidate register cache
6575 before fetching inferior's registers.
6576
6577 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6578
6579 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
6580 while-loop as for-loop.
6581 (regsets_store_inferior_registers): Likewise.
6582
6583 2014-11-28 Yao Qi <yao@codesourcery.com>
6584
6585 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
6586 * config.in, configure: Re-generate.
6587 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
6588 is defined.
6589
6590 2014-11-21 Yao Qi <yao@codesourcery.com>
6591
6592 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
6593 (AC_CHECK_HEADERS): Remove malloc.h.
6594 * configure: Re-generated.
6595 * config.in: Re-generated.
6596 * server.h: Don't include alloca.h and malloc.h.
6597 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
6598 Don't include malloc.h.
6599
6600 2014-11-17 Joel Brobecker <brobecker@adacore.com>
6601
6602 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
6603 corresponding ERRNO check in same block.
6604
6605 2014-11-12 Pedro Alves <palves@redhat.com>
6606
6607 * server.c (cont_thread): Update comment.
6608 (start_inferior, attach_inferior): No longer clear cont_thread.
6609 (handle_v_cont): No longer set cont_thread.
6610 (captured_main): Clear cont_thread each time a GDB connects.
6611
6612 2014-11-12 Pedro Alves <palves@redhat.com>
6613
6614 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
6615 thread, and don't resume all threads if the Hc thread has exited.
6616
6617 2014-11-12 Pedro Alves <palves@redhat.com>
6618
6619 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
6620 the process group instead of to a specific LWP.
6621
6622 2014-10-15 Pedro Alves <palves@redhat.com>
6623
6624 PR server/17487
6625 * win32-arm-low.c (arm_set_thread_context): Remove current_event
6626 parameter.
6627 (arm_set_thread_context): Delete.
6628 (the_low_target): Adjust.
6629 * win32-i386-low.c (debug_registers_changed)
6630 (debug_registers_used): Delete.
6631 (update_debug_registers_callback): New function.
6632 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
6633 needing to update their debug registers.
6634 (win32_get_current_dr): New function.
6635 (x86_dr_low_get_addr, x86_dr_low_get_control)
6636 (x86_dr_low_get_status): Fetch the debug register from the thread
6637 record's context.
6638 (i386_initial_stuff): Adjust.
6639 (i386_get_thread_context): Remove current_event parameter. Don't
6640 clear debug_registers_changed nor copy DR values to
6641 debug_reg_state.
6642 (i386_set_thread_context): Delete.
6643 (i386_prepare_to_resume): New function.
6644 (i386_thread_added): Mark the thread as needing to update irs
6645 debug registers.
6646 (the_low_target): Remove i386_set_thread_context and install
6647 i386_prepare_to_resume.
6648 * win32-low.c (win32_get_thread_context): Adjust.
6649 (win32_set_thread_context): Use SetThreadContext
6650 directly.
6651 (win32_prepare_to_resume): New function.
6652 (win32_require_context): New function, factored out from ...
6653 (thread_rec): ... this.
6654 (continue_one_thread): Call win32_prepare_to_resume on each thread
6655 we're about to continue.
6656 (win32_resume): Call win32_prepare_to_resume on the event thread.
6657 * win32-low.h (struct win32_thread_info)
6658 <debug_registers_changed>: New field.
6659 (struct win32_target_ops): Change prototype of set_thread_context,
6660 delete set_thread_context and add prepare_to_resume.
6661 (win32_require_context): New declaration.
6662
6663 2014-10-08 Gary Benson <gbenson@redhat.com>
6664
6665 * server.h: Do not include common-exceptions.h.
6666
6667 2014-10-08 Gary Benson <gbenson@redhat.com>
6668
6669 * server.h: Do not include cleanups.h.
6670
6671 2014-09-30 James Hogan <james.hogan@imgtec.com>
6672
6673 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
6674 mips64-dsp-linux.c.
6675
6676 2014-09-23 Yao Qi <yao@codesourcery.com>
6677
6678 * linux-low.c (lp_status_maybe_breakpoint): New function.
6679 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
6680 (count_events_callback): Likewise.
6681 (select_event_lwp_callback): Likewise.
6682 (cancel_breakpoints_callback): Likewise.
6683
6684 2014-09-19 Don Breazeal <donb@codesourcery.com>
6685
6686 * linux-low.c (handle_extended_wait): Call
6687 linux_ptrace_get_extended_event.
6688 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
6689 linux_is_extended_waitstatus.
6690
6691 2014-09-16 Joel Brobecker <brobecker@adacore.com>
6692
6693 * Makefile.in (CPPFLAGS): Define.
6694 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
6695 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
6696
6697 2014-09-16 Gary Benson <gbenson@redhat.com>
6698
6699 * inferiors.h (current_inferior): Renamed as...
6700 (current_thread): New variable. All uses updated.
6701 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
6702 (maybe_move_out_of_jump_pad): Likewise.
6703 (cancel_breakpoint): Likewise.
6704 (linux_low_filter_event): Likewise.
6705 (wait_for_sigstop): Likewise.
6706 (linux_resume_one_lwp): Likewise.
6707 (need_step_over_p): Likewise.
6708 (start_step_over): Likewise.
6709 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
6710 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
6711 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
6712 and save_inferior as saved_thread.
6713 * regcache.c (get_thread_regcache): Renamed saved_inferior as
6714 saved_thread.
6715 (regcache_invalidate_thread): Likewise.
6716 * remote-utils.c (prepare_resume_reply): Likewise.
6717 * thread-db.c (thread_db_get_tls_address): Likewise.
6718 (disable_thread_event_reporting): Likewise.
6719 (remove_thread_event_breakpoints): Likewise.
6720 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
6721 as saved_thread.
6722 * target.h (set_desired_inferior): Renamed as...
6723 (set_desired_thread): New declaration. All uses updated.
6724 * server.c (myresume): Updated comment to reference thread instead
6725 of inferior.
6726 (handle_serial_event): Likewise.
6727 (handle_target_event): Likewise.
6728
6729 2014-09-12 Tom Tromey <tromey@redhat.com>
6730 Gary Benson <gbenson@redhat.com>
6731
6732 * regcache.h: Include common-regcache.h.
6733 (regcache_read_pc): Don't declare.
6734 * regcache.c (get_thread_regcache_for_ptid): New function.
6735
6736 2014-09-11 Tom Tromey <tromey@redhat.com>
6737 Gary Benson <gbenson@redhat.com>
6738
6739 * symbol.c: New file.
6740 * Makefile.in (SFILES): Add symbol.c.
6741 (OBS): Add symbol.o.
6742
6743 2014-09-11 Gary Benson <gbenson@redhat.com>
6744
6745 * target.c (target_stop_ptid, target_continue_ptid): New
6746 functions.
6747
6748 2014-09-11 Tom Tromey <tromey@redhat.com>
6749 Gary Benson <gbenson@redhat.com>
6750
6751 * target.h: Include target/target.h.
6752 * target.c (target_read_memory, target_read_uint32)
6753 (target_write_memory): New functions.
6754
6755 2014-09-11 Gary Benson <gbenson@redhat.com>
6756
6757 * server.h (debug_hw_points): Don't declare.
6758 * server.c (debug_hw_points): Don't define. Replace all uses
6759 with show_debug_regs.
6760 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
6761 all uses with show_debug_regs.
6762
6763 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
6764
6765 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
6766 endianness into account.
6767 (ppc_supply_ptrace_register): Likewise.
6768
6769 2014-09-03 James Hogan <james.hogan@imgtec.com>
6770
6771 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
6772 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
6773
6774 2014-09-03 Gary Benson <gbenson@redhat.com>
6775
6776 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
6777 ALL_DEBUG_ADDRESS_REGISTERS.
6778
6779 2014-09-02 Gary Benson <gbenson@redhat.com>
6780
6781 * i386-low.h: Renamed as...
6782 * x86-low.h: New file. All type, function and variable name
6783 prefixes changed from "i386_" to "x86_". All references updated.
6784 * i386-low.c: Renamed as...
6785 * x86-low.c: New file. All type, function and variable name
6786 prefixes changed from "i386_" to "x86_". All references updated.
6787
6788 2014-09-02 Gary Benson <gbenson@redhat.com>
6789
6790 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
6791 (x86_linux_new_thread): Likewise.
6792
6793 2014-08-29 Gary Benson <gbenson@redhat.com>
6794
6795 * server.h (setjmp.h): Do not include.
6796 (toplevel): Do not declare.
6797 (common-exceptions.h): Include.
6798 (cleanups.h): Likewise.
6799 * server.c (toplevel): Do not define.
6800 (exit_code): New static global.
6801 (detach_or_kill_for_exit_cleanup): New function.
6802 (main): New function. Original main renamed to...
6803 (captured_main): New function.
6804 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
6805
6806 2014-08-29 Gary Benson <gbenson@redhat.com>
6807
6808 * Makefile.in (SFILES): Add common/common-exceptions.c.
6809 (OBS): Add common-exceptions.o.
6810 (common-exceptions.o): New rule.
6811 * utils.c (prepare_to_throw_exception): New function.
6812
6813 2014-08-29 Gary Benson <gbenson@redhat.com>
6814
6815 * config.in: Regenerate.
6816 * configure: Likewise.
6817
6818 2014-08-29 Gary Benson <gbenson@redhat.com>
6819
6820 * Makefile.in (SFILES): Add common/cleanups.c.
6821 (OBS): cleanups.o.
6822 (cleanups.o): New rule.
6823
6824 2014-08-29 Gary Benson <gbenson@redhat.com>
6825
6826 * utils.c (internal_vwarning): New function.
6827
6828 2014-08-28 Gary Benson <gbenson@redhat.com>
6829
6830 * utils.h (fatal): Remove declaration.
6831 * utils.c (fatal): Remove function.
6832
6833 2014-08-28 Gary Benson <gbenson@redhat.com>
6834
6835 * tracepoint.c (gdb_agent_init): Replace fatal with
6836 perror_with_name.
6837 (initialize_tracepoint): Likewise.
6838
6839 2014-08-28 Gary Benson <gbenson@redhat.com>
6840
6841 * remote-utils.c (remote_prepare): Replace fatal with error.
6842
6843 2014-08-28 Gary Benson <gbenson@redhat.com>
6844
6845 * linux-low.c (linux_async): Replace fatal with warning.
6846 Tidy up and return.
6847 (linux_start_non_stop): Return -1 if linux_async failed.
6848
6849 2014-08-28 Gary Benson <gbenson@redhat.com>
6850
6851 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
6852 gdb_assert.
6853 (i386_dr_low_get_addr): Remove vague comment.
6854 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
6855 gdb_assert.
6856
6857 2014-08-28 Gary Benson <gbenson@redhat.com>
6858
6859 * inferiors.c (get_thread_process): Replace check with gdb_assert.
6860 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
6861 internal_error.
6862 (linux_resume_one_lwp): Likewise.
6863 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
6864 gdb_assert.
6865 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
6866 with internal_error.
6867 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
6868 (init_register_cache): Replace fatal with gdb_assert_not_reached.
6869 (find_register_by_name): Replace fatal with internal_error.
6870 (find_regno): Likewise.
6871 * tdesc.c (init_target_desc): Replace check with gdb_assert.
6872 * thread-db.c (thread_db_create_event): Likewise.
6873 (thread_db_load_search): Likewise.
6874 (try_thread_db_load_1): Likewise.
6875 * tracepoint.c (get_jump_space_head): Replace fatal with
6876 internal_error.
6877 (claim_trampoline_space): Likewise.
6878 (have_fast_tracepoint_trampoline_buffer): Likewise.
6879 (cmd_qtstart): Likewise.
6880 (stop_tracing): Likewise.
6881 (fast_tracepoint_collecting): Likewise.
6882 (target_malloc): Likewise.
6883 (download_tracepoint): Likewise.
6884 (download_trace_state_variables): Replace check with gdb_assert.
6885 (upload_fast_traceframes): Replace fatal with internal_error.
6886
6887 2014-08-19 Tom Tromey <tromey@redhat.com>
6888 Gary Benson <gbenson@redhat.com>
6889
6890 * Makefile.in (SFILES): Add common/common-debug.c.
6891 (OBS): Add common-debug.o.
6892 (common-debug.o): New rule.
6893 * debug.h (debug_printf): Don't declare.
6894 * debug.c (debug_printf): Renamed and rewritten as...
6895 (debug_vprintf): New function.
6896
6897 2014-08-19 Gary Benson <gbenson@redhat.com>
6898
6899 * utils.h: Do not include print-utils.h.
6900
6901 2014-08-19 Tom Tromey <tromey@redhat.com>
6902 Gary Benson <gbenson@redhat.com>
6903
6904 * server.h: Add static assertion.
6905 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
6906
6907 2014-08-19 Tom Tromey <tromey@redhat.com>
6908 Gary Benson <gbenson@redhat.com>
6909
6910 * Makefile.in (SFILES): Add common/errors.c.
6911 (OBS): Add errors.o.
6912 (IPA_OBS): Add errors-ipa.o.
6913 (errors.o): New rule.
6914 (errors-ipa.o): Likewise.
6915 * utils.h (perror_with_name, error, warning): Don't declare.
6916 * utils.c (warning): Renamed and rewritten as...
6917 (vwarning): New function.
6918 (error): Renamed and rewritten as...
6919 (verror): New function.
6920 (internal_error): Renamed and rewritten as...
6921 (internal_verror): New function.
6922
6923 2014-08-07 Gary Benson <gbenson@redhat.com>
6924
6925 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
6926 * configure: Regenerate.
6927 * config.in: Likewise.
6928 * server.h: Do not include errno.h.
6929 * event-loop.c: Likewise.
6930 * hostio-errno.c: Likewise.
6931 * linux-low.c: Likewise.
6932 * remote-utils.c: Likewise.
6933 * spu-low.c: Likewise.
6934 * utils.c: Likewise.
6935 * gdbreplay.c: Unconditionally include errno.h.
6936
6937 2014-08-07 Gary Benson <gbenson@redhat.com>
6938
6939 * server.h: Do not include string.h.
6940 * event-loop.c: Likewise.
6941 * linux-low.c: Likewise.
6942 * regcache.c: Likewise.
6943 * remote-utils.c: Likewise.
6944 * spu-low.c: Likewise.
6945 * utils.c: Likewise.
6946
6947 2014-08-07 Gary Benson <gbenson@redhat.com>
6948
6949 * server.h: Do not include gdb_assert.h.
6950
6951 2014-08-07 Gary Benson <gbenson@redhat.com>
6952
6953 * server.h: Do not include common-utils.h.
6954
6955 2014-08-07 Gary Benson <gbenson@redhat.com>
6956
6957 * server.h: Do not include ptid.h.
6958 * notif.h: Likewise.
6959
6960 2014-08-07 Gary Benson <gbenson@redhat.com>
6961
6962 * server.h: Do not include gdb_locale.h.
6963
6964 2014-08-07 Gary Benson <gbenson@redhat.com>
6965
6966 * server.h: Do not include gdb/signals.h.
6967 * win32-low.c: Likewise.
6968
6969 2014-08-07 Gary Benson <gbenson@redhat.com>
6970
6971 * server.h: Do not include pathmax.h.
6972
6973 2014-08-07 Gary Benson <gbenson@redhat.com>
6974
6975 * server.h: Do not include libiberty.h.
6976 * linux-bfin-low.c: Likewise.
6977
6978 2014-08-07 Gary Benson <gbenson@redhat.com>
6979
6980 * server.h: Do not include ansidecl.h.
6981
6982 2014-08-07 Gary Benson <gbenson@redhat.com>
6983
6984 * linux-x86-low.c: Do not include stddef.h.
6985 * lynx-ppc-low.c: Likewise.
6986 * tracepoint.c: Likewise.
6987
6988 2014-08-07 Gary Benson <gbenson@redhat.com>
6989
6990 * server.h: Do not include stdarg.h.
6991 * nto-low.c: Likewise.
6992
6993 2014-08-07 Gary Benson <gbenson@redhat.com>
6994
6995 * server.h: Do not include stdlib.h.
6996 * inferiors.c: Likewise.
6997 * linux-low.c: Likewise.
6998 * regcache.c: Likewise.
6999 * spu-low.c: Likewise.
7000 * tracepoint.c: Likewise.
7001 * utils.c: Likewise.
7002
7003 2014-08-07 Gary Benson <gbenson@redhat.com>
7004
7005 * server.h: Do not include stdio.h.
7006 * linux-low.c: Likewise.
7007 * remote-utils.c: Likewise.
7008 * spu-low.c: Likewise.
7009 * utils.c: Likewise.
7010 * wincecompat.c: Likewise.
7011
7012 2014-08-06 Gary Benson <gbenson@redhat.com>
7013
7014 * regcache.c (init_register_cache): Move conditionals inside if.
7015
7016 2014-08-06 Gary Benson <gbenson@redhat.com>
7017
7018 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
7019
7020 2014-07-31 Gary Benson <gbenson@redhat.com>
7021
7022 * ax.h: Do not include server.h.
7023 * gdbthread.h: Likewise.
7024 * lynx-low.h: Likewise.
7025 * notif.h: Likewise.
7026
7027 2014-07-30 Gary Benson <gbenson@redhat.com>
7028
7029 * server.h: Include common-defs.h.
7030 Do not include config.h or build-gnulib-gdbserver/config.h.
7031
7032 2014-07-30 Gary Benson <gbenson@redhat.com>
7033
7034 * hostio-errno.c: Move server.h to top of includes list.
7035 * inferiors.c: Likewise.
7036 * linux-x86-low.c: Likewise.
7037 * notif.c: Include server.h.
7038
7039 2014-07-24 Tom Tromey <tromey@redhat.com>
7040 Gary Benson <gbenson@redhat.com>
7041
7042 * server.h (CORE_ADDR): Now unsigned.
7043
7044 2014-07-16 Pedro Alves <palves@redhat.com>
7045
7046 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
7047
7048 2014-07-15 Pedro Alves <palves@redhat.com>
7049
7050 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
7051 copy.
7052
7053 2014-07-11 Pedro Alves <palves@redhat.com>
7054
7055 * linux-low.c (kill_wait_lwp): New function, based on
7056 kill_one_lwp_callback, but use my_waitpid directly.
7057 (kill_one_lwp_callback, linux_kill): Use it.
7058
7059 2014-06-23 Pedro Alves <palves@redhat.com>
7060
7061 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
7062 before setting DR0..DR3.
7063
7064 2014-06-20 Gary Benson <gbenson@redhat.com>
7065
7066 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
7067 * configure: Regenerated.
7068 * config.in: Likewise.
7069
7070 2014-06-20 Gary Benson <gbenson@redhat.com>
7071
7072 * Makefile.in (SFILES): Update locations for files moved
7073 from common to nat.
7074 (object file files): Reordered.
7075
7076 2014-06-20 Gary Benson <gbenson@redhat.com>
7077
7078 * i386-low.h (i386_dr_low_can_set_addr): Removed.
7079 (i386_dr_low_set_addr): Likewise.
7080 (i386_dr_low_get_addr): Likewise.
7081 (i386_dr_low_can_set_control): Likewise.
7082 (i386_dr_low_set_control): Likewise.
7083 (i386_dr_low_get_control): Likewise.
7084 (i386_dr_low_get_status): Likewise.
7085 (i386_get_debug_register_length): Likewise.
7086 * linux-x86-low.c (i386_dr_low_set_addr):
7087 Changed signature. Made static.
7088 (i386_dr_low_get_addr): Likewise.
7089 (i386_dr_low_set_control): Likewise.
7090 (i386_dr_low_get_control): Likewise.
7091 (i386_dr_low_get_status): Likewise.
7092 (i386_dr_low): New global variable.
7093 * win32-i386-low.c (i386_dr_low_set_addr):
7094 Changed signature. Made static.
7095 (i386_dr_low_get_addr): Likewise.
7096 (i386_dr_low_set_control): Likewise.
7097 (i386_dr_low_get_control): Likewise.
7098 (i386_dr_low_get_status): Likewise.
7099 (i386_dr_low): New global variable.
7100
7101 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
7102
7103 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
7104 * Makefile.in (AR, AR_FLAGS): Define.
7105 * configure: Regenerate.
7106
7107 2014-06-19 Gary Benson <gbenson@redhat.com>
7108
7109 * Makefile.in (i386-dregs.o): New rule.
7110 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
7111 * i386-low.c (target.h): Remove include.
7112 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
7113 (DR_CONTROL_SHIFT): Likewise.
7114 (DR_CONTROL_SIZE): Likewise.
7115 (DR_RW_EXECUTE): Likewise.
7116 (DR_RW_WRITE): Likewise.
7117 (DR_RW_READ): Likewise.
7118 (DR_RW_IORW): Likewise.
7119 (DR_LEN_1): Likewise.
7120 (DR_LEN_2): Likewise.
7121 (DR_LEN_4): Likewise.
7122 (DR_LEN_8): Likewise.
7123 (DR_LOCAL_ENABLE_SHIFT): Likewise.
7124 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
7125 (DR_ENABLE_SIZE): Likewise.
7126 (DR_LOCAL_SLOWDOWN): Likewise.
7127 (DR_GLOBAL_SLOWDOWN): Likewise.
7128 (DR_CONTROL_RESERVED): Likewise.
7129 (I386_DR_CONTROL_MASK): Likewise.
7130 (I386_DR_VACANT): Likewise.
7131 (I386_DR_LOCAL_ENABLE): Likewise.
7132 (I386_DR_GLOBAL_ENABLE): Likewise.
7133 (I386_DR_DISABLE): Likewise.
7134 (I386_DR_SET_RW_LEN): Likewise.
7135 (I386_DR_GET_RW_LEN): Likewise.
7136 (I386_DR_WATCH_HIT): Likewise.
7137 (i386_wp_op_t): Likewise.
7138 (i386_show_dr): Likewise.
7139 (i386_length_and_rw_bits): Likewise.
7140 (i386_insert_aligned_watchpoint): Likewise.
7141 (i386_remove_aligned_watchpoint): Likewise.
7142 (i386_handle_nonaligned_watchpoint): Likewise.
7143 i386_update_inferior_debug_regs(): Likewise.
7144 (i386_dr_insert_watchpoint): Likewise.
7145 (i386_dr_remove_watchpoint): Likewise.
7146 (i386_dr_region_ok_for_watchpoint): Likewise.
7147 (i386_dr_stopped_data_address): Likewise.
7148 (i386_dr_stopped_by_watchpoint): Likewise.
7149
7150 2014-06-19 Gary Benson <gbenson@redhat.com>
7151
7152 * i386-low.c (i386_dr_show): Renamed to
7153 i386_show_dr and made static. All uses updated.
7154 (i386_dr_length_and_rw_bits): Renamed to
7155 i386_length_and_rw_bits and made static.
7156 All uses updated.
7157 (i386_dr_insert_aligned_watchpoint): Renamed to
7158 i386_insert_aligned_watchpoint and made static.
7159 All uses updated.
7160 (i386_dr_remove_aligned_watchpoint): Renamed to
7161 i386_remove_aligned_watchpoint and made static.
7162 All uses updated.
7163 (i386_dr_update_inferior_debug_regs): Renamed to
7164 i386_update_inferior_debug_regs and made static.
7165 All uses updated.
7166
7167 2014-06-18 Gary Benson <gbenson@redhat.com>
7168
7169 * i386-low.h (i386_dr_low_can_set_addr): New macro.
7170 (i386_dr_low_can_set_control): Likewise.
7171 (i386_get_debug_register_length): Likewise.
7172 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
7173 (i386_dr_low_can_set_control): Likewise.
7174 (i386_get_debug_register_length): Likewise.
7175
7176 2014-06-17 Gary Benson <gbenson@redhat.com>
7177
7178 * i386-low.h (i386-dregs.h): New include.
7179 (DR_FIRSTADDR): Now in i386-dregs.h.
7180 (DR_LASTADDR): Likewise.
7181 (DR_NADDR): Likewise.
7182 (DR_STATUS): Likewise.
7183 (DR_CONTROL): Likewise.
7184 (i386_debug_reg_state): Likewise.
7185 (i386_dr_insert_watchpoint): Likewise.
7186 (i386_dr_remove_watchpoint): Likewise.
7187 (i386_dr_region_ok_for_watchpoint): Likewise.
7188 (i386_dr_stopped_data_address): Likewise.
7189 (i386_dr_stopped_by_watchpoint): Likewise.
7190 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
7191
7192 2014-06-18 Gary Benson <gbenson@redhat.com>
7193
7194 * i386-low.h (i386_low_insert_watchpoint): Renamed to
7195 i386_dr_insert_watchpoint.
7196 (i386_low_remove_watchpoint): Renamed to
7197 i386_dr_remove_watchpoint.
7198 (i386_low_region_ok_for_watchpoint): Renamed to
7199 i386_dr_region_ok_for_watchpoint.
7200 (i386_low_stopped_data_address): Renamed to
7201 i386_dr_stopped_data_address.
7202 (i386_low_stopped_by_watchpoint): Renamed to
7203 i386_dr_stopped_by_watchpoint.
7204 * i386-low.c (i386_show_dr): Renamed to
7205 i386_dr_show and made nonstatic. All uses updated.
7206 (i386_length_and_rw_bits): Renamed to
7207 i386_dr_length_and_rw_bits and made nonstatic.
7208 All uses updated.
7209 (i386_insert_aligned_watchpoint): Renamed to
7210 i386_dr_insert_aligned_watchpoint and made nonstatic.
7211 All uses updated.
7212 (i386_remove_aligned_watchpoint): Renamed to
7213 i386_dr_remove_aligned_watchpoint and made nonstatic.
7214 All uses updated.
7215 (i386_update_inferior_debug_regs): Renamed to
7216 i386_dr_update_inferior_debug_regs and made nonstatic.
7217 All uses updated.
7218 (i386_low_insert_watchpoint): Renamed to
7219 i386_dr_insert_watchpoint. All uses updated.
7220 (i386_low_remove_watchpoint): Renamed to
7221 i386_dr_remove_watchpoint. All uses updated.
7222 (i386_low_region_ok_for_watchpoint): Renamed to
7223 i386_dr_region_ok_for_watchpoint. All uses updated.
7224 (i386_low_stopped_data_address): Renamed to
7225 i386_dr_stopped_data_address. All uses updated.
7226 (i386_low_stopped_by_watchpoint): Renamed to
7227 i386_dr_stopped_by_watchpoint. All uses updated.
7228
7229 2014-06-18 Gary Benson <gbenson@redhat.com>
7230
7231 * i386-low.c (i386_dr_low_can_set_addr): New macro.
7232 (i386_dr_low_can_set_control): Likewise.
7233 (i386_insert_aligned_watchpoint): New check.
7234
7235 2014-06-18 Gary Benson <gbenson@redhat.com>
7236
7237 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
7238 Renamed to state.
7239
7240 2014-06-18 Gary Benson <gbenson@redhat.com>
7241
7242 * i386-low.c (i386_length_and_rw_bits): Use internal_error
7243 instead of fatal and error.
7244 (i386_handle_nonaligned_watchpoint): Likewise.
7245
7246 2014-06-18 Gary Benson <gbenson@redhat.com>
7247
7248 * i386-low.c (i386_get_debug_register_length): New macro.
7249 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
7250 (i386_show_dr): Use debug_printf instead of fprintf. Use
7251 phex to format values.
7252
7253 2014-06-18 Gary Benson <gbenson@redhat.com>
7254
7255 * i386-low.h: Comment changes.
7256 * i386-low.c: Likewise.
7257
7258 2014-06-18 Gary Benson <gbenson@redhat.com>
7259
7260 * i386-low.c: Whitespace changes.
7261
7262 2014-06-12 Tom Tromey <tromey@redhat.com>
7263
7264 * utils.c (freeargv): Remove.
7265
7266 2014-06-12 Tom Tromey <tromey@redhat.com>
7267
7268 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
7269 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
7270 (parse_debug_format_options): Likewise.
7271 (gdbserver_usage): Likewise.
7272 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
7273 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
7274 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
7275 against libiberty.
7276 ($(LIBGNU)): Depend on libiberty.
7277 (all-lib): Recurse into all subdirs.
7278 (install-only): Invoke "install" target in subdirs.
7279 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
7280 targets.
7281 * configure: Rebuild.
7282 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
7283 for vasprintf, vsnprintf, or gettimeofday.
7284 * configure.srv: Don't add safe-ctype.o or lbasename.o to
7285 srv_tgtobj.
7286
7287 2014-06-05 Joel Brobecker <brobecker@adacore.com>
7288
7289 * development.sh: Delete.
7290 * Makefile.in (config.status): Adjust dependency on development.sh.
7291 * configure.ac: Adjust development.sh source call.
7292 * configure: Regenerate.
7293
7294 2014-06-02 Pedro Alves <palves@redhat.com>
7295
7296 * ax.c (gdb_free_agent_expr): New function.
7297 * ax.h (gdb_free_agent_expr): New declaration.
7298 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
7299 list.
7300 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
7301 static.
7302 (clear_breakpoint_conditions_and_commands): New function.
7303 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
7304 (clear_breakpoint_conditions_and_commands): New declaration.
7305
7306 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
7307
7308 * linux-aarch64-low.c (asm/ptrace.h): Include.
7309
7310 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
7311
7312 Fix TLS access for -static -pthread.
7313 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
7314 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
7315 (thread_db_load_search, try_thread_db_load_1): Initialize it.
7316
7317 2014-05-20 Pedro Alves <palves@redhat.com>
7318
7319 * linux-aarch64-low.c (aarch64_insert_point)
7320 (aarch64_remove_point): No longer check whether the type is
7321 supported here. Adjust to new interface.
7322 (the_low_target): Install aarch64_supports_z_point_type as
7323 supports_z_point_type method.
7324 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
7325 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
7326 instead of a Z packet char. Adjust.
7327 (arm_supports_z_point_type): New function.
7328 (arm_insert_point, arm_remove_point): Adjust to new interface.
7329 (the_low_target): Install arm_supports_z_point_type.
7330 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
7331 (cris_insert_point, cris_remove_point): Adjust to new interface.
7332 Don't check whether the type is supported here.
7333 (the_low_target): Install cris_supports_z_point_type.
7334 * linux-low.c (linux_supports_z_point_type): New function.
7335 (linux_insert_point, linux_remove_point): Adjust to new interface.
7336 * linux-low.h (struct linux_target_ops) <insert_point,
7337 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
7338 raw_breakpoint pointer parameter.
7339 <supports_z_point_type>: New method.
7340 * linux-mips-low.c (mips_supports_z_point_type): New function.
7341 (mips_insert_point, mips_remove_point): Adjust to new interface.
7342 Use mips_supports_z_point_type.
7343 (the_low_target): Install mips_supports_z_point_type.
7344 * linux-ppc-low.c (the_low_target): Install NULL as
7345 supports_z_point_type method.
7346 * linux-s390-low.c (the_low_target): Install NULL as
7347 supports_z_point_type method.
7348 * linux-sparc-low.c (the_low_target): Install NULL as
7349 supports_z_point_type method.
7350 * linux-x86-low.c (x86_supports_z_point_type): New function.
7351 (x86_insert_point): Adjust to new insert_point interface. Use
7352 insert_memory_breakpoint. Adjust to new
7353 i386_low_insert_watchpoint interface.
7354 (x86_remove_point): Adjust to remove_point interface. Use
7355 remove_memory_breakpoint. Adjust to new
7356 i386_low_remove_watchpoint interface.
7357 (the_low_target): Install x86_supports_z_point_type.
7358 * lynx-low.c (lynx_target_ops): Install NULL as
7359 supports_z_point_type callback.
7360 * nto-low.c (nto_supports_z_point_type): New.
7361 (nto_insert_point, nto_remove_point): Adjust to new interface.
7362 (nto_target_ops): Install nto_supports_z_point_type.
7363 * mem-break.c: Adjust intro comment.
7364 (struct raw_breakpoint) <raw_type, size>: New fields.
7365 <inserted>: Update comment.
7366 <shlib_disabled>: Delete field.
7367 (enum bkpt_type) <gdb_breakpoint>: Delete value.
7368 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
7369 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
7370 (raw_bkpt_type_to_target_hw_bp_type): New function.
7371 (find_enabled_raw_code_breakpoint_at): New function.
7372 (find_raw_breakpoint_at): New type and size parameters. Use them.
7373 (insert_memory_breakpoint): New function, based off
7374 set_raw_breakpoint_at.
7375 (remove_memory_breakpoint): New function.
7376 (set_raw_breakpoint_at): Reimplement.
7377 (set_breakpoint): New, based on set_breakpoint_at.
7378 (set_breakpoint_at): Reimplement.
7379 (delete_raw_breakpoint): Go through the_target->remove_point
7380 instead of assuming memory breakpoints.
7381 (find_gdb_breakpoint_at): Delete.
7382 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
7383 (find_gdb_breakpoint): New function.
7384 (set_gdb_breakpoint_at): Delete.
7385 (z_type_supported): New function.
7386 (set_gdb_breakpoint_1): New function, loosely based off
7387 set_gdb_breakpoint_at.
7388 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
7389 (delete_gdb_breakpoint_at): Delete.
7390 (delete_gdb_breakpoint_1): New function, loosely based off
7391 delete_gdb_breakpoint_at.
7392 (delete_gdb_breakpoint): New function.
7393 (clear_gdb_breakpoint_conditions): Rename to ...
7394 (clear_breakpoint_conditions): ... this. Don't handle a NULL
7395 breakpoint.
7396 (add_condition_to_breakpoint): Make static.
7397 (add_breakpoint_condition): Take a struct breakpoint pointer
7398 instead of an address. Adjust.
7399 (gdb_condition_true_at_breakpoint): Rename to ...
7400 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
7401 z_type parameter.
7402 (gdb_condition_true_at_breakpoint): Reimplement.
7403 (add_breakpoint_commands): Take a struct breakpoint pointer
7404 instead of an address. Adjust.
7405 (gdb_no_commands_at_breakpoint): Rename to ...
7406 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
7407 parameter. Return true if no breakpoint was found. Change debug
7408 output.
7409 (gdb_no_commands_at_breakpoint): Reimplement.
7410 (run_breakpoint_commands): Rename to ...
7411 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
7412 and change return type to boolean.
7413 (run_breakpoint_commands): New function.
7414 (gdb_breakpoint_here): Also check for Z1 breakpoints.
7415 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
7416 breakpoint. Go through the_target->remove_point instead of
7417 assuming memory breakpoint.
7418 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
7419 software and hardware breakpoints.
7420 (reinsert_raw_breakpoint): Go through the_target->insert_point
7421 instead of assuming memory breakpoint.
7422 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
7423 software and hardware breakpoints.
7424 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
7425 Check both software and hardware breakpoints.
7426 (validate_inserted_breakpoint): Assert the breakpoint is a
7427 software breakpoint. Set the inserted flag to -1 instead of
7428 setting shlib_disabled.
7429 (delete_disabled_breakpoints): Adjust.
7430 (validate_breakpoints): Only validate software breakpoints.
7431 Adjust to inserted flag change.
7432 (check_mem_read, check_mem_write): Skip breakpoint types other
7433 than software breakpoints. Adjust to inserted flag change.
7434 * mem-break.h (enum raw_bkpt_type): New enum.
7435 (raw_breakpoint, struct process_info): Forward declare.
7436 (Z_packet_to_target_hw_bp_type): Delete declaration.
7437 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
7438 (set_gdb_breakpoint, delete_gdb_breakpoint)
7439 (clear_breakpoint_conditions): New declarations.
7440 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
7441 (breakpoint_inserted_here): Update comment.
7442 (add_breakpoint_condition, add_breakpoint_commands): Replace
7443 address parameter with a breakpoint pointer parameter.
7444 (gdb_breakpoint_here): Update comment.
7445 (delete_gdb_breakpoint_at): Delete.
7446 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
7447 * server.c (process_point_options): Take a struct breakpoint
7448 pointer instead of an address. Adjust.
7449 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
7450 delete_gdb_breakpoint.
7451 * spu-low.c (spu_target_ops): Install NULL as
7452 supports_z_point_type method.
7453 * target.h: Include mem-break.h.
7454 (struct target_ops) <prepare_to_access_memory>: Update comment.
7455 <supports_z_point_type>: New field.
7456 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
7457 instead of a char. Also take a raw breakpoint pointer.
7458 * win32-arm-low.c (the_low_target): Install NULL as
7459 supports_z_point_type.
7460 * win32-i386-low.c (i386_supports_z_point_type): New function.
7461 (i386_insert_point, i386_remove_point): Adjust to new interface.
7462 (the_low_target): Install i386_supports_z_point_type.
7463 * win32-low.c (win32_supports_z_point_type): New function.
7464 (win32_insert_point, win32_remove_point): Adjust to new interface.
7465 (win32_target_ops): Install win32_supports_z_point_type.
7466 * win32-low.h (struct win32_target_ops):
7467 <supports_z_point_type>: New method.
7468 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
7469 instead of a char. Also take a raw breakpoint pointer.
7470
7471 2014-05-20 Pedro Alves <palves@redhat.com>
7472
7473 * mem-break.h: Include break-common.h.
7474 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
7475 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
7476 (Z_packet_to_target_hw_bp_type): New declaration.
7477 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
7478 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
7479 (Z_PACKET_ACCESS_WP): Delete macros.
7480 (Z_packet_to_hw_type): Delete function.
7481 * i386-low.h: Don't include break-common.h here.
7482 (Z_packet_to_hw_type): Delete declaration.
7483 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
7484 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
7485 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
7486 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
7487 * linux-aarch64-low.c: Don't include break-common.h here.
7488 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
7489 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
7490 (Z_packet_to_target_hw_bp_type): Delete function.
7491 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
7492 function.
7493 (mips_insert_point, mips_remove_point): Use
7494 Z_packet_to_target_hw_bp_type.
7495
7496 2014-05-20 Pedro Alves <palves@redhat.com>
7497
7498 * linux-aarch64-low.c: Include break-common.h.
7499 (enum target_point_type): Delete.
7500 (Z_packet_to_point_type): Rename to ...
7501 (Z_packet_to_target_hw_bp_type): ... this, and return a
7502 target_hw_bp_type instead.
7503 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
7504 instead of an enum target_point_type.
7505 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
7506 breakpoint type.
7507 (aarch64_dr_state_insert_one_point)
7508 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
7509 (aarch64_handle_aligned_watchpoint)
7510 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
7511 Take an enum target_hw_bp_type instead of an enum
7512 target_point_type.
7513 (aarch64_supports_z_point_type): New function.
7514 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
7515 use Z_packet_to_target_hw_bp_type.
7516
7517 2014-05-20 Joel Brobecker <brobecker@adacore.com>
7518
7519 * configure.ac: Only use -Werror by default when DEVELOPMENT
7520 is true.
7521 * configure: Regenerate.
7522
7523 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
7524
7525 Fix gdbserver qGetTLSAddr for x86_64 -m32.
7526 * linux-x86-low.c (X86_64_USER_REGS): New.
7527 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
7528
7529 2014-04-28 Yao Qi <yao@codesourcery.com>
7530
7531 * Makefile.in (i386-avx512.c): Fix the typo of generated file
7532 name.
7533
7534 2014-04-25 Pedro Alves <palves@redhat.com>
7535
7536 PR server/16255
7537 * linux-low.c (linux_attach_fail_reason_string): New function.
7538 (linux_attach_lwp): Delete.
7539 (linux_attach_lwp_1): Rename to ...
7540 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
7541 argument. Remove "initial" parameter. Return int instead of
7542 void. Don't error or warn here.
7543 (linux_attach): Adjust to call linux_attach_lwp. Call error on
7544 failure to attach to the tgid. Call warning when failing to
7545 attach to an lwp.
7546 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
7547 argument. Remove "initial" parameter. Return int instead of
7548 void. Don't error or warn here.
7549 (linux_attach_fail_reason_string): New declaration.
7550 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
7551 interface change. Use linux_attach_fail_reason_string.
7552
7553 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
7554 Walfred Tedeschi <walfred.tedeschi@intel.com>
7555
7556 * Makefile.in: Added rules to handle new files
7557 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
7558 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
7559 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
7560 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
7561 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
7562 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
7563 x32-avx512-linux.o.
7564 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
7565 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
7566 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
7567 i386/x32-avx512.xml.
7568 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
7569 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
7570 i386/x32-avx512-linux.xml.
7571 * i387-fp.c (num_avx512_k_registers): New constant for number
7572 of K registers.
7573 (num_avx512_zmmh_low_registers): New constant for number of
7574 lower ZMM registers (0-15).
7575 (num_avx512_zmmh_high_registers): New constant for number of
7576 higher ZMM registers (16-31).
7577 (num_avx512_ymmh_registers): New contant for number of higher
7578 YMM registers (ymm16-31 added by avx521 on x86_64).
7579 (num_avx512_xmm_registers): New constant for number of higher
7580 XMM registers (xmm16-31 added by AVX512 on x86_64).
7581 (struct i387_xsave): Add space for AVX512 registers.
7582 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
7583 Add code to handle AVX512 registers.
7584 (i387_xsave_to_cache): Add code to handle AVX512 registers.
7585 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
7586 prototypei from generated file.
7587 (tdesc_amd64_avx512_linux): Likewise.
7588 (init_registers_x32_avx512_linux): Likewise.
7589 (tdesc_x32_avx512_linux): Likewise.
7590 (init_registers_i386_avx512_linux): Likewise.
7591 (tdesc_i386_avx512_linux): Likewise.
7592 (x86_64_regmap): Add AVX512 registers.
7593 (x86_linux_read_description): Add code to handle AVX512 XSTATE
7594 mask.
7595 (initialize_low_arch): Add code to initialize AVX512 registers.
7596
7597 2014-04-23 Pedro Alves <palves@redhat.com>
7598
7599 * mem-break.c (find_gdb_breakpoint_at): Make static.
7600 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
7601
7602 2014-04-23 Pedro Alves <palves@redhat.com>
7603
7604 * i386-low.c: Don't include break-common.h here.
7605 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
7606 prototype to take target_hw_bp_type as argument instead of a Z
7607 packet char.
7608 * i386-low.h: Include break-common.h here.
7609 (Z_packet_to_hw_type): Declare.
7610 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
7611 prototypes.
7612 * linux-x86-low.c (x86_insert_point): Convert the packet number to
7613 a target_hw_bp_type before calling i386_low_insert_watchpoint.
7614 (x86_remove_point): Convert the packet number to a
7615 target_hw_bp_type before calling i386_low_remove_watchpoint.
7616 * win32-i386-low.c (i386_insert_point): Convert the packet number
7617 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
7618 (i386_remove_point): Convert the packet number to a
7619 target_hw_bp_type before calling i386_low_remove_watchpoint.
7620
7621 2014-04-23 Pedro Alves <palves@redhat.com>
7622
7623 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
7624
7625 2014-04-10 Pedro Alves <palves@redhat.com>
7626
7627 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
7628 Check if the condition or command is NULL before checking if the
7629 breakpoint is known. On success, return true.
7630 * mem-break.h (add_breakpoint_condition): Document return.
7631 (add_breakpoint_commands): Add describing comment.
7632 * server.c (skip_to_semicolon): New function.
7633 (process_point_options): Use it.
7634
7635 2014-04-09 Pedro Alves <palves@redhat.com>
7636
7637 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
7638 to lwpid_of.
7639
7640 2014-02-27 Pedro Alves <palves@redhat.com>
7641
7642 PR 12702
7643 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
7644 macros.
7645 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
7646 output.
7647 (last_thread_of_process_p): Take a PID argument instead of a
7648 thread pointer.
7649 (linux_wait_for_lwp): Delete.
7650 (num_lwps, check_zombie_leaders, not_stopped_callback): New
7651 functions.
7652 (linux_low_filter_event): New function, party factored out from
7653 linux_wait_for_event.
7654 (linux_wait_for_event): Rename to ...
7655 (linux_wait_for_event_filtered): ... this. Add new filter ptid
7656 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
7657 sigsuspend. Check for zombie leaders.
7658 (linux_wait_for_event): Reimplement as wrapper around
7659 linux_wait_for_event_filtered.
7660 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
7661 a normal or signal exit is seen, it's the whole process exiting.
7662 (wait_for_sigstop): No longer a for_each_inferior callback.
7663 Rewrite on top of linux_wait_for_event_filtered.
7664 (stop_all_lwps): Call wait_for_sigstop directly.
7665 * server.c (resume, handle_target_event): Handle
7666 TARGET_WAITKIND_NO_RESUMED.
7667
7668 2014-02-26 Joel Brobecker <brobecker@adacore.com>
7669
7670 * win32-low.c (psapi_get_dll_name,
7671 * win32_CreateToolhelp32Snapshot): Delete.
7672 (win32_CreateToolhelp32Snapshot, win32_Module32First)
7673 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
7674 Delete.
7675 (handle_load_dll): Add function description.
7676 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
7677
7678 2014-02-26 Joel Brobecker <brobecker@adacore.com>
7679
7680 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
7681 Add comment.
7682 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
7683 base address when calling win32_add_one_solib.
7684 (handle_load_dll): Delete local variable load_addr.
7685 Remove 0x1000 offset applied to DLL base address when calling
7686 win32_add_one_solib.
7687 (handle_unload_dll): Add comment.
7688
7689 2014-02-26 Joel Brobecker <brobecker@adacore.com>
7690
7691 * win32-low.c (win32_add_all_dlls): Renames
7692 win32_ensure_ntdll_loaded. Rewrite function documentation.
7693 Adjust implementation to always load all DLLs.
7694 Add 0x1000 offset to DLL base address when calling
7695 win32_add_one_solib.
7696 (child_initialization_done): New static global.
7697 (do_initial_child_stuff): Set child_initialization_done to
7698 zero during child initialization, and 1 after. Replace call
7699 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
7700 Add comment.
7701 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
7702 (handle_unload_dll): Add function documentation.
7703 (get_child_debug_event): Ignore load and unload DLL events
7704 during child initialization.
7705
7706 2014-02-20 Doug Evans <dje@google.com>
7707
7708 Remove global all_lwps.
7709 * inferiors.h (ptid_of): Move here from linux-low.h.
7710 (pid_of, lwpid_of): Ditto.
7711 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
7712 parameter is a struct thread_info * now.
7713 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
7714 directly. Pass &all_threads to find_inferior instead of &all_lwps.
7715 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
7716 directly.
7717 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
7718 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
7719 * linux-arm-low.c (update_registers_callback): Update, "entry"
7720 parameter is a struct thread_info * now.
7721 Fetch lwpid from current_inferior directly.
7722 (arm_insert_point): Pass &all_threads to find_inferior instead of
7723 &all_lwps.
7724 (arm_remove_point): Ditto.
7725 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
7726 (arm_prepare_to_resume): Fetch pid from thread.
7727 (arm_read_description): Fetch lwpid from current_inferior directly.
7728 * linux-low.c (all_lwps): Delete.
7729 (delete_lwp): Delete call to remove_inferior.
7730 (handle_extended_wait): Fetch lwpid from thread.
7731 (add_lwp): Don't set lwp->entry.id. Remove call to
7732 add_inferior_to_list.
7733 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
7734 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
7735 (kill_one_lwp_callback): Ditto.
7736 (linux_kill): Don't dereference NULL pointer.
7737 Fetch ptid,lwpid from thread.
7738 (get_detach_signal): Fetch ptid from thread.
7739 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
7740 Simplify call to regcache_invalidate_thread.
7741 (delete_lwp_callback): Update, "entry" parameter is a
7742 struct thread_info * now. Fetch pid from thread.
7743 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
7744 (status_pending_p_callback): Update, "entry" parameter is a
7745 struct thread_info * now. Fetch ptid from thread.
7746 (find_lwp_pid): Update, "entry" parameter is a
7747 struct thread_info * now.
7748 (linux_wait_for_lwp): Fetch pid from thread.
7749 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
7750 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
7751 (enqueue_one_deferred_signal): Fetch lwpid from thread.
7752 (dequeue_one_deferred_signal): Ditto.
7753 (cancel_breakpoint): Fetch ptid from current_inferior.
7754 (linux_wait_for_event): Pass &all_threads to find_inferior,
7755 not &all_lwps. Fetch ptid, lwpid from thread.
7756 (count_events_callback): Update, "entry" parameter is a
7757 struct thread_info * now.
7758 (select_singlestep_lwp_callback): Ditto.
7759 (select_event_lwp_callback): Ditto.
7760 (cancel_breakpoints_callback): Ditto.
7761 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
7762 not &all_lwps.
7763 (select_event_lwp): Ditto. Fetch ptid from event_thread.
7764 (unsuspend_one_lwp): Update, "entry" parameter is a
7765 struct thread_info * now.
7766 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
7767 not &all_lwps.
7768 (linux_stabilize_threads): Ditto. And for for_each_inferior.
7769 Fetch lwpid from thread, not lwp.
7770 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
7771 Pass &all_threads to find_inferior, not &all_lwps.
7772 (send_sigstop): Fetch lwpid from thread, not lwp.
7773 (send_sigstop_callback): Update, "entry" parameter is a
7774 struct thread_info * now.
7775 (suspend_and_send_sigstop_callback): Ditto.
7776 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
7777 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
7778 struct thread_info * now.
7779 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
7780 from thread, lwp.
7781 (lwp_running): Update, "entry" parameter is a
7782 struct thread_info * now.
7783 (stop_all_lwps): Fetch ptid from thread.
7784 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
7785 (linux_resume_one_lwp): Fetch lwpid from thread.
7786 (linux_set_resume_request): Update, "entry" parameter is a
7787 struct thread_info * now. Fetch pid, lwpid from thread.
7788 (resume_status_pending_p): Update, "entry" parameter is a
7789 struct thread_info * now.
7790 (need_step_over_p): Ditto. Fetch lwpid from thread.
7791 (start_step_over): Fetch lwpid from thread.
7792 (linux_resume_one_thread): Update, "entry" parameter is a
7793 struct thread_info * now. Fetch lwpid from thread.
7794 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
7795 (proceed_one_lwp): Update, "entry" parameter is a
7796 struct thread_info * now. Fetch lwpid from thread.
7797 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
7798 struct thread_info * now.
7799 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
7800 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
7801 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
7802 directly.
7803 (regsets_store_inferior_registers): Ditto.
7804 (fetch_register, store_register): Ditto.
7805 (linux_read_memory, linux_write_memory): Ditto.
7806 (linux_request_interrupt): Ditto.
7807 (linux_read_auxv): Ditto.
7808 (linux_xfer_siginfo): Ditto.
7809 (linux_qxfer_spu): Ditto.
7810 (linux_qxfer_libraries_svr4): Ditto.
7811 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
7812 moved to inferiors.h.
7813 (get_lwp): Delete.
7814 (get_thread_lwp): Update.
7815 (struct lwp_info): Delete member "entry". Simplify comment for
7816 member "thread".
7817 (all_lwps): Delete.
7818 * linux-mips-low.c (mips_read_description): Fetch lwpid from
7819 current_inferior directly.
7820 (update_watch_registers_callback): Update, "entry" parameter is a
7821 struct thread_info * now. Fetch pid from thread.
7822 (mips_linux_prepare_to_resume): Fetch ptid from thread.
7823 (mips_insert_point): Fetch lwpid from current_inferior.
7824 Pass &all_threads to find_inferior, not &all_lwps.
7825 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
7826 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
7827 directly.
7828 (mips_stopped_data_address): Ditto.
7829 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
7830 directly.
7831 * linux-tile-low.c (tile_arch_setup): Ditto.
7832 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
7833 (update_debug_registers_callback): Update, "entry" parameter is a
7834 struct thread_info * now. Fetch pid from thread.
7835 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
7836 Pass &all_threads to find_inferior, not &all_lwps.
7837 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
7838 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
7839 Pass &all_threads to find_inferior, not &all_lwps.
7840 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
7841 (i386_dr_low_get_status): Ditto.
7842 (x86_linux_prepare_to_resume): Fetch ptid from thread.
7843 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
7844 (x86_linux_read_description): Ditto.
7845 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
7846
7847 2014-02-20 Doug Evans <dje@google.com>
7848
7849 * inferiors.c (get_first_inferior): Fix buglet.
7850
7851 2014-02-19 Doug Evans <dje@google.com>
7852
7853 * gdbthread.h (add_thread): Change result type to struct thread_info *.
7854 * inferiors.c (add_thread): Change result type to struct thread_info *.
7855 All callers updated.
7856 (add_lwp): Call add_thread here instead of in callers.
7857 All callers updated.
7858 * linux-low.h (get_lwp_thread): Rewrite.
7859 (struct lwp_info): New member "thread".
7860
7861 2014-02-19 Doug Evans <dje@google.com>
7862
7863 * linux-low.c (add_lwp): Change result to struct lwp_info *.
7864 All callers updated.
7865
7866 2014-02-19 Doug Evans <dje@google.com>
7867
7868 * inferiors.c (add_thread): Fix whitespace.
7869
7870 2014-02-19 Doug Evans <dje@google.com>
7871
7872 * dll.c (clear_dlls): Replace accessing list implemention details
7873 with API function.
7874 * gdbthread.h (get_first_thread): Declare.
7875 * inferiors.c (for_each_inferior_with_data): New function.
7876 (get_first_thread): New function.
7877 (find_thread_ptid): Simplify.
7878 (get_first_inferior): New function.
7879 (clear_list): Delete.
7880 (one_inferior_p): New function.
7881 (clear_inferior_list): New function.
7882 (clear_inferiors): Update.
7883 * inferiors.h (for_each_inferior_with_data): Declare.
7884 (clear_inferior_list): Declare.
7885 (one_inferior_p): Declare.
7886 (get_first_inferior): Declare.
7887 * linux-low.c (linux_wait_for_event): Replace accessing list
7888 implemention details with API function.
7889 * server.c (target_running): Ditto.
7890 (accumulate_file_name_length): New function.
7891 (emit_dll_description): New function.
7892 (handle_qxfer_libraries): Replace accessing list implemention
7893 details with API function.
7894 (handle_qxfer_threads_worker): New function.
7895 (handle_qxfer_threads_proper): Replace accessing list implemention
7896 details with API function.
7897 (handle_query): Ditto.
7898 (visit_actioned_threads_callback_ftype): New typedef.
7899 (visit_actioned_threads_data): New struct.
7900 (visit_actioned_threads): Rewrite to be find_inferior callback.
7901 (resume): Call find_inferior.
7902 (handle_status): Replace accessing list implemention
7903 details with API function.
7904 (process_serial_event): Replace accessing list implemention details
7905 with API function.
7906 * target.c (set_desired_inferior): Replace accessing list implemention
7907 details with API function.
7908 * tracepoint.c (same_process_p): New function.
7909 (gdb_agent_about_to_close): Replace accessing list implemention
7910 details with API function.
7911 * win32-low.c (child_delete_thread): Replace accessing list
7912 implemention details with API function.
7913 (match_dll_by_basename): New function.
7914 (dll_is_loaded_by_basename): New function.
7915 (win32_ensure_ntdll_loaded): Replace accessing list implemention
7916 details call to dll_is_loaded_by_basename.
7917
7918 2014-02-19 Doug Evans <dje@google.com>
7919
7920 * dll.h (struct dll_info): Add comment.
7921 * gdbthread.h (struct thread_info): Add comment.
7922 (current_ptid): Simplify.
7923 * inferiors.c (add_process): Update.
7924 (remove_process): Update.
7925 * inferiors.h (struct process_info): Rename member "head" to "entry".
7926 * linux-low.c (delete_lwp): Update.
7927 (add_lwp): Update.
7928 (last_thread_of_process_p): Update.
7929 (kill_one_lwp_callback, linux_kill): Update.
7930 (status_pending_p_callback): Update.
7931 (wait_for_sigstop): Update. Simplify read of ptid.
7932 (start_step_over): Update.
7933 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
7934 (get_lwp_thread): Update.
7935 (struct lwp_info): Rename member "head" to "entry".
7936 * regcache.h (inferior_list_entry): Delete.
7937 * server.c (kill_inferior_callback): Update.
7938 (detach_or_kill_inferior_callback): Update.
7939 (print_started_pid): Update.
7940 (print_attached_pid): Update.
7941 (process_serial_event): Simplify read of ptid.
7942 * thread-db.c (thread_db_create_event): Update.
7943 (thread_db_get_tls_address): Update.
7944 * win32-low.c (current_inferior_ptid): Simplify.
7945
7946 2014-02-19 Tom Tromey <tromey@redhat.com>
7947
7948 * target.h (struct target_ops) <supports_btrace>: Add target_ops
7949 argument.
7950 (target_supports_btrace): Update.
7951
7952 2014-02-14 Yao Qi <yao@codesourcery.com>
7953
7954 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
7955 (rsp-low-ipa.o): New target.
7956
7957 2014-02-12 Tom Tromey <tromey@redhat.com>
7958
7959 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
7960 convert_ascii_to_int.
7961 * regcache.c (registers_to_string): Likewise.
7962 * remote-utils.c (decode_M_packet): Likewise.
7963 * server.c (process_serial_event): Likewise.
7964
7965 2014-02-12 Tom Tromey <tromey@redhat.com>
7966
7967 * server.c (handle_query, handle_v_run): Use hex2bin, not
7968 unhexify.
7969 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
7970
7971 2014-02-12 Tom Tromey <tromey@redhat.com>
7972
7973 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
7974 convert_int_to_ascii.
7975 * regcache.c (registers_to_string, collect_register_as_string):
7976 Likewise.
7977 * remote-utils.c (look_up_one_symbol, relocate_instruction):
7978 Likewise.
7979 * server.c (process_serial_event): Likewise.
7980 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
7981 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
7982
7983 2014-02-12 Tom Tromey <tromey@redhat.com>
7984
7985 * remote-utils.c (look_up_one_symbol, monitor_output): Use
7986 bin2hex, not hexify.
7987 * tracepoint.c (cmd_qtstatus): Likewise.
7988
7989 2014-02-12 Tom Tromey <tromey@redhat.com>
7990
7991 * remote-utils.c (monitor_output): Pass explicit length to
7992 hexify.
7993
7994 2014-02-12 Tom Tromey <tromey@redhat.com>
7995
7996 * tracepoint.c: Include rsp-low.h.
7997 * server.c: Include rsp-low.h.
7998 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
7999 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
8000 declare.
8001 * remote-utils.c: Include rsp-low.h.
8002 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
8003 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
8004 (convert_int_to_ascii, convert_ascii_to_int): Move to
8005 common/rsp-low.c.
8006 * regcache.c: Include rsp-low.h.
8007 * ax.c: Include rsp-low.h.
8008 * Makefile.in (SFILES): Add common/rsp-low.c.
8009 (OBS): Add rsp-low.o.
8010 (rsp-low.o): New target.
8011
8012 2014-02-12 Tom Tromey <tromey@redhat.com>
8013
8014 * utils.h (pulongest, plongest, phex_nz): Don't declare.
8015 Include print-utils.h.
8016 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
8017 (plongest, thirty_two, phex_nz): Remove.
8018 * Makefile.in (SFILES): Add common/print-utils.c.
8019 (OBS): Add print-utils.o.
8020 (print-utils-ipa.o): New target.
8021 (print-utils.o): New target.
8022 (IPA_OBJS): Add print-utils-ipa.o.
8023
8024 2014-02-06 Tom Tromey <tromey@redhat.com>
8025
8026 * Makefile.in (SFILES): Fix indentation.
8027
8028 2014-02-05 Doug Evans <dje@google.com>
8029
8030 * linux-low.c (linux_wait_for_event): Improve comment.
8031 (linux_wait_1): Keep current_inferior in sync with event_child.
8032
8033 2014-01-22 Doug Evans <dje@google.com>
8034
8035 * gdbthread.h (gdb_id_to_thread): Delete, unused.
8036
8037 2014-01-22 Doug Evans <dje@google.com>
8038
8039 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
8040 * configure: Regenerate.
8041 * config.in: Regenerate.
8042 * Makefile.in (SFILES): Add debug.c.
8043 (OBS): Add debug.o.
8044 * debug.c: New file.
8045 * debug.h: New file.
8046 * linux-aarch64-low.c (*): Update all debugging printfs to use
8047 debug_printf instead of fprintf.
8048 * linux-arm-low.c (*): Ditto.
8049 * linux-cris-low.c (*): Ditto.
8050 * linux-crisv32-low.c (*): Ditto.
8051 * linux-m32r-low.c (*): Ditto.
8052 * linux-sparc-low.c (*): Ditto.
8053 * linux-x86.c (*): Ditto.
8054 * linux-low.c (*): Ditto.
8055 (linux_wait_1): Add calls to debug_enter, debug_exit.
8056 (linux_wait): Remove redundant debugging printf.
8057 (stop_all_lwps): Add calls to debug_enter, debug_exit.
8058 (linux_resume, unstop_all_lwps): Ditto.
8059 * mem-break.c (*): Update all debugging printfs to use
8060 debug_printf instead of fprintf.
8061 * remote-utils.c (*): Ditto.
8062 * thread-db.c (*): Ditto.
8063 * server.c #include <ctype.h>, "gdb_vecs.h".
8064 (debug_threads): Moved to debug.c.
8065 (*): Update all debugging printfs to use debug_printf instead of
8066 fprintf.
8067 (start_inferior): Replace call to fflush with call to debug_flush.
8068 (monitor_show_help): Mention set debug-format.
8069 (parse_debug_format_options): New function.
8070 (handle_monitor_command): Handle "monitor set debug-format".
8071 (gdbserver_usage): Mention --debug-format.
8072 (main): Parse --debug-format.
8073 * server.h (debug_threads): Declaration moved to debug.h.
8074 #include "debug.h".
8075 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
8076 trace_debug_1 that uses debug_printf.
8077 (tracepoint_look_up_symbols): Update all debugging printfs to use
8078 debug_printf instead of fprintf.
8079
8080 2014-01-20 Baruch Siach <baruch@tkos.co.il>
8081
8082 * linux-xtensa-low.c: Include asm/ptrace.h instead of
8083 sys/ptrace.h.
8084
8085 2014-01-17 Pedro Alves <palves@redhat.com>
8086
8087 PR build/16445
8088 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
8089 defined after including gdb_proc_service.h.
8090
8091 2014-01-16 Doug Evans <dje@google.com>
8092
8093 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
8094 (match_dll): Use it.
8095
8096 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
8097
8098 * target.h (target_ops) <read_btrace>: Change parameters and
8099 return type to allow error reporting.
8100 * server.c (handle_qxfer_btrace): Support delta reads. Pass
8101 trace reading errors on.
8102 * linux-low.c (linux_low_read_btrace): Pass trace reading
8103 errors on.
8104 (linux_low_disable_btrace): New.
8105
8106 2014-01-15 Doug Evans <dje@google.com>
8107
8108 * inferiors.c (thread_id_to_gdb_id): Delete.
8109 * inferiors.h (thread_id_to_gdb_id): Delete.
8110
8111 2014-01-13 Eli Zaretskii <eliz@gnu.org>
8112
8113 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
8114 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
8115 versions.
8116
8117 2014-01-08 Pedro Alves <palves@redhat.com>
8118
8119 * server.c (handle_status): Don't discard previous queued stop
8120 replies or thread's pending status here.
8121 (main) <disconnection>: Do it here instead.
8122
8123 2014-01-08 Pedro Alves <palves@redhat.com>
8124
8125 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
8126 * server.c (visit_actioned_threads, handle_pending_status): New
8127 function.
8128 (handle_v_cont): Factor out parts to ...
8129 (resume): ... this new function. If in all-stop, and a thread
8130 being resumed has a pending status, report it without actually
8131 resuming.
8132 (myresume): Adjust to use the new 'resume' function.
8133 (clear_pending_status_callback, set_pending_status_callback)
8134 (find_status_pending_thread_callback): New functions.
8135 (handle_status): Handle the case of multiple threads having
8136 interesting statuses to report. Report threads' real last signal
8137 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
8138 with an interesting thread to report the status for, instead of
8139 always reporting the status of the first thread.
8140
8141 2014-01-01 Joel Brobecker <brobecker@adacore.com>
8142
8143 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
8144 * gdbreplay.c (gdbreplay_version): Likewise.
8145
8146 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
8147
8148 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
8149 iov.iov_len with the real length in use.
8150
8151 2013-12-13 Joel Brobecker <brobecker@adacore.com>
8152
8153 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
8154 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
8155 for all targets that use win32-low.c.
8156 * win32-low.c (win32_ensure_ntdll_loaded): New function.
8157 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
8158
8159 2013-12-13 Pedro Alves <palves@redhat.com>
8160
8161 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
8162 if equal to TARGET_WAITKIND_LOADED.
8163 * win32-low.c (cached_status): New static global.
8164 (win32_wait): Add declaration.
8165 (do_initial_child_stuff): Flush all initial pending debug events
8166 up to the initial breakpoint.
8167 (win32_wait): If CACHED_STATUS was set, return that instead
8168 of doing a real wait. Remove the code resuming the execution
8169 of the inferior after receiving a TARGET_WAITKIND_LOADED event
8170 during the initial phase. Also remove the code changing
8171 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
8172 TARGET_WAITKIND_STOPPED.
8173
8174 2013-12-11 Yao Qi <yao@codesourcery.com>
8175
8176 * notif.c (handle_notif_ack): Return 0 if no notification
8177 matches.
8178
8179 2013-11-20 Doug Evans <dje@google.com>
8180
8181 * linux-low.c (linux_set_resume_request): Fix comment.
8182
8183 2013-11-20 Doug Evans <dje@google.com>
8184
8185 * linux-low.c (resume_status_pending_p): Tweak comment.
8186
8187 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
8188
8189 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
8190 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
8191 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
8192 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
8193 (srv_amd64_regobj): Add amd64-mpx.o.
8194 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
8195 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
8196 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
8197 * i387-fp.c (num_pl_bnd_register) Added constant.
8198 (num_pl_bnd_cfg_registers) Added constant.
8199 (struct i387_xsave) Added reserved area and MPX fields.
8200 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
8201 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
8202 function.
8203 (tdesc_i386_mpx_linux): Add MPX amd64 target.
8204 (init_registers_amd64_mpx_linux): Declare new function.
8205 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
8206 (x86_64_regmap): Add MPX registers.
8207 (x86_linux_read_description): Add MPX case.
8208 (initialize_low_arch): Initialize MPX targets.
8209
8210 2013-11-18 Tom Tromey <tromey@redhat.com>
8211
8212 * configure: Rebuild.
8213 * configure.ac: Don't check for stdlib.h.
8214 * gdbreplay.c: Unconditionally include stdlib.h.
8215
8216 2013-11-18 Tom Tromey <tromey@redhat.com>
8217
8218 * config.in: Rebuild.
8219 * configure: Rebuild.
8220 * configure.ac: Don't use AC_HEADER_DIRENT.
8221
8222 2013-11-18 Tom Tromey <tromey@redhat.com>
8223
8224 * server.h: Don't check HAVE_STRING_H.
8225 * gdbreplay.c: Don't check HAVE_STRING_H.
8226 * configure: Rebuild.
8227
8228 2013-11-18 Tom Tromey <tromey@redhat.com>
8229
8230 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
8231 LIBGNU.
8232
8233 2013-11-08 Tom Tromey <tromey@redhat.com>
8234
8235 * configure, config.in: Rebuild.
8236 * configure.ac: Remove unused configury.
8237
8238 2013-11-08 Tom Tromey <tromey@redhat.com>
8239
8240 * acinclude.m4: Include common.m4, codeset.m4.
8241 * configure, config.in: Rebuild.
8242 * configure.ac: Use GDB_AC_COMMON.
8243
8244 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
8245
8246 * linux-s390-low.c (HWCAP_S390_TE): New define.
8247 (s390_arch_setup): Consider the TE field in the HWCAP for
8248 determining 'have_regset_tdb'.
8249
8250 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
8251
8252 PR gdb/16014
8253 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
8254 call to sizeof.
8255
8256 2013-10-02 Pedro Alves <palves@redhat.com>
8257
8258 * server.c (process_serial_event): Don't output "GDBserver
8259 exiting" if GDB is connected through stdio.
8260 * target.c (mywait): Likewise, be silent if GDB is connected
8261 through stdio.
8262
8263 2013-10-01 Joel Brobecker <brobecker@adacore.com>
8264
8265 * lynx-low.c (lynx_add_threads_after_attach): New function.
8266 (lynx_attach): Remove call to add_thread. Add call to
8267 lynx_add_threads_after_attach instead.
8268
8269 2013-09-28 Mike Frysinger <vapier@gentoo.org>
8270
8271 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
8272 * config.in, configure: Regenerated.
8273
8274 2013-09-18 Yao Qi <yao@codesourcery.com>
8275
8276 PR server/15959
8277 * server.c (start_inferior): Clear 'resume_info'.
8278
8279 2013-09-16 Jiong Wang <jiwang@tilera.com>
8280
8281 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
8282 for each register.
8283
8284 2013-09-16 Jiong Wang <jiwang@tilera.com>
8285
8286 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
8287 linux-tile-low.o to srv_tgtobj.
8288
8289 2013-09-16 Will Newton <will.newton@linaro.org>
8290
8291 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
8292 out regs.
8293
8294 2013-09-06 Pedro Alves <palves@redhat.com>
8295
8296 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
8297 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
8298 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
8299 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
8300 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
8301 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
8302
8303 2013-09-06 Pedro Alves <palves@redhat.com>
8304
8305 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
8306 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
8307
8308 2013-09-06 Pedro Alves <palves@redhat.com>
8309
8310 * linux-amd64-ipa.c: Include tracepoint.h.
8311 * linux-i386-ipa.c: Include tracepoint.h.
8312
8313 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
8314
8315 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
8316 (ps_get_thread_area): New function.
8317
8318 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
8319
8320 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
8321 (initialize_low_arch): Call init_registers_crisv32 rather than
8322 init_register_crisv32.
8323
8324 2013-09-05 Pedro Alves <palves@redhat.com>
8325
8326 * server.h (handle_vFile, hostio_last_error_from_errno): Move
8327 to ...
8328 * hostio.h: ... this new file.
8329 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
8330 win32-low.c: Include hostio.h.
8331
8332 2013-09-05 Pedro Alves <palves@redhat.com>
8333
8334 * server.h (gdb_client_data, handler_func, callback_handler_func)
8335 (delete_file_handler, add_file_handler, append_callback_event)
8336 (delete_callback_event, start_event_loop, initialize_event_loop):
8337 Move to event-loop.h and include it.
8338 * event-loop.h: New file.
8339
8340 2013-09-05 Pedro Alves <palves@redhat.com>
8341
8342 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
8343 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
8344 (loaded_dll, unloaded_dll): Move to ...
8345 * dll.h: ... this new file.
8346 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
8347
8348 2013-09-05 Pedro Alves <palves@redhat.com>
8349
8350 * server.h (current_process, get_thread_process, all_processes)
8351 (add_inferior_to_list, for_each_inferior, current_inferior)
8352 (remove_inferior, add_process, remove_process, find_process_pid)
8353 (have_started_inferiors_p, have_attached_inferiors_p)
8354 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
8355 (clear_inferiors, find_inferior, find_inferior_id)
8356 (inferior_target_data, set_inferior_target_data)
8357 (inferior_regcache_data, set_inferior_regcache_data): Move to
8358 inferiors.h, and include it.
8359 * inferiors.h: New file.
8360
8361 2013-09-05 Pedro Alves <palves@redhat.com>
8362
8363 * server.h (struct emit_ops, current_insn_ptr, emit_error):
8364 Move ...
8365 * ax.h: ... here.
8366
8367 2013-09-05 Pedro Alves <palves@redhat.com>
8368
8369 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
8370 tracepoint.h.
8371 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
8372 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
8373 (handle_tracepoint_general_set, handle_tracepoint_query)
8374 (tracepoint_finished_step, tracepoint_was_hit)
8375 (release_while_stepping_state_list, current_traceframe)
8376 (in_readonly_region, traceframe_read_mem)
8377 (fetch_traceframe_registers, traceframe_read_sdata)
8378 (traceframe_read_info, struct fast_tpoint_collect_status)
8379 (fast_tracepoint_collecting, force_unlock_trace_buffer)
8380 (handle_tracepoit_bkpts, initialize_low_tracepoint)
8381 (supply_fast_tracepoint_registers)
8382 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
8383 (ipa_tdesc, claim_trampoline_space)
8384 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
8385 (agent_mem_read, agent_get_trace_state_variable_value)
8386 (agent_set_trace_state_variable_value, agent_tsv_read)
8387 (agent_mem_read_string, get_raw_reg_func_addr)
8388 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
8389 * tracepoint.h: ... this new file.
8390
8391 2013-09-05 Pedro Alves <palves@redhat.com>
8392
8393 * server.h (perror_with_name, error, fatal, warning, paddress)
8394 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
8395 include it.
8396 * utils.h: New file.
8397
8398 2013-09-05 Pedro Alves <palves@redhat.com>
8399
8400 * server.h (remote_debug, noack_mode, transport_is_reliable)
8401 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
8402 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
8403 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
8404 (write_enn, initialize_async_io, enable_async_io)
8405 (disable_async_io, check_remote_input_interrupt_request)
8406 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
8407 (dead_thread_notify, prepare_resume_reply)
8408 (decode_address_to_semicolon, decode_address, decode_m_packet)
8409 (decode_M_packet, decode_X_packet, decode_xfer_write)
8410 (decode_search_memory_packet, unhexify, hexify)
8411 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
8412 (look_up_one_symbol, relocate_instruction)
8413 (monitor_output): Move to remote-utils.h, and include it.
8414 * remote-utils.h: New file.
8415
8416 2013-09-05 Pedro Alves <palves@redhat.com>
8417
8418 * server.h (_): Delete.
8419
8420 2013-09-02 Pedro Alves <palves@redhat.com>
8421
8422 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
8423 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
8424 allocated.
8425 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
8426
8427 2013-09-02 Pierre Muller <muller@sourceware.org>
8428
8429 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
8430 or WriteProcessMemory complete successfully and handle
8431 ERROR_PARTIAL_COPY error.
8432
8433 2013-09-02 Pedro Alves <palves@redhat.com>
8434
8435 * server.c (gdb_read_memory): Return -1 on traceframe memory read
8436 error instead of EIO.
8437
8438 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8439
8440 PR server/15604
8441 * linux-low.c: Include filestuff.h.
8442 (linux_create_inferior) <pid == 0>: Call close_most_fds.
8443 * lynx-low.c: Include filestuff.h.
8444 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
8445 * server.c: Include filestuff.h.
8446 (main): Call notice_open_fds.
8447 * spu-low.c: Include filestuff.h.
8448 (spu_create_inferior) <pid == 0>: Call close_most_fds.
8449
8450 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
8451
8452 * Makefile.in: Explain why ../target and ../nat are not
8453 listed as include file search paths.
8454 (linux-waitpid.o): New object file rule.
8455 * configure.srv (srv_native_linux_obj): New variable.
8456 Replace all occurrences of linux native object files with
8457 $srv_native_linux_obj.
8458 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
8459 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
8460 (linux_enable_event_reporting): Remove declaration.
8461 (my_waitpid): Moved to common/linux-waitpid.c.
8462 (linux_wait_for_event): Pass ptid when calling
8463 linux_enable_event_reporting.
8464 (linux_supports_tracefork_flag): Remove.
8465 (linux_enable_event_reporting): Likewise.
8466 (linux_tracefork_grandchild): Remove.
8467 (STACK_SIZE): Moved to common/linux-ptrace.c.
8468 (linux_tracefork_child): Remove.
8469 (linux_test_for_tracefork): Remove.
8470 (linux_look_up_symbols): Call linux_supports_traceclone.
8471 (initialize_low): Remove call to linux_test_for_tracefork.
8472 * linux-low.h (PTRACE_TYPE_ARG3): Move to
8473 common/linux-ptrace.h.
8474 (PTRACE_TYPE_ARG4): Likewise.
8475 Include linux-ptrace.h.
8476
8477 2013-08-21 Pedro Alves <palves@redhat.com>
8478
8479 * config.in: Renegerate.
8480
8481 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
8482
8483 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
8484 (SFILES): Remove $(srcdir)/common/target-common.c and
8485 add $(srcdir)/target/waitstatus.c.
8486 (OBS): Remove target-common.o and add waitstatus.o.
8487 (server_h): Remove $(srcdir)/../common/target-common.h and
8488 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
8489 and $(srcdir)/../target/waitstatus.h.
8490 (target-common.o): Remove.
8491 (waitstatus.o): New target object file.
8492 * target.h: Do not include target-common.h and
8493 include target/resume.h, target/wait.h and
8494 target/waitstatus.h.
8495
8496 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
8497
8498 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
8499 to PTRACE_TYPE_ARG3.
8500 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
8501 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
8502 PTRACE_TYPE_ARG4.
8503 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
8504 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
8505
8506 2013-07-27 Jie Zhang <jie@codesourcery.com>
8507 Daniel Jacobowitz <dan@codesourcery.com>
8508 Yao Qi <yao@codesourcery.com>
8509
8510 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
8511 (mips-linux-watch.o): New rule.
8512 (mips_linux_watch_h): New variable.
8513 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
8514 srv_tgtobj.
8515 * linux-mips-low.c: Include mips-linux-watch.h.
8516 (struct arch_process_info, struct arch_lwp_info): New.
8517 (update_watch_registers_callback): New function.
8518 (mips_linux_new_process, mips_linux_new_thread) New functions.
8519 (mips_linux_prepare_to_resume, mips_insert_point): New
8520 functions.
8521 (mips_remove_point, mips_stopped_by_watchpoint): New
8522 functions.
8523 (rsp_bp_type_to_target_hw_bp_type): New function.
8524 (mips_stopped_data_address): New function.
8525 (the_low_target): Add watchpoint support functions.
8526
8527 2013-07-27 Yao Qi <yao@codesourcery.com>
8528
8529 * i386-low.c: Include break-common.h.
8530 (enum target_hw_bp_type): Remove.
8531
8532 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
8533
8534 * Makefile.in (SFILES): /common/target-common.c.
8535 (OBS): Add target-common.o.
8536 (server_h): Add $(srcdir)/../common/target-common.h.
8537 (target-common.o): New target.
8538 * server.c (queue_stop_reply_callback): Free
8539 status string after use.
8540 * target.c (target_waitstatus_to_string): Remove.
8541 * target.h: Include target-common.h.
8542 (resume_kind): Likewise.
8543 (target_waitkind): Likewise.
8544 (target_waitstatus): Likewise.
8545 (TARGET_WNOHANG): Likewise.
8546
8547 2013-07-04 Yao Qi <yao@codesourcery.com>
8548
8549 * Makefile.in (host_alias): Use @host_noncanonical@.
8550 (target_alias): Use @target_noncanonical@.
8551 * configure.ac: Use ACX_NONCANONICAL_TARGET and
8552 ACX_NONCANONICAL_HOST.
8553 * configure: Regenerated.
8554
8555 Revert:
8556 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
8557
8558 * configure.ac (version_host, version_target): Set and AC_SUBST them.
8559 * configure: Rebuild.
8560 * Makefile.in (version_host, version_target): Get from configure.
8561 (version.c): Use $(version_host) and $(version_target).
8562
8563 2013-07-03 Pedro Alves <palves@redhat.com>
8564
8565 * Makefile.in (config.status): Depend on development.sh.
8566 * acinclude.m4: Include libmcheck.m4.
8567 * configure: Regenerate.
8568
8569 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
8570
8571 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
8572 attribute inside the parentheses.
8573 (winapi_DebugSetProcessKillOnExit): Ditto.
8574 (winapi_DebugBreakProcess): Ditto.
8575 (winapi_GenerateConsoleCtrlEvent): Ditto.
8576
8577 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
8578
8579 * notif.h (notif_event): Add a dummy member to avoid compiler
8580 errors.
8581
8582 2013-07-01 Pedro Alves <palves@redhat.com>
8583
8584 * hostio.c (HOSTIO_PATH_MAX): Define.
8585 (require_filename, handle_open, handle_unlink, handle_readlink):
8586 Use it.
8587
8588 2013-07-01 Pedro Alves <palves@redhat.com>
8589
8590 * server.h: Include "pathmax.h".
8591 * linux-low.c: Don't include sys/param.h.
8592 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
8593 MAXPATHLEN.
8594 * win32-low.c: Don't include sys/param.h.
8595 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
8596
8597 2013-07-01 Pedro Alves <palves@redhat.com>
8598
8599 * event-loop.c: Don't check HAVE_UNISTD_H before including
8600 <unistd.h>.
8601 * gdbreplay.c: Likewise.
8602 * remote-utils.c: Likewise.
8603 * server.c: Likewise.
8604 * configure.ac: Don't check for unistd.h.
8605 * configure: Regenerate.
8606
8607 2013-06-28 Tom Tromey <tromey@redhat.com>
8608
8609 * Makefile.in (version.c): Use version.in, not
8610 common/version.in.
8611
8612 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
8613
8614 * configure.ac (version_host, version_target): Set and AC_SUBST them.
8615 * configure: Rebuild.
8616 * Makefile.in (version_host, version_target): Get from configure.
8617 (version.c): Use $(version_host) and $(version_target).
8618
8619 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
8620
8621 Fix trace-status to output user name without trailing colon.
8622 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
8623
8624 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
8625
8626 Fix trace-status to output proper start-time and stop-time.
8627 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
8628 output start time and stop time in hex as gdb expects.
8629
8630 2013-06-26 Pedro Alves <pedro@codesourcery.com>
8631
8632 * tracepoint.c (build_traceframe_info_xml): Output trace state
8633 variables present in the trace buffer.
8634
8635 2013-06-24 Tom Tromey <tromey@redhat.com>
8636
8637 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
8638 create-version.sh.
8639 (version.o): Remove.
8640 * gdbreplay.c: Include version.h.
8641 (version, host_name): Don't declare.
8642 * server.h: Include version.h.
8643 (version, host_name): Don't declare.
8644
8645 2013-06-12 Pedro Alves <palves@redhat.com>
8646
8647 * linux-x86-low.c (linux_is_elf64): Delete global.
8648 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
8649 with local linux_pid_exe_is_elf_64_file use.
8650
8651 2013-06-11 Pedro Alves <palves@redhat.com>
8652
8653 * linux-low.c (regset_disabled, disable_regset): New functions.
8654 (regsets_fetch_inferior_registers)
8655 (regsets_store_inferior_registers): Use them.
8656 (initialize_regsets_info); Don't allocate the disabled_regsets
8657 array here.
8658 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
8659 comment.
8660
8661 2013-06-11 Pedro Alves <palves@redhat.com>
8662
8663 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
8664 xmalloc.
8665
8666 2013-06-11 Pedro Alves <palves@redhat.com>
8667
8668 * linux-x86-low.c (initialize_low_arch): Call
8669 init_registers_x32_avx_linux.
8670
8671 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
8672
8673 Fix compatibility with Android Bionic.
8674 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
8675 it is not empty.
8676
8677 2013-06-07 Pedro Alves <palves@redhat.com>
8678
8679 PR server/14823
8680 * Makefile.in (OBS): Add tdesc.o.
8681 (IPA_OBJS): Add tdesc-ipa.o.
8682 (tdesc-ipa.o): New rule.
8683 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
8684 interface.
8685 * linux-low.c (new_inferior): Delete.
8686 (disabled_regsets, num_regsets): Delete.
8687 (linux_add_process): Adjust to set the new per-process
8688 new_inferior flag.
8689 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
8690 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
8691 was a stop. When calling arch_setup, switch the current inferior
8692 to the thread that got an event.
8693 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
8694 (regsets_fetch_inferior_registers)
8695 (regsets_store_inferior_registers): New regsets_info parameter.
8696 Adjust to use it.
8697 (linux_register_in_regsets): New regs_info parameter. Adjust to
8698 use it.
8699 (register_addr, fetch_register, store_register): New usrregs_info
8700 parameter. Adjust to use it.
8701 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
8702 parameter regs_info. Adjust to use it.
8703 (linux_fetch_registers): Get the current inferior's regs_info, and
8704 adjust to use it.
8705 (linux_store_registers): Ditto.
8706 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
8707 (initialize_low): Don't initialize the target_regsets here. Call
8708 initialize_low_arch.
8709 * linux-low.h (target_regsets): Delete declaration.
8710 (struct regsets_info): New.
8711 (struct usrregs_info): New.
8712 (struct regs_info): New.
8713 (struct process_info_private) <new_inferior>: New field.
8714 (struct linux_target_ops): Delete the num_regs, regmap, and
8715 regset_bitmap fields. New field regs_info.
8716 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
8717 * i387-fp.c (num_xmm_registers): Delete.
8718 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
8719 calls to new interface.
8720 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
8721 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
8722 Infer the number of xmm registers from the regcache's target
8723 description.
8724 * i387-fp.h (num_xmm_registers): Delete.
8725 * inferiors.c (add_thread): Don't install the thread's regcache
8726 here.
8727 * proc-service.c (gregset_info): Fetch the current inferior's
8728 regs_info. Adjust to use it.
8729 * regcache.c: Include tdesc.h.
8730 (register_bytes, reg_defs, num_registers)
8731 (gdbserver_expedite_regs): Delete.
8732 (get_thread_regcache): If the thread doesn't have a regcache yet,
8733 create one, instead of aborting gdbserver.
8734 (regcache_invalidate_one): Rename to ...
8735 (regcache_invalidate_thread): ... this.
8736 (regcache_invalidate_one): New.
8737 (regcache_invalidate): Only invalidate registers of the current
8738 process.
8739 (init_register_cache): Add target_desc parameter, and use it.
8740 (new_register_cache): Ditto. Assert the target description has a
8741 non zero registers_size.
8742 (regcache_cpy): Add assertions. Adjust.
8743 (realloc_register_cache, set_register_cache): Delete.
8744 (registers_to_string, registers_from_string): Adjust.
8745 (find_register_by_name, find_regno, find_register_by_number)
8746 (register_cache_size): Add target_desc parameter, and use it.
8747 (free_register_cache_thread, free_register_cache_thread_one)
8748 (regcache_release, register_cache_size): New.
8749 (register_size): Add target_desc parameter, and use it.
8750 (register_data, supply_register, supply_register_zeroed)
8751 (supply_regblock, supply_register_by_name, collect_register)
8752 (collect_register_as_string, collect_register_by_name): Adjust.
8753 * regcache.h (struct target_desc): Forward declare.
8754 (struct regcache) <tdesc>: New field.
8755 (init_register_cache, new_register_cache): Add target_desc
8756 parameter.
8757 (regcache_invalidate_thread): Declare.
8758 (regcache_invalidate_one): Delete declaration.
8759 (regcache_release): Declare.
8760 (find_register_by_number, register_cache_size, register_size)
8761 (find_regno): Add target_desc parameter.
8762 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
8763 declarations.
8764 * remote-utils.c: Include tdesc.h.
8765 (outreg, prepare_resume_reply): Adjust.
8766 * server.c: Include tdesc.h.
8767 (gdbserver_xmltarget): Delete declaration.
8768 (get_features_xml, process_serial_event): Adjust.
8769 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
8770 declare.
8771 (struct process_info) <tdesc>: New field.
8772 (ipa_tdesc): Declare.
8773 * tdesc.c: New file.
8774 * tdesc.h: New file.
8775 * tracepoint.c: Include tdesc.h.
8776 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
8777 (get_context_regcache): Adjust to pass ipa_tdesc down.
8778 (do_action_at_tracepoint): Adjust to get the register cache size
8779 from the context regcache's description.
8780 (traceframe_walk_blocks): Adjust to get the register cache size
8781 from the current trace frame's description.
8782 (traceframe_get_pc): Adjust to get current trace frame's
8783 description and pass it down.
8784 (gdb_collect): Adjust to get the register cache size from the
8785 IPA's description.
8786 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
8787 (gdbserver_xmltarget): Delete.
8788 (initialize_low_tracepoint): Set the ipa's target description.
8789 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
8790 (initialize_low_tracepoint): Set the ipa's target description.
8791 * linux-x86-low.c: Include tdesc.h.
8792 [__x86_64__] (is_64bit_tdesc): New.
8793 (ps_get_thread_area, x86_get_thread_area): Use it.
8794 (i386_cannot_store_register): Rename to ...
8795 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
8796 (i386_cannot_fetch_register): Rename to ...
8797 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
8798 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
8799 to new interface.
8800 (target_regsets): Rename to ...
8801 (x86_regsets): ... this.
8802 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
8803 interface.
8804 (x86_siginfo_fixup): Use is_64bit_tdesc.
8805 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
8806 (tdesc_x32_avx_linux, tdesc_x32_linux)
8807 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
8808 Declare.
8809 (x86_linux_update_xmltarget): Delete.
8810 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
8811 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
8812 (AMD64_LINUX_USER64_CS): New.
8813 (x86_linux_read_description): New, based on
8814 x86_linux_update_xmltarget.
8815 (same_process_callback): New.
8816 (x86_arch_setup_process_callback): New.
8817 (x86_linux_update_xmltarget): New.
8818 (x86_regsets_info): New.
8819 (amd64_linux_regs_info): New.
8820 (i386_linux_usrregs_info): New.
8821 (i386_linux_regs_info): New.
8822 (x86_linux_regs_info): New.
8823 (x86_arch_setup): Reimplement.
8824 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
8825 (x86_emit_ops): Ditto.
8826 (the_low_target): Adjust. Install x86_linux_regs_info,
8827 x86_cannot_fetch_register, and x86_cannot_store_register.
8828 (initialize_low_arch): New.
8829 * linux-ia64-low.c (tdesc_ia64): Declare.
8830 (ia64_fetch_register): Adjust.
8831 (ia64_usrregs_info, regs_info): New globals.
8832 (ia64_regs_info): New function.
8833 (the_low_target): Adjust.
8834 (initialize_low_arch): New function.
8835 * linux-sparc-low.c (tdesc_sparc64): Declare.
8836 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
8837 Adjust.
8838 (sparc_arch_setup): New function.
8839 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
8840 (the_low_target): Adjust.
8841 (initialize_low_arch): New function.
8842 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
8843 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
8844 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
8845 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
8846 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
8847 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
8848 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
8849 (tdesc_powerpc_isa205_vsx64l): Declare.
8850 (ppc_cannot_store_register, ppc_collect_ptrace_register)
8851 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
8852 (ppc_set_pc, ppc_get_hwcap): Adjust.
8853 (ppc_usrregs_info): Forward declare.
8854 (!__powerpc64__) ppc_regmap_adjusted: New global.
8855 (ppc_arch_setup): Adjust to the current process'es target
8856 description.
8857 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
8858 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
8859 (ppc_store_evrregset): Adjust.
8860 (target_regsets): Rename to ...
8861 (ppc_regsets): ... this, and make static.
8862 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
8863 (ppc_regs_info): New function.
8864 (the_low_target): Adjust.
8865 (initialize_low_arch): New function.
8866 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
8867 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
8868 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
8869 (tdesc_s390x_linux64v2): Declare.
8870 (s390_collect_ptrace_register, s390_supply_ptrace_register)
8871 (s390_fill_gregset, s390_store_last_break): Adjust.
8872 (target_regsets): Rename to ...
8873 (s390_regsets): ... this, and make static.
8874 (s390_get_pc, s390_set_pc): Adjust.
8875 (s390_get_hwcap): New target_desc parameter, and use it.
8876 [__s390x__] (have_hwcap_s390_high_gprs): New global.
8877 (s390_arch_setup): Adjust to set the current process'es target
8878 description. Don't adjust the regmap.
8879 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
8880 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
8881 (regs_info_3264): New globals.
8882 (s390_regs_info): New function.
8883 (the_low_target): Adjust.
8884 (initialize_low_arch): New function.
8885 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
8886 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
8887 [__mips64] (init_registers_mips_linux)
8888 (init_registers_mips_dsp_linux): Delete defines.
8889 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
8890 (have_dsp): New global.
8891 (mips_read_description): New, based on mips_arch_setup.
8892 (mips_arch_setup): Reimplement.
8893 (get_usrregs_info): New function.
8894 (mips_cannot_fetch_register, mips_cannot_store_register)
8895 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
8896 (mips_fill_fpregset, mips_store_fpregset): Adjust.
8897 (target_regsets): Rename to ...
8898 (mips_regsets): ... this, and make static.
8899 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
8900 (dsp_regs_info, regs_info): New globals.
8901 (mips_regs_info): New function.
8902 (the_low_target): Adjust.
8903 (initialize_low_arch): New function.
8904 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
8905 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
8906 Declare.
8907 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
8908 (arm_read_description): New, with bits factored from
8909 arm_arch_setup.
8910 (arm_arch_setup): Reimplement.
8911 (target_regsets): Rename to ...
8912 (arm_regsets): ... this, and make static.
8913 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
8914 (arm_regs_info): New function.
8915 (the_low_target): Adjust.
8916 (initialize_low_arch): New function.
8917 * linux-m68k-low.c (tdesc_m68k): Declare.
8918 (target_regsets): Rename to ...
8919 (m68k_regsets): ... this, and make static.
8920 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
8921 (m68k_regs_info): New function.
8922 (m68k_arch_setup): New function.
8923 (the_low_target): Adjust.
8924 (initialize_low_arch): New function.
8925 * linux-sh-low.c (tdesc_sharch): Declare.
8926 (target_regsets): Rename to ...
8927 (sh_regsets): ... this, and make static.
8928 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
8929 (sh_regs_info, sh_arch_setup): New functions.
8930 (the_low_target): Adjust.
8931 (initialize_low_arch): New function.
8932 * linux-bfin-low.c (tdesc_bfin): Declare.
8933 (bfin_arch_setup): New function.
8934 (bfin_usrregs_info, regs_info): New globals.
8935 (bfin_regs_info): New function.
8936 (the_low_target): Adjust.
8937 (initialize_low_arch): New function.
8938 * linux-cris-low.c (tdesc_cris): Declare.
8939 (cris_arch_setup): New function.
8940 (cris_usrregs_info, regs_info): New globals.
8941 (cris_regs_info): New function.
8942 (the_low_target): Adjust.
8943 (initialize_low_arch): New function.
8944 * linux-cris-low.c (tdesc_crisv32): Declare.
8945 (cris_arch_setup): New function.
8946 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
8947 (cris_regs_info): New function.
8948 (the_low_target): Adjust.
8949 (initialize_low_arch): New function.
8950 * linux-m32r-low.c (tdesc_m32r): Declare.
8951 (m32r_arch_setup): New function.
8952 (m32r_usrregs_info, regs_info): New globals.
8953 (m32r_regs_info): Adjust.
8954 (initialize_low_arch): New function.
8955 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
8956 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
8957 (tic6x_usrregs_info): Forward declare.
8958 (tic6x_read_description): New function, based on ...
8959 (tic6x_arch_setup): ... this. Reimplement.
8960 (target_regsets): Rename to ...
8961 (tic6x_regsets): ... this, and make static.
8962 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
8963 (tic6x_regs_info): New function.
8964 (the_low_target): Adjust.
8965 (initialize_low_arch): New function.
8966 * linux-xtensa-low.c (tdesc_xtensa): Declare.
8967 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
8968 (target_regsets): Rename to ...
8969 (xtensa_regsets): ... this, and make static.
8970 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
8971 globals.
8972 (xtensa_arch_setup, xtensa_regs_info): New functions.
8973 (the_low_target): Adjust.
8974 (initialize_low_arch): New function.
8975 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
8976 (nios2_arch_setup): Set the current process'es tdesc.
8977 (target_regsets): Rename to ...
8978 (nios2_regsets): ... this.
8979 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
8980 (nios2_regs_info): New function.
8981 (the_low_target): Adjust.
8982 (initialize_low_arch): New function.
8983 * linux-aarch64-low.c (tdesc_aarch64): Declare.
8984 (aarch64_arch_setup): Set the current process'es tdesc.
8985 (target_regsets): Rename to ...
8986 (aarch64_regsets): ... this.
8987 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
8988 (aarch64_regs_info): New function.
8989 (the_low_target): Adjust.
8990 (initialize_low_arch): New function.
8991 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
8992 globals.
8993 (target_regsets): Rename to ...
8994 (tile_regsets): ... this.
8995 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
8996 (tile_regs_info): New function.
8997 (tile_arch_setup): Set the current process'es tdesc.
8998 (the_low_target): Adjust.
8999 (initialize_low_arch): New function.
9000 * spu-low.c (tdesc_spu): Declare.
9001 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
9002 * win32-arm-low.c (tdesc_arm): Declare.
9003 (arm_arch_setup): New function.
9004 (the_low_target): Install arm_arch_setup instead of
9005 init_registers_arm.
9006 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
9007 (init_windows_x86): Rename to ...
9008 (i386_arch_setup): ... this. Set `win32_tdesc'.
9009 (the_low_target): Adjust.
9010 * win32-low.c (win32_tdesc): New global.
9011 (child_add_thread): Don't create the thread cache here.
9012 (do_initial_child_stuff): Set the new process'es tdesc.
9013 * win32-low.h (struct target_desc): Forward declare.
9014 (win32_tdesc): Declare.
9015 * lynx-i386-low.c (tdesc_i386): Declare global.
9016 (lynx_i386_arch_setup): Set `lynx_tdesc'.
9017 * lynx-low.c (lynx_tdesc): New global.
9018 (lynx_add_process): Set the new process'es tdesc.
9019 * lynx-low.h (struct target_desc): Forward declare.
9020 (lynx_tdesc): Declare global.
9021 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
9022 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
9023 * nto-low.c (nto_tdesc): New global.
9024 (do_attach): Set the new process'es tdesc.
9025 * nto-low.h (struct target_desc): Forward declare.
9026 (nto_tdesc): Declare.
9027 * nto-x86-low.c (tdesc_i386): Declare.
9028 (nto_x86_arch_setup): Set `nto_tdesc'.
9029
9030 2013-06-04 Gary Benson <gbenson@redhat.com>
9031
9032 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
9033 to qSupported response when appropriate.
9034 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
9035 with nonzero-length annex.
9036 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
9037 arguments supplied in annex.
9038
9039 2013-05-31 Doug Evans <dje@google.com>
9040
9041 PR server/15594
9042 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
9043 64 bits in 64-cross-32 environment.
9044
9045 2013-05-28 Pedro Alves <palves@redhat.com>
9046
9047 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
9048 (aarch64-without-fpu.c): Delete rule.
9049 * configure.srv (aarch64*-*-linux*): Remove references to
9050 aarch64-without-fpu.o and aarch64-without-fpu.xml.
9051 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
9052 declaration.
9053
9054 2013-05-24 Pedro Alves <palves@redhat.com>
9055
9056 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
9057 instead of strchr/decode_address. Error if the range isn't split
9058 with a ','. Don't assume there's be a ':' in the action.
9059
9060 2013-05-23 Yao Qi <yao@codesourcery.com>
9061 Pedro Alves <palves@redhat.com>
9062
9063 * linux-low.c (lwp_in_step_range): New function.
9064 (linux_wait_1): If the thread was range stepping and stopped
9065 outside the stepping range, report the stop to GDB. Otherwise,
9066 continue stepping. Add range stepping debug output.
9067 (linux_set_resume_request): Copy the step range from the resume
9068 request to the lwp.
9069 (linux_supports_range_stepping): New.
9070 (linux_target_ops) <supports_range_stepping>: Set to
9071 linux_supports_range_stepping.
9072 * linux-low.h (struct linux_target_ops)
9073 <supports_range_stepping>: New field.
9074 (struct lwp_info) <step_range_start, step_range_end>: New fields.
9075 * linux-x86-low.c (x86_supports_range_stepping): New.
9076 (the_low_target) <supports_range_stepping>: Set to
9077 x86_supports_range_stepping.
9078 * server.c (handle_v_cont): Handle 'r' action.
9079 (handle_v_requests): Append ";r" if the target supports range
9080 stepping.
9081 * target.h (struct thread_resume) <step_range_start,
9082 step_range_end>: New fields.
9083 (struct target_ops) <supports_range_stepping>:
9084 New field.
9085 (target_supports_range_stepping): New macro.
9086
9087 2013-05-17 Joel Brobecker <brobecker@adacore.com>
9088
9089 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
9090 confusion in comment.
9091
9092 2013-05-17 Joel Brobecker <brobecker@adacore.com>
9093
9094 * lynx-low.c (struct process_info_private): New type.
9095 (lynx_add_process): New function.
9096 (lynx_create_inferior, lynx_attach): Replace calls to
9097 add_process by calls to lynx_add_process.
9098 (lynx_resume): If PTID is null, then try using
9099 current_process()->private->last_wait_event_ptid.
9100 Add comments.
9101 (lynx_clear_inferiors): Delete. The contents of that function
9102 has been inlined in lynx_mourn;
9103 (lynx_wait_1): Save the ptid in the process's private data.
9104 (lynx_mourn): Free the process' private data. Replace call
9105 to lynx_clear_inferiors by call to clear_inferiors.
9106
9107 2013-05-17 Yao Qi <yao@codesourcery.com>
9108
9109 * i386-low.c (i386_length_and_rw_bits): Move the comment to
9110 the right place.
9111
9112 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
9113
9114 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
9115 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
9116 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
9117 PT_TEXT_END_ADDR guards. Update comments.
9118 (linux_target_op) <read_offsets>: Conditionally define to
9119 linux_read_offsets if the target is UCLIBC and if it defines
9120 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
9121
9122 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
9123 Andrew Jenner <andrew@codesourcery.com>
9124
9125 * Makefile.in (SFILES): Add linux-nios2-low.c.
9126 (clean): Add action to delete nios2-linux.c.
9127 (nios2-linux.c): New rule.
9128 * configure.srv: Add nios2*-*-linux*.
9129 * linux-nios2-low.c: New.
9130
9131 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
9132
9133 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
9134
9135 2013-04-25 Hui Zhu <hui@codesourcery.com>
9136
9137 PR gdb/15186
9138 * ax.c (ax_printf): Add fflush.
9139
9140 2013-04-22 Tom Tromey <tromey@redhat.com>
9141
9142 * Makefile.in (SFILES): Add filestuff.c.
9143 (OBS): Add filestuff.o.
9144 (filestuff.o): New target.
9145 * config.in, configure: Rebuild.
9146 * configure.ac: Check for fdwalk, pipe2.
9147
9148 2013-04-17 Pedro Alves <palves@redhat.com>
9149
9150 * configure.ac (USE_THREAD_DB): Delete variable.
9151 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
9152 Don't AC_SUBST USE_THREAD_DB.
9153 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
9154 * config.in, configure: Regenerate.
9155
9156 2013-04-16 Pedro Alves <palves@redhat.com>
9157
9158 * linux-low.h (struct lwp_info) <thread_known>: Move under
9159 the USE_THREAD_DB #ifdef.
9160
9161 2013-04-16 Pedro Alves <palves@redhat.com>
9162
9163 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
9164 (linux-low.o): Delete rule.
9165 * linux-low.h: Always include "gdb_thread_db.h" instead of
9166 conditionally including thread_db.h.
9167 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
9168 HAVE_THREAD_DB_H.
9169
9170 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
9171
9172 * Makefile.in (install-only): Fix make install regression.
9173
9174 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
9175
9176 Convert man pages to texinfo, new gdbinit.5 texinfo page.
9177 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
9178 installation.
9179 * gdbserver.1: Remove.
9180
9181 2013-03-22 Pedro Alves <palves@redhat.com>
9182
9183 * linux-low.c (handle_extended_wait): Don't call
9184 linux_enable_event_reporting.
9185
9186 2013-03-15 Tony Theodore <tonyt@logyst.com>
9187
9188 PR build/9098:
9189 * Makefile.in (SHELL): Use @SHELL@.
9190
9191 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
9192
9193 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
9194 compiler warning.
9195
9196 2013-03-13 Joel Brobecker <brobecker@adacore.com>
9197
9198 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
9199 Remove extraneous NULL element.
9200
9201 2013-03-13 Yao Qi <yao@codesourcery.com>
9202
9203 * tracepoint.c (traceframe_read_tsv): Look for the last matched
9204 'V' block in trace frame.
9205
9206 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
9207
9208 * target.h (struct target_ops): Add btrace ops.
9209 (target_supports_btrace): New macro.
9210 (target_enable_btrace): New macro.
9211 (target_disable_btrace): New macro.
9212 (target_read_btrace): New macro.
9213 * gdbthread.h (struct thread_info): Add btrace field.
9214 * server.c: Include btrace-common.h.
9215 (handle_btrace_general_set): New function.
9216 (handle_btrace_enable): New function.
9217 (handle_btrace_disable): New function.
9218 (handle_general_set): Call handle_btrace_general_set.
9219 (handle_qxfer_btrace): New function.
9220 (struct qxfer qxfer_packets[]): Add btrace entry.
9221 * inferiors.c (remove_thread): Disable btrace.
9222 * linux-low: Include linux-btrace.h.
9223 (linux_low_enable_btrace): New function.
9224 (linux_low_read_btrace): New function.
9225 (linux_target_ops): Add btrace ops.
9226 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
9227 Add srv_linux_btrace=yes.
9228 (x86_64-*-linux*): Add linux-btrace.o.
9229 Add srv_linux_btrace=yes.
9230 * configure.ac: Define HAVE_LINUX_BTRACE.
9231 * config.in: Regenerated.
9232 * configure: Regenerated.
9233
9234 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
9235
9236 * server.c (handle_qxfer): Preserve error message if -3 is
9237 returned.
9238 (qxfer): Document the -3 return value.
9239
9240 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
9241
9242 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
9243 (linux_btrace_h): New variable.
9244 (linux-btrace.o): New rule.
9245
9246 2013-03-08 Stan Shebs <stan@codesourcery.com>
9247 Hafiz Abid Qadeer <abidh@codesourcery.com>
9248
9249 * tracepoint.c (trace_buffer_size): New global.
9250 (DEFAULT_TRACE_BUFFER_SIZE): New define.
9251 (init_trace_buffer): Change to one-argument function. Allocate
9252 trace buffer memory.
9253 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
9254 handle QTBuffer:size packet.
9255 (cmd_bigqtbuffer_size): New function.
9256 (initialize_tracepoint): Call init_trace_buffer with
9257 DEFAULT_TRACE_BUFFER_SIZE.
9258 * server.c (handle_query): Add QTBuffer:size in the
9259 supported packets.
9260
9261 2013-03-07 Yao Qi <yao@codesourcery.com>
9262
9263 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
9264 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
9265 of -1.
9266 (cmd_qtsp): Adjust condition. Do post increment.
9267 Set cur_action and cur_step_action back to 0.
9268
9269 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
9270
9271 PR server/15236
9272 * linux-low.c (linux_write_memory): Return early success if LEN is
9273 zero.
9274
9275 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
9276
9277 * configure.srv: Add x86_64-*-cygwin* as target.
9278
9279 2013-02-28 Tom Tromey <tromey@redhat.com>
9280
9281 * configure.ac: Invoke AC_SYS_LARGEFILE.
9282 * configure, config.in: Rebuild.
9283
9284 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
9285
9286 * win32-low.c: Throughout, fix format strings and casts of
9287 printf-like functions to avoid type related warnings on all
9288 platforms.
9289 (get_child_debug_event): Print dwDebugEventCode as hex since
9290 that's how it's usually documented.
9291
9292 2013-02-28 Yao Qi <yao@codesourcery.com>
9293
9294 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
9295 pulongest.
9296
9297 2013-02-27 Jiong Wang <jiwang@tilera.com>
9298
9299 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
9300 (reg-tilegx32.c): New rule.
9301 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
9302 * linux-tile-low.c (tile_arch_setup): New function. Invoke
9303 different register info initializer according to elf class.
9304 (init_registers_tilgx32): New function. The tilegx32 register info
9305 initializer.
9306 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
9307 (tile_store_gregset): Likewise.
9308
9309 2013-02-27 Yao Qi <yao@codesourcery.com>
9310
9311 * server.c (process_point_options): Print debug message when
9312 debug_threads is true.
9313
9314 2013-02-26 Yao Qi <yao@codesourcery.com>
9315
9316 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
9317
9318 2013-02-19 Pedro Alves <palves@redhat.com>
9319 Kai Tietz <ktietz@redhat.com>
9320
9321 PR gdb/15161
9322
9323 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
9324 instead of strtoul to extract address from packet.
9325 (process_serial_event) <'z'>: Likewise.
9326
9327 2013-02-18 Yao Qi <yao@codesourcery.com>
9328
9329 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
9330
9331 2013-02-14 Pedro Alves <palves@redhat.com>
9332
9333 Plug memory leak.
9334
9335 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
9336 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
9337
9338 2013-02-14 Pedro Alves <palves@redhat.com>
9339
9340 * tracepoint.c (cmd_qtdpsrc): Use savestring.
9341
9342 2013-02-14 Pedro Alves <palves@redhat.com>
9343
9344 * tracepoint.c (save_string): Delete.
9345 (add_tracepoint_action): Use savestring instead of save_string.
9346
9347 2013-02-12 Pedro Alves <palves@redhat.com>
9348
9349 * linux-xtensa-low.c: Ditto.
9350 * xtensa-xtregs.c: Ditto.
9351
9352 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
9353
9354 * thread-db.c (thread_db_get_tls_address): NULL pointer check
9355 thread_db.
9356
9357 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
9358
9359 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
9360 aarch64_num_wp_regs and aarch64_num_bp_regs to
9361 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
9362
9363 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
9364
9365 * linux-aarch64-low.c (ps_get_thread_area): Replace
9366 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
9367
9368 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
9369 Marcus Shawcroft <marcus.shawcroft@arm.com>
9370 Nigel Stephens <nigel.stephens@arm.com>
9371 Yufeng Zhang <yufeng.zhang@arm.com>
9372
9373 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
9374 (aarch64.c, aarch64-without-fpu.c): New targets.
9375 * configure.srv (aarch64*-*-linux*): New.
9376 * linux-aarch64-low.c: New file.
9377
9378 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
9379
9380 * linux-low.c (handle_extended_wait, linux_create_inferior)
9381 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
9382 (dequeue_one_deferred_signal, linux_resume_one_thread)
9383 (fetch_register, linux_write_memory, linux_enable_event_reporting)
9384 (linux_tracefork_grandchild, linux_test_for_tracefork)
9385 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
9386 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
9387 where the argument is 0.
9388
9389 2013-01-25 Yao Qi <yao@codesourcery.com>
9390
9391 * event-loop.c: Include "queue.h".
9392 (gdb_event_p): New typedef.
9393 (struct gdb_event) <next_event>: Remove.
9394 (event_queue): Change to QUEUE(gdb_event_p).
9395 (async_queue_event): Remove.
9396 (gdb_event_xfree): New.
9397 (initialize_event_loop): New.
9398 (process_event): Use API from QUEUE.
9399 (wait_for_event): Likewise.
9400 * server.c (main): Call initialize_event_loop.
9401 * server.h (initialize_event_loop): Declare.
9402
9403 2013-01-18 Yao Qi <yao@codesourcery.com>
9404
9405 * ax.h (struct eval_agent_expr_context): New.
9406 (gdb_eval_agent_expr): Update declaration.
9407 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
9408 TFRAME. Add new argument CTX.
9409 * server.h (struct eval_agent_expr_context): Declare.
9410 (agent_mem_read, agent_tsv_read): Update declaration.
9411 (agent_mem_read_string): Likewise.
9412 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
9413 (add_traceframe_block): Add new argument TPOINT.
9414 Increase TPOINT->traceframe_usage.
9415 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
9416 eval_tracepoint_agent_expr.
9417 (condition_true_at_tracepoint): Likewise.
9418 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
9419 (agent_mem_read_string, agent_tsv_read): Likewise.
9420
9421 2013-01-16 Yao Qi <yao@codesourcery.com>
9422
9423 * linux-low.c (linux_resume_one_lwp): Don't check
9424 'lwp->bp_reinsert != 0'.
9425
9426 2013-01-07 Joel Brobecker <brobecker@adacore.com>
9427 Pedro Alves <palves@redhat.com>
9428
9429 * lynx-low.c (ptrace_request_to_str): Define a temporary
9430 macro and use it to simplify this function's implementation.
9431
9432 2013-01-07 Joel Brobecker <brobecker@adacore.com>
9433
9434 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
9435 sets errno.
9436
9437 2013-01-07 Joel Brobecker <brobecker@adacore.com>
9438
9439 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
9440
9441 2013-01-07 Joel Brobecker <brobecker@adacore.com>
9442
9443 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
9444
9445 2013-01-07 Joel Brobecker <brobecker@adacore.com>
9446
9447 * lynx-low.c (lynx_resume): Use the resume_info parameter
9448 to determine the ptid for the lynx_ptrace call, unless
9449 it is equal to minus_one_ptid, in which case we use the
9450 ptid of the current_inferior.
9451 (lynx_wait_1): After having received a thread create/exit
9452 event, resume the inferior's execution using the signaling
9453 thread's ptid, rather than the old ptid.
9454
9455 2013-01-07 Joel Brobecker <brobecker@adacore.com>
9456
9457 * lynx-low.c (lynx_resume): Delete variable ret.
9458
9459 2013-01-01 Joel Brobecker <brobecker@adacore.com>
9460
9461 * gdbreplay.c (gdbreplay_version): Update copyright year.
9462 * server.c (gdbserver_version): Likewise.
9463
9464 2012-12-17 Joel Brobecker <brobecker@adacore.com>
9465
9466 * lynx-low.c (lynx_wait_1): Add debug trace before adding
9467 new thread.
9468
9469 2012-12-17 Joel Brobecker <brobecker@adacore.com>
9470
9471 * lynx-low.c (ptrace_request_to_str): Add handling for
9472 PTRACE_GETTRACESIG.
9473
9474 2012-12-17 Joel Brobecker <brobecker@adacore.com>
9475
9476 * lynx-low.c (lynx_attach): Delete variable new_process.
9477
9478 2012-12-17 Joel Brobecker <brobecker@adacore.com>
9479
9480 * lynx-low.c (lynx_create_inferior): Delete variable
9481 new_process.
9482
9483 2012-12-17 Joel Brobecker <brobecker@adacore.com>
9484
9485 * lynx-low.c (ptrace_request_to_str): Do not handle
9486 PTRACE_GETTHREADLIST if this macro does not exist.
9487
9488 2012-12-15 Yao Qi <yao@codesourcery.com>
9489
9490 * Makefile.in (OBS): Add notif.o.
9491 * notif.c, notif.h: New.
9492 * server.c: Include "notif.h".
9493 (struct vstop_notif) <next>: Remove.
9494 <base>: New field.
9495 (queue_stop_reply): Update.
9496 (push_event, send_next_stop_reply): Remove.
9497 (discard_queued_stop_replies): Update.
9498 (notif_stop): New variable.
9499 (handle_v_stopped): Remove.
9500 (handle_v_requests): Don't call handle_v_stopped. Call
9501 handle_ack_notif instead.
9502 (queue_stop_reply_callback): Call notif_event_enque instead
9503 of queue_stop_reply.
9504 (handle_status): Don't call send_next_stop_reply, call
9505 notif_write_event instead.
9506 (kill_inferior_callback): Likewise.
9507 (detach_or_kill_inferior_callback): Likewise.
9508 (main): Call initialize_notif.
9509 (process_serial_event): Call QUEUE_is_empty.
9510 (handle_target_event): Call notif_push instead of push event.
9511 * server.h (push_event): Remove declaration.
9512
9513 2012-12-10 Tom Tromey <tromey@redhat.com>
9514
9515 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
9516 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
9517 macros.
9518 (.c.o): Rewrite.
9519 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
9520 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
9521 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
9522 (amd64-linux-ipa.o, ax.o): Rewrite.
9523 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
9524 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
9525 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
9526 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
9527 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
9528 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
9529 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
9530 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
9531 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
9532 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
9533 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
9534 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
9535 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
9536 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
9537 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
9538 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
9539 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
9540 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
9541 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
9542 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
9543 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
9544 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
9545 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
9546 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
9547 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
9548 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
9549 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
9550 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
9551 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
9552 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
9553 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
9554 (reg-tilegx.o): Remove.
9555 (all_object_files): New macro.
9556 Include .deps files.
9557 * aclocal.m4, configure: Rebuild.
9558 * acinclude.m4: Include depstand.m4, lead-dot.m4.
9559 * configure.ac: Invoke ZW_CREATE_DEPDIR,
9560 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
9561
9562 2012-12-05 Tom Tromey <tromey@redhat.com>
9563
9564 PR gdb/14917:
9565 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
9566
9567 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
9568
9569 * configure.ac: Check for linux/perf_event.h.
9570 * config.in: Regenerated.
9571 * configure: Regenerated.
9572
9573 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
9574
9575 * hostio.c (handle_readlink): Decrease buffer size
9576 parameter passed to readlink by one byte.
9577
9578 2012-11-26 Yao Qi <yao@codesourcery.com>
9579
9580 * configure.ac (build_warnings): Append '-Wempty-body'.
9581 * configure: Regenerated.
9582 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
9583 body.
9584
9585 2012-11-15 Pierre Muller <muller@sourceware.org>
9586
9587 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
9588 * config.in: Regenerate.
9589 * configure: Regenerate.
9590 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
9591 Use "gdb_wait.h" header instead of <sys/wait.h> header.
9592 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
9593 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
9594 header.
9595 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
9596 instead of <sys/wait.h> header.
9597 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
9598
9599 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
9600
9601 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
9602 (various make rules): Remove -DGDBSERVER
9603
9604 2012-11-09 Yao Qi <yao@codesourcery.com>
9605
9606 * spu-low.c (current_ptid): Move it to ..
9607 * gdbthread.h: ... here. New.
9608 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
9609 * server.c (myresume, process_serial_event): Likewise.
9610 * thread-db.c (thread_db_find_new_threads): Likewise.
9611 * tracepoint.c (run_inferior_command): Likewise.
9612
9613 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
9614
9615 * server.c (handle_search_memory_1): Include access length in
9616 warning message.
9617
9618 2012-09-05 Michael Brandt <michael.brandt@axis.com>
9619
9620 * linux-crisv32-low.c: Fix compile errors.
9621
9622 2012-09-04 Yao Qi <yao@codesourcery.com>
9623
9624 * tracepoint.c (cmd_qtsv): Adjust debug message.
9625 Don't check CUR_TPOINT.
9626
9627 2012-08-28 Yao Qi <yao@codesourcery.com>
9628
9629 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
9630 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
9631 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
9632 Remove declarations of xmalloc, xreallloc, xstrdup and
9633 freeargv.
9634 * Makefile.in (libiberty_h): New.
9635 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
9636 (linux-bfin-low.o): Append dependency 'libiberty.h'.
9637
9638 2012-08-23 Yao Qi <yao@codesourcery.com>
9639
9640 * server.h: Remove declaration of 'xsnprintf'.
9641
9642 2012-08-22 Keith Seitz <keiths@redhat.com>
9643
9644 * server.h: Include build-gnulib-gbserver/config.h.
9645 * gdbreplay.c: Likewise.
9646
9647 2012-08-08 Doug Evans <dje@google.com>
9648
9649 * Makefile.in (SFILES): Add gdb_vecs.c.
9650 (OBS): Add gdb_vecs.o.
9651 (gdb_vecs_h, host_defs_h): New variables.
9652 (thread-db.o): Add $(gdb_vecs_h) dependency.
9653 (gdb_vecs.o): New rule.
9654 * thread-db.c: #include "gdb_vecs.h".
9655 (thread_db_load_search): Use a vector to iterate over path elements.
9656 Handle text appearing after "$pdir".
9657
9658 * configure.ac: Add check for strstr.
9659 * config.in: Regenerate.
9660 * configure: Regenerate.
9661
9662 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
9663
9664 * hostio.c (handle_pread): If pread fails, fall back to attempting
9665 lseek/read.
9666 (handle_pwrite): Likewise for pwrite.
9667
9668 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
9669
9670 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
9671 between unsupported TYPE and unimplementable ADDR/LEN combination.
9672 (arm_insert_point): Act on new return value.
9673
9674 2012-07-31 Pedro Alves <palves@redhat.com>
9675
9676 * server.c (process_point_options): Only skip tokens if we find
9677 one that is unrecognized. Don't treat 'X' specially while
9678 skipping unrecognized tokens.
9679
9680 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
9681
9682 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
9683 to 4-byte-align HW breakpoint addresses for Thumb.
9684
9685 2012-07-27 Yao Qi <yao@codesourcery.com>
9686
9687 PR remote/14161.
9688
9689 * server.h: Declare gdb_agent_about_to_close.
9690 * target.c (kill_inferior): Include "agent.h".
9691 New. Send command 'kill'.
9692 * target.h (kill_inferior): Removed macro.
9693 * tracepoint.c (gdb_agent_about_to_close): New.
9694 (gdb_agent_helper_thread): Handle command 'close'.
9695 Wait endlessly until the inferior stops.
9696 Install gdb_agent_remove_socket to atexit hook.
9697 (agent_socket_name): New static variable.
9698 (gdb_agent_socket_init): Replace local variable 'name' with
9699 'agent_socket_name'.
9700 (gdb_agent_remove_socket): New.
9701
9702 2012-07-27 Yao Qi <yao@codesourcery.com>
9703
9704 * server.c (process_point_options): Stop at 'X' when parsing.
9705
9706 2012-07-19 Michael Eager <eager@eagercon.com>
9707
9708 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
9709 to hw_execute.
9710 * linux-x86-low.c (x86_insert_point, x86_remove_point):
9711 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
9712 hardware breakpoint.
9713
9714 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
9715
9716 * gdbserver/linux-low.c (initialize_low): Call
9717 linux_ptrace_init_warnings.
9718
9719 2012-07-02 Doug Evans <dje@google.com>
9720
9721 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
9722 pointer to int.
9723
9724 2012-07-02 Stan Shebs <stan@codesourcery.com>
9725
9726 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
9727 (ax.o): Add it to build rule.
9728 (ax-ipa.o): Ditto.
9729 (OBS): Add format.o.
9730 (IPA_OBS): Add format.o.
9731 * server.c (handle_query): Claim support for breakpoint commands.
9732 (process_point_options): Add command case.
9733 (process_serial_event): Leave running if there are printfs in
9734 effect.
9735 * mem-break.h (any_persistent_commands): Declare.
9736 (add_breakpoint_commands): Declare.
9737 (gdb_no_commands_at_breakpoint): Declare.
9738 (run_breakpoint_commands): Declare.
9739 * mem-break.c (struct point_command_list): New struct.
9740 (struct breakpoint): New field command_list.
9741 (any_persistent_commands): New function.
9742 (add_commands_to_breakpoint): New function.
9743 (add_breakpoint_commands): New function.
9744 (gdb_no_commands_at_breakpoint): New function.
9745 (run_breakpoint_commands): New function.
9746 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
9747 locally.
9748 * ax.c: Include format.h.
9749 (ax_printf): New function.
9750 (gdb_eval_agent_expr): Add printf opcode.
9751
9752 2012-06-13 Yao Qi <yao@codesourcery.com>
9753
9754 * server.c (start_inferior): Remove duplicated writes to fields
9755 'last_resume_kind' and 'last_status' of 'current_inferior'.
9756
9757 2012-06-12 Yao Qi <yao@codesourcery.com>
9758 Pedro Alves <palves@redhat.com>
9759
9760 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
9761 comment.
9762 * server.c (handle_v_cont): Extend comment.
9763
9764 2012-06-11 Yao Qi <yao@codesourcery.com>
9765
9766 * linux-low.c (linux_attach): Add 'static'.
9767
9768 2012-06-06 Yao Qi <yao@codesourcery.com>
9769
9770 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
9771
9772 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
9773
9774 Fix gcc -flto compilation warning.
9775 * server.c (main): Make variable multi_mode and attach volatile.
9776
9777 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9778
9779 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
9780 if the platform doesn't know about it.
9781
9782 2012-05-30 Jeff Kenton <jkenton@tilera.com>
9783
9784 * Makefile.in (SFILES): Add linux-tile-low.c.
9785 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
9786 * configure.srv: Handle tilegx-*-linux*.
9787 * linux-tile-low.c: New file.
9788
9789 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9790
9791 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
9792
9793 2012-05-24 Pedro Alves <palves@redhat.com>
9794
9795 PR gdb/7205
9796
9797 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
9798
9799 2012-05-24 Pedro Alves <palves@redhat.com>
9800
9801 PR gdb/7205
9802
9803 Replace target_signal with gdb_signal throughout.
9804
9805 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
9806
9807 * linux-low.c (linux_store_registers): Avoid the copying sequence
9808 when no data has been retrieved by ptrace.
9809
9810 2012-05-22 Will Deacon <will.deacon@arm.com>
9811
9812 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
9813 Include asm/ptrace.h.
9814 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
9815 already defined.
9816
9817 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
9818
9819 * linux-low.c (linux_store_registers): Don't re-retrieve data
9820 with ptrace that has already been obtained from /proc. Always
9821 copy any data retrieved with ptrace to the buffer supplied.
9822
9823 2012-05-11 Yao Qi <yao@codesourcery.com>
9824 Pedro Alves <palves@redhat.com>
9825
9826 * linux-low.c (enum stopping_threads_kind): New.
9827 (stopping_threads): Change type to `enum stopping_threads_kind'.
9828 (handle_extended_wait): If stopping and suspending threads, leave
9829 the new_lwp suspended too.
9830 (linux_wait_for_event): Adjust.
9831 (stop_all_lwps): Set `stopping_threads' to
9832 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
9833 whether we're suspending threads or just stopping them. Assert no
9834 recursion happens.
9835
9836 2012-04-29 Yao Qi <yao@codesourcery.com>
9837
9838 * server.h: Move some code to ...
9839 * gdbthread.h: ... here. New.
9840 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
9841 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
9842 (nto-low.o, win32-low.o): Likewise.
9843 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
9844 * regcache.c, remote-utils.c, server.c: Likewise.
9845 * target.c, tracepoint.c, win32-low.c: Likewise.
9846
9847 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9848
9849 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
9850 (PTRACE_ARG4_TYPE): Likewise.
9851 (PTRACE_XFER_TYPE): Likewise.
9852 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
9853 ptrace to PTRACE_ARG3_TYPE.
9854 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
9855 (PTRACE_ARG4_TYPE): Likewise.
9856 (PTRACE_XFER_TYPE): Likewise.
9857 (linux_detach_one_lwp): Cast fourth argument of
9858 ptrace to long then PTRACE_ARG4_TYPE.
9859 (regsets_fetch_inferior_registers): Cast third argument of
9860 ptrace to long then PTRACE_ARG3_TYPE.
9861 (regsets_store_inferior_registers): Likewise.
9862
9863 2012-04-20 Pedro Alves <palves@redhat.com>
9864
9865 * configure: Regenerate.
9866
9867 2012-04-19 Pedro Alves <palves@redhat.com>
9868
9869 * Makefile.in (GNULIB_BUILDDIR): New.
9870 (LIBGNU, INCGNU, GNULIB_H): Adjust.
9871 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
9872 (all, install-only, uninstall, clean-info, all-lib, clean): No
9873 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
9874 (maintainer-clean realclean distclean): Use subdir_do.
9875 (subdir_do): New.
9876 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
9877 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
9878 * acinclude.m4: Include acx_configure_dir.m4.
9879 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
9880 calls. Call AC_PROG_RANLIB. Configure gnulib using
9881 ACX_CONFIGURE_DIR.
9882 (GNULIB): New.
9883 (GNULIB_STDINT_H): Adjust.
9884 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
9885 * gdbreplay.c: Include build-gnulib/config.h.
9886 * server.h: Likewise.
9887 * aclocal.m4: Regenerate.
9888 * config.in: Regenerate.
9889 * configure: Regenerate.
9890
9891 2012-04-19 Pedro Alves <palves@redhat.com>
9892
9893 * Makefile.in (LIBGNU, INCGNU): Adjust.
9894 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
9895 (all, install-only, uninstall, clean-info, all-lib, clean)
9896 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
9897 * configure.ac: Adjust AC_OUTPUT output.
9898 * aclocal.m4: Regenerate.
9899 * configure: Regenerate.
9900
9901 2012-04-19 Pedro Alves <palves@redhat.com>
9902
9903 * Makefile.in (generated_files): New.
9904 (server_h): Remove the explicit dependency on config.h, and depend
9905 on $generated_files.
9906
9907 2012-04-19 Pedro Alves <palves@redhat.com>
9908
9909 * Makefile.in (INCGNU): Add -Ignulib.
9910
9911 2012-04-19 Pedro Alves <palves@redhat.com>
9912
9913 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
9914 (INCGNU): ... this, and spell out -I here.
9915 (GNULIB_LIB): Rename to ...
9916 (LIBGNU): ... this.
9917 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
9918
9919 2012-04-19 Pedro Alves <palves@redhat.com>
9920
9921 * config.in: Regenerate.
9922
9923 2012-04-19 Pedro Alves <palves@redhat.com>
9924
9925 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
9926 * server.h (memmem): Remove declaration.
9927 * config.in: Regenerate.
9928 * configure: Regenerate.
9929
9930 2012-04-19 Yao Qi <yao@codesourcery.com>
9931
9932 * Makefile.in (SFILES): Add common/vec.c.
9933 (OBS): Add vec.o.
9934 (vec.o): New rule.
9935
9936 2012-04-19 Yao Qi <yao@codesourcery.com>
9937
9938 * remote-utils.c (prepare_resume_reply): Replace with macro
9939 target_core_of_thread.
9940 * server.c (handle_qxfer_threads_proper): Likewise.
9941 * target.h (traget_core_of_thread): New macro.
9942
9943 2012-04-18 Pedro Alves <palves@redhat.com>
9944
9945 * aclocal.m4: Regenerate.
9946 * configure: Regenerate.
9947
9948 2012-04-16 Yao Qi <yao@codesourcery.com>
9949
9950 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
9951 duplicated on address.
9952
9953 2012-04-16 Yao Qi <yao@codesourcery.com>
9954
9955 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
9956 (struct tracepoint_action_ops) <send>: New field.
9957 (m_tracepoint_action_send, r_tracepoint_action_send): New.
9958 (agent_expr_send, x_tracepoint_action_send): New.
9959 (l_tracepoint_action_send): New.
9960 (cmd_qtdp): Download and install tracepoint
9961 according to `use_agent'.
9962 (run_inferior_command): Add one more parameter `len'.
9963 Update callers.
9964 (tracepoint_send_agent): New.
9965 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
9966
9967 2012-04-16 Yao Qi <yao@codesourcery.com>
9968
9969 * tracepoint.c (download_tracepoints): Moved to ...
9970 (cmd_qtstart): ... here.
9971
9972 2012-04-14 Yao Qi <yao@codesourcery.com>
9973
9974 * tracepoint.c: Include inttypes.h.
9975 (struct collect_memory_action): Use sized types.
9976 (struct tracepoint): Likewise.
9977 (cmd_qtdp, stop_tracing): Update print specifiers.
9978 (cmd_qtp, response_tracepoint): Likewise.
9979 (collect_data_at_tracepoint): Likewise.
9980 (collect_data_at_step): Likewise.
9981
9982 2012-04-14 Yao Qi <yao@codesourcery.com>
9983
9984 Import gnulib module inttypes.
9985 * aclocal.m4, config.in, configure: Regenerated.
9986
9987 2012-04-14 Yao Qi <yao@codesourcery.com>
9988
9989 * Makefile.in (maintainer-clean, realclean, distclean): Remove
9990 Makefile and config.status at last.
9991
9992 2012-04-13 Yao Qi <yao@codesourcery.com>
9993
9994 * tracepoint.c: Include stdint.h unconditionally.
9995
9996 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9997
9998 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
9999 on BFD_HAVE_SYS_PROCFS_TYPE.
10000 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
10001 * configure: Regenerate.
10002 * config.in: Likewise.
10003
10004 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
10005
10006 * Makefile.in (clean): Also remove x32.c x32-linux.c
10007 x32-avx.c x32-avx-linux.c.
10008 (x32.o): New target.
10009 (x32.c): Likewise.
10010 (x32-linux.o): Likewise.
10011 (x32-linux.c): Likewise.
10012 (x32-avx.o): Likewise.
10013 (x32-avx.c): Likewise.
10014 (x32-avx-linux.o): Likewise.
10015 (x32-avx-linux.c): Likewise.
10016
10017 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
10018 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
10019 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
10020 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
10021 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
10022 i386/x32-avx-linux.xml.
10023
10024 * linux-x86-low.c (init_registers_x32_linux): New prototype.
10025 (init_registers_x32_avx_linux): Likwise.
10026 (x86_linux_update_xmltarget): Call init_registers_x32_linux
10027 or init_registers_x32_avx_linux if linux_is_elf64 is false.
10028
10029 2012-04-13 Pedro Alves <palves@redhat.com>
10030
10031 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
10032 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
10033 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
10034 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
10035 the sub-make.
10036
10037 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
10038
10039 * linux-x86-low.c (compat_x32_clock_t): New.
10040 (compat_x32_siginfo_t): Likewise.
10041 (compat_x32_siginfo_from_siginfo): Likewise.
10042 (siginfo_from_compat_x32_siginfo): Likewise.
10043 (linux_is_elf64): Likewise.
10044 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
10045 and siginfo_from_compat_x32_siginfo for x32.
10046 (x86_arch_setup): Set linux_is_elf64.
10047
10048 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
10049
10050 PR gdb/13969
10051 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
10052 e_machine field.
10053 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
10054 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
10055 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
10056 compatible with process.
10057
10058 2012-04-12 Yao Qi <yao@codesourcery.com>
10059
10060 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
10061 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
10062 (install-only, install-info, clean): Handle sub dir gnulib.
10063 (all-lib, am--refresh): New targets.
10064 (memmem.o): Remove target.
10065 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
10066 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
10067 (AC_REPLACE_FUNCS): Remove memmem.
10068 Invoke gl_INIT and AM_INIT_AUTOMAKE.
10069 (AC_OUTPUT): Generate Makefile in gnulib/.
10070 * aclocal.m4, config.in, configure: Regenerated.
10071
10072 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
10073
10074 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
10075
10076 2012-04-05 Pedro Alves <palves@redhat.com>
10077
10078 -Werror=strict-aliasing
10079
10080 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
10081 pointer.
10082
10083 2012-04-04 Pedro Alves <palves@redhat.com>
10084
10085 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
10086 (sparc_store_gregset_from_stack, sparc_store_gregset)
10087 (sparc_breakpoint_at): Fix formatting.
10088
10089 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10090
10091 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
10092 are available.
10093 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
10094 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
10095 * config.in: Regenerate.
10096 * configure: Likewise.
10097
10098 2012-03-29 Pedro Alves <palves@redhat.com>
10099
10100 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
10101 Correct ptrace arguments.
10102
10103 2012-03-28 Pedro Alves <palves@redhat.com>
10104
10105 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
10106 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
10107 (IA64_FR1_REGNUM): New defines.
10108 (ia64_fetch_register): New.
10109 (the_low_target): Install it.
10110 * linux-low.h (struct linux_target_ops) <fetch_register>: New
10111 field.
10112 * linux-low.c (linux_fetch_registers): Try the
10113 the_low_target.fetch_register hook first.
10114
10115 * linux-arm-low.c (the_low_target): Adjust.
10116 * linux-bfin-low.c (the_low_target): Adjust.
10117 * linux-cris-low.c (the_low_target): Adjust.
10118 * linux-crisv32-low.c (the_low_target): Adjust.
10119 * linux-m32r-low.c (the_low_target): Adjust.
10120 * linux-m68k-low.c (the_low_target): Adjust.
10121 * linux-mips-low.c (the_low_target): Adjust.
10122 * linux-ppc-low.c (the_low_target): Adjust.
10123 * linux-s390-low.c (the_low_target): Adjust.
10124 * linux-sh-low.c (the_low_target): Adjust.
10125 * linux-sparc-low.c (the_low_target): Adjust.
10126 * linux-tic6x-low.c (the_low_target): Adjust.
10127 * linux-x86-low.c (the_low_target): Adjust.
10128 * linux-xtensa-low.c (the_low_target): Adjust.
10129
10130 2012-03-26 Pedro Alves <palves@redhat.com>
10131
10132 * server.c (handle_qxfer_libraries): Don't bail early if
10133 the_target->qxfer_libraries_svr4 is not NULL.
10134
10135 2012-03-26 Pedro Alves <palves@redhat.com>
10136
10137 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
10138
10139 2012-03-23 Pedro Alves <palves@redhat.com>
10140
10141 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
10142 "library-list-svr4" element's start tag when the the DSO list is
10143 empty.
10144
10145 2012-03-23 Pedro Alves <palves@redhat.com>
10146
10147 * linux-low.c (read_one_ptr): Read the inferior's pointer through
10148 a variable whose type size is the same as the inferior's pointer
10149 size.
10150
10151 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
10152
10153 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
10154 struct siginfo.
10155 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
10156 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
10157 * linux-low.h: Include <signal.h>.
10158 (struct siginfo): Remove forward declaration.
10159 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
10160 struct siginfo.
10161
10162 2012-03-21 Mike Frysinger <vapier@gentoo.org>
10163
10164 * .gitignore: Ignore more files.
10165
10166 2012-03-19 Pedro Alves <palves@redhat.com>
10167 Jan Kratochvil <jan.kratochvil@redhat.com>
10168
10169 * server.c (cont_thread, general_thread): Add describing comments.
10170 (start_inferior): Clear `cont_thread'.
10171 (handle_v_cont): Don't set `cont_thread' if resuming all threads
10172 of a process.
10173
10174 2012-03-15 Yao Qi <yao@codesourcery.com>
10175
10176 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
10177 handling to ...
10178 (cmd_qtdp): ... here.
10179
10180 2012-03-15 Yao Qi <yao@codesourcery.com>
10181
10182 * tracepoint.c (struct tracepoint_action_ops): New.
10183 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
10184 (m_tracepoint_action_download): New.
10185 (r_tracepoint_action_download): New.
10186 (x_tracepoint_action_download): New.
10187 (l_tracepoint_action_download): New.
10188 (add_tracepoint_action): Install `action->ops' according type.
10189 (download_tracepoint_1): Move code `download' function pointer
10190 of various tracepoint_action_ops.
10191
10192 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
10193
10194 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
10195 linux_ptrace_attach_warnings.
10196
10197 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
10198
10199 * Makefile.in (linux-ptrace.o): New.
10200 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
10201 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
10202 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
10203 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
10204 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
10205 of these targets.
10206 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
10207
10208 2012-03-08 Yao Qi <yao@codesourcery.com>
10209 Pedro Alves <palves@redhat.com>
10210
10211 Fix PR server/13392.
10212 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
10213 offset of JMP insn.
10214 * tracepoint.c (remove_tracepoint): New.
10215 (cmd_qtdp): Call remove_tracepoint when failed to install.
10216
10217 2012-03-07 Pedro Alves <palves@redhat.com>
10218
10219 * linux-low.c (get_detach_signal): New.
10220 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
10221 Pass on pending signals to PTRACE_DETACH. Check the result of the
10222 ptrace call.
10223 * server.c (program_signals, program_signals_p): New.
10224 (handle_general_set): Handle QProgramSignals.
10225 * server.h (program_signals, program_signals_p): Declare.
10226
10227 2012-03-05 Pedro Alves <palves@redhat.com>
10228 Jan Kratochvil <jan.kratochvil@redhat.com>
10229
10230 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
10231 New comment why.
10232
10233 2012-03-03 Yao Qi <yao@codesourcery.com>
10234
10235 * tracepoint.c (tracepoint_look_up_symbols): Update call to
10236 agent_look_up_symbols.
10237
10238 2012-03-03 Yao Qi <yao@codesourcery.com>
10239
10240 * Makefile.in (linux-low.o): Keep dependence on agent.h.
10241 (linux-x86-low.o): Likewise.
10242 * server.h: Remove in_process_agent_loaded.
10243 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
10244 common/agent.c.
10245 Update callers.
10246
10247 2012-03-03 Yao Qi <yao@codesourcery.com>
10248
10249 * tracepoint.c (gdb_agent_capability): New global.
10250 (in_process_agent_loaded_ust): Renamed to
10251 `in_process_agent_supports_ust'.
10252 Update callers.
10253 (in_process_agent_supports_ust): Call agent_capability_check.
10254 (clear_installed_tracepoints): Assert that agent supports
10255 agent.
10256
10257 2012-03-03 Yao Qi <yao@codesourcery.com>
10258
10259 * linux-low.c (linux_supports_agent): New.
10260 (linux_target_ops): Initialize field `supports_agent' with
10261 linux_supports_agent.
10262 * target.h (struct target_ops) <supports_agent>: New.
10263 (target_supports_agent): New macro.
10264 * server.c (handle_general_set): Handle packet 'QAgent'.
10265 (handle_query): Send `QAgent+'.
10266 * Makefile.in (server.o): Depends on agent.h.
10267
10268 2012-03-03 Yao Qi <yao@codesourcery.com>
10269
10270 * Makefile.in (OBS): Add agent.o.
10271 Add new rule for agent.o.
10272 Track dependence of tracepoint.c on agent.h.
10273 * tracepoint.c (run_inferior_command_1):
10274 (run_inferior_command): Call agent_run_command.
10275 (gdb_ust_connect_sync_socket): Deleted. Move it to
10276 common/agent.c.
10277 (resume_thread, stop_thread): Likewise.
10278 (gdb_ust_socket_init): Renamed to ...
10279 (gdb_agent_socket_init): ... New.
10280 (gdb_ust_thread): Renamed to ...
10281 (gdb_agent_helper_thread): ... New.
10282 (gdb_ust_init): Move some code to ...
10283 (gdb_agent_init): ... here. New.
10284 [HAVE_UST]: Call gdb_ust_init.
10285 (initialize_tracepoint_ftlib): Call gdb_agent_init.
10286 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
10287 * config.in, configure: Regenerated.
10288
10289 2012-03-02 Pedro Alves <palves@redhat.com>
10290
10291 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
10292 * linux-low.c (struct simple_pid_list): New.
10293 (stopped_pids): New a struct simple_pid_list pointer.
10294 (add_to_pid_list, pull_pid_from_list): New.
10295 (handle_extended_wait): Don't assume the first signal new children
10296 report is SIGSTOP. Adjust call to pull_pid_from_list.
10297 (linux_wait_for_lwp): Adjust.
10298
10299 2012-03-02 Yao Qi <yao@codesourcery.com>
10300
10301 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
10302 debug log.
10303
10304 2012-03-02 Yao Qi <yao@codesourcery.com>
10305
10306 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
10307 `stop_pc' and `tpoint'. Update caller.
10308
10309 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
10310
10311 * linux-low.h (linux_target_ops): Add regset_bitmap member.
10312 * linux-low.c (use_linux_regsets): New macro.
10313 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
10314 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
10315 (linux_register_in_regsets): New function.
10316 (usr_fetch_inferior_registers): Skip registers covered by
10317 regsets.
10318 (usr_store_inferior_registers): Likewise.
10319 (usr_fetch_inferior_registers): New macro.
10320 (usr_store_inferior_registers): Likewise.
10321 (linux_fetch_registers): Handle mixed regset/non-regset targets.
10322 (linux_store_registers): Likewise.
10323 * linux-mips-low.c (init_registers_mips_dsp_linux): New
10324 prototype.
10325 (init_registers_mips64_dsp_linux): Likewise.
10326 (init_registers_mips_linux): New macro.
10327 (init_registers_mips_dsp_linux): Likewise.
10328 (mips_dsp_num_regs): Likewise.
10329 (DSP_BASE, DSP_CONTROL): New fallback macros.
10330 (mips_base_regs): New macro.
10331 (mips_regmap): Use it. Fix the size.
10332 (mips_dsp_regmap): New variable.
10333 (mips_dsp_regset_bitmap): Likewise.
10334 (mips_arch_setup): New function.
10335 (mips_cannot_fetch_register): Use the_low_target.regmap rather
10336 than mips_regmap.
10337 (mips_cannot_store_register): Likewise.
10338 (the_low_target): Update .arch_setup, .num_regs and .regmap
10339 initializers. Add .regset_bitmap initializer.
10340 * linux-arm-low.c (the_low_target): Add .regset_bitmap
10341 initializer.
10342 * linux-bfin-low.c (the_low_target): Likewise.
10343 * linux-cris-low.c (the_low_target): Likewise.
10344 * linux-crisv32-low.c (the_low_target): Likewise.
10345 * linux-ia64-low.c (the_low_target): Likewise.
10346 * linux-m32r-low.c (the_low_target): Likewise.
10347 * linux-m68k-low.c (the_low_target): Likewise.
10348 * linux-ppc-low.c (the_low_target): Likewise.
10349 * linux-s390-low.c (the_low_target): Likewise.
10350 * linux-sh-low.c (the_low_target): Likewise.
10351 * linux-sparc-low.c (the_low_target): Likewise.
10352 * linux-tic6x-low.c (the_low_target): Likewise.
10353 * linux-x86-low.c (the_low_target): Likewise.
10354 * linux-xtensa-low.c (the_low_target): Likewise.
10355 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
10356 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
10357 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
10358 srv_xmlfiles.
10359 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
10360 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
10361
10362 2012-02-29 Yao Qi <yao@codesourcery.com>
10363 Pedro Alves <palves@redhat.com>
10364
10365 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
10366 `step_over_finished' is true.
10367
10368 2012-02-27 Pedro Alves <palves@redhat.com>
10369
10370 * linux-low.c (pid_is_stopped): Delete, moved to common/.
10371 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
10372
10373 2012-02-27 Pedro Alves <palves@redhat.com>
10374
10375 PR server/9684
10376 * linux-low.c (pid_is_stopped): New.
10377 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
10378
10379 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
10380
10381 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
10382 of conditions.
10383
10384 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
10385
10386 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
10387
10388 2012-02-24 Luis Machado <lgustavo@codesourcery>
10389
10390 * server.c (handle_query): Advertise support for target-side
10391 breakpoint condition evaluation.
10392 (process_point_options): New function.
10393 (process_serial_event): When inserting a breakpoint, check for
10394 a target-side condition that should be evaluated.
10395
10396 * mem-break.c: Include regcache.h and ax.h.
10397 (point_cond_list_t): New data structure.
10398 (breakpoint) <cond_list>: New field.
10399 (find_gdb_breakpoint_at): Make non-static.
10400 (delete_gdb_breakpoint_at): Clear any target-side
10401 conditions.
10402 (clear_gdb_breakpoint_conditions): New function.
10403 (add_condition_to_breakpoint): Likewise.
10404 (add_breakpoint_condition): Likewise.
10405 (gdb_condition_true_at_breakpoint): Likewise.
10406 (gdb_breakpoint_here): Return result directly instead
10407 of going through a local variable.
10408
10409 * mem-break.h (find_gdb_breakpoint_at): New prototype.
10410 (clear_gdb_breakpoint_conditions): Likewise.
10411 (add_breakpoint_condition): Likewise.
10412 (gdb_condition_true_at_breakpoint): Likewise.
10413
10414 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
10415 (need_step_over_p): Take target-side breakpoint condition into
10416 consideration.
10417
10418 2012-02-24 Luis Machado <lgustavo@codesourcery>
10419
10420 * server.h: Include tracepoint.h.
10421 (agent_mem_read, agent_get_trace_state_variable_value,
10422 agent_set_trace_state_variable_value,
10423 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
10424 get_set_tsv_func_addr): New prototypes.
10425
10426 * ax.h: New include file.
10427 * ax.c: New source file.
10428
10429 * tracepoint.c: Include ax.h.
10430 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
10431 agent_expr, eval_result_type): Move to ax.h.
10432 (parse_agent_expr): Rename to ...
10433 (gdb_parse_agent_expr): ... this, make it non-static and move
10434 to ax.h.
10435 (unparse_agent_expr) Rename to ...
10436 (gdb_unparse_agent_expr): ... this, make it non-static and move
10437 to ax.h.
10438 (eval_agent_expr): Rename to ...
10439 (eval_tracepoint_agent_expr): ... this.
10440 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
10441 forward declarations.
10442 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
10443 (agent_get_trace_state_variable_value): New function.
10444 (agent_set_trace_state_variable_value): New function.
10445 (cmd_qtdp): Call gdb_parse_agent_expr (...).
10446 (response_tracepoint): Call gdb_unparse_agent_expr (...).
10447 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
10448 (condition_true_at_tracepoint): Likewise.
10449 (parse_agent_expr): Rename to ...
10450 (gdb_parse_agent_expr): ... this and move to ax.c.
10451 (unparse_agent_expr): Rename to ...
10452 (gdb_unparse_agent_expr): ... this and move to ax.c.
10453 (gdb_agent_op_name): Move to ax.c.
10454 (eval_agent_expr): Rename to ...
10455 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
10456 and move to ax.c.
10457 (eval_tracepoint_agent_expr): New function.
10458 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
10459 non-static.
10460 (current_insn_ptr, emit_error, struct bytecode_address): Move to
10461 ax.c.
10462 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
10463 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
10464 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
10465 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
10466 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
10467 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
10468 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
10469 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
10470 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
10471 (compile_bytecodes): Remove forward declaration.
10472 (is_goto_target): Move to ax.c.
10473 (compile_bytecodes): Move to ax.c and call
10474 agent_get_trace_state_variable_value (...) and
10475 agent_set_trace_state_variable_value (...).
10476
10477 * Makefile.in: Update ax.c and IPA dependencies.
10478
10479 2012-02-24 Pedro Alves <palves@redhat.com>
10480
10481 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
10482 (cmd_bigqtbuffer_circular): ... this. Only handle
10483 'QTBuffer:circular:'.
10484 (handle_tracepoint_general_set): Adjust.
10485
10486 2012-02-16 Yao Qi <yao@codesourcery.com>
10487
10488 * inferiors.c: Move code to ...
10489 * dll.c: .... here. New.
10490 * server.h: Declare clear_dlls.
10491 * Makefile.in (SFILES): Add dll.c.
10492 (OBS): Add dll.o
10493 (dll.o): New rule.
10494
10495 2012-02-11 Yao Qi <yao@codesourcery.com>
10496
10497 * server.c: (handle_monitor_command): Add a new parameter
10498 `own_buf'.
10499 (handle_query): Update caller.
10500
10501 2012-02-09 Joel Brobecker <brobecker@adacore.com>
10502
10503 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
10504 * configure, config.in: Regenerate.
10505 * hostio.c: Provide an alternate implementation if HAVE_READLINK
10506 is not defined.
10507
10508 2012-02-02 Pedro Alves <palves@redhat.com>
10509
10510 Try SIGKILL first, then PTRACE_KILL.
10511 * linux-low.c (linux_kill_one_lwp): New.
10512 (linux_kill_one_lwp): Rename to ...
10513 (kill_one_lwp_callback): ... this. Use the new
10514 linux_kill_one_lwp.
10515
10516 2012-02-02 Pedro Alves <palves@redhat.com>
10517
10518 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
10519 inferior.
10520
10521 2012-01-27 Pedro Alves <palves@redhat.com>
10522
10523 * linux-low.c (linux_child_pid_to_exec_file): Delete.
10524 (elf_64_file_p): Make static.
10525 (linux_pid_exe_is_elf_64_file): New.
10526 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
10527 Delete declarations.
10528 (linux_pid_exe_is_elf_64_file): Declare.
10529 * linux-x86-low.c (x86_arch_setup): Use
10530 linux_pid_exe_is_elf_64_file.
10531
10532 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
10533
10534 * linux-low.c (linux_wait_for_event_1): Rename to ...
10535 (linux_wait_for_event): ... here and merge it with former
10536 linux_wait_for_event - new variable wait_ptid, use it.
10537 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
10538
10539 2012-01-23 Pedro Alves <palves@redhat.com>
10540
10541 * server.c (main): Avoid yet another case of infinite loop while
10542 detaching/killing after a longjmp.
10543
10544 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
10545
10546 Code cleanup.
10547 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
10548
10549 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
10550
10551 * hostio.c (handle_readlink): New function.
10552 (handle_vFile): Call it to handle "vFile:readlink" packets.
10553
10554 2012-01-20 Pedro Alves <palves@redhat.com>
10555 Ulrich Weigand <ulrich.weigand@linaro.org>
10556
10557 * server.c (handle_v_requests): Only support vAttach and vRun to
10558 start multiple processes when in extended protocol mode.
10559
10560 2012-01-17 Pedro Alves <palves@redhat.com>
10561
10562 * tracepoint.c (initialize_tracepoint): Use mmap instead of
10563 memalign plus mprotect to allocate the scratch buffer.
10564
10565 2012-01-13 Pedro Alves <palves@redhat.com>
10566
10567 * server.c (attach_inferior): Clear `cont_thread'.
10568
10569 2012-01-13 Pedro Alves <palves@redhat.com>
10570
10571 * server.c (main): Avoid infinite loop while detaching/killing
10572 after a longjmp.
10573
10574 2012-01-09 Doug Evans <dje@google.com>
10575
10576 * server.c (start_inferior): Set last_ptid in --wrapper case.
10577
10578 2012-01-06 Yao Qi <yao@codesourcery.com>
10579
10580 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
10581 defined.
10582 [IN_PROCESS_AGENT] (debug_agent): New global variable.
10583
10584 2012-01-04 Yao Qi <yao@codesourcery.com>
10585
10586 * tracepoint.c (cmd_qtdp): Print debug message
10587 for static tracepoint.
10588
10589 2012-01-04 Yao Qi <yao@codesourcery.com>
10590
10591 * tracepoint.c (trace_vdebug): Differentiate debug message
10592 between gdbserver and IPA.
10593
10594 2012-01-03 Yao Qi <yao@codesourcery.com>
10595
10596 * tracepoint.c (tracepoint_was_hit): Don't collect for
10597 static tracepoint.
10598
10599 2012-01-02 Joel Brobecker <brobecker@adacore.com>
10600
10601 * terminal.h: Reformat copyright header.
10602
10603 2012-01-02 Joel Brobecker <brobecker@adacore.com>
10604
10605 * server.c (gdbserver_version): Update copyright year.
10606 * gdbreplay.c (gdbreplay_version): Likewise.
10607
10608 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
10609
10610 * linux-low.c (linux_create_inferior): Put empty if clause for write.
10611
10612 Revert:
10613 2011-12-18 Hui Zhu <teawater@gmail.com>
10614 * linux-low.c (linux_create_inferior): Save return value to ret.
10615
10616 2011-12-18 Hui Zhu <teawater@gmail.com>
10617
10618 * linux-low.c (linux_create_inferior): Save return value to ret.
10619
10620 2011-12-16 Doug Evans <dje@google.com>
10621
10622 * linux-low.c (linux_create_inferior): If stdio connection,
10623 redirect stdin from /dev/null, stdout to stderr.
10624 * remote-utils.c (remote_is_stdio): New static global.
10625 (remote_connection_is_stdio): New function.
10626 (remote_prepare): Handle stdio connection.
10627 (remote_open): Ditto.
10628 (remote_close): Don't close stdin for stdio connections.
10629 (read_prim,write_prim): New functions. Replace all calls to
10630 read/write to these.
10631 * server.c (main): Watch for "-" argument. Move call to
10632 remote_prepare before start_inferior.
10633 * server.h (STDIO_CONNECTION_NAME): New macro.
10634 (remote_connection_is_stdio): Declare.
10635
10636 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
10637 in debugging output.
10638
10639 2011-12-15 Yao Qi <yao@codesourcery.com>
10640
10641 * tracepoint.c: Include sys/syscall.h.
10642 (gdb_ust_thread): Remove preprocessor conditional.
10643
10644 2011-12-14 Pedro Alves <pedro@codesourcery.com>
10645
10646 * linux-low.c (linux_detach_one_lwp): Call
10647 the_low_target.prepare_to_resume before detaching.
10648
10649 2011-12-14 Yao Qi <yao@codesourcery.com>
10650
10651 * tracepoint.c (gdb_ust_thread): Don't ignore return value
10652 of write.
10653
10654 2011-12-14 Yao Qi <yao@codesourcery.com>
10655
10656 * i386-low.c (i386_low_stopped_data_address): Initialize local
10657 variable `control'.
10658
10659 2011-12-13 Pedro Alves <pedro@codesourcery.com>
10660
10661 PR remote/13492
10662
10663 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
10664 DR_CONTROL unless necessary. Extend comments.
10665 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
10666 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
10667
10668 2011-12-13 Yao Qi <yao@codesourcery.com>
10669
10670 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
10671 macros.
10672 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
10673
10674 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
10675
10676 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
10677 Print new debug message for such case.
10678
10679 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
10680
10681 Fix overlapping memcpy.
10682 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
10683 the read_inferior_memory transfer.
10684 (delete_fast_tracepoint_jump): New variable buf. Use it for the
10685 write_inferior_memory transfer.
10686 (set_fast_tracepoint_jump): New variable buf. Use it for the
10687 read_inferior_memory and write_inferior_memory transfers.
10688 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
10689 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
10690 Use it for the write_inferior_memory transfer.
10691 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
10692 buffers.
10693
10694 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
10695
10696 * linux-low.c (fetch_register, store_register): Make code
10697 consistent, fix formatting.
10698
10699 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
10700
10701 * linux-low.c (usr_store_inferior_registers): Factor out code
10702 to handle individual registers into...
10703 (store_register): ... this new function.
10704
10705 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
10706
10707 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
10708 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
10709 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
10710 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
10711 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
10712 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
10713 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
10714 (srv_xmlfiles): Add new XML files.
10715
10716 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
10717 and <sys/uio.h>.
10718 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
10719 (init_registers_s390_linux32v1): Add prototype.
10720 (init_registers_s390_linux32v2): Likewise.
10721 (init_registers_s390_linux64v1): Likewise.
10722 (init_registers_s390_linux64v2): Likewise.
10723 (init_registers_s390x_linux64v1): Likewise.
10724 (init_registers_s390x_linux64v2): Likewise.
10725 (s390_num_regs): Increment to 52.
10726 (s390_regmap): Add orig_r2 register.
10727 (s390_num_regs_3264): Increment to 68.
10728 (s390_regmap_3264): Add orig_r2 register.
10729 (s390_collect_ptrace_register): Handle orig_r2 register.
10730 (s390_supply_ptrace_register): Likewise.
10731 (s390_fill_last_break): New function.
10732 (s390_store_last_break): Likewise.
10733 (s390_fill_system_call): New function.
10734 (s390_store_system_call): Likewise.
10735 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
10736 register sets.
10737 (s390_check_regset): New function.
10738 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
10739 NT_S390_SYSTEM_CALL regsets and use appropriate description.
10740 Update target_regsets for available register sets.
10741
10742 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
10743 Jan Kratochvil <jan.kratochvil@redhat.com>
10744
10745 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
10746 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
10747 New.
10748 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
10749 * linux-low.h (struct process_info_private): New member r_debug.
10750 * server.c (handle_qxfer_libraries): Call
10751 the_target->qxfer_libraries_svr4.
10752 (handle_qxfer_libraries_svr4): New function.
10753 (qxfer_packets): New entry "libraries-svr4".
10754 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
10755 * target.h (struct target_ops): New member qxfer_libraries_svr4.
10756 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
10757 PACKET_qXfer_libraries_svr4.
10758
10759 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
10760
10761 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
10762 PSW address/mask between 8-byte and 16-byte formats.
10763 (s390_supply_ptrace_register): Likewise.
10764 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
10765 basic addressing mode bit.
10766
10767 2011-11-24 Stan Shebs <stan@codesourcery.com>
10768
10769 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
10770
10771 2011-11-17 Stan Shebs <stan@codesourcery.com>
10772
10773 * tracepoint.c (struct tracepoint): New field traceframe_usage.
10774 (tracing_start_time): New global.
10775 (tracing_stop_time): New global.
10776 (tracing_user_name): New global.
10777 (tracing_notes): New global.
10778 (tracing_stop_note): New global.
10779 (cmd_qtstart): Set traceframe_usage, start_time.
10780 (stop_tracing): Set stop_time.
10781 (cmd_qtstatus): Report additional status.
10782 (cmd_qtp): New function.
10783 (handle_tracepoint_query): Call it.
10784 (cmd_qtnotes): New function.
10785 (handle_tracepoint_general_set): Call it.
10786 (get_timestamp): Rename from tsv_get_timestamp.
10787
10788 2011-11-14 Stan Shebs <stan@codesourcery.com>
10789 Kwok Cheung Yeung <kcy@codesourcery.com>
10790
10791 * linux-x86-low.c (small_jump_insn): New.
10792 (i386_install_fast_tracepoint_jump_pad): Add arguments for
10793 trampoline and error message, build a trampoline and issue a small
10794 jump instruction to it.
10795 (x86_install_fast_tracepoint_jump_pad): Add arguments for
10796 trampoline and error message.
10797 (x86_get_min_fast_tracepoint_insn_len): New.
10798 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
10799 * linux-low.h (struct linux_target_ops): Add arguments to
10800 install_fast_tracepoint_jump_pad operation, add new operation.
10801 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
10802 arguments.
10803 (linux_get_min_fast_tracepoint_insn_len): New function.
10804 (linux_target_op): Add new operation.
10805 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
10806 (gdb_trampoline_buffer_end): Ditto.
10807 (gdb_trampoline_buffer_error): Ditto.
10808 (struct ipa_sym_addresses): Add fields for new IPA variables.
10809 (symbol_list): Add entries for new IPA variables.
10810 (struct tracepoint): Add fields to hold the address range of the
10811 trampoline used by the tracepoint.
10812 (trampoline_buffer_head): New static variable.
10813 (trampoline_buffer_tail): Ditto.
10814 (claim_trampoline_space): New function.
10815 (have_fast_tracepoint_trampoline_buffer): New function.
10816 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
10817 structure.
10818 (install_fast_tracepoint): Ditto, also add error buffer argument.
10819 (cmd_qtminftpilen): New function.
10820 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
10821 (fast_tracepoint_from_trampoline_address): New function.
10822 (fast_tracepoint_collecting): Handle trampoline as part of jump
10823 pad space.
10824 (set_trampoline_buffer_space): New function.
10825 (initialize_tracepoint): Initialize new IPA variables.
10826 * target.h (struct target_ops): Add arguments to
10827 install_fast_tracepoint_jump_pad operation, add new
10828 get_min_fast_tracepoint_insn_len operation.
10829 (target_get_min_fast_tracepoint_insn_len): New.
10830 (install_fast_tracepoint_jump_pad): Add arguments.
10831 * server.h (IPA_BUFSIZ): Define.
10832 * linux-i386-ipa.c: Include extra header files.
10833 (initialize_fast_tracepoint_trampoline_buffer): New function.
10834 (initialize_low_tracepoint): Call it.
10835 * server.h (set_trampoline_buffer_space): Declare.
10836 (claim_trampoline_space): Ditto.
10837 (have_fast_tracepoint_trampoline_buffer): Ditto.
10838
10839 2011-11-14 Yao Qi <yao@codesourcery.com>
10840
10841 * server.c (handle_query): Handle InstallInTrace for qSupported.
10842 * tracepoint.c (add_tracepoint): Sort list.
10843 (install_tracepoint, download_tracepoint): New.
10844 (cmd_qtdp): Call them to install and download tracepoints.
10845 (sort_tracepoints): Removed.
10846 (cmd_qtstart): Update.
10847
10848 2011-11-14 Yao Qi <yao@codesourcery.com>
10849
10850 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
10851 * mem-break.h: Declare.
10852 * tracepoint.c (cmd_qtstart): Move some code to ...
10853 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
10854 New.
10855 (download_tracepoints): Move some code to ...
10856 (download_tracepoint_1): ... here. New.
10857
10858 2011-11-08 Yao Qi <yao@codesourcery.com>
10859
10860 * remote-utils.c (relocate_instruction): A comment fix.
10861
10862 2011-11-07 Joel Brobecker <brobecker@adacore.com>
10863
10864 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
10865 (i386_dr_low_get_control, i386_dr_low_get_status): Use
10866 dr_status_mirror and dr_control_mirror from debug_reg_state.
10867 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
10868 (i386_initial_stuff): Remove use of deleted globals.
10869 (i386_get_thread_context, i386_set_thread_context,
10870 i386_thread_added): Use dr_status_mirror and dr_control_mirror
10871 from debug_reg_state.
10872
10873 2011-11-05 Yao Qi <yao@codesourcery.com>
10874
10875 * tracepoint.c (gdb_collect): Loop over tracepoints of same
10876 address as TPOINT's.
10877
10878 2011-11-02 Stan Shebs <stan@codesourcery.com>
10879
10880 * tracepoint.c (agent_mem_read_string): New function.
10881 (eval_agent_expr): Call it for tracenz.
10882 * server.c (handle_query): Report support for tracenz.
10883
10884 2011-11-02 Yao Qi <yao@codesourcery.com>
10885
10886 * tracepoint.c (cmd_qtstart): Remove unused local variables.
10887
10888 2011-11-02 Yao Qi <yao@codesourcery.com>
10889
10890 * target.h: Fix a typo in comment.
10891
10892 2011-10-31 Pedro Alves <pedro@codesourcery.com>
10893
10894 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
10895 clobber the breakpoints' shadows with fast tracepoint jumps.
10896 * mem-break.h (check_mem_write): Add `myaddr' parameter.
10897 * target.c (write_inferior_memory): Also pass MYADDR down to
10898 check_mem_write.
10899
10900 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
10901
10902 * configure.ac: Check support for personality routine.
10903 * configure: Regenerate.
10904 * config.in: Likewise.
10905 * linux-low.c: Include <sys/personality.h>.
10906 Define ADDR_NO_RANDOMIZE if necessary.
10907 (linux_create_inferior): Disable address space randomization when
10908 forking inferior, if requested.
10909 (linux_supports_disable_randomization): New function.
10910 (linux_target_ops): Install it.
10911 * server.h (disable_randomization): Declare.
10912 * server.c (disable_randomization): New global variable.
10913 (handle_general_set): Handle QDisableRandomization.
10914 (handle_query): Likewise for qSupported.
10915 (main): Support --disable-randomization and --no-disable-randomization
10916 command line arguments.
10917 * target.h (struct target_ops): Add supports_disable_randomization.
10918 (target_supports_disable_randomization): New macro.
10919
10920 2011-09-29 Mike Frysinger <vapier@gentoo.org>
10921
10922 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
10923 ifdef check.
10924 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
10925 [!PT_GETDSBT] (target_loadmap): New definition.
10926 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
10927 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
10928 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
10929 and PT_GETDSBT to LINUX_LOADMAP.
10930 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
10931 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
10932
10933 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
10934
10935 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
10936 (arm_linux_hwbp_cap): New static variable.
10937 (arm_linux_get_hwbp_cap): Replace by ...
10938 (arm_linux_init_hwbp_cap): ... this new function.
10939 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
10940 (arm_linux_get_hw_watchpoint_count): Likewise.
10941 (arm_linux_get_hw_watchpoint_max_length): Likewise.
10942 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
10943 (arm_prepare_to_resume): Use perror_with_name instead of error.
10944
10945 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
10946
10947 * linux-arm-low.c: Include <signal.h>.
10948 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
10949 (struct arm_linux_hwbp_cap): New data type.
10950 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
10951 (struct arm_linux_hw_breakpoint): New data type.
10952 (MAX_BPTS, MAX_WPTS): Define.
10953 (struct arch_process_info, struct arch_lwp_info): New data types.
10954 (arm_linux_get_hwbp_cap): New function.
10955 (arm_linux_get_hw_breakpoint_count): Likewise.
10956 (arm_linux_get_hw_watchpoint_count): Likewise.
10957 (arm_linux_get_hw_watchpoint_max_length): Likewise.
10958 (arm_hwbp_control_initialize): Likewise.
10959 (arm_hwbp_control_is_enabled): Likewise.
10960 (arm_hwbp_control_is_initialized): Likewise.
10961 (arm_hwbp_control_disable): Likewise.
10962 (arm_linux_hw_breakpoint_equal): Likewise.
10963 (arm_linux_hw_point_initialize): Likewise.
10964 (struct update_registers_data): New data structure.
10965 (update_registers_callback: New function.
10966 (arm_insert_point): Likewise.
10967 (arm_remove_point): Likewise.
10968 (arm_stopped_by_watchpoint): Likewise.
10969 (arm_stopped_data_address): Likewise.
10970 (arm_new_process): Likewise.
10971 (arm_new_thread): Likewise.
10972 (arm_prepare_to_resume): Likewise.
10973 (the_low_target): Register arm_insert_point, arm_remove_point,
10974 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
10975 arm_new_thread, and arm_prepare_to_resume.
10976
10977 2011-09-15 Stan Shebs <stan@codesourcery.com>
10978
10979 * server.h (struct emit_ops): Add compare-goto fields.
10980 * tracepoint.c (gdb_agent_op_sizes): New table.
10981 (emit_eq_goto): New function.
10982 (emit_ne_goto): New function.
10983 (emit_lt_goto): New function.
10984 (emit_le_goto): New function.
10985 (emit_gt_goto): New function.
10986 (emit_ge_goto): New function.
10987 (is_goto_target): New function.
10988 (compile_bytecodes): Recognize special cases of compare-goto
10989 combinations and call specialized emitters for them.
10990 * linux-x86-low.c (amd64_emit_eq_goto): New function.
10991 (amd64_emit_ne_goto): New function.
10992 (amd64_emit_lt_goto): New function.
10993 (amd64_emit_le_goto): New function.
10994 (amd64_emit_gt_goto): New function.
10995 (amd64_emit_ge_goto): New function.
10996 (amd64_emit_ops): Add the new functions.
10997 (i386_emit_eq_goto): New function.
10998 (i386_emit_ne_goto): New function.
10999 (i386_emit_lt_goto): New function.
11000 (i386_emit_le_goto): New function.
11001 (i386_emit_gt_goto): New function.
11002 (i386_emit_ge_goto): New function.
11003 (i386_emit_ops): Add the new functions.
11004
11005 2011-09-08 Stan Shebs <stan@codesourcery.com>
11006
11007 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
11008 (i386_emit_epilogue): Restore %ebx.
11009
11010 2011-08-31 Jie Zhang <jzhang918@gmail.com>
11011
11012 * server.c (step_thread): Remove definition.
11013 (process_serial_event): Don't handle Hs.
11014 * server.h (step_thread): Remove declaration.
11015 * target.c (set_desired_inferior): Remove use of step_thread.
11016
11017 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
11018
11019 * linux-low.c: Include linux-procfs.h.
11020 (linux_attach_lwp_1): Update comments.
11021 (linux_attach): Scan for existing threads when attaching to a
11022 process that is the tgid.
11023 * Makefile.in: Update dependencies.
11024
11025 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
11026
11027 * configure.srv: Add linux-procfs.o dependencies.
11028
11029 2011-08-14 Yao Qi <yao@codesourcery.com>
11030
11031 * target.h (struct target_ops): Fix indent.
11032 * win32-low.c (win32_target_ops): Fix comment.
11033
11034 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
11035 Yao Qi <yao@codesourcery.com>
11036
11037 * Makefile.in (clean): Remove tic6x-*.c files.
11038 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
11039 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
11040 (tic6x-c64xp-linux.c): Likewise.
11041 * configure.srv: Add support for tic6x-*-uclinux.
11042 * linux-tic6x-low.c: New.
11043 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
11044
11045 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
11046 Yao Qi <yao@codesourcery.com>
11047
11048 * target.h (struct target_ops): Add read_loadmap.
11049 * linux-low.c (struct target_loadseg): New type.
11050 (struct target_loadmap): New type.
11051 (linux_read_loadmap): New function.
11052 (linux_target_ops): Add linux_read_loadmap.
11053 * server.c (handle_query): Support qXfer:fdpic:read packet.
11054 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
11055 to NULL.
11056
11057 2011-08-05 Eli Zaretskii <eliz@gnu.org>
11058
11059 * win32-low.c: Include <stdint.h>.
11060
11061 2011-07-22 Pedro Alves <pedro@codesourcery.com>
11062
11063 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
11064 to the inferior here.
11065 (i386_remove_aligned_watchpoint): Ditto.
11066 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
11067 fit part of the watchpoint in the debug registers.
11068 (i386_update_inferior_debug_regs): New.
11069 (i386_low_insert_watchpoint): Work on a local mirror of the debug
11070 registers, and only update the inferior on success.
11071 (i386_low_remove_watchpoint): Ditto.
11072
11073 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
11074
11075 * linux-low.c (compare_ints, unique, list_threads, show_process,
11076 linux_core_of_thread): Delete.
11077 (linux_target_ops): Change linux_core_of_thread to
11078 linux_common_core_of_thread.
11079 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
11080 * utils.c (malloc_failure): Change type of argument.
11081 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
11082 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
11083 common/linux-osdata.c, common/ptid.c and common/buffer.c.
11084 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
11085 (IPA_OBJS): Add common-utils-ipa.o.
11086 (ptid_h, linux_osdata_h): New macros.
11087 (server_h): Add common/common-utils.h, common/xml-utils.h,
11088 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
11089 common/ptid.h.
11090 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
11091 ptid.o, buffer.o): New rules.
11092 (linux-low.o): Add common/linux-osdata.h as a dependency.
11093 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
11094 * configure.ac: Add AC_HEADER_DIRENT check.
11095 * config.in: Regenerate.
11096 * configure: Regenerate.
11097 * remote-utils.c (xml_escape_text): Delete.
11098 (buffer_grow, buffer_free, buffer_init, buffer_finish,
11099 buffer_xml_printf): Move to common/buffer.c.
11100 * server.c (main): Remove call to initialize_inferiors.
11101 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
11102 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
11103 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
11104 internal_error, gdb_assert, gdb_assert_fail): Delete.
11105 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
11106 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
11107 common/buffer.h.
11108 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
11109 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
11110 initialize_inferiors): Delete.
11111
11112 2011-07-20 Pedro Alves <pedro@codesourcery.com>
11113
11114 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
11115 symbol error.
11116
11117 2011-05-31 Pedro Alves <pedro@codesourcery.com>
11118
11119 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
11120 assertion.
11121 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
11122
11123 2011-05-26 Yao Qi <yao@codesourcery.com>
11124
11125 * Makefile.in (thread-db.o): Track dependence to
11126 common/gdb_thread_db.h.
11127 * thread-db.c: include gdb_thread_db.h from right place.
11128
11129 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
11130
11131 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
11132 __FILE__ and __LINE__ to internal_error.
11133
11134 2011-05-13 Doug Evans <dje@google.com>
11135
11136 * thread-db.c (try_thread_db_load_from_sdir): New function.
11137 (try_thread_db_load_from_dir): New function.
11138 (thread_db_load_search): Handle $sdir, ignore $pdir.
11139 Remove trying of system directories if search of
11140 libthread-db-search-path fails, that is now done via $sdir.
11141
11142 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
11143
11144 * server.c (handle_query): Add EnableDisableTracepoints to the list
11145 of supported features.
11146 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
11147 tracepoints.
11148 (cmd_qtenable_disable): New.
11149 (cmd_qtstart): Install tracepoints even if disabled.
11150 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
11151 receiving a QTEnable or QTDisable packet.
11152 (gdb_collect): Skip data collection if fast tracepoint is disabled.
11153 (ust_marker_to_static_tracepoint): Do not ignore disabled static
11154 tracepoints.
11155 (gdb_probe): Skip data collection if static tracepoint is disabled.
11156
11157 2011-05-10 Doug Evans <dje@google.com>
11158
11159 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
11160
11161 2011-05-04 Doug Evans <dje@google.com>
11162
11163 * linux-low.c (linux_join): Skip process lookup.
11164 * spu-low.c (spu_join): Ditto.
11165 * server.c (join_inferiors_callback): Delete.
11166 (process_serial_event): For 'D' packet (detach) call join_inferior
11167 directly.
11168
11169 2011-05-04 Joseph Myers <joseph@codesourcery.com>
11170
11171 * README: Don't mention xscale*-*-linux*.
11172 * configure.srv (xscale*-*-linux*): Don't handle target.
11173
11174 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
11175
11176 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
11177 casting pointers.
11178 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
11179 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
11180 (i386_emit_void_call_2): Likewise.
11181
11182 2011-04-26 Yao Qi <yao@codesourcery.com>
11183
11184 * linux-low.c: Move common macros to linux-ptrace.h.
11185 Include linux-ptrace.h.
11186 * Makefile.in (linux_ptrace_h): New.
11187 (linux-low.o): Depends on linux-ptrace.h.
11188
11189 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
11190
11191 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
11192 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
11193 (remote_prepare): New function with most of the TCP code from ...
11194 (remote_open): ... here. Detect PORT here unconditionally. Move also
11195 setting transport_is_reliable.
11196 * server.c (run_once): New variable.
11197 (gdbserver_usage): Document it.
11198 (main): Set run_once for `--once'. Call remote_prepare. Exit after
11199 the first run if RUN_ONCE.
11200 * server.h (run_once, remote_prepare): New declarations.
11201
11202 2011-04-19 Tom Tromey <tromey@redhat.com>
11203
11204 * win32-low.c (handle_load_dll): Remove duplicate "the".
11205
11206 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
11207
11208 Remove support for old Cygwin 1.5 versions.
11209 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
11210 function to avoid warning.
11211 (win32_add_one_solib): Use cygwin_conv_path function to avoid
11212 warning.
11213
11214 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
11215
11216 * gdbserver/server.h (Macro _): Define it if not available.
11217
11218 2011-03-14 Michael Snyder <msnyder@vmware.com>
11219
11220 * hostio.c (handle_close): Remove unnecessary null test.
11221
11222 2011-03-10 Joel Brobecker <brobecker@adacore.com>
11223
11224 * Makefile.in (maintainer-clean realclean distclean): Remove
11225 "make ... subdir_do" command.
11226
11227 2011-03-10 Michael Snyder <msnyder@vmware.com>
11228
11229 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
11230
11231 * server.c (handle_v_run): Free alloced buffer on early return.
11232
11233 2011-03-09 Yao Qi <yao@codesourcery.com>
11234
11235 Revert:
11236 2011-03-04 Yao Qi <yao@codesourcery.com>
11237
11238 * Makefile.in: Remove GNU make feature --directory.
11239
11240 2011-03-05 Yao Qi <yao@codesourcery.com>
11241
11242 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
11243 (subdir_do): New make target. Copied from gdb/Makefile.
11244 (maintainer-clean, realclean, distclean, clean): Call corresponding
11245 make targets in common/Makefile.
11246
11247 2011-02-11 Yao Qi <yao@codesourcery.com>
11248
11249 * configure.ac: Call AC_PROG_RANLIB.
11250 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
11251 * configure: Regenerate.
11252
11253 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
11254
11255 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
11256
11257 2011-03-06 Yao Qi <yao@codesourcery.com>
11258
11259 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
11260
11261 2011-03-05 Yao Qi <yao@codesourcery.com>
11262
11263 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
11264 (subdir_do): New make target. Copied from gdb/Makefile.
11265 (maintainer-clean, realclean, distclean, clean): Call corresponding
11266 make targets in common/Makefile.
11267
11268 2011-03-04 Yao Qi <yao@codesourcery.com>
11269
11270 * Makefile.in: Remove GNU make feature --directory.
11271
11272 2011-03-04 Michael Snyder <msnyder@vmware.com>
11273
11274 * server.c (queue_stop_reply): Call xmalloc not malloc.
11275
11276 2011-03-02 Michael Snyder <msnyder@vmware.com>
11277
11278 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
11279
11280 2011-02-28 Michael Snyder <msnyder@vmware.com>
11281
11282 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
11283 (cmd_qtframe): Ditto.
11284 (cmd_qtbuffer): Ditto.
11285 (cmd_bigqtbuffer): Ditto.
11286
11287 * utils.c (decimal2str): Initialize 'width' to nine, then
11288 don't mess with it.
11289
11290 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
11291
11292 * hostio.c (require_data): Free *data, not data.
11293
11294 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11295
11296 * hostio.c (require_data): Use free, not xfree.
11297
11298 2011-02-27 Michael Snyder <msnyder@vmware.com>
11299
11300 * server.c (handle_query): Discard unused value.
11301
11302 * hostio.c (require_data): Free malloc memory before returning
11303 error.
11304
11305 2011-02-26 Michael Snyder <msnyder@vmware.com>
11306
11307 * linux-low.c (list_threads): Call closedir for dirent.
11308
11309 2011-02-27 Michael Snyder <msnyder@vmware.com>
11310
11311 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
11312 a case statement falls through.
11313
11314 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
11315
11316 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
11317 in comparison.
11318
11319 2011-02-26 Michael Snyder <msnyder@vmware.com>
11320
11321 * utils.c (decimal2str): Eliminate dead code and dead param.
11322 (pulongest): Drop dead param from call to decimal2str.
11323 (plongest): Ditto.
11324
11325 2011-02-24 Joel Brobecker <brobecker@adacore.com>
11326
11327 Revert the following patch (not approved yet):
11328 2011-02-21 Hui Zhu <teawater@gmail.com>
11329 * tracepoint.c (tp_printf): New function.
11330 (eval_agent_expr): Handle gdb_agent_op_printf.
11331
11332 2011-02-21 Hui Zhu <teawater@gmail.com>
11333
11334 * tracepoint.c (tp_printf): New function.
11335 (eval_agent_expr): Handle gdb_agent_op_printf.
11336
11337 2011-02-18 Tom Tromey <tromey@redhat.com>
11338
11339 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
11340 (tracepoint.o): Likewise.
11341 * tracepoint.c (enum gdb_agent_op): Use ax.def.
11342 (gdb_agent_op_names): Likewise.
11343
11344 2011-02-18 Tom Tromey <tromey@redhat.com>
11345
11346 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
11347 gdb_agent_op_rot>: New constants.
11348 (gdb_agent_op_names): Add pick and roll.
11349 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
11350 cases.
11351
11352 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
11353
11354 * aclocal.m4: Regenerated with aclocal-1.11.1.
11355
11356 2011-02-14 Pedro Alves <pedro@codesourcery.com>
11357
11358 * server.c (handle_qxfer_traceframe_info): New.
11359 (qxfer_packets): Register "traceframe-info".
11360 (handle_query): Report support for qXfer:traceframe-info:read+.
11361 * tracepoint.c (match_blocktype): New.
11362 (traceframe_find_block_type): Rename to ...
11363 (traceframe_walk_blocks): ... this. Add callback filter argument,
11364 and use it.
11365 (traceframe_find_block_type): New, reimplemented on top of
11366 traceframe_walk_blocks.
11367 (build_traceframe_info_xml): New.
11368 (traceframe_read_info): New.
11369 * server.h (traceframe_read_info): Declare.
11370
11371 2011-02-11 Yao Qi <yao@codesourcery.com>
11372
11373 * configure.ac: Call AC_PROG_RANLIB.
11374 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
11375 * configure: Regenerate.
11376
11377 2011-02-07 Pedro Alves <pedro@codesourcery.com>
11378
11379 * server.c (gdb_read_memory): Change return semantics to allow
11380 partial transfers.
11381 (handle_search_memory_1): Adjust.
11382 (process_serial_event) <'m' packet>: Handle partial transfers.
11383 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
11384
11385 2011-01-28 Pedro Alves <pedro@codesourcery.com>
11386
11387 * regcache.c (init_register_cache): Initialize
11388 regcache->register_status.
11389 (free_register_cache): Release regcache->register_status.
11390 (regcache_cpy): Copy register_status.
11391 (registers_to_string): Print 'x's for unavailable registers.
11392 (supply_register): Mark the register's status valid or
11393 unavailable, depending on whether a buffer was passed in or not.
11394 (supply_register_zeroed): New.
11395 (supply_regblock): Mark the registers' status valid or
11396 unavailable, depending on whether a buffer was passed in or not.
11397 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
11398 (struct regcache): New `register_status' field.
11399 (supply_register_zeroed): Declare.
11400 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
11401 supply_register_zeroed, rather than passing a NULL buffer to
11402 supply_register.
11403 * tracepoint.c (fetch_traceframe_registers): Update comment.
11404
11405 2011-01-28 Pedro Alves <pedro@codesourcery.com>
11406
11407 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
11408 buffer explicit.
11409
11410 2011-01-25 Pedro Alves <pedro@codesourcery.com>
11411
11412 * server.h (decode_xfer_write): Change prototype.
11413 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
11414 and don't extract the annex here.
11415 * server.c (decode_xfer_read): Remove `annex' parameter,
11416 and don't extract the annex here.
11417 (decode_xfer): New.
11418 (struct qxfer): New.
11419 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
11420 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
11421 (handle_qxfer_statictrace): New functions, abstracted out from
11422 handle_query, and made to use the struct qxfer interface.
11423 (handle_threads_qxfer_proper): Rename to ...
11424 (handle_qxfer_threads_proper): ... this.
11425 (handle_threads_qxfer): Rename to ...
11426 (handle_qxfer_threads): ... this. Adjust.
11427 (qxfer_packets): New array.
11428 (handle_qxfer): New function.
11429 (handle_query): Use handle_qxfer.
11430
11431 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
11432
11433 * gdbreplay.c: Shorten lines of >= 80 columns.
11434 * linux-low.c: Ditto.
11435 * linux-ppc-low.c: Ditto.
11436 * linux-s390-low.c: Ditto.
11437 * linux-sparc-low.c: Ditto.
11438 * linux-x86-low.c: Ditto.
11439 * linux-xtensa-low.c: Ditto.
11440 * mem-break.c: Ditto.
11441 * nto-low.c: Ditto.
11442 * regcache.h: Ditto.
11443 * remote-utils.c: Ditto.
11444 * server.c: Ditto.
11445 * server.h: Ditto.
11446 * thread-db.c: Ditto.
11447 * tracepoint.c: Ditto.
11448 * utils.c: Ditto.
11449 * win32-low.h: Ditto.
11450
11451 2011-01-05 Joel Brobecker <brobecker@adacore.com>
11452
11453 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
11454 update.
11455
11456 2011-01-01 Joel Brobecker <brobecker@adacore.com>
11457
11458 * server.c (gdbserver_version): Update copyright year in version
11459 output.
11460 * gdbreplay.c (gdbreplay_version): Ditto.
11461
11462 2010-12-29 Jie Zhang <jie.zhang@analog.com>
11463
11464 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
11465 * linux-bfin-low.c: New file.
11466 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
11467 PT_DATA_ADDR for BFIN targets.
11468 * Makefile.in (SFILES): Add linux-bfin-low.c.
11469 (clean): Remove reg-bfin.c.
11470 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
11471 * README: Mention supported Blackfin targets.
11472
11473 2010-12-23 Mike Frysinger <vapier@gentoo.org>
11474
11475 * .gitignore: New file.
11476
11477 2010-11-16 Mike Frysinger <vapier@gentoo.org>
11478
11479 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
11480
11481 2010-10-22 Jie Zhang <jie@codesourcery.com>
11482
11483 * Makefile.in: Add FLAGS_TO_PASS variable.
11484 (install): Remove dependency of install-only and recursively
11485 invoke make for install-only.
11486
11487 2010-10-04 Doug Evans <dje@google.com>
11488
11489 * Makefile.in (uninstall): Use $(DESTDIR).
11490
11491 2010-09-24 Pedro Alves <pedro@codesourcery.com>
11492
11493 PR gdb/11842
11494
11495 * linux-x86-low.c (compat_siginfo_from_siginfo)
11496 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
11497 si_code is < 0. Check for si_code == SI_TIMER before checking for
11498 si_code < 0.
11499
11500 2010-09-13 Joel Brobecker <brobecker@adacore.com>
11501
11502 * lynx-i386-low.c: New file.
11503 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
11504
11505 2010-09-13 Joel Brobecker <brobecker@adacore.com>
11506
11507 * lynx-low.c (ptrace_request_to_str): Remove handling for
11508 request values that have been removed in LynxOS 5.x.
11509
11510 2010-09-13 Joel Brobecker <brobecker@adacore.com>
11511
11512 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
11513 <ptrace.h>
11514
11515 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
11516
11517 * configure.ac: Add --enable-inprocess-agent option.
11518 * configure: Rebuilt.
11519
11520 2010-09-06 Yao Qi <yao@codesourcery.com>
11521
11522 * linux-low.c (linux_kill): Remove unused variable.
11523 (linux_stabilize_threads): Likewise.
11524 * server.c (start_inferior): Likewise.
11525 (queue_stop_reply_callback): Likewise.
11526 * tracepoint.c (do_action_at_tracepoint): Likewise.
11527
11528 2010-09-06 Yao Qi <yao@codesourcery.com>
11529
11530 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
11531 on return.
11532
11533 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
11534
11535 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
11536
11537 2010-09-06 Pedro Alves <pedro@codesourcery.com>
11538
11539 * Makefile.in (install-only): Replace $IPA_DEPFILES with
11540 "$(IPA_DEPFILES)".
11541
11542 2010-09-01 Joel Brobecker <brobecker@adacore.com>
11543
11544 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
11545 gdbserver/lynx-ppc-low.c: New files.
11546 * Makefile.in (lynx_low_h): New variable.
11547 (lynx-low.o, lynx-ppc-low.o): New rules.
11548 * configure.ac: On LynxOS, link with -lnetinet.
11549 * configure.srv: Add handling of powerpc-*-lynxos* targets.
11550 * configure: regenerate.
11551
11552 2010-09-01 Joel Brobecker <brobecker@adacore.com>
11553
11554 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
11555 * configure.ac: Add check for vasprintf and vsnprintf.
11556 * configure, config.in: Regenerate.
11557 * server.h (vasprintf, vsnprintf): Add conditional declarations.
11558
11559 2010-09-01 Joel Brobecker <brobecker@adacore.com>
11560
11561 * gdbreplay.c: Move include of alloca.h up, next to include of
11562 malloc.h.
11563 * server.h: Add include of malloc.h.
11564 * mem-break.c: Remove include of malloc.h.
11565 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
11566
11567 2010-09-01 Joel Brobecker <brobecker@adacore.com>
11568
11569 * Makefile.in (memmem.o): Build with -Wno-error.
11570
11571 2010-09-01 Joel Brobecker <brobecker@adacore.com>
11572
11573 * utils.c (xsnprintf): Make non-static.
11574 * server.h: Add xsnprintf declaration.
11575 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
11576 replace calls to snprintf by calls to xsnprintf throughout.
11577
11578 2010-09-01 Joel Brobecker <brobecker@adacore.com>
11579
11580 * configure.ac: Add configure check for alloca.
11581 * configure, config.in: Regenerate.
11582 * server.h: Include alloca.h if it exists.
11583 * gdbreplay.c: Include alloca.h if it exists.
11584
11585 2010-08-28 Pedro Alves <pedro@codesourcery.com>
11586
11587 * linux-low.c (__SIGRTMIN): Define if not already defined.
11588 (linux_create_inferior): Check for __ANDROID__ rather than
11589 __SIGRTMIN.
11590 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
11591 are already deferred.
11592 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
11593 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
11594 stopped and already has a pending signal to report.
11595 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
11596 a pending signal to report or is moving out of a jump pad.
11597 (linux_init_signals): Check for __ANDROID__ rather than
11598 __SIGRTMIN.
11599
11600 2010-08-28 Pedro Alves <pedro@codesourcery.com>
11601
11602 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
11603 debug_threads check. Avoid a linear search when not doing debug
11604 output.
11605
11606 2010-08-27 Pedro Alves <pedro@codesourcery.com>
11607
11608 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
11609 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
11610 (struct file_handler) <fd>: Change type to gdb_fildes_t.
11611 (process_event): Change local fd's type to gdb_fildes_t.
11612 (create_file_handler): Adjust prototype.
11613 (delete_file_handler): Adjust prototype.
11614 (handle_file_event): Adjust prototype. Use pfildes.
11615 (create_file_event): Adjsut prototype.
11616 * remote-utils.c (remote_desc, listen_desc): Change type to
11617 gdb_fildes_t.
11618 * server.h: New gdb_fildes_t typedef.
11619 [USE_WIN32API]: Include winsock2.h.
11620 (delete_file_handler, add_file_handler): Adjust prototypes.
11621 (pfildes): Declare.
11622 * utils.c (pfildes): New.
11623
11624 2010-08-27 Pedro Alves <pedro@codesourcery.com>
11625
11626 * configure.ac (build_warnings): Add -Wno-char-subscripts.
11627 * configure: Regenerate.
11628
11629 2010-08-27 Pedro Alves <pedro@codesourcery.com>
11630
11631 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
11632 (linux_done_accessing_memory): ... this.
11633 (linux_target_ops): Adjust.
11634 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
11635 * nto-low.c (nto_target_ops): Adjust comment.
11636 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
11637 * spu-low.c (spu_target_ops): Adjust comment.
11638 * target.h (target_ops): Rename unprepare_to_access_memory field
11639 to done_accessing_memory.
11640 (unprepare_to_access_memory): Rename to ...
11641 (done_accessing_memory): ... this.
11642
11643 2010-08-26 Pedro Alves <pedro@codesourcery.com>
11644
11645 * linux-low.c (linux_prepare_to_access_memory): New.
11646 (linux_unprepare_to_access_memory): New.
11647 (linux_target_ops): Install them.
11648 * server.c (read_memory): Rename to ...
11649 (gdb_read_memory): ... this. Use
11650 prepare_to_access_memory/prepare_to_access_memory.
11651 (write_memory): Rename to ...
11652 (gdb_write_memory): ... this. Use
11653 prepare_to_access_memory/prepare_to_access_memory.
11654 (handle_search_memory_1): Adjust.
11655 (process_serial_event): Adjust.
11656 * target.h (struct target_ops): New fields
11657 prepare_to_access_memory and unprepare_to_access_memory.
11658 (prepare_to_access_memory, unprepare_to_access_memory): New.
11659 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
11660 prepare_to_access_memory/prepare_to_access_memory.
11661 * nto-low.c (nto_target_ops): Adjust.
11662 * spu-low.c (spu_target_ops): Adjust.
11663 * win32-low.c (win32_target_ops): Adjust.
11664
11665 2010-08-26 Pedro Alves <pedro@codesourcery.com>
11666
11667 * Makefile.in (WARN_CFLAGS): Get it from configure.
11668 (WERROR_CFLAGS): New.
11669 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
11670 * configure.ac: Introduce --enable-werror, which adds -Werror to
11671 the compiler command line. Enabled by default. Disable with
11672 --disable-werror. Add -Wdeclaration-after-statement
11673 Wpointer-arith and -Wformat-nonliteral to warning flags.
11674 * configure: Regenerate.
11675
11676 2010-08-26 Pedro Alves <pedro@codesourcery.com>
11677
11678 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
11679
11680 2010-08-26 Pedro Alves <pedro@codesourcery.com>
11681
11682 * gdbreplay.c (remote_error): New.
11683 (gdbchar): New.
11684 (expect): Use gdbchar. Check for error reading from GDB.
11685 Clarify sync error output.
11686 (play): Check for errors writing to GDB.
11687 * linux-low.c (sigchld_handler): Really ignore `write' errors.
11688 * remote-utils.c (getpkt): Check for errors writing to the remote
11689 descriptor.
11690
11691 2010-08-25 Pedro Alves <pedro@codesourcery.com>
11692
11693 * linux-low.c (linux_wait_1): Move non-debugging code out of
11694 `debug_threads' control.
11695
11696 2010-08-25 Pedro Alves <pedro@codesourcery.com>
11697
11698 * linux-low.c (linux_wait_1): Don't set last_status here.
11699 * server.c (push_event, queue_stop_reply_callback): Assert we're
11700 not pushing a TARGET_WAITKIND_IGNORE event.
11701 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
11702 (myresume, handle_target_event): Set the thread's last_resume_kind
11703 and last_status from the target returned status.
11704
11705 2010-08-25 Pedro Alves <pedro@codesourcery.com>
11706
11707 PR threads/10729
11708
11709 * linux-x86-low.c (update_debug_registers_callback): New.
11710 (i386_dr_low_set_addr): Use it.
11711 (i386_dr_low_get_addr): New.
11712 (i386_dr_low_set_control): Use update_debug_registers_callback.
11713 (i386_dr_low_get_control): New.
11714 (i386_dr_low_get_status): Adjust.
11715 * linux-low.c (linux_stop_lwp): New.
11716 * linux-low.h (linux_stop_lwp): Declare.
11717
11718 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
11719 argument instead of a i386_debug_reg_state.
11720 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
11721 a i386_debug_reg_state.
11722 (i386_insert_aligned_watchpoint): Adjust.
11723 (i386_remove_aligned_watchpoint): Adjust.
11724 (i386_low_stopped_data_address): Read the debug registers from the
11725 inferior instead of from the mirrors.
11726 * i386-low.h (struct i386_debug_reg_state): Extend comment.
11727 (i386_dr_low_get_addr): Declare.
11728 (i386_dr_low_get_control): Declare.
11729 (i386_dr_low_get_status): Change prototype.
11730
11731 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
11732 (i386_dr_low_get_addr): New.
11733 (i386_dr_low_get_control): New.
11734 (i386_dr_low_get_status): Adjust prototype. Return
11735 dr_status_mirror.
11736 (i386_initial_stuff): Clear dr_status_mirror and
11737 dr_control_mirror.
11738 (i386_get_thread_context): Adjust.
11739 (i386_set_thread_context): Adjust.
11740 (i386_thread_added): Adjust.
11741
11742 2010-08-24 Pedro Alves <pedro@codesourcery.com>
11743
11744 * linux-low.h (linux_thread_area): Delete declaration.
11745
11746 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
11747
11748 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
11749 after its termination.
11750
11751 2010-08-09 Pedro Alves <pedro@codesourcery.com>
11752
11753 * linux-low.c (gdb_wants_lwp_stopped): Delete.
11754 (gdb_wants_all_stopped): Delete.
11755 (linux_wait_1): Don't call them.
11756 * server.c (handle_v_cont): Tag all threads as want-stopped.
11757 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
11758 stopped as "client-wants-stopped".
11759
11760 2010-07-31 Pedro Alves <pedro@codesourcery.com>
11761
11762 * Makefile.in (signals_h): New.
11763 (server_h): Depend on it.
11764 (server.o): Don't depend on $(signals_def).
11765 (signals.o): Depend on $(signals_def).
11766
11767 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
11768
11769 * Makefile.in (signals_def): New.
11770 (server_h): Append include/gdb/signals.h and signals_def.
11771 (server.o): Append signals_def.
11772
11773 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
11774
11775 * server.c (handle_target_event): Use target_signal_to_host for
11776 resume_info.sig initialization.
11777 * target.h (struct thread_resume) <sig>: New comment.
11778
11779 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
11780
11781 * server.c (handle_query): strcpy() the returned string from paddress()
11782 instead of sprintf().
11783 * utils.c (paddress): Return phex_nz().
11784
11785 2010-07-07 Joel Brobecker <brobecker@adacore.com>
11786
11787 * server.c (handle_v_cont): Call mourn_inferior if process
11788 just exited.
11789 (myresume): Likewise.
11790
11791 2010-07-01 Pedro Alves <pedro@codesourcery.com>
11792
11793 Static tracepoints, and integration with UST.
11794
11795 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
11796 * mem-break.c (uninsert_all_breakpoints)
11797 (reinsert_all_breakpoints): New.
11798 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
11799 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
11800 (gdb_agent_ust_loaded, helper_thread_id)
11801 (gdb_agent_helper_thread_id): New macros.
11802 (struct ipa_sym_addresses): Add addr_ust_loaded,
11803 addr_helper_thread_id, addr_cmd_buf.
11804 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
11805 (in_process_agent_loaded_ust): New.
11806 (write_e_ust_not_loaded): New.
11807 (maybe_write_ipa_ust_not_loaded): New.
11808 (struct collect_static_trace_data_action): New.
11809 (enum tracepoint_type) <static_tracepoint>: New.
11810 (struct tracepoint) <handle>: Mention static tracepoints.
11811 (struct static_tracepoint_ctx): New.
11812 (CMD_BUF_SIZE): New.
11813 (add_tracepoint_action): Handle static tracepoint actions.
11814 (unprobe_marker_at): New.
11815 (clear_installed_tracepoints): Handle static tracepoints.
11816 (cmd_qtdp): Handle static tracepoints.
11817 (probe_marker_at): New.
11818 (cmd_qtstart): Handle static tracepoints.
11819 (response_tracepoint): Handle static tracepoints.
11820 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
11821 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
11822 (get_context_regcache): Handle static tracepoints.
11823 (do_action_at_tracepoint): Handle static tracepoint actions.
11824 (traceframe_find_block_type): Handle static trace data blocks.
11825 (traceframe_read_sdata): New.
11826 (download_tracepoints): Download static tracepoint actions.
11827 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
11828 (GDB_PROBE_NAME): New.
11829 (ust_ops): New.
11830 (GET_UST_SYM): New.
11831 (USTF): New.
11832 (dlsym_ust): New.
11833 (ust_marker_to_static_tracepoint): New.
11834 (gdb_probe): New.
11835 (collect_ust_data_at_tracepoint): New.
11836 (gdb_ust_probe): New.
11837 (UNIX_PATH_MAX, SOCK_DIR): New.
11838 (gdb_ust_connect_sync_socket): New.
11839 (resume_thread, stop_thread): New.
11840 (run_inferior_command): New.
11841 (init_named_socket): New.
11842 (gdb_ust_socket_init): New.
11843 (cstr_to_hexstr): New.
11844 (next_st): New.
11845 (first_marker, next_marker): New.
11846 (response_ust_marker): New.
11847 (cmd_qtfstm, cmd_qtsstm): New.
11848 (unprobe_marker_at, probe_marker_at): New.
11849 (cmd_qtstmat, gdb_ust_thread): New.
11850 (gdb_ust_init): New.
11851 (initialize_tracepoint_ftlib): Call gdb_ust_init.
11852 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
11853 (ST_REGENTRY): New.
11854 (x86_64_st_collect_regmap): New.
11855 (X86_64_NUM_ST_COLLECT_GREGS): New.
11856 (AMD64_RIP_REGNUM): New.
11857 (supply_static_tracepoint_registers): New.
11858 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
11859 (ST_REGENTRY): New.
11860 (i386_st_collect_regmap): New.
11861 (i386_NUM_ST_COLLECT_GREGS): New.
11862 (supply_static_tracepoint_registers): New.
11863 * server.c (handle_query): Handle qXfer:statictrace:read.
11864 <qSupported>: Report support for StaticTracepoints, and
11865 qXfer:statictrace:read features.
11866 * server.h (traceframe_read_sdata)
11867 (supply_static_tracepoint_registers): Declare.
11868 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
11869 (unpack_varlen_hex): Include in IPA build.
11870 * Makefile.in (ustlibs, ustinc): New.
11871 (IPA_OBJS): Add remote-utils-ipa.o.
11872 ($(IPA_LIB)): Link -ldl and -lpthread.
11873 (UST_CFLAGS): New.
11874 (IPAGENT_CFLAGS): Add UST_CFLAGS.
11875 * config.in, configure: Regenerate.
11876
11877 2010-06-20 Ian Lance Taylor <iant@google.com>
11878 Pedro Alves <pedro@codesourcery.com>
11879
11880 * linux-x86-low.c (always_true): Delete.
11881 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
11882 trying to fool the compiler with always_true.
11883
11884 2010-06-20 Pedro Alves <pedro@codesourcery.com>
11885
11886 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
11887 conditions in gdbserver.
11888
11889 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
11890
11891 * spu-low.c (spu_read_memory): Wrap around local store limit.
11892 (spu_write_memory): Likewise.
11893
11894 2010-06-15 Pedro Alves <pedro@codesourcery.com>
11895
11896 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
11897 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
11898 LONGEST uses.
11899 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
11900 uses.
11901 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
11902 uses with LONGEST uses.
11903
11904 2010-06-14 Stan Shebs <stan@codesourcery.com>
11905 Pedro Alves <pedro@codesourcery.com>
11906
11907 Bytecode compiler.
11908
11909 * linux-x86-low.c: Include limits.h.
11910 (add_insns): New.
11911 (always_true): New.
11912 (EMIT_ASM): New.
11913 (EMIT_ASM32): New.
11914 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
11915 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
11916 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
11917 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
11918 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
11919 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
11920 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
11921 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
11922 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
11923 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
11924 (amd64_emit_void_call_2): New.
11925 (amd64_emit_ops): New.
11926 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
11927 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
11928 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
11929 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
11930 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
11931 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
11932 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
11933 (i386_emit_call, i386_emit_reg, i386_emit_pop)
11934 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
11935 (i386_emit_stack_adjust, i386_emit_int_call_1)
11936 (i386_emit_void_call_2): New.
11937 (i386_emit_ops): New.
11938 (x86_emit_ops): New.
11939 (the_low_target): Install x86_emit_ops.
11940 * server.h (struct emit_ops): New.
11941 (get_raw_reg_func_addr): Declare.
11942 (current_insn_ptr, emit_error): Declare.
11943 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
11944 (set_trace_state_variable_value): New defines.
11945 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
11946 addr_get_trace_state_variable_value and
11947 addr_set_trace_state_variable_value.
11948 (symbol_list): New fields for get_raw_reg,
11949 get_trace_state_variable_value and set_trace_state_variable_value.
11950 (condfn): New typedef.
11951 (struct tracepoint): New field `compiled_cond'.
11952 (do_action_at_tracepoint): Clear compiled_cond.
11953 (get_trace_state_variable_value, set_trace_state_variable_value):
11954 Export in the IPA.
11955 (condition_true_at_tracepoint): If there's a compiled condition,
11956 run that.
11957 (current_insn_ptr, emit_error): New globals.
11958 (struct bytecode_address): New.
11959 (get_raw_reg_func_addr): New.
11960 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
11961 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
11962 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
11963 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
11964 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
11965 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
11966 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
11967 (compile_tracepoint_condition, compile_bytecodes): New.
11968 * target.h (emit_ops): Forward declare.
11969 (struct target_ops): New field emit_ops.
11970 (target_emit_ops): New.
11971 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
11972 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
11973 * linux-low.c (linux_emit_ops): New.
11974 (linux_target_ops): Install it.
11975 * linux-low.h (struct linux_target_ops): New field emit_ops.
11976
11977 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
11978
11979 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
11980 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
11981
11982 2010-06-01 Pedro Alves <pedro@codesourcery.com>
11983 Stan Shebs <stan@codesourcery.com>
11984
11985 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
11986 (all): Depend on $(extra_libraries).
11987 (install-only): Install the IPA.
11988 (IPA_OBJS, IPA_LIB): New.
11989 (clean): Remove the IPA lib.
11990 (IPAGENT_CFLAGS): New.
11991 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
11992 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
11993 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
11994 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
11995 * configure.ac: Check for atomic builtins support in the compiler.
11996 (IPA_DEPFILES, extra_libraries): Define.
11997 * configure.srv (ipa_obj): Add description.
11998 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
11999 (i[34567]86-*-linux*): Set ipa_obj.
12000 (x86_64-*-linux*): Set ipa_obj.
12001 * linux-low.c (stabilizing_threads): New.
12002 (supports_fast_tracepoints): New.
12003 (linux_detach): Stabilize threads before detaching.
12004 (handle_tracepoints): Handle internal tracing breakpoints. Assert
12005 the lwp is either not stabilizing, or is moving out of a jump pad.
12006 (linux_fast_tracepoint_collecting): New.
12007 (maybe_move_out_of_jump_pad): New.
12008 (enqueue_one_deferred_signal): New.
12009 (dequeue_one_deferred_signal): New.
12010 (linux_wait_for_event_1): If moving out of a jump pad, defer
12011 pending signals to later.
12012 (linux_stabilize_threads): New.
12013 (linux_wait_1): Check if threads need moving out of jump pads, and
12014 do it if so.
12015 (stuck_in_jump_pad_callback): New.
12016 (move_out_of_jump_pad_callback): New.
12017 (lwp_running): New.
12018 (linux_resume_one_lwp): Handle moving out of jump pads.
12019 (linux_set_resume_request): Dequeue deferred signals.
12020 (need_step_over_p): Also step over fast tracepoint jumps.
12021 (start_step_over): Also uninsert fast tracepoint jumps.
12022 (finish_step_over): Also reinsert fast tracepoint jumps.
12023 (linux_install_fast_tracepoint_jump): New.
12024 (linux_target_ops): Install linux_stabilize_threads and
12025 linux_install_fast_tracepoint_jump_pad.
12026 * linux-low.h (linux_target_ops) <get_thread_area,
12027 install_fast_tracepoint_jump_pad>: New fields.
12028 (struct lwp_info) <collecting_fast_tracepoint,
12029 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
12030 (linux_get_thread_area): Declare.
12031 * linux-x86-low.c (jump_insn): New.
12032 (x86_get_thread_area): New.
12033 (append_insns): New.
12034 (push_opcode): New.
12035 (amd64_install_fast_tracepoint_jump_pad): New.
12036 (i386_install_fast_tracepoint_jump_pad): New.
12037 (x86_install_fast_tracepoint_jump_pad): New.
12038 (the_low_target): Install x86_get_thread_area and
12039 x86_install_fast_tracepoint_jump_pad.
12040 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
12041 (struct fast_tracepoint_jump): New.
12042 (fast_tracepoint_jump_insn): New.
12043 (fast_tracepoint_jump_shadow): New.
12044 (find_fast_tracepoint_jump_at): New.
12045 (fast_tracepoint_jump_here): New.
12046 (delete_fast_tracepoint_jump): New.
12047 (set_fast_tracepoint_jump): New.
12048 (uninsert_fast_tracepoint_jumps_at): New.
12049 (reinsert_fast_tracepoint_jumps_at): New.
12050 (set_breakpoint_at): Use write_inferior_memory.
12051 (uninsert_raw_breakpoint): Use write_inferior_memory.
12052 (check_mem_read): Mask out fast tracepoint jumps.
12053 (check_mem_write): Mask out fast tracepoint jumps.
12054 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
12055 (set_fast_tracepoint_jump): Declare.
12056 (delete_fast_tracepoint_jump)
12057 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
12058 (reinsert_fast_tracepoint_jumps_at): Declare.
12059 * regcache.c: Don't compile many functions when building the
12060 in-process agent library.
12061 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
12062 the register buffer in the heap.
12063 (free_register_cache): If the register buffer isn't owned by the
12064 regcache, don't free it.
12065 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
12066 pre-existing register caches.
12067 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
12068 type.
12069 (convert_ascii_to_int): : Constify `from' parameter type.
12070 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
12071 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
12072 the needed buffer in-place.
12073 (relocate_instruction): New.
12074 * server.c (handle_query) <qSymbols>: If the target supports
12075 tracepoints, give it a chance of looking up symbols. Report
12076 support for fast tracepoints.
12077 (handle_status): Stabilize threads.
12078 (process_serial_event): Adjust.
12079 * server.h (struct fast_tracepoint_jump): Forward declare.
12080 (struct process_info) <fast_tracepoint_jumps>: New field.
12081 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
12082 (decode_X_packet, decode_M_packet): Adjust.
12083 (relocate_instruction): Declare.
12084 (in_process_agent_loaded): Declare.
12085 (tracepoint_look_up_symbols): Declare.
12086 (struct fast_tpoint_collect_status): Declare.
12087 (fast_tracepoint_collecting): Declare.
12088 (force_unlock_trace_buffer): Declare.
12089 (handle_tracepoint_bkpts): Declare.
12090 (initialize_low_tracepoint)
12091 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
12092 * target.h (struct target_ops) <stabilize_threads,
12093 install_fast_tracepoint_jump_pad>: New fields.
12094 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
12095 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
12096 [HAVE_STDINT_H]: Include stdint.h.
12097 (trace_debug_1): Rename to ...
12098 (trace_vdebug): ... this.
12099 (trace_debug): Rename to ...
12100 (trace_debug_1): ... this. Add `level' parameter.
12101 (trace_debug): New.
12102 (ATTR_USED, ATTR_NOINLINE): New.
12103 (IP_AGENT_EXPORT): New.
12104 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
12105 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
12106 (about_to_request_buffer_space, trace_buffer_is_full)
12107 (stopping_tracepoint, expr_eval_result, error_tracepoint)
12108 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
12109 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
12110 (traceframe_write_count, traceframes_created)
12111 (trace_state_variables)
12112 New renaming defines.
12113 (struct ipa_sym_addresses): New.
12114 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
12115 (symbol_list): New.
12116 (ipa_sym_addrs): New.
12117 (all_tracepoint_symbols_looked_up): New.
12118 (in_process_agent_loaded): New.
12119 (write_e_ipa_not_loaded): New.
12120 (maybe_write_ipa_not_loaded): New.
12121 (tracepoint_look_up_symbols): New.
12122 (debug_threads) [IN_PROCESS_AGENT]: New.
12123 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
12124 (UNKNOWN_SIDE_EFFECTS): New.
12125 (stop_tracing): New.
12126 (flush_trace_buffer): New.
12127 (stop_tracing_bkpt): New.
12128 (flush_trace_buffer_bkpt): New.
12129 (read_inferior_integer): New.
12130 (read_inferior_uinteger): New.
12131 (read_inferior_data_pointer): New.
12132 (write_inferior_data_pointer): New.
12133 (write_inferior_integer): New.
12134 (write_inferior_uinteger): New.
12135 (struct collect_static_trace_data_action): Delete.
12136 (enum tracepoint_type): New.
12137 (struct tracepoint) <type>: New field `type'.
12138 <actions_str, step_actions, step_actions_str>: Only include in
12139 GDBserver.
12140 <orig_size, obj_addr_on_target, adjusted_insn_addr>
12141 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
12142 (tracepoints): Use IP_AGENT_EXPORT.
12143 (last_tracepoint): Don't include in the IPA.
12144 (stopping_tracepoint): Use IP_AGENT_EXPORT.
12145 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
12146 (alloced_trace_state_variables): New.
12147 (trace_state_variables): Use IP_AGENT_EXPORT.
12148 (traceframe_t): Delete unused variable.
12149 (circular_trace_buffer): Don't include in the IPA.
12150 (trace_buffer_start): Delete.
12151 (struct trace_buffer_control): New.
12152 (trace_buffer_free): Delete.
12153 (struct ipa_trace_buffer_control): New.
12154 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
12155 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
12156 New.
12157 (trace_buffer_ctrl): New.
12158 (TRACE_BUFFER_CTRL_CURR): New.
12159 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
12160 Reimplement as macros.
12161 (trace_buffer_wrap): Delete.
12162 (traceframe_write_count, traceframe_read_count)
12163 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
12164 (struct tracepoint_hit_ctx) <type>: New field.
12165 (struct fast_tracepoint_ctx): New.
12166 (memory_barrier): New.
12167 (cmpxchg): New.
12168 (record_tracepoint_error): Update atomically in the IPA.
12169 (clear_inferior_trace_buffer): New.
12170 (about_to_request_buffer_space): New.
12171 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
12172 updating the same buffer.
12173 (add_tracepoint): Default the tracepoint's type to trap
12174 tracepoint, and orig_size to -1.
12175 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
12176 internal variables.
12177 (create_trace_state_variable): New parameter `gdb'. Handle it.
12178 (clear_installed_tracepoints): Clear fast tracepoint jumps.
12179 (cmd_qtdp): Handle fast tracepoints.
12180 (cmd_qtdv): Adjust.
12181 (max_jump_pad_size): New.
12182 (gdb_jump_pad_head): New.
12183 (get_jump_space_head): New.
12184 (claim_jump_space): New.
12185 (sort_tracepoints): New.
12186 (MAX_JUMP_SIZE): New.
12187 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
12188 IPA.
12189 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
12190 support. Upload fast traceframes, and delete internal IPA
12191 breakpoints.
12192 (stop_tracing_handler): New.
12193 (flush_trace_buffer_handler): New.
12194 (cmd_qtstop): Upload fast tracepoints.
12195 (response_tracepoint): Handle fast tracepoints.
12196 (tracepoint_finished_step): Upload fast traceframes. Set the
12197 tracepoint hit context's tracepoint type.
12198 (handle_tracepoint_bkpts): New.
12199 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
12200 type. Add comment about fast tracepoints.
12201 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
12202 non-existing action_str field.
12203 (get_context_regcache): Handle fast tracepoints.
12204 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
12205 to the regcache.
12206 (fast_tracepoint_from_jump_pad_address): New.
12207 (fast_tracepoint_from_ipa_tpoint_address): New.
12208 (collecting_t): New.
12209 (force_unlock_trace_buffer): New.
12210 (fast_tracepoint_collecting): New.
12211 (collecting): New.
12212 (gdb_collect): New.
12213 (write_inferior_data_ptr): New.
12214 (target_tp_heap): New.
12215 (target_malloc): New.
12216 (download_agent_expr): New.
12217 (UALIGN): New.
12218 (download_tracepoints): New.
12219 (download_trace_state_variables): New.
12220 (upload_fast_traceframes): New.
12221 (IPA_FIRST_TRACEFRAME): New.
12222 (IPA_NEXT_TRACEFRAME_1): New.
12223 (IPA_NEXT_TRACEFRAME): New.
12224 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
12225 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
12226 (gdb_jump_pad_buffer_end): New.
12227 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
12228 (initialize_tracepoint): Adjust.
12229 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
12230 buffer. Initialize the low module.
12231 * utils.c (PREFIX, TOOLNAME): New.
12232 (malloc_failure): Use PREFIX.
12233 (error): In the IPA, an error causes an exit.
12234 (fatal, warning): Use PREFIX.
12235 (internal_error): Use TOOLNAME.
12236 (NUMCELLS): Increase to 10.
12237 * configure, config.in: Regenerate.
12238
12239 2010-06-01 Pedro Alves <pedro@codesourcery.com>
12240
12241 * server.c (handle_query) <qSupported>: Do two passes over the
12242 qSupported string to avoid nesting strtok.
12243
12244 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
12245
12246 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
12247 (CDEPS): New.
12248 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
12249 -Wl,--dynamic-list.
12250 * configure: Regenerate.
12251 * proc-service.list: New.
12252
12253 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
12254
12255 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
12256 New comment.
12257
12258 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
12259
12260 * gdbreplay.c (remote_open): Check error return from socket() call by
12261 its equality to -1 not by it being negative.
12262 * remote-utils.c (remote_open): Likewise.
12263
12264 2010-05-23 Pedro Alves <pedro@codesourcery.com>
12265
12266 * config.h: Regenerate.
12267
12268 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
12269
12270 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
12271 doesn't provide PTRACE_GET_THREAD_AREA.
12272
12273 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
12274
12275 * linux-m68k-low.c: Include <asm/ptrace.h>
12276 (ps_get_thread_area): Implement.
12277
12278 2010-05-03 Doug Evans <dje@google.com>
12279
12280 * event-loop.c (struct callback_event): New struct.
12281 (callback_list): New global.
12282 (append_callback_event, delete_callback_event): New functions.
12283 (process_callback): New function.
12284 (start_event_loop): Call it.
12285 * remote-utils.c (NOT_SCHEDULED): Define.
12286 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
12287 moved out of readchar.
12288 (readchar): Rewrite. Call reschedule before returning.
12289 (reset_readchar): New function.
12290 (remote_close): Call it.
12291 (process_remaining, reschedule): New functions.
12292 * server.h (callback_handler_func): New typedef.
12293 (append_callback_event, delete_callback_event): Declare.
12294
12295 2010-05-03 Pedro Alves <pedro@codesourcery.com>
12296
12297 * proc-service.c (ps_pglobal_lookup): Use
12298 thread_db_look_up_one_symbol.
12299 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
12300 parameter. Use it instead of all_symbols_looked_up.
12301 * server.h (struct process_info) <all_symbols_looked_up>: Delete
12302 field.
12303 (all_symbols_looked_up): Don't declare.
12304 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
12305 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
12306 field.
12307 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
12308 Set all_symbols_looked_up here.
12309 (thread_db_look_up_one_symbol): New.
12310 (thread_db_get_tls_address): Adjust.
12311 (thread_db_load_search, try_thread_db_load_1): Always allocate the
12312 thread_db object on the heap, and tentatively set it in the
12313 process structure.
12314 (thread_db_init): Don't set all_symbols_looked_up here.
12315 * linux-low.h (thread_db_look_up_one_symbol): Declare.
12316
12317 2010-05-03 Pedro Alves <pedro@codesourcery.com>
12318
12319 * linux-low.c (linux_kill, linux_detach): Adjust.
12320 (status_pending_p_callback): Remove redundant statement. Check
12321 for !TARGET_WAITIKIND_IGNORE, instead of
12322 TARGET_WAITKIND_STOPPED.
12323 (handle_tracepoints): Make sure LWP is locked. Adjust.
12324 (linux_wait_for_event_1): Adjust.
12325 (linux_cancel_breakpoints): New.
12326 (unsuspend_one_lwp): New.
12327 (unsuspend_all_lwps): New.
12328 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
12329 (send_sigstop_callback): Change return type to int, add new
12330 `except' parameter and handle it.
12331 (suspend_and_send_sigstop_callback): New.
12332 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
12333 pass them down. If SUSPEND, also increment the lwp's suspend
12334 count.
12335 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
12336 (need_step_over_p): Don't consider suspended LWPs.
12337 (start_step_over): Adjust.
12338 (proceed_one_lwp): Change return type to int, add new `except'
12339 parameter and handle it.
12340 (unsuspend_and_proceed_one_lwp): New.
12341 (proceed_all_lwps): Use find_inferior instead of
12342 for_each_inferior.
12343 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
12344 also decrement the suspend count of LWPs. Pass `except' down,
12345 instead of hacking its suspend count.
12346 (linux_pause_all): Add `freeze' parameter. Adjust.
12347 (linux_unpause_all): New.
12348 (linux_target_ops): Install linux_unpause_all.
12349 * server.c (handle_status): Adjust.
12350 * target.h (struct target_ops): New fields `unpause_all' and
12351 `cancel_breakpoints'. Add new parameter to `pause_all'.
12352 (pause_all): Add new `freeze' parameter.
12353 (unpause_all): New.
12354 (cancel_breakpoints): New.
12355 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
12356 cancel breakpoints.
12357 (cmd_qtstart): Pause threads.
12358 (stop_tracing): Pause threads, and cancel breakpoints.
12359 * win32-low.c (win32_target_ops): Adjust.
12360
12361 2010-05-03 Pedro Alves <pedro@codesourcery.com>
12362
12363 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
12364 the inferior right away from here...
12365 (linux_wait_1): ... to here, and adjust to check the thread's
12366 last_resume_kind instead of the lwp's step or stop_expected flags.
12367
12368 2010-05-02 Pedro Alves <pedro@codesourcery.com>
12369
12370 * README: Use consistent `GDB' and `GDBserver' spellings.
12371
12372 2010-05-02 Pedro Alves <pedro@codesourcery.com>
12373
12374 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
12375 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
12376 (linux_detach_one_lwp): Assume the lwp is stopped.
12377 (any_thread_of): Delete.
12378 (linux_detach): Stop all lwps here. Don't blindly delete all
12379 breakpoints.
12380 (delete_lwp_callback): New.
12381 (linux_mourn): Delete all lwps of the process that is gone.
12382 (linux_wait_1): Don't delete the last lwp of the process here.
12383 * mem-break.h (mark_breakpoints_out): Declare.
12384 * mem-break.c (mark_breakpoints_out): New.
12385 (free_all_breakpoints): Use it.
12386 * server.c (handle_target_event): If the process is gone, mark
12387 breakpoints out.
12388 * thread-db.c (struct thread_db) <create_bp>: New field.
12389 (thread_db_enable_reporting): Fix prototype. Store a thread event
12390 breakpoint reference in the thread_db struct.
12391 (thread_db_load_search): Clear the thread_db object.
12392 (try_thread_db_load_1): Ditto.
12393 (switch_to_process): New.
12394 (disable_thread_event_reporting): Use it.
12395 (remove_thread_event_breakpoints): New.
12396 (thread_db_detach, thread_db_mourn): Use it.
12397
12398 2010-05-01 Pedro Alves <pedro@codesourcery.com>
12399
12400 * linux-low.c (linux_enable_event_reporting): New.
12401 (linux_wait_for_event_1, handle_extended_wait): Use it.
12402
12403 2010-04-30 Pedro Alves <pedro@codesourcery.com>
12404
12405 * linux-low.c (linux_kill_one_lwp, linux_kill)
12406 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
12407 (send_sigstop): Take an lwp_info as parameter instead. Queue a
12408 SIGSTOP even if the LWP is stopped.
12409 (send_sigstop_callback): New.
12410 (stop_all_lwps): Use send_sigstop_callback instead.
12411 (linux_resume_one_thread): Adjust.
12412 (proceed_one_lwp): Still proceed an LWP that the client has
12413 requested to stop, if we haven't reported it as stopped yet. Make
12414 sure that LWPs the client want stopped, have a pending SIGSTOP.
12415
12416 2010-04-26 Doug Evans <dje@google.com>
12417
12418 * server.c (handle_general_set): Make static.
12419
12420 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
12421 Print received char after testing for error/eof instead of before.
12422 (input_interrupt): Tweak comment.
12423
12424 2010-04-23 Doug Evans <dje@google.com>
12425
12426 * server.c (start_inferior): Print inferior argv if --debug.
12427
12428 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
12429
12430 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
12431 * nto-x86-low.c: Include server.h
12432
12433 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
12434
12435 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
12436 be consistent with other sources of this directory.
12437 (init_registers_amd64): Correct name of source file of this function
12438 in the comment.
12439
12440 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12441
12442 * configure.srv (x86_64-*-mingw*): New configuration for Windows
12443 64-bit executables.
12444
12445 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12446
12447 * win32-i386-low.c: Add 64-bit support.
12448 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
12449 (init_registers_amd64): Declare.
12450 (mappings): Add 64-bit version of array.
12451 (init_windows_x86): New function.
12452 (the_low_target): Change init_arch field to init_windows_x86.
12453
12454 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12455
12456 * win32-low.c: Adapt to support also 64-bit architecture.
12457 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
12458 (get_image_name): Use SIZE_T type for local variable `done'.
12459 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
12460 (toolhelp_get_dll_name): Idem.
12461 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
12462 Use uintptr_t typecast to avoid warning.
12463 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
12464 (handle_exception): Use phex_nz to avoid warning.
12465 (win32_wait): Remove unused local variable `process'.
12466
12467 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12468
12469 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
12470 `amd64-avx.o'.
12471
12472 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
12473
12474 * configure.ac: Use `ws2_32' library for srv_mingw.
12475 * configure: Regenerate.
12476 * gdbreplay.c: Include winsock2.h instead of winsock.h.
12477 * remote-utils.c: Likewise.
12478
12479 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
12480
12481 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
12482 if __x86_64__ is defined.
12483
12484 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
12485
12486 * configure: Regenerate.
12487
12488 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
12489
12490 * server.c (handle_query): Handle 'qGetTIBAddr' query.
12491 * target.h (target_ops): New get_tib_address field.
12492 * win32-low.h (win32_thread_info): Add thread_local_base field.
12493 * win32-low.c (child_add_thread): Add tlb argument.
12494 Set thread_local_base field to TLB.
12495 (get_child_debug_event): Adapt to child_add_thread change.
12496 (win32_get_tib_address): New function.
12497 (win32_target_ops): Set get_tib_address field to
12498 win32_get_tib_address.
12499 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
12500
12501 2010-04-12 Pedro Alves <pedro@codesourcery.com>
12502
12503 * linux-low.c (linux_mourn): Also remove the process.
12504 * server.c (handle_target_event): Don't remove the process here.
12505 * nto-low.c (nto_mourn): New.
12506 (nto_target_ops): Install it.
12507 * spu-low.c (spu_mourn): New.
12508 (spu_target_ops): Install it.
12509 * win32-low.c (win32_mourn): New.
12510 (win32_target_ops): Install it.
12511
12512 2010-04-12 Pedro Alves <pedro@codesourcery.com>
12513
12514 * server.h (buffer_xml_printf): Remove redundant `;'.
12515
12516 2010-04-12 Pedro Alves <pedro@codesourcery.com>
12517
12518 * regcache.c (set_register_cache): Invalidate regcaches before
12519 changing the register cache layout.
12520 (regcache_invalidate_one): Allow a NULL regcache.
12521 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
12522 regcaches before changing the register cache layout or the target
12523 regsets.
12524
12525 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
12526
12527 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
12528 variable warning on Linux/x86-64.
12529
12530 2010-04-11 Pedro Alves <pedro@codesourcery.com>
12531
12532 GDBserver disconnected tracing support.
12533
12534 * linux-low.c (linux_remove_process): Delete.
12535 (add_lwp): Don't set last_resume_kind here.
12536 (linux_kill): Use `mourn'.
12537 (linux_detach): Use `thread_db_detach', and `mourn'.
12538 (linux_mourn): New.
12539 (linux_attach_lwp_1): Adjust comment.
12540 (linux_attach): last_resume_kind moved the thread_info; adjust.
12541 (status_pending_p_callback): Adjust.
12542 (linux_wait_for_event_1): Adjust.
12543 (count_events_callback, select_singlestep_lwp_callback)
12544 (select_event_lwp_callback, cancel_breakpoints_callback)
12545 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
12546 (proceed_one_lwp): Adjust.
12547 (linux_async): Add debug output.
12548 (linux_thread_stopped): New.
12549 (linux_pause_all): New.
12550 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
12551 linux_pause_all.
12552 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
12553 (thread_db_free): Delete declaration.
12554 (thread_db_detach, thread_db_mourn): Declare.
12555 * thread-db.c (thread_db_init): Use thread_db_mourn.
12556 (thread_db_free): Delete, split in two.
12557 (disable_thread_event_reporting): New.
12558 (thread_db_detach): New.
12559 (thread_db_mourn): New.
12560
12561 * server.h (struct thread_info) <last_resume_kind>: New field.
12562 <attached>: Add comment.
12563 <gdb_detached>: New field.
12564 (handler_func): Change return type to int.
12565 (handle_serial_event, handle_target_event): Ditto.
12566 (gdb_connected): Declare.
12567 (tracing): Delete.
12568 (disconnected_tracing): Declare.
12569 (stop_tracing): Declare.
12570
12571 * server.c (handle_query) <qSupported>: Report support for
12572 disconnected tracing.
12573 (queue_stop_reply_callback): Account for running threads.
12574 (gdb_wants_thread_stopped): New.
12575 (gdb_wants_all_threads_stopped): New.
12576 (gdb_reattached_process): New.
12577 (handle_status): Clear the `gdb_detached' flag of all processes.
12578 In all-stop, stop all threads.
12579 (main): Be sure to leave tfind mode. Handle disconnected tracing.
12580 (process_serial_event): If the remote connection breaks, or if an
12581 exit was forced with "monitor exit", force an event loop exit.
12582 Handle disconnected tracing on detach.
12583 (handle_serial_event): Adjust.
12584 (handle_target_event): If GDB isn't connected, forward events back
12585 to the inferior, unless the last process exited, in which case,
12586 exit gdbserver. Adjust interface.
12587
12588 * remote-utils.c (remote_open): Don't block in accept. Instead
12589 register an event loop source on the listen socket file
12590 descriptor. Refactor bits into ...
12591 (listen_desc): ... this new global.
12592 (gdb_connected): ... this new function.
12593 (enable_async_notification): ... this new function.
12594 (handle_accept_event): ... this new function.
12595 (remote_close): Clear remote_desc.
12596
12597 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
12598
12599 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
12600 New fields.
12601 (mourn_inferior): Define.
12602 (target_process_qsupported): Avoid the dangling else problem.
12603 (thread_stopped): Define.
12604 (pause_all): Define.
12605 (target_waitstatus_to_string): Declare.
12606 * target.c (target_waitstatus_to_string): New.
12607
12608 * tracepoint.c (tracing): Make extern.
12609 (disconnected_tracing): New.
12610 (stop_tracing): Make extern. Handle tracing stops due to GDB
12611 disconnecting.
12612 (cmd_qtdisconnected): New.
12613 (cmd_qtstatus): Report disconnected tracing status in trace reply.
12614 (handle_tracepoint_general_set): Handle QTDisconnected.
12615
12616 * event-loop.c (event_handler_func): Change return type to int.
12617 (process_event): Bail out if the event handler wants the event
12618 loop to stop.
12619 (handle_file_event): Ditto.
12620 (start_event_loop): Bail out if the event handler wants the event
12621 loop to stop.
12622
12623 * nto-low.c (nto_target_ops): Adjust.
12624 * spu-low.c (spu_wait): Don't remove the process here.
12625 (spu_target_ops): Adjust.
12626 * win32-low.c (win32_wait): Don't remove the process here.
12627 (win32_target_ops): Adjust.
12628
12629 2010-04-11 Pedro Alves <pedro@codesourcery.com>
12630
12631 * regcache.c (realloc_register_cache): Invalidate inferior's
12632 regcache before recreating it.
12633
12634 2010-04-09 Pedro Alves <pedro@codesourcery.com>
12635
12636 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
12637
12638 2010-04-09 Stan Shebs <stan@codesourcery.com>
12639 Pedro Alves <pedro@codesourcery.com>
12640
12641 * server.h (LONGEST): New.
12642 (struct thread_info) <while_stepping>: New field.
12643 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
12644 Declare.
12645 (initialize_tracepoint, handle_tracepoint_general_set)
12646 (handle_tracepoint_query, tracepoint_finished_step)
12647 (tracepoint_was_hit, release_while_stepping_state_list):
12648 (current_traceframe): Declare.
12649 * server.c (handle_general_set): Handle tracepoint packets.
12650 (read_memory): New.
12651 (write_memory): New.
12652 (handle_search_memory_1): Use read_memory.
12653 (handle_query): Report support for conditional tracepoints, trace
12654 state variables, and tracepoint sources. Handle tracepoint
12655 queries.
12656 (main): Initialize the tracepoints module.
12657 (process_serial_event): Handle traceframe reads/writes.
12658
12659 * linux-low.c (handle_tracepoints): New.
12660 (linux_wait_1): Call it.
12661 (linux_resume_one_lwp): Handle while-stepping.
12662 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
12663 (linux_target_ops): Install them.
12664 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
12665 New field.
12666 * linux-x86-low.c (x86_supports_tracepoints): New.
12667 (the_low_target). Install it.
12668
12669 * mem-break.h (delete_breakpoint): Declare.
12670 * mem-break.c (delete_breakpoint): Make external.
12671
12672 * target.h (struct target_ops): Add `supports_tracepoints',
12673 `read_pc', and `write_pc' fields.
12674 (target_supports_tracepoints): Define.
12675 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
12676 (phex_nz): New.
12677
12678 * regcache.h (struct regcache) <registers_owned>: New field.
12679 (init_register_cache, regcache_cpy): Declare.
12680 (regcache_read_pc, regcache_write_pc): Declare.
12681 (register_cache_size): Declare.
12682 (supply_regblock): Declare.
12683 * regcache.c (init_register_cache): New.
12684 (new_register_cache): Use it.
12685 (regcache_cpy): New.
12686 (register_cache_size): New.
12687 (supply_regblock): New.
12688 (regcache_read_pc, regcache_write_pc): New.
12689
12690 * tracepoint.c: New.
12691
12692 * Makefile.in (OBS): Add tracepoint.o.
12693 (tracepoint.o): New rule.
12694
12695 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
12696
12697 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
12698 (i386-mmx.o): New.
12699 (i386-mmx.c): Likewise.
12700 (i386-mmx-linux.o): Likewise.
12701 (i386-mmx-linux.c): Likewise.
12702
12703 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
12704 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
12705 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
12706 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
12707
12708 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
12709 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
12710 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
12711
12712 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
12713
12714 * Makefile.in (clean): Updated.
12715 (i386-avx.o): New.
12716 (i386-avx.c): Likewise.
12717 (i386-avx-linux.o): Likewise.
12718 (i386-avx-linux.c): Likewise.
12719 (amd64-avx.o): Likewise.
12720 (amd64-avx.c): Likewise.
12721 (amd64-avx-linux.o): Likewise.
12722 (amd64-avx-linux.c): Likewise.
12723
12724 * configure.srv (srv_i386_regobj): Add i386-avx.o.
12725 (srv_i386_linux_regobj): Add i386-avx-linux.o.
12726 (srv_amd64_regobj): Add amd64-avx.o.
12727 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
12728 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
12729 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
12730 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
12731 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
12732 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
12733 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
12734
12735 * i387-fp.c: Include "i386-xstate.h".
12736 (i387_xsave): New.
12737 (i387_cache_to_xsave): Likewise.
12738 (i387_xsave_to_cache): Likewise.
12739 (x86_xcr0): Likewise.
12740
12741 * i387-fp.h (i387_cache_to_xsave): Likewise.
12742 (i387_xsave_to_cache): Likewise.
12743 (x86_xcr0): Likewise.
12744
12745 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
12746 * linux-crisv32-low.c (target_regsets): Likewise.
12747 * linux-m68k-low.c (target_regsets): Likewise.
12748 * linux-mips-low.c (target_regsets): Likewise.
12749 * linux-ppc-low.c (target_regsets): Likewise.
12750 * linux-s390-low.c (target_regsets): Likewise.
12751 * linux-sh-low.c (target_regsets): Likewise.
12752 * linux-sparc-low.c (target_regsets): Likewise.
12753 * linux-xtensa-low.c (target_regsets): Likewise.
12754
12755 * linux-low.c: Include <sys/uio.h>.
12756 (regsets_fetch_inferior_registers): Support nt_type.
12757 (regsets_store_inferior_registers): Likewise.
12758 (linux_process_qsupported): New.
12759 (linux_target_ops): Add linux_process_qsupported.
12760
12761 * linux-low.h (regset_info): Add nt_type.
12762 (linux_target_ops): Add process_qsupported.
12763
12764 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
12765 and <sys/uio.h>.
12766 (init_registers_i386_avx_linux): New.
12767 (init_registers_amd64_avx_linux): Likewise.
12768 (xmltarget_i386_linux_no_xml): Likewise.
12769 (xmltarget_amd64_linux_no_xml): Likewise.
12770 (PTRACE_GETREGSET): Likewise.
12771 (PTRACE_SETREGSET): Likewise.
12772 (x86_fill_xstateregset): Likewise.
12773 (x86_store_xstateregset): Likewise.
12774 (use_xml): Likewise.
12775 (x86_linux_update_xmltarget): Likewise.
12776 (x86_linux_process_qsupported): Likewise.
12777 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
12778 (x86_arch_setup): Don't call init_registers_amd64_linux nor
12779 init_registers_i386_linux here. Call
12780 x86_linux_update_xmltarget.
12781 (the_low_target): Add x86_linux_process_qsupported.
12782
12783 * server.c (handle_query): Call target_process_qsupported.
12784
12785 * target.h (target_ops): Add process_qsupported.
12786 (target_process_qsupported): New.
12787
12788 2010-04-03 Pedro Alves <pedro@codesourcery.com>
12789
12790 * inferiors.c (add_thread): Set last_status kind to
12791 TARGET_WAITKIND_IGNORE.
12792 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
12793 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
12794 (linux_wait_1): Move `thread' local definition to block that uses
12795 it. Don't NULL initialize `event_child'.
12796 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
12797 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
12798 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
12799
12800 2010-04-01 Pedro Alves <pedro@codesourcery.com>
12801
12802 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
12803 an extended waitstatus, or by a watchpoint.
12804 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
12805 thread was stepping or has been stopped by a watchpoint.
12806
12807 2010-04-01 Pedro Alves <pedro@codesourcery.com>
12808
12809 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
12810 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
12811 of another, then delete the previous, and validate all
12812 breakpoints.
12813 (validate_inserted_breakpoint): New.
12814 (delete_disabled_breakpoints): New.
12815 (validate_breakpoints): New.
12816 (check_mem_read): Validate breakpoints before trusting their
12817 shadow. Delete disabled breakpoints.
12818 (check_mem_write): Validate breakpoints before trusting they
12819 should be inserted. Delete disabled breakpoints.
12820 * mem-break.h (validate_breakpoints):
12821 * server.c (handle_query): Validate breakpoints when we see a
12822 qSymbol query.
12823
12824 2010-04-01 Pedro Alves <pedro@codesourcery.com>
12825
12826 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
12827 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
12828 if we could tell there's a GDB breakpoint at stop_pc.
12829 (need_step_over_p): Don't do a step over if we find a GDB
12830 breakpoint at the resume PC.
12831
12832 * mem-break.c (struct raw_breakpoint): New.
12833 (enum bkpt_type): New type `gdb_breakpoint'.
12834 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
12835 fields. New field `raw'.
12836 (find_raw_breakpoint_at): New.
12837 (set_raw_breakpoint_at): Handle refcounting. Create a raw
12838 breakpoint instead.
12839 (set_breakpoint_at): Adjust.
12840 (delete_raw_breakpoint): New.
12841 (release_breakpoint): New.
12842 (delete_breakpoint): Rename to...
12843 (delete_breakpoint_1): ... this. Add proc parameter. Use
12844 release_breakpoint. Return ENOENT.
12845 (delete_breakpoint): Reimplement.
12846 (find_breakpoint_at): Delete.
12847 (find_gdb_breakpoint_at): New.
12848 (delete_breakpoint_at): Delete.
12849 (set_gdb_breakpoint_at): New.
12850 (delete_gdb_breakpoint_at): New.
12851 (gdb_breakpoint_here): New.
12852 (set_reinsert_breakpoint): Use release_breakpoint.
12853 (uninsert_breakpoint): Rename to ...
12854 (uninsert_raw_breakpoint): ... this.
12855 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
12856 (reinsert_raw_breakpoint): Change parameter type to
12857 raw_breakpoint.
12858 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
12859 instead.
12860 (check_breakpoints): Adjust. Use release_breakpoint.
12861 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
12862 (breakpoint_inserted_here): Ditto.
12863 (check_mem_read): Adjust to iterate over raw breakpoints instead.
12864 Don't trust the breakpoint's shadow if it is not inserted.
12865 (check_mem_write): Adjust to iterate over raw breakpoints instead.
12866 (delete_all_breakpoints): Adjust.
12867 (free_all_breakpoints): Mark all breakpoints as uninserted, and
12868 use delete_breakpoint_1.
12869
12870 * mem-break.h (breakpoints_supported): Delete declaration.
12871 (set_gdb_breakpoint_at): Declare.
12872 (gdb_breakpoint_here): Declare.
12873 (delete_breakpoint_at): Delete.
12874 (delete_gdb_breakpoint_at): Declare.
12875
12876 * server.h (struct raw_breakpoint): Forward declare.
12877 (struct process_info): New field `raw_breakpoints'.
12878
12879 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
12880 breakpoints.
12881
12882 2010-03-24 Pedro Alves <pedro@codesourcery.com>
12883
12884 * linux-low.c (status_pending_p_callback): Fix comment.
12885 (linux_wait_for_event_1): Move most of the internal breakpoint
12886 handling from here...
12887 (linux_wait_1): ... to here.
12888 (count_events_callback): New.
12889 (select_singlestep_lwp_callback): New.
12890 (select_event_lwp_callback): New.
12891 (cancel_breakpoints_callback): New.
12892 (select_event_lwp): New.
12893 (linux_wait_1): Simplify internal breakpoint handling. Give equal
12894 priority to all LWPs that have had events that should be reported
12895 to the client. Cancel breakpoints when about to reporting the
12896 event to the client, not while stopping lwps. No longer cancel
12897 finished single-steps here.
12898 (cancel_finished_single_step): Delete.
12899 (cancel_finished_single_steps): Delete.
12900
12901 2010-03-24 Pedro Alves <pedro@codesourcery.com>
12902
12903 * mem-break.c (enum bkpt_type): New.
12904 (struct breakpoint): New field `type'.
12905 (set_breakpoint_at): Change return type to struct breakpoint
12906 pointer. Set type to `other_breakpoint' by default.
12907 (delete_breakpoint): Rewrite, supporting more than one breakpoint
12908 in the breakpoint list.
12909 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
12910 (reinsert_breakpoint): Rename to ...
12911 (reinsert_raw_breakpoint): ... this.
12912 (reinsert_breakpoints_at): Adjust.
12913 * mem-break.h (struct breakpoint): Declare.
12914 (set_breakpoint_at): Change return type to struct breakpoint
12915 pointer.
12916
12917 2010-03-24 Pedro Alves <pedro@codesourcery.com>
12918
12919 * server.c (handle_query): Assign, not compare.
12920
12921 2010-03-24 Pedro Alves <pedro@codesourcery.com>
12922
12923 Teach linux gdbserver to step-over-breakpoints.
12924
12925 * linux-low.c (can_hardware_single_step): New.
12926 (supports_breakpoints): New.
12927 (handle_extended_wait): If stopping threads, read the stop pc of
12928 the new cloned LWP.
12929 (get_pc): New.
12930 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
12931 low target doesn't support retrieving the PC.
12932 (add_lwp): Set last_resume_kind to resume_continue.
12933 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
12934 (linux_attach): Don't clear stop_expected. Set the lwp's
12935 last_resume_kind to resume_stop.
12936 (linux_detach_one_lwp): Don't check for removed breakpoints.
12937 (check_removed_breakpoint): Delete.
12938 (status_pending_p): Rename to ...
12939 (status_pending_p_callback): ... this. Don't check for removed
12940 breakpoints. Don't consider threads that are stopped from GDB's
12941 perspective.
12942 (linux_wait_for_lwp): Always read the stop_pc here.
12943 (cancel_breakpoint): New.
12944 (step_over_bkpt): New global.
12945 (linux_wait_for_event_1): Implement stepping over breakpoints.
12946 (gdb_wants_lwp_stopped): New.
12947 (gdb_wants_all_stopped): New.
12948 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
12949 single-step traps here. Store the thread's last reported target
12950 wait status.
12951 (send_sigstop): Don't clear stop_expected. Always set it,
12952 instead.
12953 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
12954 (cancel_finished_single_step): New.
12955 (cancel_finished_single_steps): New.
12956 (wait_for_sigstop): Don't cancel finished single-step traps here.
12957 (linux_resume_one_lwp): Don't check for removed breakpoints.
12958 Don't set `step' on non-hardware step archs.
12959 (linux_set_resume_request): Ignore resume_stop requests if already
12960 stopping or stopped. Set the lwp's last_resume_kind.
12961 (resume_status_pending_p): Don't check for removed breakpoints.
12962 (need_step_over_p): New.
12963 (start_step_over): New.
12964 (finish_step_over): New.
12965 (linux_resume_one_thread): Always queue a sigstop for resume_stop
12966 requests. Clear the thread's last reported target waitstatus.
12967 Don't use the `suspended' flag. Don't consider pending breakpoints.
12968 (linux_resume): Start a step-over if necessary.
12969 (proceed_one_lwp): New.
12970 (proceed_all_lwps): New.
12971 (unstop_all_lwps): New.
12972 * linux-low.h (struct lwp_info): Rewrite comment for the
12973 `suspended' flag. Add the `stop_pc' field. Delete the
12974 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
12975 Add `'last_resume_kind' and `need_step_over' fields.
12976 * inferiors.c (struct thread_info): Delete, moved elsewhere.
12977 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
12978 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
12979 (set_raw_breakpoint_at): New.
12980 (set_breakpoint_at): Rewrite to use it.
12981 (reinsert_breakpoint_handler): Delete.
12982 (set_reinsert_breakpoint): New.
12983 (reinsert_breakpoint_by_bp): Delete.
12984 (delete_reinsert_breakpoints): New.
12985 (uninsert_breakpoint): Rewrite.
12986 (uninsert_breakpoints_at): New.
12987 (reinsert_breakpoint): Rewrite.
12988 (reinsert_breakpoints_at): New.
12989 (check_breakpoints): Rewrite.
12990 (breakpoint_here): New.
12991 (breakpoint_inserted_here): New.
12992 (check_mem_read): Adjust.
12993 * mem-break.h (breakpoints_supported, breakpoint_here)
12994 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
12995 (reinsert_breakpoint_by_bp): Delete declaration.
12996 (delete_reinsert_breakpoints): Declare.
12997 (reinsert_breakpoint): Delete declaration.
12998 (reinsert_breakpoints_at): Declare.
12999 (uninsert_breakpoint): Delete declaration.
13000 (uninsert_breakpoints_at): Declare.
13001 (check_breakpoints): Adjust prototype.
13002 * server.h: Adjust include order.
13003 (struct thread_info): Declare here. Add a `last_status' field.
13004
13005 2010-03-23 Michael Snyder <msnyder@vmware.com>
13006
13007 * server.c (crc32): New function.
13008 (handle_query): Add handling for 'qCRC:' request.
13009
13010 2010-03-23 Pedro Alves <pedro@codesourcery.com>
13011
13012 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
13013 lwp had been stopped by a watchpoint.
13014
13015 2010-03-16 Pedro Alves <pedro@codesourcery.com>
13016
13017 * server.h (internal_error): Declare.
13018 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
13019 * utils.c (internal_error): New function.
13020
13021 2010-03-15 Andreas Schwab <schwab@redhat.com>
13022
13023 * configure.srv: Fix typo setting srv_regobj.
13024
13025 2010-03-15 Pedro Alves <pedro@codesourcery.com>
13026
13027 * linux-low.c (fetch_register): Avoid passing a non string literal
13028 format to `error'.
13029 (usr_store_inferior_registers): Ditto.
13030
13031 2010-03-14 Pedro Alves <pedro@codesourcery.com>
13032
13033 * linux-low.c (linux_write_memory): Bail out early if peeking
13034 memory failed.
13035
13036 2010-03-14 Pedro Alves <pedro@codesourcery.com>
13037
13038 * linux-low.h (struct lwp_info): New fields
13039 `stopped_by_watchpoint' and `stopped_data_address'.
13040 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
13041 here, and cache them in the lwp object.
13042 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
13043 directly.
13044 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
13045 field.
13046 (linux_stopped_by_watchpoint): Rewrite.
13047 (linux_stopped_data_address): Rewrite.
13048
13049 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
13050
13051 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
13052 switching the current inferior, not before.
13053
13054 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
13055
13056 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
13057 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
13058 i386-linux.c and amd64-linux.c.
13059 (reg-i386.o): Removed.
13060 (reg-i386.c): Likewise.
13061 (reg-i386-linux.o): Likewise.
13062 (reg-i386-linux.c): Likewise.
13063 (reg-x86-64.o): Likewise.
13064 (reg-x86-64.c): Likewise.
13065 (reg-x86-64-linux.o): Likewise.
13066 (reg-x86-64-linux.c): Likewise.
13067 (i386.o): New.
13068 (i386.c): Likewise.
13069 (i386-linux.o): Likewise.
13070 (i386-linux.c): Likewise.
13071 (amd64.o): Likewise.
13072 (amd64.c): Likewise.
13073 (amd64-linux.o): Likewise.
13074 (amd64-linux.c): Likewise.
13075
13076 * configure.srv (srv_i386_regobj): New.
13077 (srv_i386_linux_regobj): Likewise.
13078 (srv_amd64_regobj): Likewise.
13079 (srv_amd64_linux_regobj): Likewise.
13080 (srv_i386_32bit_xmlfiles): Likewise.
13081 (srv_i386_64bit_xmlfiles): Likewise.
13082 (srv_i386_xmlfiles): Likewise.
13083 (srv_amd64_xmlfiles): Likewise.
13084 (srv_i386_linux_xmlfiles): Likewise.
13085 (srv_amd64_linux_xmlfiles): Likewise.
13086 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
13087 srv_xmlfiles to $srv_i386_xmlfiles.
13088 (i[34567]86-*-mingw32ce*): Likewise.
13089 (i[34567]86-*-mingw*): Likewise.
13090 (i[34567]86-*-nto*): Likewise.
13091 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
13092 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
13093 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
13094 (x86_64-*-linux*): Likewise.
13095
13096 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
13097 (init_registers_amd64_linux): New.
13098 (x86_arch_setup): Replace init_registers_x86_64_linux with
13099 init_registers_amd64_linux.
13100
13101 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
13102
13103 * configure.ac: Check for libdl. If it is not available link against
13104 static libthread_db.
13105 * configure: Regenerate.
13106
13107 2010-02-22 Pedro Alves <pedro@codesourcery.com>
13108
13109 PR9605
13110
13111 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
13112 handing a read watchpoint.
13113 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
13114
13115 2010-02-12 Doug Evans <dje@google.com>
13116
13117 * linux-low.c (linux_supports_tracefork_flag): Document.
13118 (linux_look_up_symbols): Add comment.
13119
13120 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
13121
13122 * regcache.c (supply_register): Clear regcache if buf is NULL.
13123
13124 2010-02-02 Nicolas Roche <roche@sourceware.org>
13125 Joel Brobecker <brobecker@adacore.com>
13126
13127 * inferiors.c (find_inferior): Add function documentation.
13128 (unloaded_dll): Handle the case where the unloaded dll has not
13129 been previously registered in the dll list.
13130
13131 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
13132
13133 * linux-arm-low.c (thumb_breakpoint_len): Delete.
13134 (thumb2_breakpoint): New.
13135 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
13136
13137 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
13138
13139 * linux-low.c (get_stop_pc): Check for SIGTRAP.
13140 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
13141 breakpoints.
13142
13143 2010-01-21 Pedro Alves <pedro@codesourcery.com>
13144
13145 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
13146
13147 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
13148
13149 * linux-s390-low.c (s390_collect_ptrace_register)
13150 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
13151
13152 2010-01-21 Doug Evans <dje@google.com>
13153
13154 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
13155 (PTRACE_ARG4_TYPE): New macro.
13156 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
13157 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
13158 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
13159 (usr_store_inferior_registers): Ditto.
13160 (linux_read_memory, linux_write_memory): Ditto.
13161 (linux_test_for_tracefork): Ditto.
13162
13163 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
13164 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
13165
13166 2010-01-21 Pedro Alves <pedro@codesourcery.com>
13167
13168 * proc-service.c (ps_lgetregs): Don't refetch registers from the
13169 target.
13170
13171 2010-01-21 Pedro Alves <pedro@codesourcery.com>
13172
13173 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
13174 prototype to take a regcache. Adjust.
13175
13176 2010-01-20 Pedro Alves <pedro@codesourcery.com>
13177
13178 * regcache.h (struct thread_info): Forward declare.
13179 (struct regcache): New.
13180 (new_register_cache): Adjust prototype.
13181 (get_thread_regcache): Declare.
13182 (free_register_cache): Adjust prototype.
13183 (registers_to_string, registers_from_string): Ditto.
13184 (supply_register, supply_register_by_name, collect_register)
13185 (collect_register_as_string, collect_register_by_name): Ditto.
13186 * regcache.c (struct inferior_regcache_data): Delete.
13187 (get_regcache): Rename to ...
13188 (get_thread_regcache): ... this. Adjust. Switch inferior before
13189 fetching registers.
13190 (regcache_invalidate_one): Adjust.
13191 (regcache_invalidate): Fix prototype.
13192 (new_register_cache): Return the new register cache.
13193 (free_register_cache): Change prototype.
13194 (realloc_register_cache): Adjust.
13195 (registers_to_string): Change prototype to take a regcache. Adjust.
13196 (registers_from_string): Ditto.
13197 (register_data): Ditto.
13198 (supply_register): Ditto.
13199 (supply_register_by_name): Ditto.
13200 (collect_register): Ditto.
13201 (collect_register_as_string): Ditto.
13202 (collect_register_by_name): Ditto.
13203 * server.c (process_serial_event): Adjust.
13204 * linux-low.h (regset_fill_func, regset_store_func): Change
13205 prototype.
13206 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
13207 Change prototype.
13208 * linux-low.c (get_stop_pc): Adjust.
13209 (check_removed_breakpoint): Adjust.
13210 (linux_wait_for_event): Adjust.
13211 (linux_resume_one_lwp): Adjust.
13212 (fetch_register): Add regcache parameter. Adjust.
13213 (usr_store_inferior_registers): Ditto.
13214 (regsets_fetch_inferior_registers): Ditto.
13215 (regsets_store_inferior_registers): Ditto.
13216 (linux_fetch_registers, linux_store_registers): Ditto.
13217 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
13218 regcache. Adjust.
13219 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
13220 Ditto.
13221 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
13222 prototype to take a regcache.
13223 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
13224 * remote-utils.c (convert_ascii_to_int, outreg)
13225 (prepare_resume_reply): Change prototype to take a regcache.
13226 Adjust.
13227 * target.h (struct target_ops) <fetch_registers, store_registers>:
13228 Change prototype to take a regcache.
13229 (fetch_inferior_registers, store_inferior_registers): Change
13230 prototype to take a regcache. Adjust.
13231 * proc-service.c (ps_lgetregs): Adjust.
13232 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
13233 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
13234 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
13235 take a regcache. Adjust.
13236 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
13237 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
13238 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
13239 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
13240 * linux-cris-low.c (cris_get_pc, cris_set_pc)
13241 (cris_cannot_fetch_register):
13242 (cris_breakpoint_at): Change prototype to take a regcache.
13243 Adjust.
13244 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
13245 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
13246 to take a regcache. Adjust.
13247 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
13248 Adjust.
13249 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
13250 take a regcache. Adjust.
13251 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
13252 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
13253 (m68k_set_pc): Change prototype to take a regcache. Adjust.
13254 * linux-mips-low.c (mips_get_pc):
13255 (mips_set_pc): Change prototype to take a regcache. Adjust.
13256 (mips_reinsert_addr): Adjust.
13257 (mips_collect_register): Change prototype to take a regcache.
13258 Adjust.
13259 (mips_supply_register):
13260 (mips_collect_register_32bit, mips_supply_register_32bit)
13261 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
13262 (mips_store_fpregset): Ditto.
13263 * linux-ppc-low.c (ppc_supply_ptrace_register)
13264 (ppc_supply_ptrace_register): Ditto.
13265 (parse_spufs_run): Adjust.
13266 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
13267 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
13268 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
13269 take a regcache. Adjust.
13270 * linux-s390-low.c (s390_collect_ptrace_register)
13271 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
13272 (s390_set_pc): Change prototype to take a regcache. Adjust.
13273 (s390_arch_setup): Adjust.
13274 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
13275 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
13276 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
13277 (sparc_fill_gregset, sparc_store_gregset_from_stack)
13278 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
13279 regcache. Adjust.
13280 (sparc_breakpoint_at): Adjust.
13281 * linux-xtensa-low.c (xtensa_fill_gregset):
13282 (xtensa_store_gregset):
13283 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
13284 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
13285 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
13286 prototype to take a regcache. Adjust.
13287 * win32-arm-low.c (arm_fetch_inferior_register)
13288 (arm_store_inferior_register): Change prototype to take a
13289 regcache. Adjust.
13290 * win32-i386-low.c (i386_fetch_inferior_register)
13291 (i386_store_inferior_register): Change prototype to take a
13292 regcache. Adjust.
13293 * win32-low.c (child_fetch_inferior_registers)
13294 (child_store_inferior_registers): Change prototype to take a
13295 regcache. Adjust.
13296 (win32_wait): Adjust.
13297 (win32_fetch_inferior_registers): Change prototype to take a
13298 regcache. Adjust.
13299 (win32_store_inferior_registers): Adjust.
13300 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
13301 store_inferior_register>: Change prototype to take a regcache.
13302
13303 2010-01-20 Doug Evans <dje@google.com>
13304
13305 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
13306 #ifdef.
13307 (linux_wait_for_event1, linux_init_signals): Ditto.
13308 (W_STOPCODE): Provide definition if missing.
13309
13310 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
13311
13312 * linux-low.c (linux_core_of_thread): New.
13313 (compare_ints, show_process, list_threads): New.
13314 (linux_qxfer_osdata): Report threads and cores.
13315 (linux_target_op): Register linux_core_of_thread.
13316 * remote-utils.c (prepare_resume_reply): Report the core.
13317 (buffer_xml_printf): Support %d specifier.
13318 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
13319 New.
13320 (handle_query): Handle qXfer:threads. Announce availability
13321 thereof.
13322 * target.h (struct target_ops): New field core_of_thread.
13323
13324 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
13325
13326 * Makefile.in (clean): Remove new generated files.
13327 (reg-s390.o, reg-s390.c): Remove rules.
13328 (reg-s390x.o, reg-s390x.c): Likewise.
13329 (s390-linux32.o, s390-linux32.c): Add rules.
13330 (s390-linux64.o, s390-linux64.c): Likewise.
13331 (s390x-linux64.o, s390x-linux64.c): Likewise.
13332 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
13333 * linux-s390-low.c: Include <elf.h>.
13334 (HWCAP_S390_HIGH_GPRS): Define if undefined.
13335 (init_registers_s390): Remove prototype.
13336 (init_registers_s390x): Likewise.
13337 (init_registers_s390_linux32): Add prototype.
13338 (init_registers_s390_linux64): Likewise.
13339 (init_registers_s390x_linux64): Likewise.
13340 (s390_num_regs_3264): New define.
13341 (s390_regmap_3264): New global variable.
13342 (s390_cannot_fetch_register): Remove obsolete check.
13343 (s390_cannot_store_register): Likewise.
13344 (s390_collect_ptrace_register): Handle upper/lower register halves.
13345 (s390_supply_ptrace_register): Likewise.
13346 (s390_fill_gregset): Update to register number changes.
13347 (s390_get_hwcap): New routine.
13348 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
13349 Install appropriate regmap and register set.
13350
13351 2010-01-01 Joel Brobecker <brobecker@adacore.com>
13352
13353 * server.c (gdbserver_version): Update copyright year to 2010.
13354 * gdbreplay.c (gdbreplay_version): Likewise.
13355
13356 2009-12-28 Doug Evans <dje@google.com>
13357
13358 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
13359 elf/external.h. Include <elf.h> instead but only if necessary.
13360
13361 2009-12-28 Pedro Alves <pedro@codesourcery.com>
13362
13363 * linux-low.c (linux_remove_process): Remove `detaching'
13364 parameter. Don't release/detach from thread_db here.
13365 (linux_kill): Release/detach from thread_db here, ...
13366 (linux_detach): ... and here, before actually detaching.
13367 (linux_wait_1): ... and here, when a process exits.
13368 * thread-db.c (any_thread_of): New.
13369 (thread_db_free): Switch the current inferior to a thread of the
13370 passed in process.
13371
13372 2009-12-21 Doug Evans <dje@google.com>
13373
13374 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
13375
13376 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
13377 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
13378 warning ifndef __NR_tkill. Move setting of errno there too.
13379 Delete unnecessary resetting of errno after syscall.
13380 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
13381
13382 * configure.ac: Check for dladdr.
13383 * config.in: Regenerate.
13384 * configure: Regenerate.
13385 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
13386 (try_thread_db_load): Update.
13387
13388 * linux-low.c (my_waitpid): Delete unnecessary prototype.
13389
13390 2009-12-18 Doug Evans <dje@google.com>
13391
13392 * event-loop.c: Include unistd.h if it exists.
13393
13394 * linux-low.c (my_waitpid): Move definition away from being in
13395 between linux_tracefork_child/linux_test_for_tracefork.
13396
13397 * gdb_proc_service.h (psaddr_t): Fix type.
13398 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
13399 signature to match glibc.
13400
13401 2009-12-16 Doug Evans <dje@google.com>
13402
13403 * linux-low.c (linux_read_memory): Fix argument to read.
13404
13405 2009-11-26 Pedro Alves <pedro@codesourcery.com>
13406
13407 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
13408 events, don't leave current_inferior pointing at null.
13409
13410 2009-11-26 Pedro Alves <pedro@codesourcery.com>
13411
13412 * win32-low.c (LOG): Delete.
13413 (OUTMSG): Output to stderr.
13414 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
13415 on compile time LOG macro.
13416 (win32_wait): Fix debug output.
13417
13418 2009-11-26 Pedro Alves <pedro@codesourcery.com>
13419
13420 * win32-low.c (win32_add_one_solib): If the dll name is
13421 "ntdll.dll", prepend the system directory to the dll path.
13422
13423 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
13424
13425 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
13426
13427 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
13428 Vladimir Prus <vladimir@codesourcery.com>
13429
13430 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
13431 * configure.ac: Check for __mcoldfire__ and set
13432 gdb_cv_m68k_is_coldfire.
13433 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
13434 reg-cf.o and reg-m68k.o.
13435 * configure: Regenerated.
13436
13437 2009-11-16 Pedro Alves <pedro@codesourcery.com>
13438
13439 * linux-low.c (linux_remove_process): Add `detaching' parameter.
13440 Pass it to thread_db_free.
13441 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
13442 proper `detaching' argument to linux_remove_process.
13443 * linux-low.h (thread_db_free): Add `detaching' parameter.
13444 * thread-db.c (thread_db_init): Pass false as `detaching' argument
13445 to thread_db_free.
13446 (thread_db_free): Add `detaching' parameter. Only
13447 call td_ta_clear_event if detaching from process.
13448
13449 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
13450
13451 * thread-db.c (thread_db_free): Fix typo.
13452
13453 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
13454
13455 PR gdb/10838
13456 * thread-db.c (thread_db_free): Call td_ta_clear_event.
13457
13458 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
13459
13460 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
13461 with an i686 compiler.
13462 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
13463 needed.
13464 * configure: Rebuilt.
13465
13466 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
13467
13468 PR gdb/10783
13469
13470 * server.c (handle_search_memory_1): Correct read_addr initialization
13471 in loop for searching subsequent chunks.
13472
13473 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
13474
13475 * configure.ac: New --with-libthread-db option.
13476 * thread-db.c: Allow direct dependence on libthread_db.
13477 (thread_db_free): Adjust.
13478 * config.in: Regenerate.
13479 * configure: Likewise.
13480
13481 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
13482
13483 PR gdb/10757
13484 * thread-db.c (attach_thread): New function.
13485 (maybe_attach_thread): Return success/failure.
13486 (find_new_threads_callback): Adjust.
13487 (thread_db_find_new_threads): Loop until no new threads.
13488
13489 2009-10-13 Pedro Alves <pedro@codesourcery.com>
13490
13491 * proc-service.c (ps_lgetregs): Formatting.
13492
13493 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
13494
13495 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
13496 * configure.ac: Adjust.
13497 * linux-low.h (struct process_info_private): Move members to struct
13498 thread_db.
13499 (thread_db_free, thread_db_handle_monitor_command): New prototype.
13500 * linux-low.c (linux_remove_process): Adjust.
13501 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
13502 * server.c (handle_query): Move code ...
13503 (handle_monitor_command): ... here. New function.
13504 * target.h (struct target_ops): New member.
13505 * thread-db.c (struct thread_db): New.
13506 (libthread_db_search_path): New variable.
13507 (thread_db_create_event, thread_db_enable_reporting)
13508 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
13509 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
13510 (try_thread_db_load_1, dladdr_to_soname): New functions.
13511 (try_thread_db_load, thread_db_load_search): New functions.
13512 (thread_db_init): Search for libthread_db.
13513 (thread_db_free): New function.
13514 (thread_db_handle_monitor_command): Likewise.
13515 * config.in: Regenerate.
13516 * configure: Regenerate.
13517
13518 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
13519
13520 * spu-low.c (spu_kill): Wait for inferior to terminate.
13521 Call clear_inferiors.
13522 (spu_detach): Call clear_inferiors.
13523
13524 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
13525
13526 * aclocal.m4: Regenerate.
13527 * config.in: Likewise.
13528 * configure: Likewise.
13529
13530 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
13531
13532 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
13533 (parse_spufs_run): New function.
13534 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
13535 (ppc_breakpoint_at): Handle SPU breakpoints.
13536
13537 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
13538
13539 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
13540 (SPUFS_MAGIC): Define.
13541 (spu_enumerate_spu_ids): New function.
13542 (linux_qxfer_spu): New function.
13543 (linux_target_ops): Install linux_qxfer_spu.
13544
13545 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
13546
13547 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
13548 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
13549 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
13550 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
13551 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
13552 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
13553 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
13554 (init_registers_powerpc_cell32l): Add prototype.
13555 (init_registers_powerpc_cell64l): Likewise.
13556 (ppc_arch_setup): Detect Cell/B.E. architecture.
13557
13558 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
13559
13560 * Makefile.in (datarootdir): New variable.
13561
13562 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
13563
13564 * linux-low.c (linux_write_memory): Update debugging output.
13565 * Makefile.in (clean): Add new descriptions.
13566 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
13567 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
13568 * configure.srv: Add new files for arm*-*-linux*.
13569 * linux-arm-low.c: Add new declarations.
13570 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
13571 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
13572 (HWCAP_VFPv3D16): New.
13573 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
13574 instead of __IWMMXT__.
13575 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
13576 (arm_arch_setup): New.
13577 (target_regsets): Remove #ifdef. Add VFP regset.
13578 (the_low_target): Use arm_arch_setup.
13579
13580 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
13581
13582 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
13583 the main thread again.
13584
13585 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
13586
13587 Adding Neutrino gdbserver.
13588 * configure: Regenerated.
13589 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
13590 * configure.srv (i[34567]86-*-nto*): New target.
13591 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
13592 * remote-utils.c [__QNX__]: Include sys/iomgr.h
13593 (nto_comctrl) [__QNX__]: New function.
13594 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
13595
13596 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
13597
13598 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
13599 srv_tgtobj.
13600
13601 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
13602 Pedro Alves <pedro@codesourcery.com>
13603
13604 * win32-i386-low.c (i386_get_thread_context): Handle systems that
13605 don't support CONTEXT_EXTENDED_REGISTERS.
13606 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
13607 (the_low_target): Install them.
13608 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
13609 failing with ERROR_PIPE_NOT_CONNECTED.
13610
13611 2009-06-30 Doug Evans <dje@google.com>
13612 Pierre Muller <muller@ics.u-strasbg.fr>
13613
13614 Add h/w watchpoint support to x86-linux, win32-i386.
13615 * Makefile.in (SFILES): Add i386-low.c
13616 (i386_low_h): Define.
13617 (i386-low.o): Add dependencies.
13618 (linux-x86-low.o): Add i386-low.h dependency.
13619 (win32-i386-low.o): Ditto.
13620 * i386-low.c: New file.
13621 * i386-low.h: New file.
13622 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
13623 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
13624 * linux-low.c (linux_add_process): Initialize arch_private.
13625 (linux_remove_process): Free arch_private.
13626 (add_lwp): Initialize arch_private.
13627 (delete_lwp): Free arch_private.
13628 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
13629 provided.
13630 * linux-low.h (process_info_private): New member arch_private.
13631 (lwp_info): New member arch_private.
13632 (linux_target_ops): New members new_process, new_thread,
13633 prepare_to_resume.
13634 (ptid_of): New macro.
13635 * linux-x86-low.c: Include stddef.h, i386-low.h.
13636 (arch_process_info): New struct.
13637 (arch_lwp_info): New struct.
13638 (x86_linux_dr_get, x86_linux_dr_set): New functions.
13639 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
13640 (i386_dr_low_get_status): New function.
13641 (x86_insert_point, x86_remove_point): New functions.
13642 (x86_stopped_by_watchpoint): New function.
13643 (x86_stopped_data_address): New function.
13644 (x86_linux_new_process, x86_linux_new_thread): New functions.
13645 (x86_linux_prepare_to_resume): New function.
13646 (the_low_target): Add entries for insert_point, remove_point,
13647 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
13648 prepare_to_resume.
13649 * server.c (debug_hw_points): New global.
13650 (monitor_show_help): Document set debug-hw-points.
13651 (handle_query): Process "set debug-hw-points".
13652 * server.h (debug_hw_points): Declare.
13653 (paddress): Declare.
13654 * utils.c (NUMCELLS, CELLSIZE): New macros.
13655 (get_sell, xsnprintf, paddress): New functions.
13656 * win32-arm-low.c (the_low_target): Add entries for insert_point,
13657 remove_point, stopped_by_watchpoint, stopped_data_address.
13658 * win32-i386-low.c: Include i386-low.h.
13659 (debug_reg_state): Replaces dr.
13660 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
13661 (i386_dr_low_get_status): New function.
13662 (i386_insert_point, i386_remove_point): New functions.
13663 (i386_stopped_by_watchpoint): New function.
13664 (i386_stopped_data_address): New function.
13665 (i386_initial_stuff): Update.
13666 (get_thread_context,set_thread_context,i386_thread_added): Update.
13667 (the_low_target): Add entries for insert_point,
13668 remove_point, stopped_by_watchpoint, stopped_data_address.
13669 * win32-low.c (win32_insert_watchpoint): New function.
13670 (win32_remove_watchpoint): New function.
13671 (win32_stopped_by_watchpoint): New function.
13672 (win32_stopped_data_address): New function.
13673 (win32_target_ops): Add entries for insert_watchpoint,
13674 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
13675 * win32-low.h (win32_target_ops): New members insert_point,
13676 remove_point, stopped_by_watchpoint, stopped_data_address.
13677
13678 2009-06-25 Pedro Alves <pedro@codesourcery.com>
13679
13680 * server.c (process_serial_event): Re-return unsupported, not
13681 error, if the type isn't recognized. Re-allow supporting only
13682 insert or remove packets. Also call require_running for
13683 breakpoints. Add missing break statement to default case. Tidy.
13684 * target.h (struct target_ops): Rename insert_watchpoint to
13685 insert_point, and remove_watchpoint to remove_point.
13686
13687 * linux-low.h (struct linux_target_ops): Likewise.
13688 * linux-low.c (linux_insert_watchpoint): Rename to ...
13689 (linux_insert_point): ... this. Adjust.
13690 (linux_remove_watchpoint): Rename to ...
13691 (linux_remove_point): ... this. Adjust.
13692 (linux_target_ops): Adjust.
13693 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
13694 (cris_insert_point): ... this.
13695 (cris_remove_watchpoint): Rename to ...
13696 (cris_remove_point): ... this.
13697 (the_low_target): Adjust.
13698
13699 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
13700
13701 * server.c (handle_v_kill): Pass signal_pid to
13702 kill_inferior if multi_process is zero.
13703
13704 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
13705
13706 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
13707 * target.h (target_ops): Comment for *_watchpoint to make it clear
13708 the functions can get types '0' and '1'.
13709
13710 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
13711
13712 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
13713 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
13714 * regcache.c (get_regcache): Likewise.
13715 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
13716 * win32-low.c (child_fetch_inferior_registers): Remove check for
13717 regno 0.
13718
13719 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
13720 Pedro Alves <pedro@codesourcery.com>
13721
13722 * target.h (struct target_ops) <supports_multi_process>: New
13723 callback.
13724 (target_supports_multi_process): New.
13725 * server.c (handle_query): Even if GDB reports support, only
13726 enable multi-process if the target also supports it. Report
13727 multi-process support only if the target backend supports it.
13728 * linux-low.c (linux_supports_multi_process): New function.
13729 (linux_target_ops): Install it as target_supports_multi_process
13730 callback.
13731
13732 2009-05-24 Doug Evans <dje@google.com>
13733
13734 Global renaming of find_thread_pid to find_thread_ptid.
13735 * server.h (find_thread_ptid): Renamed from find_thread_pid.
13736 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
13737 All callers updated.
13738
13739 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
13740 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
13741 directly.
13742
13743 * linux-low.c (get_stop_pc): Print pc if debug_threads.
13744 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
13745 (linux_resume_one_lwp): Ditto.
13746
13747 2009-05-23 Doug Evans <dje@google.com>
13748
13749 * linux-low.c (linux_resume_one_lwp): Change type of first arg
13750 from struct inferior_list_entry * to struct lwp_info *.
13751 All callers updated.
13752
13753 2009-05-13 Doug Evans <dje@google.com>
13754
13755 * linux-x86-low.c: Don't include assert.h.
13756 (x86_siginfo_fixup): Use fatal, not assert.
13757 (x86_arch_setup): Fix comment.
13758
13759 2009-05-12 Doug Evans <dje@google.com>
13760
13761 Biarch support for i386/amd64 gdbserver.
13762 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
13763 Add linux-x86-low.c.
13764 (linux-i386-low.o, linux-x86-64-low.o): Delete.
13765 (linux-x86-low.o): Add.
13766 * linux-x86-64-low.c: Delete.
13767 * linux-i386-low.c: Delete.
13768 * linux-x86-low.c: New file.
13769 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
13770 linux-x86-low.o.
13771 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
13772 linux-x86-low.o.
13773 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
13774 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
13775 (linux_child_pid_to_exec_file): New function.
13776 (elf_64_header_p, elf_64_file_p): New functions.
13777 (siginfo_fixup): New function.
13778 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
13779 give target a chance to convert layout.
13780 * linux-low.h (linux_target_ops): New member siginfo_fixup.
13781 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
13782
13783 2009-05-07 Doug Evans <dje@google.com>
13784
13785 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
13786 (regsets_store_inferior_registers): Ditto.
13787
13788 2009-05-06 Pedro Alves <pedro@codesourcery.com>
13789
13790 PR server/10048
13791
13792 * linux-low.c (must_set_ptrace_flags): Delete.
13793 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
13794 of the global.
13795 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
13796 `lwp->must_set_ptrace_flags' instead.
13797 (linux_wait_for_event_1): Set ptrace options here.
13798 (linux_wait_1): ... not here.
13799
13800 2009-04-30 Doug Evans <dje@google.com>
13801
13802 * inferiors.c (started_inferior_callback): New function.
13803 (attached_inferior_callback): New function.
13804 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
13805 * server.c (print_started_pid, print_attached_pid): New functions.
13806 (detach_or_kill_for_exit): New function.
13807 (main): Call it instead of for_each_inferior (kill_inferior_callback).
13808 * server.h (have_started_inferiors_p): Declare.
13809 (have_attached_inferiors_p): Declare.
13810
13811 * inferiors.c (remove_process): Fix memory leak, free process.
13812 * linux-low.c (linux_remove_process): New function.
13813 (linux_kill): Call it instead of remove_process.
13814 (linux_detach, linux_wait_1): Ditto.
13815
13816 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
13817
13818 * configure.srv: Add x86 Windows CE target.
13819
13820 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
13821
13822 * inferiors.c (get_thread_process): Make global.
13823 * server.h (get_thread_process): Add prototype.
13824 * thread-db.c (find_one_thread): Use get_thread_process
13825 instead of current_process.
13826 (thread_db_get_tls_address): Do not crash if called when
13827 thread layer is not yet initialized.
13828
13829 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
13830
13831 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
13832 * spu-low.c (current_tid): Rename to ...
13833 (current_ptid): ... this.
13834 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
13835 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
13836 ptid_get_lwp (current_ptid) instead of current_tid.
13837 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
13838 instead of current_tid. Use find_process_pid to verify pid
13839 argument is valid. Pass proper argument to remove_process.
13840 (spu_thread_alive): Compare current_ptid instead of current_tid.
13841 (spu_resume): Likewise.
13842
13843 2009-04-02 Pedro Alves <pedro@codesourcery.com>
13844
13845 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
13846 variable.
13847
13848 2009-04-01 Pedro Alves <pedro@codesourcery.com>
13849
13850 Implement the multiprocess extensions, and add linux multiprocess
13851 support.
13852
13853 * server.h (ULONGEST): Declare.
13854 (struct ptid, ptid_t): New.
13855 (minus_one_ptid, null_ptid): Declare.
13856 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
13857 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
13858 (struct inferior_list_entry): Change `id' type from unsigned from
13859 to ptid_t.
13860 (struct sym_cache, struct breakpoint, struct
13861 process_info_private): Forward declare.
13862 (struct process_info): Declare.
13863 (current_process): Declare.
13864 (all_processes): Declare.
13865 (initialize_inferiors): Declare.
13866 (add_thread): Adjust to use ptid_t.
13867 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
13868 (add_process, remove_process, find_thread_pid): Declare.
13869 (find_inferior_id): Adjust to use ptid_t.
13870 (cont_thread, general_thread, step_thread): Change type to ptid_t.
13871 (multi_process): Declare.
13872 (push_event): Adjust to use ptid_t.
13873 (read_ptid, write_ptid): Declare.
13874 (prepare_resume_reply): Adjust to use ptid_t.
13875 (clear_symbol_cache): Declare.
13876 * inferiors.c (all_processes): New.
13877 (null_ptid, minus_one_ptid): New.
13878 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
13879 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
13880 (add_thread): Change unsigned long to ptid. Remove gdb_id
13881 parameter. Adjust.
13882 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
13883 (gdb_id_to_thread): Rename to ...
13884 (find_thread_pid): ... this. Change unsigned long to ptid.
13885 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
13886 (loaded_dll, pull_pid_from_list): Adjust.
13887 (add_process, remove_process, find_process_pid)
13888 (get_thread_process, current_process, initialize_inferiors): New.
13889 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
13890 (struct target_waitstatus) <related_pid>: Ditto.
13891 (struct target_ops) <kill, detach>: Add `pid' argument. Change
13892 return type to int.
13893 (struct target_ops) <join>: Add `pid' argument.
13894 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
13895 (struct target_ops) <wait>: Add `ptid' field. Change return type
13896 to ptid.
13897 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
13898 (mywait): Add `ptid' argument. Change return type to ptid_t.
13899 (target_pid_to_str): Declare.
13900 * target.c (set_desired_inferior): Adjust to use ptids.
13901 (mywait): Add new `ptid' argument. Adjust.
13902 (target_pid_to_str): New.
13903 * mem-break.h (free_all_breakpoints): Declare.
13904 * mem-break.c (breakpoints): Delelete.
13905 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
13906 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
13907 to use per-process breakpoint list.
13908 (free_all_breakpoints): New.
13909 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
13910 (symbol_cache, all_symbols_looked_up): Delete.
13911 (hexchars): New.
13912 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
13913 read_ptid): New.
13914 (prepare_resume_reply): Change ptid argument's type from unsigned
13915 long to ptid_t. Adjust. Implement W;process and X;process.
13916 (free_sym_cache, clear_symbol_cache): New.
13917 (look_up_one_symbol): Adjust to per-process symbol cache. *
13918 * server.c (cont_thread, general_thread, step_thread): Change type
13919 to ptid_t.
13920 (attached): Delete.
13921 (multi_process): New.
13922 (last_ptid): Change type to ptid_t.
13923 (struct vstop_notif) <ptid>: Change type to ptid_t.
13924 (queue_stop_reply, push_event): Change `ptid' argument's type to
13925 ptid_t.
13926 (discard_queued_stop_replies): Add `pid' argument.
13927 (start_inferior): Adjust to use ptids. Adjust to mywait interface
13928 changes. Don't reference the `attached' global.
13929 (attach_inferior): Adjust to mywait interface changes.
13930 (handle_query): Adjust to use ptids. Parse GDB's qSupported
13931 features. Handle and report "multiprocess+". Handle
13932 "qAttached:PID".
13933 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
13934 changes.
13935 (handle_v_kill): New.
13936 (handle_v_stopped): Adjust to use target_pid_to_str.
13937 (handle_v_requests): Allow multiple attaches and runs when
13938 multiprocess extensions are in effect. Handle "vKill".
13939 (myresume): Adjust to use ptids.
13940 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
13941 (handle_status): Adjust to discard_queued_stop_replies interface
13942 change.
13943 (first_thread_of, kill_inferior_callback)
13944 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
13945 (main): Call initialize_inferiors. Adjust to use ptids, killing
13946 and detaching from all inferiors. Handle multiprocess packet
13947 variants.
13948 * linux-low.h: Include gdb_proc_service.h.
13949 (struct process_info_private): New.
13950 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
13951 <lwpid_of>: Use ptid_get_lwp.
13952 (get_lwp_thread): Adjust.
13953 (struct lwp_info): Add `dead' member.
13954 (find_lwp_pid): Declare.
13955 * linux-low.c (thread_db_active): Delete.
13956 (new_inferior): Adjust comment.
13957 (inferior_pid): Delete.
13958 (linux_add_process): New.
13959 (handle_extended_wait): Adjust.
13960 (add_lwp): Change unsigned long to ptid.
13961 (linux_create_inferior): Add process to processes table. Adjust
13962 to use ptids. Don't set new_inferior here.
13963 (linux_attach_lwp): Rename to ...
13964 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
13965 it. Adjust to use ptids.
13966 (linux_attach_lwp): New.
13967 (linux_attach): Add process to processes table. Don't set
13968 new_inferior here.
13969 (struct counter): New.
13970 (second_thread_of_pid_p, last_thread_of_process_p): New.
13971 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
13972 multiple processes.
13973 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
13974 processes. Remove process from process table.
13975 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
13976 to multiple processes.
13977 (any_thread_of): New.
13978 (linux_detach): Add `pid' argument, and handle it. Remove process
13979 from processes table.
13980 (linux_join): Add `pid' argument. Handle it.
13981 (linux_thread_alive): Change unsighed long argument to ptid_t.
13982 Consider dead lwps as not being alive.
13983 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
13984 threads we're not interested in.
13985 (same_lwp, find_lwp_pid): New.
13986 (linux_wait_for_lwp): Change `pid' argument's type from int to
13987 ptid_t. Adjust.
13988 (linux_wait_for_event): Rename to ...
13989 (linux_wait_for_event_1): ... this. Change `pid' argument's type
13990 from int to ptid_t. Adjust.
13991 (linux_wait_for_event): New.
13992 (linux_wait_1): Add `ptid' argument. Change return type to
13993 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
13994 that exit from the process table.
13995 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
13996 Adjust.
13997 (mark_lwp_dead): New.
13998 (wait_for_sigstop): Adjust to use ptids. If a process exits while
13999 stopping all threads, mark its main lwp as dead.
14000 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
14001 ptids.
14002 (fetch_register, usr_store_inferior_registers)
14003 (regsets_fetch_inferior_registers)
14004 (regsets_store_inferior_registers, linux_read_memory)
14005 (linux_write_memory): Inline `inferior_pid'.
14006 (linux_look_up_symbols): Adjust to use per-process
14007 `thread_db_active'.
14008 (linux_request_interrupt): Adjust to use ptids.
14009 (linux_read_auxv): Inline `inferior_pid'.
14010 (initialize_low): Don't reference thread_db_active.
14011 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
14012 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
14013 (ps_getpid): Return the pid of the current inferior.
14014 * thread-db.c (proc_handle, thread_agent): Delete.
14015 (thread_db_create_event, thread_db_enable_reporting): Adjust to
14016 per-process data.
14017 (find_one_thread): Change argument type to ptid_t. Adjust to
14018 per-process data.
14019 (maybe_attach_thread): Adjust to per-process data and ptids.
14020 (thread_db_find_new_threads): Ditto.
14021 (thread_db_init): Ditto.
14022 * spu-low.c (spu_create_inferior, spu_attach): Add process to
14023 processes table. Adjust to use ptids.
14024 (spu_kill, spu_detach): Adjust interface. Remove process from
14025 processes table.
14026 (spu_join, spu_thread_alive): Adjust interface.
14027 (spu_wait): Adjust interface. Remove process from processes
14028 table. Adjust to use ptids.
14029 * win32-low.c (current_inferior_tid): Delete.
14030 (current_inferior_ptid): New.
14031 (debug_event_ptid): New.
14032 (thread_rec): Take a ptid. Adjust.
14033 (child_add_thread): Add `pid' argument. Adjust to use ptids.
14034 (child_delete_thread): Ditto.
14035 (do_initial_child_stuff): Add `attached' argument. Add process to
14036 processes table.
14037 (child_fetch_inferior_registers, child_store_inferior_registers):
14038 Adjust.
14039 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
14040 (win32_attach): Pass 1 to do_initial_child_stuff.
14041 (win32_kill): Adjust interface. Remove process from processes
14042 table.
14043 (win32_detach): Ditto.
14044 (win32_join): Adjust interface.
14045 (win32_thread_alive): Take a ptid.
14046 (win32_resume): Adjust to use ptids.
14047 (get_child_debug_event): Ditto.
14048 (win32_wait): Adjust interface. Remove exiting process from
14049 processes table.
14050
14051 2009-04-01 Pedro Alves <pedro@codesourcery.com>
14052
14053 Non-stop mode support.
14054
14055 * server.h (non_stop): Declare.
14056 (gdb_client_data, handler_func): Declare.
14057 (delete_file_handler, add_file_handler, start_event_loop):
14058 Declare.
14059 (handle_serial_event, handle_target_event, push_event)
14060 (putpkt_notif): Declare.
14061 * target.h (enum resume_kind): New.
14062 (struct thread_resume): Replace `step' field by `kind' field.
14063 (TARGET_WNOHANG): Define.
14064 (struct target_ops) <wait>: Add `options' argument.
14065 <supports_non_stop, async, start_non_stop>: New fields.
14066 (target_supports_non_stop, target_async): New.
14067 (start_non_stop): Declare.
14068 (mywait): Add `options' argument.
14069 * target.c (mywait): Add `options' argument. Print child exit
14070 notifications here.
14071 (start_non_stop): New.
14072 * server.c (non_stop, own_buf, mem_buf): New globals.
14073 (struct vstop_notif): New.
14074 (notif_queue): New global.
14075 (queue_stop_reply, push_event, discard_queued_stop_replies)
14076 (send_next_stop_reply): New.
14077 (start_inferior): Adjust to use resume_kind. Adjust to mywait
14078 interface changes.
14079 (attach_inferior): In non-stop mode, don't wait for the target
14080 here.
14081 (handle_general_set): Handle QNonStop.
14082 (handle_query): When handling qC, return the current general
14083 thread, instead of the first thread of the list.
14084 (handle_query): If the backend supports non-stop mode, include
14085 QNonStop+ in the qSupported query response.
14086 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
14087 and non-stop mode.
14088 (handle_v_attach, handle_v_run): Handle non-stop mode.
14089 (handle_v_stopped): New.
14090 (handle_v_requests): Report support for vCont;t. Handle vStopped.
14091 (myresume): Adjust to use resume_kind. Handle non-stop.
14092 (queue_stop_reply_callback): New.
14093 (handle_status): Handle non-stop mode.
14094 (main): Clear non_stop flag on reconnection. Use the event-loop.
14095 Refactor serial protocol handling from here ...
14096 (process_serial_event): ... to this new function. When GDB
14097 selects any thread, select one here. In non-stop mode, wait until
14098 GDB acks all pending events before exiting.
14099 (handle_serial_event, handle_target_event): New.
14100 * remote-utils.c (remote_open): Install remote_desc in the event
14101 loop.
14102 (remote_close): Remove remote_desc from the event loop.
14103 (putpkt_binary): Rename to...
14104 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
14105 (putpkt_binary): New as wrapper around putpkt_binary_1.
14106 (putpkt_notif): New.
14107 (prepare_resume_reply): In non-stop mode, don't change the
14108 general_thread.
14109 * event-loop.c: New.
14110 * Makefile.in (OBJ): Add event-loop.o.
14111 (event-loop.o): New rule.
14112
14113 * linux-low.h (pid_of): Moved here.
14114 (lwpid_of): New.
14115 (get_lwp_thread): Use lwpid_of.
14116 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
14117 * linux-low.c (pid_of): Delete.
14118 (inferior_pid): Use lwpid_of.
14119 (linux_event_pipe): New.
14120 (target_is_async_p): New.
14121 (delete_lwp): New.
14122 (handle_extended_wait): Use lwpid_of.
14123 (add_lwp): Don't set lwpid field.
14124 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
14125 (linux_kill_one_lwp): If killing a running lwp, stop it first.
14126 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
14127 (linux_detach_one_lwp): If detaching from a running lwp, stop it
14128 first. Adjust to linux_wait_for_event interface changes. Use
14129 lwpid_of.
14130 (linux_detach): Don't delete the main lwp here.
14131 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
14132 (status_pending_p): Don't consider explicitly suspended lwps.
14133 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
14134 pointer. Add OPTIONS argument. Change return type to int. Use
14135 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
14136 (linux_wait_for_event): Take an integer pid instead of a lwp_info
14137 pointer. Add status pointer argument. Return a pid instead of a
14138 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
14139 changes. In non-stop mode, don't switch to a random thread.
14140 (linux_wait): Rename to...
14141 (linux_wait_1): ... this. Add target_options argument, and handle
14142 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
14143 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
14144 clean exit and signal exit code. Don't stop all threads in
14145 non-stop mode. In all-stop mode, only stop all threads when
14146 reporting a stop to GDB. Handle explicit thread stop requests.
14147 (async_file_flush, async_file_mark): New.
14148 (linux_wait): New.
14149 (send_sigstop): Use lwpid_of.
14150 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
14151 interface changes. In non-stop mode, don't switch to a random
14152 thread.
14153 (linux_resume_one_lwp): Use lwpid_of.
14154 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
14155 (linux_resume_one_thread): ... this. Handle resume_stop. In
14156 non-stop mode, don't look for pending flag in all threads.
14157 (resume_status_pending_p): Don't consider explicitly suspended
14158 threads.
14159 (my_waitpid): Reimplement. Emulate __WALL.
14160 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
14161 Use lwpid_of.
14162 (sigchld_handler, linux_supports_non_stop, linux_async)
14163 (linux_start_non_stop): New.
14164 (linux_target_ops): Register linux_supports_non_stop, linux_async
14165 and linux_start_non_stop.
14166 (initialize_low): Install SIGCHLD handler.
14167 * thread-db.c (thread_db_create_event, find_one_thread)
14168 (thread_db_get_tls_address): Use lwpid_of.
14169 * win32-low.c (win32_detach): Adjust to use resume_kind.
14170 (win32_wait): Add `options' argument.
14171 * spu-low.c (spu_resume): Adjust to use resume_kind.
14172 (spu_wait): Add `options' argument.
14173
14174 2009-04-01 Pedro Alves <pedro@codesourcery.com>
14175
14176 Decouple target code from remote protocol.
14177
14178 * target.h (enum target_waitkind): New.
14179 (struct target_waitstatus): New.
14180 (struct target_ops) <wait>: Return an unsigned long. Take a
14181 target_waitstatus pointer instead of a char pointer.
14182 (mywait): Likewise.
14183 * target.c (mywait): Change prototype to return an unsigned long.
14184 Take a target_waitstatus pointer instead of a char pointer. Adjust.
14185 * server.h (thread_from_wait, old_thread_from_wait): Delete
14186 declarations.
14187 (prepare_resume_reply): Change prototype to take a
14188 target_waitstatus.
14189 * server.c (thread_from_wait, old_thread_from_wait): Delete.
14190 (last_status, last_ptid): New.
14191 (start_inferior): Remove "statusptr" argument. Adjust. Return a
14192 pid instead of a signal.
14193 (attach_inferior): Remove "status" and "signal" parameters.
14194 Adjust.
14195 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
14196 not as an address.
14197 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
14198 (handle_v_requests, myresume): Remove "status" and "signal"
14199 parameters. Adjust.
14200 (handle_status): New.
14201 (main): Delete local `status'. Adjust.
14202 * remote-utils.c: Include target.h.
14203 (prepare_resume_reply): Change prototype to take a
14204 target_waitstatus. Adjust.
14205
14206 * linux-low.c (linux_wait): Adjust to new target_ops->wait
14207 interface.
14208 * spu-low.c (spu_wait): Adjust.
14209 * win32-low.c (enum target_waitkind, struct target_waitstatus):
14210 Delete.
14211 (win32_wait): Adjust.
14212
14213 2009-04-01 Pedro Alves <pedro@codesourcery.com>
14214
14215 * target.h (struct thread_resume): Delete leave_stopped member.
14216 (struct target_ops): Add a `n' argument to the `resume' callback.
14217 * server.c (start_inferior): Adjust.
14218 (handle_v_cont, myresume): Adjust.
14219 * linux-low.c (check_removed_breakpoint): Adjust to resume
14220 interface change, and to removed leave_stopped field.
14221 (resume_ptr): Delete.
14222 (struct thread_resume_array): New.
14223 (linux_set_resume_request): Add new `arg' parameter. Adjust to
14224 resume interface change.
14225 (linux_continue_one_thread, linux_queue_one_thread)
14226 (resume_status_pending_p): Check if the resume field is NULL
14227 instead of checking the leave_stopped member.
14228 (linux_resume): Adjust to the target resume interface change.
14229 * spu-low.c (spu_resume): Adjust to the target resume interface
14230 change.
14231 * win32-low.c (win32_detach, win32_resume): Ditto.
14232
14233 2009-04-01 Pedro Alves <pedro@codesourcery.com>
14234
14235 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
14236 flag.
14237 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
14238 pending.
14239 (linux_continue_one_thread): Only preserve the stepping flag if
14240 there's a pending breakpoint.
14241
14242 2009-03-31 Pedro Alves <pedro@codesourcery.com>
14243
14244 * server.c (main): After the inferior having exited, call
14245 remote_close before exiting gdbserver.
14246
14247 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
14248
14249 Fix size of FPSCR in Power 7 processors.
14250 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
14251 (PPC_FEATURE_HAS_DFP): New #define.
14252 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
14253 size of the FPSCR.
14254
14255 2009-03-23 Pedro Alves <pedro@codesourcery.com>
14256
14257 * server.c (handle_query) Whitespace and formatting.
14258
14259 2009-03-22 Pedro Alves <pedro@codesourcery.com>
14260
14261 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
14262 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
14263 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
14264 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
14265 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
14266 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
14267 Makefile.in, configure.ac: Fix whitespace throughout.
14268 * configure: Regenerate.
14269
14270 2009-03-22 Pedro Alves <pedro@codesourcery.com>
14271
14272 * inferiors.c (find_inferior): Make it safe for the callback
14273 function to delete the currently iterated inferior.
14274
14275 2009-03-22 Pedro Alves <pedro@codesourcery.com>
14276
14277 * Makefile.in (linuw_low_h): Move higher.
14278 (thread-db.o): Depend on $(linux_low_h).
14279
14280 2009-03-17 Pedro Alves <pedro@codesourcery.com>
14281
14282 Rename "process" to "lwp" throughout.
14283
14284 * linux-low.c (all_processes): Rename to...
14285 (all_lwps): ... this.
14286 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
14287 (add_process): Rename to ...
14288 (add_lwp): ... this. Adjust.
14289 (linux_create_inferior): Adjust.
14290 (linux_attach_lwp): Adjust.
14291 (linux_attach): Adjust.
14292 (linux_kill_one_process): Rename to ...
14293 (linux_kill_one_lwp): ... this. Adjust.
14294 (linux_kill): Adjust.
14295 (linux_detach_one_process): Rename to ...
14296 (linux_detach_one_lwp): ... this. Adjust.
14297 (linux_detach): Adjust.
14298 (check_removed_breakpoint): Adjust.
14299 (status_pending_p): Adjust.
14300 (linux_wait_for_process): Rename to ...
14301 (linux_wait_for_lwp): ... this. Adjust.
14302 (linux_wait_for_event): Adjust.
14303 (send_sigstop): Adjust.
14304 (wait_for_sigstop): Adjust.
14305 (stop_all_processes): Rename to ...
14306 (stop_all_lwps): ... this.
14307 (linux_resume_one_process): Rename to ...
14308 (linux_resume_one_lwp): ... this. Adjust.
14309 (linux_set_resume_request, linux_continue_one_thread)
14310 (linux_queue_one_thread, resume_status_pending_p)
14311 (usr_store_inferior_registers, regsets_store_inferior_registers)
14312 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
14313 Adjust.
14314 * linux-low.h (get_process): Rename to ...
14315 (get_lwp): ... this. Adjust.
14316 (get_thread_process): Rename to ...
14317 (get_thread_lwp): ... this. Adjust.
14318 (get_process_thread): Rename to ...
14319 (get_lwp_thread): ... this. Adjust.
14320 (struct process_info): Rename to ...
14321 (struct lwp_info): ... this.
14322 (all_processes): Rename to ...
14323 (all_lwps): ... this.
14324 * proc-service.c (ps_lgetregs): Adjust.
14325 * thread-db.c (thread_db_create_event, find_one_thread)
14326 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
14327
14328 2009-03-14 Pedro Alves <pedro@codesourcery.com>
14329
14330 * server.c (handle_query): Handle "qAttached".
14331
14332 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
14333
14334 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
14335 GPLv3, update license URL.
14336
14337 2009-03-01 Doug Evans <dje@google.com>
14338
14339 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
14340 (server_h): Add gdb_signals.h.
14341 (signals.o): Update.
14342 * server.h (target_signal_from_host,target_signal_to_host_p)
14343 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
14344
14345 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
14346
14347 * remote-utils.c (getpkt): Also generate remote-debug
14348 information if noack_mode is set.
14349
14350 2009-02-06 Pedro Alves <pedro@codesourcery.com>
14351
14352 * server.c (handle_query): Report qXfer:siginfo:read and
14353 qXfer:siginfo:write as supported and handle them.
14354 * target.h (struct target_ops) <qxfer_siginfo>: New field.
14355 * linux-low.c (linux_xfer_siginfo): New.
14356 (linux_target_ops): Set it.
14357
14358 2009-01-26 Pedro Alves <pedro@codesourcery.com>
14359
14360 * server.c (gdbserver_usage): Mention --remote-debug.
14361 (main): Accept '--remote-debug' switch.
14362
14363 2009-01-18 Doug Evans <dje@google.com>
14364
14365 * regcache.c (new_register_cache): No need to check result of xcalloc.
14366 * server.c (handle_search_memory): Back out calls to xmalloc,
14367 result is checked and error is returned to user upon failure.
14368 (handle_query): Ditto. Add more checks for result of malloc.
14369 (handle_v_cont): Check result of malloc, report error back to
14370 user upon failure.
14371 (handle_v_run): Ditto. Call freeargv.
14372 * server.h (freeargv): Declare.
14373 * utils.c (freeargv): New fn.
14374
14375 2009-01-15 Doug Evans <dje@google.com>
14376
14377 * gdbreplay.c (perror_with_name): Make arg const char *.
14378 * server.h (target_signal_to_name): Make return type const char *.
14379 * thread-db.c (thread_db_err_str): Make return type const char *.
14380 * utils.c (perror_with_name): Make arg const char *.
14381
14382 2009-01-14 Pedro Alves <pedro@codesourcery.com>
14383
14384 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
14385 when handling a EXIT_PROCESS_DEBUG_EVENT.
14386
14387 2009-01-06 Joel Brobecker <brobecker@adacore.com>
14388
14389 * gdbreplay.c (gdbreplay_version): Update copyright year.
14390 * server.c (gdbserver_version): Likewise.
14391
14392 2009-01-05 Doug Evans <dje@google.com>
14393
14394 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
14395 (handle_extended_wait): Improve comment.
14396
14397 2008-12-13 Doug Evans <dje@google.com>
14398
14399 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
14400 * server.h (ATTR_MALLOC): New macro.
14401 (xmalloc,xcalloc,xstrdup): Declare.
14402 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
14403 * inferiors.c: Ditto.
14404 * linux-low.c: Ditto.
14405 * mem-break.c: Ditto.
14406 * regcache.c: Ditto.
14407 * remote-utils.c: Ditto.
14408 * server.c: Ditto.
14409 * target.c: Ditto.
14410 * win32-low.c: Ditto.
14411
14412 2008-12-12 Doug Evans <dje@google.com>
14413
14414 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
14415 in debugging printf.
14416
14417 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
14418
14419 2008-12-09 Doug Evans <dje@google.com>
14420
14421 * linux-low.h (struct process_info): Delete member tid, unused.
14422 * thread-db.c (find_one_thread): Update.
14423 (maybe_attach_thread): Update.
14424
14425 2008-12-02 Pedro Alves <pedro@codesourcery.com>
14426
14427 * target.h (struct target_ops): Add qxfer_osdata member.
14428 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
14429 and dirent.h.
14430 (linux_qxfer_osdata): New functions.
14431 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
14432 callback.
14433 * server.c (handle_query): Handle "qXfer:osdata:read:".
14434 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
14435 (buffer_xml_printf): New functions.
14436 * server.h (struct buffer): New.
14437 (buffer_grow_str, buffer_grow_str0): New macros.
14438 (buffer_grow, buffer_free, buffer_init, buffer_finish)
14439 (buffer_xml_printf): Declare.
14440
14441 2008-11-24 Doug Evans <dje@google.com>
14442
14443 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
14444
14445 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
14446
14447 * server.c (handle_v_run): Always use the supplied argument list.
14448
14449 2008-11-19 Bob Wilson <bob.wilson@acm.org>
14450
14451 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
14452 (xtensa_regmap_table): Add entry for scompare1.
14453
14454 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
14455
14456 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
14457 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
14458 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
14459 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
14460 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
14461 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
14462 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
14463 XML target descriptions.
14464 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
14465 when inferior is running on an ISA 2.05 or later processor. Add
14466 special case to return offset for full 64-bit slot of FPSCR when
14467 in 32-bits.
14468
14469 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
14470
14471 * Makefile.in (SFILES, clean): Added sparc64 files.
14472 (reg-sparc64.o, reg-sparc64.c): New.
14473 * configure.srv (sparc*-*-linux*): New configuration.
14474 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
14475 syscall arguments for SPARC.
14476 (regsets_store_inferior_registers): Likewise.
14477 * linux-sparc-low.c: New file.
14478
14479 2008-10-21 Doug Evans <dje@google.com>
14480
14481 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
14482 (READLINE_DIR,READLINE_DEP): Delete.
14483 (INTERNAL_CFLAGS): Update.
14484 (LINTFLAGS): Update.
14485
14486 2008-10-10 Pedro Alves <pedro@codesourcery.com>
14487
14488 * server.c (handle_v_run): If GDB didn't specify an argv, use the
14489 whole argv from the last run, not just argv[0].
14490
14491 2008-09-08 Pedro Alves <pedro@codesourcery.com>
14492
14493 * regcache.c (new_register_cache): Return NULL if the register
14494 cache size isn't known yet.
14495 (free_register_cache): Avoid dereferencing a NULL regcache.
14496
14497 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
14498
14499 * configure.srv: Merge MIPS and MIPS64.
14500
14501 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
14502
14503 * Makefile.in (uninstall): Apply $(EXEEXT) too.
14504
14505 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
14506
14507 * Makefile.in: Add required vsx dependencies.
14508
14509 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
14510 Declare init_registers_powerpc_vsx32l.
14511 Declare init_registers_powerpc_vsx64l.
14512 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
14513 (ppc_arch_setup): Check for VSX in hwcap.
14514 (ppc_fill_vsxregset): New function.
14515 (ppc_store_vsxregset): New function.
14516 Add new VSX entry in regset_info target_regsets.
14517
14518 * configure.srv: Add new VSX dependencies.
14519
14520 2008-08-12 Pedro Alves <pedro@codesourcery.com>
14521
14522 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
14523 (remote_open): Set or clear transport_is_reliable.
14524 (putpkt_binary): Don't expect acks in noack mode.
14525 (getpkt): Don't send ack/nac in noack mode.
14526 * server.c (handle_general_set): Handle QStartNoAckMode.
14527 (handle_query): If connected by tcp pass QStartNoAckMode+ in
14528 qSupported.
14529 (main): Reset noack_mode on every connection.
14530 * server.h (noack_mode): Declare.
14531
14532 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
14533
14534 * Makefile.in (GDBREPLAY_OBS): New variable.
14535 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
14536
14537 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
14538 Daniel Jacobowitz <dan@codesourcery.com>
14539
14540 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
14541 (usr_store_inferior_registers): Likewise.
14542 (regsets_store_inferior_registers): Likewise.
14543
14544 2008-07-31 Rolf Jansen <rj@surtec.com>
14545 Pedro Alves <pedro@codesourcery.com>
14546
14547 * configure.ac: Check for memmem declaration.
14548 * server.c [HAVE_MALLOC_H]: Include malloc.h.
14549 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
14550 (disable_packet_qfThreadInfo): Unconditionally compile.
14551 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
14552 * configure, config.in: Regenerate.
14553
14554 2008-07-28 Doug Kwan <dougkwan@google.com>
14555
14556 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
14557 (linux_write_memory): Remove declaration of errno.
14558
14559 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
14560
14561 * linux-low.c (handle_extended_wait): Do not use "status"
14562 variable uninitialized.
14563
14564 2008-07-07 Pedro Alves <pedro@codesourcery.com>
14565
14566 * server.c (handle_v_attach): Inhibit reporting dll changes.
14567
14568 2008-06-27 Pedro Alves <pedro@codesourcery.com>
14569
14570 * remote-utils.c (prepare_resume_reply): If requested, don't
14571 output "thread:TID" in the T stop reply.
14572
14573 * server.c (disable_packet_vCont, disable_packet_Tthread)
14574 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
14575 (handle_query): If requested, disable support for qC, qfThreadInfo
14576 and qsThreadInfo.
14577 (handle_v_requests): If requested, disable support for vCont.
14578 (gdbserver_show_disableable): New.
14579 (main): Handle --disable-packet and --disable-packet=LIST.
14580
14581 * server.h (disable_packet_vCont, disable_packet_Tthread)
14582 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
14583
14584 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
14585
14586 * server.c (gdbserver_usage): Mention --version.
14587
14588 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
14589
14590 * Makefile.in (gdbreplay.o): New rule.
14591
14592 2008-06-06 Joseph Myers <joseph@codesourcery.com>
14593
14594 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
14595 message, not gdbserver.
14596
14597 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
14598 Nathan Sidwell <nathan@codesourcery.com>
14599 Joseph Myers <joseph@codesourcery.com>
14600
14601 * acinclude.m4: Include ../../config/acx.m4.
14602 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
14603 * configure, config.in: Regenerate.
14604 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
14605 * server.c (gdbserver_version): Print PKGVERSION.
14606 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
14607 (main): Adjust gdbserver_usage calls.
14608 * gdbreplay.c (version, host_name): Add declarations.
14609 (gdbreplay_version, gdbreplay_usage): New.
14610 (main): Accept --version and --help options.
14611
14612 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
14613
14614 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
14615 (arm_breakpoint_at): Handle Thumb.
14616 (the_low_target): Add comment.
14617
14618 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
14619
14620 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
14621
14622 2008-05-09 Doug Evans <dje@google.com>
14623
14624 * server.h (decode_search_memory_packet): Declare.
14625 * remote-utils.c (decode_search_memory_packet): New fn.
14626 * server.c (handle_search_memory_1): New fn.
14627 (handle_search_memory): New fn.
14628 (handle_query): Process qSearch:memory packets.
14629
14630 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
14631
14632 * regcache.c (registers_length): Remove.
14633 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
14634 full register packet.
14635 * regcache.h (registers_length): Remove prototype.
14636 * server.h (PBUFSIZ): Define to 16384.
14637
14638 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
14639
14640 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
14641 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
14642 powerpc-64l.o, and powerpc-altivec64l.o.
14643 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
14644 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
14645 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
14646 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
14647 rs6000/power-linux.xml, and rs6000/power64-linux.xml
14648 to srv_xmlfiles.
14649
14650 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
14651 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
14652 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
14653 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
14654 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
14655 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
14656 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
14657 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
14658 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
14659 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
14660 (clean): Update.
14661
14662 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
14663 (init_registers_powerpc_32l): ... this new prototype.
14664 (init_registers_powerpc_32): Remove, replace by ...
14665 (init_registers_powerpc_altivec32l): ... this new prototype.
14666 (init_registers_powerpc_e500): Remove, replace by ...
14667 (init_registers_powerpc_e500l): ... this new prototype.
14668 (init_registers_ppc64): Remove, replace by ...
14669 (init_registers_powerpc_64l): ... this new prototype.
14670 (init_registers_powerpc_64): Remove, replace by ...
14671 (init_registers_powerpc_altivec64l): ... this new prototype.
14672 (ppc_num_regs): Set to 73.
14673 (PT_ORIG_R3, PT_TRAP): Define if necessary.
14674 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
14675 (ppc_cannot_store_register): Handle orig_r3 and trap.
14676 (ppc_arch_setup): Update init_registers_... calls.
14677 (ppc_fill_gregset): Handle orig_r3 and trap.
14678
14679 * inferiors.c (clear_inferiors): Reset current_inferior.
14680
14681 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
14682
14683 * acinclude.m4: Add override.m4.
14684 * configure: Regenerate.
14685
14686 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
14687
14688 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
14689 initial call to init_register_ppc64.
14690
14691 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
14692
14693 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
14694 single powerpc*-*-linux* case.
14695 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
14696
14697 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
14698
14699 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
14700 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
14701 from reg_xmlfiles.
14702 * linux-ppc-low.c: Include <elf.h>.
14703 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
14704 (ppc_hwcap): New global variable.
14705 (ppc_regmap): Remove __SPE__ #ifdef sections.
14706 (ppc_regmap_e500): New global variable.
14707 (ppc_cannot_store_register): Update __SPE__ special case.
14708 (ppc_get_hwcap): New function.
14709 (ppc_arch_setup): Use it to determine whether inferior supports
14710 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
14711 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
14712 Do not access registers if target does not support AltiVec.
14713 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
14714 Do not access registers if target does not support SPE.
14715 (target_regsets): Unconditionally include AltiVec and SPE regsets.
14716
14717 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
14718
14719 * linux-low.c (disabled_regsets, num_regsets): New.
14720 (use_regsets_p): Delete.
14721 (linux_wait_for_process): Clear disabled_regsets.
14722 (regsets_fetch_inferior_registers): Check and set it.
14723 (regsets_store_inferior_registers): Likewise.
14724 (linux_fetch_registers, linux_store_registers): Do not use
14725 use_regsets_p.
14726 (initialize_low): Allocate disabled_regsets.
14727
14728 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
14729
14730 * Makefile.in (LIBOBJS): New.
14731 (OBS): Use LIBOBJS.
14732 (memmem.o): New rule.
14733 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
14734 * configure: Regenerated.
14735
14736 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
14737
14738 * server.c (handle_query): Never return "unsupported" for
14739 qXfer:features:read queries.
14740
14741 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
14742
14743 * server.c (get_features_xml): Fix inverted condition.
14744 (handle_query): Always support qXfer:feature:read.
14745
14746 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
14747
14748 * server.c (wrapper_argv): New.
14749 (start_inferior): Handle wrapper_argv. If set, expect an extra
14750 trap.
14751 (gdbserver_usage): Document --wrapper.
14752 (main): Parse --wrapper.
14753
14754 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
14755
14756 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
14757 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
14758 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
14759 (ppc_set_pc): Likewise.
14760 (ppc_arch_setup): New function.
14761 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
14762 of collect_register.
14763 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
14764
14765 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
14766
14767 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
14768 instead of linux-ppc64-low.o.
14769 * linux-ppc64-low.c: Remove file.
14770 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
14771 (linux-ppc64-low.o): Remove rule.
14772
14773 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
14774 (init_registers_powerpc_64): Likewise.
14775 (ppc_regmap): Conditionally define depending on __powerpc64__.
14776 (ppc_cannot_store_register): Do not special-case "fpscr" when
14777 compiled on __powerpc64__.
14778 (ppc_collect_ptrace_register): New function.
14779 (ppc_supply_ptrace_register): New function.
14780 (ppc_breakpoint): Change type to "unsigned int".
14781 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
14782 (the_low_target): Conditionally provide initializers for the
14783 arch_setup member depending on __powerpc64__. Install
14784 collect_ptrace_register and supply_ptrace_register members.
14785
14786 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
14787
14788 * regcache.h (gdbserver_xmltarget): Add extern declaration.
14789 * server.c (gdbserver_xmltarget): Define.
14790 (get_features_xml): Use it to replace "target.xml" and arch_string.
14791
14792 * configure.srv: Remove srv_xmltarget. Add XML files that were
14793 mentioned there to srv_xmlfiles instead. Remove conditional tests
14794 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
14795 srv_xmlfiles and srv_regobj to include all possible choices.
14796 * configure.ac (srv_xmltarget): Remove.
14797 (srv_xmlfiles): Do not add "target.xml".
14798 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
14799 checks for supplementary target information.
14800 * configure: Regenerate.
14801 * Makefile.in (XML_TARGET): Remove.
14802 (target.xml): Remove rule.
14803 (clean): Do not clean up target.xml.
14804 (.PRECIOUS): Do not mention target.xml.
14805
14806 * target.h (struct target_ops): Remove arch_string member.
14807 * linux-low.c (linux_arch_string): Remove.
14808 (linux_target_ops): Remove arch_string initializer.
14809 * linux-low.h (struct linux_target_ops): Remove arch_string member.
14810 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
14811 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
14812 * spu-low.c (spu_arch_string): Remove.
14813 (spu_target_ops): Remove arch_string initializer.
14814 * win32-low.c (win32_arch_string): Remove.
14815 (win32_target_ops): Remove arch_string initializer.
14816 * win32-low.h (struct win32_target_ops): Remove arch_string member.
14817 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
14818 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
14819
14820 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
14821
14822 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
14823 by collect_ptrace_register and supply_ptrace_register hooks.
14824 * linux-low.c (fetch_register): Use supply_ptrace_register callback
14825 instead of checking for the_low_target.left_pad_xfer.
14826 (usr_store_inferior_registers): Use collect_ptrace_register callback
14827 instead of checking for the_low_target.left_pad_xfer.
14828
14829 * linux-s390-low.c (s390_collect_ptrace_register): New function.
14830 (s390_supply_ptrace_register): Likewise.
14831 (s390_fill_gregset): Call s390_collect_ptrace_register.
14832 (the_low_target): Update.
14833
14834 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
14835 (ppc_supply_ptrace_register): Likewise.
14836 (the_low_target): Update.
14837
14838 * linux-i386-low.c (the_low_target): Update.
14839 * linux-x86-64-low.c (the_low_target): Update.
14840
14841 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
14842
14843 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
14844 reg-s390.o and reg-s390x.o.
14845
14846 * linux-low.c (new_inferior): New global variable.
14847 (linux_create_inferior, linux_attach): Set it.
14848 (linux_wait_for_process): Call the_low_target.arch_setup after the
14849 target has stopped for the first time.
14850 (initialize_low): Do not call the_low_target.arch_setup.
14851
14852 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
14853 (s390_set_pc): Likewise.
14854 (s390_arch_setup): New function.
14855 (the_low_target): Use s390_arch_setup as arch_setup routine.
14856
14857 * regcache.c (realloc_register_cache): New function.
14858 (set_register_cache): Call it for each existing regcache.
14859
14860 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
14861
14862 * server.h (init_registers): Remove prototype.
14863
14864 * linux-low.h (struct linux_target_ops): Add arch_setup field.
14865 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
14866 instead of init_registers ().
14867 * linux-arm-low.c (init_registers_arm): Add prototype.
14868 (init_registers_arm_with_iwmmxt): Likewise.
14869 (the_low_target): Add initializer for arch_setup field.
14870 * linux-cris-low.c (init_registers_cris): Add prototype.
14871 (the_low_target): Add initializer for arch_setup field.
14872 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
14873 (the_low_target): Add initializer for arch_setup field.
14874 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
14875 (the_low_target): Add initializer for arch_setup field.
14876 * linux-ia64-low.c (init_registers_ia64): Add prototype.
14877 (the_low_target): Add initializer for arch_setup field.
14878 * linux-m32r-low.c (init_registers_m32r): Add prototype.
14879 (the_low_target): Add initializer for arch_setup field.
14880 * linux-m68k-low.c (init_registers_m68k): Add prototype.
14881 (the_low_target): Add initializer for arch_setup field.
14882 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
14883 (init_registers_mips64_linux): Likewise.
14884 (the_low_target): Add initializer for arch_setup field.
14885 * linux-ppc-low.c (init_registers_ppc): Add prototype.
14886 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
14887 (the_low_target): Add initializer for arch_setup field.
14888 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
14889 (init_registers_powerpc_64): Likewise.
14890 (the_low_target): Add initializer for arch_setup field.
14891 * linux-s390-low.c (init_registers_s390): Add prototype.
14892 (init_registers_s390x): Likewise.
14893 (the_low_target): Add initializer for arch_setup field.
14894 * linux-sh-low.c (init_registers_sh): Add prototype.
14895 (the_low_target): Add initializer for arch_setup field.
14896 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
14897 (the_low_target): Add initializer for arch_setup field.
14898 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
14899 (the_low_target): Add initializer for arch_setup field.
14900
14901 * win32-low.h (struct win32_target_ops): Add arch_setup field.
14902 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
14903 instead of init_registers ().
14904 * win32-arm-low.c (init_registers_arm): Add prototype.
14905 (the_low_target): Add initializer for arch_setup field.
14906 * win32-i386-low.c (init_registers_i386): Add prototype.
14907 (the_low_target): Add initializer for arch_setup field.
14908
14909 * spu-low.c (init_registers_spu): Add prototype.
14910 (initialize_low): Call initialie_registers_spu () instead of
14911 initialize_registers ().
14912
14913 2008-02-19 Pedro Alves <pedro@codesourcery.com>
14914
14915 * server.c (handle_v_requests): When handling the vRun and vAttach
14916 packets, if already debugging a process, don't kill it. Return an
14917 error instead.
14918
14919 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
14920
14921 * server.c (handle_query): Correct length check.
14922
14923 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
14924
14925 * win32-low.c (do_initial_child_stuff): Add process handle
14926 parameter. Set current_process_handle and current_process_id from the
14927 parameters. Clear globals.
14928 (win32_create_inferior): Don't set current_process_handle and
14929 current_process_id here. Instead pass them on the call to
14930 do_initial_child_stuff.
14931 (win32_attach): Likewise.
14932 (win32_clear_inferiors): New.
14933 (win32_kill): Don't close the current process handle or the
14934 current thread handle here. Instead call win32_clear_inferiors.
14935 (win32_detach): Don't open a new handle to the process. Call
14936 win32_clear_inferiors.
14937 (win32_join): Don't rely on current_process_handle; open a new
14938 handle using the process id.
14939 (win32_wait): Call win32_clear_inferiors when the inferior process
14940 has exited.
14941
14942 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
14943
14944 * server.c (monitor_show_help): Add "exit".
14945
14946 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
14947
14948 * Makefile.in (SFILES): Add linux-xtensa-low.c.
14949 (clean): Add reg-xtensa.c.
14950 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
14951 * configure.srv (xtensa*-*-linux*) New target.
14952 * linux-xtensa-low.c: New.
14953 * xtensa-xtregs.c: New.
14954
14955 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
14956
14957 * hostio.c: Don't include errno.h.
14958 (errno_to_fileio_errno): Move to hostio-errno.
14959 * hostio.c: (hostio_error): Remove the error parameter. Defer the
14960 error number outputting to the target->hostio_last_error callback.
14961 (hostio_packet_error): Use FILEIO_EINVAL directly.
14962 (handle_open, handle_pread, hostio_error, handle_unlink): Update
14963 calls to hostio_error.
14964 * hostio-errno.c: New.
14965 * server.h (hostio_last_error_from_errno): Declare.
14966 * target.h (target_ops): Add hostio_last_error member.
14967 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
14968 as hostio_last_error handler.
14969 * spu-low.c (spu_target_ops): Likewise.
14970 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
14971 (wince_hostio_last_error): New functions.
14972 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
14973 as hostio_last_error handler.
14974 (win32_target_ops) [!_WIN32_WCE]: Register
14975 hostio_last_error_from_errno as hostio_last_error handler.
14976 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
14977 (hostio-errno.o): New rule.
14978 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
14979 * configure.srv (srv_hostio_err_objs): New variable. Default to
14980 hostio-errno.o.
14981 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
14982 * configure: Regenerate.
14983
14984 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
14985
14986 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
14987 (linux_kill, linux_detach): Clean up the process list.
14988 * remote-utils.c (remote_open): Improve port number parsing.
14989 (putpkt_binary, input_interrupt): Only send interrupts if the target
14990 is running.
14991 * server.c (extended_protocol): Make static.
14992 (attached): Define earlier.
14993 (exit_requested, response_needed, program_argv): New variables.
14994 (target_running): New.
14995 (start_inferior): Clear attached here.
14996 (attach_inferior): Set attached here.
14997 (require_running): Define.
14998 (handle_query): Use require_running and target_running. Implement
14999 "monitor exit".
15000 (handle_v_attach, handle_v_run): New.
15001 (handle_v_requests): Use require_running. Handle vAttach and vRun.
15002 (gdbserver_usage): Update.
15003 (main): Redo argument parsing. Handle --debug and --multi. Handle
15004 --attach along with other options or after the port. Save
15005 program_argv. Support no initial program. Resynchronize
15006 communication with GDB after an error. Handle "monitor exit".
15007 Use require_running and target_running. Always allow the extended
15008 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
15009 restart in extended mode.
15010 * README: Refer to the GDB manual. Update --attach usage.
15011
15012 2007-12-20 Andreas Schwab <schwab@suse.de>
15013
15014 * linux-low.c (STACK_SIZE): Define.
15015 (linux_tracefork_child): Use it. Use __clone2 on ia64.
15016 (linux_test_for_tracefork): Likewise.
15017
15018 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
15019
15020 * linux-low.c (linux_wait_for_event): Update messages. Do not
15021 reinsert auto-delete breakpoints.
15022 * mem-break.c (struct breakpoint): Change return type of handler to
15023 int.
15024 (set_breakpoint_at): Update handler type.
15025 (reinsert_breakpoint_handler): Return 1 instead of calling
15026 delete_breakpoint.
15027 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
15028 setting a new one.
15029 (check_breakpoints): Delete auto-delete breakpoints and return 2.
15030 * mem-break.h (set_breakpoint_at): Update handler type.
15031 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
15032 * win32-low.c (auto_delete_breakpoint): New.
15033 (get_child_debug_event): Use it.
15034
15035 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
15036
15037 * configure.ac: Check for pread and pwrite.
15038 * hostio.c (handle_pread): Fall back to lseek and read.
15039 (handle_pwrite): Fall back to lseek and write.
15040 * config.in, configure: Regenerated.
15041
15042 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
15043
15044 * server.c (myresume): Add own_buf argument.
15045 (main): Update calls.
15046
15047 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
15048
15049 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
15050 * remote-utils.c (remote_open): Do not call disable_async_io.
15051 (block_async_io): Delete.
15052 (unblock_async_io): Make static.
15053 (initialize_async_io): New.
15054 * server.c (handle_v_cont): Handle async I/O here.
15055 (myresume): Likewise. Move other common resume tasks here...
15056 (main): ... from here. Call initialize_async_io. Disable async
15057 I/O before the main loop.
15058 * server.h (initialize_async_io): Declare.
15059 (block_async_io, unblock_async_io): Delete prototypes.
15060 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
15061
15062 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
15063
15064 * remote-utils.c (readchar): Allow binary data in received messages.
15065
15066 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15067
15068 * win32-low.c (attaching): New global.
15069 (win32_create_inferior): Clear the `attaching' global.
15070 (win32_attach): Set the `attaching' global.
15071 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
15072 attaching. Only set a breakpoint at the entry point if not
15073 attaching.
15074
15075 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15076
15077 * server.c (main): Don't report dll events on the initial
15078 connection on attaches.
15079
15080 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15081
15082 * server.c (main): Relax numerical bases supported for the pid of
15083 the --attach command line argument.
15084
15085 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15086
15087 * win32-low.c (win32_attach): Call OpenProcess before
15088 DebugActiveProcess, not after. Add last error output to error
15089 call.
15090
15091 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15092
15093 * win32-low.c (win32_get_thread_context)
15094 (win32_set_thread_context): New functions.
15095 (thread_rec): Use win32_get_thread_context.
15096 (continue_one_thread, win32_resume): Use win32_set_thread_context.
15097 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
15098 field.
15099
15100 2007-12-03 Leo Zayas
15101 Pedro Alves <pedro_alves@portugalmail.pt>
15102
15103 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
15104 global variables.
15105 (child_add_thread): Minor cleanup.
15106 (child_continue): Resume artificially suspended threads before
15107 calling ContinueDebugEvent.
15108 (suspend_one_thread): New.
15109 (fake_breakpoint_event): New.
15110 (get_child_debug_event): Change return type to int. Check here if
15111 gdb sent an interrupt request. If a soft interrupt was requested,
15112 fake a breakpoint event. Return 0 if there is no event to handle,
15113 and 1 otherwise.
15114 (win32_wait): Don't check here if gdb sent an interrupt request.
15115 Ensure there is a valid event to handle.
15116 (win32_request_interrupt): Add soft interruption method as last
15117 resort.
15118
15119 2007-12-03 Leo Zayas
15120 Pedro Alves <pedro_alves@portugalmail.pt>
15121
15122 * win32-low.h (win32_thread_info): Add descriptions to the
15123 structure members. Replace `suspend_count' counter by a
15124 `suspended' flag.
15125 * win32-low.c (thread_rec): Update condition of when to get the
15126 context from the inferior. Rely on ContextFlags being set if it
15127 has already been retrieved. Only suspend the inferior thread if
15128 we haven't already. Warn if that fails.
15129 (continue_one_thread): s/suspend_count/suspended/. Only call
15130 ResumeThread once. Warn if that fails.
15131
15132 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
15133
15134 * win32-low.c (win32_wait): Don't read from the inferior when it
15135 has already exited.
15136
15137 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
15138
15139 * Makefile.in (win32_low_h): New variable.
15140 (win32-low.o): Add dependency on $(win32_low_h).
15141 (win32-arm-low.o, win32-i386-low.o): New rules.
15142
15143 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
15144
15145 * hostio.c: Correct copyright year.
15146
15147 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
15148
15149 * Makefile.in (OBS): Add hostio.o.
15150 (hostio.o): New rule.
15151 * server.h (handle_vFile): Declare.
15152 * hostio.c: New file.
15153 * server.c (handle_v_requests): Take packet_len and new_packet_len
15154 for binary packets. Call handle_vFile.
15155 (main): Update call to handle_v_requests.
15156
15157 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
15158
15159 * linux-low.c: Include <sched.h>.
15160
15161 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
15162
15163 * linux-low.c (linux_tracefork_grandchild): New.
15164 (linux_tracefork_child): Use clone.
15165 (linux_test_for_tracefork): Use clone; allocate and free a stack.
15166
15167 2007-10-31 Joel Brobecker <brobecker@adacore.com>
15168
15169 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
15170
15171 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
15172
15173 * linux-low.c (handle_extended_wait): Handle unexpected signals.
15174
15175 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
15176
15177 * inferiors.c (change_inferior_id): Delete.
15178 (add_pid_to_list, pull_pid_from_list): New.
15179 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
15180 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
15181 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
15182 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
15183 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
15184 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
15185 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
15186 (using_threads): Always set to 1.
15187 (handle_extended_wait): New.
15188 (add_process): Do not set TID.
15189 (linux_create_inferior): Set must_set_ptrace_flags.
15190 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
15191 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
15192 (linux_thread_alive): Rename TID argument to LWPID.
15193 (linux_wait_for_process): Handle unknown processes. Do not use TID.
15194 (linux_wait_for_event): Do not use TID or check using_threads. Update
15195 call to dead_thread_notify. Call handle_extended_wait.
15196 (linux_create_inferior): Use PTRACE_SETOPTIONS.
15197 (send_sigstop): Delete sigstop_sent.
15198 (wait_for_sigstop): Avoid TID.
15199 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
15200 (linux_test_for_tracefork): New.
15201 (linux_lookup_signals): Use thread_db_active and
15202 linux_supports_tracefork_flag.
15203 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
15204 * linux-low.h (get_process_thread): Avoid TID.
15205 (struct process_ifo): Move thread_known and tid to the end. Remove
15206 sigstop_sent.
15207 (linux_attach_lwp, thread_db_init): Update prototypes.
15208 * server.h (change_inferior_id): Delete prototype.
15209 (add_pid_to_list, pull_pid_from_list): New prototypes.
15210 * thread-db.c (thread_db_use_events): New.
15211 (find_first_thread): Rename to...
15212 (find_one_thread): ...this. Update callers and messages. Do not
15213 call fatal. Check thread_db_use_events. Do not call
15214 change_inferior_id or new_thread_notify.
15215 (maybe_attach_thread): Update. Do not call new_thread_notify.
15216 (thread_db_init): Set thread_db_use_events. Check use_events.
15217 * utils.c (fatal, warning): Correct message prefix.
15218
15219 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
15220
15221 * Makefile.in (clean): Remove new files.
15222 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
15223 (powerpc-64.o, powerpc-64.c): New rules.
15224 * configure.srv: Use alternate register sets for powerpc64-*-linux*
15225 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
15226 with SPE.
15227 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
15228 SPE targets.
15229 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
15230 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
15231 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
15232 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
15233 (target_regsets): Add AltiVec and SPE register sets.
15234 * configure.ac: Check for AltiVec and SPE.
15235 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
15236 (ppc_fill_vrregset, ppc_store_vrregset): New.
15237 (target_regsets): Add AltiVec register set.
15238 * configure: Regenerated.
15239
15240 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
15241
15242 * linux-low.c (O_LARGEFILE): Define.
15243 (linux_read_memory): Use /proc/PID/mem.
15244 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
15245 * configure, config.in: Regenerated.
15246
15247 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
15248
15249 * linux-low.c (linux_wait_for_event): Do not pass signals while
15250 single-stepping.
15251
15252 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
15253
15254 * win32-low.c (create_process): New.
15255 (win32_create_inferior): Use create_process instead of
15256 CreateProcess. If create_process failed retry appending an ".exe"
15257 suffix. Store the GetLastError result immediatelly after
15258 create_process calls and use it on the call to error.
15259
15260 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
15261
15262 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
15263
15264 2007-08-23 Joel Brobecker <brobecker@adacore.com>
15265
15266 * configure.ac: Switch license to GPLv3.
15267
15268 2007-08-01 Michael Snyder <msnyder@access-company.com>
15269
15270 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
15271
15272 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
15273
15274 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
15275 typedef.
15276 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
15277 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
15278 CloseToolhelp32Snapshot.
15279 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
15280 CloseToolhelp32Snapshot.
15281
15282 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
15283
15284 * server.c (main): Check for inferior exit before main loop.
15285
15286 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
15287
15288 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
15289 instead of on tmp_desc.
15290
15291 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
15292 Daniel Jacobowitz <dan@codesourcery.com>
15293
15294 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
15295 (add_thread): Minor cleanups.
15296 (clear_inferiors): Move lower in the file. Clear the DLL
15297 list.
15298 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
15299 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
15300 (xml_escape_text): New.
15301 * server.c (handle_query): Handle qXfer:libraries:read. Report it
15302 for qSupported.
15303 (handle_v_cont): Report errors.
15304 (gdbserver_version): Update.
15305 (main): Correct size of own_buf. Do not report initial DLL events.
15306 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
15307 (unloaded_dll, xml_escape_text): New.
15308 * win32-low.c (enum target_waitkind): Update comments.
15309 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
15310 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
15311 (win32_EnumProcessModules, win32_GetModuleInformation)
15312 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
15313 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
15314 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
15315 (win32_Module32First, win32_Module32Next, load_toolhelp)
15316 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
15317 (get_child_debug_event): Handle DLL events.
15318 (win32_wait): Likewise.
15319
15320 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
15321
15322 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
15323 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
15324
15325 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
15326
15327 * win32-low.c (handle_output_debug_string): Ignore event if not
15328 waiting.
15329
15330 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
15331
15332 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
15333
15334 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
15335
15336 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
15337
15338 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
15339
15340 * inferiors.c (change_inferior_id): Add comment.
15341 * linux-low.c (check_removed_breakpoint): Add an early
15342 prototype. Improve debug output.
15343 (linux_attach): Doc update.
15344 (linux_detach_one_process, linux_detach): Clean up before releasing
15345 each process.
15346 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
15347 * linux-low.h (struct process_info): Doc improvement.
15348 * mem-break.c (delete_all_breakpoints): New.
15349 * mem-break.h (delete_all_breakpoints): New prototype.
15350 * thread-db.c (find_first_thread): New.
15351 (thread_db_create_event): Call it instead of
15352 thread_db_find_new_threads. Clean up unused variables.
15353 (maybe_attach_thread): Remove first thread handling.
15354 (thread_db_find_new_threads): Use find_first_thread.
15355 (thread_db_get_tls_address): Likewise.
15356
15357 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
15358
15359 * thread-db.c (thread_db_find_new_threads): Add prototype.
15360 (thread_db_create_event): Check for the main thread before adding
15361 a new thread.
15362 (maybe_attach_thread): Only enable event reporting if TID == 0.
15363 (thread_db_get_tls_address): Check for new threads.
15364
15365 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
15366
15367 * linux-low.c (linux_create_inferior): Try execv before execvp.
15368 * spu-low.c (spu_create_inferior): Likewise.
15369
15370 2007-06-13 Mike Frysinger <vapier@gentoo.org>
15371
15372 * linux-low.c (linux_create_inferior): Change execv to execvp.
15373 * spu-low.c (spu_create_inferior): Likewies.
15374
15375 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
15376
15377 * Makefile.in (clean): Clean new files instead of deleted ones.
15378 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
15379 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
15380 rules.
15381 * configure.srv: Specify XML files and new regformats for MIPS and
15382 MIPS64 GNU/Linux.
15383 * linux-mips-low.c (mips_num_regs): Set to only used registers.
15384 (mips_regmap): Do not fetch $0. Remove unused registers. Add
15385 an entry for the restart register.
15386 (mips_cannot_fetch_register, mips_cannot_store_register)
15387 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
15388 register names to match the XML descriptions.
15389 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
15390 restart register instead of $0.
15391
15392 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
15393 Markus Deuling <deuling@de.ibm.com>
15394
15395 * remote-utils.c (decode_xfer_write): New function.
15396 * server.h (decode_xfer_write): Add prototype.
15397 * server.c (handle_query): Add PACKET_LEN argument. Support
15398 qXfer:spu:read and qXfer:spu:write packets.
15399 (main): Pass packet_len to handle_query.
15400 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
15401 * target.h (target_ops): Add qxfer_spu.
15402
15403 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
15404
15405 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
15406 accessing non-seekable spufs files.
15407
15408 2007-05-16 Markus Deuling <deuling@de.ibm.com>
15409
15410 * server.c (handle_query): Add reply for qC packet.
15411
15412 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15413 Leo Zayas <lerele@champenstudios@com>
15414
15415 * server.h (check_remote_input_interrupt_request): New function.
15416 * remote_utils.c (INVALID_DESCRIPTOR): New define.
15417 (remote_desc): Initialize with INVALID_DESCRIPTOR.
15418 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
15419 (check_remote_input_interrupt_request): New function.
15420 * server.h (check_remote_input_interrupt_request): Declare.
15421 * win32-low.c (winapi_DebugBreakProcess,
15422 winapi_GenerateConsoleCtrlEvent): New typedefs.
15423 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
15424 to 250 ms.
15425 (win32_wait): Check for remote interrupt request
15426 with check_remote_input_interrupt_request.
15427 (win32_request_interrupt): New function.
15428 (win32_target_op): Set request_interrupt to win32_request_interrupt.
15429
15430 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15431
15432 * win32-low.c (debug_registers_changed,
15433 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
15434 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
15435 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
15436 (thread_rec): Get context using the low target.
15437 (child_add_thread): Call thread_added on the low target,
15438 which does the same thing.
15439 (regptr): Delete.
15440 (do_initial_child_stuff): Remove debug registers references.
15441 Set context using the low target. Resume threads after
15442 setting the contexts.
15443 (child_continue): Remove dead variable. Remove debug
15444 registers references.
15445 (child_fetch_inferior_registers): Go through the low target.
15446 (do_child_store_inferior_registers): Remove.
15447 (child_store_inferior_registers): Go through the low target.
15448 (win32_resume): Remove debug registers references.
15449 Set context using the low target.
15450 (handle_exception): Change return type to void. Don't record
15451 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
15452 first chance exception.
15453 (get_child_debug_event): Change return type to void. Remove
15454 goto loop. Always return after waiting for debug event.
15455 (win32_wait): Convert to switch statement. Handle spurious
15456 events.
15457
15458 * win32-i386-low.c (debug_registers_changed,
15459 debug_registers_used): New.
15460 (initial_stuff): Rename to ...
15461 (i386_initial_stuff): ... this. Clear debug registers
15462 state variables.
15463 (store_debug_registers): Delete.
15464 (i386_get_thread_context): New.
15465 (load_debug_registers): Delete.
15466 (i386_set_thread_context): New.
15467 (i386_thread_added): New.
15468 (single_step): Rename to ...
15469 (i386_single_step): ... this.
15470 (do_fetch_inferior_registers): Rename to ...
15471 (i386_fetch_inferior_register): ... this.
15472 (i386_store_inferior_register): New.
15473 (the_low_target): Adapt to new interface.
15474
15475 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
15476 (arm_get_thread_context): New.
15477 (arm_set_thread_context): New.
15478 (regptr): New.
15479 (do_fetch_inferior_registers): Rename to ...
15480 (arm_fetch_inferior_register): ... this.
15481 (arm_store_inferior_register): New.
15482 (arm_wince_breakpoint): Reimplement as unsigned long.
15483 (arm_wince_breakpoint_len): Define.
15484 (the_low_target): Adapt to new interface.
15485
15486 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
15487 load_debug_registers. Add get_thread_context, set_thread_context,
15488 thread_added and store_inferior_register. Rename
15489 fetch_inferior_registers to fetch_inferior_register.
15490 (regptr): Remove declaration.
15491
15492 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15493
15494 * linux-low.c (linux_detach): Change return type to int. Return 0.
15495 * spu-low.c (spu_detach): Likewise.
15496
15497 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15498
15499 * target.h (target_ops): Change return type of detach to int.
15500 Add join.
15501 (join_inferior): New.
15502 * server.c (main): Don't skip detach support on mingw32.
15503 If the inferior doesn't support detaching return error.
15504 Call join_inferior instead of using waitpid.
15505 * linux-low.c (linux_join): New.
15506 (linux_target_op): Add linux_join.
15507 * spu-low.c (spu_join): New.
15508 (spu_target_ops): Add spu_join.
15509 * win32-low.c (win32_detach): Adapt to new interface.
15510 Reopen current_process_handle before detaching. Issue a child
15511 resume before detaching.
15512 (win32_join): New.
15513 (win32_target_op): Add win32_join.
15514
15515 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15516
15517 * win32-low.c (win32-attach): Fix return value.
15518 * target.h (target_ops): Describe ATTACH return values.
15519
15520 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15521
15522 * win32-low.c (GETPROCADDRESS): Define.
15523 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
15524 (winapi_DebugSetProcessKillOnExit): Likewise.
15525 (win32_create_inferior): Force usage of ansi CreateProcessA.
15526 (win32_attach): Use GETPROCADDRESS.
15527 (win32_detach): Likewise.
15528
15529 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15530
15531 * win32-low.c (win32_wait): Don't use WSTOPSIG.
15532
15533 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
15534
15535 * win32-low.c: Commit leftover changes from 2007-03-29.
15536
15537 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
15538
15539 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
15540 fields short instead of int. Add explicit padding.
15541 (i387_cache_to_fsave): Remove unnecessary casts.
15542 (i387_fsave_to_cache): Doc fix.
15543 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
15544
15545 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
15546
15547 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
15548 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
15549
15550 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
15551
15552 * configure.srv (arm*-*-mingw32ce*): Move near the other
15553 arm targets.
15554
15555 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
15556
15557 * configure.ac: Add errno checking.
15558 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
15559 sys/file.h and malloc.h.
15560 (AC_CHECK_DECLS): Add perror.
15561 (srv_mingwce): Handle.
15562 * configure.srv (i[34567]86-*-cygwin*): Add
15563 win32-i386-low.o to srv_tgtobj.
15564 (i[34567]86-*-mingw*): Likewise.
15565 (arm*-*-mingw32ce*): Add case.
15566 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
15567 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
15568 [__MINGW32CE__] (strerror): New function.
15569 [__MINGW32CE__] (errno): Define to GetLastError.
15570 [__MINGW32CE__] (COUNTOF): New macro.
15571 (remote_open): Remove extra close call.
15572 * mem-break.c (delete_breakpoint_at): New function.
15573 * mem-break.h (delete_breakpoint_at): Declare.
15574 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
15575 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
15576 [USE_WIN32API] (read, write): Add char* casts.
15577 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
15578 * server.h: Include wincecompat.h on Windows CE.
15579 [HAVE_ERRNO_H]: Check.
15580 (perror): Declare if not declared.
15581 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
15582 (perror_with_name): Remove errno declaration.
15583 * wincecompat.h: New.
15584 * wincecompat.c: New.
15585 * win32-low.h: New.
15586 * win32-arm-low.c: New.
15587 * win32-i386-low.c: New.
15588 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
15589 (OUTMSG2): Make it safe.
15590 (_T): New macro.
15591 (COUNTOF): New macro.
15592 (NUM_REGS): Get it from the low target.
15593 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
15594 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
15595 (thread_rec): Let low target handle debug registers.
15596 (child_add_thread): Likewise.
15597 (child_init_thread_list): Likewise.
15598 (continue_one_thread): Likewise.
15599 (regptr): New.
15600 (do_child_fetch_inferior_registers): Move to ...
15601 * win32-i386-low.c: ... here, and rename to ...
15602 (do_fetch_inferior_registers): ... this.
15603 * win32-low.c (child_fetch_inferior_registers):
15604 Go through the low target.
15605 (do_child_store_inferior_registers): Use regptr.
15606 (strwinerror): New function.
15607 (win32_create_inferior): Handle Windows CE.
15608 Use strwinerror instead of strerror on Windows error
15609 codes. Add program to the error output.
15610 Don't close the main thread handle on Windows CE.
15611 (win32_attach): Use coredll.dll on Windows CE.
15612 (win32_kill): Close current process and current
15613 thread handles.
15614 (win32_detach): Use coredll.dll on Windows CE.
15615 (win32_resume): Let low target handle debug registers, and
15616 step request.
15617 (handle_exception): Add/Remove initial breakpoint. Avoid
15618 non-existant WSTOPSIG on Windows CE.
15619 (win32_read_inferior_memory): Cast to remove warning.
15620 (win32_arch_string): Go through the low target.
15621 (initialize_low): Call set_breakpoint_data with the low
15622 target's breakpoint.
15623 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
15624 FOP_REGNUM, mappings): Move to ...
15625 * win32-i386-low.c: ... here.
15626 * win32-low.c (win32_thread_info): Move to ...
15627 * win32-low.h: ... here.
15628 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
15629 win32-arm-low.c and wincecompat.c.
15630 (all:): Add $EXEEXT.
15631 (install-only:): Likewise.
15632 (gdbserver:): Likewise.
15633 (gdbreplay:): Likewise.
15634 * config.in: Regenerate.
15635 * configure: Regenerate.
15636
15637 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
15638
15639 * win32-low.c: Rename typedef thread_info to
15640 win32_thread_info throughout.
15641
15642 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
15643
15644 * win32-i386-low.c: Rename to ...
15645 * win32-low.c: ... this.
15646 * configure.srv: Replace win32-i386-low.o with win32-low.o.
15647 * Makefile.in: Likewise.
15648
15649 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
15650
15651 * remote-utils.c (monitor_output): Constify msg parameter.
15652 * server.h (monitor_output): Likewise.
15653 * win32-i386-low.c (handle_output_debug_string): New.
15654 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
15655 handle_output_debug_string.
15656 (get_child_debug_event): Likewise.
15657
15658 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
15659
15660 * server.c (main): Correct strtoul check.
15661
15662 2007-03-27 Jon Ringle <jon@ringle.org>
15663
15664 * linux-low.c: Check __ARCH_HAS_MMU__ also.
15665
15666 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
15667
15668 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
15669
15670 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
15671
15672 * terminal.h: Check HAVE_SGTTY_H.
15673
15674 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
15675
15676 * remote-utils.c (remote_open): Print out the assigned port number.
15677
15678 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
15679
15680 * remote-utils.c (monitor_output): New function.
15681 * server.c (debug_threads): Define here.
15682 (monitor_show_help): New function.
15683 (handle_query): Handle qRcmd.
15684 (main): Do not handle 'd' packet.
15685 * server.h (debug_threads, remote_debug, monitor_output): Declare.
15686 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
15687 of debug_threads.
15688
15689 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
15690
15691 * Makefile.in (EXEEXT): New.
15692 (clean): Use $(EXEEXT).
15693
15694 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
15695
15696 * target.h (target_ops): Rename send_signal to request_interrupt,
15697 and remove enum target_signal parameter.
15698 * linux-low.c (linux_request_interrupt): Rename from
15699 linux_send_signal, and always send SIGINT.
15700 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
15701 and always send SIGINT.
15702 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
15703 of send_signal.
15704 (input_interrupt): Likewise.
15705
15706 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
15707
15708 * server.c (get_features_xml): Check if target implemented
15709 arch_string.
15710 * win32-i386-low.c (win32_arch_string): New.
15711 (win32_target_ops): Add win32_arch_string as arch_string member.
15712
15713 2007-02-22 Markus Deuling <deuling@de.ibm.com>
15714
15715 * spu-low.c (spu_arch_string): New.
15716 (spu_target_ops): Add spu_arch_string.
15717
15718 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
15719
15720 * remote-utils.c: Remove HAVE_TERMINAL_H check.
15721 * configure.ac: Do not check for terminal.h.
15722 * configure, config.in: Regenerated.
15723
15724 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
15725
15726 * Makefile.in (OBS): Add $(XML_BUILTIN).
15727 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
15728 (clean): Update.
15729 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
15730 (arm-with-iwmmxt.c): New.
15731 * config.in, configure: Regenerate.
15732 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
15733 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
15734 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
15735 (arm*-*-linux*): Add iWMMXt and regset support.
15736 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
15737 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
15738 (arm_store_wmmxregset, target_regsets): New.
15739 * server.c (get_features_xml): Take annex argument. Check builtin
15740 XML documents.
15741 (handle_query): Handle multiple annexes.
15742
15743 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
15744
15745 * remote-utils.c [USE_WIN32API] (read, write): Define.
15746 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
15747 write.
15748
15749 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
15750
15751 * linux-i386-low.c (the_low_target): Set arch_string.
15752 * linux-x86-64-low.c (the_low_target): Likewise.
15753 * linux-low.c (linux_arch_string): New.
15754 (linux_target_ops): Add it.
15755 * linux-low.h (struct linux_target_ops): Add arch_string.
15756 * server.c (write_qxfer_response): Use const void * for DATA.
15757 (get_features_xml): New.
15758 (handle_query): Handle qXfer:features:read. Report it for qSupported.
15759 * target.h (struct target_ops): Add arch_string method.
15760
15761 2007-01-03 Denis Pilat <denis.pilat@st.com>
15762 Daniel Jacobowitz <dan@codesourcery.com>
15763
15764 * linux-low.c (linux_kill): Handle being called with no threads.
15765 * win32-i386-low.c (win32_kill): Likewise.
15766 (get_child_debug_event): Clear current_process_handle.
15767
15768 2006-12-30 Denis PILAT <denis.pilat@st.com>
15769 Daniel Jacobowitz <dan@codesourcery.com>
15770
15771 * remote-utils.c (remote_open): Check the type of specified
15772 serial port devices before opening them.
15773 * server.c (main): Kill the inferior if an error occurs during
15774 the first remote_open.
15775
15776 2006-12-05 Markus Deuling <deuling@de.ibm.com>
15777
15778 * README: Update supported targets.
15779
15780 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
15781
15782 * Makefile.in (clean): Remove reg-mips64.c.
15783 (reg-mips64.c, reg-mips64.o): New rules.
15784 * configure.srv: Handle mips64. Include regset support for mips.
15785 * linux-mips-low.c (union mips_register): New.
15786 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
15787 (mips_breakpoint, mips_breakpoint_at): Use int.
15788 (mips_collect_register, mips_supply_register)
15789 (mips_collect_register_32bit, mips_supply_register_32bit)
15790 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
15791 (mips_store_fpregset, target_regsets): New.
15792 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
15793
15794 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
15795
15796 * configure.srv: Add target "spu*-*-*".
15797 * Makefile.in (clean): Remove reg-spu.c.
15798 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
15799 * spu-low.c: New file.
15800
15801 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
15802
15803 * configure.ac: Correct td_thr_tls_get_addr test.
15804 * configure: Regenerated.
15805
15806 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
15807
15808 * linux-low.c (linux_wait_for_event): Reformat. Use the
15809 pass_signals array.
15810 * remote-utils.c (decode_address_to_semicolon): New.
15811 * server.c (pass_signals, handle_general_set): New.
15812 (handle_query): Mention QPassSignals for qSupported.
15813 (main): Call handle_general_set.
15814 * server.h (pass_signals, decode_address_to_semicolon): New.
15815
15816 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
15817
15818 * server.c (handle_query): Correct error handling for read_auxv.
15819
15820 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
15821
15822 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
15823 and srv_linux_thread_db to yes.
15824 * linux-s390-low.c (s390_fill_gregset): New function.
15825 (target_regsets): Define data structure.
15826
15827 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
15828
15829 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
15830 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
15831 * config.in, configure: Regenerated.
15832 * inferiors.c (gdb_id_to_thread): New function.
15833 (gdb_id_to_thread_id): Use it.
15834 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
15835 * linux-low.h (struct process_info): Add th member.
15836 (thread_db_get_tls_address): New prototype.
15837 * remote-utils.c (decode_address): Make non-static.
15838 * server.c (handle_query): Handle qGetTLSAddr.
15839 * server.h (gdb_id_to_thread, decode_address): New prototypes.
15840 * target.h (struct target_ops): Add get_tls_address.
15841 * thread-db.c (maybe_attach_thread): Save the thread handle.
15842 (thread_db_get_tls_address): New.
15843
15844 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
15845
15846 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
15847 (linux_resume_one_process): Take a siginfo_t *. Update all
15848 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
15849 (struct pending_signals): Add a siginfo_t.
15850 (linux_wait_for_process): Always set last_status.
15851 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
15852 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
15853 * linux-low.h (struct process_info): Add last_status.
15854
15855 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
15856
15857 * remote-utils.c (try_rle): New function.
15858 (putpkt_binary): Use it.
15859
15860 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
15861
15862 * Makefile.in (clean): Clean reg-x86-64-linux.c.
15863 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
15864 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
15865 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
15866 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
15867 point registers.
15868
15869 2006-08-08 Richard Sandiford <richard@codesourcery.com>
15870
15871 * server.c (terminal_fd): New variable.
15872 (old_foreground_pgrp): Likewise.
15873 (restore_old_foreground_pgrp): New function.
15874 (start_inferior): Record the terminal file descriptor in terminal_fd
15875 and its original foreground group in old_foreground_pgrp. Register
15876 restore_old_foreground_pgrp with atexit().
15877
15878 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
15879
15880 * server.c (handle_query): Correct qPart to qXfer.
15881
15882 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
15883
15884 * configure.ac: Check for more headers which are missing on
15885 Windows. Automatically supply -lwsock32 and USE_WIN32API.
15886 * configure.srv: Add Cygwin and mingw32.
15887 * remote-utils.c: Don't include headers unconditionally which
15888 are missing on mingw32. Include <winsock.h> for mingw32.
15889 (remote_open): Adjust for mingw32 support. Flush
15890 standard error after writing to it.
15891 (remote_close, putpkt_binary, input_interrupt, block_async_io)
15892 (unblock_async_io, enable_async_io, disable_async_io)
15893 (readchar, getpkt): Update for Winsock support.
15894 (prepare_resume_reply): Expect a protocol signal number.
15895 * server.c: Disable <sys/wait.h> on mingw32.
15896 (start_inferior): Adjust for mingw32 support. Flush
15897 standard error after writing to it.
15898 (attach_inferior): Likewise. Use protocol signal
15899 numbers.
15900 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
15901 and names.
15902 * win32-i386-low.c: New file.
15903 * Makefile.in (XM_CLIBS): Set.
15904 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
15905 (win32-i386-low.o): New dependency rule.
15906 * linux-low.c (linux_wait): Use target signal numbers.
15907 * target.h (struct target_ops): Doc fix.
15908 * server.h (target_signal_to_name): New prototype.
15909 * gdbreplay.c: Don't include headers unconditionally which
15910 are missing on mingw32. Include <winsock.h> for mingw32.
15911 (remote_close, remote_open): Adjust for Winsock support.
15912 * configure, config.in: Regenerated.
15913
15914 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
15915
15916 * server.c (decode_xfer_read, write_qxfer_response): New.
15917 (handle_query): Take a packet length argument. Handle
15918 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
15919 the qSupported response.
15920 (main): Update call to handle_query.
15921
15922 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
15923
15924 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
15925 (putpkt_binary): Renamed from putpkt and adjusted for binary
15926 data.
15927 (putpkt): New wrapper for putpkt_binary.
15928 (readchar): Don't mask off the high bit.
15929 (decode_X_packet): New function.
15930 * server.c (main): Call putpkt_binary if a handler sets the packet
15931 length. Save the length of the incoming packet. Handle 'X'.
15932 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
15933
15934 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
15935
15936 * server.c (handle_query): Handle qSupported.
15937
15938 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
15939
15940 * remote-utils.c (all_symbols_looked_up): New variable.
15941 (look_up_one_symbol): Check it.
15942 * server.h (look_up_one_symbol): New declaration.
15943 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
15944
15945 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
15946
15947 * Makefile.in (linux-arm-low.o): Update dependencies.
15948 * linux-arm-low.c: Include "gdb_proc_service.h".
15949 (PTRACE_GET_THREAD_AREA): Define.
15950 (ps_get_thread_area): New function.
15951
15952 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
15953
15954 * configure.srv (m68k*-*-uclinux*): New target.
15955 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
15956 (linux_resume_one_process): Remove extraneous cast.
15957 (linux_read_offsets): New.
15958 (linux_target_op): Add linux_read_offsets on mmuless systems.
15959 * server.c (handle_query): Add qOffsets logic.
15960 * target.h (struct target_ops): Add read_offsets.
15961
15962 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
15963
15964 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
15965 (PTRACE_GET_THREAD_AREA): Define.
15966 (ps_get_thread_area): New function.
15967 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
15968 (linux-x86-64-low.o): Update.
15969
15970 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
15971
15972 * configure.ac: Remove checks for prfpregset_t.
15973 * gdb_proc_service.h: New file.
15974 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
15975 new "gdb_proc_service.h".
15976 * proc-service.c: Likewise.
15977 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
15978 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
15979 * Makefile.in (gdb_proc_service_h): Updated.
15980 * configure, config.in: Regenerated.
15981
15982 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
15983
15984 * remote-utils.c (prepare_resume_reply): Move declaration
15985 of gdb_id_from_wait to the top of the block.
15986
15987 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
15988
15989 * linux-low.c (regsets_store_inferior_registers): Read the regset
15990 from the target before filling it.
15991
15992 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
15993
15994 * server.c (attach_inferior): Return SIGTRAP for a successful
15995 attach.
15996
15997 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
15998
15999 * Makefile.in (OBS): Add version.o.
16000 (STAGESTUFF): Delete.
16001 (version.o): Add dependencies.
16002 (version.c): Replace rule.
16003 (clean): Remove version.c.
16004 * server.c (gdbserver_version): New.
16005 (gdbserver_usage): Use printf.
16006 (main): Handle --version and --help.
16007 * server.h (version, host_name): Add declarations.
16008
16009 2005-12-23 Eli Zaretskii <eliz@gnu.org>
16010
16011 * linux-arm-low.c:
16012 * linux-arm-low.c:
16013 * inferiors.c:
16014 * i387-fp.h:
16015 * i387-fp.c:
16016 * gdbreplay.c:
16017 * regcache.c:
16018 * proc-service.c:
16019 * mem-break.h:
16020 * mem-break.c:
16021 * linux-x86-64-low.c:
16022 * linux-sh-low.c:
16023 * linux-s390-low.c:
16024 * linux-ppc64-low.c:
16025 * linux-ppc-low.c:
16026 * linux-mips-low.c:
16027 * linux-m68k-low.c:
16028 * linux-m32r-low.c:
16029 * linux-low.h:
16030 * linux-low.c:
16031 * linux-ia64-low.c:
16032 * linux-i386-low.c:
16033 * linux-crisv32-low.c:
16034 * thread-db.c:
16035 * terminal.h:
16036 * target.h:
16037 * target.c:
16038 * server.h:
16039 * server.c:
16040 * remote-utils.c:
16041 * regcache.h:
16042 * utils.c:
16043 * Makefile.in:
16044 * configure.ac:
16045 * gdbserver.1: Add (C) after Copyright. Update the FSF
16046 address.
16047
16048 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
16049
16050 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
16051 (arm_breakpoint_at): Recognize both breakpoints.
16052 (the_low_target): Use the correct breakpoint instruction.
16053
16054 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
16055
16056 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
16057 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
16058 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
16059 (the_low_target): Update.
16060
16061 2005-10-25 Andreas Schwab <schwab@suse.de>
16062
16063 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
16064
16065 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
16066 (ia64_num_regs): Reduce to 462.
16067
16068 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
16069
16070 * acinclude.m4: Correct quoting.
16071 * aclocal.m4: Regenerated.
16072
16073 Suggested by SZOKOVACS Robert <szo@ies.hu>:
16074 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
16075 (thread_db_init): Call thread_db_err_str.
16076 * configure.ac: Check for TD_VERSION.
16077 * config.in, configure: Regenerated.
16078
16079 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16080
16081 * server.h (error, fatal, warning): Add ATTR_FORMAT.
16082
16083 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
16084
16085 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
16086 is not available. Define HAVE_PTRACE_GETREGS if it is.
16087 * config.in, configure: Regenerated.
16088 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
16089 * linux-i386-low.c, linux-m68k-low.c: Update to use
16090 HAVE_PTRACE_GETREGS.
16091 * linux-low.c (regsets_fetch_inferior_registers)
16092 (regsets_store_inferior_registers): Only return 0 if we processed
16093 GENERAL_REGS.
16094 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
16095 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
16096
16097 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
16098
16099 * inferiors.c (struct thread_info): Add gdb_id.
16100 (add_thread): Add gdb_id argument.
16101 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
16102 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
16103 calls to add_thread.
16104 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
16105 * server.c (handle_query): Use thread_to_gdb_id.
16106 (handle_v_cont, main): Use gdb_id_to_thread_id.
16107 * server.h (add_thread): Update prototype.
16108 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
16109 prototypes.
16110
16111 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
16112
16113 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
16114 left-padded registers.
16115 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
16116 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
16117
16118 2005-07-01 Steve Ellcey <sje@cup.hp.com>
16119
16120 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
16121 * configure: Regenerate.
16122 * config.in: Regenerate.
16123 * server.h (NEED_DECLARATION_STRERROR):
16124 Replace with !HAVE_DECL_STRERROR.
16125
16126 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
16127
16128 * linux-low.c (linux_wait, linux_send_signal): Don't test
16129 an unsigned long variable for > 0 if it could be MAX_ULONG.
16130 * server.c (myresume): Likewise.
16131 * target.c (set_desired_inferior): Likewise.
16132
16133 2005-06-13 Mark Kettenis <kettenis@gnu.org>
16134
16135 * configure.ac: Simplify and improve check for socklen_t.
16136 * configure, config.in: Regenerate.
16137
16138 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
16139
16140 * acconfig.h: Remove.
16141 * configure.ac: Add a test for socklen_t. Use three-argument
16142 AC_DEFINE throughout.
16143 * config.in: Regenerated using autoheader 2.59.
16144 * configure: Regenerated.
16145
16146 * gdbreplay.c (socklen_t): Provide a default.
16147 (remote_open): Use socklen_t.
16148 * remote-utils.c (socklen_t): Provide a default.
16149 (remote_open): Use socklen_t.
16150 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
16151 unsigned char.
16152
16153 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
16154 char for buffers.
16155 * linux-low.c (linux_read_memory, linux_write_memory)
16156 (linux_read_auxv): Likewise.
16157 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
16158 (check_mem_write): Likewise.
16159 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
16160 Likewise.
16161 * regcache.c (struct inferior_rgcache_data, registers_to_string)
16162 (registers_from_string, register_data): Likewise.
16163 * server.c (handle_query, main): Likewise.
16164 * server.h (convert_ascii_to_int, convert_int_to_ascii)
16165 (decode_M_packet): Likewise.
16166 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
16167 * target.h (struct target_ops): Update read_memory, write_memory,
16168 and read_auxv.
16169 (read_inferior_memory, write_inferior_memory): Update.
16170 * linux-low.h (struct linux_target_ops): Change type of breakpoint
16171 to unsigned char *.
16172 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
16173 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
16174 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
16175 linux-s390-low.c, linux-sh-low.c: Update for changes in
16176 read_inferior_memory and the_low_target->breakpoint.
16177
16178 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
16179
16180 * Makefile.in (SFILES): Add linux-ppc64-low.c.
16181 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
16182 * configure.srv: Add powerpc64-*-linux*.
16183 * linux-ppc64-low.c: New file.
16184
16185 2005-05-23 Orjan Friberg <orjanf@axis.com>
16186
16187 * linux-cris-low.c: New file with support for CRIS.
16188 * linux-crisv32-low.c: Ditto for CRISv32.
16189 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
16190 (clean): Add reg-cris.c and reg-crisv32.c.
16191 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
16192 reg-crisv32.o, and reg-crisv32.c to make rules.
16193 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
16194 recognized targets.
16195
16196 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
16197
16198 * linux-low.c (fetch_register): Ensure buffer size is a multiple
16199 of sizeof (PTRACE_XFER_TYPE).
16200 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
16201
16202 2005-05-12 Orjan Friberg <orjanf@axis.com>
16203
16204 * target.h (struct target_ops): Add insert_watchpoint,
16205 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
16206 pointers for hardware watchpoint support.
16207 * linux-low.h (struct linux_target_ops): Ditto.
16208 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
16209 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
16210 to linux_target_ops.
16211 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
16212 reply packet.
16213 * server.c (main): Recognize 'Z' and 'z' packets.
16214
16215 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
16216
16217 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
16218 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
16219 (the_low_target): Add new members.
16220
16221 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
16222
16223 * proc-service.c (ps_lgetregs): Search all_processes instead of
16224 all_threads.
16225
16226 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
16227
16228 * server.c (start_inferior): Change return type to int.
16229 (attach_inferior): Change sigptr to int *.
16230 (handle_v_cont, handle_v_requests): Change signal to int *.
16231 (main): Change signal to int.
16232
16233 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
16234
16235 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
16236 * configure.srv: Add m32r*-*-linux*.
16237 * linux-m32r-low.c: New file.
16238
16239 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
16240
16241 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
16242
16243 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
16244
16245 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
16246 Take unsigned long arguments for PIDs.
16247 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
16248 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
16249 (wait_for_sigstop, linux_resume_one_process)
16250 (regsets_fetch_inferior_registers, linux_send_signal)
16251 (linux_read_auxv): Likewise. Update the types of variables holding
16252 PIDs. Update format string specifiers.
16253 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
16254 * remote-utils.c (prepare_resume_reply): Likewise.
16255 * server.c (cont_thread, general_thread, step_thread)
16256 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
16257 unsigned long.
16258 (handle_query): Update format specifiers.
16259 (handle_v_cont, main): Use strtoul for thread IDs.
16260 * server.h (struct inferior_list_entry): Use unsigned long for ID.
16261 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
16262 (general_thread, step_thread, thread_from_wait)
16263 (old_thread_from_wait): Update.
16264 * target.h (struct thread_resume): Use unsigned long for THREAD.
16265 (struct target_ops): Use unsigned long for arguments to attach and
16266 thread_alive.
16267
16268 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
16269
16270 * acinclude.m4: Include bfd/bfd.m4 directly.
16271 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
16272 <agriffis@toolchain.org>.
16273 * aclocal.m4, configure: Regenerated.
16274
16275 2005-01-07 Andrew Cagney <cagney@gnu.org>
16276
16277 * configure.ac: Rename configure.in, require autoconf 2.59.
16278 * configure: Re-generate.
16279
16280 2004-12-08 Daniel Jacobowitz <dan@debian.org>
16281
16282 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
16283 LIBS when finished.
16284 * aclocal.m4: Regenerated.
16285 * configure: Regenerated.
16286
16287 2004-11-21 Andreas Schwab <schwab@suse.de>
16288
16289 * linux-m68k-low.c (m68k_num_gregs): Define.
16290 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
16291 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
16292 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
16293 (m68k_breakpoint_at): New. Add to the_low_target.
16294
16295 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
16296 srv_linux_thread_db to yes.
16297
16298 2004-10-20 Joel Brobecker <brobecker@gnat.com>
16299
16300 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
16301 (ARCH_SET_FS): Likewise.
16302 (ARCH_GET_FS): Likewise.
16303 (ARCH_GET_GS): Likewise.
16304
16305 2004-10-16 Daniel Jacobowitz <dan@debian.org>
16306
16307 * linux-i386-low.c (ps_get_thread_area): New.
16308 * linux-x86-64-low.c (ps_get_thread_area): New.
16309 * linux-low.c: Include <sys/syscall.h>.
16310 (linux_kill_one_process): Don't kill the first thread here.
16311 (linux_kill): Kill the first thread here.
16312 (kill_lwp): New function.
16313 (send_sigstop, linux_send_signal): Use it.
16314 * proc-service.c: Clean up #ifdefs.
16315 (fpregset_info): Delete.
16316 (ps_lgetregs): Update and enable implementation.
16317 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
16318 implementations.
16319 * remote-utils.c (struct sym_cache, symbol_cache): New.
16320 (input_interrupt): Print a clearer message.
16321 (async_io_enabled): New variable.
16322 (enable_async_io, disable_async_io): Use it. Update comments.
16323 (look_up_one_symbol): Use the symbol cache.
16324 * thread-db.c (thread_db_look_up_symbols): New function.
16325 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
16326
16327 2004-10-16 Daniel Jacobowitz <dan@debian.org>
16328
16329 * configure.in: Test for -rdynamic.
16330 * configure: Regenerated.
16331 * Makefile (INTERNAL_LDFLAGS): New.
16332 (gdbserver, gdbreplay): Use it.
16333
16334 2004-09-02 Andrew Cagney <cagney@gnu.org>
16335
16336 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
16337
16338 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
16339
16340 * linux-low.c (linux_wait): Clear all_processes list also.
16341
16342 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
16343
16344 * linux-low.c: Include <errno.h>. Remove extern declaration of
16345 errno.
16346
16347 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
16348
16349 * gdbreplay.c, server.h, utils.c: Update copyright years.
16350
16351 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
16352
16353 * server.c (main): Print child status or termination signal from
16354 variable 'signal', not 'sig'.
16355
16356 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
16357
16358 * linux-low.c (linux_read_memory): Change return type to
16359 int. Check for and return error from ptrace().
16360 * target.c (read_inferior_memory): Change return type to int. Pass
16361 back return status from the_target->read_memory().
16362 * target.h (struct target_ops): Adapt *read_memory() prototype.
16363 Update comment.
16364 (read_inferior_memory): Adapt prototype.
16365 * server.c (main): Return an error packet if
16366 read_inferior_memory() returns an error.
16367
16368 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
16369
16370 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
16371 Unify with other clean targets.
16372
16373 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
16374
16375 * server.c (handle_v_cont): Call set_desired_inferior.
16376
16377 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
16378
16379 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
16380
16381 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
16382
16383 * linux-low.c (linux_wait): Unblock async I/O.
16384 (linux_resume): Block and enable async I/O.
16385 * remote-utils.c (block_async_io, unblock_async_io): New functions.
16386 * server.h (block_async_io, unblock_async_io): Add prototypes.
16387
16388 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
16389
16390 * remote-utils.c (remote_open): Print a status notice after
16391 opening a TCP port.
16392 * server.c (attach_inferior): Print a status notice after
16393 attaching.
16394
16395 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
16396
16397 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
16398
16399 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
16400
16401 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
16402 error packet.
16403 * server.c, target.h: Update copyright years.
16404
16405 2004-02-25 Roland McGrath <roland@redhat.com>
16406
16407 * target.h (struct target_ops): New member `read_auxv'.
16408 * server.c (handle_query): Handle qPart:auxv:read: query using that.
16409 * linux-low.c (linux_read_auxv): New function.
16410 (linux_target_ops): Initialize `read_auxv' member to that.
16411
16412 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
16413
16414 Committed by Jim Blandy <jimb@redhat.com>.
16415
16416 * linux-s390-low.c (s390_num_regs): Update.
16417 (s390_regmap): Remove control registers. Use __s390x__ predefine
16418 instead of GPR_SIZE to distiguish s390 and s390x targets.
16419
16420 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
16421
16422 * linux-low.c: Update copyright year.
16423 (check_removed_breakpoint): Clear pending_is_breakpoint.
16424 (linux_set_resume_request, linux_queue_one_thread)
16425 (resume_status_pending_p): New functions.
16426 (linux_continue_one_thread): Use process->resume.
16427 (linux_resume): Only resume threads if there are no pending events.
16428 * linux-low.h (struct process_info): Add resume request
16429 pointer.
16430
16431 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
16432
16433 * regcache.c (new_register_cache): Clear the allocated register
16434 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
16435
16436 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
16437
16438 * linux-low.c (linux_resume): Take a struct thread_resume *
16439 argument.
16440 (linux_wait): Update call.
16441 (resume_ptr): New static variable.
16442 (linux_continue_one_thread): Renamed from
16443 linux_continue_one_process. Use resume_ptr.
16444 (linux_resume): Use linux_continue_one_thread.
16445 * server.c (handle_v_cont, handle_v_requests): New functions.
16446 (myresume): New function.
16447 (main): Handle 'v' case.
16448 * target.h (struct thread_resume): New type.
16449 (struct target_ops): Change argument of "resume" to struct
16450 thread_resume *.
16451 (myresume): Delete macro.
16452
16453 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
16454
16455 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
16456 (uninstall): Support DESTDIR.
16457
16458 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
16459
16460 * configure.srv: Add xscale*linux copy of arm*linux entry.
16461
16462 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
16463
16464 * linux-arm-low.c (arm_reinsert_addr): New function.
16465 (the_low_target): Add arm_reinsert_addr.
16466
16467 2003-07-08 Mark Kettenis <kettenis@gnu.org>
16468
16469 * mem-break.c: Remove whitespace at end of file.
16470
16471 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
16472
16473 * configure.in: Check whether we need to prototype strerror.
16474 * server.h: Optionally prototype strerror.
16475 * gdbreplay.c (perror_with_name): Use strerror.
16476 * linux-low.c (linux_attach_lwp): Use strerror.
16477 * utils.c (perror_with_name): Use strerror.
16478 * config.in, configure: Regenerated.
16479
16480 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
16481
16482 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
16483 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
16484
16485 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
16486
16487 * Makefile.in (SFILES): Update.
16488 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
16489 low-sun3.c: Remove files.
16490
16491 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
16492
16493 * linux-low.c: Move comment to linux_thread_alive where it belonged.
16494 (linux_detach_one_process, linux_detach): New functions.
16495 (linux_target_ops): Add linux_detach.
16496 * server.c (main): Handle 'D' packet.
16497 * target.h (struct target_ops): Add "detach" member.
16498 (detach_inferior): Define.
16499
16500 2003-06-13 Mark Kettenis <kettenis@gnu.org>
16501
16502 From Kelley Cook <kelleycook@wideopenwest.com>:
16503 * configure.srv: Accept i[34567]86 variants.
16504
16505 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
16506
16507 * linux-low.c (linux_wait_for_event): Correct comment typos.
16508 (linux_resume_one_process): Call check_removed_breakpoint.
16509 (linux_send_signal): New function.
16510 (linux_target_ops): Add linux_send_signal.
16511 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
16512 of kill.
16513 * target.h (struct target_ops): Add send_signal.
16514
16515 2003-05-29 Jim Blandy <jimb@redhat.com>
16516
16517 * linux-low.c (usr_store_inferior_registers): Transfer buf in
16518 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
16519 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
16520 away part of the register's value.
16521
16522 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
16523
16524 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
16525 (linux_wait_for_event, linux_init_signals): Likewise.
16526
16527 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
16528
16529 * configure.in: Check for stdlib.h.
16530 * configure: Regenerated.
16531 * config.in: Regenerated.
16532
16533 2003-01-04 Andreas Schwab <schwab@suse.de>
16534
16535 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
16536
16537 2003-01-02 Andrew Cagney <ac131313@redhat.com>
16538
16539 * Makefile.in: Remove obsolete code.
16540
16541 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
16542
16543 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
16544 defined(PT_FPR0_HI).
16545
16546 2002-11-17 Stuart Hughes <seh@zee2.com>
16547
16548 * linux-arm-low.c (arm_num_regs): Increase.
16549 (arm_regmap): Include status register.
16550
16551 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
16552
16553 * linux-low.c (register_addr): Remove incorrect -1 check.
16554
16555 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
16556
16557 * linux-low.c (linux_create_inferior): Call setpgid. Return
16558 the new PID.
16559 (unstopped_p, linux_signal_pid): Remove.
16560 (linux_target_ops): Remove linux_signal_pid.
16561 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
16562 global instead of target method.
16563 * target.h (struct target_ops): Remove signal_pid. Update comment
16564 for create_inferior.
16565 * server.c (signal_pid): New variable.
16566 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
16567 gdbserver. Set the child to be the foreground process group.
16568 (attach_inferior): Set signal_pid.
16569
16570 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
16571
16572 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
16573
16574 2002-08-20 Jim Blandy <jimb@redhat.com>
16575
16576 * Makefile.in (LDFLAGS): Allow the configure script to establish a
16577 default for this.
16578
16579 2002-08-01 Andrew Cagney <cagney@redhat.com>
16580
16581 * Makefile.in: Make chill references obsolete.
16582
16583 2002-07-24 Kevin Buettner <kevinb@redhat.com>
16584
16585 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
16586 * configure: Regenerate.
16587 * config.in: Regenerate.
16588
16589 2002-07-09 David O'Brien <obrien@FreeBSD.org>
16590
16591 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
16592 (perror_with_name, remote_close, remote_open, expect, play): Static.
16593
16594 2002-07-04 Michal Ludvig <mludvig@suse.cz>
16595
16596 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
16597 byte offsets instead of an array of indexes.
16598 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
16599
16600 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
16601
16602 * regcache.c: Add comment.
16603
16604 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
16605
16606 * thread-db.c: New file.
16607 * proc-service.c: New file.
16608 * acinclude.m4: New file.
16609 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
16610 proc-service.o, and thread-db.o.
16611 (linux-low.o): Add USE_THREAD_DB.
16612 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
16613 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
16614 * aclocal.m4: Regenerated.
16615 * config.in: Regenerated.
16616 * configure: Regenerated.
16617 * configure.in: Check for proc_service.h, sys/procfs.h,
16618 thread_db.h, and linux/elf.h headrs.
16619 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
16620 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
16621 Check for -lthread_db and thread support.
16622 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
16623 PowerPC, and SuperH.
16624 * i387-fp.c: Constify arguments.
16625 * i387-fp.h: Likewise.
16626 * inferiors.c: (struct thread_info): Renamed from
16627 `struct inferior_info'. Remove PID member. Use generic inferior
16628 list header. All uses updated.
16629 (inferiors, signal_pid): Removed.
16630 (all_threads): New variable.
16631 (get_thread): Define.
16632 (add_inferior_to_list): New function.
16633 (for_each_inferior): New function.
16634 (change_inferior_id): New function.
16635 (add_inferior): Removed.
16636 (remove_inferior): New function.
16637 (add_thread): New function.
16638 (free_one_thread): New function.
16639 (remove_thread): New function.
16640 (clear_inferiors): Use for_each_inferior and free_one_thread.
16641 (find_inferior): New function.
16642 (find_inferior_id): New function.
16643 (inferior_target_data): Update argument type.
16644 (set_inferior_target_data): Likewise.
16645 (inferior_regcache_data): Likewise.
16646 (set_inferior_regcache_data): Likewise.
16647 * linux-low.c (linux_bp_reinsert): Remove.
16648 (all_processes, stopping_threads, using_thrads)
16649 (struct pending_signals, debug_threads, pid_of): New.
16650 (inferior_pid): Replace with macro.
16651 (struct inferior_linux_data): Remove.
16652 (get_stop_pc, add_process): New functions.
16653 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
16654 Use add_process and add_thread.
16655 (linux_attach_lwp): New function, based on old linux_attach. Use
16656 add_process and add_thread. Set stop_expected for new threads.
16657 (linux_attach): New function.
16658 (linux_kill_one_process): New function.
16659 (linux_kill): Kill all LWPs.
16660 (linux_thread_alive): Use find_inferior_id.
16661 (check_removed_breakpoints, status_pending_p): New functions.
16662 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
16663 Update. Use WNOHANG. Wait for cloned processes also. Update process
16664 struct for the found process.
16665 (linux_wait_for_event): New function.
16666 (linux_wait): Use it. Support LWPs.
16667 (send_sigstop, wait_for_sigstop, stop_all_processes)
16668 (linux_resume_one_process, linux_continue_one_process): New functions.
16669 (linux_resume): Support LWPs.
16670 (REGISTER_RAW_SIZE): Remove.
16671 (fetch_register): Use register_size instead. Call supply_register.
16672 (usr_store_inferior_registers): Likewise. Call collect_register.
16673 Fix recursive case.
16674 (regsets_fetch_inferior_registers): Improve error message.
16675 (regsets_store_inferior_registers): Add debugging.
16676 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
16677 (unstopped_p, linux_signal_pid): New functions.
16678 (linux_target_ops): Add linux_signal_pid.
16679 (linux_init_signals): New function.
16680 (initialize_low): Call it. Initialize using_threads.
16681 * regcache.c (inferior_regcache_data): Add valid
16682 flag.
16683 (get_regcache): Fetch registers lazily. Add fetch argument
16684 and update all callers.
16685 (regcache_invalidate_one, regcache_invalidate): New
16686 functions.
16687 (new_register_cache): Renamed from create_register_cache.
16688 Return the new regcache.
16689 (free_register_cache): Change argument to a void *.
16690 (registers_to_string, registers_from_string): Call get_regcache
16691 with fetch flag set.
16692 (register_data): Make static. Pass fetch flag to get_regcache.
16693 (supply_register): Call get_regcache with fetch flag clear.
16694 (collect_register): Call get_regcache with fetch flag set.
16695 (collect_register_as_string): New function.
16696 * regcache.h: Update.
16697 * remote-utils.c (putpkt): Flush after debug output and use
16698 stderr.
16699 Handle input interrupts while waiting for an ACK.
16700 (input_interrupt): Use signal_pid method.
16701 (getpkt): Flush after debug output and use stderr.
16702 (outreg): Use collect_register_as_string.
16703 (new_thread_notify, dead_thread_notify): New functions.
16704 (prepare_resume_reply): Check using_threads. Set thread_from_wait
16705 and general_thread.
16706 (look_up_one_symbol): Flush after debug output.
16707 * server.c (step_thread, server_waiting): New variables.
16708 (start_inferior): Don't use signal_pid. Update call to mywait.
16709 (attach_inferior): Update call to mywait.
16710 (handle_query): Handle qfThreadInfo and qsThreadInfo.
16711 (main): Don't fetch/store registers explicitly. Use
16712 set_desired_inferior. Support proposed ``Hs'' packet. Update
16713 calls to mywait.
16714 * server.h: Update.
16715 (struct inferior_list, struct_inferior_list_entry): New.
16716 * target.c (set_desired_inferior): New.
16717 (write_inferior_memory): Constify.
16718 (mywait): New function.
16719 * target.h: Update.
16720 (struct target_ops): New signal_pid method.
16721 (mywait): Removed macro, added prototype.
16722
16723 * linux-low.h (regset_func): Removed.
16724 (regset_fill_func, regset_store_func): New.
16725 (enum regset_type): New.
16726 (struct regset_info): Add type field. Use new operation types.
16727 (struct linux_target_ops): stop_pc renamed to get_pc.
16728 Add decr_pc_after_break and breakpoint_at.
16729 (get_process, get_thread_proess, get_process_thread)
16730 (strut process_info, all_processes, linux_attach_lwp)
16731 (thread_db_init): New.
16732
16733 * linux-arm-low.c (arm_get_pc, arm_set_pc,
16734 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
16735 (the_low_target): Add new members.
16736 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
16737 (i386_store_fpxregset): Constify.
16738 (target_regsets): Add new kind identifier.
16739 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
16740 (i386_set_pc): Add debugging.
16741 (i386_breakpoint_at): New function.
16742 (the_low_target): Add new members.
16743 * linux-mips-low.c (mips_get_pc, mips_set_pc)
16744 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
16745 (mips_breakpoint_at): New.
16746 (the_low_target): Add new members.
16747 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
16748 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
16749 (the_low_target): Add new members.
16750 * linux-sh-low.c (sh_get_pc, sh_set_pc)
16751 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
16752 (the_low_target): Add new members.
16753 * linux-x86-64-low.c (target_regsets): Add new kind
16754 identifier.
16755
16756 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
16757
16758 From Martin Pool <mbp@samba.org>:
16759 * server.c (gdbserver_usage): New function.
16760 (main): Call it.
16761
16762 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
16763
16764 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
16765 stop_at -> stop_pc.
16766
16767 2002-05-04 Andrew Cagney <ac131313@redhat.com>
16768
16769 * Makefile.in: Remove obsolete code.
16770
16771 2002-04-24 Michal Ludvig <mludvig@suse.cz>
16772
16773 * linux-low.c (regsets_fetch_inferior_registers),
16774 (regsets_store_inferior_registers): Removed cast to int from
16775 ptrace() calls.
16776 * regcache.h: Added declaration of struct inferior_info.
16777
16778 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
16779
16780 * inferiors.c (struct inferior_info): Add regcache_data.
16781 (add_inferior): Call create_register_cache.
16782 (clear_inferiors): Call free_register_cache.
16783 (inferior_regcache_data, set_inferior_regcache_data): New functions.
16784 * regcache.c (struct inferior_regcache_data): New.
16785 (registers): Remove.
16786 (get_regcache): New function.
16787 (create_register_cache, free_register_cache): New functions.
16788 (set_register_cache): Don't initialize the register cache here.
16789 (registers_to_string, registers_from_string, register_data): Call
16790 get_regcache.
16791 * regcache.h: Add prototypes.
16792 * server.h: Likewise.
16793
16794 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
16795
16796 * mem-break.c: New file.
16797 * mem-break.h: New file.
16798 * Makefile.in: Add mem-break.o rule; update server.h
16799 dependencies.
16800 * inferiors.c (struct inferior_info): Add target_data
16801 member.
16802 (clear_inferiors): Free target_data member if set.
16803 (inferior_target_data, set_inferior_target_data): New functions.
16804 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
16805 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
16806 * linux-low.c (linux_bp_reinsert): New variable.
16807 (struct inferior_linux_data): New.
16808 (linux_create_inferior): Use set_inferior_target_data.
16809 (linux_attach): Likewise. Call add_inferior.
16810 (linux_wait_for_one_inferior): New function.
16811 (linux_wait): Call it.
16812 (linux_write_memory): Add const.
16813 (initialize_low): Call set_breakpoint_data.
16814 * linux-low.h (struct linux_target_ops): Add breakpoint
16815 handling members.
16816 * server.c (attach_inferior): Remove extra add_inferior
16817 call.
16818 * server.h: Include mem-break.h. Update inferior.c
16819 prototypes.
16820 * target.c (read_inferior_memory)
16821 (write_inferior_memory): New functions.
16822 * target.h (read_inferior_memory)
16823 (write_inferior_memory): Change macros to prototypes.
16824 (struct target_ops): Update comments. Add const to write_memory
16825 definition.
16826
16827 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
16828
16829 * linux-low.c (usr_store_inferior_registers): Support
16830 registers which are allowed to fail to store.
16831 * linux-low.h (linux_target_ops): Likewise.
16832 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
16833 (ppc_cannot_store_register): FPSCR may not be storable.
16834
16835 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
16836
16837 * server.h: Include <string.h> if HAVE_STRING_H.
16838 * ChangeLog: Correct paths in last ChangeLog entry.
16839
16840 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
16841
16842 * linux-low.h: Remove obsolete prototypes.
16843 (struct linux_target_ops): New.
16844 (extern the_low_target): New.
16845 * linux-low.c (num_regs, regmap): Remove declarations.
16846 (register_addr): Use the_low_target explicitly.
16847 (fetch_register): Likewise.
16848 (usr_fetch_inferior_registers): Likewise.
16849 (usr_store_inferior_registers): Likewise.
16850 * linux-arm-low.c (num_regs): Remove.
16851 (arm_num_regs): Define.
16852 (arm_regmap): Renamed from regmap, made static.
16853 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
16854 made static.
16855 (arm_cannot_store_register): Renamed from cannot_store_register,
16856 made static.
16857 (the_low_target): New.
16858 * linux-i386-low.c (num_regs): Remove.
16859 (i386_num_regs): Define.
16860 (i386_regmap): Renamed from regmap, made static.
16861 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
16862 made static.
16863 (i386_cannot_store_register): Renamed from cannot_store_register,
16864 made static.
16865 (the_low_target): New.
16866 * linux-ia64-low.c (num_regs): Remove.
16867 (ia64_num_regs): Define.
16868 (ia64_regmap): Renamed from regmap, made static.
16869 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
16870 made static.
16871 (ia64_cannot_store_register): Renamed from cannot_store_register,
16872 made static.
16873 (the_low_target): New.
16874 * linux-m68k-low.c (num_regs): Remove.
16875 (m68k_num_regs): Define.
16876 (m68k_regmap): Renamed from regmap, made static.
16877 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
16878 made static.
16879 (m68k_cannot_store_register): Renamed from cannot_store_register,
16880 made static.
16881 (the_low_target): New.
16882 * linux-mips-low.c (num_regs): Remove.
16883 (mips_num_regs): Define.
16884 (mips_regmap): Renamed from regmap, made static.
16885 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
16886 made static.
16887 (mips_cannot_store_register): Renamed from cannot_store_register,
16888 made static.
16889 (the_low_target): New.
16890 * linux-ppc-low.c (num_regs): Remove.
16891 (ppc_num_regs): Define.
16892 (ppc_regmap): Renamed from regmap, made static.
16893 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
16894 made static.
16895 (ppc_cannot_store_register): Renamed from cannot_store_register,
16896 made static.
16897 (the_low_target): New.
16898 * linux-s390-low.c (num_regs): Remove.
16899 (s390_num_regs): Define.
16900 (s390_regmap): Renamed from regmap, made static.
16901 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
16902 made static.
16903 (s390_cannot_store_register): Renamed from cannot_store_register,
16904 made static.
16905 (the_low_target): New.
16906 * linux-sh-low.c (num_regs): Remove.
16907 (sh_num_regs): Define.
16908 (sh_regmap): Renamed from regmap, made static.
16909 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
16910 made static.
16911 (sh_cannot_store_register): Renamed from cannot_store_register,
16912 made static.
16913 (the_low_target): New.
16914 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
16915 (the_low_target): New.
16916
16917 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
16918
16919 * Makefile.in: Add stamp-h target.
16920 * configure.in: Create stamp-h.
16921 * configure: Regenerated.
16922
16923 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
16924
16925 * inferiors.c: New file.
16926 * target.c: New file.
16927 * target.h: New file.
16928 * Makefile.in: Add target.o and inferiors.o. Update
16929 dependencies.
16930 * linux-low.c (inferior_pid): New static variable,
16931 moved from server.c.
16932 (linux_create_inferior): Renamed from create_inferior.
16933 Call add_inferior. Return 0 on success instead of a PID.
16934 (linux_attach): Renamed from myattach.
16935 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
16936 (linux_thread_alive): Renamed from mythread_alive.
16937 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
16938 child dies.
16939 (linux_resume): Renamed from myresume. Add missing ``return 0''.
16940 (regsets_store_inferior_registers): Correct error message.
16941 Add missing ``return 0''.
16942 (linux_fetch_registers): Renamed from fetch_inferior_registers.
16943 (linux_store_registers): Renamed from store_inferior_registers.
16944 (linux_read_memory): Renamed from read_inferior_memory.
16945 (linux_write_memory): Renamed from write_inferior_memory.
16946 (linux_target_ops): New structure.
16947 (initialize_low): Call set_target_ops ().
16948 * remote-utils.c (unhexify): New function.
16949 (hexify): New function.
16950 (input_interrupt): Send signals to ``signal_pid''.
16951 * server.c (inferior_pid): Remove.
16952 (start_inferior): Update create_inferior call.
16953 (attach_inferior): Call add_inferior.
16954 (handle_query): New function.
16955 (main): Call handle_query for `q' packets.
16956 * server.h: Include "target.h". Remove obsolete prototypes.
16957 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
16958
16959 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
16960
16961 * Makefile.in: Add WARN_CFLAGS. Update configury
16962 dependencies.
16963 * configure.in: Check for <string.h>
16964 * configure: Regenerate.
16965 * config.in: Regenerate.
16966 * gdbreplay.c: Include needed system headers.
16967 (remote_open): Remove strchr prototype.
16968 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
16969 * regcache.c (supply_register): Change buf argument to const void *.
16970 (supply_register_by_name): Likewise.
16971 (collect_register): Change buf argument to void *.
16972 (collect_register_by_name): Likewise.
16973 * regcache.h: Add missing prototypes.
16974 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
16975 * server.c (handle_query): New function.
16976 (attached): New static variable, moved out of main.
16977 (main): Quiet longjmp clobber warnings.
16978 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
16979 * utils.c (error): Remove NORETURN.
16980 (fatal): Likewise.
This page took 0.361866 seconds and 5 git commands to generate.