Move duplicated code to common/gdb_proc_service.h
[deliverable/binutils-gdb.git] / gdb / gdbserver / ChangeLog
1 2018-10-01 Gary Benson <gbenson@redhat.com>
2
3 * gdb_proc_service.h: Moved common code to
4 common/gdb_proc_service.h.
5
6 2018-10-01 Gary Benson <gbenson@redhat.com>
7
8 * gdb_proc_service.h: Synchronize comments and whitespace with
9 GDB's version of this file.
10
11 2018-09-25 Tom Tromey <tom@tromey.com>
12
13 * configure: Rebuild.
14 * configure.ac (WARN_CFLAGS): Don't remove -Wmissing-prototypes.
15
16 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
17
18 * Makefile.in (gdbserver$(EXEEXT)): Sort OBS.
19 (gdbreplay$(EXEEXT)): Sort GDBREPLAY_OBS.
20 ($(IPA_LIB)): Sort IPA_OBJS.
21
22 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
23
24 * Makefile.in: Remove references to $(ADD_DEPS).
25
26 2018-09-16 Tom Tromey <tom@tromey.com>
27
28 * remote-utils.c (remote_open): Use GNU style for metasyntactic
29 variables.
30 * gdbreplay.c (gdbreplay_usage): Use GNU style for metasyntactic
31 variables.
32
33 2018-09-05 Tom Tromey <tom@tromey.com>
34
35 * configure: Rebuild.
36
37 2018-08-28 Simon Marchi <simon.marchi@polymtl.ca>
38
39 PR build/23399
40 * tracepoint.c (IPA_SYM_STRUCT_NAME): Define.
41
42 2018-08-27 Tom Tromey <tom@tromey.com>
43
44 PR build/23087:
45 * configure: Rebuild.
46
47 2018-08-27 Tom Tromey <tom@tromey.com>
48
49 * linux-s390-low.c (s390_emit_ext, s390_emit_litpool)
50 (s390_emit_const, s390_emit_reg, s390_emit_zero_ext)
51 (s390_emit_stack_adjust, s390_emit_set_r2, s390x_emit_ext)
52 (s390x_emit_const, s390x_emit_reg, s390x_emit_zero_ext)
53 (s390x_emit_stack_adjust): Add casts to unsigned char.
54
55 2018-08-22 Simon Marchi <simon.marchi@ericsson.com>
56
57 PR gdb/23374
58 PR gdb/23375
59 * server.h (struct client_state) <disable_randomization>:
60 Initialize to 1.
61
62 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
63
64 * linux-mips-low.c (mips_collect_ptrace_register): Remove unused
65 variable.
66 (mips_supply_ptrace_register): Likewise.
67
68 2018-07-22 Tom Tromey <tom@tromey.com>
69
70 * configure: Rebuild.
71
72 2018-07-22 Tom Tromey <tom@tromey.com>
73
74 * win32-low.c (win32_create_inferior): Remove unused variables.
75 * gdbreplay.c (remote_open): Remove unused variable.
76 * remote-utils.c (remote_prepare): Remove unused variable.
77 * x86-tdesc.h (X86_TDESC_H): Define.
78 (amd64_expedite_regs): Define conditionally.
79 (i386_expedite_regs): Mark ATTRIBUTE_UNUSED.
80 * linux-x86-tdesc.c (i386_tdescs): Move inside #if.
81 * remote-utils.c (readchar): Remove unused variable.
82
83 2018-07-13 Pedro Alves <palves@redhat.com>
84
85 * linux-low.c (linux_kill): Change parameter to process_info
86 pointer instead of pid. Adjust.
87 * lynx-low.c (lynx_kill): Likewise.
88 * nto-low.c (nto_kill): Likewise.
89 * spu-low.c (spu_kill): Likewise.
90 * win32-low.c (win32_kill): Likewise.
91 * server.c (handle_v_kill, kill_inferior_callback)
92 (detach_or_kill_for_exit): Adjust.
93 * target.c (kill_inferior): Change parameter to process_info
94 pointer instead of pid. Adjust.
95 * target.h (struct target_ops) <kill>: Change parameter to
96 process_info pointer instead of pid. Adjust all implementations
97 and callers.
98 (kill_inferior): Likewise.
99
100 2018-07-13 Pedro Alves <palves@redhat.com>
101
102 * linux-low.c (linux_detach, linux_join): Change parameter to
103 process_info pointer instead of pid. Adjust.
104 * lynx-low.c (lynx_detach, lynx_join): Likewise.
105 * nto-low.c (nto_detach): Likewise.
106 * spu-low.c (spu_detach, spu_join): Likewise.
107 * win32-low.c (win32_detach, win32_join): Likewise.
108 * server.c (handle_detach, detach_or_kill_for_exit): Adjust.
109 * target.h (struct target_ops) <detach, join>: Change parameter to
110 process_info pointer instead of pid. Adjust all implementations
111 and callers.
112 (detach_inferior, join_inferior): Rename 'pid' parameter to
113 'proc'.
114
115 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
116 Jan Kratochvil <jan.kratochvil@redhat.com>
117 Paul Fertser <fercerpav@gmail.com>
118 Tsutomu Seki <sekiriki@gmail.com>
119
120 * Makefile.in (SFILES): Add '$(srcdir)/common/netstuff.c'.
121 (OBS): Add 'common/netstuff.o'.
122 (GDBREPLAY_OBS): Likewise.
123 * gdbreplay.c: Include 'wspiapi.h' and 'netstuff.h'.
124 (remote_open): Implement support for IPv6
125 connections.
126 * remote-utils.c: Include 'netstuff.h', 'filestuff.h'
127 and 'wspiapi.h'.
128 (handle_accept_event): Accept connections from IPv6 sources.
129 (remote_prepare): Handle IPv6-style hostnames; implement
130 support for IPv6 connections.
131 (remote_open): Implement support for printing connections from
132 IPv6 sources.
133
134 2018-07-11 Pedro Alves <palves@redhat.com>
135
136 PR gdb/23377
137 * mem-break.c (any_persistent_commands): Add process_info
138 parameter and use it instead of relying on the current process.
139 Change return type to bool.
140 * mem-break.h (any_persistent_commands): Add process_info
141 parameter and change return type to bool.
142 * server.c (handle_detach): Remove require_running_or_return call.
143 Look up the process_info for the process we're about to detach.
144 If not found, return back error to GDB. Adjust
145 any_persistent_commands call to pass down a process pointer.
146
147 2018-07-11 Pedro Alves <palves@redhat.com>
148
149 * i387-fp.c (i387_cache_to_fsave, cache_to_fxsave)
150 (i387_cache_to_xsave): Use regcache_raw_get_unsigned_by_name
151 instead of collect_register_by_name.
152 * regcache.c (regcache_raw_get_unsigned_by_name): New.
153 * regcache.h (regcache_raw_get_unsigned_by_name): New.
154
155 2018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
156 Pedro Alves <palves@redhat.com>
157
158 * linux-low.c (initialize_low): Call linux_proc_init_warnings.
159
160 2018-07-03 Tom Tromey <tom@tromey.com>
161
162 * linux-low.c: Update.
163 * lynx-low.c: Update.
164 * mem-break.c: Update.
165 * nto-low.c: Update.
166 * remote-utils.c: Update.
167 * server.c: Update.
168 * spu-low.c: Update.
169 * target.c: Update.
170 * win32-low.c: Update.
171
172 2018-07-03 Tom Tromey <tom@tromey.com>
173
174 * server.c: Update.
175
176 2018-07-03 Tom Tromey <tom@tromey.com>
177
178 * linux-low.c: Update.
179
180 2018-07-03 Tom Tromey <tom@tromey.com>
181
182 * target.c: Update.
183
184 2018-07-03 Tom Tromey <tom@tromey.com>
185
186 * linux-low.c: Update.
187 * linux-mips-low.c: Update.
188 * lynx-low.c: Update.
189 * nto-low.c: Update.
190 * remote-utils.c: Update.
191 * server.c: Update.
192 * spu-low.c: Update.
193 * target.c: Update.
194 * thread-db.c: Update.
195
196 2018-07-03 Tom Tromey <tom@tromey.com>
197
198 * linux-low.c: Update.
199 * linux-mips-low.c: Update.
200 * lynx-low.c: Update.
201 * mem-break.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 * tracepoint.c: Update.
208
209 2018-07-03 Tom Tromey <tom@tromey.com>
210
211 * linux-low.c: Update.
212 * linux-ppc-low.c: Update.
213 * linux-x86-low.c: Update.
214 * proc-service.c: Update.
215 * server.c: Update.
216 * spu-low.c: Update.
217 * thread-db.c: Update.
218 * win32-low.c: Update.
219
220 2018-07-03 Tom Tromey <tom@tromey.com>
221
222 * linux-low.c: Update.
223 * lynx-low.c: Update.
224 * nto-low.c: Update.
225 * remote-utils.c: Update.
226 * spu-low.c: Update.
227 * thread-db.c: Update.
228 * win32-low.c: Update.
229
230 2018-06-29 Joel Brobecker <brobecker@adacore.com>
231
232 * linux-x86-tdesc.c (amd64_linux_read_description): Add missing
233 parameter in call to 'amd64_create_target_description'.
234
235 2018-06-28 Jan Kratochvil <jan.kratochvil@redhat.com>
236
237 * x86-tdesc.h: Remove executable permission flag.
238
239 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
240
241 * configure.ac: Remove AC_PREREQ, add missing quoting.
242 * configure: Re-generate.
243 * config.in: Re-generate.
244 * aclocal.m4: Re-generate.
245
246 2018-06-18 Simon Marchi <simon.marchi@ericsson.com>
247
248 * tracepoint.h (current_traceframe): Remove declaration.
249
250 2018-06-18 Alan Hayward <alan.hayward@arm.com>
251
252 * linux-aarch64-low.c (is_sve_tdesc): New function.
253 (aarch64_sve_regs_copy_to_regcache): Likewise.
254 (aarch64_sve_regs_copy_from_regcache): Likewise.
255 (aarch64_regs_info): Add SVE checks.
256 (initialize_low_arch): Initialize SVE.
257
258 2018-06-18 Alan Hayward <alan.hayward@arm.com>
259
260 * Makefile.in: Add aarch64-sve-linux-ptrace.c.
261
262 2018-06-11 Alan Hayward <alan.hayward@arm.com>
263
264 * linux-aarch64-ipa.c (get_ipa_tdesc): Add null VQ param.
265 (initialize_low_tracepoint): Likewise
266 * linux-aarch64-low.c (aarch64_arch_setup): Get VQ.
267 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Add null VQ
268 param.
269 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add VQ
270 checks.
271 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Add VQ.
272
273 2018-06-11 Alan Hayward <alan.hayward@arm.com>
274
275 * server.h (PBUFSIZ): Increase size
276
277 2018-06-11 Alan Hayward <alan.hayward@arm.com>
278
279 * regcache.c (regcache::raw_compare): New function.
280 * regcache.h (regcache::raw_compare): New declaration.
281
282 2018-06-11 Alan Hayward <alan.hayward@arm.com>
283
284 * regcache.c (new_register_cache): Use new.
285 (free_register_cache): Use delete.
286 (register_data): Use const.
287 (supply_register): Move body inside regcache.
288 (regcache::raw_supply): New override function.
289 (collect_register): Move body inside regcache.
290 (regcache::raw_collect): New override function.
291 (regcache::get_register_status): New override function.
292 * regcache.h (struct regcache): Inherit from reg_buffer_common.
293
294 2018-06-09 Tom Tromey <tom@tromey.com>
295
296 * event-loop.c (gdb_event, gdb_event_p): Remove typedefs. Don't
297 declare queue.
298 (event_queue): Use std::queue.
299 (gdb_event_xfree): Remove.
300 (initialize_event_loop, process_event, wait_for_event): Update.
301
302 2018-06-08 Stan Cox <scox@redhat.com>
303
304 * win32-low.c (win32_create_inferior): last_ptid and last_status
305 moved to client_state.
306
307 2018-06-08 Pedro Alves <palves@redhat.com>
308
309 * Makefile.in (GDBREPLAY_OBS): Add common/cleanups.o,
310 common/common-exceptions.o, common/common-utils.o,
311 common/errors.o, common/print-utils.o and utils.o.
312 * gdbreplay.c: Include "common-defs.h" instead of the two
313 'config.h's here. Don't include stdio.h, errno.h, stdlib.h,
314 string.h or alloca.h.
315 (perror_with_name): Delete.
316 (remote_open): Use xstrdup instead of strdup.
317 (main): Rename to ...
318 (captured_main): ... this.
319 (main): New.
320
321 2018-06-08 Tom Tromey <tom@tromey.com>
322
323 * linux-low.c (linux_low_read_btrace): Update.
324
325 2018-06-04 Stan Cox <scox@redhat.com>
326
327 * server.h (struct client_state): New.
328 * server.c (cont_thread, general_thread, multi_process)
329 (report_fork_events, report_vfork_events, report_exec_events)
330 (report_thread_events, swbreak_feature, hwbreak_feature)
331 (vCont_supported, disable_randomization, pass_signals)
332 (program_signals, program_signals_p, last_status, last_ptid, own_buf):
333 Moved to client_state.
334 * remote-utils.c (remote_debug, noack_mode)
335 (transport_is_reliable): Moved to client_state.
336 * tracepoint.c (current_traceframe): Moved to client_state.
337
338 Update all callers.
339 * server.c, remote-utils.c, tracepoint.c, fork-child.c,
340 linux-low.c, remote-utils.h, target.c: Use client_state.
341
342 2018-05-31 Alan Hayward <alan.hayward@arm.com>
343
344 * configure.srv: Add new c/h file.
345
346 2018-05-31 Alan Hayward <alan.hayward@arm.com>
347
348 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add
349 null VQ.
350
351 2018-05-25 Maciej W. Rozycki <macro@mips.com>
352
353 * gdb.arch/mips-fpregset-core.exp: New test.
354 * gdb.arch/mips-fpregset-core.c: New test source.
355
356 2018-05-23 Erik Kurzinger <ekurzinger@nvidia.com>
357
358 PR server/23198
359 * hostio.c (require_int): Do not report overflow for integers
360 between 0xfffffff and 0x7fffffff.
361
362 2018-05-22 Maciej W. Rozycki <macro@mips.com>
363
364 * linux-mips-low.c [HAVE_PTRACE_GETREGS] (mips_collect_register)
365 (mips_supply_register): Move outside HAVE_PTRACE_GETREGS.
366 (mips_collect_ptrace_register, mips_supply_ptrace_register): New
367 functions.
368 (the_low_target): Wire them.
369
370 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
371
372 * linux-ppc-low.c (ppc_fill_vrregset): Add vscr_offset variable.
373 Set vscr_offset to 0 in little-endian mode and 12 in big-endian
374 mode. Call collect_register_by_name with vscr using
375 vscr_offset. Zero-pad vscr and vrsave fields in collector buffer.
376 (ppc_store_vrregset): Add and set vscr_offset variable as in
377 ppc_fill_vrregset. Call supply_register_by_name with vscr using
378 vscr_offset.
379
380 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
381
382 * linux-ppc-low.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
383 (ppc_arch_setup): Change SIZEOF_VRREGS and SIZEOF_VSXREGS to
384 PPC_LINUX_SIZEOF_VRREGSET and PPC_LINUX_SIZEOF_VSXREGSET.
385
386 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
387
388 * linux-ppc-low.c (ppc_fill_vsxregset): Remove ppc_hwcap check.
389 (ppc_store_vsxregset): Likewise.
390 (ppc_fill_vrregset): Likewise.
391 (ppc_store_vrregset): Likewise.
392 (ppc_fill_evrregset): Likewise.
393 (ppc_store_evrregset): Likewise.
394 (ppc_regsets): Set VSX/VR/EVR regset sizes to 0.
395 (ppc_arch_setup): Iterate through ppc_regsets and set sizes when
396 needed.
397
398 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
399
400 * linux-ppc-low.c (ppc_arch_setup): Remove code for getting the
401 wordsize of the inferior. Call ppc_linux_target_wordsize.
402
403 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
404
405 * configure.srv (srv_tgtobj): Add arch/ppc-linux-common.o.
406 * Makefile.in (SFILES): Add arch/ppc-linux-common.c.
407 * linux-ppc-tdesc.h: Rename to linux-ppc-tdesc-init.h.
408 * linux-ppc-tdesc-init.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
409 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
410 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
411 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
412 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
413 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
414 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
415 (tdesc_powerpc_e500l): Remove.
416 * linux-ppc-ipa.c: Include arch/ppc-linux-tdesc.h and
417 linux-ppc-tdesc-init.h. Don't include linux-ppc-tdesc.h.
418 * linux-ppc-low.c: Include arch/ppc-linux-common.h,
419 arch/ppc-linux-tdesc.h, and linux-ppc-tdesc-init.h. Don't include
420 linux-ppc-tdesc.h.
421 (ppc_arch_setup): Remove target description matching code. Fill a
422 ppc_linux_features struct and call ppc_linux_match_description
423 with it.
424
425 2018-05-22 Maciej W. Rozycki <macro@mips.com>
426
427 * linux-mips-low.c (mips_cannot_fetch_register): Return 1 if the
428 width of the requested register exceeds the width of the
429 `ptrace' data type.
430 (mips_cannot_store_register): Likewise.
431
432 2018-05-21 Maciej W. Rozycki <macro@mips.com>
433
434 * linux-mips-low.c (mips_fetch_register): New function. Update
435 preceding comment.
436 (mips_store_gregset): Supply 0 rather than $restart for $zero.
437 (the_low_target): Wire `mips_fetch_register'.
438
439 2018-05-10 Joel Brobecker <brobecker@adacore.com>
440
441 * lynx-i386-low.c (LYNXOS_178): New macro.
442 [LYNXOS_178] (usr_fcontext_t): Provide a definition that matches
443 the layout on LynxOS-178.
444 (lynx_i386_fill_fpregset, lynx_i386_store_fpregset): Do not
445 handle floating point registers that are not supported by
446 LynxOS-178.
447
448 2018-05-10 Tom Tromey <tom@tromey.com>
449
450 * configure: Rebuild.
451
452 2018-05-10 Joel Brobecker <brobecker@adacore.com>
453
454 PR server/23158:
455 * tdesc.h (init_target_desc) <expedite_regs>: New parameter.
456 * tdesc.c (init_target_desc) <expedite_regs>: New parameter.
457 Use it to set the expedite_regs field in the given tdesc.
458 * x86-tdesc.h: New file.
459 * linux-aarch64-tdesc.c (aarch64_linux_read_description):
460 Adjust following the addition of the new expedite_regs parameter
461 to init_target_desc.
462 * linux-tic6x-low.c (tic6x_read_description): Likewise.
463 * linux-x86-tdesc.c: #include "x86-tdesc.h".
464 (i386_linux_read_description, amd64_linux_read_description):
465 Adjust following the addition of the new expedite_regs parameter
466 to init_target_desc.
467 * lynx-i386-low.c: #include "x86-tdesc.h".
468 (lynx_i386_arch_setup): Adjust following the addition of the new
469 expedite_regs parameter to init_target_desc.
470 * nto-x86-low.c: #include "x86-tdesc.h".
471 (nto_x86_arch_setup): Adjust following the addition of the new
472 expedite_regs parameter to init_target_desc.
473 * win32-i386-low.c: #include "x86-tdesc.h".
474 (i386_arch_setup): Adjust following the addition of the new
475 expedite_regs parameter to init_target_desc.
476
477 2018-05-10 Joel Brobecker <brobecker@adacore.com>
478
479 PR server/23158:
480 * win32-low.c (win32_create_inferior): Add call to my_wait
481 setting last_status global.
482
483 2018-05-10 Joel Brobecker <brobecker@adacore.com>
484
485 PR server/23158:
486 * win32-low.c (create_process): Only call gdb_tilde_expand if
487 inferior_cwd is not NULL.
488
489 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
490
491 * i387-fp.c (i387_cache_to_xsave): Only write x87 control
492 registers to the cache if their values have changed.
493 (i387_xsave_to_cache): Provide default values for x87 control
494 registers when these features are available, but disabled.
495 * regcache.c (supply_register_by_name_zeroed): New function.
496 * regcache.h (supply_register_by_name_zeroed): Declare new
497 function.
498
499 2018-05-07 Tom Tromey <tom@tromey.com>
500
501 * configure: Rebuild.
502
503 2018-05-04 Tom Tromey <tom@tromey.com>
504
505 * configure: Rebuild.
506
507 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
508 Pedro Alves <palves@redhat.com>
509
510 * linux-aarch64-low.c (aarch64_stopped_data_address):
511 Likewise.
512
513 2018-04-27 Tom Tromey <tom@tromey.com>
514
515 * configure: Rebuild.
516
517 2018-04-23 Tom Tromey <tom@tromey.com>
518
519 * configure: Rebuild.
520
521 2018-04-19 Simon Marchi <simon.marchi@ericsson.com>
522
523 * Makefile.in (depcomp): Add "..".
524 (all_deps_files): New and use it.
525
526 2018-04-18 Alan Hayward <alan.hayward@arm.com>
527
528 * configure.srv (aarch64*-*-linux*): Don't include xml.
529 (i[34567]86-*-cygwin*): Likewise.
530 (i[34567]86-*-linux*): Likewise.
531 (i[34567]86-*-lynxos*): Likewise.
532 (i[34567]86-*-mingw32ce*): Likewise.
533 (i[34567]86-*-mingw*): Likewise.
534 (i[34567]86-*-nto*): Likewise.
535 (tic6x-*-uclinux): Likewise.
536 (x86_64-*-linux*): Likewise.
537 (x86_64-*-mingw*): Likewise.
538 (x86_64-*-cygwin*): Likewise.
539
540 2018-04-18 Alan Hayward <alan.hayward@arm.com>
541
542 * tdesc.c: Remove xml parameter.
543
544 2018-04-18 Alan Hayward <alan.hayward@arm.com>
545
546 * server.c (get_features_xml): Remove cast.
547 * tdesc.c (void target_desc::accept): Fill in function.
548 (tdesc_get_features_xml): Remove old xml creation.
549 (print_xml_feature::visit_pre): Add xml vistor.
550 * tdesc.h (struct target_desc): Make xmltarget mutable.
551 (tdesc_get_features_xml): Remove declaration.
552
553 2018-04-18 Alan Hayward <alan.hayward@arm.com>
554
555 * tdesc.c (tdesc_architecture_name): Add new function.
556 (tdesc_osabi_name): Likewise.
557 (tdesc_get_features_xml): Use new functions.
558
559 2018-04-18 Alan Hayward <alan.hayward@arm.com>
560
561 * tdesc.c (tdesc_create_flags): Remove.
562 (tdesc_add_flag): Likewise.
563 (tdesc_named_type): Likewise.
564 (tdesc_create_union): Likewise.
565 (tdesc_create_struct): Likewise.
566 (tdesc_create_vector): Likewise.
567 (tdesc_add_bitfield): Likewise.
568 (tdesc_add_field): Likewise.
569 (tdesc_set_struct_size): Likewise.
570
571 2018-04-18 Alan Hayward <alan.hayward@arm.com>
572
573 * tdesc.c (~target_desc): Remove implictly deleted items.
574 (init_target_desc): Iterate all features.
575 (tdesc_get_features_xml): Use vector.
576 (tdesc_create_feature): Create feature.
577 * tdesc.h (tdesc_feature) Remove
578 (target_desc): Add features.
579
580 2018-04-18 Alan Hayward <alan.hayward@arm.com>
581
582 * Makefile.in: Add common/tdesc.c
583 * tdesc.c (init_target_desc): init all reg_defs from register
584 vector.
585 (tdesc_create_reg): Create tdesc_reg.
586 * tdesc.h (tdesc_feature): Add register vector.
587
588 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
589
590 * tdesc.h (struct target_desc) <features>: Change type to
591 std::vector<std::string>.
592 * tdesc.c (target_desc::~target_desc): Adjust to std::vector
593 changes.
594 (tdesc_get_features_xml): Likewise.
595 (tdesc_create_feature): Likewise.
596
597 2018-03-26 Alan Hayward <alan.hayward@arm.com>
598
599 * regcache.c (find_register_by_number): Return a ref.
600 (find_regno): Use references.
601 (register_size): Likewise.
602 (register_data): Likewise.
603 * tdesc.c (target_desc::~target_desc): Remove free calls.
604 (target_desc::operator==): Use std::vector compare.
605 (init_target_desc): Use reference.
606 (tdesc_create_reg): Use reg constructors.
607 * tdesc.h (struct target_desc): Replace pointer with object.
608
609 2018-03-23 Alan Hayward <alan.hayward@arm.com>
610
611 * regcache.c (find_register_by_number): Make static.
612 (find_regno): Use find_register_by_number
613 * regcache.h (struct reg): Remove declaration.
614
615 2018-03-23 Alan Hayward <alan.hayward@arm.com>
616
617 * tdesc.c (target_desc::~target_desc): Move to here.
618 (target_desc::operator==): Likewise.
619 * tdesc.h (target_desc::~target_desc): Move from here.
620 (target_desc::operator==): Likewise.
621
622 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
623
624 * linux-s390-low.c (s390_get_wordsize): Correct brace style.
625
626 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
627
628 * linux-s390-ipa.c (get_ipa_tdesc): Add handling for
629 S390_TDESC_GS.
630 * linux-s390-low.c (s390_get_ipa_tdesc_idx): Likewise.
631 (initialize_low_tracepoint): Call init_registers_s390x_gs_linux64
632 and init_registers_s390_gs_linux64.
633
634 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
635
636 * linux-s390-low.c (s390_fill_gs): Remove function.
637 (s390_fill_gsbc): Remove function.
638 (s390_regsets): Set fill functions for the guarded storage regsets
639 to NULL.
640
641 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
642
643 * linux-s390-low.c (s390_get_hwcap): Replace tdesc parameter by
644 the word size. Add comment.
645 (s390_get_wordsize): New function.
646 (s390_arch_setup): No longer select a temporary tdesc to fetch the
647 pswm with it. Instead, use s390_get_wordsize to determine the
648 word size first and derive the correct tdesc from that directly.
649
650 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
651
652 * Makefile.in: Include silent-rules.mk.
653 (srcdir, abs_top_srcdir, abs_srcdir, VPATH): Move up.
654 (COMPILE): Add ECHO_CXX.
655 (gdbserver$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
656 (gdbreplay$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
657 ($(IPA_LIB)): Add SILENCE and ECHO_CXXLD.
658 (version-generated.c): Add ECHO_GEN.
659 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN_GENERATED.
660 (IPAGENT_COMPILE): Add ECHO_CXX.
661 (%-generated.c): Add ECHO_REGDAT.
662
663 2018-03-14 Tom Tromey <tom@tromey.com>
664
665 PR cli/14977:
666 * ax.c (ax_printf): Special case for NULL.
667
668 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
669
670 * linux-low.c (linux_qxfer_libraries_svr4): Use
671 xml_escape_text_append.
672
673 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
674
675 * linux-low.c (linux_qxfer_libraries_svr4): Use std::string.
676
677 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
678
679 * server.c (handle_general_set): Remove unnecessary xstrdup.
680
681 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
682
683 * server.c (parse_debug_format_options): Adjust to
684 delim_string_to_char_ptr_vec changes.
685 * thread-db.c (thread_db_load_search): Adjust to
686 dirnames_to_char_ptr_vec changes.
687
688 2018-03-01 Markus Metzger <markus.t.metzger@intel.com>
689
690 * target.h (target_enable_btrace, target_disable_btrace)
691 (target_read_btrace, target_read_btrace_conf): Turn macro into
692 inline function. Throw error if target method is not defined.
693 * server.c (handle_qxfer_btrace handle_qxfer_btrace_conf): Remove
694 check for btrace target method. Be prepared to handle exceptions
695 from btrace target methods.
696
697 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
698
699 * server.c (captured_main): Change order of error message printed
700 when the current working directory cannot be found.
701
702 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
703
704 * server.c: Include "filenames.h" and "pathstuff.h".
705 (program_name): Delete variable.
706 (program_path): New anonymous class.
707 (get_exec_wrapper): Use "program_path" instead of
708 "program_name".
709 (handle_v_run): Likewise.
710 (captured_main): Likewise.
711 (process_serial_event): Likewise.
712
713 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
714
715 * Makefile.in (SFILES): Add "$(srcdir)/common/pathstuff.c".
716 (OBJS): Add "pathstuff.o".
717 * server.c (current_directory): New global variable.
718 (captured_main): Initialize "current_directory".
719
720 2018-02-26 Alan Hayward <alan.hayward@arm.com>
721
722 * tdesc.c: Use common/tdesc.h.
723 * tdesc.h: Likewise.
724
725 2018-02-20 Alan Hayward <alan.hayward@arm.com>
726 Simon Marchi <simon.marchi@ericsson.com>
727
728 * Makefile.in: Switch order of make rules.
729
730 2018-02-19 Alan Hayward <alan.hayward@arm.com>
731
732 * Makefile.in: Add common directory in build.
733 * configure.ac: Add common reference.
734 * configure: Regenerate.
735
736 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
737
738 * linux-low.c (linux_target_ops): Remove linux_supports_btrace.
739 * nto-low.c (nto_target_ops): Remove NULL for supports_btrace.
740 * spu-low.c (spu_target_ops): Likewise.
741 * win32-low.c (win32_target_ops): Likewise.
742 * server.c (supported_btrace_packets): Report packets unconditionally.
743 * target.h (target_ops) <supports_btrace>: Remove.
744 (target_supports_btrace): Remove.
745
746 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
747
748 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt)
749 (handle_btrace_disable): Change return type to void. Use exceptions
750 to report errors.
751 (handle_btrace_general_set): Catch exception and copy message to
752 return message.
753
754 2018-02-08 Tom Tromey <tom@tromey.com>
755
756 * linux-low.c (install_software_single_step_breakpoints): Use
757 make_scoped_restore.
758 * inferiors.c (make_cleanup_restore_current_thread): Remove.
759 (do_restore_current_thread_cleanup): Remove.
760 * gdbthread.h (make_cleanup_restore_current_thread): Don't
761 declare.
762
763 2018-02-08 Tom Tromey <tom@tromey.com>
764
765 * mem-break.c (set_raw_breakpoint_at): Use
766 gdb::unique_xmalloc_ptr.
767
768 2018-01-30 Pedro Alves <palves@redhat.com>
769
770 PR gdb/13211
771 * target.c (target_terminal::terminal_state): Rename to ...
772 (target_terminal::m_terminal_state): ... this.
773
774 2018-01-19 James Clarke <jrtc27@jrtc27.com>
775
776 * linux-low.c (handle_extended_wait): Surround call to
777 thread_db_notice_clone with #ifdef USE_THREAD_DB.
778
779 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
780
781 * linux-low.c (attach_proc_task_lwp_callback): Adjust to
782 linux_ptrace_attach_fail_reason_string now returning an
783 std::string.
784 (linux_attach): Likewise.
785 * thread-db.c (attach_thread): Likewise.
786
787 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
788
789 PR gdb/21559
790 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
791 checking for fs_base/gs_base fields in struct user_regs_struct.
792 * configure: Regenerate.
793
794 2018-01-16 Yao Qi <yao.qi@linaro.org>
795
796 PR gdb/18749
797 * linux-low.c (fetch_register): Call supply_register instead of
798 error.
799
800 2018-01-08 Yao Qi <yao.qi@linaro.org>
801 Simon Marchi <simon.marchi@ericsson.com>
802
803 * Makefile.in (OBS): Remove selftest.o.
804 * configure.ac: Set srv_selftest_objs if $development is true.
805 (GDBSERVER_DEPFILES): Append $srv_selftest_objs.
806 * configure: Re-generated.
807 * server.c (captured_main): Wrap variable selftest_filter with
808 GDB_SELF_TEST.
809
810 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
811
812 * server.c (parse_debug_format_options): Return std::string.
813 (handle_monitor_command, captured_main): Adjust.
814
815 2018-01-05 Pedro Alves <palves@redhat.com>
816
817 PR gdb/18653
818 * server.c (captured_main): Pass quiet=false to
819 save_original_signals_state.
820
821 2018-01-01 Joel Brobecker <brobecker@adacore.com>
822
823 * gdbreplay.c (gdbreplay_version): Update copyright year in
824 version message.
825 * server.c (gdbserver_version): Likewise.
826
827 2017-12-08 Tom Tromey <tom@tromey.com>
828
829 * ax.c (ax_printf): Update.
830
831 2017-12-07 Yao Qi <yao.qi@linaro.org>
832
833 * linux-aarch64-ipa.c (initialize_low_tracepoint): Call
834 aarch64_linux_read_description.
835 * linux-amd64-ipa.c (idx2mask): New array.
836 (get_ipa_tdesc): Move idx2mask out.
837 (initialize_low_tracepoint): Initialize target descriptions.
838 * linux-i386-ipa.c (idx2mask): New array.
839 (get_ipa_tdesc): Move idx2mask out.
840 (initialize_low_tracepoint): Initialize target descriptions.
841
842 2017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
843
844 * tdesc.c (struct tdesc_type): Change return type.
845 (tdesc_add_flag): Change parameter type.
846 (tdesc_add_bitfield): Likewise.
847 (tdesc_add_field): Likewise.
848 (tdesc_set_struct_size): Likewise.
849
850 2017-12-05 Simon Marchi <simon.marchi@ericsson.com>
851
852 * regcache.c (registers_to_string): Remove unused variable.
853
854 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
855
856 * inferiors.c (for_each_inferior_with_data): Remove.
857 * inferiors.h (for_each_inferior_with_data): Remove.
858 * server.c (handle_qxfer_threads_worker): Change parameter type.
859 (handle_qxfer_threads_proper): Use for_each_thread.
860
861 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
862
863 * inferiors.c (for_each_inferior): Remove.
864 (clear_inferiors): Use for_each_thread.
865 * inferiors.h (for_each_inferior): Remove.
866 * linux-low.c (linux_wait_for_event_filtered): Use
867 for_each_thread.
868 (linux_stabilize_threads): Likewise.
869 * regcache.c (regcache_release): Likewise.
870 * server.c (gdb_wants_all_threads_stopped): Likewise.
871 (clear_pending_status_callback): Remove.
872 (handle_status): Use for_each_thread.
873 (captured_main): Likewise.
874 * win32-low.c (child_init_thread_list): Likewise.
875 (win32_clear_inferiors): Likewise.
876 (fake_breakpoint_event): Likewise.
877
878 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
879
880 * inferiors.h (find_inferior): Remove.
881 * inferiors.c (find_inferior): Remove.
882
883 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
884
885 * linux-low.c (resume_status_pending_p): Update comment.
886 (need_step_over_p): Update comment.
887
888 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
889
890 * linux-low.c (proceed_one_lwp): Return void, change parameter
891 type.
892 (unsuspend_and_proceed_one_lwp): Likewise.
893 (proceed_all_lwps): Use for_each_thread.
894 (unstop_all_lwps): Likewise.
895
896 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
897
898 * linux-low.c (linux_resume_one_thread): Return void, take
899 parameter directly.
900 (linux_resume): Use for_each_thread.
901
902 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
903
904 * linux-low.c (send_sigstop_callback): Return void, change
905 parameter type. Rename to...
906 (send_sigstop): ... this.
907 (suspend_and_send_sigstop_callback): Return void, change parameter
908 type. Rename to...
909 (suspend_and_send_sigstop): ... this.
910 (stop_all_lwps): Use for_each_thread.
911
912 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
913
914 * linux-low.c (lwp_running): Return bool, remove unused
915 argument.
916 (linux_stabilize_threads): Use find_thread.
917
918 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
919
920 * linux-low.c (select_singlestep_lwp_callback): Remove.
921 (count_events_callback): Remove.
922 (select_event_lwp_callback): Remove.
923 (select_event_lwp): Use find_thread/for_each_thread.
924
925 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
926
927 * linux-low.c (not_stopped_callback): Return bool, take filter
928 argument directly.
929 (linux_wait_for_event_filtered): Use find_thread.
930 (linux_wait_1): Likewise.
931
932 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
933
934 * linux-low.c (same_lwp): Remove.
935 (find_lwp_pid): Use find_thread.
936
937 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
938
939 * linux-low.c (delete_lwp_callback): Remove.
940 (linux_mourn): Use for_each_thread.
941
942 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
943
944 * linux-low.c (linux_detach_lwp_callback): Return void, remove
945 args parameter, don't check for pid.
946 (linux_detach): Use for_each_thread.
947
948 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
949
950 * linux-low.c (struct counter): Remove.
951 (second_thread_of_pid_p): Remove.
952 (last_thread_of_process_p): Use find_thread.
953
954 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
955
956 * inferiors.c (find_inferior_in_random): Remove.
957 * inferiors.h (find_inferior_in_random): Remove.
958 * linux-low.c (status_pending_p_callback): Return bool, accept
959 parameter ptid directly.
960 (linux_wait_for_event_filtered): Use find_thread_in_random.
961 (linux_wait_1): Likewise.
962
963 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
964
965 * inferiors.c (find_inferior_id): Remove.
966 (find_thread_ptid): Move implemention from find_inferior_id to
967 here.
968 * inferiors.h (find_inferior_id): Remove.
969 * server.c (handle_status): Use find_thread_ptid.
970 (process_serial_event): Likewise.
971 * thread-db.c (find_one_thread): Likewise.
972 (thread_db_thread_handle): Likewise.
973 * win32-low.c (thread_rec): Likewise.
974 (child_delete_thread): Likewise.
975 (win32_thread_alive): Likewise.
976 (get_child_debug_event): Likewise.
977
978 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
979
980 * linux-mips-low.c (update_watch_registers_callback): Return
981 void, remove pid_p parameter, don't check for pid.
982 (mips_insert_point, mips_remove_point): Use for_each_thread.
983
984 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
985
986 * lynx.low (lynx_delete_thread_callback): Remove.
987 (lynx_mourn): Use for_each_thread.
988
989 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
990
991 * regcache.c (regcache_invalidate_one): Remove.
992 (regcache_invalidate_pid): use for_each_thread.
993
994 2017-11-26 Tom Tromey <tom@tromey.com>
995
996 * linux-low.c (linux_create_inferior): Update.
997
998 2017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
999
1000 * spu-low.c (spu_create_inferior): Fix typo in argument name.
1001
1002 2017-11-24 Alan Hayward <alan.hayward@arm.com>
1003
1004 * configure.srv: Add linux-aarch64-tdesc-selftest.o.
1005 * linux-aarch64-low.c (initialize_low_arch): Call init func.
1006 * linux-aarch64-tdesc-selftest.c: New file.
1007 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
1008
1009 2017-11-24 Alan Hayward <alan.hayward@arm.com>
1010
1011 * configure.srv: Add new file.
1012 * linux-aarch64-low.c (initialize_low_arch): Call init func.
1013 * linux-aarch64-tdesc-selftest.c: New file.
1014 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
1015
1016 2017-11-24 Alan Hayward <alan.hayward@arm.com>
1017
1018 * linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init.
1019 * linux-aarch64-low.c (initialize_low_arch): Remove init.
1020 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
1021
1022 2017-11-24 Alan Hayward <alan.hayward@arm.com>
1023
1024 * configure.srv: Add new files.
1025 * linux-aarch64-ipa.c (get_ipa_tdesc): Call
1026 aarch64_linux_read_description.
1027 * linux-aarch64-low.c (aarch64_linux_read_description):
1028 Merge with aarch64_arch_setup.
1029 (aarch64_arch_setup): Call aarch64_linux_read_description.
1030 * linux-aarch64-tdesc.c: New file.
1031 * linux-aarch64-tdesc.h: New file.
1032
1033 2017-11-24 Yao Qi <yao.qi@linaro.org>
1034
1035 * configure.srv: Set $srv_regobj for tic6x-linux.
1036 * linux-tic6x-low.c: Include "arch/tic6x.h" and "tdesc.h".
1037 (tic6x_read_description): Move some code to tic6x_arch_setup.
1038 (tic6x_tdesc_test): New function.
1039 (initialize_low_arch): Call selftests::register_test.
1040
1041 2017-11-22 Yao Qi <yao.qi@linaro.org>
1042
1043 * remote-utils.c (prepare_resume_reply): Use memcpy.
1044
1045 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1046
1047 * linux-low.c (kill_one_lwp_callback): Return void, take
1048 argument directly, don't filter on pid.
1049 (linux_kill): Use for_each_thread.
1050
1051 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1052
1053 * linux-low.c (need_step_over_p): Return bool, remove dummy
1054 argument.
1055 (linux_resume, proceed_all_lwps): Use find_thread.
1056
1057 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1058
1059 * linux-low.c (resume_status_pending_p): Return bool, remove
1060 flag_p argument.
1061 (linux_resume): Use find_thread.
1062
1063 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1064
1065 * linux-low.c (struct thread_resume_array): Remove.
1066 (linux_set_resume_request): Return void, take arguments
1067 directly.
1068 (linux_resume): Use for_each_thread.
1069
1070 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1071
1072 * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
1073 return bool, remove data argument.
1074 (linux_stabilize_threads): Use find_thread.
1075
1076 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1077
1078 * linux-low.c (unsuspend_one_lwp): Remove.
1079 (unsuspend_all_lwps): Use for_each_thread, inline code from
1080 unsuspend_one_lwp.
1081
1082 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1083
1084 * gdbthread.h (find_thread): Add overload with ptid_t filter.
1085 * linux-low.c (struct iterate_over_lwps_args): Remove.
1086 (iterate_over_lwps_filter): Remove.
1087 (iterate_over_lwps): Use find_thread.
1088
1089 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1090
1091 * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
1092 (linux_handle_new_gdb_connection): Use for_each_thread, inline
1093 code from reset_lwp_ptrace_options_callback.
1094
1095 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1096
1097 * linux-arm-low.c (struct update_registers_data): Remove.
1098 (update_registers_callback): Return void, take arguments
1099 directly, don't check thread's pid.
1100 (arm_insert_point, arm_remove_point): Use for_each_thread.
1101
1102 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1103
1104 * win32-low.c (continue_one_thread): Return void, take argument
1105 directly.
1106 (child_continue): Use for_each_thread.
1107
1108 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1109
1110 * win32-i386-low.c (update_debug_registers_callback): Rename
1111 to ...
1112 (update_debug_registers): ... this, return void, remove pid_p arg.
1113 (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
1114
1115 2017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1116
1117 * inferiors.h (struct process_info): Add constructor, initialize
1118 fields..
1119 <syscalls_to_catch>: Change type to std::vector<int>.
1120 * inferiors.c (add_process): Allocate process_info with new.
1121 (remove_process): Free process_info with delete.
1122 * linux-low.c (handle_extended_wait): Adjust.
1123 (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
1124 * server.c (handle_general_set): Adjust.
1125
1126 2017-11-16 Pedro Alves <palves@redhat.com>
1127
1128 * remote-utils.c (remote_close): Block SIGIO signals instead of
1129 uninstalling the SIGIO handler.
1130
1131 2017-11-16 Alan Hayward <alan.hayward@arm.com>
1132
1133 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
1134
1135 2017-11-16 Yao Qi <yao.qi@linaro.org>
1136
1137 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
1138 (tic6x_store_gregset): Likewise.
1139 (tic6x_usrregs_info): Move it up.
1140
1141 2017-11-15 Alan Hayward <alan.hayward@arm.com>
1142
1143 * Makefile.in: Update arch rules.
1144 * configure.srv: Explicitly mark arch/ files.
1145
1146 2017-11-13 Andreas Schwab <schwab@suse.de>
1147
1148 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
1149 function.
1150 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1151
1152 2017-11-06 Pedro Alves <palves@redhat.com>
1153
1154 * config.in, configure: Regenerate.
1155
1156 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1157
1158 * target.c (struct thread_search): Remove.
1159 (thread_search_callback): Remove.
1160 (prepare_to_access_memory): Use for_each_thread instead of
1161 find_inferior. Inline code from thread_search_callback.
1162
1163 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1164
1165 * server.c (struct visit_actioned_threads_data): Remove.
1166 (visit_actioned_threads): Change prototype to take arguments
1167 directly.
1168 (resume): Use find_thread instead of find_inferior.
1169
1170 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1171
1172 * server.c (queue_stop_reply_callback): Change prototype, return
1173 void.
1174 (find_status_pending_thread_callback): Remove.
1175 (handle_status): Replace find_inferior with find_thread and
1176 for_each_thread.
1177
1178 2017-10-25 Alan Hayward <alan.hayward@arm.com>
1179
1180 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
1181 with REGNO.
1182 (aarch64_store_gregset): Likewise.
1183 (aarch64_fill_fpregset): Likewise.
1184 (aarch64_store_fpregset): Likewise.
1185
1186 2017-10-21 Simon Marchi <simon.marchi@ericsson.com>
1187
1188 * gdbthread.h (find_thread, for_each_thread): New functions.
1189 * inferiors.c (thread_of_pid): Remove.
1190 (find_any_thread_of_pid): Use find_thread.
1191 * linux-low.c (num_lwps): Use for_each_thread.
1192
1193 2017-10-17 Yao Qi <yao.qi@linaro.org>
1194
1195 * Makefile.in: Remove one rule.
1196 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
1197
1198 2017-10-17 Yao Qi <yao.qi@linaro.org>
1199
1200 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
1201 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
1202
1203 2017-10-17 Yao Qi <yao.qi@linaro.org>
1204
1205 * configure.srv: Rename arm.o with arch/arm.o.
1206
1207 2017-10-17 Yao Qi <yao.qi@linaro.org>
1208
1209 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
1210 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
1211 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
1212 (arch-i386.o, arch-amd64.o): Remove rules.
1213 (arch/%.o): New rule.
1214 Update POSTCOMPILE and COMPILE.pre.
1215 * configure.ac: Invoke AC_CONFIG_COMMANDS.
1216 * configure: Re-generated.
1217 * configure.srv: Replace arch-i386.o with arch/i386.o.
1218 Replace arch-amd64.o with arch/amd64.o.
1219
1220 2017-10-16 Yao Qi <yao.qi@linaro.org>
1221
1222 * configure: Regenerated.
1223
1224 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
1225
1226 * inferiors.h: (struct inferior_list): Remove.
1227 (struct inferior_list_entry); Remove.
1228 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
1229 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
1230 get_first_inferior): Remove.
1231 (for_each_inferior, for_each_inferior_with_data, find_inferior,
1232 find_inferior_id, find_inferior_in_random): Change signature.
1233 * inferiors.c (all_threads): Change type to
1234 std::list<thread_info *>.
1235 (get_thread): Remove macro.
1236 (find_inferior, find_inferior_id): Change signature, implement
1237 using find_thread.
1238 (find_inferior_in_random): Change signature, implement using
1239 find_thread_in_random.
1240 (for_each_inferior, for_each_inferior_with_data): Change
1241 signature, implement using for_each_thread.
1242 (add_inferior_to_list, remove_inferior): Remove.
1243 (add_thread, get_first_thread, thread_of_pid,
1244 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
1245 (get_first_inferior, one_inferior_p, clear_inferior_list):
1246 Remove.
1247 (clear_inferiors, get_thread_process): Update.
1248 * gdbthread.h: Include <list>.
1249 (struct thread_info) <entry>: Remove field.
1250 <id>: New field.
1251 (all_threads): Change type to std::list<thread_info *>.
1252 (get_first_inferior): Add doc.
1253 (find_thread, for_each_thread, find_thread_in_random): New
1254 functions.
1255 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
1256 * linux-arm-low.c (update_registers_callback): Update.
1257 * linux-low.c (second_thread_of_pid_p): Update.
1258 (kill_one_lwp_callback, linux_detach_lwp_callback,
1259 delete_lwp_callback, status_pending_p_callback, same_lwp,
1260 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
1261 iterate_over_lwps, not_stopped_callback,
1262 resume_stopped_resumed_lwps, count_events_callback,
1263 select_singlestep_lwp_callback, select_event_lwp_callback,
1264 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
1265 suspend_and_send_sigstop_callback, wait_for_sigstop,
1266 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
1267 lwp_running, linux_set_resume_request, resume_status_pending_p,
1268 need_step_over_p, start_step_over, linux_resume_one_thread,
1269 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
1270 reset_lwp_ptrace_options_callback): Update.
1271 * linux-mips-low.c (update_watch_registers_callback): Update.
1272 * regcache.c (regcache_invalidate_one, regcache_invalidate):
1273 Update.
1274 (free_register_cache_thread_one): Remove.
1275 (regcache_release): Update.
1276 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
1277 handle_qxfer_threads_worker): Update.
1278 (handle_query): Update, use list iterator.
1279 (visit_actioned_threads, handle_pending_status,
1280 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
1281 clear_pending_status_callback, set_pending_status_callback,
1282 find_status_pending_thread_callback, handle_status,
1283 process_serial_event): Update.
1284 * target.c (thread_search_callback): Update.
1285 * thread-db.c (thread_db_get_tls_address): Update.
1286 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
1287 Update.
1288 * win32-i386-low.c (update_debug_registers_callback): Update.
1289 * win32-low.c (delete_thread_info, child_delete_thread,
1290 continue_one_thread, suspend_one_thread,
1291 get_child_debug_event): Adjust.
1292
1293 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
1294
1295 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
1296 * inferiors.h: Include <list>.
1297 (struct process_info) <entry>: Remove field.
1298 <pid>: New field.
1299 (pid_of): Change macro to function.
1300 (ptid_of, lwpid_of): Remove macro.
1301 (all_processes): Change type to std::list<process_info *>.
1302 (ALL_PROCESSES): Remove macro.
1303 (for_each_process, find_process): New function.
1304 * inferiors.c (all_processes): Change type to
1305 std::list<process_info *>.
1306 (find_thread_process): Adjust.
1307 (add_process): Likewise.
1308 (remove_process): Likewise.
1309 (find_process_pid): Likewise.
1310 (get_first_process): Likewise.
1311 (started_inferior_callback): Remove.
1312 (have_started_inferiors_p): Adjust.
1313 (attached_inferior_callback): Remove.
1314 (have_attached_inferiors_p): Adjust.
1315 * linux-low.c (check_zombie_leaders): Likewise.
1316 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
1317 (x86_linux_update_xmltarget): Adjust.
1318 * server.c (handle_query): Likewise.
1319 (gdb_reattached_process): Remove.
1320 (handle_status): Adjust.
1321 (kill_inferior_callback): Likewise.
1322 (detach_or_kill_inferior): Remove.
1323 (print_started_pid): Likewise.
1324 (print_attached_pid): Likewise.
1325 (detach_or_kill_for_exit): Update.
1326 (process_serial_event): Likewise.
1327 * linux-arm-low.c (arm_new_fork): Likewise.
1328
1329 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
1330
1331 * dll.h: Include <list>.
1332 (struct dll_info): Add constructor.
1333 <entry>: Remove field.
1334 (all_dlls): Change type to std::list<dll_info>.
1335 * dll.c: Include <algorithm>.
1336 (get_dll): Remove macro.
1337 (all_dlls): Change type to std::list<dll_info *>.
1338 (free_one_dll): Remove.
1339 (match_dll): Likewise.
1340 (loaded_dll): Adjust.
1341 (unloaded_dll): Adjust to all_dlls type change, use
1342 std::find_if. Inline code from match_dll.
1343 (clear_dlls): Adjust to all_dlls type change.
1344 * server.c (emit_dll_description): Remove.
1345 (handle_qxfer_libraries): Adjust to all_dlls type change,
1346 integrate emit_dll_description's functionality.
1347
1348 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
1349
1350 * linux-low.h (struct linux_target_ops) <delete_process>: New
1351 field.
1352 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
1353 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
1354 (struct linux_target_ops): Add delete_process callback.
1355 * linux-arm-low.c (arm_delete_process): New.
1356 (struct linux_target_ops): Add delete_process callback.
1357 * linux-bfin-low.c (struct linux_target_ops): Likewise.
1358 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
1359 * linux-m32r-low.c (struct linux_target_ops): Likewise.
1360 * linux-mips-low.c (mips_linux_delete_process): New.
1361 (struct linux_target_ops): Add delete_process callback.
1362 * linux-ppc-low.c (struct linux_target_ops): Likewise.
1363 * linux-s390-low.c (struct linux_target_ops): Likewise.
1364 * linux-sh-low.c (struct linux_target_ops): Likewise.
1365 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
1366 * linux-tile-low.c (struct linux_target_ops): Likewise.
1367 * linux-x86-low.c (x86_linux_delete_process): New.
1368 (struct linux_target_ops): Add delete_process callback.
1369 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
1370
1371 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
1372
1373 * linux-aarch64-low.c (the_low_target): Add thread delete
1374 callback.
1375 * linux-arm-low.c (arm_delete_thread): New function.
1376 (the_low_target): Add thread delete callback.
1377 * linux-bfin-low.c (the_low_target): Likewise.
1378 * linux-crisv32-low.c (the_low_target): Likewise.
1379 * linux-low.c (delete_lwp): Invoke delete_thread callback if
1380 set.
1381 * linux-low.h (struct linux_target_ops) <delete_thread>: New
1382 field.
1383 * linux-m32r-low.c (the_low_target): Add thread delete callback.
1384 * linux-mips-low.c (mips_linux_delete_thread): New function.
1385 (the_low_target): Add thread delete callback.
1386 * linux-ppc-low.c (the_low_target): Likewise.
1387 * linux-s390-low.c (the_low_target): Likewise.
1388 * linux-sh-low.c (the_low_target): Likewise.
1389 * linux-tic6x-low.c (the_low_target): Likewise.
1390 * linux-tile-low.c (the_low_target): Likewise.
1391 * linux-x86-low.c (the_low_target): Likewise.
1392 * linux-xtensa-low.c (the_low_target): Likewise.
1393
1394 2017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
1395
1396 * win32-low.c: Include "common-inferior.h".
1397
1398 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
1399
1400 * inferiors.c (set_inferior_cwd): New function.
1401 * server.c (handle_general_set): Handle QSetWorkingDir packet.
1402 (handle_query): Inform that QSetWorkingDir is supported.
1403 * win32-low.c (create_process): Pass the inferior's cwd to
1404 CreateProcess.
1405
1406 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
1407
1408 * inferiors.c (current_inferior_cwd): New global variable.
1409 (get_inferior_cwd): New function.
1410 * inferiors.h (struct process_info) <cwd>: New field.
1411
1412 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
1413
1414 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
1415 (OBS): Add gdb_tilde_expand.o.
1416
1417 2017-10-02 Simon Marchi <simon.marchi@ericsson.com>
1418
1419 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
1420 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
1421
1422 2017-09-29 Pedro Alves <palves@redhat.com>
1423
1424 * ax.c (gdb_parse_agent_expr): Constify.
1425 * ax.h (gdb_parse_agent_expr): Constify.
1426 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
1427 Constify.
1428 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
1429 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
1430 * remote-utils.h (read_ptid): Constify.
1431 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
1432 (process_point_options, process_serial_event): Constify.
1433 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
1434 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
1435 (cmd_qtbuffer): Constify.
1436
1437 2017-09-29 Pedro Alves <palves@redhat.com>
1438
1439 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
1440 fails.
1441
1442 2017-09-29 Pedro Alves <palves@redhat.com>
1443
1444 * linux-low.c (handle_extended_wait): Pass parent thread instead
1445 of process to thread_db_notice_clone.
1446 * linux-low.h (thread_db_notice_clone): Replace parent process
1447 parameter with parent thread parameter.
1448 * thread-db.c (find_one_thread): Add comment.
1449 (thread_db_notice_clone): Replace parent process parameter with
1450 parent thread parameter. Temporarily switch to the parent thread.
1451
1452 2017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
1453
1454 * gdbthread.h: Include "common-gdbthread.h".
1455 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
1456 "if" when validating the ptid.
1457 * remote-utils.c: Include "gdbthread.h".
1458 (prepare_resume_reply): Use "switch_to_thread".
1459 * target.c (done_accessing_memory): Likewise.
1460
1461 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
1462
1463 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
1464 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
1465 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
1466 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
1467 s390x-gs-linux64-ipa.o to ipa_obj.
1468 * linux-s390-low.c (HWCAP_S390_GS): New define.
1469 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
1470 New functions.
1471 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
1472 (s390_arch_setup): Check for guarded-storage support and choose
1473 appropriate tdesc.
1474 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
1475 init_registers_s390x_gs_linux64.
1476 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
1477 enum value.
1478 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
1479 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
1480
1481 2017-09-22 Simon Marchi <simon.marchi@ericsson.com>
1482
1483 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
1484
1485 2017-09-21 Kevin Buettner <kevinb@redhat.com>
1486
1487 * linux-low.h (struct lwp_info): Add new field, thread_handle.
1488 (thread_db_thread_handle): Declare.
1489 * linux-low.c (linux_target_ops): Initialize thread_handle.
1490 * server.c (handle_qxfer_threads_worker): Add support for
1491 "handle" attribute.
1492 * target.h (struct target_ops): Add new function pointer,
1493 thread_handle.
1494 (target_thread_handle): Define.
1495 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
1496 field in lwp.
1497 (thread_db_thread_handle): New function.
1498
1499 2017-09-21 Kevin Buettner <kevinb@redhat.com>
1500
1501 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
1502 * linux-low.h (thread_db_notice_clone): Declare.
1503 * thread-db.c (thread_db_notice_clone): New function.
1504
1505 2017-09-21 Pedro Alves <palves@redhat.com>
1506
1507 * server.c (gdb_read_memory, handle_status, process_serial_event)
1508 (handle_serial_event, handle_target_event): Adjust to
1509 set_desired_thread prototype change.
1510 * target.c (set_desired_thread): Remove 'use_general' parameter
1511 and adjust.
1512 * target.h (set_desired_thread): Remove 'use_general' parameter.
1513
1514 2017-09-20 Tom Tromey <tom@tromey.com>
1515
1516 * target.c (target_terminal::terminal_state): Define.
1517 (target_terminal::init): Rename from target_terminal_init.
1518 (target_terminal::inferior): Rename from
1519 target_terminal_inferior.
1520 (target_terminal::ours): Rename from target_terminal_ours.
1521 (target_terminal::ours_for_output, target_terminal::info): New.
1522
1523 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1524
1525 * server.c (accumulate_file_name_length): Remove.
1526 (emit_dll_description): Adjust to std::string change.
1527 (handle_qxfer_libraries): Use std::string to hold document.
1528
1529 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1530
1531 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
1532 return type of xml_escape_text.
1533 * server.c (emit_dll_description): Likewise.
1534
1535 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1536
1537 * server.c (captured_main): Accept argument for --selftest.
1538 Update run_tests call.
1539 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
1540 when registering selftests.
1541
1542 2017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
1543
1544 * regcache.c (get_thread_regcache): Update code to use "std::vector"
1545 instead of "VEC" for "target_desc.reg_defs".
1546 (regcache_cpy): Likewise.
1547 (registers_to_string): Likewise.
1548 (registers_from_string): Likewise.
1549 (find_regno): Likewise.
1550 (supply_regblock): Likewise.
1551 (regcache_raw_read_unsigned): Likewise.
1552 * tdesc.c (init_target_desc): Likewise.
1553 (tdesc_create_reg): Likewise.
1554 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
1555 (struct target_desc) <reg_defs>: Convert to "std::vector".
1556 (target_desc): Do not initialize "reg_defs".
1557 (~target_desc): Update code to use "std::vector" instead of "VEC"
1558 for "target_desc.reg_defs".
1559 (operator==): Likewise.
1560
1561 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1562
1563 * inferiors.h (thread_to_gdb_id): Remove.
1564 * inferiors.c (thread_to_gdb_id): Remove.
1565 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
1566 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
1567 lynx_store_registers, lynx_read_memory, lynx_write_memory):
1568 Likewise.
1569 * nto-low.c (nto_fetch_registers, nto_store_registers,
1570 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
1571
1572 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1573
1574 * inferiors.h (gdb_id_to_thread_id): Remove.
1575 * inferiors.c (gdb_id_to_thread_id): Remove.
1576 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
1577 removal. Move pid declaration closer to where it's used.
1578
1579 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1580
1581 * server.c (handle_detach): New function.
1582 (process_serial_event): Move code out, call handle_detach.
1583
1584 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1585
1586 * server.c (require_running): Rename to ...
1587 (require_running_or_return): ... this ...
1588 (require_running_or_break): ... and this.
1589 (handle_query, process_serial_event): Adjust.
1590
1591 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1592
1593 * linux-low.c (linux_set_resume_request): Remove unused
1594 variables.
1595
1596 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1597
1598 * server.c (first_thread_of): Remove.
1599 (process_serial_event): Replace usage of first_thread_of with
1600 find_any_thread_of_pid.
1601 * tracepoint.c (same_process_p): Remove.
1602 (gdb_agent_about_to_close): Replace usage of same_process_p with
1603 find_any_thread_of_pid.
1604 * linux-x86-low.c (same_process_callback): Remove.
1605 (x86_arch_setup_process_callback): Replace usage of
1606 same_process_callback with find_any_thread_of_pid.
1607 * thread-db.c (any_thread_of): Remove.
1608 (switch_to_process): Replace usage of any_thread_of with
1609 find_any_thread_of_pid.
1610 * inferiors.c (thread_pid_matches_callback): Remove.
1611 (find_thread_process): Adjust to use find_any_thread_of_pid.
1612
1613 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
1614
1615 * regcache.c (get_thread_regcache): Guard calls to "memset"
1616 with "!VEC_empty".
1617
1618 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
1619
1620 * linux-low.c (handle_extended_wait): Use
1621 "allocate_target_description" instead of "XNEW".
1622 * linux-x86-low.c (initialize_low_arch): Likewise.
1623
1624 2017-09-05 Yao Qi <yao.qi@linaro.org>
1625
1626 * configure.srv (srv_i386_regobj): Remove.
1627 (srv_amd64_regobj): Remove.
1628 (srv_regobj): Set it to "" for x86 non-linux targets.
1629 * linux-x86-tdesc.c (i386_linux_read_description):
1630 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
1631 (init_registers_i386): Remove the declaration.
1632 (tdesc_i386): Remove the declaration.
1633 (lynx_i386_arch_setup): Call i386_create_target_description.
1634 * nto-x86-low.c: Likewise.
1635 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
1636 [!__x86_64__]: include arch/i386.h.
1637 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
1638
1639 2017-09-05 Yao Qi <yao.qi@linaro.org>
1640
1641 * configure.srv (srv_amd64_linux_xmlfiles): Remove
1642 i386/amd64-XXX-linux from it.
1643
1644 2017-09-05 Yao Qi <yao.qi@linaro.org>
1645
1646 * configure.srv: Empty srv_amd64_linux_regobj if $development is
1647 false.
1648 (ipa_amd64_linux_regobj): Remove.
1649 (ipa_x32_linux_regobj): Remove.
1650
1651 2017-09-05 Yao Qi <yao.qi@linaro.org>
1652
1653 * Makefile.in (arch-amd64.o): New rule.
1654 * configure.srv: Append arch-amd64.o.
1655 * linux-amd64-ipa.c: Include common/x86-xstate.h.
1656 (get_ipa_tdesc): Call amd64_linux_read_description.
1657 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
1658 and init_registers_amd64_XXX.
1659 * linux-x86-low.c (x86_linux_read_description): Call
1660 amd64_linux_read_description.
1661 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
1662 (initialize_low_arch): Don't call init_registers_x32_XXX and
1663 init_registers_amd64_XXX.
1664 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
1665 and tdesc_amd64_XXX.
1666 [__x86_64__] (amd64_tdesc_test): New function.
1667 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
1668 and init_registers_amd64_XXX.
1669 * linux-x86-tdesc.c: Include arch/amd64.h.
1670 (xcr0_to_tdesc_idx): New function.
1671 (i386_linux_read_description): New function.
1672 (amd64_get_ipa_tdesc_idx): New function.
1673 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
1674 (amd64_get_ipa_tdesc): Declare.
1675
1676 2017-09-05 Yao Qi <yao.qi@linaro.org>
1677
1678 * configure.srv (srv_i386_linux_xmlfiles): Remove
1679 i386/i386-XXX-linux.xml from it.
1680
1681 2017-09-05 Yao Qi <yao.qi@linaro.org>
1682
1683 * configure.srv: Set srv_i386_linux_regobj empty if $development
1684 is false.
1685 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
1686 initialize_low_tdesc.
1687 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
1688 with #if initialize_low_tdesc.
1689 * linux-x86-tdesc-selftest.c: New file.
1690 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
1691
1692 2017-09-05 Yao Qi <yao.qi@linaro.org>
1693
1694 * Makefile.in (arch-i386.o): New rule.
1695 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
1696 (x86_64-*-linux*): Likewise.
1697 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
1698 include arch/i386.h.
1699 (i386_linux_read_description): Remove code and call
1700 i386_create_target_description.
1701 * tdesc.c (allocate_target_description): New function.
1702 * tdesc.h (set_tdesc_architecture): Remove declaration.
1703 (set_tdesc_osabi): Likewise.
1704
1705 2017-09-05 Yao Qi <yao.qi@linaro.org>
1706
1707 * linux-x86-tdesc.c: Don't include <inttypes.h>.
1708 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
1709 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
1710 .xmltarget.
1711 * server.c (get_features_xml): Call tdesc_get_features_xml.
1712 * tdesc.c (set_tdesc_architecture): New function.
1713 (set_tdesc_osabi): New function.
1714 (tdesc_get_features_xml): New function.
1715 (tdesc_create_feature): Add an argument.
1716 * tdesc.h (struct target_desc) <features>: New field.
1717 <arch, osabi>: New field.
1718 (~target_desc): xfree features, arch, and osabi.
1719 (target_desc::oerator==): Don't compare .xmltarget.
1720 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
1721 (set_tdesc_osabi): Likewise.
1722 (tdesc_get_features_xml): Likewise.
1723
1724 2017-09-05 Yao Qi <yao.qi@linaro.org>
1725
1726 * linux-x86-tdesc.c: Include selftest.h.
1727 (i386_tdesc_test): New function.
1728 (initialize_low_tdesc): Call selftests::register_test.
1729 * tdesc.h: Include regdef.h.
1730 (target_desc): Override operator == and !=.
1731
1732 2017-09-05 Yao Qi <yao.qi@linaro.org>
1733
1734 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
1735 (ipa_obj): Likewise.
1736 * linux-i386-ipa.c: Include common/x86-xstate.h
1737 (get_ipa_tdesc): Call i386_linux_read_description.
1738 (initialize_low_tracepoint): Don't call init_registers_XXX
1739 functions, call initialize_low_tdesc instead.
1740 * linux-x86-low.c (x86_linux_read_description): Call
1741 i386_linux_read_description.
1742 (initialize_low_arch): Don't call init_registers_i386_XXX
1743 functions, call initialize_low_tdesc.
1744 * linux-x86-tdesc.c: New file.
1745 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
1746 (i386_get_ipa_tdesc_idx): Declare.
1747 (i386_get_ipa_tdesc): Declare.
1748 (initialize_low_tdesc): Declare.
1749
1750 2017-09-05 Yao Qi <yao.qi@linaro.org>
1751
1752 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
1753 instead of 0.
1754
1755 2017-09-05 Yao Qi <yao.qi@linaro.org>
1756
1757 * Makefile.in (IPA_OBJS): Add vec-ipa.o
1758 * regcache.c (get_thread_regcache): Use VEC_length.
1759 (init_register_cache): Likewise.
1760 (regcache_cpy): Likewise.
1761 (registers_to_string): Iterate reg_defs via VEC_iterate.
1762 (find_regno): Likewise.
1763 (find_register_by_number): Use VEC_index.
1764 (register_size): Call find_register_by_number.
1765 (register_data): Call find_register_by_number.
1766 (supply_regblock): Use VEC_length.
1767 (regcache_raw_read_unsigned): Likewise.
1768 * tdesc.c (init_target_desc): Iterate reg_defs via
1769 VEC_iterate.
1770 (default_description): Update initializer.
1771 (copy_target_description): Don't update field num_registers.
1772 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
1773 <num_registers>: Remove.
1774
1775 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
1776
1777 * Makefile.in (.SECONDARY): Define target.
1778
1779 2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
1780
1781 * linux-low.c (linux_wait_1): Adjust.
1782 * server.c (queue_stop_reply_callback): Adjust.
1783
1784 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
1785
1786 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
1787 QEnvironmentUnset and QEnvironmentReset packets.
1788 (handle_query): Inform remote that QEnvironmentHexEncoded,
1789 QEnvironmentUnset and QEnvironmentReset are supported.
1790
1791 2017-08-25 Simon Marchi <simon.marchi@ericsson.com>
1792
1793 * inferiors.h (inferior_target_data): Rename to ...
1794 (thread_target_data): ... this.
1795 (inferior_regcache_data): Rename to ...
1796 (thread_regcache_data): ... this.
1797 (set_inferior_regcache_data): Rename to ...
1798 (set_thread_regcache_data): ... this.
1799 * inferiors.c (inferior_target_data): Rename to ...
1800 (thread_target_data): ... this.
1801 (inferior_regcache_data): Rename to ...
1802 (thread_regcache_data): ... this.
1803 (set_inferior_regcache_data): Rename to ...
1804 (set_thread_regcache_data): ... this.
1805 (free_one_thread): Update.
1806 * linux-low.h (get_thread_lwp): Update.
1807 * regcache.c (get_thread_regcache): Update.
1808 (regcache_invalidate_thread): Update.
1809 (free_register_cache_thread): Update.
1810 * win32-i386-low.c (update_debug_registers_callback): Update.
1811 (win32_get_current_dr): Update.
1812 * win32-low.c (thread_rec): Update.
1813 (delete_thread_info): Update.
1814 (continue_one_thread): Update.
1815 (suspend_one_thread): Update.
1816
1817 2017-08-24 Simon Marchi <simon.marchi@ericsson.com>
1818
1819 * inferiors.c (set_inferior_target_data): Remove.
1820 * inferiors.h (set_inferior_target_data): Remove.
1821
1822 2017-08-18 Yao Qi <yao.qi@linaro.org>
1823
1824 * Makefile.in (OBS): Add selftest.o.
1825 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
1826 * configure, config.in: Re-generated.
1827 * server.c: Include common/sefltest.h.
1828 (captured_main): Handle option --selftest.
1829
1830 2017-08-09 Yao Qi <yao.qi@linaro.org>
1831
1832 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
1833 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
1834 i386-avx-mpx.o and i386-mmx.o.
1835 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
1836 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
1837 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
1838 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
1839 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
1840 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
1841 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
1842 i386/amd64-avx-mpx.xml.
1843
1844 2017-08-09 Yao Qi <yao.qi@linaro.org>
1845
1846 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
1847 and x32-avx-avx512.o.
1848 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
1849 i386/x32-avx-avx512.xml.
1850
1851 2017-07-26 Simon Marchi <simon.marchi@ericsson.com>
1852
1853 * tracepoint.h (enum class fast_tpoint_collect_result): New
1854 enumeration.
1855 (fast_tracepoint_collecting): Change return type to
1856 fast_tpoint_collect_result.
1857 * tracepoint.c (fast_tracepoint_collecting): Likewise.
1858 * linux-low.h: Include tracepoint.h.
1859 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
1860 fast_tpoint_collect_result.
1861 * linux-low.c (handle_tracepoints): Adjust.
1862 (linux_fast_tracepoint_collecting): Change return type to
1863 fast_tpoint_collect_result.
1864 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
1865 linux_wait_1, stuck_in_jump_pad_callback,
1866 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
1867 proceed_one_lwp): Adjust to type change.
1868
1869 2017-07-10 Yao Qi <yao.qi@linaro.org>
1870
1871 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
1872
1873 2017-06-29 Yao Qi <yao.qi@linaro.org>
1874
1875 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
1876 Remove.
1877 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
1878
1879 2017-06-20 Simon Marchi <simon.marchi@ericsson.com>
1880
1881 * Makefile.in (IPA_OBJS): Sort and format one item per line.
1882
1883 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
1884
1885 * linux-low.c (linux_create_inferior): Adjust code to access the
1886 environment information via 'gdb_environ' class.
1887 * lynx-low.c (lynx_create_inferior): Likewise.
1888 * server.c (our_environ): Make it an instance of 'gdb_environ'.
1889 (get_environ): Return a pointer to 'our_environ'.
1890 (captured_main): Initialize 'our_environ'.
1891 * server.h (get_environ): Adjust prototype.
1892 * spu-low.c (spu_create_inferior): Adjust code to access the
1893 environment information via 'gdb_environ' class.
1894
1895 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1896
1897 * linux-low.c (linux_read_memory, linux_write_memory): Remove
1898 usage of "register" keyword.
1899
1900 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1901
1902 * configure: Re-generate.
1903
1904 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1905
1906 * configure: Re-generate.
1907
1908 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1909
1910 * Makefile.in (COMPILE.pre): Add "-x c++".
1911
1912 2017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
1913
1914 * fork-child.c: Conditionally include <signal.h>.
1915
1916 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1917
1918 * server.c (handle_general_set): Handle new packet
1919 "QStartupWithShell".
1920 (handle_query): Add "QStartupWithShell" to the list of supported
1921 packets.
1922 (gdbserver_usage): Add help text explaining the
1923 new "--startup-with-shell" and "--no-startup-with-shell" CLI
1924 options.
1925 (captured_main): Recognize and act upon the presence of the new
1926 CLI options.
1927
1928 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1929 Pedro Alves <palves@redhat.com>
1930
1931 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
1932 * configure: Regenerate.
1933 * configure.srv (srv_linux_obj): Add "fork-child.o" and
1934 "fork-inferior.o".
1935 (i[34567]86-*-lynxos*): Likewise.
1936 (spu*-*-*): Likewise.
1937 * fork-child.c: New file.
1938 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
1939 and "environ.h".
1940 (linux_ptrace_fun): New function.
1941 (linux_create_inferior): Adjust function prototype to reflect
1942 change on "target.h". Adjust function code to use
1943 "fork_inferior".
1944 (linux_request_interrupt): Delete "signal_pid".
1945 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
1946 (lynx_ptrace_fun): New function.
1947 (lynx_create_inferior): Adjust function prototype to reflect
1948 change on "target.h". Adjust function code to use
1949 "fork_inferior".
1950 * nto-low.c (nto_create_inferior): Adjust function prototype and
1951 code to reflect change on "target.h". Update comments.
1952 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
1953 "common-terminal.h" and "environ.h".
1954 (terminal_fd): Moved to fork-child.c.
1955 (old_foreground_pgrp): Likewise.
1956 (restore_old_foreground_pgrp): Likewise.
1957 (last_status): Make it global.
1958 (last_ptid): Likewise.
1959 (our_environ): New variable.
1960 (startup_with_shell): Likewise.
1961 (program_name): Likewise.
1962 (program_argv): Rename to...
1963 (program_args): ...this.
1964 (wrapper_argv): New variable.
1965 (start_inferior): Delete function.
1966 (get_exec_wrapper): New function.
1967 (get_exec_file): Likewise.
1968 (get_environ): Likewise.
1969 (prefork_hook): Likewise.
1970 (post_fork_inferior): Likewise.
1971 (postfork_hook): Likewise.
1972 (postfork_child_hook): Likewise.
1973 (handle_v_run): Update code to deal with arguments coming from the
1974 remote host. Update calls from "start_inferior" to
1975 "create_inferior".
1976 (captured_main): Likewise. Initialize environment variable. Call
1977 "have_job_control".
1978 * server.h (post_fork_inferior): New prototype.
1979 (get_environ): Likewise.
1980 (last_status): Declare.
1981 (last_ptid): Likewise.
1982 (signal_pid): Likewise.
1983 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
1984 (spu_ptrace_fun): New function.
1985 (spu_create_inferior): Adjust function prototype to reflect change
1986 on "target.h". Adjust function code to use "fork_inferior".
1987 * target.c (target_terminal_init): New function.
1988 (target_terminal_inferior): Likewise.
1989 (target_terminal_ours): Likewise.
1990 * target.h: Include <vector>.
1991 (struct target_ops) <create_inferior>: Update prototype.
1992 (create_inferior): Update macro.
1993 * utils.c (gdb_flush_out_err): New function.
1994 * win32-low.c (win32_create_inferior): Adjust function prototype
1995 and code to reflect change on "target.h".
1996
1997 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1998
1999 * inferiors.c (switch_to_thread): New function.
2000
2001 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2002
2003 * Makefile.in (SFILE): Add "common/job-control.c".
2004 (OBS): Add "job-control.o".
2005
2006 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
2007
2008 * Makefile: Remove "@host_makefile_frag@".
2009
2010 2017-05-05 Pedro Alves <palves@redhat.com>
2011
2012 * configure: Regenerate.
2013
2014 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
2015
2016 * configure: Regenerate.
2017
2018 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
2019
2020 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
2021 software_single_step change of return type to
2022 std::vector<CORE_ADDR>.
2023 * linux-low.c (install_software_single_step_breakpoints):
2024 Likewise.
2025 * linux-low.h (install_software_single_step_breakpoints):
2026 Likewise.
2027
2028 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
2029
2030 * remote-utils.c: Include "gdb_termios.h" instead of
2031 "terminal.h".
2032 * terminal.h: Delete file.
2033
2034 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
2035
2036 * server.c: Include <vector>.
2037 <program_argv, wrapper_argv>: Convert to std::vector.
2038 (start_inferior): Rewrite function to use C++.
2039 (handle_v_run): Likewise. Update code that calculates the argv
2040 based on the vRun packet; use C++.
2041 (captured_main): Likewise.
2042
2043 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
2044
2045 * server.c (handle_v_cont): Initialize thread_resume::thread
2046 with null_ptid.
2047
2048 2017-04-05 Pedro Alves <palves@redhat.com>
2049
2050 * configure: Regenerate.
2051
2052 2017-04-05 Pedro Alves <palves@redhat.com>
2053
2054 * gdbreplay.c (sync_error): Constify.
2055 * linux-x86-low.c (push_opcode): Constify.
2056
2057 2017-04-05 Pedro Alves <palves@redhat.com>
2058
2059 * win32-low.c (get_child_debug_event)
2060 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
2061 Report TARGET_WAITKIND_SPURIOUS instead.
2062
2063 2017-04-05 Pedro Alves <palves@redhat.com>
2064
2065 * remote-utils.c (remote_prepare, remote_open): Constify.
2066 * remote-utils.h (remote_prepare, remote_open): Constify.
2067 * server.c (captured_main): Constify 'port' handling.
2068
2069 2017-04-04 Simon Marchi <simon.marchi@ericsson.com>
2070
2071 * Makefile.in (clean): Clear .deps.
2072
2073 2017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
2074
2075 * .gitignore: Remove generated files, replace with wildcard.
2076 * (clean): Replace removal of generated files with wildcard.
2077 (version.c): Replace with...
2078 (version-generated.c): ...this.
2079 (xml-builtin.c): Replace with...
2080 (xml-builtin-generated.c): ...this.
2081 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
2082 (%.c: *regformats*): Replace with...
2083 (%-generated.c: *regformats*): ...this.
2084
2085 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
2086
2087 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
2088 (xtensa_fill_gregset): Call collect_register_by_name for
2089 threadptr register.
2090 (xtensa_store_gregset): Call supply_register_by_name for
2091 threadptr register.
2092
2093 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
2094
2095 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
2096 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
2097 (xtensa_store_gregset): Call supply_register for all registers in
2098 a0_regnum..a0_regnum + C0_NREGS range.
2099
2100 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2101
2102 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
2103 (ax-ipa.o: ax.c): Remove.
2104 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
2105 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
2106 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
2107 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
2108 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
2109
2110 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2111
2112 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
2113 (print-utils-ipa.o: ../common/print-utils.c): Remove.
2114 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
2115 (errors-ipa.o: ../common/errors.c): Remove.
2116 (format-ipa.o: ../common/format.c): Remove.
2117 (common-utils-ipa.o: ../common/common-utils.c): Remove.
2118
2119 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2120
2121 * Makefile.in (%-ipa.o: %.c): New rule.
2122 (tracepoint-ipa.o: tracepoint.c): Remove.
2123 (utils-ipa.o: utils.c): Remove.
2124 (remote-utils-ipa.o: remote-utils.c): Remove.
2125 (regcache-ipa.o: regcache.c): Remove.
2126 (i386-linux-ipa.o: i386-linux.c): Remove.
2127 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
2128 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
2129 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
2130 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
2131 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
2132 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
2133 (amd64-linux-ipa.o: amd64-linux.c): Remove.
2134 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
2135 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
2136 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
2137 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
2138 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
2139 (aarch64-ipa.o: aarch64.c): Remove.
2140 (s390-linux32-ipa.o: s390-linux32.c): Remove.
2141 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
2142 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
2143 (s390-linux64-ipa.o: s390-linux64.c): Remove.
2144 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
2145 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
2146 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
2147 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
2148 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
2149 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
2150 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
2151 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
2152 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
2153 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
2154 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
2155 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
2156 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
2157 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
2158 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
2159 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
2160 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
2161 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
2162 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
2163 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
2164 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
2165 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
2166 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
2167 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
2168 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
2169 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
2170 (tdesc-ipa.o: tdesc.c): Remove.
2171 (x32-linux-ipa.o: x32-linux.c): Remove.
2172 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
2173 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
2174
2175 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2176
2177 * Makefile.in (%.o: ../arch/%.c): New rule.
2178 (arm.o: ../arch/arm.c): Remove.
2179 (arm-linux.o: ../arch/arm-linux.c): Remove.
2180 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
2181 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
2182
2183 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2184
2185 * Makefile.in (%.o: ../nat/%.c): New rule.
2186 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
2187 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
2188 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
2189 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
2190 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
2191 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
2192 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
2193 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
2194 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
2195 (linux-personality.o: ../nat/linux-personality.c): Remove.
2196 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
2197 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
2198 (x86-linux.o: ../nat/x86-linux.c): Remove.
2199 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
2200 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
2201
2202 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2203
2204 * Makefile.in (%.o: ../common/%.c): New rule.
2205 (signals.o: ../common/signals.c): Remove.
2206 (print-utils.o: ../common/print-utils.c): Remove.
2207 (rsp-low.o: ../common/rsp-low.c): Remove.
2208 (common-utils.o: ../common/common-utils.c): Remove.
2209 (posix-strerror.o: ../common/posix-strerror.c): Remove.
2210 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
2211 (vec.o: ../common/vec.c): Remove.
2212 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
2213 (xml-utils.o: ../common/xml-utils.c): Remove.
2214 (ptid.o: ../common/ptid.c): Remove.
2215 (buffer.o: ../common/buffer.c): Remove.
2216 (format.o: ../common/format.c): Remove.
2217 (filestuff.o: ../common/filestuff.c): Remove.
2218 (agent.o: ../common/agent.c): Remove.
2219 (errors.o: ../common/errors.c): Remove.
2220 (environ.o: ../common/environ.c): Remove.
2221 (common-debug.o: ../common/common-debug.c): Remove.
2222 (cleanups.o: ../common/cleanups.c): Remove.
2223 (common-exceptions.o: ../common/common-exceptions.c): Remove.
2224 (fileio.o: ../common/fileio.c): Remove.
2225 (common-regcache.o: ../common/common-regcache.c): Remove.
2226 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
2227 (new-op.o: ../common/new-op.c): Remove.
2228 (btrace-common.o: ../common/btrace-common.c): Remove.
2229
2230 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2231
2232 * Makefile.in (%.o: ../target/%.c): New rule.
2233 (waitstatus.o: ../target/waitstatus.c): Remove.
2234
2235 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2236
2237 * Makefile.in
2238 (%.c: ../regformats/%.dat,
2239 (%.c: ../regformats/arm/%.dat,
2240 (%.c: ../regformats/i386/%.dat,
2241 (%.c: ../regformats/rs6000/%.dat): New rules.
2242 (aarch64.c): Remove.
2243 (reg-arm.c): Remove.
2244 (arm-with-iwmmxt.c): Remove.
2245 (arm-with-vfpv2.c): Remove.
2246 (arm-with-vfpv3.c): Remove.
2247 (arm-with-neon.c): Remove.
2248 (reg-bfin.c): Remove.
2249 (reg-cris.c): Remove.
2250 (reg-crisv32.c): Remove.
2251 (i386.c): Remove.
2252 (i386-linux.c): Remove.
2253 (i386-avx.c): Remove.
2254 (i386-avx-linux.c): Remove.
2255 (i386-avx-avx512.c): Remove.
2256 (i386-avx-avx512-linux.c): Remove.
2257 (i386-mpx.c): Remove.
2258 (i386-mpx-linux.c): Remove.
2259 (i386-avx-mpx-avx512-pku.c): Remove.
2260 (i386-avx-mpx-avx512-pku-linux.c): Remove.
2261 (i386-avx-mpx.c): Remove.
2262 (i386-avx-mpx-linux.c): Remove.
2263 (i386-mmx.c): Remove.
2264 (i386-mmx-linux.c): Remove.
2265 (reg-ia64.c): Remove.
2266 (reg-m32r.c): Remove.
2267 (reg-m68k.c): Remove.
2268 (reg-cf.c): Remove.
2269 (mips-linux.c): Remove.
2270 (mips-dsp-linux.c): Remove.
2271 (mips64-linux.c): Remove.
2272 (mips64-dsp-linux.c): Remove.
2273 (nios2-linux.c): Remove.
2274 (powerpc-32.c): Remove.
2275 (powerpc-32l.c): Remove.
2276 (powerpc-altivec32l.c): Remove.
2277 (powerpc-cell32l.c): Remove.
2278 (powerpc-vsx32l.c): Remove.
2279 (powerpc-isa205-32l.c): Remove.
2280 (powerpc-isa205-altivec32l.c): Remove.
2281 (powerpc-isa205-vsx32l.c): Remove.
2282 (powerpc-e500l.c): Remove.
2283 (powerpc-64l.c): Remove.
2284 (powerpc-altivec64l.c): Remove.
2285 (powerpc-cell64l.c): Remove.
2286 (powerpc-vsx64l.c): Remove.
2287 (powerpc-isa205-64l.c): Remove.
2288 (powerpc-isa205-altivec64l.c): Remove.
2289 (powerpc-isa205-vsx64l.c): Remove.
2290 (s390-linux32.c): Remove.
2291 (s390-linux32v1.c): Remove.
2292 (s390-linux32v2.c): Remove.
2293 (s390-linux64.c): Remove.
2294 (s390-linux64v1.c): Remove.
2295 (s390-linux64v2.c): Remove.
2296 (s390-te-linux64.c): Remove.
2297 (s390-vx-linux64.c): Remove.
2298 (s390-tevx-linux64.c): Remove.
2299 (s390x-linux64.c): Remove.
2300 (s390x-linux64v1.c): Remove.
2301 (s390x-linux64v2.c): Remove.
2302 (s390x-te-linux64.c): Remove.
2303 (s390x-vx-linux64.c): Remove.
2304 (s390x-tevx-linux64.c): Remove.
2305 (tic6x-c64xp-linux.c): Remove.
2306 (tic6x-c64x-linux.c): Remove.
2307 (tic6x-c62x-linux.c): Remove.
2308 (reg-sh.c): Remove.
2309 (reg-sparc64.c): Remove.
2310 (reg-spu.c): Remove.
2311 (amd64.c): Remove.
2312 (amd64-linux.c): Remove.
2313 (amd64-avx.c): Remove.
2314 (amd64-avx-linux.c): Remove.
2315 (amd64-avx-avx512.c): Remove.
2316 (amd64-avx-avx512-linux.c): Remove.
2317 (amd64-mpx.c): Remove.
2318 (amd64-mpx-linux.c): Remove.
2319 (amd64-avx-mpx-avx512-pku.c): Remove.
2320 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
2321 (amd64-avx-mpx.c): Remove.
2322 (amd64-avx-mpx-linux.c): Remove.
2323 (x32.c): Remove.
2324 (x32-linux.c): Remove.
2325 (x32-avx.c): Remove.
2326 (x32-avx-linux.c): Remove.
2327 (x32-avx-avx512.c): Remove.
2328 (x32-avx-avx512-linux.c): Remove.
2329 (reg-xtensa.c): Remove.
2330 (reg-tilegx.c): Remove.
2331 (reg-tilegx32.c): Remove.
2332
2333 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
2334
2335 * Makefile.in (SFILES): Add "common/environ.c".
2336 (OBJS): Add "common/environ.h".
2337
2338 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
2339
2340 * configure.ac: Check if the fs_base and gs_base members of
2341 `struct user_regs_struct' exist.
2342 * config.in: Regenerated.
2343 * configure: Likewise.
2344
2345 2017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
2346
2347 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
2348 target_read_memory.
2349 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
2350 (get_next_pcs_syscall_next_pc): Likewise.
2351
2352 2016-12-23 Luis Machado <lgustavo@codesourcery.com>
2353
2354 * win32-i386-low.c: Fix incorrect reference to a couple source files.
2355 * nto-x86-low.c: Likewise.
2356
2357 2016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
2358
2359 * Makefile.in: Include disable-implicit-rules.mk.
2360
2361 2016-11-23 Pedro Alves <palves@redhat.com>
2362
2363 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
2364 (debug_vprintf): Use std::chrono::steady_clock instead of
2365 gettimeofday. Use '.' instead of ':'.
2366 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
2367 (get_timestamp): Use std::chrono::steady_clock instead of
2368 gettimeofday.
2369
2370 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
2371
2372 * Makefile.in: Fix whitespace formatting.
2373
2374 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
2375
2376 * Makefile.in (SFILES, OBS): Flatten list and order
2377 alphabetically.
2378
2379 2016-11-23 Pedro Alves <palves@redhat.com>
2380
2381 * event-loop.c (handle_file_event): Use warning.
2382 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
2383 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
2384 Use warning.
2385
2386 2016-11-23 Pedro Alves <palves@redhat.com>
2387
2388 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
2389 output.
2390 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
2391 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
2392 debug_printf and debug_flush for debug output.
2393 * server.c (handle_general_set): Likewise.
2394 * thread-db.c (try_thread_db_load): Use debug_printf for debug
2395 output.
2396
2397 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
2398
2399 * Makefile.in (.c.o): Replace rule with ...
2400 (%.o: %.c): ... this one.
2401
2402 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
2403
2404 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
2405 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
2406 make.
2407 * configure.ac: Remove checks for the make program.
2408 * configure: Re-generate.
2409
2410 2016-10-28 Pedro Alves <palves@redhat.com>
2411
2412 * Makefile.in (CXX_DIALECT): Get from configure.
2413 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
2414 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
2415 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
2416 * config.in: Regenerate.
2417 * configure: Regenerate.
2418
2419 2016-10-27 Yao Qi <yao.qi@linaro.org>
2420
2421 * linux-low.c (linux_supports_range_stepping): Return true if
2422 can_software_single_step return true.
2423
2424 2016-10-27 Yao Qi <yao.qi@linaro.org>
2425
2426 * inferiors.c (find_inferior_in_random): New function.
2427 * inferiors.h (find_inferior_in_random): Declare.
2428 * linux-low.c (linux_wait_for_event_filtered): Call
2429 find_inferior_in_random instead of find_inferior.
2430
2431 2016-10-27 Yao Qi <yao.qi@linaro.org>
2432
2433 * linux-low.c (linux_wait_1): If single-step breakpoints are
2434 inserted, remove them.
2435
2436 2016-10-26 Pedro Alves <palves@redhat.com>
2437
2438 * linux-low.c (handle_extended_wait): Link parent/child fork
2439 threads.
2440 (linux_wait_1): Unlink them.
2441 (linux_set_resume_request): Ignore resume requests for
2442 already-resumed and unhandled fork child threads.
2443 * linux-low.h (struct lwp_info) <fork_relative>: New field.
2444 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
2445 New functions.
2446 (handle_v_requests) <vCont>: Don't call require_running.
2447 * server.h (in_queued_stop_replies): New declaration.
2448
2449 2016-10-24 Yao Qi <yao.qi@linaro.org>
2450
2451 PR server/20733
2452 * linux-aarch64-low.c (append_insns): Cast the return value to
2453 'uint32_t *'.
2454
2455 2016-10-10 Yao Qi <yao.qi@linaro.org>
2456
2457 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
2458
2459 2016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
2460
2461 * target.c (target_supports_multi_process): New function, moved
2462 from...
2463 * target.h (target_supports_multi_process): ... here. Remove
2464 macro.
2465
2466 2016-10-05 Tom Tromey <tom@tromey.com>
2467
2468 PR remote/20655:
2469 * tracepoint.c (handle_tracepoint_bkpts): Check
2470 ipa_error_tracepoint, not ipa_stopping_tracepoint.
2471
2472 2016-10-05 Yao Qi <yao.qi@linaro.org>
2473
2474 * configure.srv: Update the path of arm-*.xml files.
2475
2476 2016-10-05 Terry Guo <terry.guo@arm.com>
2477 Yao Qi <yao.qi@linaro.org>
2478
2479 * Makefile.in: Adjust the path of rules.
2480 * configure.srv: Update the path of xml files.
2481 * regformats/arm-with-iwmmxt.dat: Regenerated.
2482 * regformats/arm-with-neon.dat: Likewise.
2483 * regformats/arm-with-vfpv2.dat: Likewise.
2484 * regformats/arm-with-vfpv3.dat Likewise.
2485
2486 2016-09-30 Yao Qi <yao.qi@linaro.org>
2487
2488 PR gdbserver/20627
2489 * target.c (target_stop_and_wait): Don't call
2490 target_continue_no_signal, use resume_stop instead.
2491
2492 2016-09-26 Yao Qi <yao.qi@linaro.org>
2493
2494 * linux-low.c (linux_wait_1): Call debug_exit.
2495
2496 2016-09-23 Pedro Alves <palves@redhat.com>
2497
2498 * Makefile.in (SFILES): Add common/new-op.c.
2499 (OBS): Add common/new-op.o.
2500 (new-op.o): New rule.
2501
2502 2016-09-21 Simon Marchi <simon.marchi@ericsson.com>
2503
2504 * .gitinore: Ignore more files.
2505
2506 2016-09-21 Yao Qi <yao.qi@linaro.org>
2507
2508 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
2509 23.
2510
2511 2016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
2512
2513 * server.c (start_inferior): Call target_mourn_inferior instead of
2514 mourn_inferior; pass ptid_t argument to it.
2515 (resume): Likewise.
2516 (handle_target_event): Likewise.
2517 * target.c (target_mourn_inferior): New function.
2518 * target.h (mourn_inferior): Delete macro.
2519
2520 2016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
2521
2522 * linux-low.c (lwp_is_stepping): New function.
2523
2524 2016-09-06 Carl Love <cel@us.ibm.com>
2525
2526 * server.c (start_inferior): Fixed comment, requested comment change
2527 didn't get updated correctly. Removed reference to ptrace () call as
2528 it is only true on Linux systems.
2529
2530 2016-09-06 Carl Love <cel@us.ibm.com>
2531
2532 * server.c (start_inferior): Do not call
2533 function target_post_create_inferior () if the
2534 inferior process has already exited.
2535
2536 2016-09-05 Pedro Alves <palves@redhat.com>
2537
2538 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
2539 (COMPILE.pre, CC_LD): Use CXX directly.
2540 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
2541 * acinclude.m4: Don't include build-with-cxx.m4.
2542 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
2543 * configure: Regenerate.
2544
2545 2016-09-02 Akash Trehan <akash.trehan123@gmail.com>
2546
2547 PR gdb/19495
2548 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
2549 call writing data to own_buf.
2550
2551 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
2552
2553 * target.c (mywait): Call target_wait instead of
2554 the_target->wait.
2555 (target_wait): New function.
2556
2557 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
2558
2559 * server.c (start_inferior): New variable 'ptid'. Replace calls
2560 to the_target->resume by target_continue{,_no_signal}, depending
2561 on the case.
2562 * target.c (target_stop_and_wait): Call target_continue_no_signal
2563 instead of the_target->resume.
2564 (target_continue): New function.
2565
2566 2016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
2567
2568 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
2569
2570 2016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
2571
2572 PR server/20491
2573 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
2574 ps_prochandle.
2575 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
2576 * linux-arm-low.c (ps_get_thread_area): Likewise.
2577 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
2578 * linux-m68k-low.c (ps_get_thread_area): Likewise.
2579 * linux-mips-low.c (ps_get_thread_area): Likewise.
2580 * linux-nios2-low.c (ps_get_thread_area): Likewise.
2581 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
2582 * linux-x86-low.c (ps_get_thread_area): Likewise.
2583 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
2584
2585 2016-08-19 Pedro Alves <palves@redhat.com>
2586
2587 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
2588
2589 2016-08-19 Pedro Alves <palves@redhat.com>
2590
2591 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
2592 comment. Use memcpy instead of casting through unsigned long.
2593
2594 2016-08-19 Pedro Alves <palves@redhat.com>
2595
2596 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
2597 allocating around 0x80000000.
2598
2599 2016-08-19 Pedro Alves <palves@redhat.com>
2600
2601 PR gdb/20415
2602 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
2603 (x32-avx512-linux-ipa.o): New rules.
2604 * configure.ac (x86_64-*-linux*): New x32 check.
2605 * configure.srv (ipa_x32_linux_regobj): New.
2606 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
2607 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
2608 descriptions.
2609 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
2610 descriptions.
2611 * configure: Regenerate.
2612
2613 2016-08-09 Pedro Alves <palves@redhat.com>
2614
2615 PR gdb/18653
2616 * Makefile.in (OBS): Add signals-state-save-restore.o.
2617 (signals-state-save-restore.o): New rule.
2618 * config.in: Regenerate.
2619 * configure: Regenerate.
2620 * linux-low.c: Include "signals-state-save-restore.h".
2621 (linux_create_inferior): Call
2622 restore_original_signals_state.
2623 * server.c: Include "dispositions-save-restore.h".
2624 (captured_main): Call save_original_signals_state.
2625
2626 2016-08-05 Pedro Alves <palves@redhat.com>
2627
2628 * configure: Regenerate.
2629
2630 2016-08-04 Yao Qi <yao.qi@linaro.org>
2631
2632 * linux-low.c (regsets_fetch_inferior_registers): Check
2633 errno is ESRCH or not.
2634
2635 2016-08-02 Yao Qi <yao.qi@linaro.org>
2636
2637 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
2638 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
2639 (thread_db_load_search): Update.
2640 (try_thread_db_load_1): Don't look for td_ta_event_addr,
2641 td_ta_set_event and td_ta_event_getmsg.
2642
2643 2016-07-26 Pedro Alves <palves@redhat.com>
2644
2645 PR server/20414
2646 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
2647 of unsigned long for 64-bit registers and use uint32_t instead of
2648 unsigned int for 32-bit registers.
2649
2650 2016-07-26 Pedro Alves <palves@redhat.com>
2651
2652 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
2653 to 'ptrace'.
2654
2655 2016-07-21 Tom Tromey <tom@tromey.com>
2656
2657 * configure: Rebuild.
2658
2659 2016-07-21 Yao Qi <yao.qi@linaro.org>
2660
2661 * mem-break.c (find_gdb_breakpoint): Cast bp to
2662 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
2663
2664 2016-07-21 Yao Qi <yao.qi@linaro.org>
2665
2666 * server.c (handle_v_requests): Support s and S actions
2667 if target_supports_software_single_step return true.
2668
2669 2016-07-21 Yao Qi <yao.qi@linaro.org>
2670
2671 * linux-low.c (resume_stopped_resumed_lwps): If resume request
2672 is resume_step, call maybe_hw_step.
2673 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
2674 and unstop them.
2675 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
2676 breakpoints or not.
2677 (proceed_one_lwp): If resume request is resume_step, install
2678 reinsert breakpoints and call maybe_hw_step.
2679
2680 2016-07-21 Yao Qi <yao.qi@linaro.org>
2681
2682 * linux-low.c (proceed_one_lwp): Declare.
2683 (linux_resume_one_thread): Remove local variable 'step'.
2684 Lift code enqueue signal. Call proceed_one_lwp instead of
2685 linux_resume_one_lwp.
2686
2687 2016-07-21 Yao Qi <yao.qi@linaro.org>
2688
2689 * linux-low.c (linux_resume_one_thread): Call
2690 enqueue_pending_signal.
2691
2692 2016-07-21 Yao Qi <yao.qi@linaro.org>
2693
2694 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
2695 * inferiors.c (do_restore_current_thread_cleanup): New function.
2696 (make_cleanup_restore_current_thread): Likewise.
2697 * linux-low.c (install_software_single_step_breakpoints): Call
2698 make_cleanup_restore_current_thread. Switch current_thread to
2699 thread.
2700
2701 2016-07-21 Yao Qi <yao.qi@linaro.org>
2702
2703 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
2704 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
2705 (clone_one_breakpoint): Likewise.
2706 (delete_reinsert_breakpoints): Change parameter to thread.
2707 Callers updated.
2708 (has_reinsert_breakpoints): Likewise.
2709 (uninsert_reinsert_breakpoints): Likewise.
2710 (reinsert_reinsert_breakpoints): Likewise.
2711 * mem-break.h (set_reinsert_breakpoint): Update declaration.
2712 (delete_reinsert_breakpoints): Likewise.
2713 (reinsert_reinsert_breakpoints): Likewise.
2714 (uninsert_reinsert_breakpoints): Likewise.
2715 (has_reinsert_breakpoints): Likewise.
2716
2717 2016-07-21 Yao Qi <yao.qi@linaro.org>
2718
2719 * inferiors.c (get_thread_process): Make parameter const.
2720 * inferiors.h (get_thread_process): Update declaration.
2721 * mem-break.c (clone_all_breakpoints): Remove all parameters.
2722 Add new parameters child_thread and parent_thread. Callers
2723 updated.
2724 * mem-break.h (clone_all_breakpoints): Update declaration.
2725
2726 2016-07-21 Yao Qi <yao.qi@linaro.org>
2727
2728 * mem-break.c (struct breakpoint) <cond_list>: Remove.
2729 <command_list, handler>: Remove.
2730 (struct gdb_breakpoint): New.
2731 (struct other_breakpoint): New.
2732 (struct reinsert_breakpoint): New.
2733 (is_gdb_breakpoint): New function.
2734 (any_persistent_commands): Update command_list if
2735 is_gdb_breakpoint returns true.
2736 (set_breakpoint): Create breakpoints according to their types.
2737 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
2738 (set_gdb_breakpoint_1): Likewise.
2739 (set_gdb_breakpoint): Likewise.
2740 (clear_breakpoint_conditions): Change parameter type to
2741 'struct gdb_breakpoint *'.
2742 (clear_breakpoint_commands): Likewise.
2743 (clear_breakpoint_conditions_and_commands): Likewise.
2744 (add_condition_to_breakpoint): Likewise.
2745 (add_breakpoint_condition): Likewise.
2746 (add_commands_to_breakpoint): Likewise.
2747 (check_breakpoints): Check other_breakpoint.
2748 (clone_one_breakpoint): Clone breakpopint according to its type.
2749 * mem-break.h (struct gdb_breakpoint): Declare.
2750 (set_gdb_breakpoint): Update declaration.
2751 (clear_breakpoint_conditions_and_commands): Likewise.
2752 (add_breakpoint_condition): Likewise.
2753 (add_breakpoint_commands): Likewise.
2754 * server.c (process_point_options): Change parameter type to
2755 'struct gdb_breakpoint *'.
2756
2757 2016-07-21 Yao Qi <yao.qi@linaro.org>
2758
2759 * mem-break.c (set_breakpoint_at): Rename it to ...
2760 (set_breakpoint_type_at): ... it.
2761 (set_breakpoint_at): Call set_breakpoint_type_at.
2762 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
2763 * mem-break.h (set_breakpoint_at): Update comments.
2764
2765 2016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
2766
2767 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
2768 to buf parameter.
2769 (nios2_store_gregset): Likewise.
2770
2771 2016-07-01 Pedro Alves <palves@redhat.com>
2772 Antoine Tremblay <antoine.tremblay@ericsson.com>
2773
2774 * linux-low.c: Change interface to take the target lwp_info
2775 pointer directly and return void. Handle detaching from a zombie
2776 thread.
2777 (linux_detach_lwp_callback): New function.
2778 (linux_detach): Detach from the leader thread after detaching from
2779 the clone threads.
2780
2781 2016-06-28 Yao Qi <yao.qi@linaro.org>
2782
2783 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
2784 for variable new_offset.
2785 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
2786 (aarch64_ftrace_insn_reloc_cb): Likewise.
2787 (aarch64_ftrace_insn_reloc_tb): Likewise.
2788 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
2789 PRIx64 instead of PRIx32.
2790
2791 2016-06-28 Yao Qi <yao.qi@linaro.org>
2792
2793 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
2794 (the_low_target): Install arm_get_syscall_trapinfo.
2795
2796 2016-06-28 Yao Qi <yao.qi@linaro.org>
2797
2798 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
2799 function.
2800 (the_low_target): Install aarch64_get_syscall_trapinfo.
2801
2802 2016-06-28 Yao Qi <yao.qi@linaro.org>
2803
2804 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
2805 Callers updated.
2806 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
2807 Remove parameter sysno.
2808 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
2809 sysret.
2810
2811 2016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
2812
2813 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
2814 (s390_emit_ne_goto): Likewise.
2815 (s390_emit_lt_goto): Likewise.
2816 (s390_emit_le_goto): Likewise.
2817 (s390_emit_gt_goto): Likewise.
2818 (s390_emit_ge_goto): Likewise.
2819 (s390x_emit_eq_goto): Likewise.
2820 (s390x_emit_ne_goto): Likewise.
2821 (s390x_emit_lt_goto): Likewise.
2822 (s390x_emit_le_goto): Likewise.
2823 (s390x_emit_gt_goto): Likewise.
2824 (s390x_emit_ge_goto): Likewise.
2825 (s390_emit_ops_impl): Mark variable static.
2826 (s390x_emit_ops): Likewise.
2827
2828 2016-06-17 Yao Qi <yao.qi@linaro.org>
2829
2830 * linux-low.c (handle_extended_wait): Call
2831 uninsert_reinsert_breakpoints for the parent process. Remove
2832 reinsert breakpoints from the child process. Reinsert them to
2833 the parent process when vfork is done.
2834 * mem-break.c (uninsert_reinsert_breakpoints): New function.
2835 (reinsert_reinsert_breakpoints): New function.
2836 * mem-break.h (uninsert_reinsert_breakpoints): Declare
2837 (reinsert_reinsert_breakpoints): Declare.
2838
2839 2016-06-17 Yao Qi <yao.qi@linaro.org>
2840
2841 * linux-low.c (handle_extended_wait): If the parent is doing
2842 step-over, remove the reinsert breakpoints from the forked child.
2843
2844 2016-06-17 Yao Qi <yao.qi@linaro.org>
2845
2846 * linux-low.c (unsuspend_all_lwps): Declare.
2847 (linux_low_filter_event): If thread exited, call finish_step_over.
2848 If step-over is finished, unsuspend other threads.
2849
2850 2016-06-17 Yao Qi <yao.qi@linaro.org>
2851
2852 * linux-low.c (linux_resume_one_lwp_throw): Assert
2853 has_reinsert_breakpoints returns false.
2854 * mem-break.c (delete_disabled_breakpoints): Assert
2855 bp type isn't reinsert_breakpoint.
2856
2857 2016-06-17 Yao Qi <yao.qi@linaro.org>
2858
2859 * linux-low.c (maybe_hw_step): New function.
2860 (linux_resume_one_lwp_throw): Call maybe_hw_step.
2861 (finish_step_over): Switch current_thread to lwp temporarily,
2862 and assert has_reinsert_breakpoints returns true.
2863 (proceed_one_lwp): Call maybe_hw_step.
2864 * mem-break.c (has_reinsert_breakpoints): New function.
2865 * mem-break.h (has_reinsert_breakpoints): Declare.
2866
2867 2016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
2868
2869 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
2870
2871 2016-05-17 Yao Qi <yao.qi@linaro.org>
2872
2873 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
2874 instead of find_inferior.
2875
2876 2016-05-05 Yao Qi <yao.qi@linaro.org>
2877
2878 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
2879 Initialize res to zero.
2880
2881 2016-05-05 Yao Qi <yao.qi@linaro.org>
2882
2883 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
2884 to uint32_t.
2885
2886 2016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
2887
2888 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
2889 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
2890 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
2891
2892 2016-04-28 Par Olsson <par.olsson@windriver.com>
2893 Simon Marchi <simon.marchi@ericsson.com>
2894
2895 * tracepoint.c (write_inferior_int8): New function.
2896 (cmd_qtenable_disable): Write enable flag using
2897 write_inferior_int8.
2898
2899 2016-04-25 Yao Qi <yao.qi@linaro.org>
2900
2901 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
2902 (need_step_over_p): Return zero if the LWP has pending signals
2903 can be delivered on software single step target.
2904
2905 2016-04-25 Yao Qi <yao.qi@linaro.org>
2906
2907 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
2908 return instead of error.
2909
2910 2016-04-22 Yao Qi <yao.qi@linaro.org>
2911
2912 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
2913 to 23.
2914
2915 2016-04-22 Yao Qi <yao.qi@linaro.org>
2916
2917 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
2918 signal when stepping over breakpoint with software single
2919 step.
2920
2921 2016-04-21 Pedro Alves <palves@redhat.com>
2922
2923 * linux-s390-low.c (s390_collect_ptrace_register)
2924 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
2925 add casts.
2926 (s390_check_regset): Use void * instead of gdb_byte *.
2927
2928 2016-04-20 Pedro Alves <palves@redhat.com>
2929
2930 * configure: Renegerate.
2931
2932 2016-04-20 Yao Qi <yao.qi@linaro.org>
2933
2934 * linux-aarch32-low.c: Include "arch/arm-linux.h".
2935 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
2936 number 16.
2937 (arm_store_gregset): Likewise.
2938
2939 2016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
2940
2941 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
2942 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
2943 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
2944 (amd64-avx-mpx-linux.c): New rules.
2945 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
2946 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
2947 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
2948 (srv_amd64_regobj): Add amd64-avx-mpx.o.
2949 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
2950 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
2951 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
2952 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
2953 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
2954 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
2955 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
2956 * linux-x86-low.c (x86_linux_read_description): Add case for
2957 X86_XSTATE_AVX_MPX_MASK.
2958 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
2959 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
2960 init_registers_i386_avx_mpx_linux.
2961 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
2962 (initialize_low_tracepoint): Call
2963 init_registers_i386_avx_mpx_linux.
2964 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
2965 (initialize_low_tracepoint): Call
2966 init_registers_amd64_avx_mpx_linux.
2967 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
2968 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
2969 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
2970 declarations.
2971
2972 2016-04-18 Pedro Alves <palves@redhat.com>
2973
2974 * configure: Regenerate.
2975
2976 2016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
2977
2978 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
2979 (aarch64_emit_sub): Likewise.
2980
2981 2016-04-12 Pedro Alves <palves@redhat.com>
2982
2983 * utils.c (prepare_to_throw_exception): Delete.
2984
2985 2016-04-05 Simon Marchi <simon.marchi@ericsson.com>
2986
2987 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
2988
2989 2016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
2990
2991 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
2992
2993 2016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
2994
2995 * linux-aarch64-ipa.c: Add <elf.h> include.
2996 * linux-ppc-ipa.c: Add <elf.h> include.
2997 * linux-s390-ipa.c: Add <elf.h> include.
2998
2999 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
3000
3001 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
3002 (get_raw_reg_ptr): Likewise.
3003 (get_trace_state_variable_value_ptr): Likewise.
3004 (set_trace_state_variable_value_ptr): Likewise.
3005 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
3006 char *.
3007
3008 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
3009 Marcin Kościelnicki <koriakin@0x04.net>
3010
3011 PR/17221
3012 * linux-ppc-low.c (emit_insns): New function.
3013 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
3014 (ppc_emit_prologue): New function.
3015 (ppc_emit_epilogue): New function.
3016 (ppc_emit_add): New function.
3017 (ppc_emit_sub): New function.
3018 (ppc_emit_mul): New function.
3019 (ppc_emit_lsh): New function.
3020 (ppc_emit_rsh_signed): New function.
3021 (ppc_emit_rsh_unsigned): New function.
3022 (ppc_emit_ext): New function.
3023 (ppc_emit_zero_ext): New function.
3024 (ppc_emit_log_not): New function.
3025 (ppc_emit_bit_and): New function.
3026 (ppc_emit_bit_or): New function.
3027 (ppc_emit_bit_xor): New function.
3028 (ppc_emit_bit_not): New function.
3029 (ppc_emit_equal): New function.
3030 (ppc_emit_less_signed): New function.
3031 (ppc_emit_less_unsigned): New function.
3032 (ppc_emit_ref): New function.
3033 (ppc_emit_const): New function.
3034 (ppc_emit_reg): New function.
3035 (ppc_emit_pop): New function.
3036 (ppc_emit_stack_flush): New function.
3037 (ppc_emit_swap): New function.
3038 (ppc_emit_stack_adjust): New function.
3039 (ppc_emit_call): New function.
3040 (ppc_emit_int_call_1): New function.
3041 (ppc_emit_void_call_2): New function.
3042 (ppc_emit_if_goto): New function.
3043 (ppc_emit_goto): New function.
3044 (ppc_emit_eq_goto): New function.
3045 (ppc_emit_ne_goto): New function.
3046 (ppc_emit_lt_goto): New function.
3047 (ppc_emit_le_goto): New function.
3048 (ppc_emit_gt_goto): New function.
3049 (ppc_emit_ge_goto): New function.
3050 (ppc_write_goto_address): New function.
3051 (ppc_emit_ops_impl): New static variable.
3052 (ppc64v1_emit_prologue): New function.
3053 (ppc64v2_emit_prologue): New function.
3054 (ppc64_emit_epilogue): New function.
3055 (ppc64_emit_add): New function.
3056 (ppc64_emit_sub): New function.
3057 (ppc64_emit_mul): New function.
3058 (ppc64_emit_lsh): New function.
3059 (ppc64_emit_rsh_signed): New function.
3060 (ppc64_emit_rsh_unsigned): New function.
3061 (ppc64_emit_ext): New function.
3062 (ppc64_emit_zero_ext): New function.
3063 (ppc64_emit_log_not): New function.
3064 (ppc64_emit_bit_and): New function.
3065 (ppc64_emit_bit_or): New function.
3066 (ppc64_emit_bit_xor): New function.
3067 (ppc64_emit_bit_not): New function.
3068 (ppc64_emit_equal): New function.
3069 (ppc64_emit_less_signed): New function.
3070 (ppc64_emit_less_unsigned): New function.
3071 (ppc64_emit_ref): New function.
3072 (ppc64_emit_const): New function.
3073 (ppc64v1_emit_reg): New function.
3074 (ppc64v2_emit_reg): New function.
3075 (ppc64_emit_pop): New function.
3076 (ppc64_emit_stack_flush): New function.
3077 (ppc64_emit_swap): New function.
3078 (ppc64v1_emit_call): New function.
3079 (ppc64v2_emit_call): New function.
3080 (ppc64v1_emit_int_call_1): New function.
3081 (ppc64v2_emit_int_call_1): New function.
3082 (ppc64v1_emit_void_call_2): New function.
3083 (ppc64v2_emit_void_call_2): New function.
3084 (ppc64_emit_if_goto): New function.
3085 (ppc64_emit_eq_goto): New function.
3086 (ppc64_emit_ne_goto): New function.
3087 (ppc64_emit_lt_goto): New function.
3088 (ppc64_emit_le_goto): New function.
3089 (ppc64_emit_gt_goto): New function.
3090 (ppc64_emit_ge_goto): New function.
3091 (ppc64v1_emit_ops_impl): New static variable.
3092 (ppc64v2_emit_ops_impl): New static variable.
3093 (ppc_emit_ops): New function.
3094 (linux_low_target): Wire in ppc_emit_ops.
3095
3096 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
3097 Marcin Kościelnicki <koriakin@0x04.net>
3098
3099 PR/17221
3100 * Makefile.in: Add powerpc-*-ipa.o
3101 * configure.srv: Add ipa_obj for powerpc*-linux.
3102 * linux-ppc-ipa.c: New file.
3103 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
3104 includes.
3105 (PPC_FIELD): New macro.
3106 (PPC_SEXT): New macro.
3107 (PPC_OP6): New macro.
3108 (PPC_BO): New macro.
3109 (PPC_LI): New macro.
3110 (PPC_BD): New macro.
3111 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
3112 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
3113 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
3114 (ppc_get_thread_area): New function.
3115 (is_elfv2_inferior): New function.
3116 (gen_ds_form): New function.
3117 (GEN_STD): New macro.
3118 (GEN_STDU): New macro.
3119 (GEN_LD): New macro.
3120 (GEN_LDU): New macro.
3121 (gen_d_form): New function.
3122 (GEN_ADDI): New macro.
3123 (GEN_ADDIS): New macro.
3124 (GEN_LI): New macro.
3125 (GEN_LIS): New macro.
3126 (GEN_ORI): New macro.
3127 (GEN_ORIS): New macro.
3128 (GEN_LWZ): New macro.
3129 (GEN_STW): New macro.
3130 (GEN_STWU): New macro.
3131 (gen_xfx_form): New function.
3132 (GEN_MFSPR): New macro.
3133 (GEN_MTSPR): New macro.
3134 (GEN_MFCR): New macro.
3135 (GEN_MTCR): New macro.
3136 (GEN_SYNC): New macro.
3137 (GEN_LWSYNC): New macro.
3138 (gen_x_form): New function.
3139 (GEN_OR): New macro.
3140 (GEN_MR): New macro.
3141 (GEN_LWARX): New macro.
3142 (GEN_STWCX): New macro.
3143 (GEN_CMPW): New macro.
3144 (gen_md_form): New function.
3145 (GEN_RLDICL): New macro.
3146 (GEN_RLDICR): New macro.
3147 (gen_i_form): New function.
3148 (GEN_B): New macro.
3149 (GEN_BL): New macro.
3150 (gen_b_form): New function.
3151 (GEN_BNE): New macro.
3152 (GEN_LOAD): New macro.
3153 (GEN_STORE): New macro.
3154 (gen_limm): New function.
3155 (gen_atomic_xchg): New function.
3156 (gen_call): New function.
3157 (ppc_relocate_instruction): New function.
3158 (ppc_install_fast_tracepoint_jump_pad): New function.
3159 (ppc_get_min_fast_tracepoint_insn_len): New function.
3160 (ppc_get_ipa_tdesc_idx): New function.
3161 (the_low_target): Wire in the new functions.
3162 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
3163 tdescs.
3164 * linux-ppc-tdesc.h: New file.
3165
3166 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
3167
3168 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
3169 (alloc_jump_pad_buffer): New function.
3170 * linux-amd64-ipa.c: Add <sys/mman.h> include.
3171 (alloc_jump_pad_buffer): New function.
3172 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
3173 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
3174 (alloc_jump_pad_buffer): New function.
3175 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
3176 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
3177 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
3178 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
3179
3180 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
3181
3182 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
3183 * linux-amd64-ipa.c: Likewise.
3184 * linux-i386-ipa.c: Likewise.
3185 * linux-s390-ipa.c: Likewise.
3186 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
3187 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
3188 set_trace_state_variable_value_ptr.
3189 (struct ipa_sym_addresses): Likewise.
3190 (symbol_list): Likewise.
3191 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
3192 accessing gdb_collect directly.
3193 (gdb_collect_ptr_type): New typedef.
3194 (get_raw_reg_ptr_type): New typedef.
3195 (get_trace_state_variable_value_ptr_type): New typedef.
3196 (set_trace_state_variable_value_ptr_type): New typedef.
3197 (gdb_collect_ptr): New global.
3198 (get_raw_reg_ptr): New global.
3199 (get_trace_state_variable_value_ptr): New global.
3200 (set_trace_state_variable_value_ptr): New global.
3201 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
3202 accessing get_raw_reg directly.
3203 (get_get_tsv_func_addr): Likewise for
3204 get_trace_state_variable_value_ptr.
3205 (get_set_tsv_func_addr): Likewise for
3206 set_trace_state_variable_value_ptr.
3207 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
3208
3209 2016-03-30 Simon Marchi <simon.marchi@ericsson.com>
3210
3211 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
3212
3213 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
3214
3215 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
3216 packets.
3217 (relocate_instruction): Remove own_buf.
3218 * server.c (own_buf): Make global.
3219 (handle_v_requests): Make global.
3220 * server.h (own_buf): New declaration.
3221 (handle_v_requests): New prototype.
3222
3223 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
3224
3225 PR 18377
3226 * linux-s390-low.c (add_insns): New function.
3227 (s390_emit_prologue): New function.
3228 (s390_emit_epilogue): New function.
3229 (s390_emit_add): New function.
3230 (s390_emit_sub): New function.
3231 (s390_emit_mul): New function.
3232 (s390_emit_lsh): New function.
3233 (s390_emit_rsh_signed): New function.
3234 (s390_emit_rsh_unsigned): New function.
3235 (s390_emit_ext): New function.
3236 (s390_emit_log_not): New function.
3237 (s390_emit_bit_and): New function.
3238 (s390_emit_bit_or): New function.
3239 (s390_emit_bit_xor): New function.
3240 (s390_emit_bit_not): New function.
3241 (s390_emit_equal): New function.
3242 (s390_emit_less_signed): New function.
3243 (s390_emit_less_unsigned): New function.
3244 (s390_emit_ref): New function.
3245 (s390_emit_if_goto): New function.
3246 (s390_emit_goto): New function.
3247 (s390_write_goto_address): New function.
3248 (s390_emit_litpool): New function.
3249 (s390_emit_const): New function.
3250 (s390_emit_call): New function.
3251 (s390_emit_reg): New function.
3252 (s390_emit_pop): New function.
3253 (s390_emit_stack_flush): New function.
3254 (s390_emit_zero_ext): New function.
3255 (s390_emit_swap): New function.
3256 (s390_emit_stack_adjust): New function.
3257 (s390_emit_set_r2): New function.
3258 (s390_emit_int_call_1): New function.
3259 (s390_emit_void_call_2): New function.
3260 (s390_emit_eq_goto): New function.
3261 (s390_emit_ne_goto): New function.
3262 (s390_emit_lt_goto): New function.
3263 (s390_emit_le_goto): New function.
3264 (s390_emit_gt_goto): New function.
3265 (s390_emit_ge_goto): New function.
3266 (s390x_emit_prologue): New function.
3267 (s390x_emit_epilogue): New function.
3268 (s390x_emit_add): New function.
3269 (s390x_emit_sub): New function.
3270 (s390x_emit_mul): New function.
3271 (s390x_emit_lsh): New function.
3272 (s390x_emit_rsh_signed): New function.
3273 (s390x_emit_rsh_unsigned): New function.
3274 (s390x_emit_ext): New function.
3275 (s390x_emit_log_not): New function.
3276 (s390x_emit_bit_and): New function.
3277 (s390x_emit_bit_or): New function.
3278 (s390x_emit_bit_xor): New function.
3279 (s390x_emit_bit_not): New function.
3280 (s390x_emit_equal): New function.
3281 (s390x_emit_less_signed): New function.
3282 (s390x_emit_less_unsigned): New function.
3283 (s390x_emit_ref): New function.
3284 (s390x_emit_if_goto): New function.
3285 (s390x_emit_const): New function.
3286 (s390x_emit_call): New function.
3287 (s390x_emit_reg): New function.
3288 (s390x_emit_pop): New function.
3289 (s390x_emit_stack_flush): New function.
3290 (s390x_emit_zero_ext): New function.
3291 (s390x_emit_swap): New function.
3292 (s390x_emit_stack_adjust): New function.
3293 (s390x_emit_int_call_1): New function.
3294 (s390x_emit_void_call_2): New function.
3295 (s390x_emit_eq_goto): New function.
3296 (s390x_emit_ne_goto): New function.
3297 (s390x_emit_lt_goto): New function.
3298 (s390x_emit_le_goto): New function.
3299 (s390x_emit_gt_goto): New function.
3300 (s390x_emit_ge_goto): New function.
3301 (s390_emit_ops): New function.
3302 (struct linux_target_ops): Fill in emit_ops hook.
3303
3304 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
3305
3306 PR 18377
3307 * Makefile.in: Add s390 IPA files.
3308 * configure.srv: Build IPA for s390.
3309 * linux-s390-ipa.c: New file.
3310 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
3311 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
3312 (tdesc_s390_linux32): Likewise.
3313 (init_registers_s390_linux32v1): Likewise.
3314 (tdesc_s390_linux32v1): Likewise.
3315 (init_registers_s390_linux32v2): Likewise.
3316 (tdesc_s390_linux32v2): Likewise.
3317 (init_registers_s390_linux64): Likewise.
3318 (tdesc_s390_linux64): Likewise.
3319 (init_registers_s390_linux64v1): Likewise.
3320 (tdesc_s390_linux64v1): Likewise.
3321 (init_registers_s390_linux64v2): Likewise.
3322 (tdesc_s390_linux64v2): Likewise.
3323 (init_registers_s390_te_linux64): Likewise.
3324 (tdesc_s390_te_linux64): Likewise.
3325 (init_registers_s390_vx_linux64): Likewise.
3326 (tdesc_s390_vx_linux64): Likewise.
3327 (init_registers_s390_tevx_linux64): Likewise.
3328 (tdesc_s390_tevx_linux64): Likewise.
3329 (init_registers_s390x_linux64): Likewise.
3330 (tdesc_s390x_linux64): Likewise.
3331 (init_registers_s390x_linux64v1): Likewise.
3332 (tdesc_s390x_linux64v1): Likewise.
3333 (init_registers_s390x_linux64v2): Likewise.
3334 (tdesc_s390x_linux64v2): Likewise.
3335 (init_registers_s390x_te_linux64): Likewise.
3336 (tdesc_s390x_te_linux64): Likewise.
3337 (init_registers_s390x_vx_linux64): Likewise.
3338 (tdesc_s390x_vx_linux64): Likewise.
3339 (init_registers_s390x_tevx_linux64): Likewise.
3340 (tdesc_s390x_tevx_linux64): Likewise.
3341 (have_hwcap_s390_vx): New static variable.
3342 (s390_arch_setup): Fill have_hwcap_s390_vx.
3343 (s390_get_thread_area): New function.
3344 (s390_ft_entry_gpr_esa): New const.
3345 (s390_ft_entry_gpr_zarch): New const.
3346 (s390_ft_entry_misc): New const.
3347 (s390_ft_entry_fr): New const.
3348 (s390_ft_entry_vr): New const.
3349 (s390_ft_main_31): New const.
3350 (s390_ft_main_64): New const.
3351 (s390_ft_exit_fr): New const.
3352 (s390_ft_exit_vr): New const.
3353 (s390_ft_exit_misc): New const.
3354 (s390_ft_exit_gpr_esa): New const.
3355 (s390_ft_exit_gpr_zarch): New const.
3356 (append_insns): New function.
3357 (s390_relocate_instruction): New function.
3358 (s390_install_fast_tracepoint_jump_pad): New function.
3359 (s390_get_min_fast_tracepoint_insn_len): New function.
3360 (s390_get_ipa_tdesc_idx): New function.
3361 (struct linux_target_ops): Wire in the above functions.
3362 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
3363 * linux-s390-tdesc.h: New file.
3364
3365 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
3366
3367 * linux-s390-low.c (s390_supports_tracepoints): New function.
3368 (struct linux_target_ops): Fill supports_tracepoints hook.
3369
3370 2016-03-18 Yao Qi <yao.qi@linaro.org>
3371
3372 * linux-low.c (lwp_signal_can_be_delivered): New function.
3373 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
3374
3375 2016-03-18 Yao Qi <yao.qi@linaro.org>
3376
3377 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
3378 0 if signal is enqueued. Remove 'signal' from one debugging
3379 message. Move one debugging message to some lines below.
3380 Remove code setting 'signal' to 0.
3381
3382 2016-03-18 Yao Qi <yao.qi@linaro.org>
3383
3384 * linux-low.c (linux_low_filter_event): Remove redundant
3385 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
3386
3387 2016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
3388
3389 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
3390 (struct linux_target_ops): Wire in the above.
3391
3392 2016-03-03 Yao Qi <yao.qi@linaro.org>
3393
3394 * linux-low.c: Update comments to start_step_over.
3395
3396 2016-03-03 Yao Qi <yao.qi@linaro.org>
3397
3398 PR server/19736
3399 * linux-low.c (handle_extended_wait): Set child suspended
3400 if event_lwp->bp_reinsert isn't zero.
3401
3402 2016-03-02 Yao Qi <yao.qi@linaro.org>
3403
3404 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
3405 enqueue_pending_signal.
3406
3407 2016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
3408
3409 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
3410 is actually loaded.
3411
3412 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
3413
3414 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
3415 (s390_regmap_3264) [!__s390x__]: New global.
3416 (s390_collect_ptrace_register): Skip map entries containing -1.
3417 (s390_supply_ptrace_register): Ditto.
3418 (s390_fill_gprs_high): New function.
3419 (s390_store_gprs_high): New function.
3420 (s390_regsets): Add NT_S390_HIGH_GPRS.
3421 (s390_get_hwcap): Enable on 31-bit.
3422 (have_hwcap_s390_high_gprs): Enable on 31-bit.
3423 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
3424 Detect NT_S390_HIGH_GPRS.
3425 (s390_usrregs_info_3264): Enable on 31-bit.
3426 (s390_regs_info): Enable regs_info_3264 on 31-bit.
3427 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
3428
3429 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
3430
3431 PR gdb/13808
3432 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
3433 * configure.srv: Ditto.
3434 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
3435 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
3436 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
3437 (init_registers_amd64_linux): Remove prototype.
3438 (tdesc_amd64_linux): Remove declaration.
3439 (get_ipa_tdesc): New function.
3440 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
3441 initialize remaining tdescs.
3442 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
3443 (init_registers_i386_linux): Remove prototype.
3444 (tdesc_i386_linux): Remove declaration.
3445 (get_ipa_tdesc): New function.
3446 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
3447 initialize remaining tdescs.
3448 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
3449 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
3450 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
3451 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
3452 (x86_get_ipa_tdesc_idx): New function.
3453 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
3454 * linux-x86-tdesc.h: New file.
3455 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
3456 (target_get_ipa_tdesc_idx): New macro.
3457 * tracepoint.c (ipa_tdesc_idx): New macro.
3458 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
3459 (symbol_list): Add ipa_tdesc_idx.
3460 (cmd_qtstart): Write ipa_tdesc_idx in the target.
3461 (ipa_tdesc): Remove.
3462 (ipa_tdesc_idx): New variable.
3463 (get_context_regcache): Use get_ipa_tdesc.
3464 (gdb_collect): Ditto.
3465 (gdb_probe): Ditto.
3466 * tracepoint.h (get_ipa_tdesc): New prototype.
3467 (ipa_tdesc): Remove.
3468
3469 2016-02-24 Pedro Alves <palves@redhat.com>
3470
3471 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
3472 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
3473 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
3474 Factor out common code between the USE_SIGTRAP_SIGINFO and
3475 !USE_SIGTRAP_SIGINFO blocks.
3476 (linux_low_filter_event): Call save_stop_reason instead of
3477 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
3478 Update comments.
3479 (linux_wait_1): Update comments.
3480
3481 2016-02-24 Wei-cheng Wang <cole945@gmail.com>
3482
3483 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
3484 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
3485 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
3486 ppc_insert_point, ppc_remove_point.
3487
3488 2016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
3489
3490 * linux-s390-low.c (s390_supports_z_point_type): New function.
3491 (struct linux_target_ops): Wire s390_supports_z_point_type in.
3492
3493 2016-02-16 Yao Qi <yao.qi@linaro.org>
3494
3495 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
3496 PC. Get pc from regcache_read_pc.
3497
3498 2016-02-12 Yao Qi <yao.qi@linaro.org>
3499
3500 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
3501 or linux_get_pc_32bit.
3502 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
3503
3504 2016-02-12 Yao Qi <yao.qi@linaro.org>
3505
3506 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
3507 arm_linux_get_next_pcs_fixup.
3508
3509 2016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
3510
3511 * tracepoint.c (x_tracepoint_action_download): Change
3512 write_inferior_data_ptr to write_inferior_data_pointer.
3513 (cmd_qtstart): Likewise.
3514 (write_inferior_data_ptr): Remove.
3515 (download_agent_expr): Change write_inferior_data_ptr to
3516 write_inferior_data_pointer.
3517 (download_tracepoint_1): Likewise.
3518 (download_tracepoint): Likewise.
3519 (download_trace_state_variables): Likewise.
3520
3521 2016-02-11 Wei-cheng Wang <cole945@gmail.com>
3522 Marcin Kościelnicki <koriakin@0x04.net>
3523
3524 * tracepoint.c (struct tracepoint_action_ops): Remove.
3525 (struct tracepoint_action): Remove ops.
3526 (m_tracepoint_action_download, r_tracepoint_action_download)
3527 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
3528 size and offset accordingly.
3529 (m_tracepoint_action_ops, r_tracepoint_action_ops)
3530 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
3531 (tracepoint_action_send, tracepoint_action_download): New functions.
3532 Helpers for trace action handlers.
3533 (add_tracepoint_action): Remove setup actions ops.
3534 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
3535
3536 2016-02-10 Yao Qi <yao.qi@linaro.org>
3537
3538 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
3539
3540 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
3541
3542 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
3543 to AC_OUTPUT.
3544 * configure: Regenerate.
3545
3546 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
3547
3548 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
3549 void * to gdb_byte *.
3550 * linux-low.c (siginfo_fixup): Likewise.
3551 (linux_xfer_siginfo): Likewise.
3552 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
3553 Likewise.
3554 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
3555
3556 2016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
3557
3558 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
3559 to srv_tgtobj.
3560 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
3561 to srv_tgtobj.
3562 * linux-x86-low.c [__x86_64__]: Include
3563 "nat/amd64-linux-siginfo.h".
3564 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
3565 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
3566 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
3567 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
3568 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
3569 (cpt_si_fd, si_timerid, si_overrun): Move from
3570 nat/amd64-linux-siginfo.c.
3571 * Makefile.in (amd64-linux-siginfo.o:): New rule.
3572
3573 2016-01-28 Simon Marchi <simon.marchi@ericsson.com>
3574
3575 * server.c (skip_to_semicolon): Remove.
3576 (process_point_options): Use strchrnul instead of
3577 skip_to_semicolon.
3578
3579 2016-01-26 Yao Qi <yao.qi@linaro.org>
3580
3581 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
3582 * linux-low.c (install_software_single_step_breakpoints): Don't
3583 call regcache_read_pc.
3584 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
3585 argument pc.
3586
3587 2016-01-26 Yao Qi <yao.qi@linaro.org>
3588
3589 * linux-low.c (install_software_single_step_breakpoints): Call
3590 regcache_read_pc instead of get_pc.
3591
3592 2016-01-26 Yao Qi <yao.qi@linaro.org>
3593
3594 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
3595 (unblock_async_io): Rename to ...
3596 (block_unblock_async_io): ... it. New function.
3597 (enable_async_io): Don't install SIGIO handler. Unblock it
3598 instead.
3599 (disable_async_io): Don't ignore SIGIO. Block it instead.
3600 (initialize_async_io): Install SIGIO handler. Don't call
3601 unblock_async_io.
3602
3603 2016-01-26 Yao Qi <yao.qi@linaro.org>
3604
3605 * remote-utils.c (getpkt): If the buffer isn't empty, and the
3606 first character is '\003', call *the_target->request_interrupt.
3607
3608 2016-01-25 Yao Qi <yao.qi@linaro.org>
3609
3610 * remote-utils.c (new_thread_notify): Remove.
3611 (dead_thread_notify): Likewise.
3612 * remote-utils.h (new_thread_notify): Remove declaration.
3613 (dead_thread_notify): Likewise.
3614
3615 2016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
3616
3617 * gdb.trace/pending.exp: Fix expected message on continue.
3618
3619 2016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
3620
3621 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
3622 it works properly on big-endian machines where sizeof (CORE_ADDR)
3623 != sizeof (void *).
3624
3625 2016-01-21 Pedro Alves <palves@redhat.com>
3626
3627 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
3628 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
3629 * configure: Regenerate.
3630
3631 2016-01-21 Yao Qi <yao.qi@linaro.org>
3632
3633 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
3634 is_thumb and set it according to CPSR saved on the stack.
3635 (get_next_pcs_syscall_next_pc): Pass is_thumb to
3636 arm_sigreturn_next_pc.
3637
3638 2016-01-18 Yao Qi <yao.qi@linaro.org>
3639
3640 * linux-low.c (linux_set_pc_64bit): New function.
3641 (linux_get_pc_64bit): New function.
3642 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
3643 Declare.
3644 * linux-sparc-low.c (debug_threads): Remove declaration.
3645 (sparc_get_pc): Remove.
3646 (the_low_target): Use linux_get_pc_64bit instead of
3647 sparc_get_pc.
3648 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
3649 (the_low_target): Use linux_get_pc_64bit and
3650 linux_set_pc_64bit.
3651
3652 2016-01-18 Yao Qi <yao.qi@linaro.org>
3653
3654 * linux-arm-low.c (debug_threads): Remove declaration.
3655 (arm_get_pc, arm_set_pc): Remove.
3656 (the_low_target): Use linux_get_pc_32bit and
3657 linux_set_pc_32bit.
3658 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
3659 (the_low_target): Use linux_get_pc_32bit and
3660 linux_set_pc_32bit.
3661 * linux-cris-low.c (debug_threads): Remove declaration.
3662 (cris_get_pc, cris_set_pc,): Remove.
3663 (the_low_target): Use linux_get_pc_32bit and
3664 linux_set_pc_32bit.
3665 * linux-crisv32-low.c (debug_threads): Remove declaration.
3666 (cris_get_pc, cris_set_pc): Remove.
3667 (the_low_target): Use linux_get_pc_32bit and
3668 linux_set_pc_32bit.
3669 * linux-low.c: Include inttypes.h.
3670 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
3671 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
3672 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
3673 (the_low_target): Use linux_get_pc_32bit and
3674 linux_set_pc_32bit.
3675 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
3676 (the_low_target): Use linux_get_pc_32bit and
3677 linux_set_pc_32bit.
3678 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
3679 (the_low_target): Use linux_get_pc_32bit and
3680 linux_set_pc_32bit.
3681 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
3682 (the_low_target): Use linux_get_pc_32bit and
3683 linux_set_pc_32bit.
3684 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
3685 (the_low_target): Use linux_get_pc_32bit and
3686 linux_set_pc_32bit.
3687
3688 2016-01-18 Gary Benson <gbenson@redhat.com>
3689
3690 * configure.ac (AC_FUNC_FORK): New check.
3691 * config.in: Regenerate.
3692 * configure: Likewise.
3693
3694 2016-01-14 Yao Qi <yao.qi@linaro.org>
3695
3696 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
3697 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
3698 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
3699 arm_get_next_pcs_ctor.
3700
3701 2016-01-12 Josh Stone <jistone@redhat.com>
3702 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3703
3704 * inferiors.h: Include "gdb_vecs.h".
3705 (struct process_info): Add syscalls_to_catch.
3706 * inferiors.c (remove_process): Free syscalls_to_catch.
3707 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
3708 syscall_return stops.
3709 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
3710 * server.c (handle_general_set): Handle QCatchSyscalls.
3711 (handle_query): Report support for QCatchSyscalls.
3712 * target.h (struct target_ops): Add supports_catch_syscall.
3713 (target_supports_catch_syscall): New macro.
3714 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
3715 (struct lwp_info): Add syscall_state.
3716 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
3717 Maintain syscall_state and syscalls_to_catch across exec.
3718 (get_syscall_trapinfo): New function, proxy to the_low_target.
3719 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
3720 (linux_low_filter_event): Toggle syscall_state entry/return for
3721 syscall traps, and set it ignored for all others.
3722 (gdb_catching_syscalls_p): New function.
3723 (gdb_catch_this_syscall_p): New function.
3724 (linux_wait_1): Handle SYSCALL_SIGTRAP.
3725 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
3726 (linux_supports_catch_syscall): New function.
3727 (linux_target_ops): Install it.
3728 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
3729 (the_low_target): Install it.
3730
3731 2016-01-12 Mike Frysinger <vapier@gentoo.org>
3732
3733 * acinclude.m4: Include new ../warning.m4 file.
3734 * configure: Regenerated.
3735 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
3736
3737 2016-01-12 Mike Frysinger <vapier@gentoo.org>
3738
3739 * ax.c (is_goto_target): Mark static.
3740 * linux-low.c (register_addr): Likewise.
3741 (linux_fetch_registers, linux_store_registers): Likewise.
3742 * mem-break.c (any_persistent_commands): Fix old prototype.
3743 (add_commands_to_breakpoint): Mark static.
3744 * regcache.c (find_register_by_name): Delete unused func.
3745 * remote-utils.c (hex_or_minus_one): Mark static.
3746 * server.c (monitor_show_help): Mark static.
3747 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
3748 handle_v_requests): Likewise.
3749
3750 2016-01-12 Pedro Alves <palves@redhat.com>
3751
3752 Remove use of the registered trademark symbol throughout.
3753
3754 2016-01-08 Yao Qi <yao.qi@linaro.org>
3755
3756 * remote-utils.c (getpkt): If c is '\003', call target hook
3757 request_interrupt.
3758
3759 2016-01-06 Yao Qi <yao.qi@linaro.org>
3760
3761 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
3762 linux-aarch32-low.c.
3763 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3764 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
3765 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
3766 (thumb2_breakpoint): Declare.
3767 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
3768 linux-aarch32-low.h.
3769 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3770 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
3771 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
3772
3773 2016-01-01 Joel Brobecker <brobecker@adacore.com>
3774
3775 * gdbreplay.c (gdbreplay_version): Change copyright year in
3776 version message.
3777 * server.c (gdbserver_version): Likewise.
3778
3779 2015-12-28 Patrick Palka <patrick@parcs.ath.cx>
3780
3781 * server.c (crc32_table): Delete.
3782 (crc32): Use libiberty's xcrc32 function.
3783
3784 2015-12-22 Joel Brobecker <brobecker@adacore.com>
3785
3786 * lynx-low.c (lynx_delete_thread_callback): New function.
3787 (lynx_mourn): Properly delete our process and all of its
3788 threads. Remove call to clear_inferiors.
3789
3790 2015-12-22 Joel Brobecker <brobecker@adacore.com>
3791
3792 * target.c (thread_search_callback): Add check that
3793 the thread_stopped target callback is not NULL before
3794 calling it.
3795
3796 2015-12-21 Yao Qi <yao.qi@linaro.org>
3797
3798 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
3799 arm breakpoint.
3800
3801 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3802
3803 * server.c (handle_query): Call target_supports_software_single_step.
3804
3805 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3806
3807 * linux-low.c (single_step): New function.
3808 (linux_resume_one_lwp_throw): Call single_step.
3809 (start_step_over): Likewise.
3810
3811 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3812
3813 * Makefile.in (SFILES): Append arch/arm-linux.c,
3814 arch/arm-get-next-pcs.c.
3815 (arm-linux.o): New rule.
3816 (arm-get-next-pcs.o): New rule.
3817 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
3818 arm-linux.o.
3819 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
3820 to linux-aarch32-low.c.
3821 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3822 (arm_breakpoint_len, thumb_breakpoint): Likewise.
3823 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
3824 (thumb2_breakpoint_len): Likewise.
3825 (arm_is_thumb_mode): Make non-static.
3826 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
3827 from linux-aarch32-low.c.
3828 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3829 (arm_breakpoint_len, thumb_breakpoint): Likewise.
3830 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
3831 (thumb2_breakpoint_len): Likewise.
3832 (arm_is_thumb_mode): New declaration.
3833 * linux-arm-low.c: Include arch/arm-linux.h
3834 aarch/arm-get-next-pcs.h, sys/syscall.h.
3835 (get_next_pcs_ops): New struct.
3836 (get_next_pcs_addr_bits_remove): New function.
3837 (get_next_pcs_is_thumb): New function.
3838 (get_next_pcs_read_memory_unsigned_integer): Likewise.
3839 (arm_sigreturn_next_pc): Likewise.
3840 (get_next_pcs_syscall_next_pc): Likewise.
3841 (arm_gdbserver_get_next_pcs): Likewise.
3842 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
3843 Initialize.
3844 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
3845 * server.h: Include gdb_vecs.h.
3846
3847 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3848
3849 * Makefile.in (SFILES): Append common/common-regcache.c.
3850 (OBS): Append common-regcache.o.
3851 (common-regcache.o): New rule.
3852 * regcache.c (init_register_cache): Initialize cache to
3853 REG_UNAVAILABLE.
3854 (regcache_raw_read_unsigned): New function.
3855 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
3856 register_status enum.
3857
3858 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3859
3860 * linux-aarch64-low.c (the_low_targets): Rename
3861 breakpoint_reinsert_addr to get_next_pcs.
3862 * linux-arm-low.c (the_low_targets): Likewise.
3863 * linux-bfin-low.c (the_low_targets): Likewise.
3864 * linux-cris-low.c (the_low_targets): Likewise.
3865 * linux-crisv32-low.c (the_low_targets): Likewise.
3866 * linux-low.c (can_software_single_step): Likewise.
3867 (install_software_single_step_breakpoints): New function.
3868 (start_step_over): Use install_software_single_step_breakpoints.
3869 * linux-low.h: New CORE_ADDR vector.
3870 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
3871 get_next_pcs.
3872 * linux-mips-low.c (the_low_targets): Likewise.
3873 * linux-nios2-low.c (the_low_targets): Likewise.
3874 * linux-sparc-low.c (the_low_targets): Likewise.
3875
3876 2015-12-17 Pedro Alves <palves@redhat.com>
3877
3878 * linux-low.c (linux_kill_one_lwp): Remove references to
3879 LinuxThreads.
3880 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
3881 to 'kill'.
3882 (linux_init_signals): Delete.
3883 (initialize_low): Adjust.
3884 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
3885
3886 2015-12-16 Pedro Alves <palves@redhat.com>
3887
3888 * configure.ac (compiler warning flags): When testing a
3889 -Wno-foo option, check whether -Wfoo works instead.
3890 * configure: Regenerate.
3891
3892 2015-12-11 Don Breazeal <donb@codesourcery.com>
3893
3894 * server.c (process_serial_event): Don't exit from gdbserver
3895 in remote mode if there are still active inferiors.
3896
3897 2015-12-11 Yao Qi <yao.qi@linaro.org>
3898
3899 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
3900 arm_breakpoint_at if the process is 32-bit.
3901
3902 2015-12-11 Yao Qi <yao.qi@linaro.org>
3903
3904 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
3905 arm breakpoint.
3906
3907 2015-12-07 Yao Qi <yao.qi@linaro.org>
3908
3909 * configure.srv: Append arm.o to srv_tgtobj for
3910 aarch64*-*-linux* target.
3911 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
3912 from linux-arm-low.c.
3913 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3914 (arm_breakpoint_len, thumb_breakpoint): Likewise.
3915 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
3916 (thumb2_breakpoint_len): Likewise.
3917 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
3918 (arm_breakpoint_kinds): Likewise.
3919 (arm_breakpoint_kind_from_pc): Likewise.
3920 (arm_sw_breakpoint_from_kind): Likewise.
3921 (arm_breakpoint_kind_from_current_state): Likewise.
3922 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
3923 (arm_sw_breakpoint_from_kind): Declare.
3924 (arm_breakpoint_kind_from_current_state): Declare.
3925 (arm_breakpoint_at): Declare.
3926 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
3927 arm_sw_breakpoint_from_kind if process is 32-bit.
3928 (aarch64_breakpoint_kind_from_pc): New function.
3929 (aarch64_breakpoint_kind_from_current_state): New function.
3930 (the_low_target): Initialize fields breakpoint_kind_from_pc
3931 and breakpoint_kind_from_current_state.
3932 * linux-arm-low.c (arm_breakpoint_kinds): Move to
3933 linux-aarch32-low.c.
3934 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
3935 (arm_breakpoint, arm_breakpoint_len): Likewise.
3936 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
3937 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
3938 (arm_is_thumb_mode): Likewise.
3939 (arm_breakpoint_at): Likewise.
3940 (arm_breakpoint_kind_from_pc): Likewise.
3941 (arm_sw_breakpoint_from_kind): Likewise.
3942 (arm_breakpoint_kind_from_current_state): Likewise.
3943
3944 Revert:
3945 2015-08-04 Yao Qi <yao.qi@linaro.org>
3946
3947 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
3948 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
3949 * server.c (extended_protocol): Remove "static".
3950 * server.h (extended_protocol): Declare it.
3951
3952 2015-12-04 Josh Stone <jistone@redhat.com>
3953
3954 * target.h (struct target_ops) <arch_setup>: Rename to ...
3955 (struct target_ops) <post_create_inferior>: ... this.
3956 (target_arch_setup): Rename to ...
3957 (target_post_create_inferior): ... this, calling post_create_inferior.
3958 * server.c (start_inferior): Update target_arch_setup calls to
3959 target_post_create_inferior.
3960 * linux-low.c (linux_low_ptrace_options): Forward declare.
3961 (linux_arch_setup): Update its comment for general use.
3962 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
3963 (struct linux_target_ops): Use linux_post_create_inferior.
3964 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
3965 to post_create_inferior.
3966 * nto-low.c (struct nto_target_ops): Likewise.
3967 * spu-low.c (struct spu_target_ops): Likewise.
3968 * win32-low.c (struct win32_target_ops): Likewise.
3969
3970 2015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
3971
3972 * linux-arm-low.c: Remove duplicate arch/arm.h include.
3973
3974 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3975
3976 * linux-arm-low.c (arm_reinsert_addr): Remove function.
3977 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
3978 * linux-cris-low.c (cris_reinsert_addr> Remove function.
3979 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3980 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
3981 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3982 * linux-mips-low.c (mips_reinsert_addr): Remove function.
3983 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3984 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
3985 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3986 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
3987 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3988
3989 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3990
3991 * linux-low.c (linux_look_up_symbols): Don't call
3992 linux_supports_traceclone.
3993 * linux-low.h (thread_db_init): Remove use_events argument.
3994 * thread-db.c (thread_db_use_event): Remove global variable.
3995 (struct thread_db) <td_thr_event_enable_p>: Remove field.
3996 (struct thread_db) <td_create_bp>: Remove field.
3997 (thread_db_create_event): Remove function.
3998 (thread_db_enable_reporting): Likewise.
3999 (find_one_thread): Don't check for thread_db_use_events.
4000 (attach_thread): Likewise.
4001 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
4002 (try_thread_db_load_1): Don't check for thread_db_use_events.
4003 (thread_db_init): Remove use_events argument and thread events
4004 handling.
4005 (remove_thread_event_breakpoints): Remove function.
4006 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
4007
4008 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4009
4010 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
4011 New function.
4012 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4013 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
4014 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4015 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
4016 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
4017 Initialize.
4018 * linux-crisv32-low.c (cris_supports_hardware_single_step):
4019 New function.
4020 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4021 * linux-low.c (can_hardware_single_step): Use
4022 supports_hardware_single_step.
4023 (can_software_single_step): New function.
4024 (start_step_over): Call can_software_single_step.
4025 (linux_supports_hardware_single_step): New function.
4026 (struct target_ops) <supports_software_single_step>: Initialize.
4027 * linux-low.h (struct linux_target_ops)
4028 <supports_hardware_single_step>: Initialize.
4029 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
4030 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4031 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
4032 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
4033 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
4034 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4035 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
4036 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4037 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
4038 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
4039 Initialize.
4040 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
4041 (struct linux_target_ops) <tile_supports_hardware_single_step>:
4042 Initialize.
4043 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
4044 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4045 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
4046 New function.
4047 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4048 * target.h (struct target_ops): <supports_software_single_step>:
4049 New field.
4050 (target_supports_software_single_step): New macro.
4051
4052 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4053
4054 * linux-low.c (linux_wait_1): Fix pc advance condition.
4055 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
4056 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
4057
4058 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4059
4060 * linux-arm-low.c (arm_is_thumb_mode): New function.
4061 (arm_breakpoint_at): Use arm_is_thumb_mode.
4062 (arm_breakpoint_kind_from_current_state): New function.
4063 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
4064 Initialize.
4065 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
4066 (linux_breakpoint_kind_from_current_state): New function.
4067 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
4068 * linux-low.h (struct linux_target_ops)
4069 <breakpoint_kind_from_current_state>: New field.
4070 * target.h (struct target_ops): Likewise.
4071 (target_breakpoint_kind_from_current_state): New macro.
4072
4073 2015-11-30 Pedro Alves <palves@redhat.com>
4074
4075 * linux-low.c (linux_resume): Wake up the event loop before
4076 returning.
4077
4078 2015-11-30 Pedro Alves <palves@redhat.com>
4079
4080 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
4081 check.
4082 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
4083 to -1.
4084 * target.c (struct thread_search): New structure.
4085 (thread_search_callback): New function.
4086 (prev_general_thread): New global.
4087 (prepare_to_access_memory, done_accessing_memory): New functions.
4088 * target.h (prepare_to_access_memory, done_accessing_memory):
4089 Replace macros with function declarations.
4090
4091 2015-11-30 Pedro Alves <palves@redhat.com>
4092
4093 PR 14618
4094 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
4095 report TARGET_WAITKIND_NO_RESUMED.
4096 * remote-utils.c (prepare_resume_reply): Handle
4097 TARGET_WAITKIND_NO_RESUMED.
4098 * server.c (report_no_resumed): New global.
4099 (handle_query) <qSupported>: Handle "no-resumed+". Report
4100 "no-resumed+" support.
4101 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
4102 return error if the client doesn't support no-resumed events.
4103 (push_stop_notification): New function.
4104 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
4105 events if the client supports them.
4106
4107 2015-11-30 Pedro Alves <palves@redhat.com>
4108
4109 * linux-low.c (thread_still_has_status_pending_p): Don't check
4110 vCont;t here.
4111 (lwp_resumed): New function.
4112 (status_pending_p_callback): Return early if the LWP is not
4113 supposed to be resumed.
4114
4115 2015-11-30 Pedro Alves <palves@redhat.com>
4116
4117 * linux-low.c (handle_extended_wait): Assert that the LWP's
4118 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
4119 thread create events, leave the new child's status pending.
4120 (linux_low_filter_event): If GDB wants to hear about thread exit
4121 events, leave the LWP marked dead and don't delete it.
4122 (linux_wait_for_event_filtered): Don't check for thread exit.
4123 (filter_exit_event): New function.
4124 (linux_wait_1): Use it, when returning an exit event.
4125 (linux_resume_one_lwp_throw): Assert that the LWP's
4126 waitstatus is TARGET_WAITKIND_IGNORE.
4127 * remote-utils.c (prepare_resume_reply): Handle
4128 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
4129 * server.c (report_thread_events): New global.
4130 (handle_general_set): Handle QThreadEvents.
4131 (handle_query) <qSupported>: Handle and report QThreadEvents+;
4132 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
4133 TARGET_WAITKIND_THREAD_EXITED.
4134 * server.h (report_thread_events): Declare.
4135
4136 2015-11-30 Pedro Alves <palves@redhat.com>
4137
4138 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
4139 the thread's last_resume_kind was resume_stop.
4140
4141 2015-11-30 Pedro Alves <palves@redhat.com>
4142
4143 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
4144 before returning.
4145
4146 2015-11-30 Pedro Alves <palves@redhat.com>
4147
4148 * server.c (handle_v_requests): Handle vCtrlC.
4149
4150 2015-11-30 Pedro Alves <palves@redhat.com>
4151
4152 * gdbthread.h (find_any_thread_of_pid): Declare.
4153 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
4154 functions.
4155 * server.c (handle_query): If current_thread is NULL, look for
4156 another thread of the selected process.
4157
4158 2015-11-26 Daniel Colascione <dancol@dancol.org>
4159 Simon Marchi <simon.marchi@ericsson.com>
4160
4161 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
4162 * server.c (handle_qxfer_threads_worker): Refactor to include thread
4163 name in reply.
4164 * target.h (struct target_ops) <thread_name>: New field.
4165 (target_thread_name): New macro.
4166
4167 2015-11-23 Joel Brobecker <brobecker@adacore.com>
4168
4169 * regcache.h (regcache_invalidate_pid): Add declaration.
4170 * regcache.c (regcache_invalidate_pid): New function, extracted
4171 from regcache_invalidate.
4172 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
4173 Add trivial documentation comment.
4174 * lynx-low.c: Use regcache_invalidate_pid instead of
4175 regcache_invalidate.
4176
4177 2015-11-23 Joel Brobecker <brobecker@adacore.com>
4178
4179 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
4180 and Elf64_auxv_t if the target is Android.
4181
4182 2015-11-22 Doug Evans <xdje42@gmail.com>
4183
4184 * target.h: #include <sys/types.h>.
4185
4186 2015-11-19 Pedro Alves <palves@redhat.com>
4187
4188 * linux-low.c (linux_process_qsupported): Change prototype.
4189 Adjust.
4190 * linux-low.h (struct linux_target_ops) <process_qsupported>:
4191 Change prototype.
4192 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
4193 and adjust to loop over all features.
4194 * server.c (handle_query) <qSupported>: Adjust to call
4195 target_process_qsupported once, passing it a vector of unprocessed
4196 features.
4197 * target.h (struct target_ops) <process_qsupported>: Change
4198 prototype.
4199 (target_process_qsupported): Adjust.
4200
4201 2015-11-19 Pedro Alves <palves@redhat.com>
4202
4203 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
4204 mode.
4205 * configure: Regenerate.
4206
4207 2015-11-19 Pedro Alves <palves@redhat.com>
4208
4209 * configure: Regenerate.
4210
4211 2015-11-19 Yao Qi <yao.qi@linaro.org>
4212
4213 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
4214 type to uint32_t.
4215
4216 2015-11-19 Yao Qi <yao.qi@linaro.org>
4217
4218 * linux-aarch64-low.c (enum aarch64_operand_type): New.
4219 (struct aarch64_operand): Move enum out.
4220
4221 2015-11-19 Yao Qi <yao.qi@linaro.org>
4222
4223 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
4224 struct user_fpsimd_state *.
4225 (aarch64_store_fpregset): Likewise.
4226
4227 2015-11-19 Yao Qi <yao.qi@linaro.org>
4228
4229 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
4230 struct user_pt_regs *.
4231 (aarch64_store_gregset): Likewise.
4232
4233 2015-11-18 Pedro Alves <palves@redhat.com>
4234
4235 * Makefile.in (all_object_files): Add $IPA_OBJS.
4236
4237 2015-11-17 Pedro Alves <palves@redhat.com>
4238
4239 * win32-low.c (win32_resume): Use gdb_signal_from_host,
4240 GDB_SIGNAL_0 and gdb_signal_to_string.
4241
4242 2015-11-17 Pedro Alves <palves@redhat.com>
4243
4244 * win32-low.c (handle_output_debug_string): Remove parameter.
4245 (win32_kill): Remove our_status local and adjust call to
4246 handle_output_debug_string.
4247 (get_child_debug_event): Adjust call to
4248 handle_output_debug_string.
4249
4250 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4251
4252 * linux-mips-low.c (mips_fill_gregset): Add cast.
4253 (mips_store_gregset): Likewise.
4254 (mips_fill_fpregset): Likewise.
4255 (mips_store_fpregset): Likewise.
4256
4257 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4258
4259 * linux-mips-low.c (mips_add_watchpoint): Rename private to
4260 priv.
4261
4262 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4263
4264 * linux-mips-low.c (mips_linux_new_thread): Change type of
4265 watch_type to enum target_hw_bp_type.
4266
4267 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4268
4269 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
4270 Change return type to arm_hwbp_type.
4271
4272 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4273
4274 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
4275 (arm_store_gregset): Likewise.
4276 * linux-arm-low.c (arm_get_hwcap): Likewise.
4277 (arm_read_description): Likewise.
4278
4279 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4280
4281 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
4282
4283 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4284
4285 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
4286 (ppc_fill_vsxregset): Likewise.
4287 (ppc_store_vsxregset): Likewise.
4288 (ppc_fill_vrregset): Likewise.
4289 (ppc_store_vrregset): Likewise.
4290 (ppc_fill_evrregset): Likewise.
4291 (ppc_store_evrregset): Likewise.
4292
4293 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4294
4295 * linux-ppc-low.c (ppc_usrregs_info): Remove
4296 forward-declaration.
4297 (ppc_arch_setup): Move lower in file.
4298
4299 2015-10-30 Simon Marchi <simon.marchi@ericsson.com>
4300
4301 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
4302 (ps_pdwrite): Likewise.
4303
4304 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
4305
4306 * linux-arm-low.c (arm_new_thread): Move pointer dereference
4307 to after assert checks.
4308
4309 2015-10-29 Simon Marchi <simon.marchi@ericsson.com>
4310
4311 * proc-service.c (ps_pdread): Add/adjust casts.
4312 (ps_pdwrite): Add/adjust casts.
4313
4314 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
4315
4316 * server.c (handle_search_memory_1): Cast return value of
4317 memmem.
4318
4319 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
4320
4321 * server.c (write_qxfer_response): Change type of data to
4322 gdb_byte *.
4323
4324 2015-10-29 Pedro Alves <palves@redhat.com>
4325
4326 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
4327
4328 2015-10-29 Pedro Alves <palves@redhat.com>
4329
4330 * tracepoint.c (clear_installed_tracepoints): Add casts.
4331
4332 2015-10-29 Pedro Alves <palves@redhat.com>
4333
4334 * server.c (handle_v_cont, process_serial_event): Add enum
4335 gdb_signal casts to signal parsing code.
4336
4337 2015-10-29 Pedro Alves <palves@redhat.com>
4338
4339 * linux-low.h (NULL_REGSET): Define.
4340 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
4341 * linux-arm-low.c (arm_regsets): Likewise.
4342 * linux-crisv32-low.c (cris_regsets): Likewise.
4343 * linux-m68k-low.c (m68k_regsets): Likewise.
4344 * linux-mips-low.c (mips_regsets): Likewise.
4345 * linux-nios2-low.c (nios2_regsets): Likewise.
4346 * linux-ppc-low.c (ppc_regsets): Likewise.
4347 * linux-s390-low.c (s390_regsets): Likewise.
4348 * linux-sh-low.c (sh_regsets): Likewise.
4349 * linux-sparc-low.c (sparc_regsets): Likewise.
4350 * linux-tic6x-low.c (tic6x_regsets): Likewise.
4351 * linux-tile-low.c (tile_regsets): Likewise.
4352 * linux-x86-low.c (x86_regsets): Likewise.
4353 * linux-xtensa-low.c (xtensa_regsets): Likewise.
4354
4355 2015-10-29 Pedro Alves <palves@redhat.com>
4356
4357 * linux-low.h (NULL_REGSET): Define.
4358 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
4359 * linux-arm-low.c (arm_regsets): Likewise.
4360 * linux-crisv32-low.c (cris_regsets): Likewise.
4361 * linux-m68k-low.c (m68k_regsets): Likewise.
4362 * linux-mips-low.c (mips_regsets): Likewise.
4363 * linux-nios2-low.c (nios2_regsets): Likewise.
4364 * linux-ppc-low.c (ppc_regsets): Likewise.
4365 * linux-s390-low.c (s390_regsets): Likewise.
4366 * linux-sh-low.c (sh_regsets): Likewise.
4367 * linux-sparc-low.c (sparc_regsets): Likewise.
4368 * linux-tic6x-low.c (tic6x_regsets): Likewise.
4369 * linux-tile-low.c (tile_regsets): Likewise.
4370 * linux-x86-low.c (x86_regsets): Likewise.
4371 * linux-xtensa-low.c (xtensa_regsets): Likewise.
4372
4373 2015-10-26 Doug Evans <dje@google.com>
4374
4375 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
4376
4377 2015-10-26 Doug Evans <dje@google.com>
4378
4379 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
4380
4381 2015-10-26 Doug Evans <dje@google.com>
4382
4383 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
4384 for debug_printf.
4385 (attach_thread, find_new_threads_callback): Ditto.
4386
4387 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
4388
4389 * mem-break.h (set_breakpoint_data): Remove.
4390
4391 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
4392
4393 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
4394 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
4395 (initialize_low): Remove set_breakpoint_data call.
4396 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
4397 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
4398 (initialize_low): Remove set_breakpoint_data call.
4399 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
4400 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
4401 (initialize_low): Remove set_breakpoint_data call.
4402
4403 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
4404
4405 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
4406 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
4407 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
4408 * target.h (target_breakpoint_kind_from_pc): New macro.
4409
4410 2015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
4411
4412 * linux-low.c (default_breakpoint_kind_from_pc): New function.
4413 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
4414 the default breakpoint kind.
4415
4416 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4417
4418 * linux-arm-low.c (arm_supports_z_point_type): Add software
4419 breakpoint support.
4420
4421 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4422
4423 * linux-arm-low.c: Refactor breakpoint definitions.
4424 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
4425 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
4426
4427 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4428
4429 * Makefile.in: Add arm.c/o.
4430 * configure.srv: Likewise.
4431 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
4432 (arm_breakpoint_kind_from_pc): New function.
4433 (arm_sw_breakpoint_from_kind): Return proper kind.
4434 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
4435
4436 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4437
4438 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
4439 removal.
4440 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
4441 (struct raw_breakpoint) <size>: Remove.
4442 (struct raw_breakpoint) <kind>: Add.
4443 (bp_size): New function.
4444 (bp_opcode): Likewise.
4445 (find_raw_breakpoint_at): Adjust for kind.
4446 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
4447 (remove_memory_breakpoint): Adjust for kind call bp_size.
4448 (set_raw_breakpoint_at): Adjust for kind.
4449 (set_breakpoint): Likewise.
4450 (set_breakpoint_at): Call breakpoint_kind_from_pc.
4451 (delete_raw_breakpoint): Adjust for kind.
4452 (delete_breakpoint): Likewise.
4453 (find_gdb_breakpoint): Likewise.
4454 (set_gdb_breakpoint_1): Likewise.
4455 (set_gdb_breakpoint): Likewise.
4456 (delete_gdb_breakpoint_1): Likewise.
4457 (delete_gdb_breakpoint): Likewise.
4458 (uninsert_raw_breakpoint): Likewise.
4459 (reinsert_raw_breakpoint): Likewise.
4460 (set_breakpoint_data): Remove.
4461 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
4462 (check_mem_read): Adjust for kind call bp_size.
4463 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
4464 (clone_one_breakpoint): Adjust for kind.
4465 * mem-break.h (set_gdb_breakpoint): Likewise.
4466 (delete_gdb_breakpoint): Likewise.
4467 * server.c (process_serial_event): Likewise.
4468
4469 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4470
4471 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
4472 (struct linux_target_ops) <breakpoint>: Remove.
4473 (struct linux_target_ops) <breakpoint_len>: Remove.
4474 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4475 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4476 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
4477 (arm_sw_breakpoint_from_kind): New function.
4478 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
4479 (struct linux_target_ops) <breakpoint>: Remove.
4480 (struct linux_target_ops) <breakpoint_len>: Remove.
4481 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4482 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4483 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
4484 (struct linux_target_ops) <breakpoint>: Remove.
4485 (struct linux_target_ops) <breakpoint_len>: Remove.
4486 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4487 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4488 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
4489 (struct linux_target_ops) <breakpoint>: Remove.
4490 (struct linux_target_ops) <breakpoint_len>: Remove.
4491 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4492 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4493 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
4494 and sw_breakpoint_from_kind to increment the pc.
4495 (linux_breakpoint_kind_from_pc): New function.
4496 (linux_sw_breakpoint_from_kind): New function.
4497 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
4498 (initialize_low): Call breakpoint_kind_from_pc and
4499 sw_breakpoint_from_kind to replace breakpoint_data/len.
4500 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
4501 New field.
4502 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
4503 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
4504 (struct linux_target_ops) <breakpoint>: Remove.
4505 (struct linux_target_ops) <breakpoint_len>: Remove.
4506 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4507 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4508 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
4509 (struct linux_target_ops) <breakpoint>: Remove.
4510 (struct linux_target_ops) <breakpoint_len>: Remove.
4511 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4512 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4513 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
4514 (struct linux_target_ops) <breakpoint>: Remove.
4515 (struct linux_target_ops) <breakpoint_len>: Remove.
4516 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4517 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4518 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
4519 (struct linux_target_ops) <breakpoint>: Remove.
4520 (struct linux_target_ops) <breakpoint_len>: Remove.
4521 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4522 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4523 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
4524 (struct linux_target_ops) <breakpoint>: Remove.
4525 (struct linux_target_ops) <breakpoint_len>: Remove.
4526 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4527 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4528 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
4529 (struct linux_target_ops) <breakpoint>: Remove.
4530 (struct linux_target_ops) <breakpoint_len>: Remove.
4531 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4532 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4533 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
4534 (struct linux_target_ops) <breakpoint>: Remove.
4535 (struct linux_target_ops) <breakpoint_len>: Remove.
4536 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4537 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4538 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
4539 (struct linux_target_ops) <breakpoint>: Remove.
4540 (struct linux_target_ops) <breakpoint_len>: Remove.
4541 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4542 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4543 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
4544 (struct linux_target_ops) <breakpoint>: Remove.
4545 (struct linux_target_ops) <breakpoint_len>: Remove.
4546 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4547 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4548 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
4549 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
4550 (struct linux_target_ops) <breakpoint>: Remove.
4551 (struct linux_target_ops) <breakpoint_len>: Remove.
4552 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4553 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4554 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
4555 (struct linux_target_ops) <breakpoint>: Remove.
4556 (struct linux_target_ops) <breakpoint_len>: Remove.
4557 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4558 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4559
4560 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4561
4562 * linux-cris-low.c (cris_get_pc): Remove void arg.
4563
4564 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
4565
4566 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
4567 variable name.
4568
4569 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
4570
4571 * inferiors.c (thread_pid_matches_callback): New function.
4572 (find_thread_process): New function.
4573 (remove_thread): Reset current_thread.
4574 (remove_process): Assert threads have been removed first.
4575
4576 2015-10-15 Yao Qi <yao.qi@linaro.org>
4577
4578 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
4579 if it is 3.
4580 (aarch64_remove_point): Likewise.
4581 * regcache.c (regcache_register_size): New function.
4582
4583 2015-10-12 Yao Qi <yao.qi@linaro.org>
4584
4585 * linux-aarch64-low.c: Update all callers as emit_load_store
4586 is renamed to aarch64_emit_load_store.
4587
4588 2015-10-12 Yao Qi <yao.qi@linaro.org>
4589
4590 * linux-aarch64-low.c: Update all callers of function renaming
4591 from emit_insn to aarch64_emit_insn.
4592
4593 2015-10-12 Yao Qi <yao.qi@linaro.org>
4594
4595 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
4596 arch/aarch64-insn.h.
4597 (struct aarch64_memory_operand): Likewise.
4598 (ENCODE): Likewise.
4599 (emit_insn): Move to arch/aarch64-insn.c.
4600 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
4601 (emit_load_store): Move to arch/aarch64-insn.c.
4602 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
4603 (can_encode_int32): Remove.
4604
4605 2015-10-12 Yao Qi <yao.qi@linaro.org>
4606
4607 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
4608 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
4609 (aarch64_relocate_instruction): Likewise.
4610 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
4611 (struct aarch64_insn_visitor): Likewise.
4612
4613 2015-10-12 Yao Qi <yao.qi@linaro.org>
4614
4615 * linux-aarch64-low.c (struct aarch64_insn_data): New.
4616 (struct aarch64_insn_visitor): New.
4617 (struct aarch64_insn_relocation_data): New.
4618 (aarch64_ftrace_insn_reloc_b): New function.
4619 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
4620 (aarch64_ftrace_insn_reloc_cb): Likewise.
4621 (aarch64_ftrace_insn_reloc_tb): Likewise.
4622 (aarch64_ftrace_insn_reloc_adr): Likewise.
4623 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
4624 (aarch64_ftrace_insn_reloc_others): Likewise.
4625 (visitor): New.
4626 (aarch64_relocate_instruction): Use visitor.
4627
4628 2015-10-12 Yao Qi <yao.qi@linaro.org>
4629
4630 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
4631 int. Add argument buf.
4632 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
4633 aarch64_relocate_instruction.
4634
4635 2015-10-12 Yao Qi <yao.qi@linaro.org>
4636
4637 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
4638 argument insn. Remove local variable insn. Don't call
4639 target_read_uint32.
4640 (aarch64_install_fast_tracepoint_jump_pad): Call
4641 target_read_uint32.
4642
4643 2015-09-30 Yao Qi <yao.qi@linaro.org>
4644
4645 * linux-aarch64-low.c (emit_movk): Shorten a long line.
4646 (emit_load_store_pair): Likewise.
4647
4648 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
4649
4650 * dll.c (match_dll): Add cast(s).
4651 (unloaded_dll): Likewise.
4652 * linux-low.c (second_thread_of_pid_p): Likewise.
4653 (delete_lwp_callback): Likewise.
4654 (count_events_callback): Likewise.
4655 (select_event_lwp_callback): Likewise.
4656 (linux_set_resume_request): Likewise.
4657 * server.c (accumulate_file_name_length): Likewise.
4658 (emit_dll_description): Likewise.
4659 (handle_qxfer_threads_worker): Likewise.
4660 (visit_actioned_threads): Likewise.
4661 * thread-db.c (any_thread_of): Likewise.
4662 * tracepoint.c (same_process_p): Likewise.
4663 (match_blocktype): Likewise.
4664 (build_traceframe_info_xml): Likewise.
4665
4666 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
4667
4668 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
4669 assignment.
4670 (gdb_unparse_agent_expr): Likewise.
4671 * hostio.c (require_data): Likewise.
4672 (handle_pread): Likewise.
4673 * linux-low.c (disable_regset): Likewise.
4674 (fetch_register): Likewise.
4675 (store_register): Likewise.
4676 (get_dynamic): Likewise.
4677 (linux_qxfer_libraries_svr4): Likewise.
4678 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
4679 (set_fast_tracepoint_jump): Likewise.
4680 (uninsert_fast_tracepoint_jumps_at): Likewise.
4681 (reinsert_fast_tracepoint_jumps_at): Likewise.
4682 (validate_inserted_breakpoint): Likewise.
4683 (clone_agent_expr): Likewise.
4684 * regcache.c (init_register_cache): Likewise.
4685 * remote-utils.c (putpkt_binary_1): Likewise.
4686 (decode_M_packet): Likewise.
4687 (decode_X_packet): Likewise.
4688 (look_up_one_symbol): Likewise.
4689 (relocate_instruction): Likewise.
4690 (monitor_output): Likewise.
4691 * server.c (handle_search_memory): Likewise.
4692 (handle_qxfer_exec_file): Likewise.
4693 (handle_qxfer_libraries): Likewise.
4694 (handle_qxfer): Likewise.
4695 (handle_query): Likewise.
4696 (handle_v_cont): Likewise.
4697 (handle_v_run): Likewise.
4698 (captured_main): Likewise.
4699 * target.c (write_inferior_memory): Likewise.
4700 * thread-db.c (try_thread_db_load_from_dir): Likewise.
4701 * tracepoint.c (init_trace_buffer): Likewise.
4702 (add_tracepoint_action): Likewise.
4703 (add_traceframe): Likewise.
4704 (add_traceframe_block): Likewise.
4705 (cmd_qtdpsrc): Likewise.
4706 (cmd_qtdv): Likewise.
4707 (cmd_qtstatus): Likewise.
4708 (response_source): Likewise.
4709 (response_tsv): Likewise.
4710 (cmd_qtnotes): Likewise.
4711 (gdb_collect): Likewise.
4712 (initialize_tracepoint): Likewise.
4713
4714 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
4715
4716 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
4717 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
4718 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
4719 <NOP>: New.
4720 (enum aarch64_condition_codes): New enum.
4721 (w0): New static global.
4722 (fp): Likewise.
4723 (lr): Likewise.
4724 (struct aarch64_memory_operand) <type>: New
4725 MEMORY_OPERAND_POSTINDEX type.
4726 (postindex_memory_operand): New helper function.
4727 (emit_ret): New function.
4728 (emit_load_store_pair): New function, factored out of emit_stp
4729 with support for MEMORY_OPERAND_POSTINDEX.
4730 (emit_stp): Rewrite using emit_load_store_pair.
4731 (emit_ldp): New function.
4732 (emit_load_store): Likewise.
4733 (emit_ldr): Mention post-index instruction in comment.
4734 (emit_ldrh): New function.
4735 (emit_ldrb): New function.
4736 (emit_ldrsw): Mention post-index instruction in comment.
4737 (emit_str): Likewise.
4738 (emit_subs): New function.
4739 (emit_cmp): Likewise.
4740 (emit_and): Likewise.
4741 (emit_orr): Likewise.
4742 (emit_orn): Likewise.
4743 (emit_eor): Likewise.
4744 (emit_mvn): Likewise.
4745 (emit_lslv): Likewise.
4746 (emit_lsrv): Likewise.
4747 (emit_asrv): Likewise.
4748 (emit_mul): Likewise.
4749 (emit_sbfm): Likewise.
4750 (emit_sbfx): Likewise.
4751 (emit_ubfm): Likewise.
4752 (emit_ubfx): Likewise.
4753 (emit_csinc): Likewise.
4754 (emit_cset): Likewise.
4755 (emit_nop): Likewise.
4756 (emit_ops_insns): New helper function.
4757 (emit_pop): Likewise.
4758 (emit_push): Likewise.
4759 (aarch64_emit_prologue): New function.
4760 (aarch64_emit_epilogue): Likewise.
4761 (aarch64_emit_add): Likewise.
4762 (aarch64_emit_sub): Likewise.
4763 (aarch64_emit_mul): Likewise.
4764 (aarch64_emit_lsh): Likewise.
4765 (aarch64_emit_rsh_signed): Likewise.
4766 (aarch64_emit_rsh_unsigned): Likewise.
4767 (aarch64_emit_ext): Likewise.
4768 (aarch64_emit_log_not): Likewise.
4769 (aarch64_emit_bit_and): Likewise.
4770 (aarch64_emit_bit_or): Likewise.
4771 (aarch64_emit_bit_xor): Likewise.
4772 (aarch64_emit_bit_not): Likewise.
4773 (aarch64_emit_equal): Likewise.
4774 (aarch64_emit_less_signed): Likewise.
4775 (aarch64_emit_less_unsigned): Likewise.
4776 (aarch64_emit_ref): Likewise.
4777 (aarch64_emit_if_goto): Likewise.
4778 (aarch64_emit_goto): Likewise.
4779 (aarch64_write_goto_address): Likewise.
4780 (aarch64_emit_const): Likewise.
4781 (aarch64_emit_call): Likewise.
4782 (aarch64_emit_reg): Likewise.
4783 (aarch64_emit_pop): Likewise.
4784 (aarch64_emit_stack_flush): Likewise.
4785 (aarch64_emit_zero_ext): Likewise.
4786 (aarch64_emit_swap): Likewise.
4787 (aarch64_emit_stack_adjust): Likewise.
4788 (aarch64_emit_int_call_1): Likewise.
4789 (aarch64_emit_void_call_2): Likewise.
4790 (aarch64_emit_eq_goto): Likewise.
4791 (aarch64_emit_ne_goto): Likewise.
4792 (aarch64_emit_lt_goto): Likewise.
4793 (aarch64_emit_le_goto): Likewise.
4794 (aarch64_emit_gt_goto): Likewise.
4795 (aarch64_emit_ge_got): Likewise.
4796 (aarch64_emit_ops_impl): New static global variable.
4797 (aarch64_emit_ops): New target function, return
4798 &aarch64_emit_ops_impl.
4799 (struct linux_target_ops): Install it.
4800
4801 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
4802
4803 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
4804 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
4805 aarch64-ipa.o.
4806 * linux-aarch64-ipa.c: New file.
4807 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
4808 and endian.h.
4809 (aarch64_get_thread_area): New target method.
4810 (extract_signed_bitfield): New helper function.
4811 (aarch64_decode_ldr_literal): New function.
4812 (enum aarch64_opcodes): New enum.
4813 (struct aarch64_register): New struct.
4814 (struct aarch64_operand): New struct.
4815 (x0): New static global.
4816 (x1): Likewise.
4817 (x2): Likewise.
4818 (x3): Likewise.
4819 (x4): Likewise.
4820 (w2): Likewise.
4821 (ip0): Likewise.
4822 (sp): Likewise.
4823 (xzr): Likewise.
4824 (aarch64_register): New helper function.
4825 (register_operand): Likewise.
4826 (immediate_operand): Likewise.
4827 (struct aarch64_memory_operand): New struct.
4828 (offset_memory_operand): New helper function.
4829 (preindex_memory_operand): Likewise.
4830 (enum aarch64_system_control_registers): New enum.
4831 (ENCODE): New macro.
4832 (emit_insn): New helper function.
4833 (emit_b): New function.
4834 (emit_bcond): Likewise.
4835 (emit_cb): Likewise.
4836 (emit_tb): Likewise.
4837 (emit_blr): Likewise.
4838 (emit_stp): Likewise.
4839 (emit_ldp_q_offset): Likewise.
4840 (emit_stp_q_offset): Likewise.
4841 (emit_load_store): Likewise.
4842 (emit_ldr): Likewise.
4843 (emit_ldrsw): Likewise.
4844 (emit_str): Likewise.
4845 (emit_ldaxr): Likewise.
4846 (emit_stxr): Likewise.
4847 (emit_stlr): Likewise.
4848 (emit_data_processing_reg): Likewise.
4849 (emit_data_processing): Likewise.
4850 (emit_add): Likewise.
4851 (emit_sub): Likewise.
4852 (emit_mov): Likewise.
4853 (emit_movk): Likewise.
4854 (emit_mov_addr): Likewise.
4855 (emit_mrs): Likewise.
4856 (emit_msr): Likewise.
4857 (emit_sevl): Likewise.
4858 (emit_wfe): Likewise.
4859 (append_insns): Likewise.
4860 (can_encode_int32_in): New helper function.
4861 (aarch64_relocate_instruction): New function.
4862 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
4863 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
4864 (struct linux_target_ops): Install aarch64_get_thread_area,
4865 aarch64_install_fast_tracepoint_jump_pad and
4866 aarch64_get_min_fast_tracepoint_insn_len.
4867
4868 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
4869
4870 * Makefile.in (aarch64-insn.o): New rule.
4871 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
4872
4873 2015-09-21 Yao Qi <yao.qi@linaro.org>
4874
4875 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
4876
4877 2015-09-21 Yao Qi <yao.qi@linaro.org>
4878
4879 * tracepoint.c (max_jump_pad_size): Remove.
4880
4881 2015-09-18 Yao Qi <yao.qi@linaro.org>
4882
4883 * linux-aarch64-low.c: Don't include sys/uio.h.
4884 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
4885
4886 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
4887
4888 * tracepoint.c (eval_result_type): Change prototype.
4889 (condition_true_at_tracepoint): Fix argument to compiled_cond.
4890
4891 2015-09-15 Pedro Alves <palves@redhat.com>
4892
4893 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
4894 Check whether to report exec events instead of checking whether
4895 multiprocess is enabled.
4896
4897 2015-09-15 Pedro Alves <palves@redhat.com>
4898
4899 PR remote/18965
4900 * remote-utils.c (prepare_resume_reply): Merge
4901 TARGET_WAITKIND_VFORK_DONE switch case with the
4902 TARGET_WAITKIND_FORKED case.
4903
4904 2015-09-15 Yao Qi <yao.qi@linaro.org>
4905
4906 * server.c (handle_query): Check string comparison using
4907 "else if" instead of "if".
4908
4909 2015-09-15 Yao Qi <yao.qi@linaro.org>
4910
4911 * server.c (vCont_supported): New global variable.
4912 (handle_query): Set vCont_supported to 1 if "vContSupported+"
4913 matches. Append ";vContSupported+" to own_buf.
4914 (handle_v_requests): Append ";s;S" to own_buf if target supports
4915 hardware single step or vCont_supported is false.
4916 (capture_main): Set vCont_supported to zero.
4917
4918 2015-09-15 Yao Qi <yao.qi@linaro.org>
4919
4920 * linux-low.c (linux_supports_conditional_breakpoints): Rename
4921 it to ...
4922 (linux_supports_hardware_single_step): ... New function.
4923 (linux_target_ops): Update.
4924 * lynx-low.c (lynx_target_ops): Set field
4925 supports_hardware_single_step to target_can_do_hardware_single_step.
4926 * nto-low.c (nto_target_ops): Likewise.
4927 * spu-low.c (spu_target_ops): Likewise.
4928 * win32-low.c (win32_target_ops): Likewise.
4929 * target.c (target_can_do_hardware_single_step): New function.
4930 * target.h (struct target_ops) <supports_conditional_breakpoints>:
4931 Remove. <supports_hardware_single_step>: New field.
4932 (target_supports_conditional_breakpoints): Remove.
4933 (target_supports_hardware_single_step): New macro.
4934 (target_can_do_hardware_single_step): Declare.
4935 * server.c (handle_query): Use target_supports_hardware_single_step
4936 instead of target_supports_conditional_breakpoints.
4937
4938 2015-09-15 Yao Qi <yao.qi@linaro.org>
4939
4940 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
4941 function.
4942 (struct linux_target_ops the_low_target): Install
4943 aarch64_linux_siginfo_fixup.
4944
4945 2015-09-11 Don Breazeal <donb@codesourcery.com>
4946 Luis Machado <lgustavo@codesourcery.com>
4947
4948 * linux-low.c (linux_mourn): Static declaration.
4949 (linux_arch_setup): Move in front of
4950 handle_extended_wait.
4951 (linux_arch_setup_thread): New function.
4952 (handle_extended_wait): Handle exec events. Call
4953 linux_arch_setup_thread. Make event_lwp argument a
4954 pointer-to-a-pointer.
4955 (check_zombie_leaders): Do not check stopped threads.
4956 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
4957 (linux_low_filter_event): Add lwp and thread for exec'ing
4958 non-leader thread if leader thread has been deleted.
4959 Refactor code into linux_arch_setup_thread and call it.
4960 Pass child lwp pointer by reference to handle_extended_wait.
4961 (linux_wait_for_event_filtered): Update comment.
4962 (linux_wait_1): Prevent clobbering exec event status.
4963 (linux_supports_exec_events): New function.
4964 (linux_target_ops) <supports_exec_events>: Initialize new member.
4965 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
4966 new member.
4967 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
4968 * server.c (report_exec_events): New global variable.
4969 (handle_query): Handle qSupported query for exec-events feature.
4970 (captured_main): Initialize report_exec_events.
4971 * server.h (report_exec_events): Declare new global variable.
4972 * target.h (struct target_ops) <supports_exec_events>: New
4973 member.
4974 (target_supports_exec_events): New macro.
4975 * win32-low.c (win32_target_ops) <supports_exec_events>:
4976 Initialize new member.
4977
4978 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
4979
4980 * linux-low.c (linux_low_enable_btrace): Remove.
4981 (linux_target_ops): Replace linux_low_enable_btrace with
4982 linux_enable_btrace.
4983
4984 2015-09-03 Yao Qi <yao.qi@linaro.org>
4985
4986 * linux-aarch64-low.c (aarch64_insert_point): Call
4987 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
4988 returns true.
4989
4990 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
4991
4992 * linux-low.c (check_stopped_by_breakpoint): Use
4993 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
4994
4995 2015-08-27 Pedro Alves <palves@redhat.com>
4996
4997 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
4998
4999 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
5000
5001 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
5002 the XNEW-family equivalent.
5003 (compile_bytecodes): Likewise.
5004 * dll.c (loaded_dll): Likewise.
5005 * event-loop.c (append_callback_event): Likewise.
5006 (create_file_handler): Likewise.
5007 (create_file_event): Likewise.
5008 * hostio.c (handle_open): Likewise.
5009 * inferiors.c (add_thread): Likewise.
5010 (add_process): Likewise.
5011 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
5012 * linux-arm-low.c (arm_new_process): Likewise.
5013 (arm_new_thread): Likewise.
5014 * linux-low.c (add_to_pid_list): Likewise.
5015 (linux_add_process): Likewise.
5016 (handle_extended_wait): Likewise.
5017 (add_lwp): Likewise.
5018 (enqueue_one_deferred_signal): Likewise.
5019 (enqueue_pending_signal): Likewise.
5020 (linux_resume_one_lwp_throw): Likewise.
5021 (linux_resume_one_thread): Likewise.
5022 (linux_read_memory): Likewise.
5023 (linux_write_memory): Likewise.
5024 * linux-mips-low.c (mips_linux_new_process): Likewise.
5025 (mips_linux_new_thread): Likewise.
5026 (mips_add_watchpoint): Likewise.
5027 * linux-x86-low.c (initialize_low_arch): Likewise.
5028 * lynx-low.c (lynx_add_process): Likewise.
5029 * mem-break.c (set_raw_breakpoint_at): Likewise.
5030 (set_breakpoint): Likewise.
5031 (add_condition_to_breakpoint): Likewise.
5032 (add_commands_to_breakpoint): Likewise.
5033 (clone_agent_expr): Likewise.
5034 (clone_one_breakpoint): Likewise.
5035 * regcache.c (new_register_cache): Likewise.
5036 * remote-utils.c (look_up_one_symbol): Likewise.
5037 * server.c (queue_stop_reply): Likewise.
5038 (start_inferior): Likewise.
5039 (queue_stop_reply_callback): Likewise.
5040 (handle_target_event): Likewise.
5041 * spu-low.c (fetch_ppc_memory): Likewise.
5042 (store_ppc_memory): Likewise.
5043 * target.c (set_target_ops): Likewise.
5044 * thread-db.c (thread_db_load_search): Likewise.
5045 (try_thread_db_load_1): Likewise.
5046 * tracepoint.c (add_tracepoint): Likewise.
5047 (add_tracepoint_action): Likewise.
5048 (create_trace_state_variable): Likewise.
5049 (cmd_qtdpsrc): Likewise.
5050 (cmd_qtro): Likewise.
5051 (add_while_stepping_state): Likewise.
5052 * win32-low.c (child_add_thread): Likewise.
5053 (get_image_name): Likewise.
5054
5055 2015-08-25 Yao Qi <yao.qi@linaro.org>
5056
5057 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
5058
5059 2015-08-25 Yao Qi <yao.qi@linaro.org>
5060
5061 * Makefile.in (aarch64-linux.o): New rule.
5062 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
5063 srv_tgtobj.
5064 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
5065 (aarch64_init_debug_reg_state): Make it extern.
5066 (aarch64_linux_prepare_to_resume): Remove.
5067
5068 2015-08-25 Yao Qi <yao.qi@linaro.org>
5069
5070 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
5071 lwp_arch_private_info and ptid_of_lwp.
5072
5073 2015-08-25 Yao Qi <yao.qi@linaro.org>
5074
5075 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
5076 Find proc_info by find_process_pid. All callers updated.
5077
5078 2015-08-25 Yao Qi <yao.qi@linaro.org>
5079
5080 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
5081 Remove.
5082 (debug_reg_change_callback): Remove.
5083 (aarch64_notify_debug_reg_change): Remove.
5084
5085 2015-08-25 Yao Qi <yao.qi@linaro.org>
5086
5087 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
5088 Call current_lwp_ptid.
5089
5090 2015-08-25 Yao Qi <yao.qi@linaro.org>
5091
5092 * linux-aarch64-low.c (debug_reg_change_callback): Use
5093 debug_printf.
5094
5095 2015-08-25 Yao Qi <yao.qi@linaro.org>
5096
5097 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
5098
5099 2015-08-25 Yao Qi <yao.qi@linaro.org>
5100
5101 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
5102
5103 2015-08-25 Yao Qi <yao.qi@linaro.org>
5104
5105 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
5106 the code.
5107
5108 2015-08-25 Yao Qi <yao.qi@linaro.org>
5109
5110 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
5111 Remove.
5112 (debug_reg_change_callback): Remove argument entry and add argument
5113 lwp. Remove local variable thread. Don't print thread id in the
5114 debugging output. Don't check whether pid of thread equals to pid.
5115 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
5116 iterate_over_lwps instead find_inferior.
5117
5118 2015-08-24 Pedro Alves <palves@redhat.com>
5119
5120 * inferiors.c (get_first_process): New function.
5121 * inferiors.h (get_first_process): New declaration.
5122 * remote-utils.c (read_ptid): Default to the first process in the
5123 list, instead of to the current thread's process.
5124
5125 2015-08-24 Pedro Alves <palves@redhat.com>
5126
5127 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
5128 * event-loop.c: Likewise.
5129 * remote-utils.c: Likewise.
5130 * tracepoint.c: Likewise.
5131
5132 2015-08-24 Pedro Alves <palves@redhat.com>
5133
5134 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
5135 ptid_get_lwp.
5136
5137 2015-08-21 Pedro Alves <palves@redhat.com>
5138
5139 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
5140 instead of literal 1.
5141
5142 2015-08-21 Pedro Alves <palves@redhat.com>
5143
5144 * tdesc.c (default_description): Explicitly zero-initialize.
5145
5146 2015-08-21 Pedro Alves <palves@redhat.com>
5147
5148 PR gdb/18749
5149 * inferiors.c (remove_thread): Discard any pending stop reply for
5150 this thread.
5151 * server.c (remove_all_on_match_pid): Rename to ...
5152 (remove_all_on_match_ptid): ... this. Work with a filter ptid
5153 instead of a pid.
5154 (discard_queued_stop_replies): Change parameter to a ptid. Now
5155 extern.
5156 (handle_v_kill, kill_inferior_callback, captured_main)
5157 (process_serial_event): Adjust.
5158 * server.h (discard_queued_stop_replies): Declare.
5159
5160 2015-08-21 Pedro Alves <palves@redhat.com>
5161
5162 * linux-low.c (wait_for_sigstop): Always switch to no thread
5163 selected if the previously current thread dies.
5164 * lynx-low.c (lynx_request_interrupt): Use the first thread's
5165 process instead of the current thread's.
5166 * remote-utils.c (input_interrupt): Don't check if there's no
5167 current thread.
5168 * server.c (gdb_read_memory, gdb_write_memory): If setting the
5169 current thread to the general thread fails, error out.
5170 (handle_qxfer_auxv, handle_qxfer_libraries)
5171 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
5172 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
5173 (handle_query): Check if there's a thread selected instead of
5174 checking whether there's any thread in the thread list.
5175 (handle_qxfer_threads, handle_qxfer_btrace)
5176 (handle_qxfer_btrace_conf): Don't error out early if there's no
5177 thread in the thread list.
5178 (handle_v_cont, myresume): Don't set the current thread to the
5179 continue thread.
5180 (process_serial_event) <Hg handling>: Also set thread_id if the
5181 previous general thread is still alive.
5182 (process_serial_event) <g/G handling>: If setting the current
5183 thread to the general thread fails, error out.
5184 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
5185 thread's lwp instead of the current thread's.
5186 * target.c (set_desired_thread): If the desired thread was not
5187 found, leave the current thread pointing to NULL. Return an int
5188 (boolean) indicating success.
5189 * target.h (set_desired_thread): Change return type to int.
5190
5191 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
5192
5193 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
5194 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
5195 #includes.
5196 (ps_get_thread_area): New function.
5197
5198 2015-08-19 Gary Benson <gbenson@redhat.com>
5199
5200 * hostio.c (handle_pread): Do not attempt to read more data
5201 than hostio_reply_with_data can fit in a packet.
5202
5203 2015-08-18 Joel Brobecker <brobecker@adacore.com>
5204
5205 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
5206
5207 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
5208
5209 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
5210
5211 2015-08-06 Pedro Alves <palves@redhat.com>
5212
5213 * tracepoint.c (expr_eval_result): Now an int.
5214
5215 2015-08-06 Pedro Alves <palves@redhat.com>
5216
5217 * gdbthread.h (struct regcache): Forward declare.
5218 (struct thread_info) <regcache_data>: Now a struct regcache
5219 pointer.
5220 * inferiors.c (inferior_regcache_data)
5221 (set_inferior_regcache_data): Now work with struct regcache
5222 pointers.
5223 * inferiors.h (struct regcache): Forward declare.
5224 (inferior_regcache_data, set_inferior_regcache_data): Now work
5225 with struct regcache pointers.
5226 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
5227 (free_register_cache_thread): Remove struct regcache pointer
5228 casts.
5229
5230 2015-08-06 Pedro Alves <palves@redhat.com>
5231
5232 * server.c (captured_main): On error, print the exception message
5233 to stderr, and if run_once is set, throw a quit.
5234
5235 2015-08-06 Pedro Alves <palves@redhat.com>
5236
5237 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
5238 the current thread.
5239
5240 2015-08-06 Pedro Alves <palves@redhat.com>
5241
5242 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
5243 reading beyond the passed in buffer length.
5244
5245 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
5246
5247 * tracepoint.c (symbol_list) <required>: Remove.
5248
5249 2015-08-06 Pedro Alves <palves@redhat.com>
5250
5251 * linux-low.c (handle_extended_wait): Set the fork child's suspend
5252 count if stopping and suspending threads.
5253 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
5254 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
5255 (linux_detach): Complete an ongoing step-over.
5256 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
5257 throughout.
5258 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
5259 (linux_wait_1): If passing a signal to the inferior after
5260 finishing a step-over, unsuspend and re-resume all lwps. If we
5261 see a single-step event but the thread should be continuing, don't
5262 pass the trap to gdb.
5263 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
5264 internal_error instead of gdb_assert.
5265 (enqueue_pending_signal): New function.
5266 (check_ptrace_stopped_lwp_gone): Add debug output.
5267 (start_step_over): Use internal_error instead of gdb_assert.
5268 (complete_ongoing_step_over): New function.
5269 (linux_resume_one_thread): Don't resume a suspended thread.
5270 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
5271 it stepping.
5272
5273 2015-08-06 Pedro Alves <palves@redhat.com>
5274
5275 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
5276 (linux_thread_alive): Use lwp_is_marked_dead.
5277 (extended_event_reported): Delete.
5278 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
5279 instead of extended_event_reported.
5280 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
5281 as well.
5282 (lwp_is_marked_dead): New function.
5283 (lwp_running): Use lwp_is_marked_dead.
5284 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
5285 comment.
5286
5287 2015-08-06 Pedro Alves <palves@redhat.com>
5288
5289 * linux-low.c (linux_wait_1): Move fork event output out of the
5290 !report_to_gdb check. Pass event_child->waitstatus to
5291 target_waitstatus_to_string instead of ourstatus.
5292
5293 2015-08-04 Yao Qi <yao.qi@linaro.org>
5294
5295 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
5296 if current_thread is 32 bit.
5297
5298 2015-08-04 Yao Qi <yao.qi@linaro.org>
5299
5300 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
5301 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
5302 * server.c (extended_protocol): Remove "static".
5303 * server.h (extended_protocol): Declare it.
5304
5305 2015-08-04 Yao Qi <yao.qi@linaro.org>
5306
5307 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
5308 both aarch64 and aarch32.
5309 (aarch64_set_pc): Likewise.
5310
5311 2015-08-04 Yao Qi <yao.qi@linaro.org>
5312
5313 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
5314 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
5315 arm-with-neon.xml to srv_xmlfiles.
5316 * linux-aarch64-low.c: Include linux-aarch32-low.h.
5317 (is_64bit_tdesc): New function.
5318 (aarch64_linux_read_description): New function.
5319 (aarch64_arch_setup): Call aarch64_linux_read_description.
5320 (regs_info): Rename to regs_info_aarch64.
5321 (aarch64_regs_info): Return right regs_info.
5322 (initialize_low_arch): Call initialize_low_arch_aarch32.
5323
5324 2015-08-04 Yao Qi <yao.qi@linaro.org>
5325
5326 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
5327 * linux-aarch32-low.c: New file.
5328 * linux-aarch32-low.h: New file.
5329 * linux-arm-low.c (arm_fill_gregset): Move it to
5330 linux-aarch32-low.c.
5331 (arm_store_gregset): Likewise.
5332 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
5333 (arm_store_vfpregset): Call arm_store_vfpregset_num.
5334 (arm_arch_setup): Check if PTRACE_GETREGSET works.
5335 (regs_info): Rename to regs_info_arm.
5336 (arm_regs_info): Return regs_info_aarch32 if
5337 have_ptrace_getregset is 1 and target description is
5338 arm_with_neon or arm_with_vfpv3.
5339 (initialize_low_arch): Don't call init_registers_arm_with_neon.
5340 Call initialize_low_arch_aarch32 instead.
5341
5342 2015-08-04 Yao Qi <yao.qi@linaro.org>
5343
5344 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
5345 * linux-low.c: ... here.
5346 * linux-low.h (have_ptrace_getregset): Declare it.
5347
5348 2015-08-04 Pedro Alves <palves@redhat.com>
5349
5350 * thread-db.c (struct thread_db): Use new typedefs.
5351 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
5352 CHK calls.
5353 (disable_thread_event_reporting): Cast result of dlsym to
5354 destination function pointer type.
5355 (thread_db_mourn): Use td_ta_delete_ftype.
5356
5357 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
5358
5359 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
5360 arch variant.
5361 (CDX_BREAKPOINT): Define for R2.
5362 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
5363 (the_low_target): Add comments.
5364
5365 2015-07-30 Yao Qi <yao.qi@linaro.org>
5366
5367 * linux-arm-low.c (arm_hwcap): Remove it.
5368 (arm_read_description): New local variable arm_hwcap. Don't
5369 set arm_hwcap to zero.
5370
5371 2015-07-30 Yao Qi <yao.qi@linaro.org>
5372
5373 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
5374 Use regcache->tdesc instead.
5375 (arm_store_wmmxregset): Likewise.
5376 (arm_fill_vfpregset): Likewise.
5377 (arm_store_vfpregset): Likewise.
5378
5379 2015-07-30 Yao Qi <yao.qi@linaro.org>
5380
5381 * linux-arm-low.c: Include arch/arm.h.
5382 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
5383 (arm_store_gregset): Likewise.
5384
5385 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
5386
5387 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
5388 ptrace's 4th parameter.
5389
5390 2015-07-27 Yao Qi <yao.qi@linaro.org>
5391
5392 * configure.srv (case aarch64*-*-linux*): Don't set
5393 srv_linux_usrregs.
5394
5395 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
5396
5397 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
5398 sys/ptrace.h.
5399 * linux-arm-low.c: Likewise.
5400 * linux-cris-low.c: Likewise.
5401 * linux-crisv32-low.c: Likewise.
5402 * linux-low.c: Likewise.
5403 * linux-m68k-low.c: Likewise.
5404 * linux-mips-low.c: Likewise.
5405 * linux-nios2-low.c: Likewise.
5406 * linux-s390-low.c: Likewise.
5407 * linux-sparc-low.c: Likewise.
5408 * linux-tic6x-low.c: Likewise.
5409 * linux-tile-low.c: Likewise.
5410 * linux-x86-low.c: Likewise.
5411
5412 2015-07-24 Pedro Alves <palves@redhat.com>
5413
5414 * config.in: Regenerate.
5415 * configure: Regenerate.
5416
5417 2015-07-24 Pedro Alves <palves@redhat.com>
5418
5419 * acinclude.m4: Include ../ptrace.m4.
5420 * configure.ac: Call GDB_AC_PTRACE.
5421 * config.in, configure: Regenerate.
5422
5423 2015-07-24 Yao Qi <yao.qi@linaro.org>
5424
5425 * linux-low.c (linux_create_inferior): Remove setting to
5426 proc->priv->new_inferior.
5427 (linux_attach): Likewise.
5428 (linux_low_filter_event): Likewise.
5429 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
5430
5431 2015-07-24 Yao Qi <yao.qi@linaro.org>
5432
5433 * linux-low.c (linux_arch_setup): New function.
5434 (linux_low_filter_event): If proc->tdesc is NULL and
5435 proc->attached is true, call the_low_target.arch_setup.
5436 Otherwise, keep status pending, and return.
5437 (linux_resume_one_lwp_throw): Don't call get_pc if
5438 thread->while_stepping isn't NULL. Don't call
5439 get_thread_regcache if proc->tdesc is NULL.
5440 (need_step_over_p): Return 0 if proc->tdesc is NULL.
5441 (linux_target_ops): Install arch_setup.
5442 * server.c (start_inferior): Call the_target->arch_setup.
5443 * target.h (struct target_ops) <arch_setup>: New field.
5444 (target_arch_setup): New marco.
5445 * lynx-low.c (lynx_target_ops): Update.
5446 * nto-low.c (nto_target_ops): Update.
5447 * spu-low.c (spu_target_ops): Update.
5448 * win32-low.c (win32_target_ops): Update.
5449
5450 2015-07-24 Yao Qi <yao.qi@linaro.org>
5451
5452 * linux-low.c (linux_add_process): Don't set
5453 proc->priv->new_inferior.
5454 (linux_create_inferior): Set proc->priv->new_inferior to 1.
5455 (linux_attach): Likewise.
5456
5457 2015-07-24 Yao Qi <yao.qi@linaro.org>
5458
5459 * server.c (start_inferior): Code refactor.
5460
5461 2015-07-24 Yao Qi <yao.qi@linaro.org>
5462
5463 * server.c (process_serial_event): Set general_thread.
5464
5465 2015-07-21 Yao Qi <yao.qi@linaro.org>
5466
5467 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
5468 aarch64_linux_get_debug_reg_capacity.
5469
5470 2015-07-17 Yao Qi <yao.qi@linaro.org>
5471
5472 * Makefile.in (aarch64-linux-hw-point.o): New rule.
5473 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
5474 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
5475 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
5476 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
5477 (AARCH64_HWP_ALIGNMENT): Likewise.
5478 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
5479 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
5480 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
5481 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
5482 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
5483 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
5484 (struct aarch64_debug_reg_state): Likewise.
5485 (struct arch_lwp_info): Likewise.
5486 (aarch64_align_watchpoint): Likewise.
5487 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
5488 (aarch64_watchpoint_length): Likewise.
5489 (aarch64_point_encode_ctrl_reg): Likewise
5490 (aarch64_point_is_aligned): Likewise.
5491 (aarch64_align_watchpoint): Likewise.
5492 (aarch64_linux_set_debug_regs):
5493 (aarch64_dr_state_insert_one_point): Likewise.
5494 (aarch64_dr_state_remove_one_point): Likewise.
5495 (aarch64_handle_breakpoint): Likewise.
5496 (aarch64_handle_aligned_watchpoint): Likewise.
5497 (aarch64_handle_unaligned_watchpoint): Likewise.
5498 (aarch64_handle_watchpoint): Likewise.
5499
5500 2015-07-17 Yao Qi <yao.qi@linaro.org>
5501
5502 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
5503 and don't aarch64_get_debug_reg_state. All callers update.
5504 (aarch64_handle_aligned_watchpoint): Likewise.
5505 (aarch64_handle_unaligned_watchpoint): Likewise.
5506 (aarch64_handle_watchpoint): Likewise.
5507 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
5508 (aarch64_remove_point): Likewise.
5509
5510 2015-07-17 Yao Qi <yao.qi@linaro.org>
5511
5512 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
5513 debug_printf.
5514 (aarch64_handle_unaligned_watchpoint): Likewise.
5515
5516 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
5517
5518 Revert the previous 3 commits:
5519 Move gdb_regex* to common/
5520 Move linux_find_memory_regions_full & co.
5521 gdbserver build-id attribute generator
5522
5523 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
5524 Jan Kratochvil <jan.kratochvil@redhat.com>
5525
5526 gdbserver build-id attribute generator.
5527 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
5528 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
5529 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
5530 (find_phdr): New.
5531 (get_dynamic): Use find_pdhr to traverse program headers.
5532 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
5533 (compare_mapping_entry_range, struct find_memory_region_callback_data)
5534 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
5535 (get_hex_build_id): New.
5536 (linux_qxfer_libraries_svr4): Add optional build-id attribute
5537 to reply XML document.
5538
5539 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
5540 Jan Kratochvil <jan.kratochvil@redhat.com>
5541
5542 * target.c: Include target/target-utils.h and fcntl.h.
5543 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
5544 (target_fileio_read_stralloc): New functions.
5545
5546 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
5547
5548 * Makefile.in (OBS): Add gdb_regex.o.
5549 (gdb_regex.o): New.
5550 * config.in: Rebuilt.
5551 * configure: Rebuilt.
5552
5553 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
5554 Jan Kratochvil <jan.kratochvil@redhat.com>
5555
5556 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
5557 * Makefile.in (OBS): Add target-utils.o.
5558 (linux-maps.o, target-utils.o): New.
5559 * configure.srv (srv_linux_obj): Add linux-maps.o.
5560
5561 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
5562
5563 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
5564 function, return 1.
5565 (the_low_target): Install it.
5566
5567 2015-07-14 Pedro Alves <palves@redhat.com>
5568
5569 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
5570 Instead, ignore ECHILD, and throw an error for other errnos.
5571
5572 2015-07-10 Pedro Alves <palves@redhat.com>
5573
5574 * event-loop.c (struct callback_event) <data>: Change type to
5575 gdb_client_data instance instead of gdb_client_data pointer.
5576 (append_callback_event): Adjust.
5577
5578 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
5579
5580 * linux-aarch64-low.c: Add comments for each linux_target_ops
5581 method. Remove comments already covered in target_ops and
5582 linux_target_ops definitions.
5583 (the_low_target): Add comments for each unimplemented method.
5584
5585 2015-07-09 Yao Qi <yao.qi@linaro.org>
5586
5587 * linux-aarch64-low.c (aarch64_regmap): Remove.
5588 (aarch64_usrregs_info): Remove.
5589 (regs_info): Set field usrregs to NULL.
5590
5591 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
5592
5593 * linux-low.c: Include "rsp-low.h"
5594 (linux_low_encode_pt_config, linux_low_encode_raw): New.
5595 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
5596 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
5597 (handle_btrace_enable_pt): New.
5598 (handle_btrace_general_set): Support "pt".
5599 (handle_btrace_conf_general_set): Support "pt:size".
5600
5601 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
5602
5603 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
5604 Z_PACKET_SW_BP.
5605
5606 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
5607
5608 * linux-aarch64-low.c: Remove comment about endianness.
5609 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
5610 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
5611 memcmp.
5612
5613 2015-06-24 Gary Benson <gbenson@redhat.com>
5614
5615 * linux-i386-ipa.c (stdint.h): Do not include.
5616 * lynx-i386-low.c (stdint.h): Likewise.
5617 * lynx-ppc-low.c (stdint.h): Likewise.
5618 * mem-break.c (stdint.h): Likewise.
5619 * thread-db.c (stdint.h): Likewise.
5620 * tracepoint.c (stdint.h): Likewise.
5621 * win32-low.c (stdint.h): Likewise.
5622
5623 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
5624
5625 * server.c (write_qxfer_response): Update call to
5626 remote_escape_output.
5627
5628 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
5629 Jan Kratochvil <jan.kratochvil@redhat.com>
5630
5631 Merge multiple hex conversions.
5632 * gdbreplay.c (tohex): Rename to 'fromhex'.
5633 (logchar): Use fromhex.
5634
5635 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
5636
5637 * server.c (handle_qxfer_libraries): Set `version' attribute for
5638 <library-list>.
5639
5640 2015-06-10 Gary Benson <gbenson@redhat.com>
5641
5642 * target.h (struct target_ops) <multifs_open>: New field.
5643 <multifs_unlink>: Likewise.
5644 <multifs_readlink>: Likewise.
5645 * linux-low.c (nat/linux-namespaces.h): New include.
5646 (linux_target_ops): Initialize the_target->multifs_open,
5647 the_target->multifs_unlink and the_target->multifs_readlink.
5648 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
5649 * hostio.c (hostio_fs_pid): New static variable.
5650 (hostio_handle_new_gdb_connection): New function.
5651 (handle_setfs): Likewise.
5652 (handle_open): Use the_target->multifs_open as appropriate.
5653 (handle_unlink): Use the_target->multifs_unlink as appropriate.
5654 (handle_readlink): Use the_target->multifs_readlink as
5655 appropriate.
5656 (handle_vFile): Handle vFile:setfs packets.
5657 * server.c (handle_query): Call hostio_handle_new_gdb_connection
5658 after target_handle_new_gdb_connection.
5659
5660 2015-06-10 Gary Benson <gbenson@redhat.com>
5661
5662 * configure.ac (AC_CHECK_FUNCS): Add setns.
5663 * config.in: Regenerate.
5664 * configure: Likewise.
5665 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
5666 (linux-namespaces.o): New rule.
5667 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
5668
5669 2015-06-09 Gary Benson <gbenson@redhat.com>
5670
5671 * hostio.c (handle_open): Process mode argument with
5672 fileio_to_host_mode.
5673
5674 2015-06-01 Yao Qi <yao.qi@linaro.org>
5675
5676 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
5677 * linux-x86-low.c: Likewise.
5678
5679 2015-05-28 Don Breazeal <donb@codesourcery.com>
5680
5681 * linux-low.c (handle_extended_wait): Initialize
5682 thread_info.last_resume_kind for new fork children.
5683
5684 2015-05-15 Pedro Alves <palves@redhat.com>
5685
5686 * target.h (target_handle_new_gdb_connection): Rewrite using if
5687 wrapped in do/while.
5688
5689 2015-05-14 Joel Brobecker <brobecker@adacore.com>
5690
5691 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
5692 * configure, config.in: Regenerate.
5693 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
5694 Declare typedef.
5695
5696 2015-05-12 Don Breazeal <donb@codesourcery.com>
5697
5698 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
5699 PTRACE_EVENT_VFORK_DONE.
5700 (linux_low_ptrace_options, extended_event_reported): Add vfork
5701 events.
5702 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
5703 and "vforkdone" for RSP 'T' Stop Reply Packet.
5704 * server.h (report_vfork_events): Declare
5705 global variable.
5706
5707 2015-05-12 Don Breazeal <donb@codesourcery.com>
5708
5709 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
5710 (the_low_target) <new_fork>: Initialize new member.
5711 * linux-arm-low.c (arm_new_fork): New function.
5712 (the_low_target) <new_fork>: Initialize new member.
5713 * linux-low.c (handle_extended_wait): Call new target function
5714 new_fork.
5715 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
5716 * linux-mips-low.c (mips_add_watchpoint): New function
5717 extracted from mips_insert_point.
5718 (the_low_target) <new_fork>: Initialize new member.
5719 (mips_linux_new_fork): New function.
5720 (mips_insert_point): Call mips_add_watchpoint.
5721 * linux-x86-low.c (x86_linux_new_fork): New function.
5722 (the_low_target) <new_fork>: Initialize new member.
5723
5724 2015-05-12 Don Breazeal <donb@codesourcery.com>
5725
5726 * linux-low.c (handle_extended_wait): Implement return value,
5727 rename argument 'event_child' to 'event_lwp', handle
5728 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
5729 (linux_low_ptrace_options): New function.
5730 (linux_low_filter_event): Call linux_low_ptrace_options,
5731 use different argument fo linux_enable_event_reporting,
5732 use return value from handle_extended_wait.
5733 (extended_event_reported): New function.
5734 (linux_wait_1): Call extended_event_reported and set
5735 status to report fork events.
5736 (linux_write_memory): Add pid to debug message.
5737 (reset_lwp_ptrace_options_callback): New function.
5738 (linux_handle_new_gdb_connection): New function.
5739 (linux_target_ops): Initialize new structure member.
5740 * linux-low.h (struct lwp_info) <waitstatus>: New member.
5741 * lynx-low.c: Initialize new structure member.
5742 * remote-utils.c (prepare_resume_reply): Implement stop reason
5743 "fork" for "T" stop message.
5744 * server.c (handle_query): Call handle_new_gdb_connection.
5745 * server.h (report_fork_events): Declare global flag.
5746 * target.h (struct target_ops) <handle_new_gdb_connection>:
5747 New member.
5748 (target_handle_new_gdb_connection): New macro.
5749 * win32-low.c: Initialize new structure member.
5750
5751 2015-05-12 Don Breazeal <donb@codesourcery.com>
5752
5753 * mem-break.c (APPEND_TO_LIST): Define macro.
5754 (clone_agent_expr): New function.
5755 (clone_one_breakpoint): New function.
5756 (clone_all_breakpoints): New function.
5757 * mem-break.h: Declare new functions.
5758
5759 2015-05-12 Don Breazeal <donb@codesourcery.com>
5760
5761 * linux-low.c (linux_supports_fork_events): New function.
5762 (linux_supports_vfork_events): New function.
5763 (linux_target_ops): Initialize new structure members.
5764 (initialize_low): Call linux_check_ptrace_features.
5765 * lynx-low.c (lynx_target_ops): Initialize new structure
5766 members.
5767 * server.c (report_fork_events, report_vfork_events):
5768 New global flags.
5769 (handle_query): Add new features to qSupported packet and
5770 response.
5771 (captured_main): Initialize new global variables.
5772 * target.h (struct target_ops) <supports_fork_events>:
5773 New member.
5774 <supports_vfork_events>: New member.
5775 (target_supports_fork_events): New macro.
5776 (target_supports_vfork_events): New macro.
5777 * win32-low.c (win32_target_ops): Initialize new structure
5778 members.
5779
5780 2015-05-12 Gary Benson <gbenson@redhat.com>
5781
5782 * server.c (handle_qxfer_exec_file): Use current process
5783 if annex is empty.
5784
5785 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
5786
5787 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
5788 Remove HAVE_PTRACE_GETREGS conditionals.
5789 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
5790 instead of PTRACE_GETREGS and PTRACE_SETREGS.
5791
5792 2015-05-08 Yao Qi <yao.qi@linaro.org>
5793
5794 * linux-low.c (linux_supports_conditional_breakpoints): New
5795 function.
5796 (linux_target_ops): Install new target method.
5797 * lynx-low.c (lynx_target_ops): Install NULL hook for
5798 supports_conditional_breakpoints.
5799 * nto-low.c (nto_target_ops): Likewise.
5800 * spu-low.c (spu_target_ops): Likewise.
5801 * win32-low.c (win32_target_ops): Likewise.
5802 * server.c (handle_query): Check
5803 target_supports_conditional_breakpoints.
5804 * target.h (struct target_ops) <supports_conditional_breakpoints>:
5805 New field.
5806 (target_supports_conditional_breakpoints): New macro.
5807
5808 2015-05-06 Pedro Alves <palves@redhat.com>
5809
5810 PR server/18081
5811 * server.c (start_inferior): If the process exits, mourn it.
5812
5813 2015-04-21 Gary Benson <gbenson@redhat.com>
5814
5815 * hostio.c (fileio_open_flags_to_host): Factored out to
5816 fileio_to_host_openflags in common/fileio.c. Single use
5817 updated.
5818
5819 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
5820
5821 * linux-xtensa-low.c (xtensa_fill_gregset)
5822 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
5823 XCHAL_HAVE_LOOP.
5824
5825 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
5826
5827 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
5828 (regs_info): Replace usrregs pointer with NULL.
5829
5830 2015-04-17 Gary Benson <gbenson@redhat.com>
5831
5832 * target.h (struct target_ops) <pid_to_exec_file>: New field.
5833 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
5834 * server.c (handle_qxfer_exec_file): New function.
5835 (qxfer_packets): Add exec-file entry.
5836 (handle_query): Report qXfer:exec-file:read as supported packet.
5837
5838 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
5839
5840 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
5841
5842 2015-04-09 Gary Benson <gbenson@redhat.com>
5843
5844 * hostio-errno.c (errno_to_fileio_error): Remove function.
5845 Update caller to use remote_fileio_to_fio_error.
5846
5847 2015-04-09 Yao Qi <yao.qi@linaro.org>
5848
5849 * linux-low.c (linux_insert_point): Call
5850 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
5851 (linux_remove_point): Call remove_memory_breakpoint if type is
5852 raw_bkpt_type_sw.
5853 * linux-x86-low.c (x86_insert_point): Don't call
5854 insert_memory_breakpoint.
5855 (x86_remove_point): Don't call remove_memory_breakpoint.
5856
5857 2015-04-01 Pedro Alves <palves@redhat.com>
5858 Cleber Rosa <crosa@redhat.com>
5859
5860 * server.c (gdbserver_usage): Reorganize and extend the usage
5861 message.
5862
5863 2015-03-24 Pedro Alves <palves@redhat.com>
5864
5865 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
5866 output. Also dump TRAP_TRACE.
5867 (linux_low_filter_event): In debug output, distinguish a
5868 resume_stop SIGSTOP from a delayed SIGSTOP.
5869
5870 2015-03-24 Gary Benson <gbenson@redhat.com>
5871
5872 * linux-x86-low.c (x86_linux_new_thread): Moved to
5873 nat/x86-linux.c.
5874 (x86_linux_prepare_to_resume): Likewise.
5875
5876 2015-03-24 Gary Benson <gbenson@redhat.com>
5877
5878 * Makefile.in (x86-linux-dregs.o): New rule.
5879 * configure.srv: Add x86-linux-dregs.o to relevant targets.
5880 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
5881 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
5882 (x86_linux_dr_get): Likewise.
5883 (x86_linux_dr_set): Likewise.
5884 (update_debug_registers_callback): Likewise.
5885 (x86_linux_dr_set_addr): Likewise.
5886 (x86_linux_dr_get_addr): Likewise.
5887 (x86_linux_dr_set_control): Likewise.
5888 (x86_linux_dr_get_control): Likewise.
5889 (x86_linux_dr_get_status): Likewise.
5890 (x86_linux_update_debug_registers): Likewise.
5891
5892 2015-03-24 Gary Benson <gbenson@redhat.com>
5893
5894 * linux-x86-low.c (x86_linux_update_debug_registers):
5895 New function, factored out from...
5896 (x86_linux_prepare_to_resume): ...this.
5897
5898 2015-03-24 Gary Benson <gbenson@redhat.com>
5899
5900 * linux-x86-low.c (x86_linux_dr_get): Update comments.
5901 (x86_linux_dr_set): Likewise.
5902 (update_debug_registers_callback): Likewise.
5903 (x86_linux_dr_set_addr): Likewise.
5904 (x86_linux_dr_get_addr): Likewise.
5905 (x86_linux_dr_set_control): Likewise.
5906 (x86_linux_dr_get_control): Likewise.
5907 (x86_linux_dr_get_status): Likewise.
5908 (x86_linux_prepare_to_resume): Likewise.
5909
5910 2015-03-24 Gary Benson <gbenson@redhat.com>
5911
5912 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
5913 Use perror_with_name. Pass string through gettext.
5914 (x86_linux_dr_set): Likewise.
5915
5916 2015-03-24 Gary Benson <gbenson@redhat.com>
5917
5918 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
5919 (x86_linux_dr_set_addr): ...this.
5920 (x86_dr_low_get_addr): Rename to...
5921 (x86_linux_dr_get_addr): ...this.
5922 (x86_dr_low_set_control): Rename to...
5923 (x86_linux_dr_set_control): ...this.
5924 (x86_dr_low_get_control): Rename to...
5925 (x86_linux_dr_get_control): ...this.
5926 (x86_dr_low_get_status): Rename to...
5927 (x86_linux_dr_get_status): ...this.
5928 (x86_dr_low): Update with new function names.
5929
5930 2015-03-24 Gary Benson <gbenson@redhat.com>
5931
5932 * Makefile.in (x86-linux.o): New rule.
5933 * configure.srv: Add x86-linux.o to relevant targets.
5934 * linux-low.c (lwp_set_arch_private_info): New function.
5935 (lwp_arch_private_info): Likewise.
5936 * linux-x86-low.c: Include nat/x86-linux.h.
5937 (arch_lwp_info): Removed structure.
5938 (update_debug_registers_callback):
5939 Use lwp_set_debug_registers_changed.
5940 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
5941 and lwp_set_debug_registers_changed.
5942 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
5943
5944 2015-03-24 Gary Benson <gbenson@redhat.com>
5945
5946 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
5947 * linux-arm-low.c (arm_new_thread): Likewise.
5948 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
5949 * linux-mips-low.c (mips_linux_new_thread): Likewise.
5950 * linux-x86-low.c (x86_linux_new_thread): Likewise.
5951 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
5952
5953 2015-03-24 Gary Benson <gbenson@redhat.com>
5954
5955 * linux-low.c (ptid_of_lwp): New function.
5956 (lwp_is_stopped): Likewise.
5957 (lwp_stop_reason): Likewise.
5958 * linux-x86-low.c (update_debug_registers_callback):
5959 Use lwp_is_stopped.
5960 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
5961 lwp_stop_reason.
5962
5963 2015-03-24 Gary Benson <gbenson@redhat.com>
5964
5965 * linux-low.h (linux_stop_lwp): Remove declaration.
5966
5967 2015-03-24 Gary Benson <gbenson@redhat.com>
5968
5969 * linux-low.h: Include nat/linux-nat.h.
5970 * linux-low.c (iterate_over_lwps_args): New structure.
5971 (iterate_over_lwps_filter): New function.
5972 (iterate_over_lwps): Likewise.
5973 * linux-x86-low.c (update_debug_registers_callback):
5974 Update signature to what iterate_over_lwps expects.
5975 Remove PID check that iterate_over_lwps now performs.
5976 (x86_dr_low_set_addr): Use iterate_over_lwps.
5977 (x86_dr_low_set_control): Likewise.
5978
5979 2015-03-24 Gary Benson <gbenson@redhat.com>
5980
5981 * linux-x86-low.c (x86_debug_reg_state): New function.
5982 (x86_linux_prepare_to_resume): Use the above.
5983
5984 2015-03-24 Gary Benson <gbenson@redhat.com>
5985
5986 * linux-low.c (current_lwp_ptid): New function.
5987 * linux-x86-low.c: Include nat/linux-nat.h.
5988 (x86_dr_low_get_addr): Use current_lwp_ptid.
5989 (x86_dr_low_get_control): Likewise.
5990 (x86_dr_low_get_status): Likewise.
5991
5992 2015-03-20 Pedro Alves <palves@redhat.com>
5993
5994 * tracepoint.c (cmd_qtstatus): Make "str" const.
5995
5996 2015-03-20 Pedro Alves <palves@redhat.com>
5997
5998 * server.c (handle_general_set): Make "req_str" const.
5999
6000 2015-03-19 Pedro Alves <palves@redhat.com>
6001
6002 * linux-low.c (linux_resume_one_lwp): Rename to ...
6003 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
6004 instead call perror_with_name.
6005 (check_ptrace_stopped_lwp_gone): New function.
6006 (linux_resume_one_lwp): Reimplement as wrapper around
6007 linux_resume_one_lwp_throw that swallows errors if the LWP is
6008 gone.
6009
6010 2015-03-19 Pedro Alves <palves@redhat.com>
6011
6012 * linux-low.c (count_events_callback, select_event_lwp_callback):
6013 No longer check whether the thread has resume_stop as last resume
6014 kind.
6015
6016 2015-03-19 Pedro Alves <palves@redhat.com>
6017
6018 * linux-low.c (count_events_callback, select_event_lwp_callback):
6019 Use the lwp's status_pending_p field, not the thread's.
6020
6021 2015-03-19 Pedro Alves <palves@redhat.com>
6022
6023 * linux-low.c (select_event_lwp_callback): Update comments to
6024 no longer mention SIGTRAP.
6025
6026 2015-03-18 Gary Benson <gbenson@redhat.com>
6027
6028 * server.c (handle_query): Do not report vFile:fstat as supported.
6029
6030 2015-03-11 Gary Benson <gbenson@redhat.com>
6031
6032 * hostio.c (sys/types.h): New include.
6033 (sys/stat.h): Likewise.
6034 (common-remote-fileio.h): Likewise.
6035 (handle_fstat): New function.
6036 (handle_vFile): Handle vFile:fstat packets.
6037
6038 2015-03-11 Gary Benson <gbenson@redhat.com>
6039
6040 * configure.ac (AC_CHECK_MEMBERS): Add checks for
6041 struct stat.st_blocks and struct stat.st_blksize.
6042 * configure: Regenerate.
6043 * config.in: Likewise.
6044 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
6045 (OBS): Add common-remote-fileio.o.
6046 (common-remote-fileio.o): New rule.
6047
6048 2015-03-09 Pedro Alves <palves@redhat.com>
6049
6050 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
6051 'struct sockaddr' pointer in 'accept' call.
6052
6053 2015-03-09 Pedro Alves <palves@redhat.com>
6054
6055 Revert:
6056 2015-03-07 Pedro Alves <palves@redhat.com>
6057 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
6058 or <winsock2.h> here. Instead include "gdb_socket.h".
6059 (remote_open): Use union gdb_sockaddr_u.
6060 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
6061 or <winsock2.h> here. Instead include "gdb_socket.h".
6062 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
6063 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
6064 or <sys/un.h>.
6065 (init_named_socket, gdb_agent_helper_thread): Use union
6066 gdb_sockaddr_u.
6067
6068 2015-03-07 Pedro Alves <palves@redhat.com>
6069
6070 * configure.ac (build_warnings): Move
6071 -Wdeclaration-after-statement to the C-specific set.
6072 * configure: Regenerate.
6073
6074 2015-03-07 Pedro Alves <palves@redhat.com>
6075
6076 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
6077 or <winsock2.h> here. Instead include "gdb_socket.h".
6078 (remote_open): Use union gdb_sockaddr_u.
6079 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
6080 or <winsock2.h> here. Instead include "gdb_socket.h".
6081 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
6082 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
6083 or <sys/un.h>.
6084 (init_named_socket, gdb_agent_helper_thread): Use union
6085 gdb_sockaddr_u.
6086
6087 2015-03-07 Pedro Alves <palves@redhat.com>
6088
6089 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
6090 instead.
6091
6092 2015-03-06 Yao Qi <yao.qi@linaro.org>
6093
6094 * linux-aarch64-low.c (aarch64_insert_point): Use
6095 show_debug_regs as a boolean.
6096 (aarch64_remove_point): Likewise.
6097
6098 2015-03-05 Pedro Alves <palves@redhat.com>
6099
6100 * lynx-low.c (lynx_target_ops): Install NULL hooks for
6101 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
6102 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
6103 * nto-low.c (nto_target_ops): Likewise.
6104 * spu-low.c (spu_target_ops): Likewise.
6105 * win32-low.c (win32_target_ops): Likewise.
6106
6107 2015-03-04 Pedro Alves <palves@redhat.com>
6108
6109 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
6110 Decide whether a breakpoint triggered based on the SIGTRAP's
6111 siginfo.si_code.
6112 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
6113 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
6114 (linux_low_filter_event): Check for breakpoints before checking
6115 watchpoints.
6116 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
6117 siginfo.si_code.
6118 (linux_stopped_by_sw_breakpoint)
6119 (linux_supports_stopped_by_sw_breakpoint)
6120 (linux_stopped_by_hw_breakpoint)
6121 (linux_supports_stopped_by_hw_breakpoint): New functions.
6122 (linux_target_ops): Install new target methods.
6123
6124 2015-03-04 Pedro Alves <palves@redhat.com>
6125
6126 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
6127 * server.c (swbreak_feature, hwbreak_feature): New globals.
6128 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
6129 (captured_main): Clear swbreak_feature and hwbreak_feature.
6130 * server.h (swbreak_feature, hwbreak_feature): Declare.
6131 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
6132 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
6133 supports_stopped_by_hw_breakpoint>: New fields.
6134 (target_supports_stopped_by_sw_breakpoint)
6135 (target_stopped_by_sw_breakpoint)
6136 (target_supports_stopped_by_hw_breakpoint)
6137 (target_stopped_by_hw_breakpoint): Declare.
6138
6139 2015-03-04 Pedro Alves <palves@redhat.com>
6140
6141 enum lwp_stop_reason -> enum target_stop_reason
6142 * linux-low.c (check_stopped_by_breakpoint): Adjust.
6143 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
6144 (linux_wait_1, stuck_in_jump_pad_callback)
6145 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
6146 (linux_stopped_by_watchpoint):
6147 * linux-low.h (enum lwp_stop_reason): Delete.
6148 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
6149 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
6150
6151 2015-03-04 Yao Qi <yao.qi@linaro.org>
6152
6153 * Makefile.in (SFILES): Add linux-aarch64-low.c.
6154
6155 2015-03-03 Gary Benson <gbenson@redhat.com>
6156
6157 * hostio.c (handle_vFile): Fix prefix lengths.
6158
6159 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
6160
6161 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
6162 ptr_bits.
6163
6164 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
6165
6166 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
6167 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
6168 (clean): Add "rm -f" for above C files.
6169 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
6170 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
6171 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
6172 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
6173 * linux-s390-low.c (HWCAP_S390_VX): New macro.
6174 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
6175 (init_registers_s390x_vx_linux64)
6176 (init_registers_s390x_tevx_linux64)
6177 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
6178 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
6179 declarations.
6180 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
6181 (s390_store_vxrs_high): New functions.
6182 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
6183 NT_S390_VXRS_HIGH.
6184 (s390_arch_setup): Add logic for selecting one of the new target
6185 descriptions. Activate the new vector regsets if applicable.
6186 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
6187 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
6188 and init_registers_s390x_tevx_linux64.
6189
6190 2015-03-01 Pedro Alves <palves@redhat.com>
6191
6192 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
6193 parameter.
6194
6195 2015-02-27 Pedro Alves <palves@redhat.com>
6196
6197 * linux-x86-low.c (u_debugreg_offset): New function.
6198 (x86_linux_dr_get, x86_linux_dr_set): Use it.
6199
6200 2015-02-27 Pedro Alves <palves@redhat.com>
6201
6202 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
6203 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
6204 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
6205 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
6206 (ps_lsetfpregs, ps_getpid)
6207 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
6208 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
6209 (ps_lsetxregs, ps_plog): Declare.
6210
6211 2015-02-27 Pedro Alves <palves@redhat.com>
6212
6213 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
6214 IP_AGENT_EXPORT_FUNC.
6215 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
6216 IP_AGENT_EXPORT_FUNC.
6217 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
6218 (IP_AGENT_EXPORT): Delete.
6219 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
6220 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
6221 (gdb_trampoline_buffer_error, collecting, gdb_collect)
6222 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
6223 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
6224 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
6225 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
6226 (traceframe_read_count, traceframe_write_count)
6227 (traceframes_created, trace_state_variables, get_raw_reg)
6228 (get_trace_state_variable_value, set_trace_state_variable_value)
6229 (ust_loaded, helper_thread_id, cmd_buf): Use
6230 IPA_SYM_EXPORTED_NAME.
6231 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
6232 (tracepoints) Use IP_AGENT_EXPORT_VAR.
6233 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
6234 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
6235 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
6236 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
6237 EXTERN_C_PUSH/EXTERN_C_POP.
6238 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
6239 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
6240 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
6241 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
6242 (traceframe_write_count, traceframe_read_count)
6243 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
6244 (about_to_request_buffer_space, get_trace_state_variable_value)
6245 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
6246 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
6247 EXTERN_C_PUSH/EXTERN_C_POP.
6248 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
6249 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
6250 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
6251 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
6252 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
6253 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
6254 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
6255 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
6256 Define.
6257 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
6258 (IP_AGENT_EXPORT_VAR_DECL): Define.
6259 (tracing): Declare.
6260 (gdb_agent_get_raw_reg): Declare.
6261
6262 2015-02-27 Tom Tromey <tromey@redhat.com>
6263 Pedro Alves <palves@redhat.com>
6264
6265 Rename symbols whose names are reserved C++ keywords throughout.
6266
6267 2015-02-27 Pedro Alves <palves@redhat.com>
6268
6269 * Makefile.in (COMPILER): New, get it from autoconf.
6270 (CXX): Get from autoconf instead.
6271 (COMPILE.pre): Use COMPILER.
6272 (CC-LD): Rename to ...
6273 (CC_LD): ... this. Use COMPILER.
6274 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
6275 (CXX_FOR_TARGET): Default to g++ instead of gcc.
6276 * acinclude.m4: Include build-with-cxx.m4.
6277 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
6278 Disable -Werror by default if building in C++ mode.
6279 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
6280 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
6281 the C++ compiler. Save/restore CXXFLAGS too.
6282 * configure: Regenerate.
6283
6284 2015-02-27 Pedro Alves <palves@redhat.com>
6285
6286 * acinclude.m4: Include libiberty.m4.
6287 * configure.ac: Call libiberty_INIT.
6288 * config.in, configure: Regenerate.
6289
6290 2015-02-26 Pedro Alves <palves@redhat.com>
6291
6292 * linux-low.c (linux_wait_1): When incrementing the PC past a
6293 program breakpoint always use the_low_target.breakpoint_len as
6294 increment, rather than the maximum between that and
6295 the_low_target.decr_pc_after_break.
6296
6297 2015-02-23 Pedro Alves <palves@redhat.com>
6298
6299 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
6300 thread was doing a step-over; always adjust the PC if
6301 we stepped over a permanent breakpoint.
6302 (linux_wait_1): If we stepped over breakpoint that was on top of a
6303 permanent breakpoint, manually advance the PC past it.
6304
6305 2015-02-23 Pedro Alves <palves@redhat.com>
6306
6307 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
6308 modes.
6309 (x86_fill_gregset, x86_store_gregset): Use it when handling
6310 $orig_eax.
6311
6312 2015-02-20 Pedro Alves <palves@redhat.com>
6313
6314 * thread-db.c: Include "nat/linux-procfs.h".
6315 (thread_db_init): Skip listing new threads if the kernel supports
6316 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
6317
6318 2015-02-20 Pedro Alves <palves@redhat.com>
6319
6320 * linux-low.c (status_pending_p_callback): Use ptid_match.
6321
6322 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
6323
6324 PR breakpoints/16812
6325 * linux-low.c (wstatus_maybe_breakpoint): Remove.
6326 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
6327 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
6328
6329 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
6330
6331 PR breakpoints/15956
6332 * tracepoint.c (cmd_qtinit): Add check for current_thread.
6333
6334 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6335
6336 * linux-low.c (linux_low_btrace_conf): Print size.
6337 * server.c (handle_btrace_conf_general_set): New.
6338 (hanle_general_set): Call handle_btrace_conf_general_set.
6339 (handle_query): Report Qbtrace-conf:bts:size as supported.
6340
6341 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6342
6343 * linux-low.c (linux_low_enable_btrace): Update parameters.
6344 (linux_low_btrace_conf): New.
6345 (linux_target_ops)<to_btrace_conf>: Initialize.
6346 * server.c (current_btrace_conf): New.
6347 (handle_btrace_enable): Rename to ...
6348 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
6349 to target_enable_btrace. Update comment. Update users.
6350 (handle_qxfer_btrace_conf): New.
6351 (qxfer_packets): Add btrace-conf entry.
6352 (handle_query): Report qXfer:btrace-conf:read as supported packet.
6353 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
6354 (target_ops)<read_btrace_conf>: New.
6355 (target_enable_btrace): Update parameters.
6356 (target_read_btrace_conf): New.
6357
6358 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6359
6360 * server.c (handle_btrace_general_set): Remove call to
6361 target_supports_btrace.
6362 (supported_btrace_packets): New.
6363 (handle_query): Call supported_btrace_packets.
6364 * target.h: include btrace-common.h.
6365 (btrace_target_info): Removed.
6366 (supports_btrace, target_supports_btrace): Update parameters.
6367
6368 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6369
6370 * Makefile.in (SFILES): Add common/btrace-common.c.
6371 (OBS): Add common/btrace-common.o.
6372 (btrace-common.o): Add build rules.
6373 * linux-low: Include btrace-common.h.
6374 (linux_low_read_btrace): Use struct btrace_data. Call
6375 btrace_data_init and btrace_data_fini.
6376
6377 2015-02-06 Pedro Alves <palves@redhat.com>
6378
6379 * thread-db.c (find_new_threads_callback): Add debug output.
6380
6381 2015-02-04 Pedro Alves <palves@redhat.com>
6382
6383 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
6384 (resume_stopped_resumed_lwps): New function.
6385 (linux_wait_for_event_filtered): Use it.
6386
6387 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
6388
6389 * Makefile.in (SFILES): Add linux-personality.c.
6390 (linux-personality.o): New rule.
6391 * configure.srv (srv_linux_obj): Add linux-personality.o to the
6392 list of objects to be built.
6393 * linux-low.c: Include nat/linux-personality.h.
6394 (linux_create_inferior): Remove code to disable address space
6395 randomization (moved to ../nat/linux-personality.c). Create
6396 cleanup to disable address space randomization.
6397
6398 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
6399
6400 * Makefile.in (posix-strerror.o): New rule.
6401 (mingw-strerror.o): Likewise.
6402 * configure: Regenerated.
6403 * configure.ac: Source file ../common/common.host. Initialize new
6404 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
6405
6406 2015-01-14 Yao Qi <yao@codesourcery.com>
6407
6408 * Makefile.in (SFILES): Add nat/ppc-linux.c.
6409 (ppc-linux.o): New rule.
6410 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
6411 * configure.ac: AC_CHECK_FUNCS(getauxval).
6412 * config.in: Re-generated.
6413 * configure: Re-generated.
6414 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
6415 ppc64_64bit_inferior_p
6416
6417 2015-01-14 Yao Qi <yao@codesourcery.com>
6418
6419 * linux-ppc-low.c: Include "nat/ppc-linux.h".
6420 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
6421 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
6422 (PT_ORIG_R3, PT_TRAP): Likewise.
6423 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
6424 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
6425 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
6426
6427 2015-01-10 Joel Brobecker <brobecker@adacore.com>
6428
6429 * i387-fp.c (i387_cache_to_xsave): In look over
6430 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
6431 zmmh_low_space field by use of zmmh_high_space.
6432
6433 2015-01-09 Pedro Alves <palves@redhat.com>
6434
6435 * linux-low.c (step_over_bkpt): Move higher up in the file.
6436 (handle_extended_wait): Don't store the stop_pc here.
6437 (get_stop_pc): Adjust comments and rename to ...
6438 (check_stopped_by_breakpoint): ... this. Record whether the LWP
6439 stopped for a software breakpoint or hardware breakpoint.
6440 (thread_still_has_status_pending_p): New function.
6441 (status_pending_p_callback): Use
6442 thread_still_has_status_pending_p. If the event is no longer
6443 interesting, resume the LWP.
6444 (handle_tracepoints): Add assert.
6445 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
6446 (wstatus_maybe_breakpoint): New function.
6447 (cancel_breakpoint): Delete function.
6448 (check_stopped_by_watchpoint): New function, factored out from
6449 linux_low_filter_event.
6450 (lp_status_maybe_breakpoint): Delete function.
6451 (linux_low_filter_event): Remove filter_ptid argument.
6452 Leave thread group exits pending here. Store the LWP's stop PC.
6453 Always leave events pending.
6454 (linux_wait_for_event_filtered): Pull all events out of the
6455 kernel, and leave them all pending.
6456 (count_events_callback, select_event_lwp_callback): Consider all
6457 events.
6458 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
6459 (select_event_lwp): Only give preference to the stepping LWP in
6460 all-stop mode. Adjust comments.
6461 (ignore_event): New function.
6462 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
6463 references to cancel_breakpoints. Adjust to renames. Also give
6464 equal priority to all LWPs that have had events in non-stop mode.
6465 If reporting a software breakpoint event, unadjust the LWP's PC.
6466 (linux_wait): If linux_wait_1 returned an ignored event, retry.
6467 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
6468 Adjust.
6469 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
6470 (resume_status_pending_p): Use thread_still_has_status_pending_p.
6471 (linux_stopped_by_watchpoint): Adjust.
6472 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
6473 * linux-low.h (enum lwp_stop_reason): New.
6474 (struct lwp_info) <stop_pc>: Adjust comment.
6475 <stopped_by_watchpoint>: Delete field.
6476 <stop_reason>: New field.
6477 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
6478 * mem-break.c (software_breakpoint_inserted_here)
6479 (hardware_breakpoint_inserted_here): New function.
6480 * mem-break.h (software_breakpoint_inserted_here)
6481 (hardware_breakpoint_inserted_here): Declare.
6482 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
6483 (cancel_breakpoints): Delete.
6484 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
6485 (upload_fast_traceframes): Remove references to
6486 cancel_breakpoints.
6487
6488 2015-01-09 Pedro Alves <palves@redhat.com>
6489
6490 * thread-db.c (find_new_threads_callback): Ignore thread if the
6491 kernel thread ID is -1.
6492
6493 2015-01-09 Pedro Alves <palves@redhat.com>
6494
6495 * linux-low.c (linux_attach_fail_reason_string): Move to
6496 nat/linux-ptrace.c, and rename.
6497 (linux_attach_lwp): Update comment.
6498 (attach_proc_task_lwp_callback): New function.
6499 (linux_attach): Adjust to rename and use
6500 linux_proc_attach_tgid_threads.
6501 (linux_attach_fail_reason_string): Delete declaration.
6502
6503 2015-01-01 Joel Brobecker <brobecker@adacore.com>
6504
6505 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
6506 * server.c (gdbserver_version): Likewise.
6507
6508 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
6509
6510 * remote-utils.c: Include ctype.h.
6511 (input_interrupt): Explicitly handle the case when the char
6512 received is the NUL byte. Improve the printing of non-ASCII
6513 characters.
6514
6515 2014-12-16 Joel Brobecker <brobecker@adacore.com>
6516
6517 * linux-low.c (linux_low_filter_event): Update call to
6518 linux_enable_event_reporting following the addition of
6519 a new parameter to that function.
6520
6521 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
6522
6523 PR server/17457
6524 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
6525 (AARCH64_FPCR_REGNO): Likewise.
6526 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
6527 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
6528 (aarch64_store_fpregset): Likewise.
6529
6530 2014-12-15 Joel Brobecker <brobecker@adacore.com>
6531
6532 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
6533 Remove FIXME comment about assumption about N.
6534
6535 2014-12-13 Joel Brobecker <brobecker@adacore.com>
6536
6537 * configure.ac: If large-file support is disabled in GDBserver,
6538 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
6539 * configure: Regenerate.
6540
6541 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6542
6543 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
6544 warning upon ENODATA from ptrace.
6545 * linux-s390-low.c (s390_store_tdb): New.
6546 (s390_regsets): Add regset for NT_S390_TDB.
6547
6548 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6549
6550 * linux-low.c (regsets_store_inferior_registers): Skip regsets
6551 without a fill_function.
6552 * linux-s390-low.c (s390_fill_last_break): Remove.
6553 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
6554 (s390_arch_setup): Use regset's size instead of fill_function for
6555 loop end condition.
6556
6557 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6558
6559 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
6560 the regset's store function when ptrace returned an error.
6561 * regcache.c (get_thread_regcache): Invalidate register cache
6562 before fetching inferior's registers.
6563
6564 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6565
6566 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
6567 while-loop as for-loop.
6568 (regsets_store_inferior_registers): Likewise.
6569
6570 2014-11-28 Yao Qi <yao@codesourcery.com>
6571
6572 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
6573 * config.in, configure: Re-generate.
6574 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
6575 is defined.
6576
6577 2014-11-21 Yao Qi <yao@codesourcery.com>
6578
6579 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
6580 (AC_CHECK_HEADERS): Remove malloc.h.
6581 * configure: Re-generated.
6582 * config.in: Re-generated.
6583 * server.h: Don't include alloca.h and malloc.h.
6584 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
6585 Don't include malloc.h.
6586
6587 2014-11-17 Joel Brobecker <brobecker@adacore.com>
6588
6589 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
6590 corresponding ERRNO check in same block.
6591
6592 2014-11-12 Pedro Alves <palves@redhat.com>
6593
6594 * server.c (cont_thread): Update comment.
6595 (start_inferior, attach_inferior): No longer clear cont_thread.
6596 (handle_v_cont): No longer set cont_thread.
6597 (captured_main): Clear cont_thread each time a GDB connects.
6598
6599 2014-11-12 Pedro Alves <palves@redhat.com>
6600
6601 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
6602 thread, and don't resume all threads if the Hc thread has exited.
6603
6604 2014-11-12 Pedro Alves <palves@redhat.com>
6605
6606 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
6607 the process group instead of to a specific LWP.
6608
6609 2014-10-15 Pedro Alves <palves@redhat.com>
6610
6611 PR server/17487
6612 * win32-arm-low.c (arm_set_thread_context): Remove current_event
6613 parameter.
6614 (arm_set_thread_context): Delete.
6615 (the_low_target): Adjust.
6616 * win32-i386-low.c (debug_registers_changed)
6617 (debug_registers_used): Delete.
6618 (update_debug_registers_callback): New function.
6619 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
6620 needing to update their debug registers.
6621 (win32_get_current_dr): New function.
6622 (x86_dr_low_get_addr, x86_dr_low_get_control)
6623 (x86_dr_low_get_status): Fetch the debug register from the thread
6624 record's context.
6625 (i386_initial_stuff): Adjust.
6626 (i386_get_thread_context): Remove current_event parameter. Don't
6627 clear debug_registers_changed nor copy DR values to
6628 debug_reg_state.
6629 (i386_set_thread_context): Delete.
6630 (i386_prepare_to_resume): New function.
6631 (i386_thread_added): Mark the thread as needing to update irs
6632 debug registers.
6633 (the_low_target): Remove i386_set_thread_context and install
6634 i386_prepare_to_resume.
6635 * win32-low.c (win32_get_thread_context): Adjust.
6636 (win32_set_thread_context): Use SetThreadContext
6637 directly.
6638 (win32_prepare_to_resume): New function.
6639 (win32_require_context): New function, factored out from ...
6640 (thread_rec): ... this.
6641 (continue_one_thread): Call win32_prepare_to_resume on each thread
6642 we're about to continue.
6643 (win32_resume): Call win32_prepare_to_resume on the event thread.
6644 * win32-low.h (struct win32_thread_info)
6645 <debug_registers_changed>: New field.
6646 (struct win32_target_ops): Change prototype of set_thread_context,
6647 delete set_thread_context and add prepare_to_resume.
6648 (win32_require_context): New declaration.
6649
6650 2014-10-08 Gary Benson <gbenson@redhat.com>
6651
6652 * server.h: Do not include common-exceptions.h.
6653
6654 2014-10-08 Gary Benson <gbenson@redhat.com>
6655
6656 * server.h: Do not include cleanups.h.
6657
6658 2014-09-30 James Hogan <james.hogan@imgtec.com>
6659
6660 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
6661 mips64-dsp-linux.c.
6662
6663 2014-09-23 Yao Qi <yao@codesourcery.com>
6664
6665 * linux-low.c (lp_status_maybe_breakpoint): New function.
6666 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
6667 (count_events_callback): Likewise.
6668 (select_event_lwp_callback): Likewise.
6669 (cancel_breakpoints_callback): Likewise.
6670
6671 2014-09-19 Don Breazeal <donb@codesourcery.com>
6672
6673 * linux-low.c (handle_extended_wait): Call
6674 linux_ptrace_get_extended_event.
6675 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
6676 linux_is_extended_waitstatus.
6677
6678 2014-09-16 Joel Brobecker <brobecker@adacore.com>
6679
6680 * Makefile.in (CPPFLAGS): Define.
6681 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
6682 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
6683
6684 2014-09-16 Gary Benson <gbenson@redhat.com>
6685
6686 * inferiors.h (current_inferior): Renamed as...
6687 (current_thread): New variable. All uses updated.
6688 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
6689 (maybe_move_out_of_jump_pad): Likewise.
6690 (cancel_breakpoint): Likewise.
6691 (linux_low_filter_event): Likewise.
6692 (wait_for_sigstop): Likewise.
6693 (linux_resume_one_lwp): Likewise.
6694 (need_step_over_p): Likewise.
6695 (start_step_over): Likewise.
6696 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
6697 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
6698 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
6699 and save_inferior as saved_thread.
6700 * regcache.c (get_thread_regcache): Renamed saved_inferior as
6701 saved_thread.
6702 (regcache_invalidate_thread): Likewise.
6703 * remote-utils.c (prepare_resume_reply): Likewise.
6704 * thread-db.c (thread_db_get_tls_address): Likewise.
6705 (disable_thread_event_reporting): Likewise.
6706 (remove_thread_event_breakpoints): Likewise.
6707 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
6708 as saved_thread.
6709 * target.h (set_desired_inferior): Renamed as...
6710 (set_desired_thread): New declaration. All uses updated.
6711 * server.c (myresume): Updated comment to reference thread instead
6712 of inferior.
6713 (handle_serial_event): Likewise.
6714 (handle_target_event): Likewise.
6715
6716 2014-09-12 Tom Tromey <tromey@redhat.com>
6717 Gary Benson <gbenson@redhat.com>
6718
6719 * regcache.h: Include common-regcache.h.
6720 (regcache_read_pc): Don't declare.
6721 * regcache.c (get_thread_regcache_for_ptid): New function.
6722
6723 2014-09-11 Tom Tromey <tromey@redhat.com>
6724 Gary Benson <gbenson@redhat.com>
6725
6726 * symbol.c: New file.
6727 * Makefile.in (SFILES): Add symbol.c.
6728 (OBS): Add symbol.o.
6729
6730 2014-09-11 Gary Benson <gbenson@redhat.com>
6731
6732 * target.c (target_stop_ptid, target_continue_ptid): New
6733 functions.
6734
6735 2014-09-11 Tom Tromey <tromey@redhat.com>
6736 Gary Benson <gbenson@redhat.com>
6737
6738 * target.h: Include target/target.h.
6739 * target.c (target_read_memory, target_read_uint32)
6740 (target_write_memory): New functions.
6741
6742 2014-09-11 Gary Benson <gbenson@redhat.com>
6743
6744 * server.h (debug_hw_points): Don't declare.
6745 * server.c (debug_hw_points): Don't define. Replace all uses
6746 with show_debug_regs.
6747 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
6748 all uses with show_debug_regs.
6749
6750 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
6751
6752 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
6753 endianness into account.
6754 (ppc_supply_ptrace_register): Likewise.
6755
6756 2014-09-03 James Hogan <james.hogan@imgtec.com>
6757
6758 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
6759 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
6760
6761 2014-09-03 Gary Benson <gbenson@redhat.com>
6762
6763 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
6764 ALL_DEBUG_ADDRESS_REGISTERS.
6765
6766 2014-09-02 Gary Benson <gbenson@redhat.com>
6767
6768 * i386-low.h: Renamed as...
6769 * x86-low.h: New file. All type, function and variable name
6770 prefixes changed from "i386_" to "x86_". All references updated.
6771 * i386-low.c: Renamed as...
6772 * x86-low.c: New file. All type, function and variable name
6773 prefixes changed from "i386_" to "x86_". All references updated.
6774
6775 2014-09-02 Gary Benson <gbenson@redhat.com>
6776
6777 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
6778 (x86_linux_new_thread): Likewise.
6779
6780 2014-08-29 Gary Benson <gbenson@redhat.com>
6781
6782 * server.h (setjmp.h): Do not include.
6783 (toplevel): Do not declare.
6784 (common-exceptions.h): Include.
6785 (cleanups.h): Likewise.
6786 * server.c (toplevel): Do not define.
6787 (exit_code): New static global.
6788 (detach_or_kill_for_exit_cleanup): New function.
6789 (main): New function. Original main renamed to...
6790 (captured_main): New function.
6791 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
6792
6793 2014-08-29 Gary Benson <gbenson@redhat.com>
6794
6795 * Makefile.in (SFILES): Add common/common-exceptions.c.
6796 (OBS): Add common-exceptions.o.
6797 (common-exceptions.o): New rule.
6798 * utils.c (prepare_to_throw_exception): New function.
6799
6800 2014-08-29 Gary Benson <gbenson@redhat.com>
6801
6802 * config.in: Regenerate.
6803 * configure: Likewise.
6804
6805 2014-08-29 Gary Benson <gbenson@redhat.com>
6806
6807 * Makefile.in (SFILES): Add common/cleanups.c.
6808 (OBS): cleanups.o.
6809 (cleanups.o): New rule.
6810
6811 2014-08-29 Gary Benson <gbenson@redhat.com>
6812
6813 * utils.c (internal_vwarning): New function.
6814
6815 2014-08-28 Gary Benson <gbenson@redhat.com>
6816
6817 * utils.h (fatal): Remove declaration.
6818 * utils.c (fatal): Remove function.
6819
6820 2014-08-28 Gary Benson <gbenson@redhat.com>
6821
6822 * tracepoint.c (gdb_agent_init): Replace fatal with
6823 perror_with_name.
6824 (initialize_tracepoint): Likewise.
6825
6826 2014-08-28 Gary Benson <gbenson@redhat.com>
6827
6828 * remote-utils.c (remote_prepare): Replace fatal with error.
6829
6830 2014-08-28 Gary Benson <gbenson@redhat.com>
6831
6832 * linux-low.c (linux_async): Replace fatal with warning.
6833 Tidy up and return.
6834 (linux_start_non_stop): Return -1 if linux_async failed.
6835
6836 2014-08-28 Gary Benson <gbenson@redhat.com>
6837
6838 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
6839 gdb_assert.
6840 (i386_dr_low_get_addr): Remove vague comment.
6841 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
6842 gdb_assert.
6843
6844 2014-08-28 Gary Benson <gbenson@redhat.com>
6845
6846 * inferiors.c (get_thread_process): Replace check with gdb_assert.
6847 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
6848 internal_error.
6849 (linux_resume_one_lwp): Likewise.
6850 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
6851 gdb_assert.
6852 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
6853 with internal_error.
6854 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
6855 (init_register_cache): Replace fatal with gdb_assert_not_reached.
6856 (find_register_by_name): Replace fatal with internal_error.
6857 (find_regno): Likewise.
6858 * tdesc.c (init_target_desc): Replace check with gdb_assert.
6859 * thread-db.c (thread_db_create_event): Likewise.
6860 (thread_db_load_search): Likewise.
6861 (try_thread_db_load_1): Likewise.
6862 * tracepoint.c (get_jump_space_head): Replace fatal with
6863 internal_error.
6864 (claim_trampoline_space): Likewise.
6865 (have_fast_tracepoint_trampoline_buffer): Likewise.
6866 (cmd_qtstart): Likewise.
6867 (stop_tracing): Likewise.
6868 (fast_tracepoint_collecting): Likewise.
6869 (target_malloc): Likewise.
6870 (download_tracepoint): Likewise.
6871 (download_trace_state_variables): Replace check with gdb_assert.
6872 (upload_fast_traceframes): Replace fatal with internal_error.
6873
6874 2014-08-19 Tom Tromey <tromey@redhat.com>
6875 Gary Benson <gbenson@redhat.com>
6876
6877 * Makefile.in (SFILES): Add common/common-debug.c.
6878 (OBS): Add common-debug.o.
6879 (common-debug.o): New rule.
6880 * debug.h (debug_printf): Don't declare.
6881 * debug.c (debug_printf): Renamed and rewritten as...
6882 (debug_vprintf): New function.
6883
6884 2014-08-19 Gary Benson <gbenson@redhat.com>
6885
6886 * utils.h: Do not include print-utils.h.
6887
6888 2014-08-19 Tom Tromey <tromey@redhat.com>
6889 Gary Benson <gbenson@redhat.com>
6890
6891 * server.h: Add static assertion.
6892 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
6893
6894 2014-08-19 Tom Tromey <tromey@redhat.com>
6895 Gary Benson <gbenson@redhat.com>
6896
6897 * Makefile.in (SFILES): Add common/errors.c.
6898 (OBS): Add errors.o.
6899 (IPA_OBS): Add errors-ipa.o.
6900 (errors.o): New rule.
6901 (errors-ipa.o): Likewise.
6902 * utils.h (perror_with_name, error, warning): Don't declare.
6903 * utils.c (warning): Renamed and rewritten as...
6904 (vwarning): New function.
6905 (error): Renamed and rewritten as...
6906 (verror): New function.
6907 (internal_error): Renamed and rewritten as...
6908 (internal_verror): New function.
6909
6910 2014-08-07 Gary Benson <gbenson@redhat.com>
6911
6912 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
6913 * configure: Regenerate.
6914 * config.in: Likewise.
6915 * server.h: Do not include errno.h.
6916 * event-loop.c: Likewise.
6917 * hostio-errno.c: Likewise.
6918 * linux-low.c: Likewise.
6919 * remote-utils.c: Likewise.
6920 * spu-low.c: Likewise.
6921 * utils.c: Likewise.
6922 * gdbreplay.c: Unconditionally include errno.h.
6923
6924 2014-08-07 Gary Benson <gbenson@redhat.com>
6925
6926 * server.h: Do not include string.h.
6927 * event-loop.c: Likewise.
6928 * linux-low.c: Likewise.
6929 * regcache.c: Likewise.
6930 * remote-utils.c: Likewise.
6931 * spu-low.c: Likewise.
6932 * utils.c: Likewise.
6933
6934 2014-08-07 Gary Benson <gbenson@redhat.com>
6935
6936 * server.h: Do not include gdb_assert.h.
6937
6938 2014-08-07 Gary Benson <gbenson@redhat.com>
6939
6940 * server.h: Do not include common-utils.h.
6941
6942 2014-08-07 Gary Benson <gbenson@redhat.com>
6943
6944 * server.h: Do not include ptid.h.
6945 * notif.h: Likewise.
6946
6947 2014-08-07 Gary Benson <gbenson@redhat.com>
6948
6949 * server.h: Do not include gdb_locale.h.
6950
6951 2014-08-07 Gary Benson <gbenson@redhat.com>
6952
6953 * server.h: Do not include gdb/signals.h.
6954 * win32-low.c: Likewise.
6955
6956 2014-08-07 Gary Benson <gbenson@redhat.com>
6957
6958 * server.h: Do not include pathmax.h.
6959
6960 2014-08-07 Gary Benson <gbenson@redhat.com>
6961
6962 * server.h: Do not include libiberty.h.
6963 * linux-bfin-low.c: Likewise.
6964
6965 2014-08-07 Gary Benson <gbenson@redhat.com>
6966
6967 * server.h: Do not include ansidecl.h.
6968
6969 2014-08-07 Gary Benson <gbenson@redhat.com>
6970
6971 * linux-x86-low.c: Do not include stddef.h.
6972 * lynx-ppc-low.c: Likewise.
6973 * tracepoint.c: Likewise.
6974
6975 2014-08-07 Gary Benson <gbenson@redhat.com>
6976
6977 * server.h: Do not include stdarg.h.
6978 * nto-low.c: Likewise.
6979
6980 2014-08-07 Gary Benson <gbenson@redhat.com>
6981
6982 * server.h: Do not include stdlib.h.
6983 * inferiors.c: Likewise.
6984 * linux-low.c: Likewise.
6985 * regcache.c: Likewise.
6986 * spu-low.c: Likewise.
6987 * tracepoint.c: Likewise.
6988 * utils.c: Likewise.
6989
6990 2014-08-07 Gary Benson <gbenson@redhat.com>
6991
6992 * server.h: Do not include stdio.h.
6993 * linux-low.c: Likewise.
6994 * remote-utils.c: Likewise.
6995 * spu-low.c: Likewise.
6996 * utils.c: Likewise.
6997 * wincecompat.c: Likewise.
6998
6999 2014-08-06 Gary Benson <gbenson@redhat.com>
7000
7001 * regcache.c (init_register_cache): Move conditionals inside if.
7002
7003 2014-08-06 Gary Benson <gbenson@redhat.com>
7004
7005 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
7006
7007 2014-07-31 Gary Benson <gbenson@redhat.com>
7008
7009 * ax.h: Do not include server.h.
7010 * gdbthread.h: Likewise.
7011 * lynx-low.h: Likewise.
7012 * notif.h: Likewise.
7013
7014 2014-07-30 Gary Benson <gbenson@redhat.com>
7015
7016 * server.h: Include common-defs.h.
7017 Do not include config.h or build-gnulib-gdbserver/config.h.
7018
7019 2014-07-30 Gary Benson <gbenson@redhat.com>
7020
7021 * hostio-errno.c: Move server.h to top of includes list.
7022 * inferiors.c: Likewise.
7023 * linux-x86-low.c: Likewise.
7024 * notif.c: Include server.h.
7025
7026 2014-07-24 Tom Tromey <tromey@redhat.com>
7027 Gary Benson <gbenson@redhat.com>
7028
7029 * server.h (CORE_ADDR): Now unsigned.
7030
7031 2014-07-16 Pedro Alves <palves@redhat.com>
7032
7033 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
7034
7035 2014-07-15 Pedro Alves <palves@redhat.com>
7036
7037 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
7038 copy.
7039
7040 2014-07-11 Pedro Alves <palves@redhat.com>
7041
7042 * linux-low.c (kill_wait_lwp): New function, based on
7043 kill_one_lwp_callback, but use my_waitpid directly.
7044 (kill_one_lwp_callback, linux_kill): Use it.
7045
7046 2014-06-23 Pedro Alves <palves@redhat.com>
7047
7048 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
7049 before setting DR0..DR3.
7050
7051 2014-06-20 Gary Benson <gbenson@redhat.com>
7052
7053 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
7054 * configure: Regenerated.
7055 * config.in: Likewise.
7056
7057 2014-06-20 Gary Benson <gbenson@redhat.com>
7058
7059 * Makefile.in (SFILES): Update locations for files moved
7060 from common to nat.
7061 (object file files): Reordered.
7062
7063 2014-06-20 Gary Benson <gbenson@redhat.com>
7064
7065 * i386-low.h (i386_dr_low_can_set_addr): Removed.
7066 (i386_dr_low_set_addr): Likewise.
7067 (i386_dr_low_get_addr): Likewise.
7068 (i386_dr_low_can_set_control): Likewise.
7069 (i386_dr_low_set_control): Likewise.
7070 (i386_dr_low_get_control): Likewise.
7071 (i386_dr_low_get_status): Likewise.
7072 (i386_get_debug_register_length): Likewise.
7073 * linux-x86-low.c (i386_dr_low_set_addr):
7074 Changed signature. Made static.
7075 (i386_dr_low_get_addr): Likewise.
7076 (i386_dr_low_set_control): Likewise.
7077 (i386_dr_low_get_control): Likewise.
7078 (i386_dr_low_get_status): Likewise.
7079 (i386_dr_low): New global variable.
7080 * win32-i386-low.c (i386_dr_low_set_addr):
7081 Changed signature. Made static.
7082 (i386_dr_low_get_addr): Likewise.
7083 (i386_dr_low_set_control): Likewise.
7084 (i386_dr_low_get_control): Likewise.
7085 (i386_dr_low_get_status): Likewise.
7086 (i386_dr_low): New global variable.
7087
7088 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
7089
7090 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
7091 * Makefile.in (AR, AR_FLAGS): Define.
7092 * configure: Regenerate.
7093
7094 2014-06-19 Gary Benson <gbenson@redhat.com>
7095
7096 * Makefile.in (i386-dregs.o): New rule.
7097 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
7098 * i386-low.c (target.h): Remove include.
7099 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
7100 (DR_CONTROL_SHIFT): Likewise.
7101 (DR_CONTROL_SIZE): Likewise.
7102 (DR_RW_EXECUTE): Likewise.
7103 (DR_RW_WRITE): Likewise.
7104 (DR_RW_READ): Likewise.
7105 (DR_RW_IORW): Likewise.
7106 (DR_LEN_1): Likewise.
7107 (DR_LEN_2): Likewise.
7108 (DR_LEN_4): Likewise.
7109 (DR_LEN_8): Likewise.
7110 (DR_LOCAL_ENABLE_SHIFT): Likewise.
7111 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
7112 (DR_ENABLE_SIZE): Likewise.
7113 (DR_LOCAL_SLOWDOWN): Likewise.
7114 (DR_GLOBAL_SLOWDOWN): Likewise.
7115 (DR_CONTROL_RESERVED): Likewise.
7116 (I386_DR_CONTROL_MASK): Likewise.
7117 (I386_DR_VACANT): Likewise.
7118 (I386_DR_LOCAL_ENABLE): Likewise.
7119 (I386_DR_GLOBAL_ENABLE): Likewise.
7120 (I386_DR_DISABLE): Likewise.
7121 (I386_DR_SET_RW_LEN): Likewise.
7122 (I386_DR_GET_RW_LEN): Likewise.
7123 (I386_DR_WATCH_HIT): Likewise.
7124 (i386_wp_op_t): Likewise.
7125 (i386_show_dr): Likewise.
7126 (i386_length_and_rw_bits): Likewise.
7127 (i386_insert_aligned_watchpoint): Likewise.
7128 (i386_remove_aligned_watchpoint): Likewise.
7129 (i386_handle_nonaligned_watchpoint): Likewise.
7130 i386_update_inferior_debug_regs(): Likewise.
7131 (i386_dr_insert_watchpoint): Likewise.
7132 (i386_dr_remove_watchpoint): Likewise.
7133 (i386_dr_region_ok_for_watchpoint): Likewise.
7134 (i386_dr_stopped_data_address): Likewise.
7135 (i386_dr_stopped_by_watchpoint): Likewise.
7136
7137 2014-06-19 Gary Benson <gbenson@redhat.com>
7138
7139 * i386-low.c (i386_dr_show): Renamed to
7140 i386_show_dr and made static. All uses updated.
7141 (i386_dr_length_and_rw_bits): Renamed to
7142 i386_length_and_rw_bits and made static.
7143 All uses updated.
7144 (i386_dr_insert_aligned_watchpoint): Renamed to
7145 i386_insert_aligned_watchpoint and made static.
7146 All uses updated.
7147 (i386_dr_remove_aligned_watchpoint): Renamed to
7148 i386_remove_aligned_watchpoint and made static.
7149 All uses updated.
7150 (i386_dr_update_inferior_debug_regs): Renamed to
7151 i386_update_inferior_debug_regs and made static.
7152 All uses updated.
7153
7154 2014-06-18 Gary Benson <gbenson@redhat.com>
7155
7156 * i386-low.h (i386_dr_low_can_set_addr): New macro.
7157 (i386_dr_low_can_set_control): Likewise.
7158 (i386_get_debug_register_length): Likewise.
7159 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
7160 (i386_dr_low_can_set_control): Likewise.
7161 (i386_get_debug_register_length): Likewise.
7162
7163 2014-06-17 Gary Benson <gbenson@redhat.com>
7164
7165 * i386-low.h (i386-dregs.h): New include.
7166 (DR_FIRSTADDR): Now in i386-dregs.h.
7167 (DR_LASTADDR): Likewise.
7168 (DR_NADDR): Likewise.
7169 (DR_STATUS): Likewise.
7170 (DR_CONTROL): Likewise.
7171 (i386_debug_reg_state): Likewise.
7172 (i386_dr_insert_watchpoint): Likewise.
7173 (i386_dr_remove_watchpoint): Likewise.
7174 (i386_dr_region_ok_for_watchpoint): Likewise.
7175 (i386_dr_stopped_data_address): Likewise.
7176 (i386_dr_stopped_by_watchpoint): Likewise.
7177 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
7178
7179 2014-06-18 Gary Benson <gbenson@redhat.com>
7180
7181 * i386-low.h (i386_low_insert_watchpoint): Renamed to
7182 i386_dr_insert_watchpoint.
7183 (i386_low_remove_watchpoint): Renamed to
7184 i386_dr_remove_watchpoint.
7185 (i386_low_region_ok_for_watchpoint): Renamed to
7186 i386_dr_region_ok_for_watchpoint.
7187 (i386_low_stopped_data_address): Renamed to
7188 i386_dr_stopped_data_address.
7189 (i386_low_stopped_by_watchpoint): Renamed to
7190 i386_dr_stopped_by_watchpoint.
7191 * i386-low.c (i386_show_dr): Renamed to
7192 i386_dr_show and made nonstatic. All uses updated.
7193 (i386_length_and_rw_bits): Renamed to
7194 i386_dr_length_and_rw_bits and made nonstatic.
7195 All uses updated.
7196 (i386_insert_aligned_watchpoint): Renamed to
7197 i386_dr_insert_aligned_watchpoint and made nonstatic.
7198 All uses updated.
7199 (i386_remove_aligned_watchpoint): Renamed to
7200 i386_dr_remove_aligned_watchpoint and made nonstatic.
7201 All uses updated.
7202 (i386_update_inferior_debug_regs): Renamed to
7203 i386_dr_update_inferior_debug_regs and made nonstatic.
7204 All uses updated.
7205 (i386_low_insert_watchpoint): Renamed to
7206 i386_dr_insert_watchpoint. All uses updated.
7207 (i386_low_remove_watchpoint): Renamed to
7208 i386_dr_remove_watchpoint. All uses updated.
7209 (i386_low_region_ok_for_watchpoint): Renamed to
7210 i386_dr_region_ok_for_watchpoint. All uses updated.
7211 (i386_low_stopped_data_address): Renamed to
7212 i386_dr_stopped_data_address. All uses updated.
7213 (i386_low_stopped_by_watchpoint): Renamed to
7214 i386_dr_stopped_by_watchpoint. All uses updated.
7215
7216 2014-06-18 Gary Benson <gbenson@redhat.com>
7217
7218 * i386-low.c (i386_dr_low_can_set_addr): New macro.
7219 (i386_dr_low_can_set_control): Likewise.
7220 (i386_insert_aligned_watchpoint): New check.
7221
7222 2014-06-18 Gary Benson <gbenson@redhat.com>
7223
7224 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
7225 Renamed to state.
7226
7227 2014-06-18 Gary Benson <gbenson@redhat.com>
7228
7229 * i386-low.c (i386_length_and_rw_bits): Use internal_error
7230 instead of fatal and error.
7231 (i386_handle_nonaligned_watchpoint): Likewise.
7232
7233 2014-06-18 Gary Benson <gbenson@redhat.com>
7234
7235 * i386-low.c (i386_get_debug_register_length): New macro.
7236 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
7237 (i386_show_dr): Use debug_printf instead of fprintf. Use
7238 phex to format values.
7239
7240 2014-06-18 Gary Benson <gbenson@redhat.com>
7241
7242 * i386-low.h: Comment changes.
7243 * i386-low.c: Likewise.
7244
7245 2014-06-18 Gary Benson <gbenson@redhat.com>
7246
7247 * i386-low.c: Whitespace changes.
7248
7249 2014-06-12 Tom Tromey <tromey@redhat.com>
7250
7251 * utils.c (freeargv): Remove.
7252
7253 2014-06-12 Tom Tromey <tromey@redhat.com>
7254
7255 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
7256 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
7257 (parse_debug_format_options): Likewise.
7258 (gdbserver_usage): Likewise.
7259 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
7260 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
7261 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
7262 against libiberty.
7263 ($(LIBGNU)): Depend on libiberty.
7264 (all-lib): Recurse into all subdirs.
7265 (install-only): Invoke "install" target in subdirs.
7266 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
7267 targets.
7268 * configure: Rebuild.
7269 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
7270 for vasprintf, vsnprintf, or gettimeofday.
7271 * configure.srv: Don't add safe-ctype.o or lbasename.o to
7272 srv_tgtobj.
7273
7274 2014-06-05 Joel Brobecker <brobecker@adacore.com>
7275
7276 * development.sh: Delete.
7277 * Makefile.in (config.status): Adjust dependency on development.sh.
7278 * configure.ac: Adjust development.sh source call.
7279 * configure: Regenerate.
7280
7281 2014-06-02 Pedro Alves <palves@redhat.com>
7282
7283 * ax.c (gdb_free_agent_expr): New function.
7284 * ax.h (gdb_free_agent_expr): New declaration.
7285 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
7286 list.
7287 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
7288 static.
7289 (clear_breakpoint_conditions_and_commands): New function.
7290 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
7291 (clear_breakpoint_conditions_and_commands): New declaration.
7292
7293 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
7294
7295 * linux-aarch64-low.c (asm/ptrace.h): Include.
7296
7297 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
7298
7299 Fix TLS access for -static -pthread.
7300 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
7301 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
7302 (thread_db_load_search, try_thread_db_load_1): Initialize it.
7303
7304 2014-05-20 Pedro Alves <palves@redhat.com>
7305
7306 * linux-aarch64-low.c (aarch64_insert_point)
7307 (aarch64_remove_point): No longer check whether the type is
7308 supported here. Adjust to new interface.
7309 (the_low_target): Install aarch64_supports_z_point_type as
7310 supports_z_point_type method.
7311 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
7312 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
7313 instead of a Z packet char. Adjust.
7314 (arm_supports_z_point_type): New function.
7315 (arm_insert_point, arm_remove_point): Adjust to new interface.
7316 (the_low_target): Install arm_supports_z_point_type.
7317 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
7318 (cris_insert_point, cris_remove_point): Adjust to new interface.
7319 Don't check whether the type is supported here.
7320 (the_low_target): Install cris_supports_z_point_type.
7321 * linux-low.c (linux_supports_z_point_type): New function.
7322 (linux_insert_point, linux_remove_point): Adjust to new interface.
7323 * linux-low.h (struct linux_target_ops) <insert_point,
7324 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
7325 raw_breakpoint pointer parameter.
7326 <supports_z_point_type>: New method.
7327 * linux-mips-low.c (mips_supports_z_point_type): New function.
7328 (mips_insert_point, mips_remove_point): Adjust to new interface.
7329 Use mips_supports_z_point_type.
7330 (the_low_target): Install mips_supports_z_point_type.
7331 * linux-ppc-low.c (the_low_target): Install NULL as
7332 supports_z_point_type method.
7333 * linux-s390-low.c (the_low_target): Install NULL as
7334 supports_z_point_type method.
7335 * linux-sparc-low.c (the_low_target): Install NULL as
7336 supports_z_point_type method.
7337 * linux-x86-low.c (x86_supports_z_point_type): New function.
7338 (x86_insert_point): Adjust to new insert_point interface. Use
7339 insert_memory_breakpoint. Adjust to new
7340 i386_low_insert_watchpoint interface.
7341 (x86_remove_point): Adjust to remove_point interface. Use
7342 remove_memory_breakpoint. Adjust to new
7343 i386_low_remove_watchpoint interface.
7344 (the_low_target): Install x86_supports_z_point_type.
7345 * lynx-low.c (lynx_target_ops): Install NULL as
7346 supports_z_point_type callback.
7347 * nto-low.c (nto_supports_z_point_type): New.
7348 (nto_insert_point, nto_remove_point): Adjust to new interface.
7349 (nto_target_ops): Install nto_supports_z_point_type.
7350 * mem-break.c: Adjust intro comment.
7351 (struct raw_breakpoint) <raw_type, size>: New fields.
7352 <inserted>: Update comment.
7353 <shlib_disabled>: Delete field.
7354 (enum bkpt_type) <gdb_breakpoint>: Delete value.
7355 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
7356 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
7357 (raw_bkpt_type_to_target_hw_bp_type): New function.
7358 (find_enabled_raw_code_breakpoint_at): New function.
7359 (find_raw_breakpoint_at): New type and size parameters. Use them.
7360 (insert_memory_breakpoint): New function, based off
7361 set_raw_breakpoint_at.
7362 (remove_memory_breakpoint): New function.
7363 (set_raw_breakpoint_at): Reimplement.
7364 (set_breakpoint): New, based on set_breakpoint_at.
7365 (set_breakpoint_at): Reimplement.
7366 (delete_raw_breakpoint): Go through the_target->remove_point
7367 instead of assuming memory breakpoints.
7368 (find_gdb_breakpoint_at): Delete.
7369 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
7370 (find_gdb_breakpoint): New function.
7371 (set_gdb_breakpoint_at): Delete.
7372 (z_type_supported): New function.
7373 (set_gdb_breakpoint_1): New function, loosely based off
7374 set_gdb_breakpoint_at.
7375 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
7376 (delete_gdb_breakpoint_at): Delete.
7377 (delete_gdb_breakpoint_1): New function, loosely based off
7378 delete_gdb_breakpoint_at.
7379 (delete_gdb_breakpoint): New function.
7380 (clear_gdb_breakpoint_conditions): Rename to ...
7381 (clear_breakpoint_conditions): ... this. Don't handle a NULL
7382 breakpoint.
7383 (add_condition_to_breakpoint): Make static.
7384 (add_breakpoint_condition): Take a struct breakpoint pointer
7385 instead of an address. Adjust.
7386 (gdb_condition_true_at_breakpoint): Rename to ...
7387 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
7388 z_type parameter.
7389 (gdb_condition_true_at_breakpoint): Reimplement.
7390 (add_breakpoint_commands): Take a struct breakpoint pointer
7391 instead of an address. Adjust.
7392 (gdb_no_commands_at_breakpoint): Rename to ...
7393 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
7394 parameter. Return true if no breakpoint was found. Change debug
7395 output.
7396 (gdb_no_commands_at_breakpoint): Reimplement.
7397 (run_breakpoint_commands): Rename to ...
7398 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
7399 and change return type to boolean.
7400 (run_breakpoint_commands): New function.
7401 (gdb_breakpoint_here): Also check for Z1 breakpoints.
7402 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
7403 breakpoint. Go through the_target->remove_point instead of
7404 assuming memory breakpoint.
7405 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
7406 software and hardware breakpoints.
7407 (reinsert_raw_breakpoint): Go through the_target->insert_point
7408 instead of assuming memory breakpoint.
7409 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
7410 software and hardware breakpoints.
7411 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
7412 Check both software and hardware breakpoints.
7413 (validate_inserted_breakpoint): Assert the breakpoint is a
7414 software breakpoint. Set the inserted flag to -1 instead of
7415 setting shlib_disabled.
7416 (delete_disabled_breakpoints): Adjust.
7417 (validate_breakpoints): Only validate software breakpoints.
7418 Adjust to inserted flag change.
7419 (check_mem_read, check_mem_write): Skip breakpoint types other
7420 than software breakpoints. Adjust to inserted flag change.
7421 * mem-break.h (enum raw_bkpt_type): New enum.
7422 (raw_breakpoint, struct process_info): Forward declare.
7423 (Z_packet_to_target_hw_bp_type): Delete declaration.
7424 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
7425 (set_gdb_breakpoint, delete_gdb_breakpoint)
7426 (clear_breakpoint_conditions): New declarations.
7427 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
7428 (breakpoint_inserted_here): Update comment.
7429 (add_breakpoint_condition, add_breakpoint_commands): Replace
7430 address parameter with a breakpoint pointer parameter.
7431 (gdb_breakpoint_here): Update comment.
7432 (delete_gdb_breakpoint_at): Delete.
7433 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
7434 * server.c (process_point_options): Take a struct breakpoint
7435 pointer instead of an address. Adjust.
7436 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
7437 delete_gdb_breakpoint.
7438 * spu-low.c (spu_target_ops): Install NULL as
7439 supports_z_point_type method.
7440 * target.h: Include mem-break.h.
7441 (struct target_ops) <prepare_to_access_memory>: Update comment.
7442 <supports_z_point_type>: New field.
7443 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
7444 instead of a char. Also take a raw breakpoint pointer.
7445 * win32-arm-low.c (the_low_target): Install NULL as
7446 supports_z_point_type.
7447 * win32-i386-low.c (i386_supports_z_point_type): New function.
7448 (i386_insert_point, i386_remove_point): Adjust to new interface.
7449 (the_low_target): Install i386_supports_z_point_type.
7450 * win32-low.c (win32_supports_z_point_type): New function.
7451 (win32_insert_point, win32_remove_point): Adjust to new interface.
7452 (win32_target_ops): Install win32_supports_z_point_type.
7453 * win32-low.h (struct win32_target_ops):
7454 <supports_z_point_type>: New method.
7455 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
7456 instead of a char. Also take a raw breakpoint pointer.
7457
7458 2014-05-20 Pedro Alves <palves@redhat.com>
7459
7460 * mem-break.h: Include break-common.h.
7461 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
7462 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
7463 (Z_packet_to_target_hw_bp_type): New declaration.
7464 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
7465 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
7466 (Z_PACKET_ACCESS_WP): Delete macros.
7467 (Z_packet_to_hw_type): Delete function.
7468 * i386-low.h: Don't include break-common.h here.
7469 (Z_packet_to_hw_type): Delete declaration.
7470 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
7471 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
7472 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
7473 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
7474 * linux-aarch64-low.c: Don't include break-common.h here.
7475 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
7476 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
7477 (Z_packet_to_target_hw_bp_type): Delete function.
7478 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
7479 function.
7480 (mips_insert_point, mips_remove_point): Use
7481 Z_packet_to_target_hw_bp_type.
7482
7483 2014-05-20 Pedro Alves <palves@redhat.com>
7484
7485 * linux-aarch64-low.c: Include break-common.h.
7486 (enum target_point_type): Delete.
7487 (Z_packet_to_point_type): Rename to ...
7488 (Z_packet_to_target_hw_bp_type): ... this, and return a
7489 target_hw_bp_type instead.
7490 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
7491 instead of an enum target_point_type.
7492 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
7493 breakpoint type.
7494 (aarch64_dr_state_insert_one_point)
7495 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
7496 (aarch64_handle_aligned_watchpoint)
7497 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
7498 Take an enum target_hw_bp_type instead of an enum
7499 target_point_type.
7500 (aarch64_supports_z_point_type): New function.
7501 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
7502 use Z_packet_to_target_hw_bp_type.
7503
7504 2014-05-20 Joel Brobecker <brobecker@adacore.com>
7505
7506 * configure.ac: Only use -Werror by default when DEVELOPMENT
7507 is true.
7508 * configure: Regenerate.
7509
7510 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
7511
7512 Fix gdbserver qGetTLSAddr for x86_64 -m32.
7513 * linux-x86-low.c (X86_64_USER_REGS): New.
7514 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
7515
7516 2014-04-28 Yao Qi <yao@codesourcery.com>
7517
7518 * Makefile.in (i386-avx512.c): Fix the typo of generated file
7519 name.
7520
7521 2014-04-25 Pedro Alves <palves@redhat.com>
7522
7523 PR server/16255
7524 * linux-low.c (linux_attach_fail_reason_string): New function.
7525 (linux_attach_lwp): Delete.
7526 (linux_attach_lwp_1): Rename to ...
7527 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
7528 argument. Remove "initial" parameter. Return int instead of
7529 void. Don't error or warn here.
7530 (linux_attach): Adjust to call linux_attach_lwp. Call error on
7531 failure to attach to the tgid. Call warning when failing to
7532 attach to an lwp.
7533 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
7534 argument. Remove "initial" parameter. Return int instead of
7535 void. Don't error or warn here.
7536 (linux_attach_fail_reason_string): New declaration.
7537 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
7538 interface change. Use linux_attach_fail_reason_string.
7539
7540 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
7541 Walfred Tedeschi <walfred.tedeschi@intel.com>
7542
7543 * Makefile.in: Added rules to handle new files
7544 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
7545 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
7546 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
7547 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
7548 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
7549 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
7550 x32-avx512-linux.o.
7551 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
7552 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
7553 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
7554 i386/x32-avx512.xml.
7555 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
7556 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
7557 i386/x32-avx512-linux.xml.
7558 * i387-fp.c (num_avx512_k_registers): New constant for number
7559 of K registers.
7560 (num_avx512_zmmh_low_registers): New constant for number of
7561 lower ZMM registers (0-15).
7562 (num_avx512_zmmh_high_registers): New constant for number of
7563 higher ZMM registers (16-31).
7564 (num_avx512_ymmh_registers): New contant for number of higher
7565 YMM registers (ymm16-31 added by avx521 on x86_64).
7566 (num_avx512_xmm_registers): New constant for number of higher
7567 XMM registers (xmm16-31 added by AVX512 on x86_64).
7568 (struct i387_xsave): Add space for AVX512 registers.
7569 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
7570 Add code to handle AVX512 registers.
7571 (i387_xsave_to_cache): Add code to handle AVX512 registers.
7572 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
7573 prototypei from generated file.
7574 (tdesc_amd64_avx512_linux): Likewise.
7575 (init_registers_x32_avx512_linux): Likewise.
7576 (tdesc_x32_avx512_linux): Likewise.
7577 (init_registers_i386_avx512_linux): Likewise.
7578 (tdesc_i386_avx512_linux): Likewise.
7579 (x86_64_regmap): Add AVX512 registers.
7580 (x86_linux_read_description): Add code to handle AVX512 XSTATE
7581 mask.
7582 (initialize_low_arch): Add code to initialize AVX512 registers.
7583
7584 2014-04-23 Pedro Alves <palves@redhat.com>
7585
7586 * mem-break.c (find_gdb_breakpoint_at): Make static.
7587 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
7588
7589 2014-04-23 Pedro Alves <palves@redhat.com>
7590
7591 * i386-low.c: Don't include break-common.h here.
7592 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
7593 prototype to take target_hw_bp_type as argument instead of a Z
7594 packet char.
7595 * i386-low.h: Include break-common.h here.
7596 (Z_packet_to_hw_type): Declare.
7597 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
7598 prototypes.
7599 * linux-x86-low.c (x86_insert_point): Convert the packet number to
7600 a target_hw_bp_type before calling i386_low_insert_watchpoint.
7601 (x86_remove_point): Convert the packet number to a
7602 target_hw_bp_type before calling i386_low_remove_watchpoint.
7603 * win32-i386-low.c (i386_insert_point): Convert the packet number
7604 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
7605 (i386_remove_point): Convert the packet number to a
7606 target_hw_bp_type before calling i386_low_remove_watchpoint.
7607
7608 2014-04-23 Pedro Alves <palves@redhat.com>
7609
7610 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
7611
7612 2014-04-10 Pedro Alves <palves@redhat.com>
7613
7614 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
7615 Check if the condition or command is NULL before checking if the
7616 breakpoint is known. On success, return true.
7617 * mem-break.h (add_breakpoint_condition): Document return.
7618 (add_breakpoint_commands): Add describing comment.
7619 * server.c (skip_to_semicolon): New function.
7620 (process_point_options): Use it.
7621
7622 2014-04-09 Pedro Alves <palves@redhat.com>
7623
7624 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
7625 to lwpid_of.
7626
7627 2014-02-27 Pedro Alves <palves@redhat.com>
7628
7629 PR 12702
7630 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
7631 macros.
7632 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
7633 output.
7634 (last_thread_of_process_p): Take a PID argument instead of a
7635 thread pointer.
7636 (linux_wait_for_lwp): Delete.
7637 (num_lwps, check_zombie_leaders, not_stopped_callback): New
7638 functions.
7639 (linux_low_filter_event): New function, party factored out from
7640 linux_wait_for_event.
7641 (linux_wait_for_event): Rename to ...
7642 (linux_wait_for_event_filtered): ... this. Add new filter ptid
7643 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
7644 sigsuspend. Check for zombie leaders.
7645 (linux_wait_for_event): Reimplement as wrapper around
7646 linux_wait_for_event_filtered.
7647 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
7648 a normal or signal exit is seen, it's the whole process exiting.
7649 (wait_for_sigstop): No longer a for_each_inferior callback.
7650 Rewrite on top of linux_wait_for_event_filtered.
7651 (stop_all_lwps): Call wait_for_sigstop directly.
7652 * server.c (resume, handle_target_event): Handle
7653 TARGET_WAITKIND_NO_RESUMED.
7654
7655 2014-02-26 Joel Brobecker <brobecker@adacore.com>
7656
7657 * win32-low.c (psapi_get_dll_name,
7658 * win32_CreateToolhelp32Snapshot): Delete.
7659 (win32_CreateToolhelp32Snapshot, win32_Module32First)
7660 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
7661 Delete.
7662 (handle_load_dll): Add function description.
7663 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
7664
7665 2014-02-26 Joel Brobecker <brobecker@adacore.com>
7666
7667 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
7668 Add comment.
7669 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
7670 base address when calling win32_add_one_solib.
7671 (handle_load_dll): Delete local variable load_addr.
7672 Remove 0x1000 offset applied to DLL base address when calling
7673 win32_add_one_solib.
7674 (handle_unload_dll): Add comment.
7675
7676 2014-02-26 Joel Brobecker <brobecker@adacore.com>
7677
7678 * win32-low.c (win32_add_all_dlls): Renames
7679 win32_ensure_ntdll_loaded. Rewrite function documentation.
7680 Adjust implementation to always load all DLLs.
7681 Add 0x1000 offset to DLL base address when calling
7682 win32_add_one_solib.
7683 (child_initialization_done): New static global.
7684 (do_initial_child_stuff): Set child_initialization_done to
7685 zero during child initialization, and 1 after. Replace call
7686 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
7687 Add comment.
7688 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
7689 (handle_unload_dll): Add function documentation.
7690 (get_child_debug_event): Ignore load and unload DLL events
7691 during child initialization.
7692
7693 2014-02-20 Doug Evans <dje@google.com>
7694
7695 Remove global all_lwps.
7696 * inferiors.h (ptid_of): Move here from linux-low.h.
7697 (pid_of, lwpid_of): Ditto.
7698 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
7699 parameter is a struct thread_info * now.
7700 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
7701 directly. Pass &all_threads to find_inferior instead of &all_lwps.
7702 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
7703 directly.
7704 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
7705 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
7706 * linux-arm-low.c (update_registers_callback): Update, "entry"
7707 parameter is a struct thread_info * now.
7708 Fetch lwpid from current_inferior directly.
7709 (arm_insert_point): Pass &all_threads to find_inferior instead of
7710 &all_lwps.
7711 (arm_remove_point): Ditto.
7712 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
7713 (arm_prepare_to_resume): Fetch pid from thread.
7714 (arm_read_description): Fetch lwpid from current_inferior directly.
7715 * linux-low.c (all_lwps): Delete.
7716 (delete_lwp): Delete call to remove_inferior.
7717 (handle_extended_wait): Fetch lwpid from thread.
7718 (add_lwp): Don't set lwp->entry.id. Remove call to
7719 add_inferior_to_list.
7720 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
7721 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
7722 (kill_one_lwp_callback): Ditto.
7723 (linux_kill): Don't dereference NULL pointer.
7724 Fetch ptid,lwpid from thread.
7725 (get_detach_signal): Fetch ptid from thread.
7726 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
7727 Simplify call to regcache_invalidate_thread.
7728 (delete_lwp_callback): Update, "entry" parameter is a
7729 struct thread_info * now. Fetch pid from thread.
7730 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
7731 (status_pending_p_callback): Update, "entry" parameter is a
7732 struct thread_info * now. Fetch ptid from thread.
7733 (find_lwp_pid): Update, "entry" parameter is a
7734 struct thread_info * now.
7735 (linux_wait_for_lwp): Fetch pid from thread.
7736 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
7737 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
7738 (enqueue_one_deferred_signal): Fetch lwpid from thread.
7739 (dequeue_one_deferred_signal): Ditto.
7740 (cancel_breakpoint): Fetch ptid from current_inferior.
7741 (linux_wait_for_event): Pass &all_threads to find_inferior,
7742 not &all_lwps. Fetch ptid, lwpid from thread.
7743 (count_events_callback): Update, "entry" parameter is a
7744 struct thread_info * now.
7745 (select_singlestep_lwp_callback): Ditto.
7746 (select_event_lwp_callback): Ditto.
7747 (cancel_breakpoints_callback): Ditto.
7748 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
7749 not &all_lwps.
7750 (select_event_lwp): Ditto. Fetch ptid from event_thread.
7751 (unsuspend_one_lwp): Update, "entry" parameter is a
7752 struct thread_info * now.
7753 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
7754 not &all_lwps.
7755 (linux_stabilize_threads): Ditto. And for for_each_inferior.
7756 Fetch lwpid from thread, not lwp.
7757 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
7758 Pass &all_threads to find_inferior, not &all_lwps.
7759 (send_sigstop): Fetch lwpid from thread, not lwp.
7760 (send_sigstop_callback): Update, "entry" parameter is a
7761 struct thread_info * now.
7762 (suspend_and_send_sigstop_callback): Ditto.
7763 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
7764 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
7765 struct thread_info * now.
7766 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
7767 from thread, lwp.
7768 (lwp_running): Update, "entry" parameter is a
7769 struct thread_info * now.
7770 (stop_all_lwps): Fetch ptid from thread.
7771 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
7772 (linux_resume_one_lwp): Fetch lwpid from thread.
7773 (linux_set_resume_request): Update, "entry" parameter is a
7774 struct thread_info * now. Fetch pid, lwpid from thread.
7775 (resume_status_pending_p): Update, "entry" parameter is a
7776 struct thread_info * now.
7777 (need_step_over_p): Ditto. Fetch lwpid from thread.
7778 (start_step_over): Fetch lwpid from thread.
7779 (linux_resume_one_thread): Update, "entry" parameter is a
7780 struct thread_info * now. Fetch lwpid from thread.
7781 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
7782 (proceed_one_lwp): Update, "entry" parameter is a
7783 struct thread_info * now. Fetch lwpid from thread.
7784 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
7785 struct thread_info * now.
7786 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
7787 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
7788 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
7789 directly.
7790 (regsets_store_inferior_registers): Ditto.
7791 (fetch_register, store_register): Ditto.
7792 (linux_read_memory, linux_write_memory): Ditto.
7793 (linux_request_interrupt): Ditto.
7794 (linux_read_auxv): Ditto.
7795 (linux_xfer_siginfo): Ditto.
7796 (linux_qxfer_spu): Ditto.
7797 (linux_qxfer_libraries_svr4): Ditto.
7798 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
7799 moved to inferiors.h.
7800 (get_lwp): Delete.
7801 (get_thread_lwp): Update.
7802 (struct lwp_info): Delete member "entry". Simplify comment for
7803 member "thread".
7804 (all_lwps): Delete.
7805 * linux-mips-low.c (mips_read_description): Fetch lwpid from
7806 current_inferior directly.
7807 (update_watch_registers_callback): Update, "entry" parameter is a
7808 struct thread_info * now. Fetch pid from thread.
7809 (mips_linux_prepare_to_resume): Fetch ptid from thread.
7810 (mips_insert_point): Fetch lwpid from current_inferior.
7811 Pass &all_threads to find_inferior, not &all_lwps.
7812 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
7813 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
7814 directly.
7815 (mips_stopped_data_address): Ditto.
7816 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
7817 directly.
7818 * linux-tile-low.c (tile_arch_setup): Ditto.
7819 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
7820 (update_debug_registers_callback): Update, "entry" parameter is a
7821 struct thread_info * now. Fetch pid from thread.
7822 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
7823 Pass &all_threads to find_inferior, not &all_lwps.
7824 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
7825 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
7826 Pass &all_threads to find_inferior, not &all_lwps.
7827 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
7828 (i386_dr_low_get_status): Ditto.
7829 (x86_linux_prepare_to_resume): Fetch ptid from thread.
7830 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
7831 (x86_linux_read_description): Ditto.
7832 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
7833
7834 2014-02-20 Doug Evans <dje@google.com>
7835
7836 * inferiors.c (get_first_inferior): Fix buglet.
7837
7838 2014-02-19 Doug Evans <dje@google.com>
7839
7840 * gdbthread.h (add_thread): Change result type to struct thread_info *.
7841 * inferiors.c (add_thread): Change result type to struct thread_info *.
7842 All callers updated.
7843 (add_lwp): Call add_thread here instead of in callers.
7844 All callers updated.
7845 * linux-low.h (get_lwp_thread): Rewrite.
7846 (struct lwp_info): New member "thread".
7847
7848 2014-02-19 Doug Evans <dje@google.com>
7849
7850 * linux-low.c (add_lwp): Change result to struct lwp_info *.
7851 All callers updated.
7852
7853 2014-02-19 Doug Evans <dje@google.com>
7854
7855 * inferiors.c (add_thread): Fix whitespace.
7856
7857 2014-02-19 Doug Evans <dje@google.com>
7858
7859 * dll.c (clear_dlls): Replace accessing list implemention details
7860 with API function.
7861 * gdbthread.h (get_first_thread): Declare.
7862 * inferiors.c (for_each_inferior_with_data): New function.
7863 (get_first_thread): New function.
7864 (find_thread_ptid): Simplify.
7865 (get_first_inferior): New function.
7866 (clear_list): Delete.
7867 (one_inferior_p): New function.
7868 (clear_inferior_list): New function.
7869 (clear_inferiors): Update.
7870 * inferiors.h (for_each_inferior_with_data): Declare.
7871 (clear_inferior_list): Declare.
7872 (one_inferior_p): Declare.
7873 (get_first_inferior): Declare.
7874 * linux-low.c (linux_wait_for_event): Replace accessing list
7875 implemention details with API function.
7876 * server.c (target_running): Ditto.
7877 (accumulate_file_name_length): New function.
7878 (emit_dll_description): New function.
7879 (handle_qxfer_libraries): Replace accessing list implemention
7880 details with API function.
7881 (handle_qxfer_threads_worker): New function.
7882 (handle_qxfer_threads_proper): Replace accessing list implemention
7883 details with API function.
7884 (handle_query): Ditto.
7885 (visit_actioned_threads_callback_ftype): New typedef.
7886 (visit_actioned_threads_data): New struct.
7887 (visit_actioned_threads): Rewrite to be find_inferior callback.
7888 (resume): Call find_inferior.
7889 (handle_status): Replace accessing list implemention
7890 details with API function.
7891 (process_serial_event): Replace accessing list implemention details
7892 with API function.
7893 * target.c (set_desired_inferior): Replace accessing list implemention
7894 details with API function.
7895 * tracepoint.c (same_process_p): New function.
7896 (gdb_agent_about_to_close): Replace accessing list implemention
7897 details with API function.
7898 * win32-low.c (child_delete_thread): Replace accessing list
7899 implemention details with API function.
7900 (match_dll_by_basename): New function.
7901 (dll_is_loaded_by_basename): New function.
7902 (win32_ensure_ntdll_loaded): Replace accessing list implemention
7903 details call to dll_is_loaded_by_basename.
7904
7905 2014-02-19 Doug Evans <dje@google.com>
7906
7907 * dll.h (struct dll_info): Add comment.
7908 * gdbthread.h (struct thread_info): Add comment.
7909 (current_ptid): Simplify.
7910 * inferiors.c (add_process): Update.
7911 (remove_process): Update.
7912 * inferiors.h (struct process_info): Rename member "head" to "entry".
7913 * linux-low.c (delete_lwp): Update.
7914 (add_lwp): Update.
7915 (last_thread_of_process_p): Update.
7916 (kill_one_lwp_callback, linux_kill): Update.
7917 (status_pending_p_callback): Update.
7918 (wait_for_sigstop): Update. Simplify read of ptid.
7919 (start_step_over): Update.
7920 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
7921 (get_lwp_thread): Update.
7922 (struct lwp_info): Rename member "head" to "entry".
7923 * regcache.h (inferior_list_entry): Delete.
7924 * server.c (kill_inferior_callback): Update.
7925 (detach_or_kill_inferior_callback): Update.
7926 (print_started_pid): Update.
7927 (print_attached_pid): Update.
7928 (process_serial_event): Simplify read of ptid.
7929 * thread-db.c (thread_db_create_event): Update.
7930 (thread_db_get_tls_address): Update.
7931 * win32-low.c (current_inferior_ptid): Simplify.
7932
7933 2014-02-19 Tom Tromey <tromey@redhat.com>
7934
7935 * target.h (struct target_ops) <supports_btrace>: Add target_ops
7936 argument.
7937 (target_supports_btrace): Update.
7938
7939 2014-02-14 Yao Qi <yao@codesourcery.com>
7940
7941 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
7942 (rsp-low-ipa.o): New target.
7943
7944 2014-02-12 Tom Tromey <tromey@redhat.com>
7945
7946 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
7947 convert_ascii_to_int.
7948 * regcache.c (registers_to_string): Likewise.
7949 * remote-utils.c (decode_M_packet): Likewise.
7950 * server.c (process_serial_event): Likewise.
7951
7952 2014-02-12 Tom Tromey <tromey@redhat.com>
7953
7954 * server.c (handle_query, handle_v_run): Use hex2bin, not
7955 unhexify.
7956 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
7957
7958 2014-02-12 Tom Tromey <tromey@redhat.com>
7959
7960 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
7961 convert_int_to_ascii.
7962 * regcache.c (registers_to_string, collect_register_as_string):
7963 Likewise.
7964 * remote-utils.c (look_up_one_symbol, relocate_instruction):
7965 Likewise.
7966 * server.c (process_serial_event): Likewise.
7967 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
7968 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
7969
7970 2014-02-12 Tom Tromey <tromey@redhat.com>
7971
7972 * remote-utils.c (look_up_one_symbol, monitor_output): Use
7973 bin2hex, not hexify.
7974 * tracepoint.c (cmd_qtstatus): Likewise.
7975
7976 2014-02-12 Tom Tromey <tromey@redhat.com>
7977
7978 * remote-utils.c (monitor_output): Pass explicit length to
7979 hexify.
7980
7981 2014-02-12 Tom Tromey <tromey@redhat.com>
7982
7983 * tracepoint.c: Include rsp-low.h.
7984 * server.c: Include rsp-low.h.
7985 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
7986 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
7987 declare.
7988 * remote-utils.c: Include rsp-low.h.
7989 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
7990 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
7991 (convert_int_to_ascii, convert_ascii_to_int): Move to
7992 common/rsp-low.c.
7993 * regcache.c: Include rsp-low.h.
7994 * ax.c: Include rsp-low.h.
7995 * Makefile.in (SFILES): Add common/rsp-low.c.
7996 (OBS): Add rsp-low.o.
7997 (rsp-low.o): New target.
7998
7999 2014-02-12 Tom Tromey <tromey@redhat.com>
8000
8001 * utils.h (pulongest, plongest, phex_nz): Don't declare.
8002 Include print-utils.h.
8003 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
8004 (plongest, thirty_two, phex_nz): Remove.
8005 * Makefile.in (SFILES): Add common/print-utils.c.
8006 (OBS): Add print-utils.o.
8007 (print-utils-ipa.o): New target.
8008 (print-utils.o): New target.
8009 (IPA_OBJS): Add print-utils-ipa.o.
8010
8011 2014-02-06 Tom Tromey <tromey@redhat.com>
8012
8013 * Makefile.in (SFILES): Fix indentation.
8014
8015 2014-02-05 Doug Evans <dje@google.com>
8016
8017 * linux-low.c (linux_wait_for_event): Improve comment.
8018 (linux_wait_1): Keep current_inferior in sync with event_child.
8019
8020 2014-01-22 Doug Evans <dje@google.com>
8021
8022 * gdbthread.h (gdb_id_to_thread): Delete, unused.
8023
8024 2014-01-22 Doug Evans <dje@google.com>
8025
8026 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
8027 * configure: Regenerate.
8028 * config.in: Regenerate.
8029 * Makefile.in (SFILES): Add debug.c.
8030 (OBS): Add debug.o.
8031 * debug.c: New file.
8032 * debug.h: New file.
8033 * linux-aarch64-low.c (*): Update all debugging printfs to use
8034 debug_printf instead of fprintf.
8035 * linux-arm-low.c (*): Ditto.
8036 * linux-cris-low.c (*): Ditto.
8037 * linux-crisv32-low.c (*): Ditto.
8038 * linux-m32r-low.c (*): Ditto.
8039 * linux-sparc-low.c (*): Ditto.
8040 * linux-x86.c (*): Ditto.
8041 * linux-low.c (*): Ditto.
8042 (linux_wait_1): Add calls to debug_enter, debug_exit.
8043 (linux_wait): Remove redundant debugging printf.
8044 (stop_all_lwps): Add calls to debug_enter, debug_exit.
8045 (linux_resume, unstop_all_lwps): Ditto.
8046 * mem-break.c (*): Update all debugging printfs to use
8047 debug_printf instead of fprintf.
8048 * remote-utils.c (*): Ditto.
8049 * thread-db.c (*): Ditto.
8050 * server.c #include <ctype.h>, "gdb_vecs.h".
8051 (debug_threads): Moved to debug.c.
8052 (*): Update all debugging printfs to use debug_printf instead of
8053 fprintf.
8054 (start_inferior): Replace call to fflush with call to debug_flush.
8055 (monitor_show_help): Mention set debug-format.
8056 (parse_debug_format_options): New function.
8057 (handle_monitor_command): Handle "monitor set debug-format".
8058 (gdbserver_usage): Mention --debug-format.
8059 (main): Parse --debug-format.
8060 * server.h (debug_threads): Declaration moved to debug.h.
8061 #include "debug.h".
8062 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
8063 trace_debug_1 that uses debug_printf.
8064 (tracepoint_look_up_symbols): Update all debugging printfs to use
8065 debug_printf instead of fprintf.
8066
8067 2014-01-20 Baruch Siach <baruch@tkos.co.il>
8068
8069 * linux-xtensa-low.c: Include asm/ptrace.h instead of
8070 sys/ptrace.h.
8071
8072 2014-01-17 Pedro Alves <palves@redhat.com>
8073
8074 PR build/16445
8075 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
8076 defined after including gdb_proc_service.h.
8077
8078 2014-01-16 Doug Evans <dje@google.com>
8079
8080 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
8081 (match_dll): Use it.
8082
8083 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
8084
8085 * target.h (target_ops) <read_btrace>: Change parameters and
8086 return type to allow error reporting.
8087 * server.c (handle_qxfer_btrace): Support delta reads. Pass
8088 trace reading errors on.
8089 * linux-low.c (linux_low_read_btrace): Pass trace reading
8090 errors on.
8091 (linux_low_disable_btrace): New.
8092
8093 2014-01-15 Doug Evans <dje@google.com>
8094
8095 * inferiors.c (thread_id_to_gdb_id): Delete.
8096 * inferiors.h (thread_id_to_gdb_id): Delete.
8097
8098 2014-01-13 Eli Zaretskii <eliz@gnu.org>
8099
8100 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
8101 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
8102 versions.
8103
8104 2014-01-08 Pedro Alves <palves@redhat.com>
8105
8106 * server.c (handle_status): Don't discard previous queued stop
8107 replies or thread's pending status here.
8108 (main) <disconnection>: Do it here instead.
8109
8110 2014-01-08 Pedro Alves <palves@redhat.com>
8111
8112 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
8113 * server.c (visit_actioned_threads, handle_pending_status): New
8114 function.
8115 (handle_v_cont): Factor out parts to ...
8116 (resume): ... this new function. If in all-stop, and a thread
8117 being resumed has a pending status, report it without actually
8118 resuming.
8119 (myresume): Adjust to use the new 'resume' function.
8120 (clear_pending_status_callback, set_pending_status_callback)
8121 (find_status_pending_thread_callback): New functions.
8122 (handle_status): Handle the case of multiple threads having
8123 interesting statuses to report. Report threads' real last signal
8124 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
8125 with an interesting thread to report the status for, instead of
8126 always reporting the status of the first thread.
8127
8128 2014-01-01 Joel Brobecker <brobecker@adacore.com>
8129
8130 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
8131 * gdbreplay.c (gdbreplay_version): Likewise.
8132
8133 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
8134
8135 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
8136 iov.iov_len with the real length in use.
8137
8138 2013-12-13 Joel Brobecker <brobecker@adacore.com>
8139
8140 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
8141 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
8142 for all targets that use win32-low.c.
8143 * win32-low.c (win32_ensure_ntdll_loaded): New function.
8144 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
8145
8146 2013-12-13 Pedro Alves <palves@redhat.com>
8147
8148 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
8149 if equal to TARGET_WAITKIND_LOADED.
8150 * win32-low.c (cached_status): New static global.
8151 (win32_wait): Add declaration.
8152 (do_initial_child_stuff): Flush all initial pending debug events
8153 up to the initial breakpoint.
8154 (win32_wait): If CACHED_STATUS was set, return that instead
8155 of doing a real wait. Remove the code resuming the execution
8156 of the inferior after receiving a TARGET_WAITKIND_LOADED event
8157 during the initial phase. Also remove the code changing
8158 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
8159 TARGET_WAITKIND_STOPPED.
8160
8161 2013-12-11 Yao Qi <yao@codesourcery.com>
8162
8163 * notif.c (handle_notif_ack): Return 0 if no notification
8164 matches.
8165
8166 2013-11-20 Doug Evans <dje@google.com>
8167
8168 * linux-low.c (linux_set_resume_request): Fix comment.
8169
8170 2013-11-20 Doug Evans <dje@google.com>
8171
8172 * linux-low.c (resume_status_pending_p): Tweak comment.
8173
8174 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
8175
8176 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
8177 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
8178 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
8179 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
8180 (srv_amd64_regobj): Add amd64-mpx.o.
8181 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
8182 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
8183 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
8184 * i387-fp.c (num_pl_bnd_register) Added constant.
8185 (num_pl_bnd_cfg_registers) Added constant.
8186 (struct i387_xsave) Added reserved area and MPX fields.
8187 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
8188 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
8189 function.
8190 (tdesc_i386_mpx_linux): Add MPX amd64 target.
8191 (init_registers_amd64_mpx_linux): Declare new function.
8192 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
8193 (x86_64_regmap): Add MPX registers.
8194 (x86_linux_read_description): Add MPX case.
8195 (initialize_low_arch): Initialize MPX targets.
8196
8197 2013-11-18 Tom Tromey <tromey@redhat.com>
8198
8199 * configure: Rebuild.
8200 * configure.ac: Don't check for stdlib.h.
8201 * gdbreplay.c: Unconditionally include stdlib.h.
8202
8203 2013-11-18 Tom Tromey <tromey@redhat.com>
8204
8205 * config.in: Rebuild.
8206 * configure: Rebuild.
8207 * configure.ac: Don't use AC_HEADER_DIRENT.
8208
8209 2013-11-18 Tom Tromey <tromey@redhat.com>
8210
8211 * server.h: Don't check HAVE_STRING_H.
8212 * gdbreplay.c: Don't check HAVE_STRING_H.
8213 * configure: Rebuild.
8214
8215 2013-11-18 Tom Tromey <tromey@redhat.com>
8216
8217 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
8218 LIBGNU.
8219
8220 2013-11-08 Tom Tromey <tromey@redhat.com>
8221
8222 * configure, config.in: Rebuild.
8223 * configure.ac: Remove unused configury.
8224
8225 2013-11-08 Tom Tromey <tromey@redhat.com>
8226
8227 * acinclude.m4: Include common.m4, codeset.m4.
8228 * configure, config.in: Rebuild.
8229 * configure.ac: Use GDB_AC_COMMON.
8230
8231 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
8232
8233 * linux-s390-low.c (HWCAP_S390_TE): New define.
8234 (s390_arch_setup): Consider the TE field in the HWCAP for
8235 determining 'have_regset_tdb'.
8236
8237 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
8238
8239 PR gdb/16014
8240 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
8241 call to sizeof.
8242
8243 2013-10-02 Pedro Alves <palves@redhat.com>
8244
8245 * server.c (process_serial_event): Don't output "GDBserver
8246 exiting" if GDB is connected through stdio.
8247 * target.c (mywait): Likewise, be silent if GDB is connected
8248 through stdio.
8249
8250 2013-10-01 Joel Brobecker <brobecker@adacore.com>
8251
8252 * lynx-low.c (lynx_add_threads_after_attach): New function.
8253 (lynx_attach): Remove call to add_thread. Add call to
8254 lynx_add_threads_after_attach instead.
8255
8256 2013-09-28 Mike Frysinger <vapier@gentoo.org>
8257
8258 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
8259 * config.in, configure: Regenerated.
8260
8261 2013-09-18 Yao Qi <yao@codesourcery.com>
8262
8263 PR server/15959
8264 * server.c (start_inferior): Clear 'resume_info'.
8265
8266 2013-09-16 Jiong Wang <jiwang@tilera.com>
8267
8268 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
8269 for each register.
8270
8271 2013-09-16 Jiong Wang <jiwang@tilera.com>
8272
8273 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
8274 linux-tile-low.o to srv_tgtobj.
8275
8276 2013-09-16 Will Newton <will.newton@linaro.org>
8277
8278 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
8279 out regs.
8280
8281 2013-09-06 Pedro Alves <palves@redhat.com>
8282
8283 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
8284 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
8285 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
8286 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
8287 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
8288 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
8289
8290 2013-09-06 Pedro Alves <palves@redhat.com>
8291
8292 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
8293 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
8294
8295 2013-09-06 Pedro Alves <palves@redhat.com>
8296
8297 * linux-amd64-ipa.c: Include tracepoint.h.
8298 * linux-i386-ipa.c: Include tracepoint.h.
8299
8300 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
8301
8302 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
8303 (ps_get_thread_area): New function.
8304
8305 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
8306
8307 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
8308 (initialize_low_arch): Call init_registers_crisv32 rather than
8309 init_register_crisv32.
8310
8311 2013-09-05 Pedro Alves <palves@redhat.com>
8312
8313 * server.h (handle_vFile, hostio_last_error_from_errno): Move
8314 to ...
8315 * hostio.h: ... this new file.
8316 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
8317 win32-low.c: Include hostio.h.
8318
8319 2013-09-05 Pedro Alves <palves@redhat.com>
8320
8321 * server.h (gdb_client_data, handler_func, callback_handler_func)
8322 (delete_file_handler, add_file_handler, append_callback_event)
8323 (delete_callback_event, start_event_loop, initialize_event_loop):
8324 Move to event-loop.h and include it.
8325 * event-loop.h: New file.
8326
8327 2013-09-05 Pedro Alves <palves@redhat.com>
8328
8329 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
8330 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
8331 (loaded_dll, unloaded_dll): Move to ...
8332 * dll.h: ... this new file.
8333 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
8334
8335 2013-09-05 Pedro Alves <palves@redhat.com>
8336
8337 * server.h (current_process, get_thread_process, all_processes)
8338 (add_inferior_to_list, for_each_inferior, current_inferior)
8339 (remove_inferior, add_process, remove_process, find_process_pid)
8340 (have_started_inferiors_p, have_attached_inferiors_p)
8341 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
8342 (clear_inferiors, find_inferior, find_inferior_id)
8343 (inferior_target_data, set_inferior_target_data)
8344 (inferior_regcache_data, set_inferior_regcache_data): Move to
8345 inferiors.h, and include it.
8346 * inferiors.h: New file.
8347
8348 2013-09-05 Pedro Alves <palves@redhat.com>
8349
8350 * server.h (struct emit_ops, current_insn_ptr, emit_error):
8351 Move ...
8352 * ax.h: ... here.
8353
8354 2013-09-05 Pedro Alves <palves@redhat.com>
8355
8356 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
8357 tracepoint.h.
8358 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
8359 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
8360 (handle_tracepoint_general_set, handle_tracepoint_query)
8361 (tracepoint_finished_step, tracepoint_was_hit)
8362 (release_while_stepping_state_list, current_traceframe)
8363 (in_readonly_region, traceframe_read_mem)
8364 (fetch_traceframe_registers, traceframe_read_sdata)
8365 (traceframe_read_info, struct fast_tpoint_collect_status)
8366 (fast_tracepoint_collecting, force_unlock_trace_buffer)
8367 (handle_tracepoit_bkpts, initialize_low_tracepoint)
8368 (supply_fast_tracepoint_registers)
8369 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
8370 (ipa_tdesc, claim_trampoline_space)
8371 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
8372 (agent_mem_read, agent_get_trace_state_variable_value)
8373 (agent_set_trace_state_variable_value, agent_tsv_read)
8374 (agent_mem_read_string, get_raw_reg_func_addr)
8375 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
8376 * tracepoint.h: ... this new file.
8377
8378 2013-09-05 Pedro Alves <palves@redhat.com>
8379
8380 * server.h (perror_with_name, error, fatal, warning, paddress)
8381 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
8382 include it.
8383 * utils.h: New file.
8384
8385 2013-09-05 Pedro Alves <palves@redhat.com>
8386
8387 * server.h (remote_debug, noack_mode, transport_is_reliable)
8388 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
8389 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
8390 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
8391 (write_enn, initialize_async_io, enable_async_io)
8392 (disable_async_io, check_remote_input_interrupt_request)
8393 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
8394 (dead_thread_notify, prepare_resume_reply)
8395 (decode_address_to_semicolon, decode_address, decode_m_packet)
8396 (decode_M_packet, decode_X_packet, decode_xfer_write)
8397 (decode_search_memory_packet, unhexify, hexify)
8398 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
8399 (look_up_one_symbol, relocate_instruction)
8400 (monitor_output): Move to remote-utils.h, and include it.
8401 * remote-utils.h: New file.
8402
8403 2013-09-05 Pedro Alves <palves@redhat.com>
8404
8405 * server.h (_): Delete.
8406
8407 2013-09-02 Pedro Alves <palves@redhat.com>
8408
8409 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
8410 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
8411 allocated.
8412 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
8413
8414 2013-09-02 Pierre Muller <muller@sourceware.org>
8415
8416 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
8417 or WriteProcessMemory complete successfully and handle
8418 ERROR_PARTIAL_COPY error.
8419
8420 2013-09-02 Pedro Alves <palves@redhat.com>
8421
8422 * server.c (gdb_read_memory): Return -1 on traceframe memory read
8423 error instead of EIO.
8424
8425 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8426
8427 PR server/15604
8428 * linux-low.c: Include filestuff.h.
8429 (linux_create_inferior) <pid == 0>: Call close_most_fds.
8430 * lynx-low.c: Include filestuff.h.
8431 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
8432 * server.c: Include filestuff.h.
8433 (main): Call notice_open_fds.
8434 * spu-low.c: Include filestuff.h.
8435 (spu_create_inferior) <pid == 0>: Call close_most_fds.
8436
8437 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
8438
8439 * Makefile.in: Explain why ../target and ../nat are not
8440 listed as include file search paths.
8441 (linux-waitpid.o): New object file rule.
8442 * configure.srv (srv_native_linux_obj): New variable.
8443 Replace all occurrences of linux native object files with
8444 $srv_native_linux_obj.
8445 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
8446 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
8447 (linux_enable_event_reporting): Remove declaration.
8448 (my_waitpid): Moved to common/linux-waitpid.c.
8449 (linux_wait_for_event): Pass ptid when calling
8450 linux_enable_event_reporting.
8451 (linux_supports_tracefork_flag): Remove.
8452 (linux_enable_event_reporting): Likewise.
8453 (linux_tracefork_grandchild): Remove.
8454 (STACK_SIZE): Moved to common/linux-ptrace.c.
8455 (linux_tracefork_child): Remove.
8456 (linux_test_for_tracefork): Remove.
8457 (linux_look_up_symbols): Call linux_supports_traceclone.
8458 (initialize_low): Remove call to linux_test_for_tracefork.
8459 * linux-low.h (PTRACE_TYPE_ARG3): Move to
8460 common/linux-ptrace.h.
8461 (PTRACE_TYPE_ARG4): Likewise.
8462 Include linux-ptrace.h.
8463
8464 2013-08-21 Pedro Alves <palves@redhat.com>
8465
8466 * config.in: Renegerate.
8467
8468 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
8469
8470 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
8471 (SFILES): Remove $(srcdir)/common/target-common.c and
8472 add $(srcdir)/target/waitstatus.c.
8473 (OBS): Remove target-common.o and add waitstatus.o.
8474 (server_h): Remove $(srcdir)/../common/target-common.h and
8475 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
8476 and $(srcdir)/../target/waitstatus.h.
8477 (target-common.o): Remove.
8478 (waitstatus.o): New target object file.
8479 * target.h: Do not include target-common.h and
8480 include target/resume.h, target/wait.h and
8481 target/waitstatus.h.
8482
8483 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
8484
8485 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
8486 to PTRACE_TYPE_ARG3.
8487 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
8488 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
8489 PTRACE_TYPE_ARG4.
8490 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
8491 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
8492
8493 2013-07-27 Jie Zhang <jie@codesourcery.com>
8494 Daniel Jacobowitz <dan@codesourcery.com>
8495 Yao Qi <yao@codesourcery.com>
8496
8497 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
8498 (mips-linux-watch.o): New rule.
8499 (mips_linux_watch_h): New variable.
8500 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
8501 srv_tgtobj.
8502 * linux-mips-low.c: Include mips-linux-watch.h.
8503 (struct arch_process_info, struct arch_lwp_info): New.
8504 (update_watch_registers_callback): New function.
8505 (mips_linux_new_process, mips_linux_new_thread) New functions.
8506 (mips_linux_prepare_to_resume, mips_insert_point): New
8507 functions.
8508 (mips_remove_point, mips_stopped_by_watchpoint): New
8509 functions.
8510 (rsp_bp_type_to_target_hw_bp_type): New function.
8511 (mips_stopped_data_address): New function.
8512 (the_low_target): Add watchpoint support functions.
8513
8514 2013-07-27 Yao Qi <yao@codesourcery.com>
8515
8516 * i386-low.c: Include break-common.h.
8517 (enum target_hw_bp_type): Remove.
8518
8519 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
8520
8521 * Makefile.in (SFILES): /common/target-common.c.
8522 (OBS): Add target-common.o.
8523 (server_h): Add $(srcdir)/../common/target-common.h.
8524 (target-common.o): New target.
8525 * server.c (queue_stop_reply_callback): Free
8526 status string after use.
8527 * target.c (target_waitstatus_to_string): Remove.
8528 * target.h: Include target-common.h.
8529 (resume_kind): Likewise.
8530 (target_waitkind): Likewise.
8531 (target_waitstatus): Likewise.
8532 (TARGET_WNOHANG): Likewise.
8533
8534 2013-07-04 Yao Qi <yao@codesourcery.com>
8535
8536 * Makefile.in (host_alias): Use @host_noncanonical@.
8537 (target_alias): Use @target_noncanonical@.
8538 * configure.ac: Use ACX_NONCANONICAL_TARGET and
8539 ACX_NONCANONICAL_HOST.
8540 * configure: Regenerated.
8541
8542 Revert:
8543 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
8544
8545 * configure.ac (version_host, version_target): Set and AC_SUBST them.
8546 * configure: Rebuild.
8547 * Makefile.in (version_host, version_target): Get from configure.
8548 (version.c): Use $(version_host) and $(version_target).
8549
8550 2013-07-03 Pedro Alves <palves@redhat.com>
8551
8552 * Makefile.in (config.status): Depend on development.sh.
8553 * acinclude.m4: Include libmcheck.m4.
8554 * configure: Regenerate.
8555
8556 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
8557
8558 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
8559 attribute inside the parentheses.
8560 (winapi_DebugSetProcessKillOnExit): Ditto.
8561 (winapi_DebugBreakProcess): Ditto.
8562 (winapi_GenerateConsoleCtrlEvent): Ditto.
8563
8564 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
8565
8566 * notif.h (notif_event): Add a dummy member to avoid compiler
8567 errors.
8568
8569 2013-07-01 Pedro Alves <palves@redhat.com>
8570
8571 * hostio.c (HOSTIO_PATH_MAX): Define.
8572 (require_filename, handle_open, handle_unlink, handle_readlink):
8573 Use it.
8574
8575 2013-07-01 Pedro Alves <palves@redhat.com>
8576
8577 * server.h: Include "pathmax.h".
8578 * linux-low.c: Don't include sys/param.h.
8579 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
8580 MAXPATHLEN.
8581 * win32-low.c: Don't include sys/param.h.
8582 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
8583
8584 2013-07-01 Pedro Alves <palves@redhat.com>
8585
8586 * event-loop.c: Don't check HAVE_UNISTD_H before including
8587 <unistd.h>.
8588 * gdbreplay.c: Likewise.
8589 * remote-utils.c: Likewise.
8590 * server.c: Likewise.
8591 * configure.ac: Don't check for unistd.h.
8592 * configure: Regenerate.
8593
8594 2013-06-28 Tom Tromey <tromey@redhat.com>
8595
8596 * Makefile.in (version.c): Use version.in, not
8597 common/version.in.
8598
8599 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
8600
8601 * configure.ac (version_host, version_target): Set and AC_SUBST them.
8602 * configure: Rebuild.
8603 * Makefile.in (version_host, version_target): Get from configure.
8604 (version.c): Use $(version_host) and $(version_target).
8605
8606 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
8607
8608 Fix trace-status to output user name without trailing colon.
8609 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
8610
8611 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
8612
8613 Fix trace-status to output proper start-time and stop-time.
8614 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
8615 output start time and stop time in hex as gdb expects.
8616
8617 2013-06-26 Pedro Alves <pedro@codesourcery.com>
8618
8619 * tracepoint.c (build_traceframe_info_xml): Output trace state
8620 variables present in the trace buffer.
8621
8622 2013-06-24 Tom Tromey <tromey@redhat.com>
8623
8624 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
8625 create-version.sh.
8626 (version.o): Remove.
8627 * gdbreplay.c: Include version.h.
8628 (version, host_name): Don't declare.
8629 * server.h: Include version.h.
8630 (version, host_name): Don't declare.
8631
8632 2013-06-12 Pedro Alves <palves@redhat.com>
8633
8634 * linux-x86-low.c (linux_is_elf64): Delete global.
8635 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
8636 with local linux_pid_exe_is_elf_64_file use.
8637
8638 2013-06-11 Pedro Alves <palves@redhat.com>
8639
8640 * linux-low.c (regset_disabled, disable_regset): New functions.
8641 (regsets_fetch_inferior_registers)
8642 (regsets_store_inferior_registers): Use them.
8643 (initialize_regsets_info); Don't allocate the disabled_regsets
8644 array here.
8645 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
8646 comment.
8647
8648 2013-06-11 Pedro Alves <palves@redhat.com>
8649
8650 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
8651 xmalloc.
8652
8653 2013-06-11 Pedro Alves <palves@redhat.com>
8654
8655 * linux-x86-low.c (initialize_low_arch): Call
8656 init_registers_x32_avx_linux.
8657
8658 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
8659
8660 Fix compatibility with Android Bionic.
8661 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
8662 it is not empty.
8663
8664 2013-06-07 Pedro Alves <palves@redhat.com>
8665
8666 PR server/14823
8667 * Makefile.in (OBS): Add tdesc.o.
8668 (IPA_OBJS): Add tdesc-ipa.o.
8669 (tdesc-ipa.o): New rule.
8670 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
8671 interface.
8672 * linux-low.c (new_inferior): Delete.
8673 (disabled_regsets, num_regsets): Delete.
8674 (linux_add_process): Adjust to set the new per-process
8675 new_inferior flag.
8676 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
8677 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
8678 was a stop. When calling arch_setup, switch the current inferior
8679 to the thread that got an event.
8680 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
8681 (regsets_fetch_inferior_registers)
8682 (regsets_store_inferior_registers): New regsets_info parameter.
8683 Adjust to use it.
8684 (linux_register_in_regsets): New regs_info parameter. Adjust to
8685 use it.
8686 (register_addr, fetch_register, store_register): New usrregs_info
8687 parameter. Adjust to use it.
8688 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
8689 parameter regs_info. Adjust to use it.
8690 (linux_fetch_registers): Get the current inferior's regs_info, and
8691 adjust to use it.
8692 (linux_store_registers): Ditto.
8693 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
8694 (initialize_low): Don't initialize the target_regsets here. Call
8695 initialize_low_arch.
8696 * linux-low.h (target_regsets): Delete declaration.
8697 (struct regsets_info): New.
8698 (struct usrregs_info): New.
8699 (struct regs_info): New.
8700 (struct process_info_private) <new_inferior>: New field.
8701 (struct linux_target_ops): Delete the num_regs, regmap, and
8702 regset_bitmap fields. New field regs_info.
8703 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
8704 * i387-fp.c (num_xmm_registers): Delete.
8705 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
8706 calls to new interface.
8707 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
8708 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
8709 Infer the number of xmm registers from the regcache's target
8710 description.
8711 * i387-fp.h (num_xmm_registers): Delete.
8712 * inferiors.c (add_thread): Don't install the thread's regcache
8713 here.
8714 * proc-service.c (gregset_info): Fetch the current inferior's
8715 regs_info. Adjust to use it.
8716 * regcache.c: Include tdesc.h.
8717 (register_bytes, reg_defs, num_registers)
8718 (gdbserver_expedite_regs): Delete.
8719 (get_thread_regcache): If the thread doesn't have a regcache yet,
8720 create one, instead of aborting gdbserver.
8721 (regcache_invalidate_one): Rename to ...
8722 (regcache_invalidate_thread): ... this.
8723 (regcache_invalidate_one): New.
8724 (regcache_invalidate): Only invalidate registers of the current
8725 process.
8726 (init_register_cache): Add target_desc parameter, and use it.
8727 (new_register_cache): Ditto. Assert the target description has a
8728 non zero registers_size.
8729 (regcache_cpy): Add assertions. Adjust.
8730 (realloc_register_cache, set_register_cache): Delete.
8731 (registers_to_string, registers_from_string): Adjust.
8732 (find_register_by_name, find_regno, find_register_by_number)
8733 (register_cache_size): Add target_desc parameter, and use it.
8734 (free_register_cache_thread, free_register_cache_thread_one)
8735 (regcache_release, register_cache_size): New.
8736 (register_size): Add target_desc parameter, and use it.
8737 (register_data, supply_register, supply_register_zeroed)
8738 (supply_regblock, supply_register_by_name, collect_register)
8739 (collect_register_as_string, collect_register_by_name): Adjust.
8740 * regcache.h (struct target_desc): Forward declare.
8741 (struct regcache) <tdesc>: New field.
8742 (init_register_cache, new_register_cache): Add target_desc
8743 parameter.
8744 (regcache_invalidate_thread): Declare.
8745 (regcache_invalidate_one): Delete declaration.
8746 (regcache_release): Declare.
8747 (find_register_by_number, register_cache_size, register_size)
8748 (find_regno): Add target_desc parameter.
8749 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
8750 declarations.
8751 * remote-utils.c: Include tdesc.h.
8752 (outreg, prepare_resume_reply): Adjust.
8753 * server.c: Include tdesc.h.
8754 (gdbserver_xmltarget): Delete declaration.
8755 (get_features_xml, process_serial_event): Adjust.
8756 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
8757 declare.
8758 (struct process_info) <tdesc>: New field.
8759 (ipa_tdesc): Declare.
8760 * tdesc.c: New file.
8761 * tdesc.h: New file.
8762 * tracepoint.c: Include tdesc.h.
8763 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
8764 (get_context_regcache): Adjust to pass ipa_tdesc down.
8765 (do_action_at_tracepoint): Adjust to get the register cache size
8766 from the context regcache's description.
8767 (traceframe_walk_blocks): Adjust to get the register cache size
8768 from the current trace frame's description.
8769 (traceframe_get_pc): Adjust to get current trace frame's
8770 description and pass it down.
8771 (gdb_collect): Adjust to get the register cache size from the
8772 IPA's description.
8773 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
8774 (gdbserver_xmltarget): Delete.
8775 (initialize_low_tracepoint): Set the ipa's target description.
8776 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
8777 (initialize_low_tracepoint): Set the ipa's target description.
8778 * linux-x86-low.c: Include tdesc.h.
8779 [__x86_64__] (is_64bit_tdesc): New.
8780 (ps_get_thread_area, x86_get_thread_area): Use it.
8781 (i386_cannot_store_register): Rename to ...
8782 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
8783 (i386_cannot_fetch_register): Rename to ...
8784 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
8785 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
8786 to new interface.
8787 (target_regsets): Rename to ...
8788 (x86_regsets): ... this.
8789 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
8790 interface.
8791 (x86_siginfo_fixup): Use is_64bit_tdesc.
8792 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
8793 (tdesc_x32_avx_linux, tdesc_x32_linux)
8794 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
8795 Declare.
8796 (x86_linux_update_xmltarget): Delete.
8797 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
8798 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
8799 (AMD64_LINUX_USER64_CS): New.
8800 (x86_linux_read_description): New, based on
8801 x86_linux_update_xmltarget.
8802 (same_process_callback): New.
8803 (x86_arch_setup_process_callback): New.
8804 (x86_linux_update_xmltarget): New.
8805 (x86_regsets_info): New.
8806 (amd64_linux_regs_info): New.
8807 (i386_linux_usrregs_info): New.
8808 (i386_linux_regs_info): New.
8809 (x86_linux_regs_info): New.
8810 (x86_arch_setup): Reimplement.
8811 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
8812 (x86_emit_ops): Ditto.
8813 (the_low_target): Adjust. Install x86_linux_regs_info,
8814 x86_cannot_fetch_register, and x86_cannot_store_register.
8815 (initialize_low_arch): New.
8816 * linux-ia64-low.c (tdesc_ia64): Declare.
8817 (ia64_fetch_register): Adjust.
8818 (ia64_usrregs_info, regs_info): New globals.
8819 (ia64_regs_info): New function.
8820 (the_low_target): Adjust.
8821 (initialize_low_arch): New function.
8822 * linux-sparc-low.c (tdesc_sparc64): Declare.
8823 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
8824 Adjust.
8825 (sparc_arch_setup): New function.
8826 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
8827 (the_low_target): Adjust.
8828 (initialize_low_arch): New function.
8829 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
8830 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
8831 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
8832 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
8833 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
8834 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
8835 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
8836 (tdesc_powerpc_isa205_vsx64l): Declare.
8837 (ppc_cannot_store_register, ppc_collect_ptrace_register)
8838 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
8839 (ppc_set_pc, ppc_get_hwcap): Adjust.
8840 (ppc_usrregs_info): Forward declare.
8841 (!__powerpc64__) ppc_regmap_adjusted: New global.
8842 (ppc_arch_setup): Adjust to the current process'es target
8843 description.
8844 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
8845 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
8846 (ppc_store_evrregset): Adjust.
8847 (target_regsets): Rename to ...
8848 (ppc_regsets): ... this, and make static.
8849 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
8850 (ppc_regs_info): New function.
8851 (the_low_target): Adjust.
8852 (initialize_low_arch): New function.
8853 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
8854 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
8855 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
8856 (tdesc_s390x_linux64v2): Declare.
8857 (s390_collect_ptrace_register, s390_supply_ptrace_register)
8858 (s390_fill_gregset, s390_store_last_break): Adjust.
8859 (target_regsets): Rename to ...
8860 (s390_regsets): ... this, and make static.
8861 (s390_get_pc, s390_set_pc): Adjust.
8862 (s390_get_hwcap): New target_desc parameter, and use it.
8863 [__s390x__] (have_hwcap_s390_high_gprs): New global.
8864 (s390_arch_setup): Adjust to set the current process'es target
8865 description. Don't adjust the regmap.
8866 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
8867 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
8868 (regs_info_3264): New globals.
8869 (s390_regs_info): New function.
8870 (the_low_target): Adjust.
8871 (initialize_low_arch): New function.
8872 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
8873 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
8874 [__mips64] (init_registers_mips_linux)
8875 (init_registers_mips_dsp_linux): Delete defines.
8876 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
8877 (have_dsp): New global.
8878 (mips_read_description): New, based on mips_arch_setup.
8879 (mips_arch_setup): Reimplement.
8880 (get_usrregs_info): New function.
8881 (mips_cannot_fetch_register, mips_cannot_store_register)
8882 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
8883 (mips_fill_fpregset, mips_store_fpregset): Adjust.
8884 (target_regsets): Rename to ...
8885 (mips_regsets): ... this, and make static.
8886 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
8887 (dsp_regs_info, regs_info): New globals.
8888 (mips_regs_info): New function.
8889 (the_low_target): Adjust.
8890 (initialize_low_arch): New function.
8891 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
8892 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
8893 Declare.
8894 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
8895 (arm_read_description): New, with bits factored from
8896 arm_arch_setup.
8897 (arm_arch_setup): Reimplement.
8898 (target_regsets): Rename to ...
8899 (arm_regsets): ... this, and make static.
8900 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
8901 (arm_regs_info): New function.
8902 (the_low_target): Adjust.
8903 (initialize_low_arch): New function.
8904 * linux-m68k-low.c (tdesc_m68k): Declare.
8905 (target_regsets): Rename to ...
8906 (m68k_regsets): ... this, and make static.
8907 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
8908 (m68k_regs_info): New function.
8909 (m68k_arch_setup): New function.
8910 (the_low_target): Adjust.
8911 (initialize_low_arch): New function.
8912 * linux-sh-low.c (tdesc_sharch): Declare.
8913 (target_regsets): Rename to ...
8914 (sh_regsets): ... this, and make static.
8915 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
8916 (sh_regs_info, sh_arch_setup): New functions.
8917 (the_low_target): Adjust.
8918 (initialize_low_arch): New function.
8919 * linux-bfin-low.c (tdesc_bfin): Declare.
8920 (bfin_arch_setup): New function.
8921 (bfin_usrregs_info, regs_info): New globals.
8922 (bfin_regs_info): New function.
8923 (the_low_target): Adjust.
8924 (initialize_low_arch): New function.
8925 * linux-cris-low.c (tdesc_cris): Declare.
8926 (cris_arch_setup): New function.
8927 (cris_usrregs_info, regs_info): New globals.
8928 (cris_regs_info): New function.
8929 (the_low_target): Adjust.
8930 (initialize_low_arch): New function.
8931 * linux-cris-low.c (tdesc_crisv32): Declare.
8932 (cris_arch_setup): New function.
8933 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
8934 (cris_regs_info): New function.
8935 (the_low_target): Adjust.
8936 (initialize_low_arch): New function.
8937 * linux-m32r-low.c (tdesc_m32r): Declare.
8938 (m32r_arch_setup): New function.
8939 (m32r_usrregs_info, regs_info): New globals.
8940 (m32r_regs_info): Adjust.
8941 (initialize_low_arch): New function.
8942 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
8943 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
8944 (tic6x_usrregs_info): Forward declare.
8945 (tic6x_read_description): New function, based on ...
8946 (tic6x_arch_setup): ... this. Reimplement.
8947 (target_regsets): Rename to ...
8948 (tic6x_regsets): ... this, and make static.
8949 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
8950 (tic6x_regs_info): New function.
8951 (the_low_target): Adjust.
8952 (initialize_low_arch): New function.
8953 * linux-xtensa-low.c (tdesc_xtensa): Declare.
8954 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
8955 (target_regsets): Rename to ...
8956 (xtensa_regsets): ... this, and make static.
8957 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
8958 globals.
8959 (xtensa_arch_setup, xtensa_regs_info): New functions.
8960 (the_low_target): Adjust.
8961 (initialize_low_arch): New function.
8962 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
8963 (nios2_arch_setup): Set the current process'es tdesc.
8964 (target_regsets): Rename to ...
8965 (nios2_regsets): ... this.
8966 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
8967 (nios2_regs_info): New function.
8968 (the_low_target): Adjust.
8969 (initialize_low_arch): New function.
8970 * linux-aarch64-low.c (tdesc_aarch64): Declare.
8971 (aarch64_arch_setup): Set the current process'es tdesc.
8972 (target_regsets): Rename to ...
8973 (aarch64_regsets): ... this.
8974 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
8975 (aarch64_regs_info): New function.
8976 (the_low_target): Adjust.
8977 (initialize_low_arch): New function.
8978 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
8979 globals.
8980 (target_regsets): Rename to ...
8981 (tile_regsets): ... this.
8982 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
8983 (tile_regs_info): New function.
8984 (tile_arch_setup): Set the current process'es tdesc.
8985 (the_low_target): Adjust.
8986 (initialize_low_arch): New function.
8987 * spu-low.c (tdesc_spu): Declare.
8988 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
8989 * win32-arm-low.c (tdesc_arm): Declare.
8990 (arm_arch_setup): New function.
8991 (the_low_target): Install arm_arch_setup instead of
8992 init_registers_arm.
8993 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
8994 (init_windows_x86): Rename to ...
8995 (i386_arch_setup): ... this. Set `win32_tdesc'.
8996 (the_low_target): Adjust.
8997 * win32-low.c (win32_tdesc): New global.
8998 (child_add_thread): Don't create the thread cache here.
8999 (do_initial_child_stuff): Set the new process'es tdesc.
9000 * win32-low.h (struct target_desc): Forward declare.
9001 (win32_tdesc): Declare.
9002 * lynx-i386-low.c (tdesc_i386): Declare global.
9003 (lynx_i386_arch_setup): Set `lynx_tdesc'.
9004 * lynx-low.c (lynx_tdesc): New global.
9005 (lynx_add_process): Set the new process'es tdesc.
9006 * lynx-low.h (struct target_desc): Forward declare.
9007 (lynx_tdesc): Declare global.
9008 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
9009 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
9010 * nto-low.c (nto_tdesc): New global.
9011 (do_attach): Set the new process'es tdesc.
9012 * nto-low.h (struct target_desc): Forward declare.
9013 (nto_tdesc): Declare.
9014 * nto-x86-low.c (tdesc_i386): Declare.
9015 (nto_x86_arch_setup): Set `nto_tdesc'.
9016
9017 2013-06-04 Gary Benson <gbenson@redhat.com>
9018
9019 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
9020 to qSupported response when appropriate.
9021 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
9022 with nonzero-length annex.
9023 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
9024 arguments supplied in annex.
9025
9026 2013-05-31 Doug Evans <dje@google.com>
9027
9028 PR server/15594
9029 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
9030 64 bits in 64-cross-32 environment.
9031
9032 2013-05-28 Pedro Alves <palves@redhat.com>
9033
9034 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
9035 (aarch64-without-fpu.c): Delete rule.
9036 * configure.srv (aarch64*-*-linux*): Remove references to
9037 aarch64-without-fpu.o and aarch64-without-fpu.xml.
9038 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
9039 declaration.
9040
9041 2013-05-24 Pedro Alves <palves@redhat.com>
9042
9043 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
9044 instead of strchr/decode_address. Error if the range isn't split
9045 with a ','. Don't assume there's be a ':' in the action.
9046
9047 2013-05-23 Yao Qi <yao@codesourcery.com>
9048 Pedro Alves <palves@redhat.com>
9049
9050 * linux-low.c (lwp_in_step_range): New function.
9051 (linux_wait_1): If the thread was range stepping and stopped
9052 outside the stepping range, report the stop to GDB. Otherwise,
9053 continue stepping. Add range stepping debug output.
9054 (linux_set_resume_request): Copy the step range from the resume
9055 request to the lwp.
9056 (linux_supports_range_stepping): New.
9057 (linux_target_ops) <supports_range_stepping>: Set to
9058 linux_supports_range_stepping.
9059 * linux-low.h (struct linux_target_ops)
9060 <supports_range_stepping>: New field.
9061 (struct lwp_info) <step_range_start, step_range_end>: New fields.
9062 * linux-x86-low.c (x86_supports_range_stepping): New.
9063 (the_low_target) <supports_range_stepping>: Set to
9064 x86_supports_range_stepping.
9065 * server.c (handle_v_cont): Handle 'r' action.
9066 (handle_v_requests): Append ";r" if the target supports range
9067 stepping.
9068 * target.h (struct thread_resume) <step_range_start,
9069 step_range_end>: New fields.
9070 (struct target_ops) <supports_range_stepping>:
9071 New field.
9072 (target_supports_range_stepping): New macro.
9073
9074 2013-05-17 Joel Brobecker <brobecker@adacore.com>
9075
9076 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
9077 confusion in comment.
9078
9079 2013-05-17 Joel Brobecker <brobecker@adacore.com>
9080
9081 * lynx-low.c (struct process_info_private): New type.
9082 (lynx_add_process): New function.
9083 (lynx_create_inferior, lynx_attach): Replace calls to
9084 add_process by calls to lynx_add_process.
9085 (lynx_resume): If PTID is null, then try using
9086 current_process()->private->last_wait_event_ptid.
9087 Add comments.
9088 (lynx_clear_inferiors): Delete. The contents of that function
9089 has been inlined in lynx_mourn;
9090 (lynx_wait_1): Save the ptid in the process's private data.
9091 (lynx_mourn): Free the process' private data. Replace call
9092 to lynx_clear_inferiors by call to clear_inferiors.
9093
9094 2013-05-17 Yao Qi <yao@codesourcery.com>
9095
9096 * i386-low.c (i386_length_and_rw_bits): Move the comment to
9097 the right place.
9098
9099 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
9100
9101 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
9102 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
9103 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
9104 PT_TEXT_END_ADDR guards. Update comments.
9105 (linux_target_op) <read_offsets>: Conditionally define to
9106 linux_read_offsets if the target is UCLIBC and if it defines
9107 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
9108
9109 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
9110 Andrew Jenner <andrew@codesourcery.com>
9111
9112 * Makefile.in (SFILES): Add linux-nios2-low.c.
9113 (clean): Add action to delete nios2-linux.c.
9114 (nios2-linux.c): New rule.
9115 * configure.srv: Add nios2*-*-linux*.
9116 * linux-nios2-low.c: New.
9117
9118 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
9119
9120 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
9121
9122 2013-04-25 Hui Zhu <hui@codesourcery.com>
9123
9124 PR gdb/15186
9125 * ax.c (ax_printf): Add fflush.
9126
9127 2013-04-22 Tom Tromey <tromey@redhat.com>
9128
9129 * Makefile.in (SFILES): Add filestuff.c.
9130 (OBS): Add filestuff.o.
9131 (filestuff.o): New target.
9132 * config.in, configure: Rebuild.
9133 * configure.ac: Check for fdwalk, pipe2.
9134
9135 2013-04-17 Pedro Alves <palves@redhat.com>
9136
9137 * configure.ac (USE_THREAD_DB): Delete variable.
9138 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
9139 Don't AC_SUBST USE_THREAD_DB.
9140 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
9141 * config.in, configure: Regenerate.
9142
9143 2013-04-16 Pedro Alves <palves@redhat.com>
9144
9145 * linux-low.h (struct lwp_info) <thread_known>: Move under
9146 the USE_THREAD_DB #ifdef.
9147
9148 2013-04-16 Pedro Alves <palves@redhat.com>
9149
9150 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
9151 (linux-low.o): Delete rule.
9152 * linux-low.h: Always include "gdb_thread_db.h" instead of
9153 conditionally including thread_db.h.
9154 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
9155 HAVE_THREAD_DB_H.
9156
9157 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
9158
9159 * Makefile.in (install-only): Fix make install regression.
9160
9161 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
9162
9163 Convert man pages to texinfo, new gdbinit.5 texinfo page.
9164 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
9165 installation.
9166 * gdbserver.1: Remove.
9167
9168 2013-03-22 Pedro Alves <palves@redhat.com>
9169
9170 * linux-low.c (handle_extended_wait): Don't call
9171 linux_enable_event_reporting.
9172
9173 2013-03-15 Tony Theodore <tonyt@logyst.com>
9174
9175 PR build/9098:
9176 * Makefile.in (SHELL): Use @SHELL@.
9177
9178 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
9179
9180 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
9181 compiler warning.
9182
9183 2013-03-13 Joel Brobecker <brobecker@adacore.com>
9184
9185 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
9186 Remove extraneous NULL element.
9187
9188 2013-03-13 Yao Qi <yao@codesourcery.com>
9189
9190 * tracepoint.c (traceframe_read_tsv): Look for the last matched
9191 'V' block in trace frame.
9192
9193 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
9194
9195 * target.h (struct target_ops): Add btrace ops.
9196 (target_supports_btrace): New macro.
9197 (target_enable_btrace): New macro.
9198 (target_disable_btrace): New macro.
9199 (target_read_btrace): New macro.
9200 * gdbthread.h (struct thread_info): Add btrace field.
9201 * server.c: Include btrace-common.h.
9202 (handle_btrace_general_set): New function.
9203 (handle_btrace_enable): New function.
9204 (handle_btrace_disable): New function.
9205 (handle_general_set): Call handle_btrace_general_set.
9206 (handle_qxfer_btrace): New function.
9207 (struct qxfer qxfer_packets[]): Add btrace entry.
9208 * inferiors.c (remove_thread): Disable btrace.
9209 * linux-low: Include linux-btrace.h.
9210 (linux_low_enable_btrace): New function.
9211 (linux_low_read_btrace): New function.
9212 (linux_target_ops): Add btrace ops.
9213 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
9214 Add srv_linux_btrace=yes.
9215 (x86_64-*-linux*): Add linux-btrace.o.
9216 Add srv_linux_btrace=yes.
9217 * configure.ac: Define HAVE_LINUX_BTRACE.
9218 * config.in: Regenerated.
9219 * configure: Regenerated.
9220
9221 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
9222
9223 * server.c (handle_qxfer): Preserve error message if -3 is
9224 returned.
9225 (qxfer): Document the -3 return value.
9226
9227 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
9228
9229 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
9230 (linux_btrace_h): New variable.
9231 (linux-btrace.o): New rule.
9232
9233 2013-03-08 Stan Shebs <stan@codesourcery.com>
9234 Hafiz Abid Qadeer <abidh@codesourcery.com>
9235
9236 * tracepoint.c (trace_buffer_size): New global.
9237 (DEFAULT_TRACE_BUFFER_SIZE): New define.
9238 (init_trace_buffer): Change to one-argument function. Allocate
9239 trace buffer memory.
9240 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
9241 handle QTBuffer:size packet.
9242 (cmd_bigqtbuffer_size): New function.
9243 (initialize_tracepoint): Call init_trace_buffer with
9244 DEFAULT_TRACE_BUFFER_SIZE.
9245 * server.c (handle_query): Add QTBuffer:size in the
9246 supported packets.
9247
9248 2013-03-07 Yao Qi <yao@codesourcery.com>
9249
9250 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
9251 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
9252 of -1.
9253 (cmd_qtsp): Adjust condition. Do post increment.
9254 Set cur_action and cur_step_action back to 0.
9255
9256 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
9257
9258 PR server/15236
9259 * linux-low.c (linux_write_memory): Return early success if LEN is
9260 zero.
9261
9262 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
9263
9264 * configure.srv: Add x86_64-*-cygwin* as target.
9265
9266 2013-02-28 Tom Tromey <tromey@redhat.com>
9267
9268 * configure.ac: Invoke AC_SYS_LARGEFILE.
9269 * configure, config.in: Rebuild.
9270
9271 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
9272
9273 * win32-low.c: Throughout, fix format strings and casts of
9274 printf-like functions to avoid type related warnings on all
9275 platforms.
9276 (get_child_debug_event): Print dwDebugEventCode as hex since
9277 that's how it's usually documented.
9278
9279 2013-02-28 Yao Qi <yao@codesourcery.com>
9280
9281 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
9282 pulongest.
9283
9284 2013-02-27 Jiong Wang <jiwang@tilera.com>
9285
9286 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
9287 (reg-tilegx32.c): New rule.
9288 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
9289 * linux-tile-low.c (tile_arch_setup): New function. Invoke
9290 different register info initializer according to elf class.
9291 (init_registers_tilgx32): New function. The tilegx32 register info
9292 initializer.
9293 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
9294 (tile_store_gregset): Likewise.
9295
9296 2013-02-27 Yao Qi <yao@codesourcery.com>
9297
9298 * server.c (process_point_options): Print debug message when
9299 debug_threads is true.
9300
9301 2013-02-26 Yao Qi <yao@codesourcery.com>
9302
9303 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
9304
9305 2013-02-19 Pedro Alves <palves@redhat.com>
9306 Kai Tietz <ktietz@redhat.com>
9307
9308 PR gdb/15161
9309
9310 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
9311 instead of strtoul to extract address from packet.
9312 (process_serial_event) <'z'>: Likewise.
9313
9314 2013-02-18 Yao Qi <yao@codesourcery.com>
9315
9316 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
9317
9318 2013-02-14 Pedro Alves <palves@redhat.com>
9319
9320 Plug memory leak.
9321
9322 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
9323 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
9324
9325 2013-02-14 Pedro Alves <palves@redhat.com>
9326
9327 * tracepoint.c (cmd_qtdpsrc): Use savestring.
9328
9329 2013-02-14 Pedro Alves <palves@redhat.com>
9330
9331 * tracepoint.c (save_string): Delete.
9332 (add_tracepoint_action): Use savestring instead of save_string.
9333
9334 2013-02-12 Pedro Alves <palves@redhat.com>
9335
9336 * linux-xtensa-low.c: Ditto.
9337 * xtensa-xtregs.c: Ditto.
9338
9339 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
9340
9341 * thread-db.c (thread_db_get_tls_address): NULL pointer check
9342 thread_db.
9343
9344 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
9345
9346 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
9347 aarch64_num_wp_regs and aarch64_num_bp_regs to
9348 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
9349
9350 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
9351
9352 * linux-aarch64-low.c (ps_get_thread_area): Replace
9353 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
9354
9355 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
9356 Marcus Shawcroft <marcus.shawcroft@arm.com>
9357 Nigel Stephens <nigel.stephens@arm.com>
9358 Yufeng Zhang <yufeng.zhang@arm.com>
9359
9360 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
9361 (aarch64.c, aarch64-without-fpu.c): New targets.
9362 * configure.srv (aarch64*-*-linux*): New.
9363 * linux-aarch64-low.c: New file.
9364
9365 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
9366
9367 * linux-low.c (handle_extended_wait, linux_create_inferior)
9368 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
9369 (dequeue_one_deferred_signal, linux_resume_one_thread)
9370 (fetch_register, linux_write_memory, linux_enable_event_reporting)
9371 (linux_tracefork_grandchild, linux_test_for_tracefork)
9372 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
9373 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
9374 where the argument is 0.
9375
9376 2013-01-25 Yao Qi <yao@codesourcery.com>
9377
9378 * event-loop.c: Include "queue.h".
9379 (gdb_event_p): New typedef.
9380 (struct gdb_event) <next_event>: Remove.
9381 (event_queue): Change to QUEUE(gdb_event_p).
9382 (async_queue_event): Remove.
9383 (gdb_event_xfree): New.
9384 (initialize_event_loop): New.
9385 (process_event): Use API from QUEUE.
9386 (wait_for_event): Likewise.
9387 * server.c (main): Call initialize_event_loop.
9388 * server.h (initialize_event_loop): Declare.
9389
9390 2013-01-18 Yao Qi <yao@codesourcery.com>
9391
9392 * ax.h (struct eval_agent_expr_context): New.
9393 (gdb_eval_agent_expr): Update declaration.
9394 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
9395 TFRAME. Add new argument CTX.
9396 * server.h (struct eval_agent_expr_context): Declare.
9397 (agent_mem_read, agent_tsv_read): Update declaration.
9398 (agent_mem_read_string): Likewise.
9399 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
9400 (add_traceframe_block): Add new argument TPOINT.
9401 Increase TPOINT->traceframe_usage.
9402 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
9403 eval_tracepoint_agent_expr.
9404 (condition_true_at_tracepoint): Likewise.
9405 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
9406 (agent_mem_read_string, agent_tsv_read): Likewise.
9407
9408 2013-01-16 Yao Qi <yao@codesourcery.com>
9409
9410 * linux-low.c (linux_resume_one_lwp): Don't check
9411 'lwp->bp_reinsert != 0'.
9412
9413 2013-01-07 Joel Brobecker <brobecker@adacore.com>
9414 Pedro Alves <palves@redhat.com>
9415
9416 * lynx-low.c (ptrace_request_to_str): Define a temporary
9417 macro and use it to simplify this function's implementation.
9418
9419 2013-01-07 Joel Brobecker <brobecker@adacore.com>
9420
9421 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
9422 sets errno.
9423
9424 2013-01-07 Joel Brobecker <brobecker@adacore.com>
9425
9426 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
9427
9428 2013-01-07 Joel Brobecker <brobecker@adacore.com>
9429
9430 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
9431
9432 2013-01-07 Joel Brobecker <brobecker@adacore.com>
9433
9434 * lynx-low.c (lynx_resume): Use the resume_info parameter
9435 to determine the ptid for the lynx_ptrace call, unless
9436 it is equal to minus_one_ptid, in which case we use the
9437 ptid of the current_inferior.
9438 (lynx_wait_1): After having received a thread create/exit
9439 event, resume the inferior's execution using the signaling
9440 thread's ptid, rather than the old ptid.
9441
9442 2013-01-07 Joel Brobecker <brobecker@adacore.com>
9443
9444 * lynx-low.c (lynx_resume): Delete variable ret.
9445
9446 2013-01-01 Joel Brobecker <brobecker@adacore.com>
9447
9448 * gdbreplay.c (gdbreplay_version): Update copyright year.
9449 * server.c (gdbserver_version): Likewise.
9450
9451 2012-12-17 Joel Brobecker <brobecker@adacore.com>
9452
9453 * lynx-low.c (lynx_wait_1): Add debug trace before adding
9454 new thread.
9455
9456 2012-12-17 Joel Brobecker <brobecker@adacore.com>
9457
9458 * lynx-low.c (ptrace_request_to_str): Add handling for
9459 PTRACE_GETTRACESIG.
9460
9461 2012-12-17 Joel Brobecker <brobecker@adacore.com>
9462
9463 * lynx-low.c (lynx_attach): Delete variable new_process.
9464
9465 2012-12-17 Joel Brobecker <brobecker@adacore.com>
9466
9467 * lynx-low.c (lynx_create_inferior): Delete variable
9468 new_process.
9469
9470 2012-12-17 Joel Brobecker <brobecker@adacore.com>
9471
9472 * lynx-low.c (ptrace_request_to_str): Do not handle
9473 PTRACE_GETTHREADLIST if this macro does not exist.
9474
9475 2012-12-15 Yao Qi <yao@codesourcery.com>
9476
9477 * Makefile.in (OBS): Add notif.o.
9478 * notif.c, notif.h: New.
9479 * server.c: Include "notif.h".
9480 (struct vstop_notif) <next>: Remove.
9481 <base>: New field.
9482 (queue_stop_reply): Update.
9483 (push_event, send_next_stop_reply): Remove.
9484 (discard_queued_stop_replies): Update.
9485 (notif_stop): New variable.
9486 (handle_v_stopped): Remove.
9487 (handle_v_requests): Don't call handle_v_stopped. Call
9488 handle_ack_notif instead.
9489 (queue_stop_reply_callback): Call notif_event_enque instead
9490 of queue_stop_reply.
9491 (handle_status): Don't call send_next_stop_reply, call
9492 notif_write_event instead.
9493 (kill_inferior_callback): Likewise.
9494 (detach_or_kill_inferior_callback): Likewise.
9495 (main): Call initialize_notif.
9496 (process_serial_event): Call QUEUE_is_empty.
9497 (handle_target_event): Call notif_push instead of push event.
9498 * server.h (push_event): Remove declaration.
9499
9500 2012-12-10 Tom Tromey <tromey@redhat.com>
9501
9502 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
9503 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
9504 macros.
9505 (.c.o): Rewrite.
9506 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
9507 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
9508 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
9509 (amd64-linux-ipa.o, ax.o): Rewrite.
9510 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
9511 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
9512 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
9513 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
9514 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
9515 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
9516 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
9517 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
9518 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
9519 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
9520 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
9521 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
9522 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
9523 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
9524 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
9525 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
9526 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
9527 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
9528 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
9529 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
9530 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
9531 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
9532 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
9533 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
9534 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
9535 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
9536 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
9537 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
9538 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
9539 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
9540 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
9541 (reg-tilegx.o): Remove.
9542 (all_object_files): New macro.
9543 Include .deps files.
9544 * aclocal.m4, configure: Rebuild.
9545 * acinclude.m4: Include depstand.m4, lead-dot.m4.
9546 * configure.ac: Invoke ZW_CREATE_DEPDIR,
9547 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
9548
9549 2012-12-05 Tom Tromey <tromey@redhat.com>
9550
9551 PR gdb/14917:
9552 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
9553
9554 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
9555
9556 * configure.ac: Check for linux/perf_event.h.
9557 * config.in: Regenerated.
9558 * configure: Regenerated.
9559
9560 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
9561
9562 * hostio.c (handle_readlink): Decrease buffer size
9563 parameter passed to readlink by one byte.
9564
9565 2012-11-26 Yao Qi <yao@codesourcery.com>
9566
9567 * configure.ac (build_warnings): Append '-Wempty-body'.
9568 * configure: Regenerated.
9569 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
9570 body.
9571
9572 2012-11-15 Pierre Muller <muller@sourceware.org>
9573
9574 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
9575 * config.in: Regenerate.
9576 * configure: Regenerate.
9577 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
9578 Use "gdb_wait.h" header instead of <sys/wait.h> header.
9579 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
9580 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
9581 header.
9582 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
9583 instead of <sys/wait.h> header.
9584 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
9585
9586 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
9587
9588 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
9589 (various make rules): Remove -DGDBSERVER
9590
9591 2012-11-09 Yao Qi <yao@codesourcery.com>
9592
9593 * spu-low.c (current_ptid): Move it to ..
9594 * gdbthread.h: ... here. New.
9595 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
9596 * server.c (myresume, process_serial_event): Likewise.
9597 * thread-db.c (thread_db_find_new_threads): Likewise.
9598 * tracepoint.c (run_inferior_command): Likewise.
9599
9600 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
9601
9602 * server.c (handle_search_memory_1): Include access length in
9603 warning message.
9604
9605 2012-09-05 Michael Brandt <michael.brandt@axis.com>
9606
9607 * linux-crisv32-low.c: Fix compile errors.
9608
9609 2012-09-04 Yao Qi <yao@codesourcery.com>
9610
9611 * tracepoint.c (cmd_qtsv): Adjust debug message.
9612 Don't check CUR_TPOINT.
9613
9614 2012-08-28 Yao Qi <yao@codesourcery.com>
9615
9616 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
9617 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
9618 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
9619 Remove declarations of xmalloc, xreallloc, xstrdup and
9620 freeargv.
9621 * Makefile.in (libiberty_h): New.
9622 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
9623 (linux-bfin-low.o): Append dependency 'libiberty.h'.
9624
9625 2012-08-23 Yao Qi <yao@codesourcery.com>
9626
9627 * server.h: Remove declaration of 'xsnprintf'.
9628
9629 2012-08-22 Keith Seitz <keiths@redhat.com>
9630
9631 * server.h: Include build-gnulib-gbserver/config.h.
9632 * gdbreplay.c: Likewise.
9633
9634 2012-08-08 Doug Evans <dje@google.com>
9635
9636 * Makefile.in (SFILES): Add gdb_vecs.c.
9637 (OBS): Add gdb_vecs.o.
9638 (gdb_vecs_h, host_defs_h): New variables.
9639 (thread-db.o): Add $(gdb_vecs_h) dependency.
9640 (gdb_vecs.o): New rule.
9641 * thread-db.c: #include "gdb_vecs.h".
9642 (thread_db_load_search): Use a vector to iterate over path elements.
9643 Handle text appearing after "$pdir".
9644
9645 * configure.ac: Add check for strstr.
9646 * config.in: Regenerate.
9647 * configure: Regenerate.
9648
9649 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
9650
9651 * hostio.c (handle_pread): If pread fails, fall back to attempting
9652 lseek/read.
9653 (handle_pwrite): Likewise for pwrite.
9654
9655 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
9656
9657 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
9658 between unsupported TYPE and unimplementable ADDR/LEN combination.
9659 (arm_insert_point): Act on new return value.
9660
9661 2012-07-31 Pedro Alves <palves@redhat.com>
9662
9663 * server.c (process_point_options): Only skip tokens if we find
9664 one that is unrecognized. Don't treat 'X' specially while
9665 skipping unrecognized tokens.
9666
9667 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
9668
9669 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
9670 to 4-byte-align HW breakpoint addresses for Thumb.
9671
9672 2012-07-27 Yao Qi <yao@codesourcery.com>
9673
9674 PR remote/14161.
9675
9676 * server.h: Declare gdb_agent_about_to_close.
9677 * target.c (kill_inferior): Include "agent.h".
9678 New. Send command 'kill'.
9679 * target.h (kill_inferior): Removed macro.
9680 * tracepoint.c (gdb_agent_about_to_close): New.
9681 (gdb_agent_helper_thread): Handle command 'close'.
9682 Wait endlessly until the inferior stops.
9683 Install gdb_agent_remove_socket to atexit hook.
9684 (agent_socket_name): New static variable.
9685 (gdb_agent_socket_init): Replace local variable 'name' with
9686 'agent_socket_name'.
9687 (gdb_agent_remove_socket): New.
9688
9689 2012-07-27 Yao Qi <yao@codesourcery.com>
9690
9691 * server.c (process_point_options): Stop at 'X' when parsing.
9692
9693 2012-07-19 Michael Eager <eager@eagercon.com>
9694
9695 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
9696 to hw_execute.
9697 * linux-x86-low.c (x86_insert_point, x86_remove_point):
9698 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
9699 hardware breakpoint.
9700
9701 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
9702
9703 * gdbserver/linux-low.c (initialize_low): Call
9704 linux_ptrace_init_warnings.
9705
9706 2012-07-02 Doug Evans <dje@google.com>
9707
9708 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
9709 pointer to int.
9710
9711 2012-07-02 Stan Shebs <stan@codesourcery.com>
9712
9713 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
9714 (ax.o): Add it to build rule.
9715 (ax-ipa.o): Ditto.
9716 (OBS): Add format.o.
9717 (IPA_OBS): Add format.o.
9718 * server.c (handle_query): Claim support for breakpoint commands.
9719 (process_point_options): Add command case.
9720 (process_serial_event): Leave running if there are printfs in
9721 effect.
9722 * mem-break.h (any_persistent_commands): Declare.
9723 (add_breakpoint_commands): Declare.
9724 (gdb_no_commands_at_breakpoint): Declare.
9725 (run_breakpoint_commands): Declare.
9726 * mem-break.c (struct point_command_list): New struct.
9727 (struct breakpoint): New field command_list.
9728 (any_persistent_commands): New function.
9729 (add_commands_to_breakpoint): New function.
9730 (add_breakpoint_commands): New function.
9731 (gdb_no_commands_at_breakpoint): New function.
9732 (run_breakpoint_commands): New function.
9733 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
9734 locally.
9735 * ax.c: Include format.h.
9736 (ax_printf): New function.
9737 (gdb_eval_agent_expr): Add printf opcode.
9738
9739 2012-06-13 Yao Qi <yao@codesourcery.com>
9740
9741 * server.c (start_inferior): Remove duplicated writes to fields
9742 'last_resume_kind' and 'last_status' of 'current_inferior'.
9743
9744 2012-06-12 Yao Qi <yao@codesourcery.com>
9745 Pedro Alves <palves@redhat.com>
9746
9747 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
9748 comment.
9749 * server.c (handle_v_cont): Extend comment.
9750
9751 2012-06-11 Yao Qi <yao@codesourcery.com>
9752
9753 * linux-low.c (linux_attach): Add 'static'.
9754
9755 2012-06-06 Yao Qi <yao@codesourcery.com>
9756
9757 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
9758
9759 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
9760
9761 Fix gcc -flto compilation warning.
9762 * server.c (main): Make variable multi_mode and attach volatile.
9763
9764 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9765
9766 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
9767 if the platform doesn't know about it.
9768
9769 2012-05-30 Jeff Kenton <jkenton@tilera.com>
9770
9771 * Makefile.in (SFILES): Add linux-tile-low.c.
9772 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
9773 * configure.srv: Handle tilegx-*-linux*.
9774 * linux-tile-low.c: New file.
9775
9776 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9777
9778 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
9779
9780 2012-05-24 Pedro Alves <palves@redhat.com>
9781
9782 PR gdb/7205
9783
9784 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
9785
9786 2012-05-24 Pedro Alves <palves@redhat.com>
9787
9788 PR gdb/7205
9789
9790 Replace target_signal with gdb_signal throughout.
9791
9792 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
9793
9794 * linux-low.c (linux_store_registers): Avoid the copying sequence
9795 when no data has been retrieved by ptrace.
9796
9797 2012-05-22 Will Deacon <will.deacon@arm.com>
9798
9799 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
9800 Include asm/ptrace.h.
9801 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
9802 already defined.
9803
9804 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
9805
9806 * linux-low.c (linux_store_registers): Don't re-retrieve data
9807 with ptrace that has already been obtained from /proc. Always
9808 copy any data retrieved with ptrace to the buffer supplied.
9809
9810 2012-05-11 Yao Qi <yao@codesourcery.com>
9811 Pedro Alves <palves@redhat.com>
9812
9813 * linux-low.c (enum stopping_threads_kind): New.
9814 (stopping_threads): Change type to `enum stopping_threads_kind'.
9815 (handle_extended_wait): If stopping and suspending threads, leave
9816 the new_lwp suspended too.
9817 (linux_wait_for_event): Adjust.
9818 (stop_all_lwps): Set `stopping_threads' to
9819 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
9820 whether we're suspending threads or just stopping them. Assert no
9821 recursion happens.
9822
9823 2012-04-29 Yao Qi <yao@codesourcery.com>
9824
9825 * server.h: Move some code to ...
9826 * gdbthread.h: ... here. New.
9827 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
9828 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
9829 (nto-low.o, win32-low.o): Likewise.
9830 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
9831 * regcache.c, remote-utils.c, server.c: Likewise.
9832 * target.c, tracepoint.c, win32-low.c: Likewise.
9833
9834 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9835
9836 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
9837 (PTRACE_ARG4_TYPE): Likewise.
9838 (PTRACE_XFER_TYPE): Likewise.
9839 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
9840 ptrace to PTRACE_ARG3_TYPE.
9841 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
9842 (PTRACE_ARG4_TYPE): Likewise.
9843 (PTRACE_XFER_TYPE): Likewise.
9844 (linux_detach_one_lwp): Cast fourth argument of
9845 ptrace to long then PTRACE_ARG4_TYPE.
9846 (regsets_fetch_inferior_registers): Cast third argument of
9847 ptrace to long then PTRACE_ARG3_TYPE.
9848 (regsets_store_inferior_registers): Likewise.
9849
9850 2012-04-20 Pedro Alves <palves@redhat.com>
9851
9852 * configure: Regenerate.
9853
9854 2012-04-19 Pedro Alves <palves@redhat.com>
9855
9856 * Makefile.in (GNULIB_BUILDDIR): New.
9857 (LIBGNU, INCGNU, GNULIB_H): Adjust.
9858 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
9859 (all, install-only, uninstall, clean-info, all-lib, clean): No
9860 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
9861 (maintainer-clean realclean distclean): Use subdir_do.
9862 (subdir_do): New.
9863 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
9864 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
9865 * acinclude.m4: Include acx_configure_dir.m4.
9866 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
9867 calls. Call AC_PROG_RANLIB. Configure gnulib using
9868 ACX_CONFIGURE_DIR.
9869 (GNULIB): New.
9870 (GNULIB_STDINT_H): Adjust.
9871 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
9872 * gdbreplay.c: Include build-gnulib/config.h.
9873 * server.h: Likewise.
9874 * aclocal.m4: Regenerate.
9875 * config.in: Regenerate.
9876 * configure: Regenerate.
9877
9878 2012-04-19 Pedro Alves <palves@redhat.com>
9879
9880 * Makefile.in (LIBGNU, INCGNU): Adjust.
9881 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
9882 (all, install-only, uninstall, clean-info, all-lib, clean)
9883 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
9884 * configure.ac: Adjust AC_OUTPUT output.
9885 * aclocal.m4: Regenerate.
9886 * configure: Regenerate.
9887
9888 2012-04-19 Pedro Alves <palves@redhat.com>
9889
9890 * Makefile.in (generated_files): New.
9891 (server_h): Remove the explicit dependency on config.h, and depend
9892 on $generated_files.
9893
9894 2012-04-19 Pedro Alves <palves@redhat.com>
9895
9896 * Makefile.in (INCGNU): Add -Ignulib.
9897
9898 2012-04-19 Pedro Alves <palves@redhat.com>
9899
9900 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
9901 (INCGNU): ... this, and spell out -I here.
9902 (GNULIB_LIB): Rename to ...
9903 (LIBGNU): ... this.
9904 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
9905
9906 2012-04-19 Pedro Alves <palves@redhat.com>
9907
9908 * config.in: Regenerate.
9909
9910 2012-04-19 Pedro Alves <palves@redhat.com>
9911
9912 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
9913 * server.h (memmem): Remove declaration.
9914 * config.in: Regenerate.
9915 * configure: Regenerate.
9916
9917 2012-04-19 Yao Qi <yao@codesourcery.com>
9918
9919 * Makefile.in (SFILES): Add common/vec.c.
9920 (OBS): Add vec.o.
9921 (vec.o): New rule.
9922
9923 2012-04-19 Yao Qi <yao@codesourcery.com>
9924
9925 * remote-utils.c (prepare_resume_reply): Replace with macro
9926 target_core_of_thread.
9927 * server.c (handle_qxfer_threads_proper): Likewise.
9928 * target.h (traget_core_of_thread): New macro.
9929
9930 2012-04-18 Pedro Alves <palves@redhat.com>
9931
9932 * aclocal.m4: Regenerate.
9933 * configure: Regenerate.
9934
9935 2012-04-16 Yao Qi <yao@codesourcery.com>
9936
9937 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
9938 duplicated on address.
9939
9940 2012-04-16 Yao Qi <yao@codesourcery.com>
9941
9942 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
9943 (struct tracepoint_action_ops) <send>: New field.
9944 (m_tracepoint_action_send, r_tracepoint_action_send): New.
9945 (agent_expr_send, x_tracepoint_action_send): New.
9946 (l_tracepoint_action_send): New.
9947 (cmd_qtdp): Download and install tracepoint
9948 according to `use_agent'.
9949 (run_inferior_command): Add one more parameter `len'.
9950 Update callers.
9951 (tracepoint_send_agent): New.
9952 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
9953
9954 2012-04-16 Yao Qi <yao@codesourcery.com>
9955
9956 * tracepoint.c (download_tracepoints): Moved to ...
9957 (cmd_qtstart): ... here.
9958
9959 2012-04-14 Yao Qi <yao@codesourcery.com>
9960
9961 * tracepoint.c: Include inttypes.h.
9962 (struct collect_memory_action): Use sized types.
9963 (struct tracepoint): Likewise.
9964 (cmd_qtdp, stop_tracing): Update print specifiers.
9965 (cmd_qtp, response_tracepoint): Likewise.
9966 (collect_data_at_tracepoint): Likewise.
9967 (collect_data_at_step): Likewise.
9968
9969 2012-04-14 Yao Qi <yao@codesourcery.com>
9970
9971 Import gnulib module inttypes.
9972 * aclocal.m4, config.in, configure: Regenerated.
9973
9974 2012-04-14 Yao Qi <yao@codesourcery.com>
9975
9976 * Makefile.in (maintainer-clean, realclean, distclean): Remove
9977 Makefile and config.status at last.
9978
9979 2012-04-13 Yao Qi <yao@codesourcery.com>
9980
9981 * tracepoint.c: Include stdint.h unconditionally.
9982
9983 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9984
9985 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
9986 on BFD_HAVE_SYS_PROCFS_TYPE.
9987 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
9988 * configure: Regenerate.
9989 * config.in: Likewise.
9990
9991 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
9992
9993 * Makefile.in (clean): Also remove x32.c x32-linux.c
9994 x32-avx.c x32-avx-linux.c.
9995 (x32.o): New target.
9996 (x32.c): Likewise.
9997 (x32-linux.o): Likewise.
9998 (x32-linux.c): Likewise.
9999 (x32-avx.o): Likewise.
10000 (x32-avx.c): Likewise.
10001 (x32-avx-linux.o): Likewise.
10002 (x32-avx-linux.c): Likewise.
10003
10004 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
10005 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
10006 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
10007 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
10008 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
10009 i386/x32-avx-linux.xml.
10010
10011 * linux-x86-low.c (init_registers_x32_linux): New prototype.
10012 (init_registers_x32_avx_linux): Likwise.
10013 (x86_linux_update_xmltarget): Call init_registers_x32_linux
10014 or init_registers_x32_avx_linux if linux_is_elf64 is false.
10015
10016 2012-04-13 Pedro Alves <palves@redhat.com>
10017
10018 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
10019 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
10020 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
10021 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
10022 the sub-make.
10023
10024 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
10025
10026 * linux-x86-low.c (compat_x32_clock_t): New.
10027 (compat_x32_siginfo_t): Likewise.
10028 (compat_x32_siginfo_from_siginfo): Likewise.
10029 (siginfo_from_compat_x32_siginfo): Likewise.
10030 (linux_is_elf64): Likewise.
10031 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
10032 and siginfo_from_compat_x32_siginfo for x32.
10033 (x86_arch_setup): Set linux_is_elf64.
10034
10035 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
10036
10037 PR gdb/13969
10038 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
10039 e_machine field.
10040 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
10041 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
10042 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
10043 compatible with process.
10044
10045 2012-04-12 Yao Qi <yao@codesourcery.com>
10046
10047 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
10048 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
10049 (install-only, install-info, clean): Handle sub dir gnulib.
10050 (all-lib, am--refresh): New targets.
10051 (memmem.o): Remove target.
10052 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
10053 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
10054 (AC_REPLACE_FUNCS): Remove memmem.
10055 Invoke gl_INIT and AM_INIT_AUTOMAKE.
10056 (AC_OUTPUT): Generate Makefile in gnulib/.
10057 * aclocal.m4, config.in, configure: Regenerated.
10058
10059 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
10060
10061 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
10062
10063 2012-04-05 Pedro Alves <palves@redhat.com>
10064
10065 -Werror=strict-aliasing
10066
10067 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
10068 pointer.
10069
10070 2012-04-04 Pedro Alves <palves@redhat.com>
10071
10072 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
10073 (sparc_store_gregset_from_stack, sparc_store_gregset)
10074 (sparc_breakpoint_at): Fix formatting.
10075
10076 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10077
10078 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
10079 are available.
10080 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
10081 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
10082 * config.in: Regenerate.
10083 * configure: Likewise.
10084
10085 2012-03-29 Pedro Alves <palves@redhat.com>
10086
10087 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
10088 Correct ptrace arguments.
10089
10090 2012-03-28 Pedro Alves <palves@redhat.com>
10091
10092 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
10093 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
10094 (IA64_FR1_REGNUM): New defines.
10095 (ia64_fetch_register): New.
10096 (the_low_target): Install it.
10097 * linux-low.h (struct linux_target_ops) <fetch_register>: New
10098 field.
10099 * linux-low.c (linux_fetch_registers): Try the
10100 the_low_target.fetch_register hook first.
10101
10102 * linux-arm-low.c (the_low_target): Adjust.
10103 * linux-bfin-low.c (the_low_target): Adjust.
10104 * linux-cris-low.c (the_low_target): Adjust.
10105 * linux-crisv32-low.c (the_low_target): Adjust.
10106 * linux-m32r-low.c (the_low_target): Adjust.
10107 * linux-m68k-low.c (the_low_target): Adjust.
10108 * linux-mips-low.c (the_low_target): Adjust.
10109 * linux-ppc-low.c (the_low_target): Adjust.
10110 * linux-s390-low.c (the_low_target): Adjust.
10111 * linux-sh-low.c (the_low_target): Adjust.
10112 * linux-sparc-low.c (the_low_target): Adjust.
10113 * linux-tic6x-low.c (the_low_target): Adjust.
10114 * linux-x86-low.c (the_low_target): Adjust.
10115 * linux-xtensa-low.c (the_low_target): Adjust.
10116
10117 2012-03-26 Pedro Alves <palves@redhat.com>
10118
10119 * server.c (handle_qxfer_libraries): Don't bail early if
10120 the_target->qxfer_libraries_svr4 is not NULL.
10121
10122 2012-03-26 Pedro Alves <palves@redhat.com>
10123
10124 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
10125
10126 2012-03-23 Pedro Alves <palves@redhat.com>
10127
10128 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
10129 "library-list-svr4" element's start tag when the the DSO list is
10130 empty.
10131
10132 2012-03-23 Pedro Alves <palves@redhat.com>
10133
10134 * linux-low.c (read_one_ptr): Read the inferior's pointer through
10135 a variable whose type size is the same as the inferior's pointer
10136 size.
10137
10138 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
10139
10140 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
10141 struct siginfo.
10142 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
10143 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
10144 * linux-low.h: Include <signal.h>.
10145 (struct siginfo): Remove forward declaration.
10146 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
10147 struct siginfo.
10148
10149 2012-03-21 Mike Frysinger <vapier@gentoo.org>
10150
10151 * .gitignore: Ignore more files.
10152
10153 2012-03-19 Pedro Alves <palves@redhat.com>
10154 Jan Kratochvil <jan.kratochvil@redhat.com>
10155
10156 * server.c (cont_thread, general_thread): Add describing comments.
10157 (start_inferior): Clear `cont_thread'.
10158 (handle_v_cont): Don't set `cont_thread' if resuming all threads
10159 of a process.
10160
10161 2012-03-15 Yao Qi <yao@codesourcery.com>
10162
10163 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
10164 handling to ...
10165 (cmd_qtdp): ... here.
10166
10167 2012-03-15 Yao Qi <yao@codesourcery.com>
10168
10169 * tracepoint.c (struct tracepoint_action_ops): New.
10170 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
10171 (m_tracepoint_action_download): New.
10172 (r_tracepoint_action_download): New.
10173 (x_tracepoint_action_download): New.
10174 (l_tracepoint_action_download): New.
10175 (add_tracepoint_action): Install `action->ops' according type.
10176 (download_tracepoint_1): Move code `download' function pointer
10177 of various tracepoint_action_ops.
10178
10179 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
10180
10181 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
10182 linux_ptrace_attach_warnings.
10183
10184 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
10185
10186 * Makefile.in (linux-ptrace.o): New.
10187 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
10188 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
10189 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
10190 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
10191 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
10192 of these targets.
10193 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
10194
10195 2012-03-08 Yao Qi <yao@codesourcery.com>
10196 Pedro Alves <palves@redhat.com>
10197
10198 Fix PR server/13392.
10199 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
10200 offset of JMP insn.
10201 * tracepoint.c (remove_tracepoint): New.
10202 (cmd_qtdp): Call remove_tracepoint when failed to install.
10203
10204 2012-03-07 Pedro Alves <palves@redhat.com>
10205
10206 * linux-low.c (get_detach_signal): New.
10207 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
10208 Pass on pending signals to PTRACE_DETACH. Check the result of the
10209 ptrace call.
10210 * server.c (program_signals, program_signals_p): New.
10211 (handle_general_set): Handle QProgramSignals.
10212 * server.h (program_signals, program_signals_p): Declare.
10213
10214 2012-03-05 Pedro Alves <palves@redhat.com>
10215 Jan Kratochvil <jan.kratochvil@redhat.com>
10216
10217 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
10218 New comment why.
10219
10220 2012-03-03 Yao Qi <yao@codesourcery.com>
10221
10222 * tracepoint.c (tracepoint_look_up_symbols): Update call to
10223 agent_look_up_symbols.
10224
10225 2012-03-03 Yao Qi <yao@codesourcery.com>
10226
10227 * Makefile.in (linux-low.o): Keep dependence on agent.h.
10228 (linux-x86-low.o): Likewise.
10229 * server.h: Remove in_process_agent_loaded.
10230 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
10231 common/agent.c.
10232 Update callers.
10233
10234 2012-03-03 Yao Qi <yao@codesourcery.com>
10235
10236 * tracepoint.c (gdb_agent_capability): New global.
10237 (in_process_agent_loaded_ust): Renamed to
10238 `in_process_agent_supports_ust'.
10239 Update callers.
10240 (in_process_agent_supports_ust): Call agent_capability_check.
10241 (clear_installed_tracepoints): Assert that agent supports
10242 agent.
10243
10244 2012-03-03 Yao Qi <yao@codesourcery.com>
10245
10246 * linux-low.c (linux_supports_agent): New.
10247 (linux_target_ops): Initialize field `supports_agent' with
10248 linux_supports_agent.
10249 * target.h (struct target_ops) <supports_agent>: New.
10250 (target_supports_agent): New macro.
10251 * server.c (handle_general_set): Handle packet 'QAgent'.
10252 (handle_query): Send `QAgent+'.
10253 * Makefile.in (server.o): Depends on agent.h.
10254
10255 2012-03-03 Yao Qi <yao@codesourcery.com>
10256
10257 * Makefile.in (OBS): Add agent.o.
10258 Add new rule for agent.o.
10259 Track dependence of tracepoint.c on agent.h.
10260 * tracepoint.c (run_inferior_command_1):
10261 (run_inferior_command): Call agent_run_command.
10262 (gdb_ust_connect_sync_socket): Deleted. Move it to
10263 common/agent.c.
10264 (resume_thread, stop_thread): Likewise.
10265 (gdb_ust_socket_init): Renamed to ...
10266 (gdb_agent_socket_init): ... New.
10267 (gdb_ust_thread): Renamed to ...
10268 (gdb_agent_helper_thread): ... New.
10269 (gdb_ust_init): Move some code to ...
10270 (gdb_agent_init): ... here. New.
10271 [HAVE_UST]: Call gdb_ust_init.
10272 (initialize_tracepoint_ftlib): Call gdb_agent_init.
10273 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
10274 * config.in, configure: Regenerated.
10275
10276 2012-03-02 Pedro Alves <palves@redhat.com>
10277
10278 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
10279 * linux-low.c (struct simple_pid_list): New.
10280 (stopped_pids): New a struct simple_pid_list pointer.
10281 (add_to_pid_list, pull_pid_from_list): New.
10282 (handle_extended_wait): Don't assume the first signal new children
10283 report is SIGSTOP. Adjust call to pull_pid_from_list.
10284 (linux_wait_for_lwp): Adjust.
10285
10286 2012-03-02 Yao Qi <yao@codesourcery.com>
10287
10288 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
10289 debug log.
10290
10291 2012-03-02 Yao Qi <yao@codesourcery.com>
10292
10293 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
10294 `stop_pc' and `tpoint'. Update caller.
10295
10296 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
10297
10298 * linux-low.h (linux_target_ops): Add regset_bitmap member.
10299 * linux-low.c (use_linux_regsets): New macro.
10300 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
10301 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
10302 (linux_register_in_regsets): New function.
10303 (usr_fetch_inferior_registers): Skip registers covered by
10304 regsets.
10305 (usr_store_inferior_registers): Likewise.
10306 (usr_fetch_inferior_registers): New macro.
10307 (usr_store_inferior_registers): Likewise.
10308 (linux_fetch_registers): Handle mixed regset/non-regset targets.
10309 (linux_store_registers): Likewise.
10310 * linux-mips-low.c (init_registers_mips_dsp_linux): New
10311 prototype.
10312 (init_registers_mips64_dsp_linux): Likewise.
10313 (init_registers_mips_linux): New macro.
10314 (init_registers_mips_dsp_linux): Likewise.
10315 (mips_dsp_num_regs): Likewise.
10316 (DSP_BASE, DSP_CONTROL): New fallback macros.
10317 (mips_base_regs): New macro.
10318 (mips_regmap): Use it. Fix the size.
10319 (mips_dsp_regmap): New variable.
10320 (mips_dsp_regset_bitmap): Likewise.
10321 (mips_arch_setup): New function.
10322 (mips_cannot_fetch_register): Use the_low_target.regmap rather
10323 than mips_regmap.
10324 (mips_cannot_store_register): Likewise.
10325 (the_low_target): Update .arch_setup, .num_regs and .regmap
10326 initializers. Add .regset_bitmap initializer.
10327 * linux-arm-low.c (the_low_target): Add .regset_bitmap
10328 initializer.
10329 * linux-bfin-low.c (the_low_target): Likewise.
10330 * linux-cris-low.c (the_low_target): Likewise.
10331 * linux-crisv32-low.c (the_low_target): Likewise.
10332 * linux-ia64-low.c (the_low_target): Likewise.
10333 * linux-m32r-low.c (the_low_target): Likewise.
10334 * linux-m68k-low.c (the_low_target): Likewise.
10335 * linux-ppc-low.c (the_low_target): Likewise.
10336 * linux-s390-low.c (the_low_target): Likewise.
10337 * linux-sh-low.c (the_low_target): Likewise.
10338 * linux-sparc-low.c (the_low_target): Likewise.
10339 * linux-tic6x-low.c (the_low_target): Likewise.
10340 * linux-x86-low.c (the_low_target): Likewise.
10341 * linux-xtensa-low.c (the_low_target): Likewise.
10342 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
10343 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
10344 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
10345 srv_xmlfiles.
10346 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
10347 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
10348
10349 2012-02-29 Yao Qi <yao@codesourcery.com>
10350 Pedro Alves <palves@redhat.com>
10351
10352 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
10353 `step_over_finished' is true.
10354
10355 2012-02-27 Pedro Alves <palves@redhat.com>
10356
10357 * linux-low.c (pid_is_stopped): Delete, moved to common/.
10358 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
10359
10360 2012-02-27 Pedro Alves <palves@redhat.com>
10361
10362 PR server/9684
10363 * linux-low.c (pid_is_stopped): New.
10364 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
10365
10366 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
10367
10368 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
10369 of conditions.
10370
10371 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
10372
10373 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
10374
10375 2012-02-24 Luis Machado <lgustavo@codesourcery>
10376
10377 * server.c (handle_query): Advertise support for target-side
10378 breakpoint condition evaluation.
10379 (process_point_options): New function.
10380 (process_serial_event): When inserting a breakpoint, check for
10381 a target-side condition that should be evaluated.
10382
10383 * mem-break.c: Include regcache.h and ax.h.
10384 (point_cond_list_t): New data structure.
10385 (breakpoint) <cond_list>: New field.
10386 (find_gdb_breakpoint_at): Make non-static.
10387 (delete_gdb_breakpoint_at): Clear any target-side
10388 conditions.
10389 (clear_gdb_breakpoint_conditions): New function.
10390 (add_condition_to_breakpoint): Likewise.
10391 (add_breakpoint_condition): Likewise.
10392 (gdb_condition_true_at_breakpoint): Likewise.
10393 (gdb_breakpoint_here): Return result directly instead
10394 of going through a local variable.
10395
10396 * mem-break.h (find_gdb_breakpoint_at): New prototype.
10397 (clear_gdb_breakpoint_conditions): Likewise.
10398 (add_breakpoint_condition): Likewise.
10399 (gdb_condition_true_at_breakpoint): Likewise.
10400
10401 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
10402 (need_step_over_p): Take target-side breakpoint condition into
10403 consideration.
10404
10405 2012-02-24 Luis Machado <lgustavo@codesourcery>
10406
10407 * server.h: Include tracepoint.h.
10408 (agent_mem_read, agent_get_trace_state_variable_value,
10409 agent_set_trace_state_variable_value,
10410 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
10411 get_set_tsv_func_addr): New prototypes.
10412
10413 * ax.h: New include file.
10414 * ax.c: New source file.
10415
10416 * tracepoint.c: Include ax.h.
10417 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
10418 agent_expr, eval_result_type): Move to ax.h.
10419 (parse_agent_expr): Rename to ...
10420 (gdb_parse_agent_expr): ... this, make it non-static and move
10421 to ax.h.
10422 (unparse_agent_expr) Rename to ...
10423 (gdb_unparse_agent_expr): ... this, make it non-static and move
10424 to ax.h.
10425 (eval_agent_expr): Rename to ...
10426 (eval_tracepoint_agent_expr): ... this.
10427 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
10428 forward declarations.
10429 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
10430 (agent_get_trace_state_variable_value): New function.
10431 (agent_set_trace_state_variable_value): New function.
10432 (cmd_qtdp): Call gdb_parse_agent_expr (...).
10433 (response_tracepoint): Call gdb_unparse_agent_expr (...).
10434 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
10435 (condition_true_at_tracepoint): Likewise.
10436 (parse_agent_expr): Rename to ...
10437 (gdb_parse_agent_expr): ... this and move to ax.c.
10438 (unparse_agent_expr): Rename to ...
10439 (gdb_unparse_agent_expr): ... this and move to ax.c.
10440 (gdb_agent_op_name): Move to ax.c.
10441 (eval_agent_expr): Rename to ...
10442 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
10443 and move to ax.c.
10444 (eval_tracepoint_agent_expr): New function.
10445 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
10446 non-static.
10447 (current_insn_ptr, emit_error, struct bytecode_address): Move to
10448 ax.c.
10449 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
10450 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
10451 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
10452 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
10453 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
10454 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
10455 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
10456 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
10457 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
10458 (compile_bytecodes): Remove forward declaration.
10459 (is_goto_target): Move to ax.c.
10460 (compile_bytecodes): Move to ax.c and call
10461 agent_get_trace_state_variable_value (...) and
10462 agent_set_trace_state_variable_value (...).
10463
10464 * Makefile.in: Update ax.c and IPA dependencies.
10465
10466 2012-02-24 Pedro Alves <palves@redhat.com>
10467
10468 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
10469 (cmd_bigqtbuffer_circular): ... this. Only handle
10470 'QTBuffer:circular:'.
10471 (handle_tracepoint_general_set): Adjust.
10472
10473 2012-02-16 Yao Qi <yao@codesourcery.com>
10474
10475 * inferiors.c: Move code to ...
10476 * dll.c: .... here. New.
10477 * server.h: Declare clear_dlls.
10478 * Makefile.in (SFILES): Add dll.c.
10479 (OBS): Add dll.o
10480 (dll.o): New rule.
10481
10482 2012-02-11 Yao Qi <yao@codesourcery.com>
10483
10484 * server.c: (handle_monitor_command): Add a new parameter
10485 `own_buf'.
10486 (handle_query): Update caller.
10487
10488 2012-02-09 Joel Brobecker <brobecker@adacore.com>
10489
10490 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
10491 * configure, config.in: Regenerate.
10492 * hostio.c: Provide an alternate implementation if HAVE_READLINK
10493 is not defined.
10494
10495 2012-02-02 Pedro Alves <palves@redhat.com>
10496
10497 Try SIGKILL first, then PTRACE_KILL.
10498 * linux-low.c (linux_kill_one_lwp): New.
10499 (linux_kill_one_lwp): Rename to ...
10500 (kill_one_lwp_callback): ... this. Use the new
10501 linux_kill_one_lwp.
10502
10503 2012-02-02 Pedro Alves <palves@redhat.com>
10504
10505 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
10506 inferior.
10507
10508 2012-01-27 Pedro Alves <palves@redhat.com>
10509
10510 * linux-low.c (linux_child_pid_to_exec_file): Delete.
10511 (elf_64_file_p): Make static.
10512 (linux_pid_exe_is_elf_64_file): New.
10513 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
10514 Delete declarations.
10515 (linux_pid_exe_is_elf_64_file): Declare.
10516 * linux-x86-low.c (x86_arch_setup): Use
10517 linux_pid_exe_is_elf_64_file.
10518
10519 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
10520
10521 * linux-low.c (linux_wait_for_event_1): Rename to ...
10522 (linux_wait_for_event): ... here and merge it with former
10523 linux_wait_for_event - new variable wait_ptid, use it.
10524 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
10525
10526 2012-01-23 Pedro Alves <palves@redhat.com>
10527
10528 * server.c (main): Avoid yet another case of infinite loop while
10529 detaching/killing after a longjmp.
10530
10531 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
10532
10533 Code cleanup.
10534 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
10535
10536 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
10537
10538 * hostio.c (handle_readlink): New function.
10539 (handle_vFile): Call it to handle "vFile:readlink" packets.
10540
10541 2012-01-20 Pedro Alves <palves@redhat.com>
10542 Ulrich Weigand <ulrich.weigand@linaro.org>
10543
10544 * server.c (handle_v_requests): Only support vAttach and vRun to
10545 start multiple processes when in extended protocol mode.
10546
10547 2012-01-17 Pedro Alves <palves@redhat.com>
10548
10549 * tracepoint.c (initialize_tracepoint): Use mmap instead of
10550 memalign plus mprotect to allocate the scratch buffer.
10551
10552 2012-01-13 Pedro Alves <palves@redhat.com>
10553
10554 * server.c (attach_inferior): Clear `cont_thread'.
10555
10556 2012-01-13 Pedro Alves <palves@redhat.com>
10557
10558 * server.c (main): Avoid infinite loop while detaching/killing
10559 after a longjmp.
10560
10561 2012-01-09 Doug Evans <dje@google.com>
10562
10563 * server.c (start_inferior): Set last_ptid in --wrapper case.
10564
10565 2012-01-06 Yao Qi <yao@codesourcery.com>
10566
10567 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
10568 defined.
10569 [IN_PROCESS_AGENT] (debug_agent): New global variable.
10570
10571 2012-01-04 Yao Qi <yao@codesourcery.com>
10572
10573 * tracepoint.c (cmd_qtdp): Print debug message
10574 for static tracepoint.
10575
10576 2012-01-04 Yao Qi <yao@codesourcery.com>
10577
10578 * tracepoint.c (trace_vdebug): Differentiate debug message
10579 between gdbserver and IPA.
10580
10581 2012-01-03 Yao Qi <yao@codesourcery.com>
10582
10583 * tracepoint.c (tracepoint_was_hit): Don't collect for
10584 static tracepoint.
10585
10586 2012-01-02 Joel Brobecker <brobecker@adacore.com>
10587
10588 * terminal.h: Reformat copyright header.
10589
10590 2012-01-02 Joel Brobecker <brobecker@adacore.com>
10591
10592 * server.c (gdbserver_version): Update copyright year.
10593 * gdbreplay.c (gdbreplay_version): Likewise.
10594
10595 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
10596
10597 * linux-low.c (linux_create_inferior): Put empty if clause for write.
10598
10599 Revert:
10600 2011-12-18 Hui Zhu <teawater@gmail.com>
10601 * linux-low.c (linux_create_inferior): Save return value to ret.
10602
10603 2011-12-18 Hui Zhu <teawater@gmail.com>
10604
10605 * linux-low.c (linux_create_inferior): Save return value to ret.
10606
10607 2011-12-16 Doug Evans <dje@google.com>
10608
10609 * linux-low.c (linux_create_inferior): If stdio connection,
10610 redirect stdin from /dev/null, stdout to stderr.
10611 * remote-utils.c (remote_is_stdio): New static global.
10612 (remote_connection_is_stdio): New function.
10613 (remote_prepare): Handle stdio connection.
10614 (remote_open): Ditto.
10615 (remote_close): Don't close stdin for stdio connections.
10616 (read_prim,write_prim): New functions. Replace all calls to
10617 read/write to these.
10618 * server.c (main): Watch for "-" argument. Move call to
10619 remote_prepare before start_inferior.
10620 * server.h (STDIO_CONNECTION_NAME): New macro.
10621 (remote_connection_is_stdio): Declare.
10622
10623 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
10624 in debugging output.
10625
10626 2011-12-15 Yao Qi <yao@codesourcery.com>
10627
10628 * tracepoint.c: Include sys/syscall.h.
10629 (gdb_ust_thread): Remove preprocessor conditional.
10630
10631 2011-12-14 Pedro Alves <pedro@codesourcery.com>
10632
10633 * linux-low.c (linux_detach_one_lwp): Call
10634 the_low_target.prepare_to_resume before detaching.
10635
10636 2011-12-14 Yao Qi <yao@codesourcery.com>
10637
10638 * tracepoint.c (gdb_ust_thread): Don't ignore return value
10639 of write.
10640
10641 2011-12-14 Yao Qi <yao@codesourcery.com>
10642
10643 * i386-low.c (i386_low_stopped_data_address): Initialize local
10644 variable `control'.
10645
10646 2011-12-13 Pedro Alves <pedro@codesourcery.com>
10647
10648 PR remote/13492
10649
10650 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
10651 DR_CONTROL unless necessary. Extend comments.
10652 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
10653 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
10654
10655 2011-12-13 Yao Qi <yao@codesourcery.com>
10656
10657 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
10658 macros.
10659 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
10660
10661 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
10662
10663 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
10664 Print new debug message for such case.
10665
10666 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
10667
10668 Fix overlapping memcpy.
10669 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
10670 the read_inferior_memory transfer.
10671 (delete_fast_tracepoint_jump): New variable buf. Use it for the
10672 write_inferior_memory transfer.
10673 (set_fast_tracepoint_jump): New variable buf. Use it for the
10674 read_inferior_memory and write_inferior_memory transfers.
10675 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
10676 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
10677 Use it for the write_inferior_memory transfer.
10678 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
10679 buffers.
10680
10681 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
10682
10683 * linux-low.c (fetch_register, store_register): Make code
10684 consistent, fix formatting.
10685
10686 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
10687
10688 * linux-low.c (usr_store_inferior_registers): Factor out code
10689 to handle individual registers into...
10690 (store_register): ... this new function.
10691
10692 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
10693
10694 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
10695 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
10696 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
10697 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
10698 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
10699 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
10700 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
10701 (srv_xmlfiles): Add new XML files.
10702
10703 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
10704 and <sys/uio.h>.
10705 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
10706 (init_registers_s390_linux32v1): Add prototype.
10707 (init_registers_s390_linux32v2): Likewise.
10708 (init_registers_s390_linux64v1): Likewise.
10709 (init_registers_s390_linux64v2): Likewise.
10710 (init_registers_s390x_linux64v1): Likewise.
10711 (init_registers_s390x_linux64v2): Likewise.
10712 (s390_num_regs): Increment to 52.
10713 (s390_regmap): Add orig_r2 register.
10714 (s390_num_regs_3264): Increment to 68.
10715 (s390_regmap_3264): Add orig_r2 register.
10716 (s390_collect_ptrace_register): Handle orig_r2 register.
10717 (s390_supply_ptrace_register): Likewise.
10718 (s390_fill_last_break): New function.
10719 (s390_store_last_break): Likewise.
10720 (s390_fill_system_call): New function.
10721 (s390_store_system_call): Likewise.
10722 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
10723 register sets.
10724 (s390_check_regset): New function.
10725 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
10726 NT_S390_SYSTEM_CALL regsets and use appropriate description.
10727 Update target_regsets for available register sets.
10728
10729 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
10730 Jan Kratochvil <jan.kratochvil@redhat.com>
10731
10732 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
10733 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
10734 New.
10735 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
10736 * linux-low.h (struct process_info_private): New member r_debug.
10737 * server.c (handle_qxfer_libraries): Call
10738 the_target->qxfer_libraries_svr4.
10739 (handle_qxfer_libraries_svr4): New function.
10740 (qxfer_packets): New entry "libraries-svr4".
10741 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
10742 * target.h (struct target_ops): New member qxfer_libraries_svr4.
10743 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
10744 PACKET_qXfer_libraries_svr4.
10745
10746 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
10747
10748 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
10749 PSW address/mask between 8-byte and 16-byte formats.
10750 (s390_supply_ptrace_register): Likewise.
10751 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
10752 basic addressing mode bit.
10753
10754 2011-11-24 Stan Shebs <stan@codesourcery.com>
10755
10756 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
10757
10758 2011-11-17 Stan Shebs <stan@codesourcery.com>
10759
10760 * tracepoint.c (struct tracepoint): New field traceframe_usage.
10761 (tracing_start_time): New global.
10762 (tracing_stop_time): New global.
10763 (tracing_user_name): New global.
10764 (tracing_notes): New global.
10765 (tracing_stop_note): New global.
10766 (cmd_qtstart): Set traceframe_usage, start_time.
10767 (stop_tracing): Set stop_time.
10768 (cmd_qtstatus): Report additional status.
10769 (cmd_qtp): New function.
10770 (handle_tracepoint_query): Call it.
10771 (cmd_qtnotes): New function.
10772 (handle_tracepoint_general_set): Call it.
10773 (get_timestamp): Rename from tsv_get_timestamp.
10774
10775 2011-11-14 Stan Shebs <stan@codesourcery.com>
10776 Kwok Cheung Yeung <kcy@codesourcery.com>
10777
10778 * linux-x86-low.c (small_jump_insn): New.
10779 (i386_install_fast_tracepoint_jump_pad): Add arguments for
10780 trampoline and error message, build a trampoline and issue a small
10781 jump instruction to it.
10782 (x86_install_fast_tracepoint_jump_pad): Add arguments for
10783 trampoline and error message.
10784 (x86_get_min_fast_tracepoint_insn_len): New.
10785 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
10786 * linux-low.h (struct linux_target_ops): Add arguments to
10787 install_fast_tracepoint_jump_pad operation, add new operation.
10788 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
10789 arguments.
10790 (linux_get_min_fast_tracepoint_insn_len): New function.
10791 (linux_target_op): Add new operation.
10792 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
10793 (gdb_trampoline_buffer_end): Ditto.
10794 (gdb_trampoline_buffer_error): Ditto.
10795 (struct ipa_sym_addresses): Add fields for new IPA variables.
10796 (symbol_list): Add entries for new IPA variables.
10797 (struct tracepoint): Add fields to hold the address range of the
10798 trampoline used by the tracepoint.
10799 (trampoline_buffer_head): New static variable.
10800 (trampoline_buffer_tail): Ditto.
10801 (claim_trampoline_space): New function.
10802 (have_fast_tracepoint_trampoline_buffer): New function.
10803 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
10804 structure.
10805 (install_fast_tracepoint): Ditto, also add error buffer argument.
10806 (cmd_qtminftpilen): New function.
10807 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
10808 (fast_tracepoint_from_trampoline_address): New function.
10809 (fast_tracepoint_collecting): Handle trampoline as part of jump
10810 pad space.
10811 (set_trampoline_buffer_space): New function.
10812 (initialize_tracepoint): Initialize new IPA variables.
10813 * target.h (struct target_ops): Add arguments to
10814 install_fast_tracepoint_jump_pad operation, add new
10815 get_min_fast_tracepoint_insn_len operation.
10816 (target_get_min_fast_tracepoint_insn_len): New.
10817 (install_fast_tracepoint_jump_pad): Add arguments.
10818 * server.h (IPA_BUFSIZ): Define.
10819 * linux-i386-ipa.c: Include extra header files.
10820 (initialize_fast_tracepoint_trampoline_buffer): New function.
10821 (initialize_low_tracepoint): Call it.
10822 * server.h (set_trampoline_buffer_space): Declare.
10823 (claim_trampoline_space): Ditto.
10824 (have_fast_tracepoint_trampoline_buffer): Ditto.
10825
10826 2011-11-14 Yao Qi <yao@codesourcery.com>
10827
10828 * server.c (handle_query): Handle InstallInTrace for qSupported.
10829 * tracepoint.c (add_tracepoint): Sort list.
10830 (install_tracepoint, download_tracepoint): New.
10831 (cmd_qtdp): Call them to install and download tracepoints.
10832 (sort_tracepoints): Removed.
10833 (cmd_qtstart): Update.
10834
10835 2011-11-14 Yao Qi <yao@codesourcery.com>
10836
10837 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
10838 * mem-break.h: Declare.
10839 * tracepoint.c (cmd_qtstart): Move some code to ...
10840 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
10841 New.
10842 (download_tracepoints): Move some code to ...
10843 (download_tracepoint_1): ... here. New.
10844
10845 2011-11-08 Yao Qi <yao@codesourcery.com>
10846
10847 * remote-utils.c (relocate_instruction): A comment fix.
10848
10849 2011-11-07 Joel Brobecker <brobecker@adacore.com>
10850
10851 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
10852 (i386_dr_low_get_control, i386_dr_low_get_status): Use
10853 dr_status_mirror and dr_control_mirror from debug_reg_state.
10854 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
10855 (i386_initial_stuff): Remove use of deleted globals.
10856 (i386_get_thread_context, i386_set_thread_context,
10857 i386_thread_added): Use dr_status_mirror and dr_control_mirror
10858 from debug_reg_state.
10859
10860 2011-11-05 Yao Qi <yao@codesourcery.com>
10861
10862 * tracepoint.c (gdb_collect): Loop over tracepoints of same
10863 address as TPOINT's.
10864
10865 2011-11-02 Stan Shebs <stan@codesourcery.com>
10866
10867 * tracepoint.c (agent_mem_read_string): New function.
10868 (eval_agent_expr): Call it for tracenz.
10869 * server.c (handle_query): Report support for tracenz.
10870
10871 2011-11-02 Yao Qi <yao@codesourcery.com>
10872
10873 * tracepoint.c (cmd_qtstart): Remove unused local variables.
10874
10875 2011-11-02 Yao Qi <yao@codesourcery.com>
10876
10877 * target.h: Fix a typo in comment.
10878
10879 2011-10-31 Pedro Alves <pedro@codesourcery.com>
10880
10881 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
10882 clobber the breakpoints' shadows with fast tracepoint jumps.
10883 * mem-break.h (check_mem_write): Add `myaddr' parameter.
10884 * target.c (write_inferior_memory): Also pass MYADDR down to
10885 check_mem_write.
10886
10887 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
10888
10889 * configure.ac: Check support for personality routine.
10890 * configure: Regenerate.
10891 * config.in: Likewise.
10892 * linux-low.c: Include <sys/personality.h>.
10893 Define ADDR_NO_RANDOMIZE if necessary.
10894 (linux_create_inferior): Disable address space randomization when
10895 forking inferior, if requested.
10896 (linux_supports_disable_randomization): New function.
10897 (linux_target_ops): Install it.
10898 * server.h (disable_randomization): Declare.
10899 * server.c (disable_randomization): New global variable.
10900 (handle_general_set): Handle QDisableRandomization.
10901 (handle_query): Likewise for qSupported.
10902 (main): Support --disable-randomization and --no-disable-randomization
10903 command line arguments.
10904 * target.h (struct target_ops): Add supports_disable_randomization.
10905 (target_supports_disable_randomization): New macro.
10906
10907 2011-09-29 Mike Frysinger <vapier@gentoo.org>
10908
10909 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
10910 ifdef check.
10911 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
10912 [!PT_GETDSBT] (target_loadmap): New definition.
10913 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
10914 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
10915 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
10916 and PT_GETDSBT to LINUX_LOADMAP.
10917 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
10918 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
10919
10920 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
10921
10922 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
10923 (arm_linux_hwbp_cap): New static variable.
10924 (arm_linux_get_hwbp_cap): Replace by ...
10925 (arm_linux_init_hwbp_cap): ... this new function.
10926 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
10927 (arm_linux_get_hw_watchpoint_count): Likewise.
10928 (arm_linux_get_hw_watchpoint_max_length): Likewise.
10929 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
10930 (arm_prepare_to_resume): Use perror_with_name instead of error.
10931
10932 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
10933
10934 * linux-arm-low.c: Include <signal.h>.
10935 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
10936 (struct arm_linux_hwbp_cap): New data type.
10937 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
10938 (struct arm_linux_hw_breakpoint): New data type.
10939 (MAX_BPTS, MAX_WPTS): Define.
10940 (struct arch_process_info, struct arch_lwp_info): New data types.
10941 (arm_linux_get_hwbp_cap): New function.
10942 (arm_linux_get_hw_breakpoint_count): Likewise.
10943 (arm_linux_get_hw_watchpoint_count): Likewise.
10944 (arm_linux_get_hw_watchpoint_max_length): Likewise.
10945 (arm_hwbp_control_initialize): Likewise.
10946 (arm_hwbp_control_is_enabled): Likewise.
10947 (arm_hwbp_control_is_initialized): Likewise.
10948 (arm_hwbp_control_disable): Likewise.
10949 (arm_linux_hw_breakpoint_equal): Likewise.
10950 (arm_linux_hw_point_initialize): Likewise.
10951 (struct update_registers_data): New data structure.
10952 (update_registers_callback: New function.
10953 (arm_insert_point): Likewise.
10954 (arm_remove_point): Likewise.
10955 (arm_stopped_by_watchpoint): Likewise.
10956 (arm_stopped_data_address): Likewise.
10957 (arm_new_process): Likewise.
10958 (arm_new_thread): Likewise.
10959 (arm_prepare_to_resume): Likewise.
10960 (the_low_target): Register arm_insert_point, arm_remove_point,
10961 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
10962 arm_new_thread, and arm_prepare_to_resume.
10963
10964 2011-09-15 Stan Shebs <stan@codesourcery.com>
10965
10966 * server.h (struct emit_ops): Add compare-goto fields.
10967 * tracepoint.c (gdb_agent_op_sizes): New table.
10968 (emit_eq_goto): New function.
10969 (emit_ne_goto): New function.
10970 (emit_lt_goto): New function.
10971 (emit_le_goto): New function.
10972 (emit_gt_goto): New function.
10973 (emit_ge_goto): New function.
10974 (is_goto_target): New function.
10975 (compile_bytecodes): Recognize special cases of compare-goto
10976 combinations and call specialized emitters for them.
10977 * linux-x86-low.c (amd64_emit_eq_goto): New function.
10978 (amd64_emit_ne_goto): New function.
10979 (amd64_emit_lt_goto): New function.
10980 (amd64_emit_le_goto): New function.
10981 (amd64_emit_gt_goto): New function.
10982 (amd64_emit_ge_goto): New function.
10983 (amd64_emit_ops): Add the new functions.
10984 (i386_emit_eq_goto): New function.
10985 (i386_emit_ne_goto): New function.
10986 (i386_emit_lt_goto): New function.
10987 (i386_emit_le_goto): New function.
10988 (i386_emit_gt_goto): New function.
10989 (i386_emit_ge_goto): New function.
10990 (i386_emit_ops): Add the new functions.
10991
10992 2011-09-08 Stan Shebs <stan@codesourcery.com>
10993
10994 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
10995 (i386_emit_epilogue): Restore %ebx.
10996
10997 2011-08-31 Jie Zhang <jzhang918@gmail.com>
10998
10999 * server.c (step_thread): Remove definition.
11000 (process_serial_event): Don't handle Hs.
11001 * server.h (step_thread): Remove declaration.
11002 * target.c (set_desired_inferior): Remove use of step_thread.
11003
11004 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
11005
11006 * linux-low.c: Include linux-procfs.h.
11007 (linux_attach_lwp_1): Update comments.
11008 (linux_attach): Scan for existing threads when attaching to a
11009 process that is the tgid.
11010 * Makefile.in: Update dependencies.
11011
11012 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
11013
11014 * configure.srv: Add linux-procfs.o dependencies.
11015
11016 2011-08-14 Yao Qi <yao@codesourcery.com>
11017
11018 * target.h (struct target_ops): Fix indent.
11019 * win32-low.c (win32_target_ops): Fix comment.
11020
11021 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
11022 Yao Qi <yao@codesourcery.com>
11023
11024 * Makefile.in (clean): Remove tic6x-*.c files.
11025 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
11026 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
11027 (tic6x-c64xp-linux.c): Likewise.
11028 * configure.srv: Add support for tic6x-*-uclinux.
11029 * linux-tic6x-low.c: New.
11030 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
11031
11032 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
11033 Yao Qi <yao@codesourcery.com>
11034
11035 * target.h (struct target_ops): Add read_loadmap.
11036 * linux-low.c (struct target_loadseg): New type.
11037 (struct target_loadmap): New type.
11038 (linux_read_loadmap): New function.
11039 (linux_target_ops): Add linux_read_loadmap.
11040 * server.c (handle_query): Support qXfer:fdpic:read packet.
11041 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
11042 to NULL.
11043
11044 2011-08-05 Eli Zaretskii <eliz@gnu.org>
11045
11046 * win32-low.c: Include <stdint.h>.
11047
11048 2011-07-22 Pedro Alves <pedro@codesourcery.com>
11049
11050 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
11051 to the inferior here.
11052 (i386_remove_aligned_watchpoint): Ditto.
11053 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
11054 fit part of the watchpoint in the debug registers.
11055 (i386_update_inferior_debug_regs): New.
11056 (i386_low_insert_watchpoint): Work on a local mirror of the debug
11057 registers, and only update the inferior on success.
11058 (i386_low_remove_watchpoint): Ditto.
11059
11060 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
11061
11062 * linux-low.c (compare_ints, unique, list_threads, show_process,
11063 linux_core_of_thread): Delete.
11064 (linux_target_ops): Change linux_core_of_thread to
11065 linux_common_core_of_thread.
11066 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
11067 * utils.c (malloc_failure): Change type of argument.
11068 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
11069 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
11070 common/linux-osdata.c, common/ptid.c and common/buffer.c.
11071 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
11072 (IPA_OBJS): Add common-utils-ipa.o.
11073 (ptid_h, linux_osdata_h): New macros.
11074 (server_h): Add common/common-utils.h, common/xml-utils.h,
11075 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
11076 common/ptid.h.
11077 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
11078 ptid.o, buffer.o): New rules.
11079 (linux-low.o): Add common/linux-osdata.h as a dependency.
11080 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
11081 * configure.ac: Add AC_HEADER_DIRENT check.
11082 * config.in: Regenerate.
11083 * configure: Regenerate.
11084 * remote-utils.c (xml_escape_text): Delete.
11085 (buffer_grow, buffer_free, buffer_init, buffer_finish,
11086 buffer_xml_printf): Move to common/buffer.c.
11087 * server.c (main): Remove call to initialize_inferiors.
11088 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
11089 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
11090 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
11091 internal_error, gdb_assert, gdb_assert_fail): Delete.
11092 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
11093 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
11094 common/buffer.h.
11095 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
11096 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
11097 initialize_inferiors): Delete.
11098
11099 2011-07-20 Pedro Alves <pedro@codesourcery.com>
11100
11101 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
11102 symbol error.
11103
11104 2011-05-31 Pedro Alves <pedro@codesourcery.com>
11105
11106 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
11107 assertion.
11108 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
11109
11110 2011-05-26 Yao Qi <yao@codesourcery.com>
11111
11112 * Makefile.in (thread-db.o): Track dependence to
11113 common/gdb_thread_db.h.
11114 * thread-db.c: include gdb_thread_db.h from right place.
11115
11116 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
11117
11118 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
11119 __FILE__ and __LINE__ to internal_error.
11120
11121 2011-05-13 Doug Evans <dje@google.com>
11122
11123 * thread-db.c (try_thread_db_load_from_sdir): New function.
11124 (try_thread_db_load_from_dir): New function.
11125 (thread_db_load_search): Handle $sdir, ignore $pdir.
11126 Remove trying of system directories if search of
11127 libthread-db-search-path fails, that is now done via $sdir.
11128
11129 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
11130
11131 * server.c (handle_query): Add EnableDisableTracepoints to the list
11132 of supported features.
11133 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
11134 tracepoints.
11135 (cmd_qtenable_disable): New.
11136 (cmd_qtstart): Install tracepoints even if disabled.
11137 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
11138 receiving a QTEnable or QTDisable packet.
11139 (gdb_collect): Skip data collection if fast tracepoint is disabled.
11140 (ust_marker_to_static_tracepoint): Do not ignore disabled static
11141 tracepoints.
11142 (gdb_probe): Skip data collection if static tracepoint is disabled.
11143
11144 2011-05-10 Doug Evans <dje@google.com>
11145
11146 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
11147
11148 2011-05-04 Doug Evans <dje@google.com>
11149
11150 * linux-low.c (linux_join): Skip process lookup.
11151 * spu-low.c (spu_join): Ditto.
11152 * server.c (join_inferiors_callback): Delete.
11153 (process_serial_event): For 'D' packet (detach) call join_inferior
11154 directly.
11155
11156 2011-05-04 Joseph Myers <joseph@codesourcery.com>
11157
11158 * README: Don't mention xscale*-*-linux*.
11159 * configure.srv (xscale*-*-linux*): Don't handle target.
11160
11161 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
11162
11163 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
11164 casting pointers.
11165 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
11166 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
11167 (i386_emit_void_call_2): Likewise.
11168
11169 2011-04-26 Yao Qi <yao@codesourcery.com>
11170
11171 * linux-low.c: Move common macros to linux-ptrace.h.
11172 Include linux-ptrace.h.
11173 * Makefile.in (linux_ptrace_h): New.
11174 (linux-low.o): Depends on linux-ptrace.h.
11175
11176 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
11177
11178 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
11179 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
11180 (remote_prepare): New function with most of the TCP code from ...
11181 (remote_open): ... here. Detect PORT here unconditionally. Move also
11182 setting transport_is_reliable.
11183 * server.c (run_once): New variable.
11184 (gdbserver_usage): Document it.
11185 (main): Set run_once for `--once'. Call remote_prepare. Exit after
11186 the first run if RUN_ONCE.
11187 * server.h (run_once, remote_prepare): New declarations.
11188
11189 2011-04-19 Tom Tromey <tromey@redhat.com>
11190
11191 * win32-low.c (handle_load_dll): Remove duplicate "the".
11192
11193 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
11194
11195 Remove support for old Cygwin 1.5 versions.
11196 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
11197 function to avoid warning.
11198 (win32_add_one_solib): Use cygwin_conv_path function to avoid
11199 warning.
11200
11201 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
11202
11203 * gdbserver/server.h (Macro _): Define it if not available.
11204
11205 2011-03-14 Michael Snyder <msnyder@vmware.com>
11206
11207 * hostio.c (handle_close): Remove unnecessary null test.
11208
11209 2011-03-10 Joel Brobecker <brobecker@adacore.com>
11210
11211 * Makefile.in (maintainer-clean realclean distclean): Remove
11212 "make ... subdir_do" command.
11213
11214 2011-03-10 Michael Snyder <msnyder@vmware.com>
11215
11216 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
11217
11218 * server.c (handle_v_run): Free alloced buffer on early return.
11219
11220 2011-03-09 Yao Qi <yao@codesourcery.com>
11221
11222 Revert:
11223 2011-03-04 Yao Qi <yao@codesourcery.com>
11224
11225 * Makefile.in: Remove GNU make feature --directory.
11226
11227 2011-03-05 Yao Qi <yao@codesourcery.com>
11228
11229 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
11230 (subdir_do): New make target. Copied from gdb/Makefile.
11231 (maintainer-clean, realclean, distclean, clean): Call corresponding
11232 make targets in common/Makefile.
11233
11234 2011-02-11 Yao Qi <yao@codesourcery.com>
11235
11236 * configure.ac: Call AC_PROG_RANLIB.
11237 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
11238 * configure: Regenerate.
11239
11240 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
11241
11242 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
11243
11244 2011-03-06 Yao Qi <yao@codesourcery.com>
11245
11246 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
11247
11248 2011-03-05 Yao Qi <yao@codesourcery.com>
11249
11250 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
11251 (subdir_do): New make target. Copied from gdb/Makefile.
11252 (maintainer-clean, realclean, distclean, clean): Call corresponding
11253 make targets in common/Makefile.
11254
11255 2011-03-04 Yao Qi <yao@codesourcery.com>
11256
11257 * Makefile.in: Remove GNU make feature --directory.
11258
11259 2011-03-04 Michael Snyder <msnyder@vmware.com>
11260
11261 * server.c (queue_stop_reply): Call xmalloc not malloc.
11262
11263 2011-03-02 Michael Snyder <msnyder@vmware.com>
11264
11265 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
11266
11267 2011-02-28 Michael Snyder <msnyder@vmware.com>
11268
11269 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
11270 (cmd_qtframe): Ditto.
11271 (cmd_qtbuffer): Ditto.
11272 (cmd_bigqtbuffer): Ditto.
11273
11274 * utils.c (decimal2str): Initialize 'width' to nine, then
11275 don't mess with it.
11276
11277 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
11278
11279 * hostio.c (require_data): Free *data, not data.
11280
11281 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11282
11283 * hostio.c (require_data): Use free, not xfree.
11284
11285 2011-02-27 Michael Snyder <msnyder@vmware.com>
11286
11287 * server.c (handle_query): Discard unused value.
11288
11289 * hostio.c (require_data): Free malloc memory before returning
11290 error.
11291
11292 2011-02-26 Michael Snyder <msnyder@vmware.com>
11293
11294 * linux-low.c (list_threads): Call closedir for dirent.
11295
11296 2011-02-27 Michael Snyder <msnyder@vmware.com>
11297
11298 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
11299 a case statement falls through.
11300
11301 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
11302
11303 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
11304 in comparison.
11305
11306 2011-02-26 Michael Snyder <msnyder@vmware.com>
11307
11308 * utils.c (decimal2str): Eliminate dead code and dead param.
11309 (pulongest): Drop dead param from call to decimal2str.
11310 (plongest): Ditto.
11311
11312 2011-02-24 Joel Brobecker <brobecker@adacore.com>
11313
11314 Revert the following patch (not approved yet):
11315 2011-02-21 Hui Zhu <teawater@gmail.com>
11316 * tracepoint.c (tp_printf): New function.
11317 (eval_agent_expr): Handle gdb_agent_op_printf.
11318
11319 2011-02-21 Hui Zhu <teawater@gmail.com>
11320
11321 * tracepoint.c (tp_printf): New function.
11322 (eval_agent_expr): Handle gdb_agent_op_printf.
11323
11324 2011-02-18 Tom Tromey <tromey@redhat.com>
11325
11326 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
11327 (tracepoint.o): Likewise.
11328 * tracepoint.c (enum gdb_agent_op): Use ax.def.
11329 (gdb_agent_op_names): Likewise.
11330
11331 2011-02-18 Tom Tromey <tromey@redhat.com>
11332
11333 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
11334 gdb_agent_op_rot>: New constants.
11335 (gdb_agent_op_names): Add pick and roll.
11336 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
11337 cases.
11338
11339 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
11340
11341 * aclocal.m4: Regenerated with aclocal-1.11.1.
11342
11343 2011-02-14 Pedro Alves <pedro@codesourcery.com>
11344
11345 * server.c (handle_qxfer_traceframe_info): New.
11346 (qxfer_packets): Register "traceframe-info".
11347 (handle_query): Report support for qXfer:traceframe-info:read+.
11348 * tracepoint.c (match_blocktype): New.
11349 (traceframe_find_block_type): Rename to ...
11350 (traceframe_walk_blocks): ... this. Add callback filter argument,
11351 and use it.
11352 (traceframe_find_block_type): New, reimplemented on top of
11353 traceframe_walk_blocks.
11354 (build_traceframe_info_xml): New.
11355 (traceframe_read_info): New.
11356 * server.h (traceframe_read_info): Declare.
11357
11358 2011-02-11 Yao Qi <yao@codesourcery.com>
11359
11360 * configure.ac: Call AC_PROG_RANLIB.
11361 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
11362 * configure: Regenerate.
11363
11364 2011-02-07 Pedro Alves <pedro@codesourcery.com>
11365
11366 * server.c (gdb_read_memory): Change return semantics to allow
11367 partial transfers.
11368 (handle_search_memory_1): Adjust.
11369 (process_serial_event) <'m' packet>: Handle partial transfers.
11370 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
11371
11372 2011-01-28 Pedro Alves <pedro@codesourcery.com>
11373
11374 * regcache.c (init_register_cache): Initialize
11375 regcache->register_status.
11376 (free_register_cache): Release regcache->register_status.
11377 (regcache_cpy): Copy register_status.
11378 (registers_to_string): Print 'x's for unavailable registers.
11379 (supply_register): Mark the register's status valid or
11380 unavailable, depending on whether a buffer was passed in or not.
11381 (supply_register_zeroed): New.
11382 (supply_regblock): Mark the registers' status valid or
11383 unavailable, depending on whether a buffer was passed in or not.
11384 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
11385 (struct regcache): New `register_status' field.
11386 (supply_register_zeroed): Declare.
11387 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
11388 supply_register_zeroed, rather than passing a NULL buffer to
11389 supply_register.
11390 * tracepoint.c (fetch_traceframe_registers): Update comment.
11391
11392 2011-01-28 Pedro Alves <pedro@codesourcery.com>
11393
11394 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
11395 buffer explicit.
11396
11397 2011-01-25 Pedro Alves <pedro@codesourcery.com>
11398
11399 * server.h (decode_xfer_write): Change prototype.
11400 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
11401 and don't extract the annex here.
11402 * server.c (decode_xfer_read): Remove `annex' parameter,
11403 and don't extract the annex here.
11404 (decode_xfer): New.
11405 (struct qxfer): New.
11406 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
11407 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
11408 (handle_qxfer_statictrace): New functions, abstracted out from
11409 handle_query, and made to use the struct qxfer interface.
11410 (handle_threads_qxfer_proper): Rename to ...
11411 (handle_qxfer_threads_proper): ... this.
11412 (handle_threads_qxfer): Rename to ...
11413 (handle_qxfer_threads): ... this. Adjust.
11414 (qxfer_packets): New array.
11415 (handle_qxfer): New function.
11416 (handle_query): Use handle_qxfer.
11417
11418 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
11419
11420 * gdbreplay.c: Shorten lines of >= 80 columns.
11421 * linux-low.c: Ditto.
11422 * linux-ppc-low.c: Ditto.
11423 * linux-s390-low.c: Ditto.
11424 * linux-sparc-low.c: Ditto.
11425 * linux-x86-low.c: Ditto.
11426 * linux-xtensa-low.c: Ditto.
11427 * mem-break.c: Ditto.
11428 * nto-low.c: Ditto.
11429 * regcache.h: Ditto.
11430 * remote-utils.c: Ditto.
11431 * server.c: Ditto.
11432 * server.h: Ditto.
11433 * thread-db.c: Ditto.
11434 * tracepoint.c: Ditto.
11435 * utils.c: Ditto.
11436 * win32-low.h: Ditto.
11437
11438 2011-01-05 Joel Brobecker <brobecker@adacore.com>
11439
11440 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
11441 update.
11442
11443 2011-01-01 Joel Brobecker <brobecker@adacore.com>
11444
11445 * server.c (gdbserver_version): Update copyright year in version
11446 output.
11447 * gdbreplay.c (gdbreplay_version): Ditto.
11448
11449 2010-12-29 Jie Zhang <jie.zhang@analog.com>
11450
11451 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
11452 * linux-bfin-low.c: New file.
11453 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
11454 PT_DATA_ADDR for BFIN targets.
11455 * Makefile.in (SFILES): Add linux-bfin-low.c.
11456 (clean): Remove reg-bfin.c.
11457 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
11458 * README: Mention supported Blackfin targets.
11459
11460 2010-12-23 Mike Frysinger <vapier@gentoo.org>
11461
11462 * .gitignore: New file.
11463
11464 2010-11-16 Mike Frysinger <vapier@gentoo.org>
11465
11466 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
11467
11468 2010-10-22 Jie Zhang <jie@codesourcery.com>
11469
11470 * Makefile.in: Add FLAGS_TO_PASS variable.
11471 (install): Remove dependency of install-only and recursively
11472 invoke make for install-only.
11473
11474 2010-10-04 Doug Evans <dje@google.com>
11475
11476 * Makefile.in (uninstall): Use $(DESTDIR).
11477
11478 2010-09-24 Pedro Alves <pedro@codesourcery.com>
11479
11480 PR gdb/11842
11481
11482 * linux-x86-low.c (compat_siginfo_from_siginfo)
11483 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
11484 si_code is < 0. Check for si_code == SI_TIMER before checking for
11485 si_code < 0.
11486
11487 2010-09-13 Joel Brobecker <brobecker@adacore.com>
11488
11489 * lynx-i386-low.c: New file.
11490 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
11491
11492 2010-09-13 Joel Brobecker <brobecker@adacore.com>
11493
11494 * lynx-low.c (ptrace_request_to_str): Remove handling for
11495 request values that have been removed in LynxOS 5.x.
11496
11497 2010-09-13 Joel Brobecker <brobecker@adacore.com>
11498
11499 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
11500 <ptrace.h>
11501
11502 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
11503
11504 * configure.ac: Add --enable-inprocess-agent option.
11505 * configure: Rebuilt.
11506
11507 2010-09-06 Yao Qi <yao@codesourcery.com>
11508
11509 * linux-low.c (linux_kill): Remove unused variable.
11510 (linux_stabilize_threads): Likewise.
11511 * server.c (start_inferior): Likewise.
11512 (queue_stop_reply_callback): Likewise.
11513 * tracepoint.c (do_action_at_tracepoint): Likewise.
11514
11515 2010-09-06 Yao Qi <yao@codesourcery.com>
11516
11517 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
11518 on return.
11519
11520 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
11521
11522 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
11523
11524 2010-09-06 Pedro Alves <pedro@codesourcery.com>
11525
11526 * Makefile.in (install-only): Replace $IPA_DEPFILES with
11527 "$(IPA_DEPFILES)".
11528
11529 2010-09-01 Joel Brobecker <brobecker@adacore.com>
11530
11531 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
11532 gdbserver/lynx-ppc-low.c: New files.
11533 * Makefile.in (lynx_low_h): New variable.
11534 (lynx-low.o, lynx-ppc-low.o): New rules.
11535 * configure.ac: On LynxOS, link with -lnetinet.
11536 * configure.srv: Add handling of powerpc-*-lynxos* targets.
11537 * configure: regenerate.
11538
11539 2010-09-01 Joel Brobecker <brobecker@adacore.com>
11540
11541 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
11542 * configure.ac: Add check for vasprintf and vsnprintf.
11543 * configure, config.in: Regenerate.
11544 * server.h (vasprintf, vsnprintf): Add conditional declarations.
11545
11546 2010-09-01 Joel Brobecker <brobecker@adacore.com>
11547
11548 * gdbreplay.c: Move include of alloca.h up, next to include of
11549 malloc.h.
11550 * server.h: Add include of malloc.h.
11551 * mem-break.c: Remove include of malloc.h.
11552 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
11553
11554 2010-09-01 Joel Brobecker <brobecker@adacore.com>
11555
11556 * Makefile.in (memmem.o): Build with -Wno-error.
11557
11558 2010-09-01 Joel Brobecker <brobecker@adacore.com>
11559
11560 * utils.c (xsnprintf): Make non-static.
11561 * server.h: Add xsnprintf declaration.
11562 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
11563 replace calls to snprintf by calls to xsnprintf throughout.
11564
11565 2010-09-01 Joel Brobecker <brobecker@adacore.com>
11566
11567 * configure.ac: Add configure check for alloca.
11568 * configure, config.in: Regenerate.
11569 * server.h: Include alloca.h if it exists.
11570 * gdbreplay.c: Include alloca.h if it exists.
11571
11572 2010-08-28 Pedro Alves <pedro@codesourcery.com>
11573
11574 * linux-low.c (__SIGRTMIN): Define if not already defined.
11575 (linux_create_inferior): Check for __ANDROID__ rather than
11576 __SIGRTMIN.
11577 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
11578 are already deferred.
11579 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
11580 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
11581 stopped and already has a pending signal to report.
11582 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
11583 a pending signal to report or is moving out of a jump pad.
11584 (linux_init_signals): Check for __ANDROID__ rather than
11585 __SIGRTMIN.
11586
11587 2010-08-28 Pedro Alves <pedro@codesourcery.com>
11588
11589 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
11590 debug_threads check. Avoid a linear search when not doing debug
11591 output.
11592
11593 2010-08-27 Pedro Alves <pedro@codesourcery.com>
11594
11595 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
11596 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
11597 (struct file_handler) <fd>: Change type to gdb_fildes_t.
11598 (process_event): Change local fd's type to gdb_fildes_t.
11599 (create_file_handler): Adjust prototype.
11600 (delete_file_handler): Adjust prototype.
11601 (handle_file_event): Adjust prototype. Use pfildes.
11602 (create_file_event): Adjsut prototype.
11603 * remote-utils.c (remote_desc, listen_desc): Change type to
11604 gdb_fildes_t.
11605 * server.h: New gdb_fildes_t typedef.
11606 [USE_WIN32API]: Include winsock2.h.
11607 (delete_file_handler, add_file_handler): Adjust prototypes.
11608 (pfildes): Declare.
11609 * utils.c (pfildes): New.
11610
11611 2010-08-27 Pedro Alves <pedro@codesourcery.com>
11612
11613 * configure.ac (build_warnings): Add -Wno-char-subscripts.
11614 * configure: Regenerate.
11615
11616 2010-08-27 Pedro Alves <pedro@codesourcery.com>
11617
11618 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
11619 (linux_done_accessing_memory): ... this.
11620 (linux_target_ops): Adjust.
11621 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
11622 * nto-low.c (nto_target_ops): Adjust comment.
11623 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
11624 * spu-low.c (spu_target_ops): Adjust comment.
11625 * target.h (target_ops): Rename unprepare_to_access_memory field
11626 to done_accessing_memory.
11627 (unprepare_to_access_memory): Rename to ...
11628 (done_accessing_memory): ... this.
11629
11630 2010-08-26 Pedro Alves <pedro@codesourcery.com>
11631
11632 * linux-low.c (linux_prepare_to_access_memory): New.
11633 (linux_unprepare_to_access_memory): New.
11634 (linux_target_ops): Install them.
11635 * server.c (read_memory): Rename to ...
11636 (gdb_read_memory): ... this. Use
11637 prepare_to_access_memory/prepare_to_access_memory.
11638 (write_memory): Rename to ...
11639 (gdb_write_memory): ... this. Use
11640 prepare_to_access_memory/prepare_to_access_memory.
11641 (handle_search_memory_1): Adjust.
11642 (process_serial_event): Adjust.
11643 * target.h (struct target_ops): New fields
11644 prepare_to_access_memory and unprepare_to_access_memory.
11645 (prepare_to_access_memory, unprepare_to_access_memory): New.
11646 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
11647 prepare_to_access_memory/prepare_to_access_memory.
11648 * nto-low.c (nto_target_ops): Adjust.
11649 * spu-low.c (spu_target_ops): Adjust.
11650 * win32-low.c (win32_target_ops): Adjust.
11651
11652 2010-08-26 Pedro Alves <pedro@codesourcery.com>
11653
11654 * Makefile.in (WARN_CFLAGS): Get it from configure.
11655 (WERROR_CFLAGS): New.
11656 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
11657 * configure.ac: Introduce --enable-werror, which adds -Werror to
11658 the compiler command line. Enabled by default. Disable with
11659 --disable-werror. Add -Wdeclaration-after-statement
11660 Wpointer-arith and -Wformat-nonliteral to warning flags.
11661 * configure: Regenerate.
11662
11663 2010-08-26 Pedro Alves <pedro@codesourcery.com>
11664
11665 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
11666
11667 2010-08-26 Pedro Alves <pedro@codesourcery.com>
11668
11669 * gdbreplay.c (remote_error): New.
11670 (gdbchar): New.
11671 (expect): Use gdbchar. Check for error reading from GDB.
11672 Clarify sync error output.
11673 (play): Check for errors writing to GDB.
11674 * linux-low.c (sigchld_handler): Really ignore `write' errors.
11675 * remote-utils.c (getpkt): Check for errors writing to the remote
11676 descriptor.
11677
11678 2010-08-25 Pedro Alves <pedro@codesourcery.com>
11679
11680 * linux-low.c (linux_wait_1): Move non-debugging code out of
11681 `debug_threads' control.
11682
11683 2010-08-25 Pedro Alves <pedro@codesourcery.com>
11684
11685 * linux-low.c (linux_wait_1): Don't set last_status here.
11686 * server.c (push_event, queue_stop_reply_callback): Assert we're
11687 not pushing a TARGET_WAITKIND_IGNORE event.
11688 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
11689 (myresume, handle_target_event): Set the thread's last_resume_kind
11690 and last_status from the target returned status.
11691
11692 2010-08-25 Pedro Alves <pedro@codesourcery.com>
11693
11694 PR threads/10729
11695
11696 * linux-x86-low.c (update_debug_registers_callback): New.
11697 (i386_dr_low_set_addr): Use it.
11698 (i386_dr_low_get_addr): New.
11699 (i386_dr_low_set_control): Use update_debug_registers_callback.
11700 (i386_dr_low_get_control): New.
11701 (i386_dr_low_get_status): Adjust.
11702 * linux-low.c (linux_stop_lwp): New.
11703 * linux-low.h (linux_stop_lwp): Declare.
11704
11705 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
11706 argument instead of a i386_debug_reg_state.
11707 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
11708 a i386_debug_reg_state.
11709 (i386_insert_aligned_watchpoint): Adjust.
11710 (i386_remove_aligned_watchpoint): Adjust.
11711 (i386_low_stopped_data_address): Read the debug registers from the
11712 inferior instead of from the mirrors.
11713 * i386-low.h (struct i386_debug_reg_state): Extend comment.
11714 (i386_dr_low_get_addr): Declare.
11715 (i386_dr_low_get_control): Declare.
11716 (i386_dr_low_get_status): Change prototype.
11717
11718 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
11719 (i386_dr_low_get_addr): New.
11720 (i386_dr_low_get_control): New.
11721 (i386_dr_low_get_status): Adjust prototype. Return
11722 dr_status_mirror.
11723 (i386_initial_stuff): Clear dr_status_mirror and
11724 dr_control_mirror.
11725 (i386_get_thread_context): Adjust.
11726 (i386_set_thread_context): Adjust.
11727 (i386_thread_added): Adjust.
11728
11729 2010-08-24 Pedro Alves <pedro@codesourcery.com>
11730
11731 * linux-low.h (linux_thread_area): Delete declaration.
11732
11733 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
11734
11735 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
11736 after its termination.
11737
11738 2010-08-09 Pedro Alves <pedro@codesourcery.com>
11739
11740 * linux-low.c (gdb_wants_lwp_stopped): Delete.
11741 (gdb_wants_all_stopped): Delete.
11742 (linux_wait_1): Don't call them.
11743 * server.c (handle_v_cont): Tag all threads as want-stopped.
11744 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
11745 stopped as "client-wants-stopped".
11746
11747 2010-07-31 Pedro Alves <pedro@codesourcery.com>
11748
11749 * Makefile.in (signals_h): New.
11750 (server_h): Depend on it.
11751 (server.o): Don't depend on $(signals_def).
11752 (signals.o): Depend on $(signals_def).
11753
11754 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
11755
11756 * Makefile.in (signals_def): New.
11757 (server_h): Append include/gdb/signals.h and signals_def.
11758 (server.o): Append signals_def.
11759
11760 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
11761
11762 * server.c (handle_target_event): Use target_signal_to_host for
11763 resume_info.sig initialization.
11764 * target.h (struct thread_resume) <sig>: New comment.
11765
11766 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
11767
11768 * server.c (handle_query): strcpy() the returned string from paddress()
11769 instead of sprintf().
11770 * utils.c (paddress): Return phex_nz().
11771
11772 2010-07-07 Joel Brobecker <brobecker@adacore.com>
11773
11774 * server.c (handle_v_cont): Call mourn_inferior if process
11775 just exited.
11776 (myresume): Likewise.
11777
11778 2010-07-01 Pedro Alves <pedro@codesourcery.com>
11779
11780 Static tracepoints, and integration with UST.
11781
11782 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
11783 * mem-break.c (uninsert_all_breakpoints)
11784 (reinsert_all_breakpoints): New.
11785 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
11786 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
11787 (gdb_agent_ust_loaded, helper_thread_id)
11788 (gdb_agent_helper_thread_id): New macros.
11789 (struct ipa_sym_addresses): Add addr_ust_loaded,
11790 addr_helper_thread_id, addr_cmd_buf.
11791 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
11792 (in_process_agent_loaded_ust): New.
11793 (write_e_ust_not_loaded): New.
11794 (maybe_write_ipa_ust_not_loaded): New.
11795 (struct collect_static_trace_data_action): New.
11796 (enum tracepoint_type) <static_tracepoint>: New.
11797 (struct tracepoint) <handle>: Mention static tracepoints.
11798 (struct static_tracepoint_ctx): New.
11799 (CMD_BUF_SIZE): New.
11800 (add_tracepoint_action): Handle static tracepoint actions.
11801 (unprobe_marker_at): New.
11802 (clear_installed_tracepoints): Handle static tracepoints.
11803 (cmd_qtdp): Handle static tracepoints.
11804 (probe_marker_at): New.
11805 (cmd_qtstart): Handle static tracepoints.
11806 (response_tracepoint): Handle static tracepoints.
11807 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
11808 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
11809 (get_context_regcache): Handle static tracepoints.
11810 (do_action_at_tracepoint): Handle static tracepoint actions.
11811 (traceframe_find_block_type): Handle static trace data blocks.
11812 (traceframe_read_sdata): New.
11813 (download_tracepoints): Download static tracepoint actions.
11814 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
11815 (GDB_PROBE_NAME): New.
11816 (ust_ops): New.
11817 (GET_UST_SYM): New.
11818 (USTF): New.
11819 (dlsym_ust): New.
11820 (ust_marker_to_static_tracepoint): New.
11821 (gdb_probe): New.
11822 (collect_ust_data_at_tracepoint): New.
11823 (gdb_ust_probe): New.
11824 (UNIX_PATH_MAX, SOCK_DIR): New.
11825 (gdb_ust_connect_sync_socket): New.
11826 (resume_thread, stop_thread): New.
11827 (run_inferior_command): New.
11828 (init_named_socket): New.
11829 (gdb_ust_socket_init): New.
11830 (cstr_to_hexstr): New.
11831 (next_st): New.
11832 (first_marker, next_marker): New.
11833 (response_ust_marker): New.
11834 (cmd_qtfstm, cmd_qtsstm): New.
11835 (unprobe_marker_at, probe_marker_at): New.
11836 (cmd_qtstmat, gdb_ust_thread): New.
11837 (gdb_ust_init): New.
11838 (initialize_tracepoint_ftlib): Call gdb_ust_init.
11839 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
11840 (ST_REGENTRY): New.
11841 (x86_64_st_collect_regmap): New.
11842 (X86_64_NUM_ST_COLLECT_GREGS): New.
11843 (AMD64_RIP_REGNUM): New.
11844 (supply_static_tracepoint_registers): New.
11845 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
11846 (ST_REGENTRY): New.
11847 (i386_st_collect_regmap): New.
11848 (i386_NUM_ST_COLLECT_GREGS): New.
11849 (supply_static_tracepoint_registers): New.
11850 * server.c (handle_query): Handle qXfer:statictrace:read.
11851 <qSupported>: Report support for StaticTracepoints, and
11852 qXfer:statictrace:read features.
11853 * server.h (traceframe_read_sdata)
11854 (supply_static_tracepoint_registers): Declare.
11855 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
11856 (unpack_varlen_hex): Include in IPA build.
11857 * Makefile.in (ustlibs, ustinc): New.
11858 (IPA_OBJS): Add remote-utils-ipa.o.
11859 ($(IPA_LIB)): Link -ldl and -lpthread.
11860 (UST_CFLAGS): New.
11861 (IPAGENT_CFLAGS): Add UST_CFLAGS.
11862 * config.in, configure: Regenerate.
11863
11864 2010-06-20 Ian Lance Taylor <iant@google.com>
11865 Pedro Alves <pedro@codesourcery.com>
11866
11867 * linux-x86-low.c (always_true): Delete.
11868 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
11869 trying to fool the compiler with always_true.
11870
11871 2010-06-20 Pedro Alves <pedro@codesourcery.com>
11872
11873 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
11874 conditions in gdbserver.
11875
11876 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
11877
11878 * spu-low.c (spu_read_memory): Wrap around local store limit.
11879 (spu_write_memory): Likewise.
11880
11881 2010-06-15 Pedro Alves <pedro@codesourcery.com>
11882
11883 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
11884 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
11885 LONGEST uses.
11886 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
11887 uses.
11888 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
11889 uses with LONGEST uses.
11890
11891 2010-06-14 Stan Shebs <stan@codesourcery.com>
11892 Pedro Alves <pedro@codesourcery.com>
11893
11894 Bytecode compiler.
11895
11896 * linux-x86-low.c: Include limits.h.
11897 (add_insns): New.
11898 (always_true): New.
11899 (EMIT_ASM): New.
11900 (EMIT_ASM32): New.
11901 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
11902 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
11903 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
11904 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
11905 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
11906 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
11907 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
11908 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
11909 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
11910 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
11911 (amd64_emit_void_call_2): New.
11912 (amd64_emit_ops): New.
11913 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
11914 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
11915 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
11916 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
11917 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
11918 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
11919 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
11920 (i386_emit_call, i386_emit_reg, i386_emit_pop)
11921 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
11922 (i386_emit_stack_adjust, i386_emit_int_call_1)
11923 (i386_emit_void_call_2): New.
11924 (i386_emit_ops): New.
11925 (x86_emit_ops): New.
11926 (the_low_target): Install x86_emit_ops.
11927 * server.h (struct emit_ops): New.
11928 (get_raw_reg_func_addr): Declare.
11929 (current_insn_ptr, emit_error): Declare.
11930 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
11931 (set_trace_state_variable_value): New defines.
11932 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
11933 addr_get_trace_state_variable_value and
11934 addr_set_trace_state_variable_value.
11935 (symbol_list): New fields for get_raw_reg,
11936 get_trace_state_variable_value and set_trace_state_variable_value.
11937 (condfn): New typedef.
11938 (struct tracepoint): New field `compiled_cond'.
11939 (do_action_at_tracepoint): Clear compiled_cond.
11940 (get_trace_state_variable_value, set_trace_state_variable_value):
11941 Export in the IPA.
11942 (condition_true_at_tracepoint): If there's a compiled condition,
11943 run that.
11944 (current_insn_ptr, emit_error): New globals.
11945 (struct bytecode_address): New.
11946 (get_raw_reg_func_addr): New.
11947 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
11948 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
11949 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
11950 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
11951 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
11952 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
11953 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
11954 (compile_tracepoint_condition, compile_bytecodes): New.
11955 * target.h (emit_ops): Forward declare.
11956 (struct target_ops): New field emit_ops.
11957 (target_emit_ops): New.
11958 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
11959 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
11960 * linux-low.c (linux_emit_ops): New.
11961 (linux_target_ops): Install it.
11962 * linux-low.h (struct linux_target_ops): New field emit_ops.
11963
11964 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
11965
11966 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
11967 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
11968
11969 2010-06-01 Pedro Alves <pedro@codesourcery.com>
11970 Stan Shebs <stan@codesourcery.com>
11971
11972 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
11973 (all): Depend on $(extra_libraries).
11974 (install-only): Install the IPA.
11975 (IPA_OBJS, IPA_LIB): New.
11976 (clean): Remove the IPA lib.
11977 (IPAGENT_CFLAGS): New.
11978 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
11979 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
11980 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
11981 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
11982 * configure.ac: Check for atomic builtins support in the compiler.
11983 (IPA_DEPFILES, extra_libraries): Define.
11984 * configure.srv (ipa_obj): Add description.
11985 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
11986 (i[34567]86-*-linux*): Set ipa_obj.
11987 (x86_64-*-linux*): Set ipa_obj.
11988 * linux-low.c (stabilizing_threads): New.
11989 (supports_fast_tracepoints): New.
11990 (linux_detach): Stabilize threads before detaching.
11991 (handle_tracepoints): Handle internal tracing breakpoints. Assert
11992 the lwp is either not stabilizing, or is moving out of a jump pad.
11993 (linux_fast_tracepoint_collecting): New.
11994 (maybe_move_out_of_jump_pad): New.
11995 (enqueue_one_deferred_signal): New.
11996 (dequeue_one_deferred_signal): New.
11997 (linux_wait_for_event_1): If moving out of a jump pad, defer
11998 pending signals to later.
11999 (linux_stabilize_threads): New.
12000 (linux_wait_1): Check if threads need moving out of jump pads, and
12001 do it if so.
12002 (stuck_in_jump_pad_callback): New.
12003 (move_out_of_jump_pad_callback): New.
12004 (lwp_running): New.
12005 (linux_resume_one_lwp): Handle moving out of jump pads.
12006 (linux_set_resume_request): Dequeue deferred signals.
12007 (need_step_over_p): Also step over fast tracepoint jumps.
12008 (start_step_over): Also uninsert fast tracepoint jumps.
12009 (finish_step_over): Also reinsert fast tracepoint jumps.
12010 (linux_install_fast_tracepoint_jump): New.
12011 (linux_target_ops): Install linux_stabilize_threads and
12012 linux_install_fast_tracepoint_jump_pad.
12013 * linux-low.h (linux_target_ops) <get_thread_area,
12014 install_fast_tracepoint_jump_pad>: New fields.
12015 (struct lwp_info) <collecting_fast_tracepoint,
12016 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
12017 (linux_get_thread_area): Declare.
12018 * linux-x86-low.c (jump_insn): New.
12019 (x86_get_thread_area): New.
12020 (append_insns): New.
12021 (push_opcode): New.
12022 (amd64_install_fast_tracepoint_jump_pad): New.
12023 (i386_install_fast_tracepoint_jump_pad): New.
12024 (x86_install_fast_tracepoint_jump_pad): New.
12025 (the_low_target): Install x86_get_thread_area and
12026 x86_install_fast_tracepoint_jump_pad.
12027 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
12028 (struct fast_tracepoint_jump): New.
12029 (fast_tracepoint_jump_insn): New.
12030 (fast_tracepoint_jump_shadow): New.
12031 (find_fast_tracepoint_jump_at): New.
12032 (fast_tracepoint_jump_here): New.
12033 (delete_fast_tracepoint_jump): New.
12034 (set_fast_tracepoint_jump): New.
12035 (uninsert_fast_tracepoint_jumps_at): New.
12036 (reinsert_fast_tracepoint_jumps_at): New.
12037 (set_breakpoint_at): Use write_inferior_memory.
12038 (uninsert_raw_breakpoint): Use write_inferior_memory.
12039 (check_mem_read): Mask out fast tracepoint jumps.
12040 (check_mem_write): Mask out fast tracepoint jumps.
12041 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
12042 (set_fast_tracepoint_jump): Declare.
12043 (delete_fast_tracepoint_jump)
12044 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
12045 (reinsert_fast_tracepoint_jumps_at): Declare.
12046 * regcache.c: Don't compile many functions when building the
12047 in-process agent library.
12048 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
12049 the register buffer in the heap.
12050 (free_register_cache): If the register buffer isn't owned by the
12051 regcache, don't free it.
12052 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
12053 pre-existing register caches.
12054 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
12055 type.
12056 (convert_ascii_to_int): : Constify `from' parameter type.
12057 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
12058 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
12059 the needed buffer in-place.
12060 (relocate_instruction): New.
12061 * server.c (handle_query) <qSymbols>: If the target supports
12062 tracepoints, give it a chance of looking up symbols. Report
12063 support for fast tracepoints.
12064 (handle_status): Stabilize threads.
12065 (process_serial_event): Adjust.
12066 * server.h (struct fast_tracepoint_jump): Forward declare.
12067 (struct process_info) <fast_tracepoint_jumps>: New field.
12068 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
12069 (decode_X_packet, decode_M_packet): Adjust.
12070 (relocate_instruction): Declare.
12071 (in_process_agent_loaded): Declare.
12072 (tracepoint_look_up_symbols): Declare.
12073 (struct fast_tpoint_collect_status): Declare.
12074 (fast_tracepoint_collecting): Declare.
12075 (force_unlock_trace_buffer): Declare.
12076 (handle_tracepoint_bkpts): Declare.
12077 (initialize_low_tracepoint)
12078 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
12079 * target.h (struct target_ops) <stabilize_threads,
12080 install_fast_tracepoint_jump_pad>: New fields.
12081 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
12082 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
12083 [HAVE_STDINT_H]: Include stdint.h.
12084 (trace_debug_1): Rename to ...
12085 (trace_vdebug): ... this.
12086 (trace_debug): Rename to ...
12087 (trace_debug_1): ... this. Add `level' parameter.
12088 (trace_debug): New.
12089 (ATTR_USED, ATTR_NOINLINE): New.
12090 (IP_AGENT_EXPORT): New.
12091 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
12092 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
12093 (about_to_request_buffer_space, trace_buffer_is_full)
12094 (stopping_tracepoint, expr_eval_result, error_tracepoint)
12095 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
12096 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
12097 (traceframe_write_count, traceframes_created)
12098 (trace_state_variables)
12099 New renaming defines.
12100 (struct ipa_sym_addresses): New.
12101 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
12102 (symbol_list): New.
12103 (ipa_sym_addrs): New.
12104 (all_tracepoint_symbols_looked_up): New.
12105 (in_process_agent_loaded): New.
12106 (write_e_ipa_not_loaded): New.
12107 (maybe_write_ipa_not_loaded): New.
12108 (tracepoint_look_up_symbols): New.
12109 (debug_threads) [IN_PROCESS_AGENT]: New.
12110 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
12111 (UNKNOWN_SIDE_EFFECTS): New.
12112 (stop_tracing): New.
12113 (flush_trace_buffer): New.
12114 (stop_tracing_bkpt): New.
12115 (flush_trace_buffer_bkpt): New.
12116 (read_inferior_integer): New.
12117 (read_inferior_uinteger): New.
12118 (read_inferior_data_pointer): New.
12119 (write_inferior_data_pointer): New.
12120 (write_inferior_integer): New.
12121 (write_inferior_uinteger): New.
12122 (struct collect_static_trace_data_action): Delete.
12123 (enum tracepoint_type): New.
12124 (struct tracepoint) <type>: New field `type'.
12125 <actions_str, step_actions, step_actions_str>: Only include in
12126 GDBserver.
12127 <orig_size, obj_addr_on_target, adjusted_insn_addr>
12128 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
12129 (tracepoints): Use IP_AGENT_EXPORT.
12130 (last_tracepoint): Don't include in the IPA.
12131 (stopping_tracepoint): Use IP_AGENT_EXPORT.
12132 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
12133 (alloced_trace_state_variables): New.
12134 (trace_state_variables): Use IP_AGENT_EXPORT.
12135 (traceframe_t): Delete unused variable.
12136 (circular_trace_buffer): Don't include in the IPA.
12137 (trace_buffer_start): Delete.
12138 (struct trace_buffer_control): New.
12139 (trace_buffer_free): Delete.
12140 (struct ipa_trace_buffer_control): New.
12141 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
12142 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
12143 New.
12144 (trace_buffer_ctrl): New.
12145 (TRACE_BUFFER_CTRL_CURR): New.
12146 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
12147 Reimplement as macros.
12148 (trace_buffer_wrap): Delete.
12149 (traceframe_write_count, traceframe_read_count)
12150 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
12151 (struct tracepoint_hit_ctx) <type>: New field.
12152 (struct fast_tracepoint_ctx): New.
12153 (memory_barrier): New.
12154 (cmpxchg): New.
12155 (record_tracepoint_error): Update atomically in the IPA.
12156 (clear_inferior_trace_buffer): New.
12157 (about_to_request_buffer_space): New.
12158 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
12159 updating the same buffer.
12160 (add_tracepoint): Default the tracepoint's type to trap
12161 tracepoint, and orig_size to -1.
12162 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
12163 internal variables.
12164 (create_trace_state_variable): New parameter `gdb'. Handle it.
12165 (clear_installed_tracepoints): Clear fast tracepoint jumps.
12166 (cmd_qtdp): Handle fast tracepoints.
12167 (cmd_qtdv): Adjust.
12168 (max_jump_pad_size): New.
12169 (gdb_jump_pad_head): New.
12170 (get_jump_space_head): New.
12171 (claim_jump_space): New.
12172 (sort_tracepoints): New.
12173 (MAX_JUMP_SIZE): New.
12174 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
12175 IPA.
12176 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
12177 support. Upload fast traceframes, and delete internal IPA
12178 breakpoints.
12179 (stop_tracing_handler): New.
12180 (flush_trace_buffer_handler): New.
12181 (cmd_qtstop): Upload fast tracepoints.
12182 (response_tracepoint): Handle fast tracepoints.
12183 (tracepoint_finished_step): Upload fast traceframes. Set the
12184 tracepoint hit context's tracepoint type.
12185 (handle_tracepoint_bkpts): New.
12186 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
12187 type. Add comment about fast tracepoints.
12188 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
12189 non-existing action_str field.
12190 (get_context_regcache): Handle fast tracepoints.
12191 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
12192 to the regcache.
12193 (fast_tracepoint_from_jump_pad_address): New.
12194 (fast_tracepoint_from_ipa_tpoint_address): New.
12195 (collecting_t): New.
12196 (force_unlock_trace_buffer): New.
12197 (fast_tracepoint_collecting): New.
12198 (collecting): New.
12199 (gdb_collect): New.
12200 (write_inferior_data_ptr): New.
12201 (target_tp_heap): New.
12202 (target_malloc): New.
12203 (download_agent_expr): New.
12204 (UALIGN): New.
12205 (download_tracepoints): New.
12206 (download_trace_state_variables): New.
12207 (upload_fast_traceframes): New.
12208 (IPA_FIRST_TRACEFRAME): New.
12209 (IPA_NEXT_TRACEFRAME_1): New.
12210 (IPA_NEXT_TRACEFRAME): New.
12211 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
12212 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
12213 (gdb_jump_pad_buffer_end): New.
12214 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
12215 (initialize_tracepoint): Adjust.
12216 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
12217 buffer. Initialize the low module.
12218 * utils.c (PREFIX, TOOLNAME): New.
12219 (malloc_failure): Use PREFIX.
12220 (error): In the IPA, an error causes an exit.
12221 (fatal, warning): Use PREFIX.
12222 (internal_error): Use TOOLNAME.
12223 (NUMCELLS): Increase to 10.
12224 * configure, config.in: Regenerate.
12225
12226 2010-06-01 Pedro Alves <pedro@codesourcery.com>
12227
12228 * server.c (handle_query) <qSupported>: Do two passes over the
12229 qSupported string to avoid nesting strtok.
12230
12231 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
12232
12233 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
12234 (CDEPS): New.
12235 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
12236 -Wl,--dynamic-list.
12237 * configure: Regenerate.
12238 * proc-service.list: New.
12239
12240 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
12241
12242 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
12243 New comment.
12244
12245 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
12246
12247 * gdbreplay.c (remote_open): Check error return from socket() call by
12248 its equality to -1 not by it being negative.
12249 * remote-utils.c (remote_open): Likewise.
12250
12251 2010-05-23 Pedro Alves <pedro@codesourcery.com>
12252
12253 * config.h: Regenerate.
12254
12255 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
12256
12257 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
12258 doesn't provide PTRACE_GET_THREAD_AREA.
12259
12260 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
12261
12262 * linux-m68k-low.c: Include <asm/ptrace.h>
12263 (ps_get_thread_area): Implement.
12264
12265 2010-05-03 Doug Evans <dje@google.com>
12266
12267 * event-loop.c (struct callback_event): New struct.
12268 (callback_list): New global.
12269 (append_callback_event, delete_callback_event): New functions.
12270 (process_callback): New function.
12271 (start_event_loop): Call it.
12272 * remote-utils.c (NOT_SCHEDULED): Define.
12273 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
12274 moved out of readchar.
12275 (readchar): Rewrite. Call reschedule before returning.
12276 (reset_readchar): New function.
12277 (remote_close): Call it.
12278 (process_remaining, reschedule): New functions.
12279 * server.h (callback_handler_func): New typedef.
12280 (append_callback_event, delete_callback_event): Declare.
12281
12282 2010-05-03 Pedro Alves <pedro@codesourcery.com>
12283
12284 * proc-service.c (ps_pglobal_lookup): Use
12285 thread_db_look_up_one_symbol.
12286 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
12287 parameter. Use it instead of all_symbols_looked_up.
12288 * server.h (struct process_info) <all_symbols_looked_up>: Delete
12289 field.
12290 (all_symbols_looked_up): Don't declare.
12291 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
12292 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
12293 field.
12294 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
12295 Set all_symbols_looked_up here.
12296 (thread_db_look_up_one_symbol): New.
12297 (thread_db_get_tls_address): Adjust.
12298 (thread_db_load_search, try_thread_db_load_1): Always allocate the
12299 thread_db object on the heap, and tentatively set it in the
12300 process structure.
12301 (thread_db_init): Don't set all_symbols_looked_up here.
12302 * linux-low.h (thread_db_look_up_one_symbol): Declare.
12303
12304 2010-05-03 Pedro Alves <pedro@codesourcery.com>
12305
12306 * linux-low.c (linux_kill, linux_detach): Adjust.
12307 (status_pending_p_callback): Remove redundant statement. Check
12308 for !TARGET_WAITIKIND_IGNORE, instead of
12309 TARGET_WAITKIND_STOPPED.
12310 (handle_tracepoints): Make sure LWP is locked. Adjust.
12311 (linux_wait_for_event_1): Adjust.
12312 (linux_cancel_breakpoints): New.
12313 (unsuspend_one_lwp): New.
12314 (unsuspend_all_lwps): New.
12315 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
12316 (send_sigstop_callback): Change return type to int, add new
12317 `except' parameter and handle it.
12318 (suspend_and_send_sigstop_callback): New.
12319 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
12320 pass them down. If SUSPEND, also increment the lwp's suspend
12321 count.
12322 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
12323 (need_step_over_p): Don't consider suspended LWPs.
12324 (start_step_over): Adjust.
12325 (proceed_one_lwp): Change return type to int, add new `except'
12326 parameter and handle it.
12327 (unsuspend_and_proceed_one_lwp): New.
12328 (proceed_all_lwps): Use find_inferior instead of
12329 for_each_inferior.
12330 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
12331 also decrement the suspend count of LWPs. Pass `except' down,
12332 instead of hacking its suspend count.
12333 (linux_pause_all): Add `freeze' parameter. Adjust.
12334 (linux_unpause_all): New.
12335 (linux_target_ops): Install linux_unpause_all.
12336 * server.c (handle_status): Adjust.
12337 * target.h (struct target_ops): New fields `unpause_all' and
12338 `cancel_breakpoints'. Add new parameter to `pause_all'.
12339 (pause_all): Add new `freeze' parameter.
12340 (unpause_all): New.
12341 (cancel_breakpoints): New.
12342 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
12343 cancel breakpoints.
12344 (cmd_qtstart): Pause threads.
12345 (stop_tracing): Pause threads, and cancel breakpoints.
12346 * win32-low.c (win32_target_ops): Adjust.
12347
12348 2010-05-03 Pedro Alves <pedro@codesourcery.com>
12349
12350 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
12351 the inferior right away from here...
12352 (linux_wait_1): ... to here, and adjust to check the thread's
12353 last_resume_kind instead of the lwp's step or stop_expected flags.
12354
12355 2010-05-02 Pedro Alves <pedro@codesourcery.com>
12356
12357 * README: Use consistent `GDB' and `GDBserver' spellings.
12358
12359 2010-05-02 Pedro Alves <pedro@codesourcery.com>
12360
12361 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
12362 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
12363 (linux_detach_one_lwp): Assume the lwp is stopped.
12364 (any_thread_of): Delete.
12365 (linux_detach): Stop all lwps here. Don't blindly delete all
12366 breakpoints.
12367 (delete_lwp_callback): New.
12368 (linux_mourn): Delete all lwps of the process that is gone.
12369 (linux_wait_1): Don't delete the last lwp of the process here.
12370 * mem-break.h (mark_breakpoints_out): Declare.
12371 * mem-break.c (mark_breakpoints_out): New.
12372 (free_all_breakpoints): Use it.
12373 * server.c (handle_target_event): If the process is gone, mark
12374 breakpoints out.
12375 * thread-db.c (struct thread_db) <create_bp>: New field.
12376 (thread_db_enable_reporting): Fix prototype. Store a thread event
12377 breakpoint reference in the thread_db struct.
12378 (thread_db_load_search): Clear the thread_db object.
12379 (try_thread_db_load_1): Ditto.
12380 (switch_to_process): New.
12381 (disable_thread_event_reporting): Use it.
12382 (remove_thread_event_breakpoints): New.
12383 (thread_db_detach, thread_db_mourn): Use it.
12384
12385 2010-05-01 Pedro Alves <pedro@codesourcery.com>
12386
12387 * linux-low.c (linux_enable_event_reporting): New.
12388 (linux_wait_for_event_1, handle_extended_wait): Use it.
12389
12390 2010-04-30 Pedro Alves <pedro@codesourcery.com>
12391
12392 * linux-low.c (linux_kill_one_lwp, linux_kill)
12393 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
12394 (send_sigstop): Take an lwp_info as parameter instead. Queue a
12395 SIGSTOP even if the LWP is stopped.
12396 (send_sigstop_callback): New.
12397 (stop_all_lwps): Use send_sigstop_callback instead.
12398 (linux_resume_one_thread): Adjust.
12399 (proceed_one_lwp): Still proceed an LWP that the client has
12400 requested to stop, if we haven't reported it as stopped yet. Make
12401 sure that LWPs the client want stopped, have a pending SIGSTOP.
12402
12403 2010-04-26 Doug Evans <dje@google.com>
12404
12405 * server.c (handle_general_set): Make static.
12406
12407 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
12408 Print received char after testing for error/eof instead of before.
12409 (input_interrupt): Tweak comment.
12410
12411 2010-04-23 Doug Evans <dje@google.com>
12412
12413 * server.c (start_inferior): Print inferior argv if --debug.
12414
12415 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
12416
12417 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
12418 * nto-x86-low.c: Include server.h
12419
12420 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
12421
12422 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
12423 be consistent with other sources of this directory.
12424 (init_registers_amd64): Correct name of source file of this function
12425 in the comment.
12426
12427 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12428
12429 * configure.srv (x86_64-*-mingw*): New configuration for Windows
12430 64-bit executables.
12431
12432 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12433
12434 * win32-i386-low.c: Add 64-bit support.
12435 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
12436 (init_registers_amd64): Declare.
12437 (mappings): Add 64-bit version of array.
12438 (init_windows_x86): New function.
12439 (the_low_target): Change init_arch field to init_windows_x86.
12440
12441 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12442
12443 * win32-low.c: Adapt to support also 64-bit architecture.
12444 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
12445 (get_image_name): Use SIZE_T type for local variable `done'.
12446 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
12447 (toolhelp_get_dll_name): Idem.
12448 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
12449 Use uintptr_t typecast to avoid warning.
12450 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
12451 (handle_exception): Use phex_nz to avoid warning.
12452 (win32_wait): Remove unused local variable `process'.
12453
12454 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12455
12456 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
12457 `amd64-avx.o'.
12458
12459 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
12460
12461 * configure.ac: Use `ws2_32' library for srv_mingw.
12462 * configure: Regenerate.
12463 * gdbreplay.c: Include winsock2.h instead of winsock.h.
12464 * remote-utils.c: Likewise.
12465
12466 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
12467
12468 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
12469 if __x86_64__ is defined.
12470
12471 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
12472
12473 * configure: Regenerate.
12474
12475 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
12476
12477 * server.c (handle_query): Handle 'qGetTIBAddr' query.
12478 * target.h (target_ops): New get_tib_address field.
12479 * win32-low.h (win32_thread_info): Add thread_local_base field.
12480 * win32-low.c (child_add_thread): Add tlb argument.
12481 Set thread_local_base field to TLB.
12482 (get_child_debug_event): Adapt to child_add_thread change.
12483 (win32_get_tib_address): New function.
12484 (win32_target_ops): Set get_tib_address field to
12485 win32_get_tib_address.
12486 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
12487
12488 2010-04-12 Pedro Alves <pedro@codesourcery.com>
12489
12490 * linux-low.c (linux_mourn): Also remove the process.
12491 * server.c (handle_target_event): Don't remove the process here.
12492 * nto-low.c (nto_mourn): New.
12493 (nto_target_ops): Install it.
12494 * spu-low.c (spu_mourn): New.
12495 (spu_target_ops): Install it.
12496 * win32-low.c (win32_mourn): New.
12497 (win32_target_ops): Install it.
12498
12499 2010-04-12 Pedro Alves <pedro@codesourcery.com>
12500
12501 * server.h (buffer_xml_printf): Remove redundant `;'.
12502
12503 2010-04-12 Pedro Alves <pedro@codesourcery.com>
12504
12505 * regcache.c (set_register_cache): Invalidate regcaches before
12506 changing the register cache layout.
12507 (regcache_invalidate_one): Allow a NULL regcache.
12508 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
12509 regcaches before changing the register cache layout or the target
12510 regsets.
12511
12512 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
12513
12514 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
12515 variable warning on Linux/x86-64.
12516
12517 2010-04-11 Pedro Alves <pedro@codesourcery.com>
12518
12519 GDBserver disconnected tracing support.
12520
12521 * linux-low.c (linux_remove_process): Delete.
12522 (add_lwp): Don't set last_resume_kind here.
12523 (linux_kill): Use `mourn'.
12524 (linux_detach): Use `thread_db_detach', and `mourn'.
12525 (linux_mourn): New.
12526 (linux_attach_lwp_1): Adjust comment.
12527 (linux_attach): last_resume_kind moved the thread_info; adjust.
12528 (status_pending_p_callback): Adjust.
12529 (linux_wait_for_event_1): Adjust.
12530 (count_events_callback, select_singlestep_lwp_callback)
12531 (select_event_lwp_callback, cancel_breakpoints_callback)
12532 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
12533 (proceed_one_lwp): Adjust.
12534 (linux_async): Add debug output.
12535 (linux_thread_stopped): New.
12536 (linux_pause_all): New.
12537 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
12538 linux_pause_all.
12539 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
12540 (thread_db_free): Delete declaration.
12541 (thread_db_detach, thread_db_mourn): Declare.
12542 * thread-db.c (thread_db_init): Use thread_db_mourn.
12543 (thread_db_free): Delete, split in two.
12544 (disable_thread_event_reporting): New.
12545 (thread_db_detach): New.
12546 (thread_db_mourn): New.
12547
12548 * server.h (struct thread_info) <last_resume_kind>: New field.
12549 <attached>: Add comment.
12550 <gdb_detached>: New field.
12551 (handler_func): Change return type to int.
12552 (handle_serial_event, handle_target_event): Ditto.
12553 (gdb_connected): Declare.
12554 (tracing): Delete.
12555 (disconnected_tracing): Declare.
12556 (stop_tracing): Declare.
12557
12558 * server.c (handle_query) <qSupported>: Report support for
12559 disconnected tracing.
12560 (queue_stop_reply_callback): Account for running threads.
12561 (gdb_wants_thread_stopped): New.
12562 (gdb_wants_all_threads_stopped): New.
12563 (gdb_reattached_process): New.
12564 (handle_status): Clear the `gdb_detached' flag of all processes.
12565 In all-stop, stop all threads.
12566 (main): Be sure to leave tfind mode. Handle disconnected tracing.
12567 (process_serial_event): If the remote connection breaks, or if an
12568 exit was forced with "monitor exit", force an event loop exit.
12569 Handle disconnected tracing on detach.
12570 (handle_serial_event): Adjust.
12571 (handle_target_event): If GDB isn't connected, forward events back
12572 to the inferior, unless the last process exited, in which case,
12573 exit gdbserver. Adjust interface.
12574
12575 * remote-utils.c (remote_open): Don't block in accept. Instead
12576 register an event loop source on the listen socket file
12577 descriptor. Refactor bits into ...
12578 (listen_desc): ... this new global.
12579 (gdb_connected): ... this new function.
12580 (enable_async_notification): ... this new function.
12581 (handle_accept_event): ... this new function.
12582 (remote_close): Clear remote_desc.
12583
12584 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
12585
12586 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
12587 New fields.
12588 (mourn_inferior): Define.
12589 (target_process_qsupported): Avoid the dangling else problem.
12590 (thread_stopped): Define.
12591 (pause_all): Define.
12592 (target_waitstatus_to_string): Declare.
12593 * target.c (target_waitstatus_to_string): New.
12594
12595 * tracepoint.c (tracing): Make extern.
12596 (disconnected_tracing): New.
12597 (stop_tracing): Make extern. Handle tracing stops due to GDB
12598 disconnecting.
12599 (cmd_qtdisconnected): New.
12600 (cmd_qtstatus): Report disconnected tracing status in trace reply.
12601 (handle_tracepoint_general_set): Handle QTDisconnected.
12602
12603 * event-loop.c (event_handler_func): Change return type to int.
12604 (process_event): Bail out if the event handler wants the event
12605 loop to stop.
12606 (handle_file_event): Ditto.
12607 (start_event_loop): Bail out if the event handler wants the event
12608 loop to stop.
12609
12610 * nto-low.c (nto_target_ops): Adjust.
12611 * spu-low.c (spu_wait): Don't remove the process here.
12612 (spu_target_ops): Adjust.
12613 * win32-low.c (win32_wait): Don't remove the process here.
12614 (win32_target_ops): Adjust.
12615
12616 2010-04-11 Pedro Alves <pedro@codesourcery.com>
12617
12618 * regcache.c (realloc_register_cache): Invalidate inferior's
12619 regcache before recreating it.
12620
12621 2010-04-09 Pedro Alves <pedro@codesourcery.com>
12622
12623 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
12624
12625 2010-04-09 Stan Shebs <stan@codesourcery.com>
12626 Pedro Alves <pedro@codesourcery.com>
12627
12628 * server.h (LONGEST): New.
12629 (struct thread_info) <while_stepping>: New field.
12630 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
12631 Declare.
12632 (initialize_tracepoint, handle_tracepoint_general_set)
12633 (handle_tracepoint_query, tracepoint_finished_step)
12634 (tracepoint_was_hit, release_while_stepping_state_list):
12635 (current_traceframe): Declare.
12636 * server.c (handle_general_set): Handle tracepoint packets.
12637 (read_memory): New.
12638 (write_memory): New.
12639 (handle_search_memory_1): Use read_memory.
12640 (handle_query): Report support for conditional tracepoints, trace
12641 state variables, and tracepoint sources. Handle tracepoint
12642 queries.
12643 (main): Initialize the tracepoints module.
12644 (process_serial_event): Handle traceframe reads/writes.
12645
12646 * linux-low.c (handle_tracepoints): New.
12647 (linux_wait_1): Call it.
12648 (linux_resume_one_lwp): Handle while-stepping.
12649 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
12650 (linux_target_ops): Install them.
12651 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
12652 New field.
12653 * linux-x86-low.c (x86_supports_tracepoints): New.
12654 (the_low_target). Install it.
12655
12656 * mem-break.h (delete_breakpoint): Declare.
12657 * mem-break.c (delete_breakpoint): Make external.
12658
12659 * target.h (struct target_ops): Add `supports_tracepoints',
12660 `read_pc', and `write_pc' fields.
12661 (target_supports_tracepoints): Define.
12662 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
12663 (phex_nz): New.
12664
12665 * regcache.h (struct regcache) <registers_owned>: New field.
12666 (init_register_cache, regcache_cpy): Declare.
12667 (regcache_read_pc, regcache_write_pc): Declare.
12668 (register_cache_size): Declare.
12669 (supply_regblock): Declare.
12670 * regcache.c (init_register_cache): New.
12671 (new_register_cache): Use it.
12672 (regcache_cpy): New.
12673 (register_cache_size): New.
12674 (supply_regblock): New.
12675 (regcache_read_pc, regcache_write_pc): New.
12676
12677 * tracepoint.c: New.
12678
12679 * Makefile.in (OBS): Add tracepoint.o.
12680 (tracepoint.o): New rule.
12681
12682 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
12683
12684 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
12685 (i386-mmx.o): New.
12686 (i386-mmx.c): Likewise.
12687 (i386-mmx-linux.o): Likewise.
12688 (i386-mmx-linux.c): Likewise.
12689
12690 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
12691 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
12692 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
12693 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
12694
12695 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
12696 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
12697 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
12698
12699 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
12700
12701 * Makefile.in (clean): Updated.
12702 (i386-avx.o): New.
12703 (i386-avx.c): Likewise.
12704 (i386-avx-linux.o): Likewise.
12705 (i386-avx-linux.c): Likewise.
12706 (amd64-avx.o): Likewise.
12707 (amd64-avx.c): Likewise.
12708 (amd64-avx-linux.o): Likewise.
12709 (amd64-avx-linux.c): Likewise.
12710
12711 * configure.srv (srv_i386_regobj): Add i386-avx.o.
12712 (srv_i386_linux_regobj): Add i386-avx-linux.o.
12713 (srv_amd64_regobj): Add amd64-avx.o.
12714 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
12715 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
12716 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
12717 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
12718 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
12719 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
12720 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
12721
12722 * i387-fp.c: Include "i386-xstate.h".
12723 (i387_xsave): New.
12724 (i387_cache_to_xsave): Likewise.
12725 (i387_xsave_to_cache): Likewise.
12726 (x86_xcr0): Likewise.
12727
12728 * i387-fp.h (i387_cache_to_xsave): Likewise.
12729 (i387_xsave_to_cache): Likewise.
12730 (x86_xcr0): Likewise.
12731
12732 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
12733 * linux-crisv32-low.c (target_regsets): Likewise.
12734 * linux-m68k-low.c (target_regsets): Likewise.
12735 * linux-mips-low.c (target_regsets): Likewise.
12736 * linux-ppc-low.c (target_regsets): Likewise.
12737 * linux-s390-low.c (target_regsets): Likewise.
12738 * linux-sh-low.c (target_regsets): Likewise.
12739 * linux-sparc-low.c (target_regsets): Likewise.
12740 * linux-xtensa-low.c (target_regsets): Likewise.
12741
12742 * linux-low.c: Include <sys/uio.h>.
12743 (regsets_fetch_inferior_registers): Support nt_type.
12744 (regsets_store_inferior_registers): Likewise.
12745 (linux_process_qsupported): New.
12746 (linux_target_ops): Add linux_process_qsupported.
12747
12748 * linux-low.h (regset_info): Add nt_type.
12749 (linux_target_ops): Add process_qsupported.
12750
12751 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
12752 and <sys/uio.h>.
12753 (init_registers_i386_avx_linux): New.
12754 (init_registers_amd64_avx_linux): Likewise.
12755 (xmltarget_i386_linux_no_xml): Likewise.
12756 (xmltarget_amd64_linux_no_xml): Likewise.
12757 (PTRACE_GETREGSET): Likewise.
12758 (PTRACE_SETREGSET): Likewise.
12759 (x86_fill_xstateregset): Likewise.
12760 (x86_store_xstateregset): Likewise.
12761 (use_xml): Likewise.
12762 (x86_linux_update_xmltarget): Likewise.
12763 (x86_linux_process_qsupported): Likewise.
12764 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
12765 (x86_arch_setup): Don't call init_registers_amd64_linux nor
12766 init_registers_i386_linux here. Call
12767 x86_linux_update_xmltarget.
12768 (the_low_target): Add x86_linux_process_qsupported.
12769
12770 * server.c (handle_query): Call target_process_qsupported.
12771
12772 * target.h (target_ops): Add process_qsupported.
12773 (target_process_qsupported): New.
12774
12775 2010-04-03 Pedro Alves <pedro@codesourcery.com>
12776
12777 * inferiors.c (add_thread): Set last_status kind to
12778 TARGET_WAITKIND_IGNORE.
12779 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
12780 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
12781 (linux_wait_1): Move `thread' local definition to block that uses
12782 it. Don't NULL initialize `event_child'.
12783 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
12784 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
12785 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
12786
12787 2010-04-01 Pedro Alves <pedro@codesourcery.com>
12788
12789 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
12790 an extended waitstatus, or by a watchpoint.
12791 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
12792 thread was stepping or has been stopped by a watchpoint.
12793
12794 2010-04-01 Pedro Alves <pedro@codesourcery.com>
12795
12796 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
12797 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
12798 of another, then delete the previous, and validate all
12799 breakpoints.
12800 (validate_inserted_breakpoint): New.
12801 (delete_disabled_breakpoints): New.
12802 (validate_breakpoints): New.
12803 (check_mem_read): Validate breakpoints before trusting their
12804 shadow. Delete disabled breakpoints.
12805 (check_mem_write): Validate breakpoints before trusting they
12806 should be inserted. Delete disabled breakpoints.
12807 * mem-break.h (validate_breakpoints):
12808 * server.c (handle_query): Validate breakpoints when we see a
12809 qSymbol query.
12810
12811 2010-04-01 Pedro Alves <pedro@codesourcery.com>
12812
12813 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
12814 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
12815 if we could tell there's a GDB breakpoint at stop_pc.
12816 (need_step_over_p): Don't do a step over if we find a GDB
12817 breakpoint at the resume PC.
12818
12819 * mem-break.c (struct raw_breakpoint): New.
12820 (enum bkpt_type): New type `gdb_breakpoint'.
12821 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
12822 fields. New field `raw'.
12823 (find_raw_breakpoint_at): New.
12824 (set_raw_breakpoint_at): Handle refcounting. Create a raw
12825 breakpoint instead.
12826 (set_breakpoint_at): Adjust.
12827 (delete_raw_breakpoint): New.
12828 (release_breakpoint): New.
12829 (delete_breakpoint): Rename to...
12830 (delete_breakpoint_1): ... this. Add proc parameter. Use
12831 release_breakpoint. Return ENOENT.
12832 (delete_breakpoint): Reimplement.
12833 (find_breakpoint_at): Delete.
12834 (find_gdb_breakpoint_at): New.
12835 (delete_breakpoint_at): Delete.
12836 (set_gdb_breakpoint_at): New.
12837 (delete_gdb_breakpoint_at): New.
12838 (gdb_breakpoint_here): New.
12839 (set_reinsert_breakpoint): Use release_breakpoint.
12840 (uninsert_breakpoint): Rename to ...
12841 (uninsert_raw_breakpoint): ... this.
12842 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
12843 (reinsert_raw_breakpoint): Change parameter type to
12844 raw_breakpoint.
12845 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
12846 instead.
12847 (check_breakpoints): Adjust. Use release_breakpoint.
12848 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
12849 (breakpoint_inserted_here): Ditto.
12850 (check_mem_read): Adjust to iterate over raw breakpoints instead.
12851 Don't trust the breakpoint's shadow if it is not inserted.
12852 (check_mem_write): Adjust to iterate over raw breakpoints instead.
12853 (delete_all_breakpoints): Adjust.
12854 (free_all_breakpoints): Mark all breakpoints as uninserted, and
12855 use delete_breakpoint_1.
12856
12857 * mem-break.h (breakpoints_supported): Delete declaration.
12858 (set_gdb_breakpoint_at): Declare.
12859 (gdb_breakpoint_here): Declare.
12860 (delete_breakpoint_at): Delete.
12861 (delete_gdb_breakpoint_at): Declare.
12862
12863 * server.h (struct raw_breakpoint): Forward declare.
12864 (struct process_info): New field `raw_breakpoints'.
12865
12866 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
12867 breakpoints.
12868
12869 2010-03-24 Pedro Alves <pedro@codesourcery.com>
12870
12871 * linux-low.c (status_pending_p_callback): Fix comment.
12872 (linux_wait_for_event_1): Move most of the internal breakpoint
12873 handling from here...
12874 (linux_wait_1): ... to here.
12875 (count_events_callback): New.
12876 (select_singlestep_lwp_callback): New.
12877 (select_event_lwp_callback): New.
12878 (cancel_breakpoints_callback): New.
12879 (select_event_lwp): New.
12880 (linux_wait_1): Simplify internal breakpoint handling. Give equal
12881 priority to all LWPs that have had events that should be reported
12882 to the client. Cancel breakpoints when about to reporting the
12883 event to the client, not while stopping lwps. No longer cancel
12884 finished single-steps here.
12885 (cancel_finished_single_step): Delete.
12886 (cancel_finished_single_steps): Delete.
12887
12888 2010-03-24 Pedro Alves <pedro@codesourcery.com>
12889
12890 * mem-break.c (enum bkpt_type): New.
12891 (struct breakpoint): New field `type'.
12892 (set_breakpoint_at): Change return type to struct breakpoint
12893 pointer. Set type to `other_breakpoint' by default.
12894 (delete_breakpoint): Rewrite, supporting more than one breakpoint
12895 in the breakpoint list.
12896 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
12897 (reinsert_breakpoint): Rename to ...
12898 (reinsert_raw_breakpoint): ... this.
12899 (reinsert_breakpoints_at): Adjust.
12900 * mem-break.h (struct breakpoint): Declare.
12901 (set_breakpoint_at): Change return type to struct breakpoint
12902 pointer.
12903
12904 2010-03-24 Pedro Alves <pedro@codesourcery.com>
12905
12906 * server.c (handle_query): Assign, not compare.
12907
12908 2010-03-24 Pedro Alves <pedro@codesourcery.com>
12909
12910 Teach linux gdbserver to step-over-breakpoints.
12911
12912 * linux-low.c (can_hardware_single_step): New.
12913 (supports_breakpoints): New.
12914 (handle_extended_wait): If stopping threads, read the stop pc of
12915 the new cloned LWP.
12916 (get_pc): New.
12917 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
12918 low target doesn't support retrieving the PC.
12919 (add_lwp): Set last_resume_kind to resume_continue.
12920 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
12921 (linux_attach): Don't clear stop_expected. Set the lwp's
12922 last_resume_kind to resume_stop.
12923 (linux_detach_one_lwp): Don't check for removed breakpoints.
12924 (check_removed_breakpoint): Delete.
12925 (status_pending_p): Rename to ...
12926 (status_pending_p_callback): ... this. Don't check for removed
12927 breakpoints. Don't consider threads that are stopped from GDB's
12928 perspective.
12929 (linux_wait_for_lwp): Always read the stop_pc here.
12930 (cancel_breakpoint): New.
12931 (step_over_bkpt): New global.
12932 (linux_wait_for_event_1): Implement stepping over breakpoints.
12933 (gdb_wants_lwp_stopped): New.
12934 (gdb_wants_all_stopped): New.
12935 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
12936 single-step traps here. Store the thread's last reported target
12937 wait status.
12938 (send_sigstop): Don't clear stop_expected. Always set it,
12939 instead.
12940 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
12941 (cancel_finished_single_step): New.
12942 (cancel_finished_single_steps): New.
12943 (wait_for_sigstop): Don't cancel finished single-step traps here.
12944 (linux_resume_one_lwp): Don't check for removed breakpoints.
12945 Don't set `step' on non-hardware step archs.
12946 (linux_set_resume_request): Ignore resume_stop requests if already
12947 stopping or stopped. Set the lwp's last_resume_kind.
12948 (resume_status_pending_p): Don't check for removed breakpoints.
12949 (need_step_over_p): New.
12950 (start_step_over): New.
12951 (finish_step_over): New.
12952 (linux_resume_one_thread): Always queue a sigstop for resume_stop
12953 requests. Clear the thread's last reported target waitstatus.
12954 Don't use the `suspended' flag. Don't consider pending breakpoints.
12955 (linux_resume): Start a step-over if necessary.
12956 (proceed_one_lwp): New.
12957 (proceed_all_lwps): New.
12958 (unstop_all_lwps): New.
12959 * linux-low.h (struct lwp_info): Rewrite comment for the
12960 `suspended' flag. Add the `stop_pc' field. Delete the
12961 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
12962 Add `'last_resume_kind' and `need_step_over' fields.
12963 * inferiors.c (struct thread_info): Delete, moved elsewhere.
12964 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
12965 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
12966 (set_raw_breakpoint_at): New.
12967 (set_breakpoint_at): Rewrite to use it.
12968 (reinsert_breakpoint_handler): Delete.
12969 (set_reinsert_breakpoint): New.
12970 (reinsert_breakpoint_by_bp): Delete.
12971 (delete_reinsert_breakpoints): New.
12972 (uninsert_breakpoint): Rewrite.
12973 (uninsert_breakpoints_at): New.
12974 (reinsert_breakpoint): Rewrite.
12975 (reinsert_breakpoints_at): New.
12976 (check_breakpoints): Rewrite.
12977 (breakpoint_here): New.
12978 (breakpoint_inserted_here): New.
12979 (check_mem_read): Adjust.
12980 * mem-break.h (breakpoints_supported, breakpoint_here)
12981 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
12982 (reinsert_breakpoint_by_bp): Delete declaration.
12983 (delete_reinsert_breakpoints): Declare.
12984 (reinsert_breakpoint): Delete declaration.
12985 (reinsert_breakpoints_at): Declare.
12986 (uninsert_breakpoint): Delete declaration.
12987 (uninsert_breakpoints_at): Declare.
12988 (check_breakpoints): Adjust prototype.
12989 * server.h: Adjust include order.
12990 (struct thread_info): Declare here. Add a `last_status' field.
12991
12992 2010-03-23 Michael Snyder <msnyder@vmware.com>
12993
12994 * server.c (crc32): New function.
12995 (handle_query): Add handling for 'qCRC:' request.
12996
12997 2010-03-23 Pedro Alves <pedro@codesourcery.com>
12998
12999 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
13000 lwp had been stopped by a watchpoint.
13001
13002 2010-03-16 Pedro Alves <pedro@codesourcery.com>
13003
13004 * server.h (internal_error): Declare.
13005 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
13006 * utils.c (internal_error): New function.
13007
13008 2010-03-15 Andreas Schwab <schwab@redhat.com>
13009
13010 * configure.srv: Fix typo setting srv_regobj.
13011
13012 2010-03-15 Pedro Alves <pedro@codesourcery.com>
13013
13014 * linux-low.c (fetch_register): Avoid passing a non string literal
13015 format to `error'.
13016 (usr_store_inferior_registers): Ditto.
13017
13018 2010-03-14 Pedro Alves <pedro@codesourcery.com>
13019
13020 * linux-low.c (linux_write_memory): Bail out early if peeking
13021 memory failed.
13022
13023 2010-03-14 Pedro Alves <pedro@codesourcery.com>
13024
13025 * linux-low.h (struct lwp_info): New fields
13026 `stopped_by_watchpoint' and `stopped_data_address'.
13027 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
13028 here, and cache them in the lwp object.
13029 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
13030 directly.
13031 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
13032 field.
13033 (linux_stopped_by_watchpoint): Rewrite.
13034 (linux_stopped_data_address): Rewrite.
13035
13036 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
13037
13038 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
13039 switching the current inferior, not before.
13040
13041 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
13042
13043 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
13044 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
13045 i386-linux.c and amd64-linux.c.
13046 (reg-i386.o): Removed.
13047 (reg-i386.c): Likewise.
13048 (reg-i386-linux.o): Likewise.
13049 (reg-i386-linux.c): Likewise.
13050 (reg-x86-64.o): Likewise.
13051 (reg-x86-64.c): Likewise.
13052 (reg-x86-64-linux.o): Likewise.
13053 (reg-x86-64-linux.c): Likewise.
13054 (i386.o): New.
13055 (i386.c): Likewise.
13056 (i386-linux.o): Likewise.
13057 (i386-linux.c): Likewise.
13058 (amd64.o): Likewise.
13059 (amd64.c): Likewise.
13060 (amd64-linux.o): Likewise.
13061 (amd64-linux.c): Likewise.
13062
13063 * configure.srv (srv_i386_regobj): New.
13064 (srv_i386_linux_regobj): Likewise.
13065 (srv_amd64_regobj): Likewise.
13066 (srv_amd64_linux_regobj): Likewise.
13067 (srv_i386_32bit_xmlfiles): Likewise.
13068 (srv_i386_64bit_xmlfiles): Likewise.
13069 (srv_i386_xmlfiles): Likewise.
13070 (srv_amd64_xmlfiles): Likewise.
13071 (srv_i386_linux_xmlfiles): Likewise.
13072 (srv_amd64_linux_xmlfiles): Likewise.
13073 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
13074 srv_xmlfiles to $srv_i386_xmlfiles.
13075 (i[34567]86-*-mingw32ce*): Likewise.
13076 (i[34567]86-*-mingw*): Likewise.
13077 (i[34567]86-*-nto*): Likewise.
13078 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
13079 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
13080 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
13081 (x86_64-*-linux*): Likewise.
13082
13083 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
13084 (init_registers_amd64_linux): New.
13085 (x86_arch_setup): Replace init_registers_x86_64_linux with
13086 init_registers_amd64_linux.
13087
13088 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
13089
13090 * configure.ac: Check for libdl. If it is not available link against
13091 static libthread_db.
13092 * configure: Regenerate.
13093
13094 2010-02-22 Pedro Alves <pedro@codesourcery.com>
13095
13096 PR9605
13097
13098 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
13099 handing a read watchpoint.
13100 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
13101
13102 2010-02-12 Doug Evans <dje@google.com>
13103
13104 * linux-low.c (linux_supports_tracefork_flag): Document.
13105 (linux_look_up_symbols): Add comment.
13106
13107 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
13108
13109 * regcache.c (supply_register): Clear regcache if buf is NULL.
13110
13111 2010-02-02 Nicolas Roche <roche@sourceware.org>
13112 Joel Brobecker <brobecker@adacore.com>
13113
13114 * inferiors.c (find_inferior): Add function documentation.
13115 (unloaded_dll): Handle the case where the unloaded dll has not
13116 been previously registered in the dll list.
13117
13118 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
13119
13120 * linux-arm-low.c (thumb_breakpoint_len): Delete.
13121 (thumb2_breakpoint): New.
13122 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
13123
13124 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
13125
13126 * linux-low.c (get_stop_pc): Check for SIGTRAP.
13127 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
13128 breakpoints.
13129
13130 2010-01-21 Pedro Alves <pedro@codesourcery.com>
13131
13132 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
13133
13134 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
13135
13136 * linux-s390-low.c (s390_collect_ptrace_register)
13137 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
13138
13139 2010-01-21 Doug Evans <dje@google.com>
13140
13141 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
13142 (PTRACE_ARG4_TYPE): New macro.
13143 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
13144 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
13145 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
13146 (usr_store_inferior_registers): Ditto.
13147 (linux_read_memory, linux_write_memory): Ditto.
13148 (linux_test_for_tracefork): Ditto.
13149
13150 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
13151 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
13152
13153 2010-01-21 Pedro Alves <pedro@codesourcery.com>
13154
13155 * proc-service.c (ps_lgetregs): Don't refetch registers from the
13156 target.
13157
13158 2010-01-21 Pedro Alves <pedro@codesourcery.com>
13159
13160 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
13161 prototype to take a regcache. Adjust.
13162
13163 2010-01-20 Pedro Alves <pedro@codesourcery.com>
13164
13165 * regcache.h (struct thread_info): Forward declare.
13166 (struct regcache): New.
13167 (new_register_cache): Adjust prototype.
13168 (get_thread_regcache): Declare.
13169 (free_register_cache): Adjust prototype.
13170 (registers_to_string, registers_from_string): Ditto.
13171 (supply_register, supply_register_by_name, collect_register)
13172 (collect_register_as_string, collect_register_by_name): Ditto.
13173 * regcache.c (struct inferior_regcache_data): Delete.
13174 (get_regcache): Rename to ...
13175 (get_thread_regcache): ... this. Adjust. Switch inferior before
13176 fetching registers.
13177 (regcache_invalidate_one): Adjust.
13178 (regcache_invalidate): Fix prototype.
13179 (new_register_cache): Return the new register cache.
13180 (free_register_cache): Change prototype.
13181 (realloc_register_cache): Adjust.
13182 (registers_to_string): Change prototype to take a regcache. Adjust.
13183 (registers_from_string): Ditto.
13184 (register_data): Ditto.
13185 (supply_register): Ditto.
13186 (supply_register_by_name): Ditto.
13187 (collect_register): Ditto.
13188 (collect_register_as_string): Ditto.
13189 (collect_register_by_name): Ditto.
13190 * server.c (process_serial_event): Adjust.
13191 * linux-low.h (regset_fill_func, regset_store_func): Change
13192 prototype.
13193 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
13194 Change prototype.
13195 * linux-low.c (get_stop_pc): Adjust.
13196 (check_removed_breakpoint): Adjust.
13197 (linux_wait_for_event): Adjust.
13198 (linux_resume_one_lwp): Adjust.
13199 (fetch_register): Add regcache parameter. Adjust.
13200 (usr_store_inferior_registers): Ditto.
13201 (regsets_fetch_inferior_registers): Ditto.
13202 (regsets_store_inferior_registers): Ditto.
13203 (linux_fetch_registers, linux_store_registers): Ditto.
13204 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
13205 regcache. Adjust.
13206 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
13207 Ditto.
13208 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
13209 prototype to take a regcache.
13210 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
13211 * remote-utils.c (convert_ascii_to_int, outreg)
13212 (prepare_resume_reply): Change prototype to take a regcache.
13213 Adjust.
13214 * target.h (struct target_ops) <fetch_registers, store_registers>:
13215 Change prototype to take a regcache.
13216 (fetch_inferior_registers, store_inferior_registers): Change
13217 prototype to take a regcache. Adjust.
13218 * proc-service.c (ps_lgetregs): Adjust.
13219 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
13220 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
13221 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
13222 take a regcache. Adjust.
13223 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
13224 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
13225 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
13226 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
13227 * linux-cris-low.c (cris_get_pc, cris_set_pc)
13228 (cris_cannot_fetch_register):
13229 (cris_breakpoint_at): Change prototype to take a regcache.
13230 Adjust.
13231 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
13232 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
13233 to take a regcache. Adjust.
13234 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
13235 Adjust.
13236 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
13237 take a regcache. Adjust.
13238 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
13239 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
13240 (m68k_set_pc): Change prototype to take a regcache. Adjust.
13241 * linux-mips-low.c (mips_get_pc):
13242 (mips_set_pc): Change prototype to take a regcache. Adjust.
13243 (mips_reinsert_addr): Adjust.
13244 (mips_collect_register): Change prototype to take a regcache.
13245 Adjust.
13246 (mips_supply_register):
13247 (mips_collect_register_32bit, mips_supply_register_32bit)
13248 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
13249 (mips_store_fpregset): Ditto.
13250 * linux-ppc-low.c (ppc_supply_ptrace_register)
13251 (ppc_supply_ptrace_register): Ditto.
13252 (parse_spufs_run): Adjust.
13253 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
13254 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
13255 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
13256 take a regcache. Adjust.
13257 * linux-s390-low.c (s390_collect_ptrace_register)
13258 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
13259 (s390_set_pc): Change prototype to take a regcache. Adjust.
13260 (s390_arch_setup): Adjust.
13261 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
13262 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
13263 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
13264 (sparc_fill_gregset, sparc_store_gregset_from_stack)
13265 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
13266 regcache. Adjust.
13267 (sparc_breakpoint_at): Adjust.
13268 * linux-xtensa-low.c (xtensa_fill_gregset):
13269 (xtensa_store_gregset):
13270 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
13271 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
13272 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
13273 prototype to take a regcache. Adjust.
13274 * win32-arm-low.c (arm_fetch_inferior_register)
13275 (arm_store_inferior_register): Change prototype to take a
13276 regcache. Adjust.
13277 * win32-i386-low.c (i386_fetch_inferior_register)
13278 (i386_store_inferior_register): Change prototype to take a
13279 regcache. Adjust.
13280 * win32-low.c (child_fetch_inferior_registers)
13281 (child_store_inferior_registers): Change prototype to take a
13282 regcache. Adjust.
13283 (win32_wait): Adjust.
13284 (win32_fetch_inferior_registers): Change prototype to take a
13285 regcache. Adjust.
13286 (win32_store_inferior_registers): Adjust.
13287 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
13288 store_inferior_register>: Change prototype to take a regcache.
13289
13290 2010-01-20 Doug Evans <dje@google.com>
13291
13292 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
13293 #ifdef.
13294 (linux_wait_for_event1, linux_init_signals): Ditto.
13295 (W_STOPCODE): Provide definition if missing.
13296
13297 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
13298
13299 * linux-low.c (linux_core_of_thread): New.
13300 (compare_ints, show_process, list_threads): New.
13301 (linux_qxfer_osdata): Report threads and cores.
13302 (linux_target_op): Register linux_core_of_thread.
13303 * remote-utils.c (prepare_resume_reply): Report the core.
13304 (buffer_xml_printf): Support %d specifier.
13305 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
13306 New.
13307 (handle_query): Handle qXfer:threads. Announce availability
13308 thereof.
13309 * target.h (struct target_ops): New field core_of_thread.
13310
13311 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
13312
13313 * Makefile.in (clean): Remove new generated files.
13314 (reg-s390.o, reg-s390.c): Remove rules.
13315 (reg-s390x.o, reg-s390x.c): Likewise.
13316 (s390-linux32.o, s390-linux32.c): Add rules.
13317 (s390-linux64.o, s390-linux64.c): Likewise.
13318 (s390x-linux64.o, s390x-linux64.c): Likewise.
13319 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
13320 * linux-s390-low.c: Include <elf.h>.
13321 (HWCAP_S390_HIGH_GPRS): Define if undefined.
13322 (init_registers_s390): Remove prototype.
13323 (init_registers_s390x): Likewise.
13324 (init_registers_s390_linux32): Add prototype.
13325 (init_registers_s390_linux64): Likewise.
13326 (init_registers_s390x_linux64): Likewise.
13327 (s390_num_regs_3264): New define.
13328 (s390_regmap_3264): New global variable.
13329 (s390_cannot_fetch_register): Remove obsolete check.
13330 (s390_cannot_store_register): Likewise.
13331 (s390_collect_ptrace_register): Handle upper/lower register halves.
13332 (s390_supply_ptrace_register): Likewise.
13333 (s390_fill_gregset): Update to register number changes.
13334 (s390_get_hwcap): New routine.
13335 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
13336 Install appropriate regmap and register set.
13337
13338 2010-01-01 Joel Brobecker <brobecker@adacore.com>
13339
13340 * server.c (gdbserver_version): Update copyright year to 2010.
13341 * gdbreplay.c (gdbreplay_version): Likewise.
13342
13343 2009-12-28 Doug Evans <dje@google.com>
13344
13345 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
13346 elf/external.h. Include <elf.h> instead but only if necessary.
13347
13348 2009-12-28 Pedro Alves <pedro@codesourcery.com>
13349
13350 * linux-low.c (linux_remove_process): Remove `detaching'
13351 parameter. Don't release/detach from thread_db here.
13352 (linux_kill): Release/detach from thread_db here, ...
13353 (linux_detach): ... and here, before actually detaching.
13354 (linux_wait_1): ... and here, when a process exits.
13355 * thread-db.c (any_thread_of): New.
13356 (thread_db_free): Switch the current inferior to a thread of the
13357 passed in process.
13358
13359 2009-12-21 Doug Evans <dje@google.com>
13360
13361 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
13362
13363 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
13364 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
13365 warning ifndef __NR_tkill. Move setting of errno there too.
13366 Delete unnecessary resetting of errno after syscall.
13367 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
13368
13369 * configure.ac: Check for dladdr.
13370 * config.in: Regenerate.
13371 * configure: Regenerate.
13372 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
13373 (try_thread_db_load): Update.
13374
13375 * linux-low.c (my_waitpid): Delete unnecessary prototype.
13376
13377 2009-12-18 Doug Evans <dje@google.com>
13378
13379 * event-loop.c: Include unistd.h if it exists.
13380
13381 * linux-low.c (my_waitpid): Move definition away from being in
13382 between linux_tracefork_child/linux_test_for_tracefork.
13383
13384 * gdb_proc_service.h (psaddr_t): Fix type.
13385 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
13386 signature to match glibc.
13387
13388 2009-12-16 Doug Evans <dje@google.com>
13389
13390 * linux-low.c (linux_read_memory): Fix argument to read.
13391
13392 2009-11-26 Pedro Alves <pedro@codesourcery.com>
13393
13394 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
13395 events, don't leave current_inferior pointing at null.
13396
13397 2009-11-26 Pedro Alves <pedro@codesourcery.com>
13398
13399 * win32-low.c (LOG): Delete.
13400 (OUTMSG): Output to stderr.
13401 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
13402 on compile time LOG macro.
13403 (win32_wait): Fix debug output.
13404
13405 2009-11-26 Pedro Alves <pedro@codesourcery.com>
13406
13407 * win32-low.c (win32_add_one_solib): If the dll name is
13408 "ntdll.dll", prepend the system directory to the dll path.
13409
13410 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
13411
13412 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
13413
13414 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
13415 Vladimir Prus <vladimir@codesourcery.com>
13416
13417 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
13418 * configure.ac: Check for __mcoldfire__ and set
13419 gdb_cv_m68k_is_coldfire.
13420 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
13421 reg-cf.o and reg-m68k.o.
13422 * configure: Regenerated.
13423
13424 2009-11-16 Pedro Alves <pedro@codesourcery.com>
13425
13426 * linux-low.c (linux_remove_process): Add `detaching' parameter.
13427 Pass it to thread_db_free.
13428 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
13429 proper `detaching' argument to linux_remove_process.
13430 * linux-low.h (thread_db_free): Add `detaching' parameter.
13431 * thread-db.c (thread_db_init): Pass false as `detaching' argument
13432 to thread_db_free.
13433 (thread_db_free): Add `detaching' parameter. Only
13434 call td_ta_clear_event if detaching from process.
13435
13436 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
13437
13438 * thread-db.c (thread_db_free): Fix typo.
13439
13440 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
13441
13442 PR gdb/10838
13443 * thread-db.c (thread_db_free): Call td_ta_clear_event.
13444
13445 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
13446
13447 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
13448 with an i686 compiler.
13449 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
13450 needed.
13451 * configure: Rebuilt.
13452
13453 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
13454
13455 PR gdb/10783
13456
13457 * server.c (handle_search_memory_1): Correct read_addr initialization
13458 in loop for searching subsequent chunks.
13459
13460 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
13461
13462 * configure.ac: New --with-libthread-db option.
13463 * thread-db.c: Allow direct dependence on libthread_db.
13464 (thread_db_free): Adjust.
13465 * config.in: Regenerate.
13466 * configure: Likewise.
13467
13468 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
13469
13470 PR gdb/10757
13471 * thread-db.c (attach_thread): New function.
13472 (maybe_attach_thread): Return success/failure.
13473 (find_new_threads_callback): Adjust.
13474 (thread_db_find_new_threads): Loop until no new threads.
13475
13476 2009-10-13 Pedro Alves <pedro@codesourcery.com>
13477
13478 * proc-service.c (ps_lgetregs): Formatting.
13479
13480 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
13481
13482 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
13483 * configure.ac: Adjust.
13484 * linux-low.h (struct process_info_private): Move members to struct
13485 thread_db.
13486 (thread_db_free, thread_db_handle_monitor_command): New prototype.
13487 * linux-low.c (linux_remove_process): Adjust.
13488 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
13489 * server.c (handle_query): Move code ...
13490 (handle_monitor_command): ... here. New function.
13491 * target.h (struct target_ops): New member.
13492 * thread-db.c (struct thread_db): New.
13493 (libthread_db_search_path): New variable.
13494 (thread_db_create_event, thread_db_enable_reporting)
13495 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
13496 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
13497 (try_thread_db_load_1, dladdr_to_soname): New functions.
13498 (try_thread_db_load, thread_db_load_search): New functions.
13499 (thread_db_init): Search for libthread_db.
13500 (thread_db_free): New function.
13501 (thread_db_handle_monitor_command): Likewise.
13502 * config.in: Regenerate.
13503 * configure: Regenerate.
13504
13505 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
13506
13507 * spu-low.c (spu_kill): Wait for inferior to terminate.
13508 Call clear_inferiors.
13509 (spu_detach): Call clear_inferiors.
13510
13511 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
13512
13513 * aclocal.m4: Regenerate.
13514 * config.in: Likewise.
13515 * configure: Likewise.
13516
13517 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
13518
13519 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
13520 (parse_spufs_run): New function.
13521 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
13522 (ppc_breakpoint_at): Handle SPU breakpoints.
13523
13524 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
13525
13526 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
13527 (SPUFS_MAGIC): Define.
13528 (spu_enumerate_spu_ids): New function.
13529 (linux_qxfer_spu): New function.
13530 (linux_target_ops): Install linux_qxfer_spu.
13531
13532 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
13533
13534 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
13535 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
13536 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
13537 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
13538 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
13539 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
13540 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
13541 (init_registers_powerpc_cell32l): Add prototype.
13542 (init_registers_powerpc_cell64l): Likewise.
13543 (ppc_arch_setup): Detect Cell/B.E. architecture.
13544
13545 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
13546
13547 * Makefile.in (datarootdir): New variable.
13548
13549 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
13550
13551 * linux-low.c (linux_write_memory): Update debugging output.
13552 * Makefile.in (clean): Add new descriptions.
13553 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
13554 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
13555 * configure.srv: Add new files for arm*-*-linux*.
13556 * linux-arm-low.c: Add new declarations.
13557 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
13558 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
13559 (HWCAP_VFPv3D16): New.
13560 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
13561 instead of __IWMMXT__.
13562 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
13563 (arm_arch_setup): New.
13564 (target_regsets): Remove #ifdef. Add VFP regset.
13565 (the_low_target): Use arm_arch_setup.
13566
13567 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
13568
13569 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
13570 the main thread again.
13571
13572 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
13573
13574 Adding Neutrino gdbserver.
13575 * configure: Regenerated.
13576 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
13577 * configure.srv (i[34567]86-*-nto*): New target.
13578 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
13579 * remote-utils.c [__QNX__]: Include sys/iomgr.h
13580 (nto_comctrl) [__QNX__]: New function.
13581 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
13582
13583 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
13584
13585 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
13586 srv_tgtobj.
13587
13588 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
13589 Pedro Alves <pedro@codesourcery.com>
13590
13591 * win32-i386-low.c (i386_get_thread_context): Handle systems that
13592 don't support CONTEXT_EXTENDED_REGISTERS.
13593 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
13594 (the_low_target): Install them.
13595 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
13596 failing with ERROR_PIPE_NOT_CONNECTED.
13597
13598 2009-06-30 Doug Evans <dje@google.com>
13599 Pierre Muller <muller@ics.u-strasbg.fr>
13600
13601 Add h/w watchpoint support to x86-linux, win32-i386.
13602 * Makefile.in (SFILES): Add i386-low.c
13603 (i386_low_h): Define.
13604 (i386-low.o): Add dependencies.
13605 (linux-x86-low.o): Add i386-low.h dependency.
13606 (win32-i386-low.o): Ditto.
13607 * i386-low.c: New file.
13608 * i386-low.h: New file.
13609 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
13610 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
13611 * linux-low.c (linux_add_process): Initialize arch_private.
13612 (linux_remove_process): Free arch_private.
13613 (add_lwp): Initialize arch_private.
13614 (delete_lwp): Free arch_private.
13615 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
13616 provided.
13617 * linux-low.h (process_info_private): New member arch_private.
13618 (lwp_info): New member arch_private.
13619 (linux_target_ops): New members new_process, new_thread,
13620 prepare_to_resume.
13621 (ptid_of): New macro.
13622 * linux-x86-low.c: Include stddef.h, i386-low.h.
13623 (arch_process_info): New struct.
13624 (arch_lwp_info): New struct.
13625 (x86_linux_dr_get, x86_linux_dr_set): New functions.
13626 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
13627 (i386_dr_low_get_status): New function.
13628 (x86_insert_point, x86_remove_point): New functions.
13629 (x86_stopped_by_watchpoint): New function.
13630 (x86_stopped_data_address): New function.
13631 (x86_linux_new_process, x86_linux_new_thread): New functions.
13632 (x86_linux_prepare_to_resume): New function.
13633 (the_low_target): Add entries for insert_point, remove_point,
13634 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
13635 prepare_to_resume.
13636 * server.c (debug_hw_points): New global.
13637 (monitor_show_help): Document set debug-hw-points.
13638 (handle_query): Process "set debug-hw-points".
13639 * server.h (debug_hw_points): Declare.
13640 (paddress): Declare.
13641 * utils.c (NUMCELLS, CELLSIZE): New macros.
13642 (get_sell, xsnprintf, paddress): New functions.
13643 * win32-arm-low.c (the_low_target): Add entries for insert_point,
13644 remove_point, stopped_by_watchpoint, stopped_data_address.
13645 * win32-i386-low.c: Include i386-low.h.
13646 (debug_reg_state): Replaces dr.
13647 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
13648 (i386_dr_low_get_status): New function.
13649 (i386_insert_point, i386_remove_point): New functions.
13650 (i386_stopped_by_watchpoint): New function.
13651 (i386_stopped_data_address): New function.
13652 (i386_initial_stuff): Update.
13653 (get_thread_context,set_thread_context,i386_thread_added): Update.
13654 (the_low_target): Add entries for insert_point,
13655 remove_point, stopped_by_watchpoint, stopped_data_address.
13656 * win32-low.c (win32_insert_watchpoint): New function.
13657 (win32_remove_watchpoint): New function.
13658 (win32_stopped_by_watchpoint): New function.
13659 (win32_stopped_data_address): New function.
13660 (win32_target_ops): Add entries for insert_watchpoint,
13661 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
13662 * win32-low.h (win32_target_ops): New members insert_point,
13663 remove_point, stopped_by_watchpoint, stopped_data_address.
13664
13665 2009-06-25 Pedro Alves <pedro@codesourcery.com>
13666
13667 * server.c (process_serial_event): Re-return unsupported, not
13668 error, if the type isn't recognized. Re-allow supporting only
13669 insert or remove packets. Also call require_running for
13670 breakpoints. Add missing break statement to default case. Tidy.
13671 * target.h (struct target_ops): Rename insert_watchpoint to
13672 insert_point, and remove_watchpoint to remove_point.
13673
13674 * linux-low.h (struct linux_target_ops): Likewise.
13675 * linux-low.c (linux_insert_watchpoint): Rename to ...
13676 (linux_insert_point): ... this. Adjust.
13677 (linux_remove_watchpoint): Rename to ...
13678 (linux_remove_point): ... this. Adjust.
13679 (linux_target_ops): Adjust.
13680 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
13681 (cris_insert_point): ... this.
13682 (cris_remove_watchpoint): Rename to ...
13683 (cris_remove_point): ... this.
13684 (the_low_target): Adjust.
13685
13686 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
13687
13688 * server.c (handle_v_kill): Pass signal_pid to
13689 kill_inferior if multi_process is zero.
13690
13691 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
13692
13693 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
13694 * target.h (target_ops): Comment for *_watchpoint to make it clear
13695 the functions can get types '0' and '1'.
13696
13697 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
13698
13699 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
13700 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
13701 * regcache.c (get_regcache): Likewise.
13702 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
13703 * win32-low.c (child_fetch_inferior_registers): Remove check for
13704 regno 0.
13705
13706 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
13707 Pedro Alves <pedro@codesourcery.com>
13708
13709 * target.h (struct target_ops) <supports_multi_process>: New
13710 callback.
13711 (target_supports_multi_process): New.
13712 * server.c (handle_query): Even if GDB reports support, only
13713 enable multi-process if the target also supports it. Report
13714 multi-process support only if the target backend supports it.
13715 * linux-low.c (linux_supports_multi_process): New function.
13716 (linux_target_ops): Install it as target_supports_multi_process
13717 callback.
13718
13719 2009-05-24 Doug Evans <dje@google.com>
13720
13721 Global renaming of find_thread_pid to find_thread_ptid.
13722 * server.h (find_thread_ptid): Renamed from find_thread_pid.
13723 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
13724 All callers updated.
13725
13726 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
13727 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
13728 directly.
13729
13730 * linux-low.c (get_stop_pc): Print pc if debug_threads.
13731 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
13732 (linux_resume_one_lwp): Ditto.
13733
13734 2009-05-23 Doug Evans <dje@google.com>
13735
13736 * linux-low.c (linux_resume_one_lwp): Change type of first arg
13737 from struct inferior_list_entry * to struct lwp_info *.
13738 All callers updated.
13739
13740 2009-05-13 Doug Evans <dje@google.com>
13741
13742 * linux-x86-low.c: Don't include assert.h.
13743 (x86_siginfo_fixup): Use fatal, not assert.
13744 (x86_arch_setup): Fix comment.
13745
13746 2009-05-12 Doug Evans <dje@google.com>
13747
13748 Biarch support for i386/amd64 gdbserver.
13749 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
13750 Add linux-x86-low.c.
13751 (linux-i386-low.o, linux-x86-64-low.o): Delete.
13752 (linux-x86-low.o): Add.
13753 * linux-x86-64-low.c: Delete.
13754 * linux-i386-low.c: Delete.
13755 * linux-x86-low.c: New file.
13756 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
13757 linux-x86-low.o.
13758 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
13759 linux-x86-low.o.
13760 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
13761 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
13762 (linux_child_pid_to_exec_file): New function.
13763 (elf_64_header_p, elf_64_file_p): New functions.
13764 (siginfo_fixup): New function.
13765 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
13766 give target a chance to convert layout.
13767 * linux-low.h (linux_target_ops): New member siginfo_fixup.
13768 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
13769
13770 2009-05-07 Doug Evans <dje@google.com>
13771
13772 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
13773 (regsets_store_inferior_registers): Ditto.
13774
13775 2009-05-06 Pedro Alves <pedro@codesourcery.com>
13776
13777 PR server/10048
13778
13779 * linux-low.c (must_set_ptrace_flags): Delete.
13780 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
13781 of the global.
13782 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
13783 `lwp->must_set_ptrace_flags' instead.
13784 (linux_wait_for_event_1): Set ptrace options here.
13785 (linux_wait_1): ... not here.
13786
13787 2009-04-30 Doug Evans <dje@google.com>
13788
13789 * inferiors.c (started_inferior_callback): New function.
13790 (attached_inferior_callback): New function.
13791 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
13792 * server.c (print_started_pid, print_attached_pid): New functions.
13793 (detach_or_kill_for_exit): New function.
13794 (main): Call it instead of for_each_inferior (kill_inferior_callback).
13795 * server.h (have_started_inferiors_p): Declare.
13796 (have_attached_inferiors_p): Declare.
13797
13798 * inferiors.c (remove_process): Fix memory leak, free process.
13799 * linux-low.c (linux_remove_process): New function.
13800 (linux_kill): Call it instead of remove_process.
13801 (linux_detach, linux_wait_1): Ditto.
13802
13803 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
13804
13805 * configure.srv: Add x86 Windows CE target.
13806
13807 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
13808
13809 * inferiors.c (get_thread_process): Make global.
13810 * server.h (get_thread_process): Add prototype.
13811 * thread-db.c (find_one_thread): Use get_thread_process
13812 instead of current_process.
13813 (thread_db_get_tls_address): Do not crash if called when
13814 thread layer is not yet initialized.
13815
13816 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
13817
13818 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
13819 * spu-low.c (current_tid): Rename to ...
13820 (current_ptid): ... this.
13821 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
13822 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
13823 ptid_get_lwp (current_ptid) instead of current_tid.
13824 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
13825 instead of current_tid. Use find_process_pid to verify pid
13826 argument is valid. Pass proper argument to remove_process.
13827 (spu_thread_alive): Compare current_ptid instead of current_tid.
13828 (spu_resume): Likewise.
13829
13830 2009-04-02 Pedro Alves <pedro@codesourcery.com>
13831
13832 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
13833 variable.
13834
13835 2009-04-01 Pedro Alves <pedro@codesourcery.com>
13836
13837 Implement the multiprocess extensions, and add linux multiprocess
13838 support.
13839
13840 * server.h (ULONGEST): Declare.
13841 (struct ptid, ptid_t): New.
13842 (minus_one_ptid, null_ptid): Declare.
13843 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
13844 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
13845 (struct inferior_list_entry): Change `id' type from unsigned from
13846 to ptid_t.
13847 (struct sym_cache, struct breakpoint, struct
13848 process_info_private): Forward declare.
13849 (struct process_info): Declare.
13850 (current_process): Declare.
13851 (all_processes): Declare.
13852 (initialize_inferiors): Declare.
13853 (add_thread): Adjust to use ptid_t.
13854 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
13855 (add_process, remove_process, find_thread_pid): Declare.
13856 (find_inferior_id): Adjust to use ptid_t.
13857 (cont_thread, general_thread, step_thread): Change type to ptid_t.
13858 (multi_process): Declare.
13859 (push_event): Adjust to use ptid_t.
13860 (read_ptid, write_ptid): Declare.
13861 (prepare_resume_reply): Adjust to use ptid_t.
13862 (clear_symbol_cache): Declare.
13863 * inferiors.c (all_processes): New.
13864 (null_ptid, minus_one_ptid): New.
13865 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
13866 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
13867 (add_thread): Change unsigned long to ptid. Remove gdb_id
13868 parameter. Adjust.
13869 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
13870 (gdb_id_to_thread): Rename to ...
13871 (find_thread_pid): ... this. Change unsigned long to ptid.
13872 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
13873 (loaded_dll, pull_pid_from_list): Adjust.
13874 (add_process, remove_process, find_process_pid)
13875 (get_thread_process, current_process, initialize_inferiors): New.
13876 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
13877 (struct target_waitstatus) <related_pid>: Ditto.
13878 (struct target_ops) <kill, detach>: Add `pid' argument. Change
13879 return type to int.
13880 (struct target_ops) <join>: Add `pid' argument.
13881 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
13882 (struct target_ops) <wait>: Add `ptid' field. Change return type
13883 to ptid.
13884 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
13885 (mywait): Add `ptid' argument. Change return type to ptid_t.
13886 (target_pid_to_str): Declare.
13887 * target.c (set_desired_inferior): Adjust to use ptids.
13888 (mywait): Add new `ptid' argument. Adjust.
13889 (target_pid_to_str): New.
13890 * mem-break.h (free_all_breakpoints): Declare.
13891 * mem-break.c (breakpoints): Delelete.
13892 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
13893 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
13894 to use per-process breakpoint list.
13895 (free_all_breakpoints): New.
13896 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
13897 (symbol_cache, all_symbols_looked_up): Delete.
13898 (hexchars): New.
13899 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
13900 read_ptid): New.
13901 (prepare_resume_reply): Change ptid argument's type from unsigned
13902 long to ptid_t. Adjust. Implement W;process and X;process.
13903 (free_sym_cache, clear_symbol_cache): New.
13904 (look_up_one_symbol): Adjust to per-process symbol cache. *
13905 * server.c (cont_thread, general_thread, step_thread): Change type
13906 to ptid_t.
13907 (attached): Delete.
13908 (multi_process): New.
13909 (last_ptid): Change type to ptid_t.
13910 (struct vstop_notif) <ptid>: Change type to ptid_t.
13911 (queue_stop_reply, push_event): Change `ptid' argument's type to
13912 ptid_t.
13913 (discard_queued_stop_replies): Add `pid' argument.
13914 (start_inferior): Adjust to use ptids. Adjust to mywait interface
13915 changes. Don't reference the `attached' global.
13916 (attach_inferior): Adjust to mywait interface changes.
13917 (handle_query): Adjust to use ptids. Parse GDB's qSupported
13918 features. Handle and report "multiprocess+". Handle
13919 "qAttached:PID".
13920 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
13921 changes.
13922 (handle_v_kill): New.
13923 (handle_v_stopped): Adjust to use target_pid_to_str.
13924 (handle_v_requests): Allow multiple attaches and runs when
13925 multiprocess extensions are in effect. Handle "vKill".
13926 (myresume): Adjust to use ptids.
13927 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
13928 (handle_status): Adjust to discard_queued_stop_replies interface
13929 change.
13930 (first_thread_of, kill_inferior_callback)
13931 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
13932 (main): Call initialize_inferiors. Adjust to use ptids, killing
13933 and detaching from all inferiors. Handle multiprocess packet
13934 variants.
13935 * linux-low.h: Include gdb_proc_service.h.
13936 (struct process_info_private): New.
13937 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
13938 <lwpid_of>: Use ptid_get_lwp.
13939 (get_lwp_thread): Adjust.
13940 (struct lwp_info): Add `dead' member.
13941 (find_lwp_pid): Declare.
13942 * linux-low.c (thread_db_active): Delete.
13943 (new_inferior): Adjust comment.
13944 (inferior_pid): Delete.
13945 (linux_add_process): New.
13946 (handle_extended_wait): Adjust.
13947 (add_lwp): Change unsigned long to ptid.
13948 (linux_create_inferior): Add process to processes table. Adjust
13949 to use ptids. Don't set new_inferior here.
13950 (linux_attach_lwp): Rename to ...
13951 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
13952 it. Adjust to use ptids.
13953 (linux_attach_lwp): New.
13954 (linux_attach): Add process to processes table. Don't set
13955 new_inferior here.
13956 (struct counter): New.
13957 (second_thread_of_pid_p, last_thread_of_process_p): New.
13958 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
13959 multiple processes.
13960 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
13961 processes. Remove process from process table.
13962 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
13963 to multiple processes.
13964 (any_thread_of): New.
13965 (linux_detach): Add `pid' argument, and handle it. Remove process
13966 from processes table.
13967 (linux_join): Add `pid' argument. Handle it.
13968 (linux_thread_alive): Change unsighed long argument to ptid_t.
13969 Consider dead lwps as not being alive.
13970 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
13971 threads we're not interested in.
13972 (same_lwp, find_lwp_pid): New.
13973 (linux_wait_for_lwp): Change `pid' argument's type from int to
13974 ptid_t. Adjust.
13975 (linux_wait_for_event): Rename to ...
13976 (linux_wait_for_event_1): ... this. Change `pid' argument's type
13977 from int to ptid_t. Adjust.
13978 (linux_wait_for_event): New.
13979 (linux_wait_1): Add `ptid' argument. Change return type to
13980 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
13981 that exit from the process table.
13982 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
13983 Adjust.
13984 (mark_lwp_dead): New.
13985 (wait_for_sigstop): Adjust to use ptids. If a process exits while
13986 stopping all threads, mark its main lwp as dead.
13987 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
13988 ptids.
13989 (fetch_register, usr_store_inferior_registers)
13990 (regsets_fetch_inferior_registers)
13991 (regsets_store_inferior_registers, linux_read_memory)
13992 (linux_write_memory): Inline `inferior_pid'.
13993 (linux_look_up_symbols): Adjust to use per-process
13994 `thread_db_active'.
13995 (linux_request_interrupt): Adjust to use ptids.
13996 (linux_read_auxv): Inline `inferior_pid'.
13997 (initialize_low): Don't reference thread_db_active.
13998 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
13999 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
14000 (ps_getpid): Return the pid of the current inferior.
14001 * thread-db.c (proc_handle, thread_agent): Delete.
14002 (thread_db_create_event, thread_db_enable_reporting): Adjust to
14003 per-process data.
14004 (find_one_thread): Change argument type to ptid_t. Adjust to
14005 per-process data.
14006 (maybe_attach_thread): Adjust to per-process data and ptids.
14007 (thread_db_find_new_threads): Ditto.
14008 (thread_db_init): Ditto.
14009 * spu-low.c (spu_create_inferior, spu_attach): Add process to
14010 processes table. Adjust to use ptids.
14011 (spu_kill, spu_detach): Adjust interface. Remove process from
14012 processes table.
14013 (spu_join, spu_thread_alive): Adjust interface.
14014 (spu_wait): Adjust interface. Remove process from processes
14015 table. Adjust to use ptids.
14016 * win32-low.c (current_inferior_tid): Delete.
14017 (current_inferior_ptid): New.
14018 (debug_event_ptid): New.
14019 (thread_rec): Take a ptid. Adjust.
14020 (child_add_thread): Add `pid' argument. Adjust to use ptids.
14021 (child_delete_thread): Ditto.
14022 (do_initial_child_stuff): Add `attached' argument. Add process to
14023 processes table.
14024 (child_fetch_inferior_registers, child_store_inferior_registers):
14025 Adjust.
14026 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
14027 (win32_attach): Pass 1 to do_initial_child_stuff.
14028 (win32_kill): Adjust interface. Remove process from processes
14029 table.
14030 (win32_detach): Ditto.
14031 (win32_join): Adjust interface.
14032 (win32_thread_alive): Take a ptid.
14033 (win32_resume): Adjust to use ptids.
14034 (get_child_debug_event): Ditto.
14035 (win32_wait): Adjust interface. Remove exiting process from
14036 processes table.
14037
14038 2009-04-01 Pedro Alves <pedro@codesourcery.com>
14039
14040 Non-stop mode support.
14041
14042 * server.h (non_stop): Declare.
14043 (gdb_client_data, handler_func): Declare.
14044 (delete_file_handler, add_file_handler, start_event_loop):
14045 Declare.
14046 (handle_serial_event, handle_target_event, push_event)
14047 (putpkt_notif): Declare.
14048 * target.h (enum resume_kind): New.
14049 (struct thread_resume): Replace `step' field by `kind' field.
14050 (TARGET_WNOHANG): Define.
14051 (struct target_ops) <wait>: Add `options' argument.
14052 <supports_non_stop, async, start_non_stop>: New fields.
14053 (target_supports_non_stop, target_async): New.
14054 (start_non_stop): Declare.
14055 (mywait): Add `options' argument.
14056 * target.c (mywait): Add `options' argument. Print child exit
14057 notifications here.
14058 (start_non_stop): New.
14059 * server.c (non_stop, own_buf, mem_buf): New globals.
14060 (struct vstop_notif): New.
14061 (notif_queue): New global.
14062 (queue_stop_reply, push_event, discard_queued_stop_replies)
14063 (send_next_stop_reply): New.
14064 (start_inferior): Adjust to use resume_kind. Adjust to mywait
14065 interface changes.
14066 (attach_inferior): In non-stop mode, don't wait for the target
14067 here.
14068 (handle_general_set): Handle QNonStop.
14069 (handle_query): When handling qC, return the current general
14070 thread, instead of the first thread of the list.
14071 (handle_query): If the backend supports non-stop mode, include
14072 QNonStop+ in the qSupported query response.
14073 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
14074 and non-stop mode.
14075 (handle_v_attach, handle_v_run): Handle non-stop mode.
14076 (handle_v_stopped): New.
14077 (handle_v_requests): Report support for vCont;t. Handle vStopped.
14078 (myresume): Adjust to use resume_kind. Handle non-stop.
14079 (queue_stop_reply_callback): New.
14080 (handle_status): Handle non-stop mode.
14081 (main): Clear non_stop flag on reconnection. Use the event-loop.
14082 Refactor serial protocol handling from here ...
14083 (process_serial_event): ... to this new function. When GDB
14084 selects any thread, select one here. In non-stop mode, wait until
14085 GDB acks all pending events before exiting.
14086 (handle_serial_event, handle_target_event): New.
14087 * remote-utils.c (remote_open): Install remote_desc in the event
14088 loop.
14089 (remote_close): Remove remote_desc from the event loop.
14090 (putpkt_binary): Rename to...
14091 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
14092 (putpkt_binary): New as wrapper around putpkt_binary_1.
14093 (putpkt_notif): New.
14094 (prepare_resume_reply): In non-stop mode, don't change the
14095 general_thread.
14096 * event-loop.c: New.
14097 * Makefile.in (OBJ): Add event-loop.o.
14098 (event-loop.o): New rule.
14099
14100 * linux-low.h (pid_of): Moved here.
14101 (lwpid_of): New.
14102 (get_lwp_thread): Use lwpid_of.
14103 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
14104 * linux-low.c (pid_of): Delete.
14105 (inferior_pid): Use lwpid_of.
14106 (linux_event_pipe): New.
14107 (target_is_async_p): New.
14108 (delete_lwp): New.
14109 (handle_extended_wait): Use lwpid_of.
14110 (add_lwp): Don't set lwpid field.
14111 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
14112 (linux_kill_one_lwp): If killing a running lwp, stop it first.
14113 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
14114 (linux_detach_one_lwp): If detaching from a running lwp, stop it
14115 first. Adjust to linux_wait_for_event interface changes. Use
14116 lwpid_of.
14117 (linux_detach): Don't delete the main lwp here.
14118 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
14119 (status_pending_p): Don't consider explicitly suspended lwps.
14120 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
14121 pointer. Add OPTIONS argument. Change return type to int. Use
14122 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
14123 (linux_wait_for_event): Take an integer pid instead of a lwp_info
14124 pointer. Add status pointer argument. Return a pid instead of a
14125 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
14126 changes. In non-stop mode, don't switch to a random thread.
14127 (linux_wait): Rename to...
14128 (linux_wait_1): ... this. Add target_options argument, and handle
14129 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
14130 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
14131 clean exit and signal exit code. Don't stop all threads in
14132 non-stop mode. In all-stop mode, only stop all threads when
14133 reporting a stop to GDB. Handle explicit thread stop requests.
14134 (async_file_flush, async_file_mark): New.
14135 (linux_wait): New.
14136 (send_sigstop): Use lwpid_of.
14137 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
14138 interface changes. In non-stop mode, don't switch to a random
14139 thread.
14140 (linux_resume_one_lwp): Use lwpid_of.
14141 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
14142 (linux_resume_one_thread): ... this. Handle resume_stop. In
14143 non-stop mode, don't look for pending flag in all threads.
14144 (resume_status_pending_p): Don't consider explicitly suspended
14145 threads.
14146 (my_waitpid): Reimplement. Emulate __WALL.
14147 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
14148 Use lwpid_of.
14149 (sigchld_handler, linux_supports_non_stop, linux_async)
14150 (linux_start_non_stop): New.
14151 (linux_target_ops): Register linux_supports_non_stop, linux_async
14152 and linux_start_non_stop.
14153 (initialize_low): Install SIGCHLD handler.
14154 * thread-db.c (thread_db_create_event, find_one_thread)
14155 (thread_db_get_tls_address): Use lwpid_of.
14156 * win32-low.c (win32_detach): Adjust to use resume_kind.
14157 (win32_wait): Add `options' argument.
14158 * spu-low.c (spu_resume): Adjust to use resume_kind.
14159 (spu_wait): Add `options' argument.
14160
14161 2009-04-01 Pedro Alves <pedro@codesourcery.com>
14162
14163 Decouple target code from remote protocol.
14164
14165 * target.h (enum target_waitkind): New.
14166 (struct target_waitstatus): New.
14167 (struct target_ops) <wait>: Return an unsigned long. Take a
14168 target_waitstatus pointer instead of a char pointer.
14169 (mywait): Likewise.
14170 * target.c (mywait): Change prototype to return an unsigned long.
14171 Take a target_waitstatus pointer instead of a char pointer. Adjust.
14172 * server.h (thread_from_wait, old_thread_from_wait): Delete
14173 declarations.
14174 (prepare_resume_reply): Change prototype to take a
14175 target_waitstatus.
14176 * server.c (thread_from_wait, old_thread_from_wait): Delete.
14177 (last_status, last_ptid): New.
14178 (start_inferior): Remove "statusptr" argument. Adjust. Return a
14179 pid instead of a signal.
14180 (attach_inferior): Remove "status" and "signal" parameters.
14181 Adjust.
14182 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
14183 not as an address.
14184 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
14185 (handle_v_requests, myresume): Remove "status" and "signal"
14186 parameters. Adjust.
14187 (handle_status): New.
14188 (main): Delete local `status'. Adjust.
14189 * remote-utils.c: Include target.h.
14190 (prepare_resume_reply): Change prototype to take a
14191 target_waitstatus. Adjust.
14192
14193 * linux-low.c (linux_wait): Adjust to new target_ops->wait
14194 interface.
14195 * spu-low.c (spu_wait): Adjust.
14196 * win32-low.c (enum target_waitkind, struct target_waitstatus):
14197 Delete.
14198 (win32_wait): Adjust.
14199
14200 2009-04-01 Pedro Alves <pedro@codesourcery.com>
14201
14202 * target.h (struct thread_resume): Delete leave_stopped member.
14203 (struct target_ops): Add a `n' argument to the `resume' callback.
14204 * server.c (start_inferior): Adjust.
14205 (handle_v_cont, myresume): Adjust.
14206 * linux-low.c (check_removed_breakpoint): Adjust to resume
14207 interface change, and to removed leave_stopped field.
14208 (resume_ptr): Delete.
14209 (struct thread_resume_array): New.
14210 (linux_set_resume_request): Add new `arg' parameter. Adjust to
14211 resume interface change.
14212 (linux_continue_one_thread, linux_queue_one_thread)
14213 (resume_status_pending_p): Check if the resume field is NULL
14214 instead of checking the leave_stopped member.
14215 (linux_resume): Adjust to the target resume interface change.
14216 * spu-low.c (spu_resume): Adjust to the target resume interface
14217 change.
14218 * win32-low.c (win32_detach, win32_resume): Ditto.
14219
14220 2009-04-01 Pedro Alves <pedro@codesourcery.com>
14221
14222 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
14223 flag.
14224 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
14225 pending.
14226 (linux_continue_one_thread): Only preserve the stepping flag if
14227 there's a pending breakpoint.
14228
14229 2009-03-31 Pedro Alves <pedro@codesourcery.com>
14230
14231 * server.c (main): After the inferior having exited, call
14232 remote_close before exiting gdbserver.
14233
14234 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
14235
14236 Fix size of FPSCR in Power 7 processors.
14237 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
14238 (PPC_FEATURE_HAS_DFP): New #define.
14239 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
14240 size of the FPSCR.
14241
14242 2009-03-23 Pedro Alves <pedro@codesourcery.com>
14243
14244 * server.c (handle_query) Whitespace and formatting.
14245
14246 2009-03-22 Pedro Alves <pedro@codesourcery.com>
14247
14248 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
14249 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
14250 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
14251 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
14252 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
14253 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
14254 Makefile.in, configure.ac: Fix whitespace throughout.
14255 * configure: Regenerate.
14256
14257 2009-03-22 Pedro Alves <pedro@codesourcery.com>
14258
14259 * inferiors.c (find_inferior): Make it safe for the callback
14260 function to delete the currently iterated inferior.
14261
14262 2009-03-22 Pedro Alves <pedro@codesourcery.com>
14263
14264 * Makefile.in (linuw_low_h): Move higher.
14265 (thread-db.o): Depend on $(linux_low_h).
14266
14267 2009-03-17 Pedro Alves <pedro@codesourcery.com>
14268
14269 Rename "process" to "lwp" throughout.
14270
14271 * linux-low.c (all_processes): Rename to...
14272 (all_lwps): ... this.
14273 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
14274 (add_process): Rename to ...
14275 (add_lwp): ... this. Adjust.
14276 (linux_create_inferior): Adjust.
14277 (linux_attach_lwp): Adjust.
14278 (linux_attach): Adjust.
14279 (linux_kill_one_process): Rename to ...
14280 (linux_kill_one_lwp): ... this. Adjust.
14281 (linux_kill): Adjust.
14282 (linux_detach_one_process): Rename to ...
14283 (linux_detach_one_lwp): ... this. Adjust.
14284 (linux_detach): Adjust.
14285 (check_removed_breakpoint): Adjust.
14286 (status_pending_p): Adjust.
14287 (linux_wait_for_process): Rename to ...
14288 (linux_wait_for_lwp): ... this. Adjust.
14289 (linux_wait_for_event): Adjust.
14290 (send_sigstop): Adjust.
14291 (wait_for_sigstop): Adjust.
14292 (stop_all_processes): Rename to ...
14293 (stop_all_lwps): ... this.
14294 (linux_resume_one_process): Rename to ...
14295 (linux_resume_one_lwp): ... this. Adjust.
14296 (linux_set_resume_request, linux_continue_one_thread)
14297 (linux_queue_one_thread, resume_status_pending_p)
14298 (usr_store_inferior_registers, regsets_store_inferior_registers)
14299 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
14300 Adjust.
14301 * linux-low.h (get_process): Rename to ...
14302 (get_lwp): ... this. Adjust.
14303 (get_thread_process): Rename to ...
14304 (get_thread_lwp): ... this. Adjust.
14305 (get_process_thread): Rename to ...
14306 (get_lwp_thread): ... this. Adjust.
14307 (struct process_info): Rename to ...
14308 (struct lwp_info): ... this.
14309 (all_processes): Rename to ...
14310 (all_lwps): ... this.
14311 * proc-service.c (ps_lgetregs): Adjust.
14312 * thread-db.c (thread_db_create_event, find_one_thread)
14313 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
14314
14315 2009-03-14 Pedro Alves <pedro@codesourcery.com>
14316
14317 * server.c (handle_query): Handle "qAttached".
14318
14319 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
14320
14321 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
14322 GPLv3, update license URL.
14323
14324 2009-03-01 Doug Evans <dje@google.com>
14325
14326 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
14327 (server_h): Add gdb_signals.h.
14328 (signals.o): Update.
14329 * server.h (target_signal_from_host,target_signal_to_host_p)
14330 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
14331
14332 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
14333
14334 * remote-utils.c (getpkt): Also generate remote-debug
14335 information if noack_mode is set.
14336
14337 2009-02-06 Pedro Alves <pedro@codesourcery.com>
14338
14339 * server.c (handle_query): Report qXfer:siginfo:read and
14340 qXfer:siginfo:write as supported and handle them.
14341 * target.h (struct target_ops) <qxfer_siginfo>: New field.
14342 * linux-low.c (linux_xfer_siginfo): New.
14343 (linux_target_ops): Set it.
14344
14345 2009-01-26 Pedro Alves <pedro@codesourcery.com>
14346
14347 * server.c (gdbserver_usage): Mention --remote-debug.
14348 (main): Accept '--remote-debug' switch.
14349
14350 2009-01-18 Doug Evans <dje@google.com>
14351
14352 * regcache.c (new_register_cache): No need to check result of xcalloc.
14353 * server.c (handle_search_memory): Back out calls to xmalloc,
14354 result is checked and error is returned to user upon failure.
14355 (handle_query): Ditto. Add more checks for result of malloc.
14356 (handle_v_cont): Check result of malloc, report error back to
14357 user upon failure.
14358 (handle_v_run): Ditto. Call freeargv.
14359 * server.h (freeargv): Declare.
14360 * utils.c (freeargv): New fn.
14361
14362 2009-01-15 Doug Evans <dje@google.com>
14363
14364 * gdbreplay.c (perror_with_name): Make arg const char *.
14365 * server.h (target_signal_to_name): Make return type const char *.
14366 * thread-db.c (thread_db_err_str): Make return type const char *.
14367 * utils.c (perror_with_name): Make arg const char *.
14368
14369 2009-01-14 Pedro Alves <pedro@codesourcery.com>
14370
14371 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
14372 when handling a EXIT_PROCESS_DEBUG_EVENT.
14373
14374 2009-01-06 Joel Brobecker <brobecker@adacore.com>
14375
14376 * gdbreplay.c (gdbreplay_version): Update copyright year.
14377 * server.c (gdbserver_version): Likewise.
14378
14379 2009-01-05 Doug Evans <dje@google.com>
14380
14381 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
14382 (handle_extended_wait): Improve comment.
14383
14384 2008-12-13 Doug Evans <dje@google.com>
14385
14386 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
14387 * server.h (ATTR_MALLOC): New macro.
14388 (xmalloc,xcalloc,xstrdup): Declare.
14389 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
14390 * inferiors.c: Ditto.
14391 * linux-low.c: Ditto.
14392 * mem-break.c: Ditto.
14393 * regcache.c: Ditto.
14394 * remote-utils.c: Ditto.
14395 * server.c: Ditto.
14396 * target.c: Ditto.
14397 * win32-low.c: Ditto.
14398
14399 2008-12-12 Doug Evans <dje@google.com>
14400
14401 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
14402 in debugging printf.
14403
14404 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
14405
14406 2008-12-09 Doug Evans <dje@google.com>
14407
14408 * linux-low.h (struct process_info): Delete member tid, unused.
14409 * thread-db.c (find_one_thread): Update.
14410 (maybe_attach_thread): Update.
14411
14412 2008-12-02 Pedro Alves <pedro@codesourcery.com>
14413
14414 * target.h (struct target_ops): Add qxfer_osdata member.
14415 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
14416 and dirent.h.
14417 (linux_qxfer_osdata): New functions.
14418 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
14419 callback.
14420 * server.c (handle_query): Handle "qXfer:osdata:read:".
14421 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
14422 (buffer_xml_printf): New functions.
14423 * server.h (struct buffer): New.
14424 (buffer_grow_str, buffer_grow_str0): New macros.
14425 (buffer_grow, buffer_free, buffer_init, buffer_finish)
14426 (buffer_xml_printf): Declare.
14427
14428 2008-11-24 Doug Evans <dje@google.com>
14429
14430 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
14431
14432 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
14433
14434 * server.c (handle_v_run): Always use the supplied argument list.
14435
14436 2008-11-19 Bob Wilson <bob.wilson@acm.org>
14437
14438 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
14439 (xtensa_regmap_table): Add entry for scompare1.
14440
14441 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
14442
14443 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
14444 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
14445 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
14446 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
14447 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
14448 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
14449 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
14450 XML target descriptions.
14451 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
14452 when inferior is running on an ISA 2.05 or later processor. Add
14453 special case to return offset for full 64-bit slot of FPSCR when
14454 in 32-bits.
14455
14456 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
14457
14458 * Makefile.in (SFILES, clean): Added sparc64 files.
14459 (reg-sparc64.o, reg-sparc64.c): New.
14460 * configure.srv (sparc*-*-linux*): New configuration.
14461 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
14462 syscall arguments for SPARC.
14463 (regsets_store_inferior_registers): Likewise.
14464 * linux-sparc-low.c: New file.
14465
14466 2008-10-21 Doug Evans <dje@google.com>
14467
14468 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
14469 (READLINE_DIR,READLINE_DEP): Delete.
14470 (INTERNAL_CFLAGS): Update.
14471 (LINTFLAGS): Update.
14472
14473 2008-10-10 Pedro Alves <pedro@codesourcery.com>
14474
14475 * server.c (handle_v_run): If GDB didn't specify an argv, use the
14476 whole argv from the last run, not just argv[0].
14477
14478 2008-09-08 Pedro Alves <pedro@codesourcery.com>
14479
14480 * regcache.c (new_register_cache): Return NULL if the register
14481 cache size isn't known yet.
14482 (free_register_cache): Avoid dereferencing a NULL regcache.
14483
14484 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
14485
14486 * configure.srv: Merge MIPS and MIPS64.
14487
14488 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
14489
14490 * Makefile.in (uninstall): Apply $(EXEEXT) too.
14491
14492 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
14493
14494 * Makefile.in: Add required vsx dependencies.
14495
14496 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
14497 Declare init_registers_powerpc_vsx32l.
14498 Declare init_registers_powerpc_vsx64l.
14499 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
14500 (ppc_arch_setup): Check for VSX in hwcap.
14501 (ppc_fill_vsxregset): New function.
14502 (ppc_store_vsxregset): New function.
14503 Add new VSX entry in regset_info target_regsets.
14504
14505 * configure.srv: Add new VSX dependencies.
14506
14507 2008-08-12 Pedro Alves <pedro@codesourcery.com>
14508
14509 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
14510 (remote_open): Set or clear transport_is_reliable.
14511 (putpkt_binary): Don't expect acks in noack mode.
14512 (getpkt): Don't send ack/nac in noack mode.
14513 * server.c (handle_general_set): Handle QStartNoAckMode.
14514 (handle_query): If connected by tcp pass QStartNoAckMode+ in
14515 qSupported.
14516 (main): Reset noack_mode on every connection.
14517 * server.h (noack_mode): Declare.
14518
14519 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
14520
14521 * Makefile.in (GDBREPLAY_OBS): New variable.
14522 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
14523
14524 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
14525 Daniel Jacobowitz <dan@codesourcery.com>
14526
14527 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
14528 (usr_store_inferior_registers): Likewise.
14529 (regsets_store_inferior_registers): Likewise.
14530
14531 2008-07-31 Rolf Jansen <rj@surtec.com>
14532 Pedro Alves <pedro@codesourcery.com>
14533
14534 * configure.ac: Check for memmem declaration.
14535 * server.c [HAVE_MALLOC_H]: Include malloc.h.
14536 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
14537 (disable_packet_qfThreadInfo): Unconditionally compile.
14538 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
14539 * configure, config.in: Regenerate.
14540
14541 2008-07-28 Doug Kwan <dougkwan@google.com>
14542
14543 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
14544 (linux_write_memory): Remove declaration of errno.
14545
14546 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
14547
14548 * linux-low.c (handle_extended_wait): Do not use "status"
14549 variable uninitialized.
14550
14551 2008-07-07 Pedro Alves <pedro@codesourcery.com>
14552
14553 * server.c (handle_v_attach): Inhibit reporting dll changes.
14554
14555 2008-06-27 Pedro Alves <pedro@codesourcery.com>
14556
14557 * remote-utils.c (prepare_resume_reply): If requested, don't
14558 output "thread:TID" in the T stop reply.
14559
14560 * server.c (disable_packet_vCont, disable_packet_Tthread)
14561 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
14562 (handle_query): If requested, disable support for qC, qfThreadInfo
14563 and qsThreadInfo.
14564 (handle_v_requests): If requested, disable support for vCont.
14565 (gdbserver_show_disableable): New.
14566 (main): Handle --disable-packet and --disable-packet=LIST.
14567
14568 * server.h (disable_packet_vCont, disable_packet_Tthread)
14569 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
14570
14571 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
14572
14573 * server.c (gdbserver_usage): Mention --version.
14574
14575 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
14576
14577 * Makefile.in (gdbreplay.o): New rule.
14578
14579 2008-06-06 Joseph Myers <joseph@codesourcery.com>
14580
14581 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
14582 message, not gdbserver.
14583
14584 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
14585 Nathan Sidwell <nathan@codesourcery.com>
14586 Joseph Myers <joseph@codesourcery.com>
14587
14588 * acinclude.m4: Include ../../config/acx.m4.
14589 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
14590 * configure, config.in: Regenerate.
14591 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
14592 * server.c (gdbserver_version): Print PKGVERSION.
14593 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
14594 (main): Adjust gdbserver_usage calls.
14595 * gdbreplay.c (version, host_name): Add declarations.
14596 (gdbreplay_version, gdbreplay_usage): New.
14597 (main): Accept --version and --help options.
14598
14599 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
14600
14601 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
14602 (arm_breakpoint_at): Handle Thumb.
14603 (the_low_target): Add comment.
14604
14605 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
14606
14607 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
14608
14609 2008-05-09 Doug Evans <dje@google.com>
14610
14611 * server.h (decode_search_memory_packet): Declare.
14612 * remote-utils.c (decode_search_memory_packet): New fn.
14613 * server.c (handle_search_memory_1): New fn.
14614 (handle_search_memory): New fn.
14615 (handle_query): Process qSearch:memory packets.
14616
14617 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
14618
14619 * regcache.c (registers_length): Remove.
14620 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
14621 full register packet.
14622 * regcache.h (registers_length): Remove prototype.
14623 * server.h (PBUFSIZ): Define to 16384.
14624
14625 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
14626
14627 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
14628 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
14629 powerpc-64l.o, and powerpc-altivec64l.o.
14630 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
14631 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
14632 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
14633 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
14634 rs6000/power-linux.xml, and rs6000/power64-linux.xml
14635 to srv_xmlfiles.
14636
14637 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
14638 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
14639 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
14640 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
14641 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
14642 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
14643 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
14644 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
14645 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
14646 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
14647 (clean): Update.
14648
14649 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
14650 (init_registers_powerpc_32l): ... this new prototype.
14651 (init_registers_powerpc_32): Remove, replace by ...
14652 (init_registers_powerpc_altivec32l): ... this new prototype.
14653 (init_registers_powerpc_e500): Remove, replace by ...
14654 (init_registers_powerpc_e500l): ... this new prototype.
14655 (init_registers_ppc64): Remove, replace by ...
14656 (init_registers_powerpc_64l): ... this new prototype.
14657 (init_registers_powerpc_64): Remove, replace by ...
14658 (init_registers_powerpc_altivec64l): ... this new prototype.
14659 (ppc_num_regs): Set to 73.
14660 (PT_ORIG_R3, PT_TRAP): Define if necessary.
14661 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
14662 (ppc_cannot_store_register): Handle orig_r3 and trap.
14663 (ppc_arch_setup): Update init_registers_... calls.
14664 (ppc_fill_gregset): Handle orig_r3 and trap.
14665
14666 * inferiors.c (clear_inferiors): Reset current_inferior.
14667
14668 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
14669
14670 * acinclude.m4: Add override.m4.
14671 * configure: Regenerate.
14672
14673 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
14674
14675 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
14676 initial call to init_register_ppc64.
14677
14678 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
14679
14680 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
14681 single powerpc*-*-linux* case.
14682 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
14683
14684 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
14685
14686 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
14687 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
14688 from reg_xmlfiles.
14689 * linux-ppc-low.c: Include <elf.h>.
14690 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
14691 (ppc_hwcap): New global variable.
14692 (ppc_regmap): Remove __SPE__ #ifdef sections.
14693 (ppc_regmap_e500): New global variable.
14694 (ppc_cannot_store_register): Update __SPE__ special case.
14695 (ppc_get_hwcap): New function.
14696 (ppc_arch_setup): Use it to determine whether inferior supports
14697 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
14698 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
14699 Do not access registers if target does not support AltiVec.
14700 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
14701 Do not access registers if target does not support SPE.
14702 (target_regsets): Unconditionally include AltiVec and SPE regsets.
14703
14704 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
14705
14706 * linux-low.c (disabled_regsets, num_regsets): New.
14707 (use_regsets_p): Delete.
14708 (linux_wait_for_process): Clear disabled_regsets.
14709 (regsets_fetch_inferior_registers): Check and set it.
14710 (regsets_store_inferior_registers): Likewise.
14711 (linux_fetch_registers, linux_store_registers): Do not use
14712 use_regsets_p.
14713 (initialize_low): Allocate disabled_regsets.
14714
14715 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
14716
14717 * Makefile.in (LIBOBJS): New.
14718 (OBS): Use LIBOBJS.
14719 (memmem.o): New rule.
14720 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
14721 * configure: Regenerated.
14722
14723 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
14724
14725 * server.c (handle_query): Never return "unsupported" for
14726 qXfer:features:read queries.
14727
14728 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
14729
14730 * server.c (get_features_xml): Fix inverted condition.
14731 (handle_query): Always support qXfer:feature:read.
14732
14733 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
14734
14735 * server.c (wrapper_argv): New.
14736 (start_inferior): Handle wrapper_argv. If set, expect an extra
14737 trap.
14738 (gdbserver_usage): Document --wrapper.
14739 (main): Parse --wrapper.
14740
14741 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
14742
14743 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
14744 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
14745 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
14746 (ppc_set_pc): Likewise.
14747 (ppc_arch_setup): New function.
14748 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
14749 of collect_register.
14750 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
14751
14752 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
14753
14754 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
14755 instead of linux-ppc64-low.o.
14756 * linux-ppc64-low.c: Remove file.
14757 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
14758 (linux-ppc64-low.o): Remove rule.
14759
14760 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
14761 (init_registers_powerpc_64): Likewise.
14762 (ppc_regmap): Conditionally define depending on __powerpc64__.
14763 (ppc_cannot_store_register): Do not special-case "fpscr" when
14764 compiled on __powerpc64__.
14765 (ppc_collect_ptrace_register): New function.
14766 (ppc_supply_ptrace_register): New function.
14767 (ppc_breakpoint): Change type to "unsigned int".
14768 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
14769 (the_low_target): Conditionally provide initializers for the
14770 arch_setup member depending on __powerpc64__. Install
14771 collect_ptrace_register and supply_ptrace_register members.
14772
14773 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
14774
14775 * regcache.h (gdbserver_xmltarget): Add extern declaration.
14776 * server.c (gdbserver_xmltarget): Define.
14777 (get_features_xml): Use it to replace "target.xml" and arch_string.
14778
14779 * configure.srv: Remove srv_xmltarget. Add XML files that were
14780 mentioned there to srv_xmlfiles instead. Remove conditional tests
14781 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
14782 srv_xmlfiles and srv_regobj to include all possible choices.
14783 * configure.ac (srv_xmltarget): Remove.
14784 (srv_xmlfiles): Do not add "target.xml".
14785 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
14786 checks for supplementary target information.
14787 * configure: Regenerate.
14788 * Makefile.in (XML_TARGET): Remove.
14789 (target.xml): Remove rule.
14790 (clean): Do not clean up target.xml.
14791 (.PRECIOUS): Do not mention target.xml.
14792
14793 * target.h (struct target_ops): Remove arch_string member.
14794 * linux-low.c (linux_arch_string): Remove.
14795 (linux_target_ops): Remove arch_string initializer.
14796 * linux-low.h (struct linux_target_ops): Remove arch_string member.
14797 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
14798 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
14799 * spu-low.c (spu_arch_string): Remove.
14800 (spu_target_ops): Remove arch_string initializer.
14801 * win32-low.c (win32_arch_string): Remove.
14802 (win32_target_ops): Remove arch_string initializer.
14803 * win32-low.h (struct win32_target_ops): Remove arch_string member.
14804 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
14805 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
14806
14807 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
14808
14809 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
14810 by collect_ptrace_register and supply_ptrace_register hooks.
14811 * linux-low.c (fetch_register): Use supply_ptrace_register callback
14812 instead of checking for the_low_target.left_pad_xfer.
14813 (usr_store_inferior_registers): Use collect_ptrace_register callback
14814 instead of checking for the_low_target.left_pad_xfer.
14815
14816 * linux-s390-low.c (s390_collect_ptrace_register): New function.
14817 (s390_supply_ptrace_register): Likewise.
14818 (s390_fill_gregset): Call s390_collect_ptrace_register.
14819 (the_low_target): Update.
14820
14821 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
14822 (ppc_supply_ptrace_register): Likewise.
14823 (the_low_target): Update.
14824
14825 * linux-i386-low.c (the_low_target): Update.
14826 * linux-x86-64-low.c (the_low_target): Update.
14827
14828 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
14829
14830 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
14831 reg-s390.o and reg-s390x.o.
14832
14833 * linux-low.c (new_inferior): New global variable.
14834 (linux_create_inferior, linux_attach): Set it.
14835 (linux_wait_for_process): Call the_low_target.arch_setup after the
14836 target has stopped for the first time.
14837 (initialize_low): Do not call the_low_target.arch_setup.
14838
14839 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
14840 (s390_set_pc): Likewise.
14841 (s390_arch_setup): New function.
14842 (the_low_target): Use s390_arch_setup as arch_setup routine.
14843
14844 * regcache.c (realloc_register_cache): New function.
14845 (set_register_cache): Call it for each existing regcache.
14846
14847 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
14848
14849 * server.h (init_registers): Remove prototype.
14850
14851 * linux-low.h (struct linux_target_ops): Add arch_setup field.
14852 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
14853 instead of init_registers ().
14854 * linux-arm-low.c (init_registers_arm): Add prototype.
14855 (init_registers_arm_with_iwmmxt): Likewise.
14856 (the_low_target): Add initializer for arch_setup field.
14857 * linux-cris-low.c (init_registers_cris): Add prototype.
14858 (the_low_target): Add initializer for arch_setup field.
14859 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
14860 (the_low_target): Add initializer for arch_setup field.
14861 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
14862 (the_low_target): Add initializer for arch_setup field.
14863 * linux-ia64-low.c (init_registers_ia64): Add prototype.
14864 (the_low_target): Add initializer for arch_setup field.
14865 * linux-m32r-low.c (init_registers_m32r): Add prototype.
14866 (the_low_target): Add initializer for arch_setup field.
14867 * linux-m68k-low.c (init_registers_m68k): Add prototype.
14868 (the_low_target): Add initializer for arch_setup field.
14869 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
14870 (init_registers_mips64_linux): Likewise.
14871 (the_low_target): Add initializer for arch_setup field.
14872 * linux-ppc-low.c (init_registers_ppc): Add prototype.
14873 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
14874 (the_low_target): Add initializer for arch_setup field.
14875 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
14876 (init_registers_powerpc_64): Likewise.
14877 (the_low_target): Add initializer for arch_setup field.
14878 * linux-s390-low.c (init_registers_s390): Add prototype.
14879 (init_registers_s390x): Likewise.
14880 (the_low_target): Add initializer for arch_setup field.
14881 * linux-sh-low.c (init_registers_sh): Add prototype.
14882 (the_low_target): Add initializer for arch_setup field.
14883 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
14884 (the_low_target): Add initializer for arch_setup field.
14885 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
14886 (the_low_target): Add initializer for arch_setup field.
14887
14888 * win32-low.h (struct win32_target_ops): Add arch_setup field.
14889 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
14890 instead of init_registers ().
14891 * win32-arm-low.c (init_registers_arm): Add prototype.
14892 (the_low_target): Add initializer for arch_setup field.
14893 * win32-i386-low.c (init_registers_i386): Add prototype.
14894 (the_low_target): Add initializer for arch_setup field.
14895
14896 * spu-low.c (init_registers_spu): Add prototype.
14897 (initialize_low): Call initialie_registers_spu () instead of
14898 initialize_registers ().
14899
14900 2008-02-19 Pedro Alves <pedro@codesourcery.com>
14901
14902 * server.c (handle_v_requests): When handling the vRun and vAttach
14903 packets, if already debugging a process, don't kill it. Return an
14904 error instead.
14905
14906 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
14907
14908 * server.c (handle_query): Correct length check.
14909
14910 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
14911
14912 * win32-low.c (do_initial_child_stuff): Add process handle
14913 parameter. Set current_process_handle and current_process_id from the
14914 parameters. Clear globals.
14915 (win32_create_inferior): Don't set current_process_handle and
14916 current_process_id here. Instead pass them on the call to
14917 do_initial_child_stuff.
14918 (win32_attach): Likewise.
14919 (win32_clear_inferiors): New.
14920 (win32_kill): Don't close the current process handle or the
14921 current thread handle here. Instead call win32_clear_inferiors.
14922 (win32_detach): Don't open a new handle to the process. Call
14923 win32_clear_inferiors.
14924 (win32_join): Don't rely on current_process_handle; open a new
14925 handle using the process id.
14926 (win32_wait): Call win32_clear_inferiors when the inferior process
14927 has exited.
14928
14929 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
14930
14931 * server.c (monitor_show_help): Add "exit".
14932
14933 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
14934
14935 * Makefile.in (SFILES): Add linux-xtensa-low.c.
14936 (clean): Add reg-xtensa.c.
14937 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
14938 * configure.srv (xtensa*-*-linux*) New target.
14939 * linux-xtensa-low.c: New.
14940 * xtensa-xtregs.c: New.
14941
14942 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
14943
14944 * hostio.c: Don't include errno.h.
14945 (errno_to_fileio_errno): Move to hostio-errno.
14946 * hostio.c: (hostio_error): Remove the error parameter. Defer the
14947 error number outputting to the target->hostio_last_error callback.
14948 (hostio_packet_error): Use FILEIO_EINVAL directly.
14949 (handle_open, handle_pread, hostio_error, handle_unlink): Update
14950 calls to hostio_error.
14951 * hostio-errno.c: New.
14952 * server.h (hostio_last_error_from_errno): Declare.
14953 * target.h (target_ops): Add hostio_last_error member.
14954 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
14955 as hostio_last_error handler.
14956 * spu-low.c (spu_target_ops): Likewise.
14957 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
14958 (wince_hostio_last_error): New functions.
14959 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
14960 as hostio_last_error handler.
14961 (win32_target_ops) [!_WIN32_WCE]: Register
14962 hostio_last_error_from_errno as hostio_last_error handler.
14963 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
14964 (hostio-errno.o): New rule.
14965 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
14966 * configure.srv (srv_hostio_err_objs): New variable. Default to
14967 hostio-errno.o.
14968 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
14969 * configure: Regenerate.
14970
14971 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
14972
14973 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
14974 (linux_kill, linux_detach): Clean up the process list.
14975 * remote-utils.c (remote_open): Improve port number parsing.
14976 (putpkt_binary, input_interrupt): Only send interrupts if the target
14977 is running.
14978 * server.c (extended_protocol): Make static.
14979 (attached): Define earlier.
14980 (exit_requested, response_needed, program_argv): New variables.
14981 (target_running): New.
14982 (start_inferior): Clear attached here.
14983 (attach_inferior): Set attached here.
14984 (require_running): Define.
14985 (handle_query): Use require_running and target_running. Implement
14986 "monitor exit".
14987 (handle_v_attach, handle_v_run): New.
14988 (handle_v_requests): Use require_running. Handle vAttach and vRun.
14989 (gdbserver_usage): Update.
14990 (main): Redo argument parsing. Handle --debug and --multi. Handle
14991 --attach along with other options or after the port. Save
14992 program_argv. Support no initial program. Resynchronize
14993 communication with GDB after an error. Handle "monitor exit".
14994 Use require_running and target_running. Always allow the extended
14995 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
14996 restart in extended mode.
14997 * README: Refer to the GDB manual. Update --attach usage.
14998
14999 2007-12-20 Andreas Schwab <schwab@suse.de>
15000
15001 * linux-low.c (STACK_SIZE): Define.
15002 (linux_tracefork_child): Use it. Use __clone2 on ia64.
15003 (linux_test_for_tracefork): Likewise.
15004
15005 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
15006
15007 * linux-low.c (linux_wait_for_event): Update messages. Do not
15008 reinsert auto-delete breakpoints.
15009 * mem-break.c (struct breakpoint): Change return type of handler to
15010 int.
15011 (set_breakpoint_at): Update handler type.
15012 (reinsert_breakpoint_handler): Return 1 instead of calling
15013 delete_breakpoint.
15014 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
15015 setting a new one.
15016 (check_breakpoints): Delete auto-delete breakpoints and return 2.
15017 * mem-break.h (set_breakpoint_at): Update handler type.
15018 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
15019 * win32-low.c (auto_delete_breakpoint): New.
15020 (get_child_debug_event): Use it.
15021
15022 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
15023
15024 * configure.ac: Check for pread and pwrite.
15025 * hostio.c (handle_pread): Fall back to lseek and read.
15026 (handle_pwrite): Fall back to lseek and write.
15027 * config.in, configure: Regenerated.
15028
15029 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
15030
15031 * server.c (myresume): Add own_buf argument.
15032 (main): Update calls.
15033
15034 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
15035
15036 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
15037 * remote-utils.c (remote_open): Do not call disable_async_io.
15038 (block_async_io): Delete.
15039 (unblock_async_io): Make static.
15040 (initialize_async_io): New.
15041 * server.c (handle_v_cont): Handle async I/O here.
15042 (myresume): Likewise. Move other common resume tasks here...
15043 (main): ... from here. Call initialize_async_io. Disable async
15044 I/O before the main loop.
15045 * server.h (initialize_async_io): Declare.
15046 (block_async_io, unblock_async_io): Delete prototypes.
15047 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
15048
15049 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
15050
15051 * remote-utils.c (readchar): Allow binary data in received messages.
15052
15053 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15054
15055 * win32-low.c (attaching): New global.
15056 (win32_create_inferior): Clear the `attaching' global.
15057 (win32_attach): Set the `attaching' global.
15058 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
15059 attaching. Only set a breakpoint at the entry point if not
15060 attaching.
15061
15062 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15063
15064 * server.c (main): Don't report dll events on the initial
15065 connection on attaches.
15066
15067 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15068
15069 * server.c (main): Relax numerical bases supported for the pid of
15070 the --attach command line argument.
15071
15072 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15073
15074 * win32-low.c (win32_attach): Call OpenProcess before
15075 DebugActiveProcess, not after. Add last error output to error
15076 call.
15077
15078 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15079
15080 * win32-low.c (win32_get_thread_context)
15081 (win32_set_thread_context): New functions.
15082 (thread_rec): Use win32_get_thread_context.
15083 (continue_one_thread, win32_resume): Use win32_set_thread_context.
15084 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
15085 field.
15086
15087 2007-12-03 Leo Zayas
15088 Pedro Alves <pedro_alves@portugalmail.pt>
15089
15090 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
15091 global variables.
15092 (child_add_thread): Minor cleanup.
15093 (child_continue): Resume artificially suspended threads before
15094 calling ContinueDebugEvent.
15095 (suspend_one_thread): New.
15096 (fake_breakpoint_event): New.
15097 (get_child_debug_event): Change return type to int. Check here if
15098 gdb sent an interrupt request. If a soft interrupt was requested,
15099 fake a breakpoint event. Return 0 if there is no event to handle,
15100 and 1 otherwise.
15101 (win32_wait): Don't check here if gdb sent an interrupt request.
15102 Ensure there is a valid event to handle.
15103 (win32_request_interrupt): Add soft interruption method as last
15104 resort.
15105
15106 2007-12-03 Leo Zayas
15107 Pedro Alves <pedro_alves@portugalmail.pt>
15108
15109 * win32-low.h (win32_thread_info): Add descriptions to the
15110 structure members. Replace `suspend_count' counter by a
15111 `suspended' flag.
15112 * win32-low.c (thread_rec): Update condition of when to get the
15113 context from the inferior. Rely on ContextFlags being set if it
15114 has already been retrieved. Only suspend the inferior thread if
15115 we haven't already. Warn if that fails.
15116 (continue_one_thread): s/suspend_count/suspended/. Only call
15117 ResumeThread once. Warn if that fails.
15118
15119 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
15120
15121 * win32-low.c (win32_wait): Don't read from the inferior when it
15122 has already exited.
15123
15124 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
15125
15126 * Makefile.in (win32_low_h): New variable.
15127 (win32-low.o): Add dependency on $(win32_low_h).
15128 (win32-arm-low.o, win32-i386-low.o): New rules.
15129
15130 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
15131
15132 * hostio.c: Correct copyright year.
15133
15134 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
15135
15136 * Makefile.in (OBS): Add hostio.o.
15137 (hostio.o): New rule.
15138 * server.h (handle_vFile): Declare.
15139 * hostio.c: New file.
15140 * server.c (handle_v_requests): Take packet_len and new_packet_len
15141 for binary packets. Call handle_vFile.
15142 (main): Update call to handle_v_requests.
15143
15144 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
15145
15146 * linux-low.c: Include <sched.h>.
15147
15148 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
15149
15150 * linux-low.c (linux_tracefork_grandchild): New.
15151 (linux_tracefork_child): Use clone.
15152 (linux_test_for_tracefork): Use clone; allocate and free a stack.
15153
15154 2007-10-31 Joel Brobecker <brobecker@adacore.com>
15155
15156 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
15157
15158 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
15159
15160 * linux-low.c (handle_extended_wait): Handle unexpected signals.
15161
15162 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
15163
15164 * inferiors.c (change_inferior_id): Delete.
15165 (add_pid_to_list, pull_pid_from_list): New.
15166 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
15167 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
15168 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
15169 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
15170 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
15171 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
15172 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
15173 (using_threads): Always set to 1.
15174 (handle_extended_wait): New.
15175 (add_process): Do not set TID.
15176 (linux_create_inferior): Set must_set_ptrace_flags.
15177 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
15178 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
15179 (linux_thread_alive): Rename TID argument to LWPID.
15180 (linux_wait_for_process): Handle unknown processes. Do not use TID.
15181 (linux_wait_for_event): Do not use TID or check using_threads. Update
15182 call to dead_thread_notify. Call handle_extended_wait.
15183 (linux_create_inferior): Use PTRACE_SETOPTIONS.
15184 (send_sigstop): Delete sigstop_sent.
15185 (wait_for_sigstop): Avoid TID.
15186 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
15187 (linux_test_for_tracefork): New.
15188 (linux_lookup_signals): Use thread_db_active and
15189 linux_supports_tracefork_flag.
15190 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
15191 * linux-low.h (get_process_thread): Avoid TID.
15192 (struct process_ifo): Move thread_known and tid to the end. Remove
15193 sigstop_sent.
15194 (linux_attach_lwp, thread_db_init): Update prototypes.
15195 * server.h (change_inferior_id): Delete prototype.
15196 (add_pid_to_list, pull_pid_from_list): New prototypes.
15197 * thread-db.c (thread_db_use_events): New.
15198 (find_first_thread): Rename to...
15199 (find_one_thread): ...this. Update callers and messages. Do not
15200 call fatal. Check thread_db_use_events. Do not call
15201 change_inferior_id or new_thread_notify.
15202 (maybe_attach_thread): Update. Do not call new_thread_notify.
15203 (thread_db_init): Set thread_db_use_events. Check use_events.
15204 * utils.c (fatal, warning): Correct message prefix.
15205
15206 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
15207
15208 * Makefile.in (clean): Remove new files.
15209 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
15210 (powerpc-64.o, powerpc-64.c): New rules.
15211 * configure.srv: Use alternate register sets for powerpc64-*-linux*
15212 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
15213 with SPE.
15214 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
15215 SPE targets.
15216 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
15217 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
15218 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
15219 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
15220 (target_regsets): Add AltiVec and SPE register sets.
15221 * configure.ac: Check for AltiVec and SPE.
15222 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
15223 (ppc_fill_vrregset, ppc_store_vrregset): New.
15224 (target_regsets): Add AltiVec register set.
15225 * configure: Regenerated.
15226
15227 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
15228
15229 * linux-low.c (O_LARGEFILE): Define.
15230 (linux_read_memory): Use /proc/PID/mem.
15231 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
15232 * configure, config.in: Regenerated.
15233
15234 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
15235
15236 * linux-low.c (linux_wait_for_event): Do not pass signals while
15237 single-stepping.
15238
15239 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
15240
15241 * win32-low.c (create_process): New.
15242 (win32_create_inferior): Use create_process instead of
15243 CreateProcess. If create_process failed retry appending an ".exe"
15244 suffix. Store the GetLastError result immediatelly after
15245 create_process calls and use it on the call to error.
15246
15247 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
15248
15249 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
15250
15251 2007-08-23 Joel Brobecker <brobecker@adacore.com>
15252
15253 * configure.ac: Switch license to GPLv3.
15254
15255 2007-08-01 Michael Snyder <msnyder@access-company.com>
15256
15257 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
15258
15259 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
15260
15261 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
15262 typedef.
15263 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
15264 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
15265 CloseToolhelp32Snapshot.
15266 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
15267 CloseToolhelp32Snapshot.
15268
15269 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
15270
15271 * server.c (main): Check for inferior exit before main loop.
15272
15273 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
15274
15275 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
15276 instead of on tmp_desc.
15277
15278 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
15279 Daniel Jacobowitz <dan@codesourcery.com>
15280
15281 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
15282 (add_thread): Minor cleanups.
15283 (clear_inferiors): Move lower in the file. Clear the DLL
15284 list.
15285 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
15286 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
15287 (xml_escape_text): New.
15288 * server.c (handle_query): Handle qXfer:libraries:read. Report it
15289 for qSupported.
15290 (handle_v_cont): Report errors.
15291 (gdbserver_version): Update.
15292 (main): Correct size of own_buf. Do not report initial DLL events.
15293 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
15294 (unloaded_dll, xml_escape_text): New.
15295 * win32-low.c (enum target_waitkind): Update comments.
15296 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
15297 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
15298 (win32_EnumProcessModules, win32_GetModuleInformation)
15299 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
15300 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
15301 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
15302 (win32_Module32First, win32_Module32Next, load_toolhelp)
15303 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
15304 (get_child_debug_event): Handle DLL events.
15305 (win32_wait): Likewise.
15306
15307 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
15308
15309 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
15310 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
15311
15312 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
15313
15314 * win32-low.c (handle_output_debug_string): Ignore event if not
15315 waiting.
15316
15317 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
15318
15319 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
15320
15321 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
15322
15323 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
15324
15325 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
15326
15327 * inferiors.c (change_inferior_id): Add comment.
15328 * linux-low.c (check_removed_breakpoint): Add an early
15329 prototype. Improve debug output.
15330 (linux_attach): Doc update.
15331 (linux_detach_one_process, linux_detach): Clean up before releasing
15332 each process.
15333 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
15334 * linux-low.h (struct process_info): Doc improvement.
15335 * mem-break.c (delete_all_breakpoints): New.
15336 * mem-break.h (delete_all_breakpoints): New prototype.
15337 * thread-db.c (find_first_thread): New.
15338 (thread_db_create_event): Call it instead of
15339 thread_db_find_new_threads. Clean up unused variables.
15340 (maybe_attach_thread): Remove first thread handling.
15341 (thread_db_find_new_threads): Use find_first_thread.
15342 (thread_db_get_tls_address): Likewise.
15343
15344 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
15345
15346 * thread-db.c (thread_db_find_new_threads): Add prototype.
15347 (thread_db_create_event): Check for the main thread before adding
15348 a new thread.
15349 (maybe_attach_thread): Only enable event reporting if TID == 0.
15350 (thread_db_get_tls_address): Check for new threads.
15351
15352 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
15353
15354 * linux-low.c (linux_create_inferior): Try execv before execvp.
15355 * spu-low.c (spu_create_inferior): Likewise.
15356
15357 2007-06-13 Mike Frysinger <vapier@gentoo.org>
15358
15359 * linux-low.c (linux_create_inferior): Change execv to execvp.
15360 * spu-low.c (spu_create_inferior): Likewies.
15361
15362 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
15363
15364 * Makefile.in (clean): Clean new files instead of deleted ones.
15365 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
15366 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
15367 rules.
15368 * configure.srv: Specify XML files and new regformats for MIPS and
15369 MIPS64 GNU/Linux.
15370 * linux-mips-low.c (mips_num_regs): Set to only used registers.
15371 (mips_regmap): Do not fetch $0. Remove unused registers. Add
15372 an entry for the restart register.
15373 (mips_cannot_fetch_register, mips_cannot_store_register)
15374 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
15375 register names to match the XML descriptions.
15376 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
15377 restart register instead of $0.
15378
15379 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
15380 Markus Deuling <deuling@de.ibm.com>
15381
15382 * remote-utils.c (decode_xfer_write): New function.
15383 * server.h (decode_xfer_write): Add prototype.
15384 * server.c (handle_query): Add PACKET_LEN argument. Support
15385 qXfer:spu:read and qXfer:spu:write packets.
15386 (main): Pass packet_len to handle_query.
15387 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
15388 * target.h (target_ops): Add qxfer_spu.
15389
15390 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
15391
15392 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
15393 accessing non-seekable spufs files.
15394
15395 2007-05-16 Markus Deuling <deuling@de.ibm.com>
15396
15397 * server.c (handle_query): Add reply for qC packet.
15398
15399 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15400 Leo Zayas <lerele@champenstudios@com>
15401
15402 * server.h (check_remote_input_interrupt_request): New function.
15403 * remote_utils.c (INVALID_DESCRIPTOR): New define.
15404 (remote_desc): Initialize with INVALID_DESCRIPTOR.
15405 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
15406 (check_remote_input_interrupt_request): New function.
15407 * server.h (check_remote_input_interrupt_request): Declare.
15408 * win32-low.c (winapi_DebugBreakProcess,
15409 winapi_GenerateConsoleCtrlEvent): New typedefs.
15410 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
15411 to 250 ms.
15412 (win32_wait): Check for remote interrupt request
15413 with check_remote_input_interrupt_request.
15414 (win32_request_interrupt): New function.
15415 (win32_target_op): Set request_interrupt to win32_request_interrupt.
15416
15417 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15418
15419 * win32-low.c (debug_registers_changed,
15420 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
15421 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
15422 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
15423 (thread_rec): Get context using the low target.
15424 (child_add_thread): Call thread_added on the low target,
15425 which does the same thing.
15426 (regptr): Delete.
15427 (do_initial_child_stuff): Remove debug registers references.
15428 Set context using the low target. Resume threads after
15429 setting the contexts.
15430 (child_continue): Remove dead variable. Remove debug
15431 registers references.
15432 (child_fetch_inferior_registers): Go through the low target.
15433 (do_child_store_inferior_registers): Remove.
15434 (child_store_inferior_registers): Go through the low target.
15435 (win32_resume): Remove debug registers references.
15436 Set context using the low target.
15437 (handle_exception): Change return type to void. Don't record
15438 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
15439 first chance exception.
15440 (get_child_debug_event): Change return type to void. Remove
15441 goto loop. Always return after waiting for debug event.
15442 (win32_wait): Convert to switch statement. Handle spurious
15443 events.
15444
15445 * win32-i386-low.c (debug_registers_changed,
15446 debug_registers_used): New.
15447 (initial_stuff): Rename to ...
15448 (i386_initial_stuff): ... this. Clear debug registers
15449 state variables.
15450 (store_debug_registers): Delete.
15451 (i386_get_thread_context): New.
15452 (load_debug_registers): Delete.
15453 (i386_set_thread_context): New.
15454 (i386_thread_added): New.
15455 (single_step): Rename to ...
15456 (i386_single_step): ... this.
15457 (do_fetch_inferior_registers): Rename to ...
15458 (i386_fetch_inferior_register): ... this.
15459 (i386_store_inferior_register): New.
15460 (the_low_target): Adapt to new interface.
15461
15462 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
15463 (arm_get_thread_context): New.
15464 (arm_set_thread_context): New.
15465 (regptr): New.
15466 (do_fetch_inferior_registers): Rename to ...
15467 (arm_fetch_inferior_register): ... this.
15468 (arm_store_inferior_register): New.
15469 (arm_wince_breakpoint): Reimplement as unsigned long.
15470 (arm_wince_breakpoint_len): Define.
15471 (the_low_target): Adapt to new interface.
15472
15473 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
15474 load_debug_registers. Add get_thread_context, set_thread_context,
15475 thread_added and store_inferior_register. Rename
15476 fetch_inferior_registers to fetch_inferior_register.
15477 (regptr): Remove declaration.
15478
15479 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15480
15481 * linux-low.c (linux_detach): Change return type to int. Return 0.
15482 * spu-low.c (spu_detach): Likewise.
15483
15484 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15485
15486 * target.h (target_ops): Change return type of detach to int.
15487 Add join.
15488 (join_inferior): New.
15489 * server.c (main): Don't skip detach support on mingw32.
15490 If the inferior doesn't support detaching return error.
15491 Call join_inferior instead of using waitpid.
15492 * linux-low.c (linux_join): New.
15493 (linux_target_op): Add linux_join.
15494 * spu-low.c (spu_join): New.
15495 (spu_target_ops): Add spu_join.
15496 * win32-low.c (win32_detach): Adapt to new interface.
15497 Reopen current_process_handle before detaching. Issue a child
15498 resume before detaching.
15499 (win32_join): New.
15500 (win32_target_op): Add win32_join.
15501
15502 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15503
15504 * win32-low.c (win32-attach): Fix return value.
15505 * target.h (target_ops): Describe ATTACH return values.
15506
15507 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15508
15509 * win32-low.c (GETPROCADDRESS): Define.
15510 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
15511 (winapi_DebugSetProcessKillOnExit): Likewise.
15512 (win32_create_inferior): Force usage of ansi CreateProcessA.
15513 (win32_attach): Use GETPROCADDRESS.
15514 (win32_detach): Likewise.
15515
15516 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15517
15518 * win32-low.c (win32_wait): Don't use WSTOPSIG.
15519
15520 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
15521
15522 * win32-low.c: Commit leftover changes from 2007-03-29.
15523
15524 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
15525
15526 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
15527 fields short instead of int. Add explicit padding.
15528 (i387_cache_to_fsave): Remove unnecessary casts.
15529 (i387_fsave_to_cache): Doc fix.
15530 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
15531
15532 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
15533
15534 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
15535 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
15536
15537 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
15538
15539 * configure.srv (arm*-*-mingw32ce*): Move near the other
15540 arm targets.
15541
15542 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
15543
15544 * configure.ac: Add errno checking.
15545 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
15546 sys/file.h and malloc.h.
15547 (AC_CHECK_DECLS): Add perror.
15548 (srv_mingwce): Handle.
15549 * configure.srv (i[34567]86-*-cygwin*): Add
15550 win32-i386-low.o to srv_tgtobj.
15551 (i[34567]86-*-mingw*): Likewise.
15552 (arm*-*-mingw32ce*): Add case.
15553 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
15554 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
15555 [__MINGW32CE__] (strerror): New function.
15556 [__MINGW32CE__] (errno): Define to GetLastError.
15557 [__MINGW32CE__] (COUNTOF): New macro.
15558 (remote_open): Remove extra close call.
15559 * mem-break.c (delete_breakpoint_at): New function.
15560 * mem-break.h (delete_breakpoint_at): Declare.
15561 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
15562 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
15563 [USE_WIN32API] (read, write): Add char* casts.
15564 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
15565 * server.h: Include wincecompat.h on Windows CE.
15566 [HAVE_ERRNO_H]: Check.
15567 (perror): Declare if not declared.
15568 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
15569 (perror_with_name): Remove errno declaration.
15570 * wincecompat.h: New.
15571 * wincecompat.c: New.
15572 * win32-low.h: New.
15573 * win32-arm-low.c: New.
15574 * win32-i386-low.c: New.
15575 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
15576 (OUTMSG2): Make it safe.
15577 (_T): New macro.
15578 (COUNTOF): New macro.
15579 (NUM_REGS): Get it from the low target.
15580 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
15581 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
15582 (thread_rec): Let low target handle debug registers.
15583 (child_add_thread): Likewise.
15584 (child_init_thread_list): Likewise.
15585 (continue_one_thread): Likewise.
15586 (regptr): New.
15587 (do_child_fetch_inferior_registers): Move to ...
15588 * win32-i386-low.c: ... here, and rename to ...
15589 (do_fetch_inferior_registers): ... this.
15590 * win32-low.c (child_fetch_inferior_registers):
15591 Go through the low target.
15592 (do_child_store_inferior_registers): Use regptr.
15593 (strwinerror): New function.
15594 (win32_create_inferior): Handle Windows CE.
15595 Use strwinerror instead of strerror on Windows error
15596 codes. Add program to the error output.
15597 Don't close the main thread handle on Windows CE.
15598 (win32_attach): Use coredll.dll on Windows CE.
15599 (win32_kill): Close current process and current
15600 thread handles.
15601 (win32_detach): Use coredll.dll on Windows CE.
15602 (win32_resume): Let low target handle debug registers, and
15603 step request.
15604 (handle_exception): Add/Remove initial breakpoint. Avoid
15605 non-existant WSTOPSIG on Windows CE.
15606 (win32_read_inferior_memory): Cast to remove warning.
15607 (win32_arch_string): Go through the low target.
15608 (initialize_low): Call set_breakpoint_data with the low
15609 target's breakpoint.
15610 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
15611 FOP_REGNUM, mappings): Move to ...
15612 * win32-i386-low.c: ... here.
15613 * win32-low.c (win32_thread_info): Move to ...
15614 * win32-low.h: ... here.
15615 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
15616 win32-arm-low.c and wincecompat.c.
15617 (all:): Add $EXEEXT.
15618 (install-only:): Likewise.
15619 (gdbserver:): Likewise.
15620 (gdbreplay:): Likewise.
15621 * config.in: Regenerate.
15622 * configure: Regenerate.
15623
15624 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
15625
15626 * win32-low.c: Rename typedef thread_info to
15627 win32_thread_info throughout.
15628
15629 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
15630
15631 * win32-i386-low.c: Rename to ...
15632 * win32-low.c: ... this.
15633 * configure.srv: Replace win32-i386-low.o with win32-low.o.
15634 * Makefile.in: Likewise.
15635
15636 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
15637
15638 * remote-utils.c (monitor_output): Constify msg parameter.
15639 * server.h (monitor_output): Likewise.
15640 * win32-i386-low.c (handle_output_debug_string): New.
15641 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
15642 handle_output_debug_string.
15643 (get_child_debug_event): Likewise.
15644
15645 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
15646
15647 * server.c (main): Correct strtoul check.
15648
15649 2007-03-27 Jon Ringle <jon@ringle.org>
15650
15651 * linux-low.c: Check __ARCH_HAS_MMU__ also.
15652
15653 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
15654
15655 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
15656
15657 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
15658
15659 * terminal.h: Check HAVE_SGTTY_H.
15660
15661 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
15662
15663 * remote-utils.c (remote_open): Print out the assigned port number.
15664
15665 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
15666
15667 * remote-utils.c (monitor_output): New function.
15668 * server.c (debug_threads): Define here.
15669 (monitor_show_help): New function.
15670 (handle_query): Handle qRcmd.
15671 (main): Do not handle 'd' packet.
15672 * server.h (debug_threads, remote_debug, monitor_output): Declare.
15673 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
15674 of debug_threads.
15675
15676 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
15677
15678 * Makefile.in (EXEEXT): New.
15679 (clean): Use $(EXEEXT).
15680
15681 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
15682
15683 * target.h (target_ops): Rename send_signal to request_interrupt,
15684 and remove enum target_signal parameter.
15685 * linux-low.c (linux_request_interrupt): Rename from
15686 linux_send_signal, and always send SIGINT.
15687 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
15688 and always send SIGINT.
15689 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
15690 of send_signal.
15691 (input_interrupt): Likewise.
15692
15693 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
15694
15695 * server.c (get_features_xml): Check if target implemented
15696 arch_string.
15697 * win32-i386-low.c (win32_arch_string): New.
15698 (win32_target_ops): Add win32_arch_string as arch_string member.
15699
15700 2007-02-22 Markus Deuling <deuling@de.ibm.com>
15701
15702 * spu-low.c (spu_arch_string): New.
15703 (spu_target_ops): Add spu_arch_string.
15704
15705 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
15706
15707 * remote-utils.c: Remove HAVE_TERMINAL_H check.
15708 * configure.ac: Do not check for terminal.h.
15709 * configure, config.in: Regenerated.
15710
15711 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
15712
15713 * Makefile.in (OBS): Add $(XML_BUILTIN).
15714 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
15715 (clean): Update.
15716 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
15717 (arm-with-iwmmxt.c): New.
15718 * config.in, configure: Regenerate.
15719 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
15720 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
15721 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
15722 (arm*-*-linux*): Add iWMMXt and regset support.
15723 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
15724 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
15725 (arm_store_wmmxregset, target_regsets): New.
15726 * server.c (get_features_xml): Take annex argument. Check builtin
15727 XML documents.
15728 (handle_query): Handle multiple annexes.
15729
15730 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
15731
15732 * remote-utils.c [USE_WIN32API] (read, write): Define.
15733 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
15734 write.
15735
15736 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
15737
15738 * linux-i386-low.c (the_low_target): Set arch_string.
15739 * linux-x86-64-low.c (the_low_target): Likewise.
15740 * linux-low.c (linux_arch_string): New.
15741 (linux_target_ops): Add it.
15742 * linux-low.h (struct linux_target_ops): Add arch_string.
15743 * server.c (write_qxfer_response): Use const void * for DATA.
15744 (get_features_xml): New.
15745 (handle_query): Handle qXfer:features:read. Report it for qSupported.
15746 * target.h (struct target_ops): Add arch_string method.
15747
15748 2007-01-03 Denis Pilat <denis.pilat@st.com>
15749 Daniel Jacobowitz <dan@codesourcery.com>
15750
15751 * linux-low.c (linux_kill): Handle being called with no threads.
15752 * win32-i386-low.c (win32_kill): Likewise.
15753 (get_child_debug_event): Clear current_process_handle.
15754
15755 2006-12-30 Denis PILAT <denis.pilat@st.com>
15756 Daniel Jacobowitz <dan@codesourcery.com>
15757
15758 * remote-utils.c (remote_open): Check the type of specified
15759 serial port devices before opening them.
15760 * server.c (main): Kill the inferior if an error occurs during
15761 the first remote_open.
15762
15763 2006-12-05 Markus Deuling <deuling@de.ibm.com>
15764
15765 * README: Update supported targets.
15766
15767 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
15768
15769 * Makefile.in (clean): Remove reg-mips64.c.
15770 (reg-mips64.c, reg-mips64.o): New rules.
15771 * configure.srv: Handle mips64. Include regset support for mips.
15772 * linux-mips-low.c (union mips_register): New.
15773 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
15774 (mips_breakpoint, mips_breakpoint_at): Use int.
15775 (mips_collect_register, mips_supply_register)
15776 (mips_collect_register_32bit, mips_supply_register_32bit)
15777 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
15778 (mips_store_fpregset, target_regsets): New.
15779 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
15780
15781 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
15782
15783 * configure.srv: Add target "spu*-*-*".
15784 * Makefile.in (clean): Remove reg-spu.c.
15785 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
15786 * spu-low.c: New file.
15787
15788 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
15789
15790 * configure.ac: Correct td_thr_tls_get_addr test.
15791 * configure: Regenerated.
15792
15793 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
15794
15795 * linux-low.c (linux_wait_for_event): Reformat. Use the
15796 pass_signals array.
15797 * remote-utils.c (decode_address_to_semicolon): New.
15798 * server.c (pass_signals, handle_general_set): New.
15799 (handle_query): Mention QPassSignals for qSupported.
15800 (main): Call handle_general_set.
15801 * server.h (pass_signals, decode_address_to_semicolon): New.
15802
15803 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
15804
15805 * server.c (handle_query): Correct error handling for read_auxv.
15806
15807 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
15808
15809 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
15810 and srv_linux_thread_db to yes.
15811 * linux-s390-low.c (s390_fill_gregset): New function.
15812 (target_regsets): Define data structure.
15813
15814 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
15815
15816 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
15817 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
15818 * config.in, configure: Regenerated.
15819 * inferiors.c (gdb_id_to_thread): New function.
15820 (gdb_id_to_thread_id): Use it.
15821 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
15822 * linux-low.h (struct process_info): Add th member.
15823 (thread_db_get_tls_address): New prototype.
15824 * remote-utils.c (decode_address): Make non-static.
15825 * server.c (handle_query): Handle qGetTLSAddr.
15826 * server.h (gdb_id_to_thread, decode_address): New prototypes.
15827 * target.h (struct target_ops): Add get_tls_address.
15828 * thread-db.c (maybe_attach_thread): Save the thread handle.
15829 (thread_db_get_tls_address): New.
15830
15831 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
15832
15833 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
15834 (linux_resume_one_process): Take a siginfo_t *. Update all
15835 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
15836 (struct pending_signals): Add a siginfo_t.
15837 (linux_wait_for_process): Always set last_status.
15838 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
15839 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
15840 * linux-low.h (struct process_info): Add last_status.
15841
15842 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
15843
15844 * remote-utils.c (try_rle): New function.
15845 (putpkt_binary): Use it.
15846
15847 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
15848
15849 * Makefile.in (clean): Clean reg-x86-64-linux.c.
15850 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
15851 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
15852 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
15853 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
15854 point registers.
15855
15856 2006-08-08 Richard Sandiford <richard@codesourcery.com>
15857
15858 * server.c (terminal_fd): New variable.
15859 (old_foreground_pgrp): Likewise.
15860 (restore_old_foreground_pgrp): New function.
15861 (start_inferior): Record the terminal file descriptor in terminal_fd
15862 and its original foreground group in old_foreground_pgrp. Register
15863 restore_old_foreground_pgrp with atexit().
15864
15865 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
15866
15867 * server.c (handle_query): Correct qPart to qXfer.
15868
15869 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
15870
15871 * configure.ac: Check for more headers which are missing on
15872 Windows. Automatically supply -lwsock32 and USE_WIN32API.
15873 * configure.srv: Add Cygwin and mingw32.
15874 * remote-utils.c: Don't include headers unconditionally which
15875 are missing on mingw32. Include <winsock.h> for mingw32.
15876 (remote_open): Adjust for mingw32 support. Flush
15877 standard error after writing to it.
15878 (remote_close, putpkt_binary, input_interrupt, block_async_io)
15879 (unblock_async_io, enable_async_io, disable_async_io)
15880 (readchar, getpkt): Update for Winsock support.
15881 (prepare_resume_reply): Expect a protocol signal number.
15882 * server.c: Disable <sys/wait.h> on mingw32.
15883 (start_inferior): Adjust for mingw32 support. Flush
15884 standard error after writing to it.
15885 (attach_inferior): Likewise. Use protocol signal
15886 numbers.
15887 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
15888 and names.
15889 * win32-i386-low.c: New file.
15890 * Makefile.in (XM_CLIBS): Set.
15891 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
15892 (win32-i386-low.o): New dependency rule.
15893 * linux-low.c (linux_wait): Use target signal numbers.
15894 * target.h (struct target_ops): Doc fix.
15895 * server.h (target_signal_to_name): New prototype.
15896 * gdbreplay.c: Don't include headers unconditionally which
15897 are missing on mingw32. Include <winsock.h> for mingw32.
15898 (remote_close, remote_open): Adjust for Winsock support.
15899 * configure, config.in: Regenerated.
15900
15901 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
15902
15903 * server.c (decode_xfer_read, write_qxfer_response): New.
15904 (handle_query): Take a packet length argument. Handle
15905 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
15906 the qSupported response.
15907 (main): Update call to handle_query.
15908
15909 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
15910
15911 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
15912 (putpkt_binary): Renamed from putpkt and adjusted for binary
15913 data.
15914 (putpkt): New wrapper for putpkt_binary.
15915 (readchar): Don't mask off the high bit.
15916 (decode_X_packet): New function.
15917 * server.c (main): Call putpkt_binary if a handler sets the packet
15918 length. Save the length of the incoming packet. Handle 'X'.
15919 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
15920
15921 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
15922
15923 * server.c (handle_query): Handle qSupported.
15924
15925 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
15926
15927 * remote-utils.c (all_symbols_looked_up): New variable.
15928 (look_up_one_symbol): Check it.
15929 * server.h (look_up_one_symbol): New declaration.
15930 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
15931
15932 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
15933
15934 * Makefile.in (linux-arm-low.o): Update dependencies.
15935 * linux-arm-low.c: Include "gdb_proc_service.h".
15936 (PTRACE_GET_THREAD_AREA): Define.
15937 (ps_get_thread_area): New function.
15938
15939 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
15940
15941 * configure.srv (m68k*-*-uclinux*): New target.
15942 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
15943 (linux_resume_one_process): Remove extraneous cast.
15944 (linux_read_offsets): New.
15945 (linux_target_op): Add linux_read_offsets on mmuless systems.
15946 * server.c (handle_query): Add qOffsets logic.
15947 * target.h (struct target_ops): Add read_offsets.
15948
15949 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
15950
15951 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
15952 (PTRACE_GET_THREAD_AREA): Define.
15953 (ps_get_thread_area): New function.
15954 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
15955 (linux-x86-64-low.o): Update.
15956
15957 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
15958
15959 * configure.ac: Remove checks for prfpregset_t.
15960 * gdb_proc_service.h: New file.
15961 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
15962 new "gdb_proc_service.h".
15963 * proc-service.c: Likewise.
15964 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
15965 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
15966 * Makefile.in (gdb_proc_service_h): Updated.
15967 * configure, config.in: Regenerated.
15968
15969 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
15970
15971 * remote-utils.c (prepare_resume_reply): Move declaration
15972 of gdb_id_from_wait to the top of the block.
15973
15974 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
15975
15976 * linux-low.c (regsets_store_inferior_registers): Read the regset
15977 from the target before filling it.
15978
15979 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
15980
15981 * server.c (attach_inferior): Return SIGTRAP for a successful
15982 attach.
15983
15984 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
15985
15986 * Makefile.in (OBS): Add version.o.
15987 (STAGESTUFF): Delete.
15988 (version.o): Add dependencies.
15989 (version.c): Replace rule.
15990 (clean): Remove version.c.
15991 * server.c (gdbserver_version): New.
15992 (gdbserver_usage): Use printf.
15993 (main): Handle --version and --help.
15994 * server.h (version, host_name): Add declarations.
15995
15996 2005-12-23 Eli Zaretskii <eliz@gnu.org>
15997
15998 * linux-arm-low.c:
15999 * linux-arm-low.c:
16000 * inferiors.c:
16001 * i387-fp.h:
16002 * i387-fp.c:
16003 * gdbreplay.c:
16004 * regcache.c:
16005 * proc-service.c:
16006 * mem-break.h:
16007 * mem-break.c:
16008 * linux-x86-64-low.c:
16009 * linux-sh-low.c:
16010 * linux-s390-low.c:
16011 * linux-ppc64-low.c:
16012 * linux-ppc-low.c:
16013 * linux-mips-low.c:
16014 * linux-m68k-low.c:
16015 * linux-m32r-low.c:
16016 * linux-low.h:
16017 * linux-low.c:
16018 * linux-ia64-low.c:
16019 * linux-i386-low.c:
16020 * linux-crisv32-low.c:
16021 * thread-db.c:
16022 * terminal.h:
16023 * target.h:
16024 * target.c:
16025 * server.h:
16026 * server.c:
16027 * remote-utils.c:
16028 * regcache.h:
16029 * utils.c:
16030 * Makefile.in:
16031 * configure.ac:
16032 * gdbserver.1: Add (C) after Copyright. Update the FSF
16033 address.
16034
16035 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
16036
16037 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
16038 (arm_breakpoint_at): Recognize both breakpoints.
16039 (the_low_target): Use the correct breakpoint instruction.
16040
16041 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
16042
16043 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
16044 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
16045 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
16046 (the_low_target): Update.
16047
16048 2005-10-25 Andreas Schwab <schwab@suse.de>
16049
16050 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
16051
16052 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
16053 (ia64_num_regs): Reduce to 462.
16054
16055 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
16056
16057 * acinclude.m4: Correct quoting.
16058 * aclocal.m4: Regenerated.
16059
16060 Suggested by SZOKOVACS Robert <szo@ies.hu>:
16061 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
16062 (thread_db_init): Call thread_db_err_str.
16063 * configure.ac: Check for TD_VERSION.
16064 * config.in, configure: Regenerated.
16065
16066 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16067
16068 * server.h (error, fatal, warning): Add ATTR_FORMAT.
16069
16070 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
16071
16072 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
16073 is not available. Define HAVE_PTRACE_GETREGS if it is.
16074 * config.in, configure: Regenerated.
16075 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
16076 * linux-i386-low.c, linux-m68k-low.c: Update to use
16077 HAVE_PTRACE_GETREGS.
16078 * linux-low.c (regsets_fetch_inferior_registers)
16079 (regsets_store_inferior_registers): Only return 0 if we processed
16080 GENERAL_REGS.
16081 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
16082 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
16083
16084 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
16085
16086 * inferiors.c (struct thread_info): Add gdb_id.
16087 (add_thread): Add gdb_id argument.
16088 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
16089 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
16090 calls to add_thread.
16091 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
16092 * server.c (handle_query): Use thread_to_gdb_id.
16093 (handle_v_cont, main): Use gdb_id_to_thread_id.
16094 * server.h (add_thread): Update prototype.
16095 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
16096 prototypes.
16097
16098 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
16099
16100 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
16101 left-padded registers.
16102 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
16103 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
16104
16105 2005-07-01 Steve Ellcey <sje@cup.hp.com>
16106
16107 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
16108 * configure: Regenerate.
16109 * config.in: Regenerate.
16110 * server.h (NEED_DECLARATION_STRERROR):
16111 Replace with !HAVE_DECL_STRERROR.
16112
16113 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
16114
16115 * linux-low.c (linux_wait, linux_send_signal): Don't test
16116 an unsigned long variable for > 0 if it could be MAX_ULONG.
16117 * server.c (myresume): Likewise.
16118 * target.c (set_desired_inferior): Likewise.
16119
16120 2005-06-13 Mark Kettenis <kettenis@gnu.org>
16121
16122 * configure.ac: Simplify and improve check for socklen_t.
16123 * configure, config.in: Regenerate.
16124
16125 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
16126
16127 * acconfig.h: Remove.
16128 * configure.ac: Add a test for socklen_t. Use three-argument
16129 AC_DEFINE throughout.
16130 * config.in: Regenerated using autoheader 2.59.
16131 * configure: Regenerated.
16132
16133 * gdbreplay.c (socklen_t): Provide a default.
16134 (remote_open): Use socklen_t.
16135 * remote-utils.c (socklen_t): Provide a default.
16136 (remote_open): Use socklen_t.
16137 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
16138 unsigned char.
16139
16140 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
16141 char for buffers.
16142 * linux-low.c (linux_read_memory, linux_write_memory)
16143 (linux_read_auxv): Likewise.
16144 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
16145 (check_mem_write): Likewise.
16146 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
16147 Likewise.
16148 * regcache.c (struct inferior_rgcache_data, registers_to_string)
16149 (registers_from_string, register_data): Likewise.
16150 * server.c (handle_query, main): Likewise.
16151 * server.h (convert_ascii_to_int, convert_int_to_ascii)
16152 (decode_M_packet): Likewise.
16153 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
16154 * target.h (struct target_ops): Update read_memory, write_memory,
16155 and read_auxv.
16156 (read_inferior_memory, write_inferior_memory): Update.
16157 * linux-low.h (struct linux_target_ops): Change type of breakpoint
16158 to unsigned char *.
16159 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
16160 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
16161 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
16162 linux-s390-low.c, linux-sh-low.c: Update for changes in
16163 read_inferior_memory and the_low_target->breakpoint.
16164
16165 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
16166
16167 * Makefile.in (SFILES): Add linux-ppc64-low.c.
16168 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
16169 * configure.srv: Add powerpc64-*-linux*.
16170 * linux-ppc64-low.c: New file.
16171
16172 2005-05-23 Orjan Friberg <orjanf@axis.com>
16173
16174 * linux-cris-low.c: New file with support for CRIS.
16175 * linux-crisv32-low.c: Ditto for CRISv32.
16176 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
16177 (clean): Add reg-cris.c and reg-crisv32.c.
16178 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
16179 reg-crisv32.o, and reg-crisv32.c to make rules.
16180 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
16181 recognized targets.
16182
16183 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
16184
16185 * linux-low.c (fetch_register): Ensure buffer size is a multiple
16186 of sizeof (PTRACE_XFER_TYPE).
16187 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
16188
16189 2005-05-12 Orjan Friberg <orjanf@axis.com>
16190
16191 * target.h (struct target_ops): Add insert_watchpoint,
16192 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
16193 pointers for hardware watchpoint support.
16194 * linux-low.h (struct linux_target_ops): Ditto.
16195 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
16196 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
16197 to linux_target_ops.
16198 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
16199 reply packet.
16200 * server.c (main): Recognize 'Z' and 'z' packets.
16201
16202 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
16203
16204 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
16205 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
16206 (the_low_target): Add new members.
16207
16208 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
16209
16210 * proc-service.c (ps_lgetregs): Search all_processes instead of
16211 all_threads.
16212
16213 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
16214
16215 * server.c (start_inferior): Change return type to int.
16216 (attach_inferior): Change sigptr to int *.
16217 (handle_v_cont, handle_v_requests): Change signal to int *.
16218 (main): Change signal to int.
16219
16220 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
16221
16222 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
16223 * configure.srv: Add m32r*-*-linux*.
16224 * linux-m32r-low.c: New file.
16225
16226 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
16227
16228 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
16229
16230 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
16231
16232 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
16233 Take unsigned long arguments for PIDs.
16234 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
16235 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
16236 (wait_for_sigstop, linux_resume_one_process)
16237 (regsets_fetch_inferior_registers, linux_send_signal)
16238 (linux_read_auxv): Likewise. Update the types of variables holding
16239 PIDs. Update format string specifiers.
16240 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
16241 * remote-utils.c (prepare_resume_reply): Likewise.
16242 * server.c (cont_thread, general_thread, step_thread)
16243 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
16244 unsigned long.
16245 (handle_query): Update format specifiers.
16246 (handle_v_cont, main): Use strtoul for thread IDs.
16247 * server.h (struct inferior_list_entry): Use unsigned long for ID.
16248 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
16249 (general_thread, step_thread, thread_from_wait)
16250 (old_thread_from_wait): Update.
16251 * target.h (struct thread_resume): Use unsigned long for THREAD.
16252 (struct target_ops): Use unsigned long for arguments to attach and
16253 thread_alive.
16254
16255 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
16256
16257 * acinclude.m4: Include bfd/bfd.m4 directly.
16258 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
16259 <agriffis@toolchain.org>.
16260 * aclocal.m4, configure: Regenerated.
16261
16262 2005-01-07 Andrew Cagney <cagney@gnu.org>
16263
16264 * configure.ac: Rename configure.in, require autoconf 2.59.
16265 * configure: Re-generate.
16266
16267 2004-12-08 Daniel Jacobowitz <dan@debian.org>
16268
16269 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
16270 LIBS when finished.
16271 * aclocal.m4: Regenerated.
16272 * configure: Regenerated.
16273
16274 2004-11-21 Andreas Schwab <schwab@suse.de>
16275
16276 * linux-m68k-low.c (m68k_num_gregs): Define.
16277 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
16278 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
16279 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
16280 (m68k_breakpoint_at): New. Add to the_low_target.
16281
16282 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
16283 srv_linux_thread_db to yes.
16284
16285 2004-10-20 Joel Brobecker <brobecker@gnat.com>
16286
16287 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
16288 (ARCH_SET_FS): Likewise.
16289 (ARCH_GET_FS): Likewise.
16290 (ARCH_GET_GS): Likewise.
16291
16292 2004-10-16 Daniel Jacobowitz <dan@debian.org>
16293
16294 * linux-i386-low.c (ps_get_thread_area): New.
16295 * linux-x86-64-low.c (ps_get_thread_area): New.
16296 * linux-low.c: Include <sys/syscall.h>.
16297 (linux_kill_one_process): Don't kill the first thread here.
16298 (linux_kill): Kill the first thread here.
16299 (kill_lwp): New function.
16300 (send_sigstop, linux_send_signal): Use it.
16301 * proc-service.c: Clean up #ifdefs.
16302 (fpregset_info): Delete.
16303 (ps_lgetregs): Update and enable implementation.
16304 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
16305 implementations.
16306 * remote-utils.c (struct sym_cache, symbol_cache): New.
16307 (input_interrupt): Print a clearer message.
16308 (async_io_enabled): New variable.
16309 (enable_async_io, disable_async_io): Use it. Update comments.
16310 (look_up_one_symbol): Use the symbol cache.
16311 * thread-db.c (thread_db_look_up_symbols): New function.
16312 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
16313
16314 2004-10-16 Daniel Jacobowitz <dan@debian.org>
16315
16316 * configure.in: Test for -rdynamic.
16317 * configure: Regenerated.
16318 * Makefile (INTERNAL_LDFLAGS): New.
16319 (gdbserver, gdbreplay): Use it.
16320
16321 2004-09-02 Andrew Cagney <cagney@gnu.org>
16322
16323 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
16324
16325 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
16326
16327 * linux-low.c (linux_wait): Clear all_processes list also.
16328
16329 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
16330
16331 * linux-low.c: Include <errno.h>. Remove extern declaration of
16332 errno.
16333
16334 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
16335
16336 * gdbreplay.c, server.h, utils.c: Update copyright years.
16337
16338 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
16339
16340 * server.c (main): Print child status or termination signal from
16341 variable 'signal', not 'sig'.
16342
16343 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
16344
16345 * linux-low.c (linux_read_memory): Change return type to
16346 int. Check for and return error from ptrace().
16347 * target.c (read_inferior_memory): Change return type to int. Pass
16348 back return status from the_target->read_memory().
16349 * target.h (struct target_ops): Adapt *read_memory() prototype.
16350 Update comment.
16351 (read_inferior_memory): Adapt prototype.
16352 * server.c (main): Return an error packet if
16353 read_inferior_memory() returns an error.
16354
16355 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
16356
16357 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
16358 Unify with other clean targets.
16359
16360 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
16361
16362 * server.c (handle_v_cont): Call set_desired_inferior.
16363
16364 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
16365
16366 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
16367
16368 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
16369
16370 * linux-low.c (linux_wait): Unblock async I/O.
16371 (linux_resume): Block and enable async I/O.
16372 * remote-utils.c (block_async_io, unblock_async_io): New functions.
16373 * server.h (block_async_io, unblock_async_io): Add prototypes.
16374
16375 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
16376
16377 * remote-utils.c (remote_open): Print a status notice after
16378 opening a TCP port.
16379 * server.c (attach_inferior): Print a status notice after
16380 attaching.
16381
16382 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
16383
16384 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
16385
16386 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
16387
16388 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
16389 error packet.
16390 * server.c, target.h: Update copyright years.
16391
16392 2004-02-25 Roland McGrath <roland@redhat.com>
16393
16394 * target.h (struct target_ops): New member `read_auxv'.
16395 * server.c (handle_query): Handle qPart:auxv:read: query using that.
16396 * linux-low.c (linux_read_auxv): New function.
16397 (linux_target_ops): Initialize `read_auxv' member to that.
16398
16399 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
16400
16401 Committed by Jim Blandy <jimb@redhat.com>.
16402
16403 * linux-s390-low.c (s390_num_regs): Update.
16404 (s390_regmap): Remove control registers. Use __s390x__ predefine
16405 instead of GPR_SIZE to distiguish s390 and s390x targets.
16406
16407 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
16408
16409 * linux-low.c: Update copyright year.
16410 (check_removed_breakpoint): Clear pending_is_breakpoint.
16411 (linux_set_resume_request, linux_queue_one_thread)
16412 (resume_status_pending_p): New functions.
16413 (linux_continue_one_thread): Use process->resume.
16414 (linux_resume): Only resume threads if there are no pending events.
16415 * linux-low.h (struct process_info): Add resume request
16416 pointer.
16417
16418 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
16419
16420 * regcache.c (new_register_cache): Clear the allocated register
16421 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
16422
16423 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
16424
16425 * linux-low.c (linux_resume): Take a struct thread_resume *
16426 argument.
16427 (linux_wait): Update call.
16428 (resume_ptr): New static variable.
16429 (linux_continue_one_thread): Renamed from
16430 linux_continue_one_process. Use resume_ptr.
16431 (linux_resume): Use linux_continue_one_thread.
16432 * server.c (handle_v_cont, handle_v_requests): New functions.
16433 (myresume): New function.
16434 (main): Handle 'v' case.
16435 * target.h (struct thread_resume): New type.
16436 (struct target_ops): Change argument of "resume" to struct
16437 thread_resume *.
16438 (myresume): Delete macro.
16439
16440 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
16441
16442 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
16443 (uninstall): Support DESTDIR.
16444
16445 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
16446
16447 * configure.srv: Add xscale*linux copy of arm*linux entry.
16448
16449 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
16450
16451 * linux-arm-low.c (arm_reinsert_addr): New function.
16452 (the_low_target): Add arm_reinsert_addr.
16453
16454 2003-07-08 Mark Kettenis <kettenis@gnu.org>
16455
16456 * mem-break.c: Remove whitespace at end of file.
16457
16458 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
16459
16460 * configure.in: Check whether we need to prototype strerror.
16461 * server.h: Optionally prototype strerror.
16462 * gdbreplay.c (perror_with_name): Use strerror.
16463 * linux-low.c (linux_attach_lwp): Use strerror.
16464 * utils.c (perror_with_name): Use strerror.
16465 * config.in, configure: Regenerated.
16466
16467 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
16468
16469 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
16470 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
16471
16472 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
16473
16474 * Makefile.in (SFILES): Update.
16475 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
16476 low-sun3.c: Remove files.
16477
16478 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
16479
16480 * linux-low.c: Move comment to linux_thread_alive where it belonged.
16481 (linux_detach_one_process, linux_detach): New functions.
16482 (linux_target_ops): Add linux_detach.
16483 * server.c (main): Handle 'D' packet.
16484 * target.h (struct target_ops): Add "detach" member.
16485 (detach_inferior): Define.
16486
16487 2003-06-13 Mark Kettenis <kettenis@gnu.org>
16488
16489 From Kelley Cook <kelleycook@wideopenwest.com>:
16490 * configure.srv: Accept i[34567]86 variants.
16491
16492 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
16493
16494 * linux-low.c (linux_wait_for_event): Correct comment typos.
16495 (linux_resume_one_process): Call check_removed_breakpoint.
16496 (linux_send_signal): New function.
16497 (linux_target_ops): Add linux_send_signal.
16498 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
16499 of kill.
16500 * target.h (struct target_ops): Add send_signal.
16501
16502 2003-05-29 Jim Blandy <jimb@redhat.com>
16503
16504 * linux-low.c (usr_store_inferior_registers): Transfer buf in
16505 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
16506 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
16507 away part of the register's value.
16508
16509 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
16510
16511 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
16512 (linux_wait_for_event, linux_init_signals): Likewise.
16513
16514 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
16515
16516 * configure.in: Check for stdlib.h.
16517 * configure: Regenerated.
16518 * config.in: Regenerated.
16519
16520 2003-01-04 Andreas Schwab <schwab@suse.de>
16521
16522 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
16523
16524 2003-01-02 Andrew Cagney <ac131313@redhat.com>
16525
16526 * Makefile.in: Remove obsolete code.
16527
16528 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
16529
16530 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
16531 defined(PT_FPR0_HI).
16532
16533 2002-11-17 Stuart Hughes <seh@zee2.com>
16534
16535 * linux-arm-low.c (arm_num_regs): Increase.
16536 (arm_regmap): Include status register.
16537
16538 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
16539
16540 * linux-low.c (register_addr): Remove incorrect -1 check.
16541
16542 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
16543
16544 * linux-low.c (linux_create_inferior): Call setpgid. Return
16545 the new PID.
16546 (unstopped_p, linux_signal_pid): Remove.
16547 (linux_target_ops): Remove linux_signal_pid.
16548 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
16549 global instead of target method.
16550 * target.h (struct target_ops): Remove signal_pid. Update comment
16551 for create_inferior.
16552 * server.c (signal_pid): New variable.
16553 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
16554 gdbserver. Set the child to be the foreground process group.
16555 (attach_inferior): Set signal_pid.
16556
16557 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
16558
16559 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
16560
16561 2002-08-20 Jim Blandy <jimb@redhat.com>
16562
16563 * Makefile.in (LDFLAGS): Allow the configure script to establish a
16564 default for this.
16565
16566 2002-08-01 Andrew Cagney <cagney@redhat.com>
16567
16568 * Makefile.in: Make chill references obsolete.
16569
16570 2002-07-24 Kevin Buettner <kevinb@redhat.com>
16571
16572 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
16573 * configure: Regenerate.
16574 * config.in: Regenerate.
16575
16576 2002-07-09 David O'Brien <obrien@FreeBSD.org>
16577
16578 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
16579 (perror_with_name, remote_close, remote_open, expect, play): Static.
16580
16581 2002-07-04 Michal Ludvig <mludvig@suse.cz>
16582
16583 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
16584 byte offsets instead of an array of indexes.
16585 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
16586
16587 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
16588
16589 * regcache.c: Add comment.
16590
16591 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
16592
16593 * thread-db.c: New file.
16594 * proc-service.c: New file.
16595 * acinclude.m4: New file.
16596 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
16597 proc-service.o, and thread-db.o.
16598 (linux-low.o): Add USE_THREAD_DB.
16599 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
16600 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
16601 * aclocal.m4: Regenerated.
16602 * config.in: Regenerated.
16603 * configure: Regenerated.
16604 * configure.in: Check for proc_service.h, sys/procfs.h,
16605 thread_db.h, and linux/elf.h headrs.
16606 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
16607 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
16608 Check for -lthread_db and thread support.
16609 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
16610 PowerPC, and SuperH.
16611 * i387-fp.c: Constify arguments.
16612 * i387-fp.h: Likewise.
16613 * inferiors.c: (struct thread_info): Renamed from
16614 `struct inferior_info'. Remove PID member. Use generic inferior
16615 list header. All uses updated.
16616 (inferiors, signal_pid): Removed.
16617 (all_threads): New variable.
16618 (get_thread): Define.
16619 (add_inferior_to_list): New function.
16620 (for_each_inferior): New function.
16621 (change_inferior_id): New function.
16622 (add_inferior): Removed.
16623 (remove_inferior): New function.
16624 (add_thread): New function.
16625 (free_one_thread): New function.
16626 (remove_thread): New function.
16627 (clear_inferiors): Use for_each_inferior and free_one_thread.
16628 (find_inferior): New function.
16629 (find_inferior_id): New function.
16630 (inferior_target_data): Update argument type.
16631 (set_inferior_target_data): Likewise.
16632 (inferior_regcache_data): Likewise.
16633 (set_inferior_regcache_data): Likewise.
16634 * linux-low.c (linux_bp_reinsert): Remove.
16635 (all_processes, stopping_threads, using_thrads)
16636 (struct pending_signals, debug_threads, pid_of): New.
16637 (inferior_pid): Replace with macro.
16638 (struct inferior_linux_data): Remove.
16639 (get_stop_pc, add_process): New functions.
16640 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
16641 Use add_process and add_thread.
16642 (linux_attach_lwp): New function, based on old linux_attach. Use
16643 add_process and add_thread. Set stop_expected for new threads.
16644 (linux_attach): New function.
16645 (linux_kill_one_process): New function.
16646 (linux_kill): Kill all LWPs.
16647 (linux_thread_alive): Use find_inferior_id.
16648 (check_removed_breakpoints, status_pending_p): New functions.
16649 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
16650 Update. Use WNOHANG. Wait for cloned processes also. Update process
16651 struct for the found process.
16652 (linux_wait_for_event): New function.
16653 (linux_wait): Use it. Support LWPs.
16654 (send_sigstop, wait_for_sigstop, stop_all_processes)
16655 (linux_resume_one_process, linux_continue_one_process): New functions.
16656 (linux_resume): Support LWPs.
16657 (REGISTER_RAW_SIZE): Remove.
16658 (fetch_register): Use register_size instead. Call supply_register.
16659 (usr_store_inferior_registers): Likewise. Call collect_register.
16660 Fix recursive case.
16661 (regsets_fetch_inferior_registers): Improve error message.
16662 (regsets_store_inferior_registers): Add debugging.
16663 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
16664 (unstopped_p, linux_signal_pid): New functions.
16665 (linux_target_ops): Add linux_signal_pid.
16666 (linux_init_signals): New function.
16667 (initialize_low): Call it. Initialize using_threads.
16668 * regcache.c (inferior_regcache_data): Add valid
16669 flag.
16670 (get_regcache): Fetch registers lazily. Add fetch argument
16671 and update all callers.
16672 (regcache_invalidate_one, regcache_invalidate): New
16673 functions.
16674 (new_register_cache): Renamed from create_register_cache.
16675 Return the new regcache.
16676 (free_register_cache): Change argument to a void *.
16677 (registers_to_string, registers_from_string): Call get_regcache
16678 with fetch flag set.
16679 (register_data): Make static. Pass fetch flag to get_regcache.
16680 (supply_register): Call get_regcache with fetch flag clear.
16681 (collect_register): Call get_regcache with fetch flag set.
16682 (collect_register_as_string): New function.
16683 * regcache.h: Update.
16684 * remote-utils.c (putpkt): Flush after debug output and use
16685 stderr.
16686 Handle input interrupts while waiting for an ACK.
16687 (input_interrupt): Use signal_pid method.
16688 (getpkt): Flush after debug output and use stderr.
16689 (outreg): Use collect_register_as_string.
16690 (new_thread_notify, dead_thread_notify): New functions.
16691 (prepare_resume_reply): Check using_threads. Set thread_from_wait
16692 and general_thread.
16693 (look_up_one_symbol): Flush after debug output.
16694 * server.c (step_thread, server_waiting): New variables.
16695 (start_inferior): Don't use signal_pid. Update call to mywait.
16696 (attach_inferior): Update call to mywait.
16697 (handle_query): Handle qfThreadInfo and qsThreadInfo.
16698 (main): Don't fetch/store registers explicitly. Use
16699 set_desired_inferior. Support proposed ``Hs'' packet. Update
16700 calls to mywait.
16701 * server.h: Update.
16702 (struct inferior_list, struct_inferior_list_entry): New.
16703 * target.c (set_desired_inferior): New.
16704 (write_inferior_memory): Constify.
16705 (mywait): New function.
16706 * target.h: Update.
16707 (struct target_ops): New signal_pid method.
16708 (mywait): Removed macro, added prototype.
16709
16710 * linux-low.h (regset_func): Removed.
16711 (regset_fill_func, regset_store_func): New.
16712 (enum regset_type): New.
16713 (struct regset_info): Add type field. Use new operation types.
16714 (struct linux_target_ops): stop_pc renamed to get_pc.
16715 Add decr_pc_after_break and breakpoint_at.
16716 (get_process, get_thread_proess, get_process_thread)
16717 (strut process_info, all_processes, linux_attach_lwp)
16718 (thread_db_init): New.
16719
16720 * linux-arm-low.c (arm_get_pc, arm_set_pc,
16721 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
16722 (the_low_target): Add new members.
16723 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
16724 (i386_store_fpxregset): Constify.
16725 (target_regsets): Add new kind identifier.
16726 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
16727 (i386_set_pc): Add debugging.
16728 (i386_breakpoint_at): New function.
16729 (the_low_target): Add new members.
16730 * linux-mips-low.c (mips_get_pc, mips_set_pc)
16731 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
16732 (mips_breakpoint_at): New.
16733 (the_low_target): Add new members.
16734 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
16735 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
16736 (the_low_target): Add new members.
16737 * linux-sh-low.c (sh_get_pc, sh_set_pc)
16738 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
16739 (the_low_target): Add new members.
16740 * linux-x86-64-low.c (target_regsets): Add new kind
16741 identifier.
16742
16743 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
16744
16745 From Martin Pool <mbp@samba.org>:
16746 * server.c (gdbserver_usage): New function.
16747 (main): Call it.
16748
16749 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
16750
16751 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
16752 stop_at -> stop_pc.
16753
16754 2002-05-04 Andrew Cagney <ac131313@redhat.com>
16755
16756 * Makefile.in: Remove obsolete code.
16757
16758 2002-04-24 Michal Ludvig <mludvig@suse.cz>
16759
16760 * linux-low.c (regsets_fetch_inferior_registers),
16761 (regsets_store_inferior_registers): Removed cast to int from
16762 ptrace() calls.
16763 * regcache.h: Added declaration of struct inferior_info.
16764
16765 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
16766
16767 * inferiors.c (struct inferior_info): Add regcache_data.
16768 (add_inferior): Call create_register_cache.
16769 (clear_inferiors): Call free_register_cache.
16770 (inferior_regcache_data, set_inferior_regcache_data): New functions.
16771 * regcache.c (struct inferior_regcache_data): New.
16772 (registers): Remove.
16773 (get_regcache): New function.
16774 (create_register_cache, free_register_cache): New functions.
16775 (set_register_cache): Don't initialize the register cache here.
16776 (registers_to_string, registers_from_string, register_data): Call
16777 get_regcache.
16778 * regcache.h: Add prototypes.
16779 * server.h: Likewise.
16780
16781 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
16782
16783 * mem-break.c: New file.
16784 * mem-break.h: New file.
16785 * Makefile.in: Add mem-break.o rule; update server.h
16786 dependencies.
16787 * inferiors.c (struct inferior_info): Add target_data
16788 member.
16789 (clear_inferiors): Free target_data member if set.
16790 (inferior_target_data, set_inferior_target_data): New functions.
16791 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
16792 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
16793 * linux-low.c (linux_bp_reinsert): New variable.
16794 (struct inferior_linux_data): New.
16795 (linux_create_inferior): Use set_inferior_target_data.
16796 (linux_attach): Likewise. Call add_inferior.
16797 (linux_wait_for_one_inferior): New function.
16798 (linux_wait): Call it.
16799 (linux_write_memory): Add const.
16800 (initialize_low): Call set_breakpoint_data.
16801 * linux-low.h (struct linux_target_ops): Add breakpoint
16802 handling members.
16803 * server.c (attach_inferior): Remove extra add_inferior
16804 call.
16805 * server.h: Include mem-break.h. Update inferior.c
16806 prototypes.
16807 * target.c (read_inferior_memory)
16808 (write_inferior_memory): New functions.
16809 * target.h (read_inferior_memory)
16810 (write_inferior_memory): Change macros to prototypes.
16811 (struct target_ops): Update comments. Add const to write_memory
16812 definition.
16813
16814 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
16815
16816 * linux-low.c (usr_store_inferior_registers): Support
16817 registers which are allowed to fail to store.
16818 * linux-low.h (linux_target_ops): Likewise.
16819 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
16820 (ppc_cannot_store_register): FPSCR may not be storable.
16821
16822 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
16823
16824 * server.h: Include <string.h> if HAVE_STRING_H.
16825 * ChangeLog: Correct paths in last ChangeLog entry.
16826
16827 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
16828
16829 * linux-low.h: Remove obsolete prototypes.
16830 (struct linux_target_ops): New.
16831 (extern the_low_target): New.
16832 * linux-low.c (num_regs, regmap): Remove declarations.
16833 (register_addr): Use the_low_target explicitly.
16834 (fetch_register): Likewise.
16835 (usr_fetch_inferior_registers): Likewise.
16836 (usr_store_inferior_registers): Likewise.
16837 * linux-arm-low.c (num_regs): Remove.
16838 (arm_num_regs): Define.
16839 (arm_regmap): Renamed from regmap, made static.
16840 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
16841 made static.
16842 (arm_cannot_store_register): Renamed from cannot_store_register,
16843 made static.
16844 (the_low_target): New.
16845 * linux-i386-low.c (num_regs): Remove.
16846 (i386_num_regs): Define.
16847 (i386_regmap): Renamed from regmap, made static.
16848 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
16849 made static.
16850 (i386_cannot_store_register): Renamed from cannot_store_register,
16851 made static.
16852 (the_low_target): New.
16853 * linux-ia64-low.c (num_regs): Remove.
16854 (ia64_num_regs): Define.
16855 (ia64_regmap): Renamed from regmap, made static.
16856 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
16857 made static.
16858 (ia64_cannot_store_register): Renamed from cannot_store_register,
16859 made static.
16860 (the_low_target): New.
16861 * linux-m68k-low.c (num_regs): Remove.
16862 (m68k_num_regs): Define.
16863 (m68k_regmap): Renamed from regmap, made static.
16864 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
16865 made static.
16866 (m68k_cannot_store_register): Renamed from cannot_store_register,
16867 made static.
16868 (the_low_target): New.
16869 * linux-mips-low.c (num_regs): Remove.
16870 (mips_num_regs): Define.
16871 (mips_regmap): Renamed from regmap, made static.
16872 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
16873 made static.
16874 (mips_cannot_store_register): Renamed from cannot_store_register,
16875 made static.
16876 (the_low_target): New.
16877 * linux-ppc-low.c (num_regs): Remove.
16878 (ppc_num_regs): Define.
16879 (ppc_regmap): Renamed from regmap, made static.
16880 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
16881 made static.
16882 (ppc_cannot_store_register): Renamed from cannot_store_register,
16883 made static.
16884 (the_low_target): New.
16885 * linux-s390-low.c (num_regs): Remove.
16886 (s390_num_regs): Define.
16887 (s390_regmap): Renamed from regmap, made static.
16888 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
16889 made static.
16890 (s390_cannot_store_register): Renamed from cannot_store_register,
16891 made static.
16892 (the_low_target): New.
16893 * linux-sh-low.c (num_regs): Remove.
16894 (sh_num_regs): Define.
16895 (sh_regmap): Renamed from regmap, made static.
16896 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
16897 made static.
16898 (sh_cannot_store_register): Renamed from cannot_store_register,
16899 made static.
16900 (the_low_target): New.
16901 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
16902 (the_low_target): New.
16903
16904 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
16905
16906 * Makefile.in: Add stamp-h target.
16907 * configure.in: Create stamp-h.
16908 * configure: Regenerated.
16909
16910 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
16911
16912 * inferiors.c: New file.
16913 * target.c: New file.
16914 * target.h: New file.
16915 * Makefile.in: Add target.o and inferiors.o. Update
16916 dependencies.
16917 * linux-low.c (inferior_pid): New static variable,
16918 moved from server.c.
16919 (linux_create_inferior): Renamed from create_inferior.
16920 Call add_inferior. Return 0 on success instead of a PID.
16921 (linux_attach): Renamed from myattach.
16922 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
16923 (linux_thread_alive): Renamed from mythread_alive.
16924 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
16925 child dies.
16926 (linux_resume): Renamed from myresume. Add missing ``return 0''.
16927 (regsets_store_inferior_registers): Correct error message.
16928 Add missing ``return 0''.
16929 (linux_fetch_registers): Renamed from fetch_inferior_registers.
16930 (linux_store_registers): Renamed from store_inferior_registers.
16931 (linux_read_memory): Renamed from read_inferior_memory.
16932 (linux_write_memory): Renamed from write_inferior_memory.
16933 (linux_target_ops): New structure.
16934 (initialize_low): Call set_target_ops ().
16935 * remote-utils.c (unhexify): New function.
16936 (hexify): New function.
16937 (input_interrupt): Send signals to ``signal_pid''.
16938 * server.c (inferior_pid): Remove.
16939 (start_inferior): Update create_inferior call.
16940 (attach_inferior): Call add_inferior.
16941 (handle_query): New function.
16942 (main): Call handle_query for `q' packets.
16943 * server.h: Include "target.h". Remove obsolete prototypes.
16944 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
16945
16946 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
16947
16948 * Makefile.in: Add WARN_CFLAGS. Update configury
16949 dependencies.
16950 * configure.in: Check for <string.h>
16951 * configure: Regenerate.
16952 * config.in: Regenerate.
16953 * gdbreplay.c: Include needed system headers.
16954 (remote_open): Remove strchr prototype.
16955 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
16956 * regcache.c (supply_register): Change buf argument to const void *.
16957 (supply_register_by_name): Likewise.
16958 (collect_register): Change buf argument to void *.
16959 (collect_register_by_name): Likewise.
16960 * regcache.h: Add missing prototypes.
16961 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
16962 * server.c (handle_query): New function.
16963 (attached): New static variable, moved out of main.
16964 (main): Quiet longjmp clobber warnings.
16965 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
16966 * utils.c (error): Remove NORETURN.
16967 (fatal): Likewise.
This page took 0.376674 seconds and 5 git commands to generate.