Implement IPv6 support for GDB/gdbserver
[deliverable/binutils-gdb.git] / gdb / gdbserver / ChangeLog
1 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
2 Jan Kratochvil <jan.kratochvil@redhat.com>
3 Paul Fertser <fercerpav@gmail.com>
4 Tsutomu Seki <sekiriki@gmail.com>
5
6 * Makefile.in (SFILES): Add '$(srcdir)/common/netstuff.c'.
7 (OBS): Add 'common/netstuff.o'.
8 (GDBREPLAY_OBS): Likewise.
9 * gdbreplay.c: Include 'wspiapi.h' and 'netstuff.h'.
10 (remote_open): Implement support for IPv6
11 connections.
12 * remote-utils.c: Include 'netstuff.h', 'filestuff.h'
13 and 'wspiapi.h'.
14 (handle_accept_event): Accept connections from IPv6 sources.
15 (remote_prepare): Handle IPv6-style hostnames; implement
16 support for IPv6 connections.
17 (remote_open): Implement support for printing connections from
18 IPv6 sources.
19
20 2018-07-11 Pedro Alves <palves@redhat.com>
21
22 PR gdb/23377
23 * mem-break.c (any_persistent_commands): Add process_info
24 parameter and use it instead of relying on the current process.
25 Change return type to bool.
26 * mem-break.h (any_persistent_commands): Add process_info
27 parameter and change return type to bool.
28 * server.c (handle_detach): Remove require_running_or_return call.
29 Look up the process_info for the process we're about to detach.
30 If not found, return back error to GDB. Adjust
31 any_persistent_commands call to pass down a process pointer.
32
33 2018-07-11 Pedro Alves <palves@redhat.com>
34
35 * i387-fp.c (i387_cache_to_fsave, cache_to_fxsave)
36 (i387_cache_to_xsave): Use regcache_raw_get_unsigned_by_name
37 instead of collect_register_by_name.
38 * regcache.c (regcache_raw_get_unsigned_by_name): New.
39 * regcache.h (regcache_raw_get_unsigned_by_name): New.
40
41 2018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
42 Pedro Alves <palves@redhat.com>
43
44 * linux-low.c (initialize_low): Call linux_proc_init_warnings.
45
46 2018-07-03 Tom Tromey <tom@tromey.com>
47
48 * linux-low.c: Update.
49 * lynx-low.c: Update.
50 * mem-break.c: Update.
51 * nto-low.c: Update.
52 * remote-utils.c: Update.
53 * server.c: Update.
54 * spu-low.c: Update.
55 * target.c: Update.
56 * win32-low.c: Update.
57
58 2018-07-03 Tom Tromey <tom@tromey.com>
59
60 * server.c: Update.
61
62 2018-07-03 Tom Tromey <tom@tromey.com>
63
64 * linux-low.c: Update.
65
66 2018-07-03 Tom Tromey <tom@tromey.com>
67
68 * target.c: Update.
69
70 2018-07-03 Tom Tromey <tom@tromey.com>
71
72 * linux-low.c: Update.
73 * linux-mips-low.c: Update.
74 * lynx-low.c: Update.
75 * nto-low.c: Update.
76 * remote-utils.c: Update.
77 * server.c: Update.
78 * spu-low.c: Update.
79 * target.c: Update.
80 * thread-db.c: Update.
81
82 2018-07-03 Tom Tromey <tom@tromey.com>
83
84 * linux-low.c: Update.
85 * linux-mips-low.c: Update.
86 * lynx-low.c: Update.
87 * mem-break.c: Update.
88 * nto-low.c: Update.
89 * remote-utils.c: Update.
90 * server.c: Update.
91 * spu-low.c: Update.
92 * target.c: Update.
93 * tracepoint.c: Update.
94
95 2018-07-03 Tom Tromey <tom@tromey.com>
96
97 * linux-low.c: Update.
98 * linux-ppc-low.c: Update.
99 * linux-x86-low.c: Update.
100 * proc-service.c: Update.
101 * server.c: Update.
102 * spu-low.c: Update.
103 * thread-db.c: Update.
104 * win32-low.c: Update.
105
106 2018-07-03 Tom Tromey <tom@tromey.com>
107
108 * linux-low.c: Update.
109 * lynx-low.c: Update.
110 * nto-low.c: Update.
111 * remote-utils.c: Update.
112 * spu-low.c: Update.
113 * thread-db.c: Update.
114 * win32-low.c: Update.
115
116 2018-06-29 Joel Brobecker <brobecker@adacore.com>
117
118 * linux-x86-tdesc.c (amd64_linux_read_description): Add missing
119 parameter in call to 'amd64_create_target_description'.
120
121 2018-06-28 Jan Kratochvil <jan.kratochvil@redhat.com>
122
123 * x86-tdesc.h: Remove executable permission flag.
124
125 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
126
127 * configure.ac: Remove AC_PREREQ, add missing quoting.
128 * configure: Re-generate.
129 * config.in: Re-generate.
130 * aclocal.m4: Re-generate.
131
132 2018-06-18 Simon Marchi <simon.marchi@ericsson.com>
133
134 * tracepoint.h (current_traceframe): Remove declaration.
135
136 2018-06-18 Alan Hayward <alan.hayward@arm.com>
137
138 * linux-aarch64-low.c (is_sve_tdesc): New function.
139 (aarch64_sve_regs_copy_to_regcache): Likewise.
140 (aarch64_sve_regs_copy_from_regcache): Likewise.
141 (aarch64_regs_info): Add SVE checks.
142 (initialize_low_arch): Initialize SVE.
143
144 2018-06-18 Alan Hayward <alan.hayward@arm.com>
145
146 * Makefile.in: Add aarch64-sve-linux-ptrace.c.
147
148 2018-06-11 Alan Hayward <alan.hayward@arm.com>
149
150 * linux-aarch64-ipa.c (get_ipa_tdesc): Add null VQ param.
151 (initialize_low_tracepoint): Likewise
152 * linux-aarch64-low.c (aarch64_arch_setup): Get VQ.
153 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Add null VQ
154 param.
155 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add VQ
156 checks.
157 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Add VQ.
158
159 2018-06-11 Alan Hayward <alan.hayward@arm.com>
160
161 * server.h (PBUFSIZ): Increase size
162
163 2018-06-11 Alan Hayward <alan.hayward@arm.com>
164
165 * regcache.c (regcache::raw_compare): New function.
166 * regcache.h (regcache::raw_compare): New declaration.
167
168 2018-06-11 Alan Hayward <alan.hayward@arm.com>
169
170 * regcache.c (new_register_cache): Use new.
171 (free_register_cache): Use delete.
172 (register_data): Use const.
173 (supply_register): Move body inside regcache.
174 (regcache::raw_supply): New override function.
175 (collect_register): Move body inside regcache.
176 (regcache::raw_collect): New override function.
177 (regcache::get_register_status): New override function.
178 * regcache.h (struct regcache): Inherit from reg_buffer_common.
179
180 2018-06-09 Tom Tromey <tom@tromey.com>
181
182 * event-loop.c (gdb_event, gdb_event_p): Remove typedefs. Don't
183 declare queue.
184 (event_queue): Use std::queue.
185 (gdb_event_xfree): Remove.
186 (initialize_event_loop, process_event, wait_for_event): Update.
187
188 2018-06-08 Stan Cox <scox@redhat.com>
189
190 * win32-low.c (win32_create_inferior): last_ptid and last_status
191 moved to client_state.
192
193 2018-06-08 Pedro Alves <palves@redhat.com>
194
195 * Makefile.in (GDBREPLAY_OBS): Add common/cleanups.o,
196 common/common-exceptions.o, common/common-utils.o,
197 common/errors.o, common/print-utils.o and utils.o.
198 * gdbreplay.c: Include "common-defs.h" instead of the two
199 'config.h's here. Don't include stdio.h, errno.h, stdlib.h,
200 string.h or alloca.h.
201 (perror_with_name): Delete.
202 (remote_open): Use xstrdup instead of strdup.
203 (main): Rename to ...
204 (captured_main): ... this.
205 (main): New.
206
207 2018-06-08 Tom Tromey <tom@tromey.com>
208
209 * linux-low.c (linux_low_read_btrace): Update.
210
211 2018-06-04 Stan Cox <scox@redhat.com>
212
213 * server.h (struct client_state): New.
214 * server.c (cont_thread, general_thread, multi_process)
215 (report_fork_events, report_vfork_events, report_exec_events)
216 (report_thread_events, swbreak_feature, hwbreak_feature)
217 (vCont_supported, disable_randomization, pass_signals)
218 (program_signals, program_signals_p, last_status, last_ptid, own_buf):
219 Moved to client_state.
220 * remote-utils.c (remote_debug, noack_mode)
221 (transport_is_reliable): Moved to client_state.
222 * tracepoint.c (current_traceframe): Moved to client_state.
223
224 Update all callers.
225 * server.c, remote-utils.c, tracepoint.c, fork-child.c,
226 linux-low.c, remote-utils.h, target.c: Use client_state.
227
228 2018-05-31 Alan Hayward <alan.hayward@arm.com>
229
230 * configure.srv: Add new c/h file.
231
232 2018-05-31 Alan Hayward <alan.hayward@arm.com>
233
234 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add
235 null VQ.
236
237 2018-05-25 Maciej W. Rozycki <macro@mips.com>
238
239 * gdb.arch/mips-fpregset-core.exp: New test.
240 * gdb.arch/mips-fpregset-core.c: New test source.
241
242 2018-05-23 Erik Kurzinger <ekurzinger@nvidia.com>
243
244 PR server/23198
245 * hostio.c (require_int): Do not report overflow for integers
246 between 0xfffffff and 0x7fffffff.
247
248 2018-05-22 Maciej W. Rozycki <macro@mips.com>
249
250 * linux-mips-low.c [HAVE_PTRACE_GETREGS] (mips_collect_register)
251 (mips_supply_register): Move outside HAVE_PTRACE_GETREGS.
252 (mips_collect_ptrace_register, mips_supply_ptrace_register): New
253 functions.
254 (the_low_target): Wire them.
255
256 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
257
258 * linux-ppc-low.c (ppc_fill_vrregset): Add vscr_offset variable.
259 Set vscr_offset to 0 in little-endian mode and 12 in big-endian
260 mode. Call collect_register_by_name with vscr using
261 vscr_offset. Zero-pad vscr and vrsave fields in collector buffer.
262 (ppc_store_vrregset): Add and set vscr_offset variable as in
263 ppc_fill_vrregset. Call supply_register_by_name with vscr using
264 vscr_offset.
265
266 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
267
268 * linux-ppc-low.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
269 (ppc_arch_setup): Change SIZEOF_VRREGS and SIZEOF_VSXREGS to
270 PPC_LINUX_SIZEOF_VRREGSET and PPC_LINUX_SIZEOF_VSXREGSET.
271
272 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
273
274 * linux-ppc-low.c (ppc_fill_vsxregset): Remove ppc_hwcap check.
275 (ppc_store_vsxregset): Likewise.
276 (ppc_fill_vrregset): Likewise.
277 (ppc_store_vrregset): Likewise.
278 (ppc_fill_evrregset): Likewise.
279 (ppc_store_evrregset): Likewise.
280 (ppc_regsets): Set VSX/VR/EVR regset sizes to 0.
281 (ppc_arch_setup): Iterate through ppc_regsets and set sizes when
282 needed.
283
284 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
285
286 * linux-ppc-low.c (ppc_arch_setup): Remove code for getting the
287 wordsize of the inferior. Call ppc_linux_target_wordsize.
288
289 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
290
291 * configure.srv (srv_tgtobj): Add arch/ppc-linux-common.o.
292 * Makefile.in (SFILES): Add arch/ppc-linux-common.c.
293 * linux-ppc-tdesc.h: Rename to linux-ppc-tdesc-init.h.
294 * linux-ppc-tdesc-init.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
295 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
296 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
297 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
298 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
299 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
300 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
301 (tdesc_powerpc_e500l): Remove.
302 * linux-ppc-ipa.c: Include arch/ppc-linux-tdesc.h and
303 linux-ppc-tdesc-init.h. Don't include linux-ppc-tdesc.h.
304 * linux-ppc-low.c: Include arch/ppc-linux-common.h,
305 arch/ppc-linux-tdesc.h, and linux-ppc-tdesc-init.h. Don't include
306 linux-ppc-tdesc.h.
307 (ppc_arch_setup): Remove target description matching code. Fill a
308 ppc_linux_features struct and call ppc_linux_match_description
309 with it.
310
311 2018-05-22 Maciej W. Rozycki <macro@mips.com>
312
313 * linux-mips-low.c (mips_cannot_fetch_register): Return 1 if the
314 width of the requested register exceeds the width of the
315 `ptrace' data type.
316 (mips_cannot_store_register): Likewise.
317
318 2018-05-21 Maciej W. Rozycki <macro@mips.com>
319
320 * linux-mips-low.c (mips_fetch_register): New function. Update
321 preceding comment.
322 (mips_store_gregset): Supply 0 rather than $restart for $zero.
323 (the_low_target): Wire `mips_fetch_register'.
324
325 2018-05-10 Joel Brobecker <brobecker@adacore.com>
326
327 * lynx-i386-low.c (LYNXOS_178): New macro.
328 [LYNXOS_178] (usr_fcontext_t): Provide a definition that matches
329 the layout on LynxOS-178.
330 (lynx_i386_fill_fpregset, lynx_i386_store_fpregset): Do not
331 handle floating point registers that are not supported by
332 LynxOS-178.
333
334 2018-05-10 Tom Tromey <tom@tromey.com>
335
336 * configure: Rebuild.
337
338 2018-05-10 Joel Brobecker <brobecker@adacore.com>
339
340 PR server/23158:
341 * tdesc.h (init_target_desc) <expedite_regs>: New parameter.
342 * tdesc.c (init_target_desc) <expedite_regs>: New parameter.
343 Use it to set the expedite_regs field in the given tdesc.
344 * x86-tdesc.h: New file.
345 * linux-aarch64-tdesc.c (aarch64_linux_read_description):
346 Adjust following the addition of the new expedite_regs parameter
347 to init_target_desc.
348 * linux-tic6x-low.c (tic6x_read_description): Likewise.
349 * linux-x86-tdesc.c: #include "x86-tdesc.h".
350 (i386_linux_read_description, amd64_linux_read_description):
351 Adjust following the addition of the new expedite_regs parameter
352 to init_target_desc.
353 * lynx-i386-low.c: #include "x86-tdesc.h".
354 (lynx_i386_arch_setup): Adjust following the addition of the new
355 expedite_regs parameter to init_target_desc.
356 * nto-x86-low.c: #include "x86-tdesc.h".
357 (nto_x86_arch_setup): Adjust following the addition of the new
358 expedite_regs parameter to init_target_desc.
359 * win32-i386-low.c: #include "x86-tdesc.h".
360 (i386_arch_setup): Adjust following the addition of the new
361 expedite_regs parameter to init_target_desc.
362
363 2018-05-10 Joel Brobecker <brobecker@adacore.com>
364
365 PR server/23158:
366 * win32-low.c (win32_create_inferior): Add call to my_wait
367 setting last_status global.
368
369 2018-05-10 Joel Brobecker <brobecker@adacore.com>
370
371 PR server/23158:
372 * win32-low.c (create_process): Only call gdb_tilde_expand if
373 inferior_cwd is not NULL.
374
375 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
376
377 * i387-fp.c (i387_cache_to_xsave): Only write x87 control
378 registers to the cache if their values have changed.
379 (i387_xsave_to_cache): Provide default values for x87 control
380 registers when these features are available, but disabled.
381 * regcache.c (supply_register_by_name_zeroed): New function.
382 * regcache.h (supply_register_by_name_zeroed): Declare new
383 function.
384
385 2018-05-07 Tom Tromey <tom@tromey.com>
386
387 * configure: Rebuild.
388
389 2018-05-04 Tom Tromey <tom@tromey.com>
390
391 * configure: Rebuild.
392
393 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
394 Pedro Alves <palves@redhat.com>
395
396 * linux-aarch64-low.c (aarch64_stopped_data_address):
397 Likewise.
398
399 2018-04-27 Tom Tromey <tom@tromey.com>
400
401 * configure: Rebuild.
402
403 2018-04-23 Tom Tromey <tom@tromey.com>
404
405 * configure: Rebuild.
406
407 2018-04-19 Simon Marchi <simon.marchi@ericsson.com>
408
409 * Makefile.in (depcomp): Add "..".
410 (all_deps_files): New and use it.
411
412 2018-04-18 Alan Hayward <alan.hayward@arm.com>
413
414 * configure.srv (aarch64*-*-linux*): Don't include xml.
415 (i[34567]86-*-cygwin*): Likewise.
416 (i[34567]86-*-linux*): Likewise.
417 (i[34567]86-*-lynxos*): Likewise.
418 (i[34567]86-*-mingw32ce*): Likewise.
419 (i[34567]86-*-mingw*): Likewise.
420 (i[34567]86-*-nto*): Likewise.
421 (tic6x-*-uclinux): Likewise.
422 (x86_64-*-linux*): Likewise.
423 (x86_64-*-mingw*): Likewise.
424 (x86_64-*-cygwin*): Likewise.
425
426 2018-04-18 Alan Hayward <alan.hayward@arm.com>
427
428 * tdesc.c: Remove xml parameter.
429
430 2018-04-18 Alan Hayward <alan.hayward@arm.com>
431
432 * server.c (get_features_xml): Remove cast.
433 * tdesc.c (void target_desc::accept): Fill in function.
434 (tdesc_get_features_xml): Remove old xml creation.
435 (print_xml_feature::visit_pre): Add xml vistor.
436 * tdesc.h (struct target_desc): Make xmltarget mutable.
437 (tdesc_get_features_xml): Remove declaration.
438
439 2018-04-18 Alan Hayward <alan.hayward@arm.com>
440
441 * tdesc.c (tdesc_architecture_name): Add new function.
442 (tdesc_osabi_name): Likewise.
443 (tdesc_get_features_xml): Use new functions.
444
445 2018-04-18 Alan Hayward <alan.hayward@arm.com>
446
447 * tdesc.c (tdesc_create_flags): Remove.
448 (tdesc_add_flag): Likewise.
449 (tdesc_named_type): Likewise.
450 (tdesc_create_union): Likewise.
451 (tdesc_create_struct): Likewise.
452 (tdesc_create_vector): Likewise.
453 (tdesc_add_bitfield): Likewise.
454 (tdesc_add_field): Likewise.
455 (tdesc_set_struct_size): Likewise.
456
457 2018-04-18 Alan Hayward <alan.hayward@arm.com>
458
459 * tdesc.c (~target_desc): Remove implictly deleted items.
460 (init_target_desc): Iterate all features.
461 (tdesc_get_features_xml): Use vector.
462 (tdesc_create_feature): Create feature.
463 * tdesc.h (tdesc_feature) Remove
464 (target_desc): Add features.
465
466 2018-04-18 Alan Hayward <alan.hayward@arm.com>
467
468 * Makefile.in: Add common/tdesc.c
469 * tdesc.c (init_target_desc): init all reg_defs from register
470 vector.
471 (tdesc_create_reg): Create tdesc_reg.
472 * tdesc.h (tdesc_feature): Add register vector.
473
474 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
475
476 * tdesc.h (struct target_desc) <features>: Change type to
477 std::vector<std::string>.
478 * tdesc.c (target_desc::~target_desc): Adjust to std::vector
479 changes.
480 (tdesc_get_features_xml): Likewise.
481 (tdesc_create_feature): Likewise.
482
483 2018-03-26 Alan Hayward <alan.hayward@arm.com>
484
485 * regcache.c (find_register_by_number): Return a ref.
486 (find_regno): Use references.
487 (register_size): Likewise.
488 (register_data): Likewise.
489 * tdesc.c (target_desc::~target_desc): Remove free calls.
490 (target_desc::operator==): Use std::vector compare.
491 (init_target_desc): Use reference.
492 (tdesc_create_reg): Use reg constructors.
493 * tdesc.h (struct target_desc): Replace pointer with object.
494
495 2018-03-23 Alan Hayward <alan.hayward@arm.com>
496
497 * regcache.c (find_register_by_number): Make static.
498 (find_regno): Use find_register_by_number
499 * regcache.h (struct reg): Remove declaration.
500
501 2018-03-23 Alan Hayward <alan.hayward@arm.com>
502
503 * tdesc.c (target_desc::~target_desc): Move to here.
504 (target_desc::operator==): Likewise.
505 * tdesc.h (target_desc::~target_desc): Move from here.
506 (target_desc::operator==): Likewise.
507
508 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
509
510 * linux-s390-low.c (s390_get_wordsize): Correct brace style.
511
512 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
513
514 * linux-s390-ipa.c (get_ipa_tdesc): Add handling for
515 S390_TDESC_GS.
516 * linux-s390-low.c (s390_get_ipa_tdesc_idx): Likewise.
517 (initialize_low_tracepoint): Call init_registers_s390x_gs_linux64
518 and init_registers_s390_gs_linux64.
519
520 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
521
522 * linux-s390-low.c (s390_fill_gs): Remove function.
523 (s390_fill_gsbc): Remove function.
524 (s390_regsets): Set fill functions for the guarded storage regsets
525 to NULL.
526
527 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
528
529 * linux-s390-low.c (s390_get_hwcap): Replace tdesc parameter by
530 the word size. Add comment.
531 (s390_get_wordsize): New function.
532 (s390_arch_setup): No longer select a temporary tdesc to fetch the
533 pswm with it. Instead, use s390_get_wordsize to determine the
534 word size first and derive the correct tdesc from that directly.
535
536 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
537
538 * Makefile.in: Include silent-rules.mk.
539 (srcdir, abs_top_srcdir, abs_srcdir, VPATH): Move up.
540 (COMPILE): Add ECHO_CXX.
541 (gdbserver$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
542 (gdbreplay$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
543 ($(IPA_LIB)): Add SILENCE and ECHO_CXXLD.
544 (version-generated.c): Add ECHO_GEN.
545 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN_GENERATED.
546 (IPAGENT_COMPILE): Add ECHO_CXX.
547 (%-generated.c): Add ECHO_REGDAT.
548
549 2018-03-14 Tom Tromey <tom@tromey.com>
550
551 PR cli/14977:
552 * ax.c (ax_printf): Special case for NULL.
553
554 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
555
556 * linux-low.c (linux_qxfer_libraries_svr4): Use
557 xml_escape_text_append.
558
559 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
560
561 * linux-low.c (linux_qxfer_libraries_svr4): Use std::string.
562
563 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
564
565 * server.c (handle_general_set): Remove unnecessary xstrdup.
566
567 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
568
569 * server.c (parse_debug_format_options): Adjust to
570 delim_string_to_char_ptr_vec changes.
571 * thread-db.c (thread_db_load_search): Adjust to
572 dirnames_to_char_ptr_vec changes.
573
574 2018-03-01 Markus Metzger <markus.t.metzger@intel.com>
575
576 * target.h (target_enable_btrace, target_disable_btrace)
577 (target_read_btrace, target_read_btrace_conf): Turn macro into
578 inline function. Throw error if target method is not defined.
579 * server.c (handle_qxfer_btrace handle_qxfer_btrace_conf): Remove
580 check for btrace target method. Be prepared to handle exceptions
581 from btrace target methods.
582
583 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
584
585 * server.c (captured_main): Change order of error message printed
586 when the current working directory cannot be found.
587
588 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
589
590 * server.c: Include "filenames.h" and "pathstuff.h".
591 (program_name): Delete variable.
592 (program_path): New anonymous class.
593 (get_exec_wrapper): Use "program_path" instead of
594 "program_name".
595 (handle_v_run): Likewise.
596 (captured_main): Likewise.
597 (process_serial_event): Likewise.
598
599 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
600
601 * Makefile.in (SFILES): Add "$(srcdir)/common/pathstuff.c".
602 (OBJS): Add "pathstuff.o".
603 * server.c (current_directory): New global variable.
604 (captured_main): Initialize "current_directory".
605
606 2018-02-26 Alan Hayward <alan.hayward@arm.com>
607
608 * tdesc.c: Use common/tdesc.h.
609 * tdesc.h: Likewise.
610
611 2018-02-20 Alan Hayward <alan.hayward@arm.com>
612 Simon Marchi <simon.marchi@ericsson.com>
613
614 * Makefile.in: Switch order of make rules.
615
616 2018-02-19 Alan Hayward <alan.hayward@arm.com>
617
618 * Makefile.in: Add common directory in build.
619 * configure.ac: Add common reference.
620 * configure: Regenerate.
621
622 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
623
624 * linux-low.c (linux_target_ops): Remove linux_supports_btrace.
625 * nto-low.c (nto_target_ops): Remove NULL for supports_btrace.
626 * spu-low.c (spu_target_ops): Likewise.
627 * win32-low.c (win32_target_ops): Likewise.
628 * server.c (supported_btrace_packets): Report packets unconditionally.
629 * target.h (target_ops) <supports_btrace>: Remove.
630 (target_supports_btrace): Remove.
631
632 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
633
634 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt)
635 (handle_btrace_disable): Change return type to void. Use exceptions
636 to report errors.
637 (handle_btrace_general_set): Catch exception and copy message to
638 return message.
639
640 2018-02-08 Tom Tromey <tom@tromey.com>
641
642 * linux-low.c (install_software_single_step_breakpoints): Use
643 make_scoped_restore.
644 * inferiors.c (make_cleanup_restore_current_thread): Remove.
645 (do_restore_current_thread_cleanup): Remove.
646 * gdbthread.h (make_cleanup_restore_current_thread): Don't
647 declare.
648
649 2018-02-08 Tom Tromey <tom@tromey.com>
650
651 * mem-break.c (set_raw_breakpoint_at): Use
652 gdb::unique_xmalloc_ptr.
653
654 2018-01-30 Pedro Alves <palves@redhat.com>
655
656 PR gdb/13211
657 * target.c (target_terminal::terminal_state): Rename to ...
658 (target_terminal::m_terminal_state): ... this.
659
660 2018-01-19 James Clarke <jrtc27@jrtc27.com>
661
662 * linux-low.c (handle_extended_wait): Surround call to
663 thread_db_notice_clone with #ifdef USE_THREAD_DB.
664
665 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
666
667 * linux-low.c (attach_proc_task_lwp_callback): Adjust to
668 linux_ptrace_attach_fail_reason_string now returning an
669 std::string.
670 (linux_attach): Likewise.
671 * thread-db.c (attach_thread): Likewise.
672
673 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
674
675 PR gdb/21559
676 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
677 checking for fs_base/gs_base fields in struct user_regs_struct.
678 * configure: Regenerate.
679
680 2018-01-16 Yao Qi <yao.qi@linaro.org>
681
682 PR gdb/18749
683 * linux-low.c (fetch_register): Call supply_register instead of
684 error.
685
686 2018-01-08 Yao Qi <yao.qi@linaro.org>
687 Simon Marchi <simon.marchi@ericsson.com>
688
689 * Makefile.in (OBS): Remove selftest.o.
690 * configure.ac: Set srv_selftest_objs if $development is true.
691 (GDBSERVER_DEPFILES): Append $srv_selftest_objs.
692 * configure: Re-generated.
693 * server.c (captured_main): Wrap variable selftest_filter with
694 GDB_SELF_TEST.
695
696 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
697
698 * server.c (parse_debug_format_options): Return std::string.
699 (handle_monitor_command, captured_main): Adjust.
700
701 2018-01-05 Pedro Alves <palves@redhat.com>
702
703 PR gdb/18653
704 * server.c (captured_main): Pass quiet=false to
705 save_original_signals_state.
706
707 2018-01-01 Joel Brobecker <brobecker@adacore.com>
708
709 * gdbreplay.c (gdbreplay_version): Update copyright year in
710 version message.
711 * server.c (gdbserver_version): Likewise.
712
713 2017-12-08 Tom Tromey <tom@tromey.com>
714
715 * ax.c (ax_printf): Update.
716
717 2017-12-07 Yao Qi <yao.qi@linaro.org>
718
719 * linux-aarch64-ipa.c (initialize_low_tracepoint): Call
720 aarch64_linux_read_description.
721 * linux-amd64-ipa.c (idx2mask): New array.
722 (get_ipa_tdesc): Move idx2mask out.
723 (initialize_low_tracepoint): Initialize target descriptions.
724 * linux-i386-ipa.c (idx2mask): New array.
725 (get_ipa_tdesc): Move idx2mask out.
726 (initialize_low_tracepoint): Initialize target descriptions.
727
728 2017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
729
730 * tdesc.c (struct tdesc_type): Change return type.
731 (tdesc_add_flag): Change parameter type.
732 (tdesc_add_bitfield): Likewise.
733 (tdesc_add_field): Likewise.
734 (tdesc_set_struct_size): Likewise.
735
736 2017-12-05 Simon Marchi <simon.marchi@ericsson.com>
737
738 * regcache.c (registers_to_string): Remove unused variable.
739
740 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
741
742 * inferiors.c (for_each_inferior_with_data): Remove.
743 * inferiors.h (for_each_inferior_with_data): Remove.
744 * server.c (handle_qxfer_threads_worker): Change parameter type.
745 (handle_qxfer_threads_proper): Use for_each_thread.
746
747 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
748
749 * inferiors.c (for_each_inferior): Remove.
750 (clear_inferiors): Use for_each_thread.
751 * inferiors.h (for_each_inferior): Remove.
752 * linux-low.c (linux_wait_for_event_filtered): Use
753 for_each_thread.
754 (linux_stabilize_threads): Likewise.
755 * regcache.c (regcache_release): Likewise.
756 * server.c (gdb_wants_all_threads_stopped): Likewise.
757 (clear_pending_status_callback): Remove.
758 (handle_status): Use for_each_thread.
759 (captured_main): Likewise.
760 * win32-low.c (child_init_thread_list): Likewise.
761 (win32_clear_inferiors): Likewise.
762 (fake_breakpoint_event): Likewise.
763
764 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
765
766 * inferiors.h (find_inferior): Remove.
767 * inferiors.c (find_inferior): Remove.
768
769 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
770
771 * linux-low.c (resume_status_pending_p): Update comment.
772 (need_step_over_p): Update comment.
773
774 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
775
776 * linux-low.c (proceed_one_lwp): Return void, change parameter
777 type.
778 (unsuspend_and_proceed_one_lwp): Likewise.
779 (proceed_all_lwps): Use for_each_thread.
780 (unstop_all_lwps): Likewise.
781
782 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
783
784 * linux-low.c (linux_resume_one_thread): Return void, take
785 parameter directly.
786 (linux_resume): Use for_each_thread.
787
788 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
789
790 * linux-low.c (send_sigstop_callback): Return void, change
791 parameter type. Rename to...
792 (send_sigstop): ... this.
793 (suspend_and_send_sigstop_callback): Return void, change parameter
794 type. Rename to...
795 (suspend_and_send_sigstop): ... this.
796 (stop_all_lwps): Use for_each_thread.
797
798 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
799
800 * linux-low.c (lwp_running): Return bool, remove unused
801 argument.
802 (linux_stabilize_threads): Use find_thread.
803
804 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
805
806 * linux-low.c (select_singlestep_lwp_callback): Remove.
807 (count_events_callback): Remove.
808 (select_event_lwp_callback): Remove.
809 (select_event_lwp): Use find_thread/for_each_thread.
810
811 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
812
813 * linux-low.c (not_stopped_callback): Return bool, take filter
814 argument directly.
815 (linux_wait_for_event_filtered): Use find_thread.
816 (linux_wait_1): Likewise.
817
818 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
819
820 * linux-low.c (same_lwp): Remove.
821 (find_lwp_pid): Use find_thread.
822
823 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
824
825 * linux-low.c (delete_lwp_callback): Remove.
826 (linux_mourn): Use for_each_thread.
827
828 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
829
830 * linux-low.c (linux_detach_lwp_callback): Return void, remove
831 args parameter, don't check for pid.
832 (linux_detach): Use for_each_thread.
833
834 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
835
836 * linux-low.c (struct counter): Remove.
837 (second_thread_of_pid_p): Remove.
838 (last_thread_of_process_p): Use find_thread.
839
840 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
841
842 * inferiors.c (find_inferior_in_random): Remove.
843 * inferiors.h (find_inferior_in_random): Remove.
844 * linux-low.c (status_pending_p_callback): Return bool, accept
845 parameter ptid directly.
846 (linux_wait_for_event_filtered): Use find_thread_in_random.
847 (linux_wait_1): Likewise.
848
849 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
850
851 * inferiors.c (find_inferior_id): Remove.
852 (find_thread_ptid): Move implemention from find_inferior_id to
853 here.
854 * inferiors.h (find_inferior_id): Remove.
855 * server.c (handle_status): Use find_thread_ptid.
856 (process_serial_event): Likewise.
857 * thread-db.c (find_one_thread): Likewise.
858 (thread_db_thread_handle): Likewise.
859 * win32-low.c (thread_rec): Likewise.
860 (child_delete_thread): Likewise.
861 (win32_thread_alive): Likewise.
862 (get_child_debug_event): Likewise.
863
864 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
865
866 * linux-mips-low.c (update_watch_registers_callback): Return
867 void, remove pid_p parameter, don't check for pid.
868 (mips_insert_point, mips_remove_point): Use for_each_thread.
869
870 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
871
872 * lynx.low (lynx_delete_thread_callback): Remove.
873 (lynx_mourn): Use for_each_thread.
874
875 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
876
877 * regcache.c (regcache_invalidate_one): Remove.
878 (regcache_invalidate_pid): use for_each_thread.
879
880 2017-11-26 Tom Tromey <tom@tromey.com>
881
882 * linux-low.c (linux_create_inferior): Update.
883
884 2017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
885
886 * spu-low.c (spu_create_inferior): Fix typo in argument name.
887
888 2017-11-24 Alan Hayward <alan.hayward@arm.com>
889
890 * configure.srv: Add linux-aarch64-tdesc-selftest.o.
891 * linux-aarch64-low.c (initialize_low_arch): Call init func.
892 * linux-aarch64-tdesc-selftest.c: New file.
893 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
894
895 2017-11-24 Alan Hayward <alan.hayward@arm.com>
896
897 * configure.srv: Add new file.
898 * linux-aarch64-low.c (initialize_low_arch): Call init func.
899 * linux-aarch64-tdesc-selftest.c: New file.
900 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
901
902 2017-11-24 Alan Hayward <alan.hayward@arm.com>
903
904 * linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init.
905 * linux-aarch64-low.c (initialize_low_arch): Remove init.
906 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
907
908 2017-11-24 Alan Hayward <alan.hayward@arm.com>
909
910 * configure.srv: Add new files.
911 * linux-aarch64-ipa.c (get_ipa_tdesc): Call
912 aarch64_linux_read_description.
913 * linux-aarch64-low.c (aarch64_linux_read_description):
914 Merge with aarch64_arch_setup.
915 (aarch64_arch_setup): Call aarch64_linux_read_description.
916 * linux-aarch64-tdesc.c: New file.
917 * linux-aarch64-tdesc.h: New file.
918
919 2017-11-24 Yao Qi <yao.qi@linaro.org>
920
921 * configure.srv: Set $srv_regobj for tic6x-linux.
922 * linux-tic6x-low.c: Include "arch/tic6x.h" and "tdesc.h".
923 (tic6x_read_description): Move some code to tic6x_arch_setup.
924 (tic6x_tdesc_test): New function.
925 (initialize_low_arch): Call selftests::register_test.
926
927 2017-11-22 Yao Qi <yao.qi@linaro.org>
928
929 * remote-utils.c (prepare_resume_reply): Use memcpy.
930
931 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
932
933 * linux-low.c (kill_one_lwp_callback): Return void, take
934 argument directly, don't filter on pid.
935 (linux_kill): Use for_each_thread.
936
937 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
938
939 * linux-low.c (need_step_over_p): Return bool, remove dummy
940 argument.
941 (linux_resume, proceed_all_lwps): Use find_thread.
942
943 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
944
945 * linux-low.c (resume_status_pending_p): Return bool, remove
946 flag_p argument.
947 (linux_resume): Use find_thread.
948
949 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
950
951 * linux-low.c (struct thread_resume_array): Remove.
952 (linux_set_resume_request): Return void, take arguments
953 directly.
954 (linux_resume): Use for_each_thread.
955
956 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
957
958 * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
959 return bool, remove data argument.
960 (linux_stabilize_threads): Use find_thread.
961
962 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
963
964 * linux-low.c (unsuspend_one_lwp): Remove.
965 (unsuspend_all_lwps): Use for_each_thread, inline code from
966 unsuspend_one_lwp.
967
968 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
969
970 * gdbthread.h (find_thread): Add overload with ptid_t filter.
971 * linux-low.c (struct iterate_over_lwps_args): Remove.
972 (iterate_over_lwps_filter): Remove.
973 (iterate_over_lwps): Use find_thread.
974
975 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
976
977 * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
978 (linux_handle_new_gdb_connection): Use for_each_thread, inline
979 code from reset_lwp_ptrace_options_callback.
980
981 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
982
983 * linux-arm-low.c (struct update_registers_data): Remove.
984 (update_registers_callback): Return void, take arguments
985 directly, don't check thread's pid.
986 (arm_insert_point, arm_remove_point): Use for_each_thread.
987
988 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
989
990 * win32-low.c (continue_one_thread): Return void, take argument
991 directly.
992 (child_continue): Use for_each_thread.
993
994 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
995
996 * win32-i386-low.c (update_debug_registers_callback): Rename
997 to ...
998 (update_debug_registers): ... this, return void, remove pid_p arg.
999 (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
1000
1001 2017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1002
1003 * inferiors.h (struct process_info): Add constructor, initialize
1004 fields..
1005 <syscalls_to_catch>: Change type to std::vector<int>.
1006 * inferiors.c (add_process): Allocate process_info with new.
1007 (remove_process): Free process_info with delete.
1008 * linux-low.c (handle_extended_wait): Adjust.
1009 (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
1010 * server.c (handle_general_set): Adjust.
1011
1012 2017-11-16 Pedro Alves <palves@redhat.com>
1013
1014 * remote-utils.c (remote_close): Block SIGIO signals instead of
1015 uninstalling the SIGIO handler.
1016
1017 2017-11-16 Alan Hayward <alan.hayward@arm.com>
1018
1019 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
1020
1021 2017-11-16 Yao Qi <yao.qi@linaro.org>
1022
1023 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
1024 (tic6x_store_gregset): Likewise.
1025 (tic6x_usrregs_info): Move it up.
1026
1027 2017-11-15 Alan Hayward <alan.hayward@arm.com>
1028
1029 * Makefile.in: Update arch rules.
1030 * configure.srv: Explicitly mark arch/ files.
1031
1032 2017-11-13 Andreas Schwab <schwab@suse.de>
1033
1034 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
1035 function.
1036 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1037
1038 2017-11-06 Pedro Alves <palves@redhat.com>
1039
1040 * config.in, configure: Regenerate.
1041
1042 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1043
1044 * target.c (struct thread_search): Remove.
1045 (thread_search_callback): Remove.
1046 (prepare_to_access_memory): Use for_each_thread instead of
1047 find_inferior. Inline code from thread_search_callback.
1048
1049 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1050
1051 * server.c (struct visit_actioned_threads_data): Remove.
1052 (visit_actioned_threads): Change prototype to take arguments
1053 directly.
1054 (resume): Use find_thread instead of find_inferior.
1055
1056 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1057
1058 * server.c (queue_stop_reply_callback): Change prototype, return
1059 void.
1060 (find_status_pending_thread_callback): Remove.
1061 (handle_status): Replace find_inferior with find_thread and
1062 for_each_thread.
1063
1064 2017-10-25 Alan Hayward <alan.hayward@arm.com>
1065
1066 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
1067 with REGNO.
1068 (aarch64_store_gregset): Likewise.
1069 (aarch64_fill_fpregset): Likewise.
1070 (aarch64_store_fpregset): Likewise.
1071
1072 2017-10-21 Simon Marchi <simon.marchi@ericsson.com>
1073
1074 * gdbthread.h (find_thread, for_each_thread): New functions.
1075 * inferiors.c (thread_of_pid): Remove.
1076 (find_any_thread_of_pid): Use find_thread.
1077 * linux-low.c (num_lwps): Use for_each_thread.
1078
1079 2017-10-17 Yao Qi <yao.qi@linaro.org>
1080
1081 * Makefile.in: Remove one rule.
1082 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
1083
1084 2017-10-17 Yao Qi <yao.qi@linaro.org>
1085
1086 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
1087 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
1088
1089 2017-10-17 Yao Qi <yao.qi@linaro.org>
1090
1091 * configure.srv: Rename arm.o with arch/arm.o.
1092
1093 2017-10-17 Yao Qi <yao.qi@linaro.org>
1094
1095 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
1096 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
1097 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
1098 (arch-i386.o, arch-amd64.o): Remove rules.
1099 (arch/%.o): New rule.
1100 Update POSTCOMPILE and COMPILE.pre.
1101 * configure.ac: Invoke AC_CONFIG_COMMANDS.
1102 * configure: Re-generated.
1103 * configure.srv: Replace arch-i386.o with arch/i386.o.
1104 Replace arch-amd64.o with arch/amd64.o.
1105
1106 2017-10-16 Yao Qi <yao.qi@linaro.org>
1107
1108 * configure: Regenerated.
1109
1110 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
1111
1112 * inferiors.h: (struct inferior_list): Remove.
1113 (struct inferior_list_entry); Remove.
1114 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
1115 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
1116 get_first_inferior): Remove.
1117 (for_each_inferior, for_each_inferior_with_data, find_inferior,
1118 find_inferior_id, find_inferior_in_random): Change signature.
1119 * inferiors.c (all_threads): Change type to
1120 std::list<thread_info *>.
1121 (get_thread): Remove macro.
1122 (find_inferior, find_inferior_id): Change signature, implement
1123 using find_thread.
1124 (find_inferior_in_random): Change signature, implement using
1125 find_thread_in_random.
1126 (for_each_inferior, for_each_inferior_with_data): Change
1127 signature, implement using for_each_thread.
1128 (add_inferior_to_list, remove_inferior): Remove.
1129 (add_thread, get_first_thread, thread_of_pid,
1130 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
1131 (get_first_inferior, one_inferior_p, clear_inferior_list):
1132 Remove.
1133 (clear_inferiors, get_thread_process): Update.
1134 * gdbthread.h: Include <list>.
1135 (struct thread_info) <entry>: Remove field.
1136 <id>: New field.
1137 (all_threads): Change type to std::list<thread_info *>.
1138 (get_first_inferior): Add doc.
1139 (find_thread, for_each_thread, find_thread_in_random): New
1140 functions.
1141 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
1142 * linux-arm-low.c (update_registers_callback): Update.
1143 * linux-low.c (second_thread_of_pid_p): Update.
1144 (kill_one_lwp_callback, linux_detach_lwp_callback,
1145 delete_lwp_callback, status_pending_p_callback, same_lwp,
1146 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
1147 iterate_over_lwps, not_stopped_callback,
1148 resume_stopped_resumed_lwps, count_events_callback,
1149 select_singlestep_lwp_callback, select_event_lwp_callback,
1150 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
1151 suspend_and_send_sigstop_callback, wait_for_sigstop,
1152 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
1153 lwp_running, linux_set_resume_request, resume_status_pending_p,
1154 need_step_over_p, start_step_over, linux_resume_one_thread,
1155 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
1156 reset_lwp_ptrace_options_callback): Update.
1157 * linux-mips-low.c (update_watch_registers_callback): Update.
1158 * regcache.c (regcache_invalidate_one, regcache_invalidate):
1159 Update.
1160 (free_register_cache_thread_one): Remove.
1161 (regcache_release): Update.
1162 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
1163 handle_qxfer_threads_worker): Update.
1164 (handle_query): Update, use list iterator.
1165 (visit_actioned_threads, handle_pending_status,
1166 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
1167 clear_pending_status_callback, set_pending_status_callback,
1168 find_status_pending_thread_callback, handle_status,
1169 process_serial_event): Update.
1170 * target.c (thread_search_callback): Update.
1171 * thread-db.c (thread_db_get_tls_address): Update.
1172 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
1173 Update.
1174 * win32-i386-low.c (update_debug_registers_callback): Update.
1175 * win32-low.c (delete_thread_info, child_delete_thread,
1176 continue_one_thread, suspend_one_thread,
1177 get_child_debug_event): Adjust.
1178
1179 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
1180
1181 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
1182 * inferiors.h: Include <list>.
1183 (struct process_info) <entry>: Remove field.
1184 <pid>: New field.
1185 (pid_of): Change macro to function.
1186 (ptid_of, lwpid_of): Remove macro.
1187 (all_processes): Change type to std::list<process_info *>.
1188 (ALL_PROCESSES): Remove macro.
1189 (for_each_process, find_process): New function.
1190 * inferiors.c (all_processes): Change type to
1191 std::list<process_info *>.
1192 (find_thread_process): Adjust.
1193 (add_process): Likewise.
1194 (remove_process): Likewise.
1195 (find_process_pid): Likewise.
1196 (get_first_process): Likewise.
1197 (started_inferior_callback): Remove.
1198 (have_started_inferiors_p): Adjust.
1199 (attached_inferior_callback): Remove.
1200 (have_attached_inferiors_p): Adjust.
1201 * linux-low.c (check_zombie_leaders): Likewise.
1202 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
1203 (x86_linux_update_xmltarget): Adjust.
1204 * server.c (handle_query): Likewise.
1205 (gdb_reattached_process): Remove.
1206 (handle_status): Adjust.
1207 (kill_inferior_callback): Likewise.
1208 (detach_or_kill_inferior): Remove.
1209 (print_started_pid): Likewise.
1210 (print_attached_pid): Likewise.
1211 (detach_or_kill_for_exit): Update.
1212 (process_serial_event): Likewise.
1213 * linux-arm-low.c (arm_new_fork): Likewise.
1214
1215 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
1216
1217 * dll.h: Include <list>.
1218 (struct dll_info): Add constructor.
1219 <entry>: Remove field.
1220 (all_dlls): Change type to std::list<dll_info>.
1221 * dll.c: Include <algorithm>.
1222 (get_dll): Remove macro.
1223 (all_dlls): Change type to std::list<dll_info *>.
1224 (free_one_dll): Remove.
1225 (match_dll): Likewise.
1226 (loaded_dll): Adjust.
1227 (unloaded_dll): Adjust to all_dlls type change, use
1228 std::find_if. Inline code from match_dll.
1229 (clear_dlls): Adjust to all_dlls type change.
1230 * server.c (emit_dll_description): Remove.
1231 (handle_qxfer_libraries): Adjust to all_dlls type change,
1232 integrate emit_dll_description's functionality.
1233
1234 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
1235
1236 * linux-low.h (struct linux_target_ops) <delete_process>: New
1237 field.
1238 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
1239 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
1240 (struct linux_target_ops): Add delete_process callback.
1241 * linux-arm-low.c (arm_delete_process): New.
1242 (struct linux_target_ops): Add delete_process callback.
1243 * linux-bfin-low.c (struct linux_target_ops): Likewise.
1244 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
1245 * linux-m32r-low.c (struct linux_target_ops): Likewise.
1246 * linux-mips-low.c (mips_linux_delete_process): New.
1247 (struct linux_target_ops): Add delete_process callback.
1248 * linux-ppc-low.c (struct linux_target_ops): Likewise.
1249 * linux-s390-low.c (struct linux_target_ops): Likewise.
1250 * linux-sh-low.c (struct linux_target_ops): Likewise.
1251 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
1252 * linux-tile-low.c (struct linux_target_ops): Likewise.
1253 * linux-x86-low.c (x86_linux_delete_process): New.
1254 (struct linux_target_ops): Add delete_process callback.
1255 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
1256
1257 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
1258
1259 * linux-aarch64-low.c (the_low_target): Add thread delete
1260 callback.
1261 * linux-arm-low.c (arm_delete_thread): New function.
1262 (the_low_target): Add thread delete callback.
1263 * linux-bfin-low.c (the_low_target): Likewise.
1264 * linux-crisv32-low.c (the_low_target): Likewise.
1265 * linux-low.c (delete_lwp): Invoke delete_thread callback if
1266 set.
1267 * linux-low.h (struct linux_target_ops) <delete_thread>: New
1268 field.
1269 * linux-m32r-low.c (the_low_target): Add thread delete callback.
1270 * linux-mips-low.c (mips_linux_delete_thread): New function.
1271 (the_low_target): Add thread delete callback.
1272 * linux-ppc-low.c (the_low_target): Likewise.
1273 * linux-s390-low.c (the_low_target): Likewise.
1274 * linux-sh-low.c (the_low_target): Likewise.
1275 * linux-tic6x-low.c (the_low_target): Likewise.
1276 * linux-tile-low.c (the_low_target): Likewise.
1277 * linux-x86-low.c (the_low_target): Likewise.
1278 * linux-xtensa-low.c (the_low_target): Likewise.
1279
1280 2017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
1281
1282 * win32-low.c: Include "common-inferior.h".
1283
1284 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
1285
1286 * inferiors.c (set_inferior_cwd): New function.
1287 * server.c (handle_general_set): Handle QSetWorkingDir packet.
1288 (handle_query): Inform that QSetWorkingDir is supported.
1289 * win32-low.c (create_process): Pass the inferior's cwd to
1290 CreateProcess.
1291
1292 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
1293
1294 * inferiors.c (current_inferior_cwd): New global variable.
1295 (get_inferior_cwd): New function.
1296 * inferiors.h (struct process_info) <cwd>: New field.
1297
1298 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
1299
1300 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
1301 (OBS): Add gdb_tilde_expand.o.
1302
1303 2017-10-02 Simon Marchi <simon.marchi@ericsson.com>
1304
1305 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
1306 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
1307
1308 2017-09-29 Pedro Alves <palves@redhat.com>
1309
1310 * ax.c (gdb_parse_agent_expr): Constify.
1311 * ax.h (gdb_parse_agent_expr): Constify.
1312 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
1313 Constify.
1314 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
1315 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
1316 * remote-utils.h (read_ptid): Constify.
1317 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
1318 (process_point_options, process_serial_event): Constify.
1319 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
1320 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
1321 (cmd_qtbuffer): Constify.
1322
1323 2017-09-29 Pedro Alves <palves@redhat.com>
1324
1325 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
1326 fails.
1327
1328 2017-09-29 Pedro Alves <palves@redhat.com>
1329
1330 * linux-low.c (handle_extended_wait): Pass parent thread instead
1331 of process to thread_db_notice_clone.
1332 * linux-low.h (thread_db_notice_clone): Replace parent process
1333 parameter with parent thread parameter.
1334 * thread-db.c (find_one_thread): Add comment.
1335 (thread_db_notice_clone): Replace parent process parameter with
1336 parent thread parameter. Temporarily switch to the parent thread.
1337
1338 2017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
1339
1340 * gdbthread.h: Include "common-gdbthread.h".
1341 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
1342 "if" when validating the ptid.
1343 * remote-utils.c: Include "gdbthread.h".
1344 (prepare_resume_reply): Use "switch_to_thread".
1345 * target.c (done_accessing_memory): Likewise.
1346
1347 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
1348
1349 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
1350 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
1351 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
1352 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
1353 s390x-gs-linux64-ipa.o to ipa_obj.
1354 * linux-s390-low.c (HWCAP_S390_GS): New define.
1355 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
1356 New functions.
1357 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
1358 (s390_arch_setup): Check for guarded-storage support and choose
1359 appropriate tdesc.
1360 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
1361 init_registers_s390x_gs_linux64.
1362 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
1363 enum value.
1364 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
1365 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
1366
1367 2017-09-22 Simon Marchi <simon.marchi@ericsson.com>
1368
1369 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
1370
1371 2017-09-21 Kevin Buettner <kevinb@redhat.com>
1372
1373 * linux-low.h (struct lwp_info): Add new field, thread_handle.
1374 (thread_db_thread_handle): Declare.
1375 * linux-low.c (linux_target_ops): Initialize thread_handle.
1376 * server.c (handle_qxfer_threads_worker): Add support for
1377 "handle" attribute.
1378 * target.h (struct target_ops): Add new function pointer,
1379 thread_handle.
1380 (target_thread_handle): Define.
1381 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
1382 field in lwp.
1383 (thread_db_thread_handle): New function.
1384
1385 2017-09-21 Kevin Buettner <kevinb@redhat.com>
1386
1387 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
1388 * linux-low.h (thread_db_notice_clone): Declare.
1389 * thread-db.c (thread_db_notice_clone): New function.
1390
1391 2017-09-21 Pedro Alves <palves@redhat.com>
1392
1393 * server.c (gdb_read_memory, handle_status, process_serial_event)
1394 (handle_serial_event, handle_target_event): Adjust to
1395 set_desired_thread prototype change.
1396 * target.c (set_desired_thread): Remove 'use_general' parameter
1397 and adjust.
1398 * target.h (set_desired_thread): Remove 'use_general' parameter.
1399
1400 2017-09-20 Tom Tromey <tom@tromey.com>
1401
1402 * target.c (target_terminal::terminal_state): Define.
1403 (target_terminal::init): Rename from target_terminal_init.
1404 (target_terminal::inferior): Rename from
1405 target_terminal_inferior.
1406 (target_terminal::ours): Rename from target_terminal_ours.
1407 (target_terminal::ours_for_output, target_terminal::info): New.
1408
1409 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1410
1411 * server.c (accumulate_file_name_length): Remove.
1412 (emit_dll_description): Adjust to std::string change.
1413 (handle_qxfer_libraries): Use std::string to hold document.
1414
1415 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1416
1417 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
1418 return type of xml_escape_text.
1419 * server.c (emit_dll_description): Likewise.
1420
1421 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1422
1423 * server.c (captured_main): Accept argument for --selftest.
1424 Update run_tests call.
1425 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
1426 when registering selftests.
1427
1428 2017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
1429
1430 * regcache.c (get_thread_regcache): Update code to use "std::vector"
1431 instead of "VEC" for "target_desc.reg_defs".
1432 (regcache_cpy): Likewise.
1433 (registers_to_string): Likewise.
1434 (registers_from_string): Likewise.
1435 (find_regno): Likewise.
1436 (supply_regblock): Likewise.
1437 (regcache_raw_read_unsigned): Likewise.
1438 * tdesc.c (init_target_desc): Likewise.
1439 (tdesc_create_reg): Likewise.
1440 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
1441 (struct target_desc) <reg_defs>: Convert to "std::vector".
1442 (target_desc): Do not initialize "reg_defs".
1443 (~target_desc): Update code to use "std::vector" instead of "VEC"
1444 for "target_desc.reg_defs".
1445 (operator==): Likewise.
1446
1447 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1448
1449 * inferiors.h (thread_to_gdb_id): Remove.
1450 * inferiors.c (thread_to_gdb_id): Remove.
1451 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
1452 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
1453 lynx_store_registers, lynx_read_memory, lynx_write_memory):
1454 Likewise.
1455 * nto-low.c (nto_fetch_registers, nto_store_registers,
1456 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
1457
1458 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1459
1460 * inferiors.h (gdb_id_to_thread_id): Remove.
1461 * inferiors.c (gdb_id_to_thread_id): Remove.
1462 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
1463 removal. Move pid declaration closer to where it's used.
1464
1465 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1466
1467 * server.c (handle_detach): New function.
1468 (process_serial_event): Move code out, call handle_detach.
1469
1470 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1471
1472 * server.c (require_running): Rename to ...
1473 (require_running_or_return): ... this ...
1474 (require_running_or_break): ... and this.
1475 (handle_query, process_serial_event): Adjust.
1476
1477 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1478
1479 * linux-low.c (linux_set_resume_request): Remove unused
1480 variables.
1481
1482 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1483
1484 * server.c (first_thread_of): Remove.
1485 (process_serial_event): Replace usage of first_thread_of with
1486 find_any_thread_of_pid.
1487 * tracepoint.c (same_process_p): Remove.
1488 (gdb_agent_about_to_close): Replace usage of same_process_p with
1489 find_any_thread_of_pid.
1490 * linux-x86-low.c (same_process_callback): Remove.
1491 (x86_arch_setup_process_callback): Replace usage of
1492 same_process_callback with find_any_thread_of_pid.
1493 * thread-db.c (any_thread_of): Remove.
1494 (switch_to_process): Replace usage of any_thread_of with
1495 find_any_thread_of_pid.
1496 * inferiors.c (thread_pid_matches_callback): Remove.
1497 (find_thread_process): Adjust to use find_any_thread_of_pid.
1498
1499 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
1500
1501 * regcache.c (get_thread_regcache): Guard calls to "memset"
1502 with "!VEC_empty".
1503
1504 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
1505
1506 * linux-low.c (handle_extended_wait): Use
1507 "allocate_target_description" instead of "XNEW".
1508 * linux-x86-low.c (initialize_low_arch): Likewise.
1509
1510 2017-09-05 Yao Qi <yao.qi@linaro.org>
1511
1512 * configure.srv (srv_i386_regobj): Remove.
1513 (srv_amd64_regobj): Remove.
1514 (srv_regobj): Set it to "" for x86 non-linux targets.
1515 * linux-x86-tdesc.c (i386_linux_read_description):
1516 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
1517 (init_registers_i386): Remove the declaration.
1518 (tdesc_i386): Remove the declaration.
1519 (lynx_i386_arch_setup): Call i386_create_target_description.
1520 * nto-x86-low.c: Likewise.
1521 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
1522 [!__x86_64__]: include arch/i386.h.
1523 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
1524
1525 2017-09-05 Yao Qi <yao.qi@linaro.org>
1526
1527 * configure.srv (srv_amd64_linux_xmlfiles): Remove
1528 i386/amd64-XXX-linux from it.
1529
1530 2017-09-05 Yao Qi <yao.qi@linaro.org>
1531
1532 * configure.srv: Empty srv_amd64_linux_regobj if $development is
1533 false.
1534 (ipa_amd64_linux_regobj): Remove.
1535 (ipa_x32_linux_regobj): Remove.
1536
1537 2017-09-05 Yao Qi <yao.qi@linaro.org>
1538
1539 * Makefile.in (arch-amd64.o): New rule.
1540 * configure.srv: Append arch-amd64.o.
1541 * linux-amd64-ipa.c: Include common/x86-xstate.h.
1542 (get_ipa_tdesc): Call amd64_linux_read_description.
1543 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
1544 and init_registers_amd64_XXX.
1545 * linux-x86-low.c (x86_linux_read_description): Call
1546 amd64_linux_read_description.
1547 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
1548 (initialize_low_arch): Don't call init_registers_x32_XXX and
1549 init_registers_amd64_XXX.
1550 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
1551 and tdesc_amd64_XXX.
1552 [__x86_64__] (amd64_tdesc_test): New function.
1553 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
1554 and init_registers_amd64_XXX.
1555 * linux-x86-tdesc.c: Include arch/amd64.h.
1556 (xcr0_to_tdesc_idx): New function.
1557 (i386_linux_read_description): New function.
1558 (amd64_get_ipa_tdesc_idx): New function.
1559 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
1560 (amd64_get_ipa_tdesc): Declare.
1561
1562 2017-09-05 Yao Qi <yao.qi@linaro.org>
1563
1564 * configure.srv (srv_i386_linux_xmlfiles): Remove
1565 i386/i386-XXX-linux.xml from it.
1566
1567 2017-09-05 Yao Qi <yao.qi@linaro.org>
1568
1569 * configure.srv: Set srv_i386_linux_regobj empty if $development
1570 is false.
1571 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
1572 initialize_low_tdesc.
1573 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
1574 with #if initialize_low_tdesc.
1575 * linux-x86-tdesc-selftest.c: New file.
1576 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
1577
1578 2017-09-05 Yao Qi <yao.qi@linaro.org>
1579
1580 * Makefile.in (arch-i386.o): New rule.
1581 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
1582 (x86_64-*-linux*): Likewise.
1583 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
1584 include arch/i386.h.
1585 (i386_linux_read_description): Remove code and call
1586 i386_create_target_description.
1587 * tdesc.c (allocate_target_description): New function.
1588 * tdesc.h (set_tdesc_architecture): Remove declaration.
1589 (set_tdesc_osabi): Likewise.
1590
1591 2017-09-05 Yao Qi <yao.qi@linaro.org>
1592
1593 * linux-x86-tdesc.c: Don't include <inttypes.h>.
1594 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
1595 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
1596 .xmltarget.
1597 * server.c (get_features_xml): Call tdesc_get_features_xml.
1598 * tdesc.c (set_tdesc_architecture): New function.
1599 (set_tdesc_osabi): New function.
1600 (tdesc_get_features_xml): New function.
1601 (tdesc_create_feature): Add an argument.
1602 * tdesc.h (struct target_desc) <features>: New field.
1603 <arch, osabi>: New field.
1604 (~target_desc): xfree features, arch, and osabi.
1605 (target_desc::oerator==): Don't compare .xmltarget.
1606 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
1607 (set_tdesc_osabi): Likewise.
1608 (tdesc_get_features_xml): Likewise.
1609
1610 2017-09-05 Yao Qi <yao.qi@linaro.org>
1611
1612 * linux-x86-tdesc.c: Include selftest.h.
1613 (i386_tdesc_test): New function.
1614 (initialize_low_tdesc): Call selftests::register_test.
1615 * tdesc.h: Include regdef.h.
1616 (target_desc): Override operator == and !=.
1617
1618 2017-09-05 Yao Qi <yao.qi@linaro.org>
1619
1620 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
1621 (ipa_obj): Likewise.
1622 * linux-i386-ipa.c: Include common/x86-xstate.h
1623 (get_ipa_tdesc): Call i386_linux_read_description.
1624 (initialize_low_tracepoint): Don't call init_registers_XXX
1625 functions, call initialize_low_tdesc instead.
1626 * linux-x86-low.c (x86_linux_read_description): Call
1627 i386_linux_read_description.
1628 (initialize_low_arch): Don't call init_registers_i386_XXX
1629 functions, call initialize_low_tdesc.
1630 * linux-x86-tdesc.c: New file.
1631 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
1632 (i386_get_ipa_tdesc_idx): Declare.
1633 (i386_get_ipa_tdesc): Declare.
1634 (initialize_low_tdesc): Declare.
1635
1636 2017-09-05 Yao Qi <yao.qi@linaro.org>
1637
1638 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
1639 instead of 0.
1640
1641 2017-09-05 Yao Qi <yao.qi@linaro.org>
1642
1643 * Makefile.in (IPA_OBJS): Add vec-ipa.o
1644 * regcache.c (get_thread_regcache): Use VEC_length.
1645 (init_register_cache): Likewise.
1646 (regcache_cpy): Likewise.
1647 (registers_to_string): Iterate reg_defs via VEC_iterate.
1648 (find_regno): Likewise.
1649 (find_register_by_number): Use VEC_index.
1650 (register_size): Call find_register_by_number.
1651 (register_data): Call find_register_by_number.
1652 (supply_regblock): Use VEC_length.
1653 (regcache_raw_read_unsigned): Likewise.
1654 * tdesc.c (init_target_desc): Iterate reg_defs via
1655 VEC_iterate.
1656 (default_description): Update initializer.
1657 (copy_target_description): Don't update field num_registers.
1658 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
1659 <num_registers>: Remove.
1660
1661 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
1662
1663 * Makefile.in (.SECONDARY): Define target.
1664
1665 2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
1666
1667 * linux-low.c (linux_wait_1): Adjust.
1668 * server.c (queue_stop_reply_callback): Adjust.
1669
1670 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
1671
1672 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
1673 QEnvironmentUnset and QEnvironmentReset packets.
1674 (handle_query): Inform remote that QEnvironmentHexEncoded,
1675 QEnvironmentUnset and QEnvironmentReset are supported.
1676
1677 2017-08-25 Simon Marchi <simon.marchi@ericsson.com>
1678
1679 * inferiors.h (inferior_target_data): Rename to ...
1680 (thread_target_data): ... this.
1681 (inferior_regcache_data): Rename to ...
1682 (thread_regcache_data): ... this.
1683 (set_inferior_regcache_data): Rename to ...
1684 (set_thread_regcache_data): ... this.
1685 * inferiors.c (inferior_target_data): Rename to ...
1686 (thread_target_data): ... this.
1687 (inferior_regcache_data): Rename to ...
1688 (thread_regcache_data): ... this.
1689 (set_inferior_regcache_data): Rename to ...
1690 (set_thread_regcache_data): ... this.
1691 (free_one_thread): Update.
1692 * linux-low.h (get_thread_lwp): Update.
1693 * regcache.c (get_thread_regcache): Update.
1694 (regcache_invalidate_thread): Update.
1695 (free_register_cache_thread): Update.
1696 * win32-i386-low.c (update_debug_registers_callback): Update.
1697 (win32_get_current_dr): Update.
1698 * win32-low.c (thread_rec): Update.
1699 (delete_thread_info): Update.
1700 (continue_one_thread): Update.
1701 (suspend_one_thread): Update.
1702
1703 2017-08-24 Simon Marchi <simon.marchi@ericsson.com>
1704
1705 * inferiors.c (set_inferior_target_data): Remove.
1706 * inferiors.h (set_inferior_target_data): Remove.
1707
1708 2017-08-18 Yao Qi <yao.qi@linaro.org>
1709
1710 * Makefile.in (OBS): Add selftest.o.
1711 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
1712 * configure, config.in: Re-generated.
1713 * server.c: Include common/sefltest.h.
1714 (captured_main): Handle option --selftest.
1715
1716 2017-08-09 Yao Qi <yao.qi@linaro.org>
1717
1718 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
1719 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
1720 i386-avx-mpx.o and i386-mmx.o.
1721 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
1722 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
1723 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
1724 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
1725 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
1726 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
1727 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
1728 i386/amd64-avx-mpx.xml.
1729
1730 2017-08-09 Yao Qi <yao.qi@linaro.org>
1731
1732 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
1733 and x32-avx-avx512.o.
1734 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
1735 i386/x32-avx-avx512.xml.
1736
1737 2017-07-26 Simon Marchi <simon.marchi@ericsson.com>
1738
1739 * tracepoint.h (enum class fast_tpoint_collect_result): New
1740 enumeration.
1741 (fast_tracepoint_collecting): Change return type to
1742 fast_tpoint_collect_result.
1743 * tracepoint.c (fast_tracepoint_collecting): Likewise.
1744 * linux-low.h: Include tracepoint.h.
1745 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
1746 fast_tpoint_collect_result.
1747 * linux-low.c (handle_tracepoints): Adjust.
1748 (linux_fast_tracepoint_collecting): Change return type to
1749 fast_tpoint_collect_result.
1750 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
1751 linux_wait_1, stuck_in_jump_pad_callback,
1752 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
1753 proceed_one_lwp): Adjust to type change.
1754
1755 2017-07-10 Yao Qi <yao.qi@linaro.org>
1756
1757 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
1758
1759 2017-06-29 Yao Qi <yao.qi@linaro.org>
1760
1761 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
1762 Remove.
1763 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
1764
1765 2017-06-20 Simon Marchi <simon.marchi@ericsson.com>
1766
1767 * Makefile.in (IPA_OBJS): Sort and format one item per line.
1768
1769 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
1770
1771 * linux-low.c (linux_create_inferior): Adjust code to access the
1772 environment information via 'gdb_environ' class.
1773 * lynx-low.c (lynx_create_inferior): Likewise.
1774 * server.c (our_environ): Make it an instance of 'gdb_environ'.
1775 (get_environ): Return a pointer to 'our_environ'.
1776 (captured_main): Initialize 'our_environ'.
1777 * server.h (get_environ): Adjust prototype.
1778 * spu-low.c (spu_create_inferior): Adjust code to access the
1779 environment information via 'gdb_environ' class.
1780
1781 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1782
1783 * linux-low.c (linux_read_memory, linux_write_memory): Remove
1784 usage of "register" keyword.
1785
1786 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1787
1788 * configure: Re-generate.
1789
1790 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1791
1792 * configure: Re-generate.
1793
1794 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1795
1796 * Makefile.in (COMPILE.pre): Add "-x c++".
1797
1798 2017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
1799
1800 * fork-child.c: Conditionally include <signal.h>.
1801
1802 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1803
1804 * server.c (handle_general_set): Handle new packet
1805 "QStartupWithShell".
1806 (handle_query): Add "QStartupWithShell" to the list of supported
1807 packets.
1808 (gdbserver_usage): Add help text explaining the
1809 new "--startup-with-shell" and "--no-startup-with-shell" CLI
1810 options.
1811 (captured_main): Recognize and act upon the presence of the new
1812 CLI options.
1813
1814 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1815 Pedro Alves <palves@redhat.com>
1816
1817 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
1818 * configure: Regenerate.
1819 * configure.srv (srv_linux_obj): Add "fork-child.o" and
1820 "fork-inferior.o".
1821 (i[34567]86-*-lynxos*): Likewise.
1822 (spu*-*-*): Likewise.
1823 * fork-child.c: New file.
1824 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
1825 and "environ.h".
1826 (linux_ptrace_fun): New function.
1827 (linux_create_inferior): Adjust function prototype to reflect
1828 change on "target.h". Adjust function code to use
1829 "fork_inferior".
1830 (linux_request_interrupt): Delete "signal_pid".
1831 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
1832 (lynx_ptrace_fun): New function.
1833 (lynx_create_inferior): Adjust function prototype to reflect
1834 change on "target.h". Adjust function code to use
1835 "fork_inferior".
1836 * nto-low.c (nto_create_inferior): Adjust function prototype and
1837 code to reflect change on "target.h". Update comments.
1838 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
1839 "common-terminal.h" and "environ.h".
1840 (terminal_fd): Moved to fork-child.c.
1841 (old_foreground_pgrp): Likewise.
1842 (restore_old_foreground_pgrp): Likewise.
1843 (last_status): Make it global.
1844 (last_ptid): Likewise.
1845 (our_environ): New variable.
1846 (startup_with_shell): Likewise.
1847 (program_name): Likewise.
1848 (program_argv): Rename to...
1849 (program_args): ...this.
1850 (wrapper_argv): New variable.
1851 (start_inferior): Delete function.
1852 (get_exec_wrapper): New function.
1853 (get_exec_file): Likewise.
1854 (get_environ): Likewise.
1855 (prefork_hook): Likewise.
1856 (post_fork_inferior): Likewise.
1857 (postfork_hook): Likewise.
1858 (postfork_child_hook): Likewise.
1859 (handle_v_run): Update code to deal with arguments coming from the
1860 remote host. Update calls from "start_inferior" to
1861 "create_inferior".
1862 (captured_main): Likewise. Initialize environment variable. Call
1863 "have_job_control".
1864 * server.h (post_fork_inferior): New prototype.
1865 (get_environ): Likewise.
1866 (last_status): Declare.
1867 (last_ptid): Likewise.
1868 (signal_pid): Likewise.
1869 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
1870 (spu_ptrace_fun): New function.
1871 (spu_create_inferior): Adjust function prototype to reflect change
1872 on "target.h". Adjust function code to use "fork_inferior".
1873 * target.c (target_terminal_init): New function.
1874 (target_terminal_inferior): Likewise.
1875 (target_terminal_ours): Likewise.
1876 * target.h: Include <vector>.
1877 (struct target_ops) <create_inferior>: Update prototype.
1878 (create_inferior): Update macro.
1879 * utils.c (gdb_flush_out_err): New function.
1880 * win32-low.c (win32_create_inferior): Adjust function prototype
1881 and code to reflect change on "target.h".
1882
1883 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1884
1885 * inferiors.c (switch_to_thread): New function.
1886
1887 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1888
1889 * Makefile.in (SFILE): Add "common/job-control.c".
1890 (OBS): Add "job-control.o".
1891
1892 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
1893
1894 * Makefile: Remove "@host_makefile_frag@".
1895
1896 2017-05-05 Pedro Alves <palves@redhat.com>
1897
1898 * configure: Regenerate.
1899
1900 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
1901
1902 * configure: Regenerate.
1903
1904 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
1905
1906 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
1907 software_single_step change of return type to
1908 std::vector<CORE_ADDR>.
1909 * linux-low.c (install_software_single_step_breakpoints):
1910 Likewise.
1911 * linux-low.h (install_software_single_step_breakpoints):
1912 Likewise.
1913
1914 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
1915
1916 * remote-utils.c: Include "gdb_termios.h" instead of
1917 "terminal.h".
1918 * terminal.h: Delete file.
1919
1920 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
1921
1922 * server.c: Include <vector>.
1923 <program_argv, wrapper_argv>: Convert to std::vector.
1924 (start_inferior): Rewrite function to use C++.
1925 (handle_v_run): Likewise. Update code that calculates the argv
1926 based on the vRun packet; use C++.
1927 (captured_main): Likewise.
1928
1929 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
1930
1931 * server.c (handle_v_cont): Initialize thread_resume::thread
1932 with null_ptid.
1933
1934 2017-04-05 Pedro Alves <palves@redhat.com>
1935
1936 * configure: Regenerate.
1937
1938 2017-04-05 Pedro Alves <palves@redhat.com>
1939
1940 * gdbreplay.c (sync_error): Constify.
1941 * linux-x86-low.c (push_opcode): Constify.
1942
1943 2017-04-05 Pedro Alves <palves@redhat.com>
1944
1945 * win32-low.c (get_child_debug_event)
1946 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
1947 Report TARGET_WAITKIND_SPURIOUS instead.
1948
1949 2017-04-05 Pedro Alves <palves@redhat.com>
1950
1951 * remote-utils.c (remote_prepare, remote_open): Constify.
1952 * remote-utils.h (remote_prepare, remote_open): Constify.
1953 * server.c (captured_main): Constify 'port' handling.
1954
1955 2017-04-04 Simon Marchi <simon.marchi@ericsson.com>
1956
1957 * Makefile.in (clean): Clear .deps.
1958
1959 2017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
1960
1961 * .gitignore: Remove generated files, replace with wildcard.
1962 * (clean): Replace removal of generated files with wildcard.
1963 (version.c): Replace with...
1964 (version-generated.c): ...this.
1965 (xml-builtin.c): Replace with...
1966 (xml-builtin-generated.c): ...this.
1967 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
1968 (%.c: *regformats*): Replace with...
1969 (%-generated.c: *regformats*): ...this.
1970
1971 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
1972
1973 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
1974 (xtensa_fill_gregset): Call collect_register_by_name for
1975 threadptr register.
1976 (xtensa_store_gregset): Call supply_register_by_name for
1977 threadptr register.
1978
1979 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
1980
1981 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
1982 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
1983 (xtensa_store_gregset): Call supply_register for all registers in
1984 a0_regnum..a0_regnum + C0_NREGS range.
1985
1986 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1987
1988 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
1989 (ax-ipa.o: ax.c): Remove.
1990 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
1991 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
1992 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
1993 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
1994 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
1995
1996 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1997
1998 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
1999 (print-utils-ipa.o: ../common/print-utils.c): Remove.
2000 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
2001 (errors-ipa.o: ../common/errors.c): Remove.
2002 (format-ipa.o: ../common/format.c): Remove.
2003 (common-utils-ipa.o: ../common/common-utils.c): Remove.
2004
2005 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2006
2007 * Makefile.in (%-ipa.o: %.c): New rule.
2008 (tracepoint-ipa.o: tracepoint.c): Remove.
2009 (utils-ipa.o: utils.c): Remove.
2010 (remote-utils-ipa.o: remote-utils.c): Remove.
2011 (regcache-ipa.o: regcache.c): Remove.
2012 (i386-linux-ipa.o: i386-linux.c): Remove.
2013 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
2014 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
2015 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
2016 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
2017 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
2018 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
2019 (amd64-linux-ipa.o: amd64-linux.c): Remove.
2020 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
2021 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
2022 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
2023 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
2024 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
2025 (aarch64-ipa.o: aarch64.c): Remove.
2026 (s390-linux32-ipa.o: s390-linux32.c): Remove.
2027 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
2028 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
2029 (s390-linux64-ipa.o: s390-linux64.c): Remove.
2030 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
2031 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
2032 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
2033 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
2034 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
2035 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
2036 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
2037 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
2038 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
2039 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
2040 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
2041 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
2042 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
2043 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
2044 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
2045 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
2046 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
2047 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
2048 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
2049 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
2050 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
2051 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
2052 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
2053 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
2054 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
2055 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
2056 (tdesc-ipa.o: tdesc.c): Remove.
2057 (x32-linux-ipa.o: x32-linux.c): Remove.
2058 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
2059 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
2060
2061 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2062
2063 * Makefile.in (%.o: ../arch/%.c): New rule.
2064 (arm.o: ../arch/arm.c): Remove.
2065 (arm-linux.o: ../arch/arm-linux.c): Remove.
2066 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
2067 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
2068
2069 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2070
2071 * Makefile.in (%.o: ../nat/%.c): New rule.
2072 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
2073 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
2074 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
2075 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
2076 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
2077 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
2078 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
2079 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
2080 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
2081 (linux-personality.o: ../nat/linux-personality.c): Remove.
2082 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
2083 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
2084 (x86-linux.o: ../nat/x86-linux.c): Remove.
2085 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
2086 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
2087
2088 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2089
2090 * Makefile.in (%.o: ../common/%.c): New rule.
2091 (signals.o: ../common/signals.c): Remove.
2092 (print-utils.o: ../common/print-utils.c): Remove.
2093 (rsp-low.o: ../common/rsp-low.c): Remove.
2094 (common-utils.o: ../common/common-utils.c): Remove.
2095 (posix-strerror.o: ../common/posix-strerror.c): Remove.
2096 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
2097 (vec.o: ../common/vec.c): Remove.
2098 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
2099 (xml-utils.o: ../common/xml-utils.c): Remove.
2100 (ptid.o: ../common/ptid.c): Remove.
2101 (buffer.o: ../common/buffer.c): Remove.
2102 (format.o: ../common/format.c): Remove.
2103 (filestuff.o: ../common/filestuff.c): Remove.
2104 (agent.o: ../common/agent.c): Remove.
2105 (errors.o: ../common/errors.c): Remove.
2106 (environ.o: ../common/environ.c): Remove.
2107 (common-debug.o: ../common/common-debug.c): Remove.
2108 (cleanups.o: ../common/cleanups.c): Remove.
2109 (common-exceptions.o: ../common/common-exceptions.c): Remove.
2110 (fileio.o: ../common/fileio.c): Remove.
2111 (common-regcache.o: ../common/common-regcache.c): Remove.
2112 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
2113 (new-op.o: ../common/new-op.c): Remove.
2114 (btrace-common.o: ../common/btrace-common.c): Remove.
2115
2116 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2117
2118 * Makefile.in (%.o: ../target/%.c): New rule.
2119 (waitstatus.o: ../target/waitstatus.c): Remove.
2120
2121 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2122
2123 * Makefile.in
2124 (%.c: ../regformats/%.dat,
2125 (%.c: ../regformats/arm/%.dat,
2126 (%.c: ../regformats/i386/%.dat,
2127 (%.c: ../regformats/rs6000/%.dat): New rules.
2128 (aarch64.c): Remove.
2129 (reg-arm.c): Remove.
2130 (arm-with-iwmmxt.c): Remove.
2131 (arm-with-vfpv2.c): Remove.
2132 (arm-with-vfpv3.c): Remove.
2133 (arm-with-neon.c): Remove.
2134 (reg-bfin.c): Remove.
2135 (reg-cris.c): Remove.
2136 (reg-crisv32.c): Remove.
2137 (i386.c): Remove.
2138 (i386-linux.c): Remove.
2139 (i386-avx.c): Remove.
2140 (i386-avx-linux.c): Remove.
2141 (i386-avx-avx512.c): Remove.
2142 (i386-avx-avx512-linux.c): Remove.
2143 (i386-mpx.c): Remove.
2144 (i386-mpx-linux.c): Remove.
2145 (i386-avx-mpx-avx512-pku.c): Remove.
2146 (i386-avx-mpx-avx512-pku-linux.c): Remove.
2147 (i386-avx-mpx.c): Remove.
2148 (i386-avx-mpx-linux.c): Remove.
2149 (i386-mmx.c): Remove.
2150 (i386-mmx-linux.c): Remove.
2151 (reg-ia64.c): Remove.
2152 (reg-m32r.c): Remove.
2153 (reg-m68k.c): Remove.
2154 (reg-cf.c): Remove.
2155 (mips-linux.c): Remove.
2156 (mips-dsp-linux.c): Remove.
2157 (mips64-linux.c): Remove.
2158 (mips64-dsp-linux.c): Remove.
2159 (nios2-linux.c): Remove.
2160 (powerpc-32.c): Remove.
2161 (powerpc-32l.c): Remove.
2162 (powerpc-altivec32l.c): Remove.
2163 (powerpc-cell32l.c): Remove.
2164 (powerpc-vsx32l.c): Remove.
2165 (powerpc-isa205-32l.c): Remove.
2166 (powerpc-isa205-altivec32l.c): Remove.
2167 (powerpc-isa205-vsx32l.c): Remove.
2168 (powerpc-e500l.c): Remove.
2169 (powerpc-64l.c): Remove.
2170 (powerpc-altivec64l.c): Remove.
2171 (powerpc-cell64l.c): Remove.
2172 (powerpc-vsx64l.c): Remove.
2173 (powerpc-isa205-64l.c): Remove.
2174 (powerpc-isa205-altivec64l.c): Remove.
2175 (powerpc-isa205-vsx64l.c): Remove.
2176 (s390-linux32.c): Remove.
2177 (s390-linux32v1.c): Remove.
2178 (s390-linux32v2.c): Remove.
2179 (s390-linux64.c): Remove.
2180 (s390-linux64v1.c): Remove.
2181 (s390-linux64v2.c): Remove.
2182 (s390-te-linux64.c): Remove.
2183 (s390-vx-linux64.c): Remove.
2184 (s390-tevx-linux64.c): Remove.
2185 (s390x-linux64.c): Remove.
2186 (s390x-linux64v1.c): Remove.
2187 (s390x-linux64v2.c): Remove.
2188 (s390x-te-linux64.c): Remove.
2189 (s390x-vx-linux64.c): Remove.
2190 (s390x-tevx-linux64.c): Remove.
2191 (tic6x-c64xp-linux.c): Remove.
2192 (tic6x-c64x-linux.c): Remove.
2193 (tic6x-c62x-linux.c): Remove.
2194 (reg-sh.c): Remove.
2195 (reg-sparc64.c): Remove.
2196 (reg-spu.c): Remove.
2197 (amd64.c): Remove.
2198 (amd64-linux.c): Remove.
2199 (amd64-avx.c): Remove.
2200 (amd64-avx-linux.c): Remove.
2201 (amd64-avx-avx512.c): Remove.
2202 (amd64-avx-avx512-linux.c): Remove.
2203 (amd64-mpx.c): Remove.
2204 (amd64-mpx-linux.c): Remove.
2205 (amd64-avx-mpx-avx512-pku.c): Remove.
2206 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
2207 (amd64-avx-mpx.c): Remove.
2208 (amd64-avx-mpx-linux.c): Remove.
2209 (x32.c): Remove.
2210 (x32-linux.c): Remove.
2211 (x32-avx.c): Remove.
2212 (x32-avx-linux.c): Remove.
2213 (x32-avx-avx512.c): Remove.
2214 (x32-avx-avx512-linux.c): Remove.
2215 (reg-xtensa.c): Remove.
2216 (reg-tilegx.c): Remove.
2217 (reg-tilegx32.c): Remove.
2218
2219 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
2220
2221 * Makefile.in (SFILES): Add "common/environ.c".
2222 (OBJS): Add "common/environ.h".
2223
2224 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
2225
2226 * configure.ac: Check if the fs_base and gs_base members of
2227 `struct user_regs_struct' exist.
2228 * config.in: Regenerated.
2229 * configure: Likewise.
2230
2231 2017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
2232
2233 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
2234 target_read_memory.
2235 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
2236 (get_next_pcs_syscall_next_pc): Likewise.
2237
2238 2016-12-23 Luis Machado <lgustavo@codesourcery.com>
2239
2240 * win32-i386-low.c: Fix incorrect reference to a couple source files.
2241 * nto-x86-low.c: Likewise.
2242
2243 2016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
2244
2245 * Makefile.in: Include disable-implicit-rules.mk.
2246
2247 2016-11-23 Pedro Alves <palves@redhat.com>
2248
2249 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
2250 (debug_vprintf): Use std::chrono::steady_clock instead of
2251 gettimeofday. Use '.' instead of ':'.
2252 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
2253 (get_timestamp): Use std::chrono::steady_clock instead of
2254 gettimeofday.
2255
2256 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
2257
2258 * Makefile.in: Fix whitespace formatting.
2259
2260 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
2261
2262 * Makefile.in (SFILES, OBS): Flatten list and order
2263 alphabetically.
2264
2265 2016-11-23 Pedro Alves <palves@redhat.com>
2266
2267 * event-loop.c (handle_file_event): Use warning.
2268 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
2269 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
2270 Use warning.
2271
2272 2016-11-23 Pedro Alves <palves@redhat.com>
2273
2274 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
2275 output.
2276 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
2277 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
2278 debug_printf and debug_flush for debug output.
2279 * server.c (handle_general_set): Likewise.
2280 * thread-db.c (try_thread_db_load): Use debug_printf for debug
2281 output.
2282
2283 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
2284
2285 * Makefile.in (.c.o): Replace rule with ...
2286 (%.o: %.c): ... this one.
2287
2288 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
2289
2290 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
2291 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
2292 make.
2293 * configure.ac: Remove checks for the make program.
2294 * configure: Re-generate.
2295
2296 2016-10-28 Pedro Alves <palves@redhat.com>
2297
2298 * Makefile.in (CXX_DIALECT): Get from configure.
2299 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
2300 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
2301 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
2302 * config.in: Regenerate.
2303 * configure: Regenerate.
2304
2305 2016-10-27 Yao Qi <yao.qi@linaro.org>
2306
2307 * linux-low.c (linux_supports_range_stepping): Return true if
2308 can_software_single_step return true.
2309
2310 2016-10-27 Yao Qi <yao.qi@linaro.org>
2311
2312 * inferiors.c (find_inferior_in_random): New function.
2313 * inferiors.h (find_inferior_in_random): Declare.
2314 * linux-low.c (linux_wait_for_event_filtered): Call
2315 find_inferior_in_random instead of find_inferior.
2316
2317 2016-10-27 Yao Qi <yao.qi@linaro.org>
2318
2319 * linux-low.c (linux_wait_1): If single-step breakpoints are
2320 inserted, remove them.
2321
2322 2016-10-26 Pedro Alves <palves@redhat.com>
2323
2324 * linux-low.c (handle_extended_wait): Link parent/child fork
2325 threads.
2326 (linux_wait_1): Unlink them.
2327 (linux_set_resume_request): Ignore resume requests for
2328 already-resumed and unhandled fork child threads.
2329 * linux-low.h (struct lwp_info) <fork_relative>: New field.
2330 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
2331 New functions.
2332 (handle_v_requests) <vCont>: Don't call require_running.
2333 * server.h (in_queued_stop_replies): New declaration.
2334
2335 2016-10-24 Yao Qi <yao.qi@linaro.org>
2336
2337 PR server/20733
2338 * linux-aarch64-low.c (append_insns): Cast the return value to
2339 'uint32_t *'.
2340
2341 2016-10-10 Yao Qi <yao.qi@linaro.org>
2342
2343 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
2344
2345 2016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
2346
2347 * target.c (target_supports_multi_process): New function, moved
2348 from...
2349 * target.h (target_supports_multi_process): ... here. Remove
2350 macro.
2351
2352 2016-10-05 Tom Tromey <tom@tromey.com>
2353
2354 PR remote/20655:
2355 * tracepoint.c (handle_tracepoint_bkpts): Check
2356 ipa_error_tracepoint, not ipa_stopping_tracepoint.
2357
2358 2016-10-05 Yao Qi <yao.qi@linaro.org>
2359
2360 * configure.srv: Update the path of arm-*.xml files.
2361
2362 2016-10-05 Terry Guo <terry.guo@arm.com>
2363 Yao Qi <yao.qi@linaro.org>
2364
2365 * Makefile.in: Adjust the path of rules.
2366 * configure.srv: Update the path of xml files.
2367 * regformats/arm-with-iwmmxt.dat: Regenerated.
2368 * regformats/arm-with-neon.dat: Likewise.
2369 * regformats/arm-with-vfpv2.dat: Likewise.
2370 * regformats/arm-with-vfpv3.dat Likewise.
2371
2372 2016-09-30 Yao Qi <yao.qi@linaro.org>
2373
2374 PR gdbserver/20627
2375 * target.c (target_stop_and_wait): Don't call
2376 target_continue_no_signal, use resume_stop instead.
2377
2378 2016-09-26 Yao Qi <yao.qi@linaro.org>
2379
2380 * linux-low.c (linux_wait_1): Call debug_exit.
2381
2382 2016-09-23 Pedro Alves <palves@redhat.com>
2383
2384 * Makefile.in (SFILES): Add common/new-op.c.
2385 (OBS): Add common/new-op.o.
2386 (new-op.o): New rule.
2387
2388 2016-09-21 Simon Marchi <simon.marchi@ericsson.com>
2389
2390 * .gitinore: Ignore more files.
2391
2392 2016-09-21 Yao Qi <yao.qi@linaro.org>
2393
2394 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
2395 23.
2396
2397 2016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
2398
2399 * server.c (start_inferior): Call target_mourn_inferior instead of
2400 mourn_inferior; pass ptid_t argument to it.
2401 (resume): Likewise.
2402 (handle_target_event): Likewise.
2403 * target.c (target_mourn_inferior): New function.
2404 * target.h (mourn_inferior): Delete macro.
2405
2406 2016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
2407
2408 * linux-low.c (lwp_is_stepping): New function.
2409
2410 2016-09-06 Carl Love <cel@us.ibm.com>
2411
2412 * server.c (start_inferior): Fixed comment, requested comment change
2413 didn't get updated correctly. Removed reference to ptrace () call as
2414 it is only true on Linux systems.
2415
2416 2016-09-06 Carl Love <cel@us.ibm.com>
2417
2418 * server.c (start_inferior): Do not call
2419 function target_post_create_inferior () if the
2420 inferior process has already exited.
2421
2422 2016-09-05 Pedro Alves <palves@redhat.com>
2423
2424 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
2425 (COMPILE.pre, CC_LD): Use CXX directly.
2426 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
2427 * acinclude.m4: Don't include build-with-cxx.m4.
2428 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
2429 * configure: Regenerate.
2430
2431 2016-09-02 Akash Trehan <akash.trehan123@gmail.com>
2432
2433 PR gdb/19495
2434 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
2435 call writing data to own_buf.
2436
2437 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
2438
2439 * target.c (mywait): Call target_wait instead of
2440 the_target->wait.
2441 (target_wait): New function.
2442
2443 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
2444
2445 * server.c (start_inferior): New variable 'ptid'. Replace calls
2446 to the_target->resume by target_continue{,_no_signal}, depending
2447 on the case.
2448 * target.c (target_stop_and_wait): Call target_continue_no_signal
2449 instead of the_target->resume.
2450 (target_continue): New function.
2451
2452 2016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
2453
2454 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
2455
2456 2016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
2457
2458 PR server/20491
2459 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
2460 ps_prochandle.
2461 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
2462 * linux-arm-low.c (ps_get_thread_area): Likewise.
2463 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
2464 * linux-m68k-low.c (ps_get_thread_area): Likewise.
2465 * linux-mips-low.c (ps_get_thread_area): Likewise.
2466 * linux-nios2-low.c (ps_get_thread_area): Likewise.
2467 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
2468 * linux-x86-low.c (ps_get_thread_area): Likewise.
2469 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
2470
2471 2016-08-19 Pedro Alves <palves@redhat.com>
2472
2473 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
2474
2475 2016-08-19 Pedro Alves <palves@redhat.com>
2476
2477 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
2478 comment. Use memcpy instead of casting through unsigned long.
2479
2480 2016-08-19 Pedro Alves <palves@redhat.com>
2481
2482 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
2483 allocating around 0x80000000.
2484
2485 2016-08-19 Pedro Alves <palves@redhat.com>
2486
2487 PR gdb/20415
2488 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
2489 (x32-avx512-linux-ipa.o): New rules.
2490 * configure.ac (x86_64-*-linux*): New x32 check.
2491 * configure.srv (ipa_x32_linux_regobj): New.
2492 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
2493 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
2494 descriptions.
2495 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
2496 descriptions.
2497 * configure: Regenerate.
2498
2499 2016-08-09 Pedro Alves <palves@redhat.com>
2500
2501 PR gdb/18653
2502 * Makefile.in (OBS): Add signals-state-save-restore.o.
2503 (signals-state-save-restore.o): New rule.
2504 * config.in: Regenerate.
2505 * configure: Regenerate.
2506 * linux-low.c: Include "signals-state-save-restore.h".
2507 (linux_create_inferior): Call
2508 restore_original_signals_state.
2509 * server.c: Include "dispositions-save-restore.h".
2510 (captured_main): Call save_original_signals_state.
2511
2512 2016-08-05 Pedro Alves <palves@redhat.com>
2513
2514 * configure: Regenerate.
2515
2516 2016-08-04 Yao Qi <yao.qi@linaro.org>
2517
2518 * linux-low.c (regsets_fetch_inferior_registers): Check
2519 errno is ESRCH or not.
2520
2521 2016-08-02 Yao Qi <yao.qi@linaro.org>
2522
2523 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
2524 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
2525 (thread_db_load_search): Update.
2526 (try_thread_db_load_1): Don't look for td_ta_event_addr,
2527 td_ta_set_event and td_ta_event_getmsg.
2528
2529 2016-07-26 Pedro Alves <palves@redhat.com>
2530
2531 PR server/20414
2532 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
2533 of unsigned long for 64-bit registers and use uint32_t instead of
2534 unsigned int for 32-bit registers.
2535
2536 2016-07-26 Pedro Alves <palves@redhat.com>
2537
2538 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
2539 to 'ptrace'.
2540
2541 2016-07-21 Tom Tromey <tom@tromey.com>
2542
2543 * configure: Rebuild.
2544
2545 2016-07-21 Yao Qi <yao.qi@linaro.org>
2546
2547 * mem-break.c (find_gdb_breakpoint): Cast bp to
2548 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
2549
2550 2016-07-21 Yao Qi <yao.qi@linaro.org>
2551
2552 * server.c (handle_v_requests): Support s and S actions
2553 if target_supports_software_single_step return true.
2554
2555 2016-07-21 Yao Qi <yao.qi@linaro.org>
2556
2557 * linux-low.c (resume_stopped_resumed_lwps): If resume request
2558 is resume_step, call maybe_hw_step.
2559 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
2560 and unstop them.
2561 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
2562 breakpoints or not.
2563 (proceed_one_lwp): If resume request is resume_step, install
2564 reinsert breakpoints and call maybe_hw_step.
2565
2566 2016-07-21 Yao Qi <yao.qi@linaro.org>
2567
2568 * linux-low.c (proceed_one_lwp): Declare.
2569 (linux_resume_one_thread): Remove local variable 'step'.
2570 Lift code enqueue signal. Call proceed_one_lwp instead of
2571 linux_resume_one_lwp.
2572
2573 2016-07-21 Yao Qi <yao.qi@linaro.org>
2574
2575 * linux-low.c (linux_resume_one_thread): Call
2576 enqueue_pending_signal.
2577
2578 2016-07-21 Yao Qi <yao.qi@linaro.org>
2579
2580 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
2581 * inferiors.c (do_restore_current_thread_cleanup): New function.
2582 (make_cleanup_restore_current_thread): Likewise.
2583 * linux-low.c (install_software_single_step_breakpoints): Call
2584 make_cleanup_restore_current_thread. Switch current_thread to
2585 thread.
2586
2587 2016-07-21 Yao Qi <yao.qi@linaro.org>
2588
2589 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
2590 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
2591 (clone_one_breakpoint): Likewise.
2592 (delete_reinsert_breakpoints): Change parameter to thread.
2593 Callers updated.
2594 (has_reinsert_breakpoints): Likewise.
2595 (uninsert_reinsert_breakpoints): Likewise.
2596 (reinsert_reinsert_breakpoints): Likewise.
2597 * mem-break.h (set_reinsert_breakpoint): Update declaration.
2598 (delete_reinsert_breakpoints): Likewise.
2599 (reinsert_reinsert_breakpoints): Likewise.
2600 (uninsert_reinsert_breakpoints): Likewise.
2601 (has_reinsert_breakpoints): Likewise.
2602
2603 2016-07-21 Yao Qi <yao.qi@linaro.org>
2604
2605 * inferiors.c (get_thread_process): Make parameter const.
2606 * inferiors.h (get_thread_process): Update declaration.
2607 * mem-break.c (clone_all_breakpoints): Remove all parameters.
2608 Add new parameters child_thread and parent_thread. Callers
2609 updated.
2610 * mem-break.h (clone_all_breakpoints): Update declaration.
2611
2612 2016-07-21 Yao Qi <yao.qi@linaro.org>
2613
2614 * mem-break.c (struct breakpoint) <cond_list>: Remove.
2615 <command_list, handler>: Remove.
2616 (struct gdb_breakpoint): New.
2617 (struct other_breakpoint): New.
2618 (struct reinsert_breakpoint): New.
2619 (is_gdb_breakpoint): New function.
2620 (any_persistent_commands): Update command_list if
2621 is_gdb_breakpoint returns true.
2622 (set_breakpoint): Create breakpoints according to their types.
2623 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
2624 (set_gdb_breakpoint_1): Likewise.
2625 (set_gdb_breakpoint): Likewise.
2626 (clear_breakpoint_conditions): Change parameter type to
2627 'struct gdb_breakpoint *'.
2628 (clear_breakpoint_commands): Likewise.
2629 (clear_breakpoint_conditions_and_commands): Likewise.
2630 (add_condition_to_breakpoint): Likewise.
2631 (add_breakpoint_condition): Likewise.
2632 (add_commands_to_breakpoint): Likewise.
2633 (check_breakpoints): Check other_breakpoint.
2634 (clone_one_breakpoint): Clone breakpopint according to its type.
2635 * mem-break.h (struct gdb_breakpoint): Declare.
2636 (set_gdb_breakpoint): Update declaration.
2637 (clear_breakpoint_conditions_and_commands): Likewise.
2638 (add_breakpoint_condition): Likewise.
2639 (add_breakpoint_commands): Likewise.
2640 * server.c (process_point_options): Change parameter type to
2641 'struct gdb_breakpoint *'.
2642
2643 2016-07-21 Yao Qi <yao.qi@linaro.org>
2644
2645 * mem-break.c (set_breakpoint_at): Rename it to ...
2646 (set_breakpoint_type_at): ... it.
2647 (set_breakpoint_at): Call set_breakpoint_type_at.
2648 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
2649 * mem-break.h (set_breakpoint_at): Update comments.
2650
2651 2016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
2652
2653 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
2654 to buf parameter.
2655 (nios2_store_gregset): Likewise.
2656
2657 2016-07-01 Pedro Alves <palves@redhat.com>
2658 Antoine Tremblay <antoine.tremblay@ericsson.com>
2659
2660 * linux-low.c: Change interface to take the target lwp_info
2661 pointer directly and return void. Handle detaching from a zombie
2662 thread.
2663 (linux_detach_lwp_callback): New function.
2664 (linux_detach): Detach from the leader thread after detaching from
2665 the clone threads.
2666
2667 2016-06-28 Yao Qi <yao.qi@linaro.org>
2668
2669 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
2670 for variable new_offset.
2671 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
2672 (aarch64_ftrace_insn_reloc_cb): Likewise.
2673 (aarch64_ftrace_insn_reloc_tb): Likewise.
2674 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
2675 PRIx64 instead of PRIx32.
2676
2677 2016-06-28 Yao Qi <yao.qi@linaro.org>
2678
2679 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
2680 (the_low_target): Install arm_get_syscall_trapinfo.
2681
2682 2016-06-28 Yao Qi <yao.qi@linaro.org>
2683
2684 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
2685 function.
2686 (the_low_target): Install aarch64_get_syscall_trapinfo.
2687
2688 2016-06-28 Yao Qi <yao.qi@linaro.org>
2689
2690 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
2691 Callers updated.
2692 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
2693 Remove parameter sysno.
2694 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
2695 sysret.
2696
2697 2016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
2698
2699 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
2700 (s390_emit_ne_goto): Likewise.
2701 (s390_emit_lt_goto): Likewise.
2702 (s390_emit_le_goto): Likewise.
2703 (s390_emit_gt_goto): Likewise.
2704 (s390_emit_ge_goto): Likewise.
2705 (s390x_emit_eq_goto): Likewise.
2706 (s390x_emit_ne_goto): Likewise.
2707 (s390x_emit_lt_goto): Likewise.
2708 (s390x_emit_le_goto): Likewise.
2709 (s390x_emit_gt_goto): Likewise.
2710 (s390x_emit_ge_goto): Likewise.
2711 (s390_emit_ops_impl): Mark variable static.
2712 (s390x_emit_ops): Likewise.
2713
2714 2016-06-17 Yao Qi <yao.qi@linaro.org>
2715
2716 * linux-low.c (handle_extended_wait): Call
2717 uninsert_reinsert_breakpoints for the parent process. Remove
2718 reinsert breakpoints from the child process. Reinsert them to
2719 the parent process when vfork is done.
2720 * mem-break.c (uninsert_reinsert_breakpoints): New function.
2721 (reinsert_reinsert_breakpoints): New function.
2722 * mem-break.h (uninsert_reinsert_breakpoints): Declare
2723 (reinsert_reinsert_breakpoints): Declare.
2724
2725 2016-06-17 Yao Qi <yao.qi@linaro.org>
2726
2727 * linux-low.c (handle_extended_wait): If the parent is doing
2728 step-over, remove the reinsert breakpoints from the forked child.
2729
2730 2016-06-17 Yao Qi <yao.qi@linaro.org>
2731
2732 * linux-low.c (unsuspend_all_lwps): Declare.
2733 (linux_low_filter_event): If thread exited, call finish_step_over.
2734 If step-over is finished, unsuspend other threads.
2735
2736 2016-06-17 Yao Qi <yao.qi@linaro.org>
2737
2738 * linux-low.c (linux_resume_one_lwp_throw): Assert
2739 has_reinsert_breakpoints returns false.
2740 * mem-break.c (delete_disabled_breakpoints): Assert
2741 bp type isn't reinsert_breakpoint.
2742
2743 2016-06-17 Yao Qi <yao.qi@linaro.org>
2744
2745 * linux-low.c (maybe_hw_step): New function.
2746 (linux_resume_one_lwp_throw): Call maybe_hw_step.
2747 (finish_step_over): Switch current_thread to lwp temporarily,
2748 and assert has_reinsert_breakpoints returns true.
2749 (proceed_one_lwp): Call maybe_hw_step.
2750 * mem-break.c (has_reinsert_breakpoints): New function.
2751 * mem-break.h (has_reinsert_breakpoints): Declare.
2752
2753 2016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
2754
2755 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
2756
2757 2016-05-17 Yao Qi <yao.qi@linaro.org>
2758
2759 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
2760 instead of find_inferior.
2761
2762 2016-05-05 Yao Qi <yao.qi@linaro.org>
2763
2764 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
2765 Initialize res to zero.
2766
2767 2016-05-05 Yao Qi <yao.qi@linaro.org>
2768
2769 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
2770 to uint32_t.
2771
2772 2016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
2773
2774 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
2775 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
2776 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
2777
2778 2016-04-28 Par Olsson <par.olsson@windriver.com>
2779 Simon Marchi <simon.marchi@ericsson.com>
2780
2781 * tracepoint.c (write_inferior_int8): New function.
2782 (cmd_qtenable_disable): Write enable flag using
2783 write_inferior_int8.
2784
2785 2016-04-25 Yao Qi <yao.qi@linaro.org>
2786
2787 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
2788 (need_step_over_p): Return zero if the LWP has pending signals
2789 can be delivered on software single step target.
2790
2791 2016-04-25 Yao Qi <yao.qi@linaro.org>
2792
2793 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
2794 return instead of error.
2795
2796 2016-04-22 Yao Qi <yao.qi@linaro.org>
2797
2798 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
2799 to 23.
2800
2801 2016-04-22 Yao Qi <yao.qi@linaro.org>
2802
2803 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
2804 signal when stepping over breakpoint with software single
2805 step.
2806
2807 2016-04-21 Pedro Alves <palves@redhat.com>
2808
2809 * linux-s390-low.c (s390_collect_ptrace_register)
2810 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
2811 add casts.
2812 (s390_check_regset): Use void * instead of gdb_byte *.
2813
2814 2016-04-20 Pedro Alves <palves@redhat.com>
2815
2816 * configure: Renegerate.
2817
2818 2016-04-20 Yao Qi <yao.qi@linaro.org>
2819
2820 * linux-aarch32-low.c: Include "arch/arm-linux.h".
2821 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
2822 number 16.
2823 (arm_store_gregset): Likewise.
2824
2825 2016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
2826
2827 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
2828 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
2829 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
2830 (amd64-avx-mpx-linux.c): New rules.
2831 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
2832 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
2833 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
2834 (srv_amd64_regobj): Add amd64-avx-mpx.o.
2835 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
2836 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
2837 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
2838 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
2839 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
2840 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
2841 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
2842 * linux-x86-low.c (x86_linux_read_description): Add case for
2843 X86_XSTATE_AVX_MPX_MASK.
2844 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
2845 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
2846 init_registers_i386_avx_mpx_linux.
2847 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
2848 (initialize_low_tracepoint): Call
2849 init_registers_i386_avx_mpx_linux.
2850 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
2851 (initialize_low_tracepoint): Call
2852 init_registers_amd64_avx_mpx_linux.
2853 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
2854 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
2855 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
2856 declarations.
2857
2858 2016-04-18 Pedro Alves <palves@redhat.com>
2859
2860 * configure: Regenerate.
2861
2862 2016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
2863
2864 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
2865 (aarch64_emit_sub): Likewise.
2866
2867 2016-04-12 Pedro Alves <palves@redhat.com>
2868
2869 * utils.c (prepare_to_throw_exception): Delete.
2870
2871 2016-04-05 Simon Marchi <simon.marchi@ericsson.com>
2872
2873 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
2874
2875 2016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
2876
2877 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
2878
2879 2016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
2880
2881 * linux-aarch64-ipa.c: Add <elf.h> include.
2882 * linux-ppc-ipa.c: Add <elf.h> include.
2883 * linux-s390-ipa.c: Add <elf.h> include.
2884
2885 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
2886
2887 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
2888 (get_raw_reg_ptr): Likewise.
2889 (get_trace_state_variable_value_ptr): Likewise.
2890 (set_trace_state_variable_value_ptr): Likewise.
2891 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
2892 char *.
2893
2894 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
2895 Marcin Kościelnicki <koriakin@0x04.net>
2896
2897 PR/17221
2898 * linux-ppc-low.c (emit_insns): New function.
2899 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
2900 (ppc_emit_prologue): New function.
2901 (ppc_emit_epilogue): New function.
2902 (ppc_emit_add): New function.
2903 (ppc_emit_sub): New function.
2904 (ppc_emit_mul): New function.
2905 (ppc_emit_lsh): New function.
2906 (ppc_emit_rsh_signed): New function.
2907 (ppc_emit_rsh_unsigned): New function.
2908 (ppc_emit_ext): New function.
2909 (ppc_emit_zero_ext): New function.
2910 (ppc_emit_log_not): New function.
2911 (ppc_emit_bit_and): New function.
2912 (ppc_emit_bit_or): New function.
2913 (ppc_emit_bit_xor): New function.
2914 (ppc_emit_bit_not): New function.
2915 (ppc_emit_equal): New function.
2916 (ppc_emit_less_signed): New function.
2917 (ppc_emit_less_unsigned): New function.
2918 (ppc_emit_ref): New function.
2919 (ppc_emit_const): New function.
2920 (ppc_emit_reg): New function.
2921 (ppc_emit_pop): New function.
2922 (ppc_emit_stack_flush): New function.
2923 (ppc_emit_swap): New function.
2924 (ppc_emit_stack_adjust): New function.
2925 (ppc_emit_call): New function.
2926 (ppc_emit_int_call_1): New function.
2927 (ppc_emit_void_call_2): New function.
2928 (ppc_emit_if_goto): New function.
2929 (ppc_emit_goto): New function.
2930 (ppc_emit_eq_goto): New function.
2931 (ppc_emit_ne_goto): New function.
2932 (ppc_emit_lt_goto): New function.
2933 (ppc_emit_le_goto): New function.
2934 (ppc_emit_gt_goto): New function.
2935 (ppc_emit_ge_goto): New function.
2936 (ppc_write_goto_address): New function.
2937 (ppc_emit_ops_impl): New static variable.
2938 (ppc64v1_emit_prologue): New function.
2939 (ppc64v2_emit_prologue): New function.
2940 (ppc64_emit_epilogue): New function.
2941 (ppc64_emit_add): New function.
2942 (ppc64_emit_sub): New function.
2943 (ppc64_emit_mul): New function.
2944 (ppc64_emit_lsh): New function.
2945 (ppc64_emit_rsh_signed): New function.
2946 (ppc64_emit_rsh_unsigned): New function.
2947 (ppc64_emit_ext): New function.
2948 (ppc64_emit_zero_ext): New function.
2949 (ppc64_emit_log_not): New function.
2950 (ppc64_emit_bit_and): New function.
2951 (ppc64_emit_bit_or): New function.
2952 (ppc64_emit_bit_xor): New function.
2953 (ppc64_emit_bit_not): New function.
2954 (ppc64_emit_equal): New function.
2955 (ppc64_emit_less_signed): New function.
2956 (ppc64_emit_less_unsigned): New function.
2957 (ppc64_emit_ref): New function.
2958 (ppc64_emit_const): New function.
2959 (ppc64v1_emit_reg): New function.
2960 (ppc64v2_emit_reg): New function.
2961 (ppc64_emit_pop): New function.
2962 (ppc64_emit_stack_flush): New function.
2963 (ppc64_emit_swap): New function.
2964 (ppc64v1_emit_call): New function.
2965 (ppc64v2_emit_call): New function.
2966 (ppc64v1_emit_int_call_1): New function.
2967 (ppc64v2_emit_int_call_1): New function.
2968 (ppc64v1_emit_void_call_2): New function.
2969 (ppc64v2_emit_void_call_2): New function.
2970 (ppc64_emit_if_goto): New function.
2971 (ppc64_emit_eq_goto): New function.
2972 (ppc64_emit_ne_goto): New function.
2973 (ppc64_emit_lt_goto): New function.
2974 (ppc64_emit_le_goto): New function.
2975 (ppc64_emit_gt_goto): New function.
2976 (ppc64_emit_ge_goto): New function.
2977 (ppc64v1_emit_ops_impl): New static variable.
2978 (ppc64v2_emit_ops_impl): New static variable.
2979 (ppc_emit_ops): New function.
2980 (linux_low_target): Wire in ppc_emit_ops.
2981
2982 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
2983 Marcin Kościelnicki <koriakin@0x04.net>
2984
2985 PR/17221
2986 * Makefile.in: Add powerpc-*-ipa.o
2987 * configure.srv: Add ipa_obj for powerpc*-linux.
2988 * linux-ppc-ipa.c: New file.
2989 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
2990 includes.
2991 (PPC_FIELD): New macro.
2992 (PPC_SEXT): New macro.
2993 (PPC_OP6): New macro.
2994 (PPC_BO): New macro.
2995 (PPC_LI): New macro.
2996 (PPC_BD): New macro.
2997 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
2998 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
2999 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
3000 (ppc_get_thread_area): New function.
3001 (is_elfv2_inferior): New function.
3002 (gen_ds_form): New function.
3003 (GEN_STD): New macro.
3004 (GEN_STDU): New macro.
3005 (GEN_LD): New macro.
3006 (GEN_LDU): New macro.
3007 (gen_d_form): New function.
3008 (GEN_ADDI): New macro.
3009 (GEN_ADDIS): New macro.
3010 (GEN_LI): New macro.
3011 (GEN_LIS): New macro.
3012 (GEN_ORI): New macro.
3013 (GEN_ORIS): New macro.
3014 (GEN_LWZ): New macro.
3015 (GEN_STW): New macro.
3016 (GEN_STWU): New macro.
3017 (gen_xfx_form): New function.
3018 (GEN_MFSPR): New macro.
3019 (GEN_MTSPR): New macro.
3020 (GEN_MFCR): New macro.
3021 (GEN_MTCR): New macro.
3022 (GEN_SYNC): New macro.
3023 (GEN_LWSYNC): New macro.
3024 (gen_x_form): New function.
3025 (GEN_OR): New macro.
3026 (GEN_MR): New macro.
3027 (GEN_LWARX): New macro.
3028 (GEN_STWCX): New macro.
3029 (GEN_CMPW): New macro.
3030 (gen_md_form): New function.
3031 (GEN_RLDICL): New macro.
3032 (GEN_RLDICR): New macro.
3033 (gen_i_form): New function.
3034 (GEN_B): New macro.
3035 (GEN_BL): New macro.
3036 (gen_b_form): New function.
3037 (GEN_BNE): New macro.
3038 (GEN_LOAD): New macro.
3039 (GEN_STORE): New macro.
3040 (gen_limm): New function.
3041 (gen_atomic_xchg): New function.
3042 (gen_call): New function.
3043 (ppc_relocate_instruction): New function.
3044 (ppc_install_fast_tracepoint_jump_pad): New function.
3045 (ppc_get_min_fast_tracepoint_insn_len): New function.
3046 (ppc_get_ipa_tdesc_idx): New function.
3047 (the_low_target): Wire in the new functions.
3048 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
3049 tdescs.
3050 * linux-ppc-tdesc.h: New file.
3051
3052 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
3053
3054 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
3055 (alloc_jump_pad_buffer): New function.
3056 * linux-amd64-ipa.c: Add <sys/mman.h> include.
3057 (alloc_jump_pad_buffer): New function.
3058 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
3059 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
3060 (alloc_jump_pad_buffer): New function.
3061 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
3062 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
3063 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
3064 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
3065
3066 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
3067
3068 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
3069 * linux-amd64-ipa.c: Likewise.
3070 * linux-i386-ipa.c: Likewise.
3071 * linux-s390-ipa.c: Likewise.
3072 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
3073 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
3074 set_trace_state_variable_value_ptr.
3075 (struct ipa_sym_addresses): Likewise.
3076 (symbol_list): Likewise.
3077 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
3078 accessing gdb_collect directly.
3079 (gdb_collect_ptr_type): New typedef.
3080 (get_raw_reg_ptr_type): New typedef.
3081 (get_trace_state_variable_value_ptr_type): New typedef.
3082 (set_trace_state_variable_value_ptr_type): New typedef.
3083 (gdb_collect_ptr): New global.
3084 (get_raw_reg_ptr): New global.
3085 (get_trace_state_variable_value_ptr): New global.
3086 (set_trace_state_variable_value_ptr): New global.
3087 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
3088 accessing get_raw_reg directly.
3089 (get_get_tsv_func_addr): Likewise for
3090 get_trace_state_variable_value_ptr.
3091 (get_set_tsv_func_addr): Likewise for
3092 set_trace_state_variable_value_ptr.
3093 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
3094
3095 2016-03-30 Simon Marchi <simon.marchi@ericsson.com>
3096
3097 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
3098
3099 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
3100
3101 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
3102 packets.
3103 (relocate_instruction): Remove own_buf.
3104 * server.c (own_buf): Make global.
3105 (handle_v_requests): Make global.
3106 * server.h (own_buf): New declaration.
3107 (handle_v_requests): New prototype.
3108
3109 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
3110
3111 PR 18377
3112 * linux-s390-low.c (add_insns): New function.
3113 (s390_emit_prologue): New function.
3114 (s390_emit_epilogue): New function.
3115 (s390_emit_add): New function.
3116 (s390_emit_sub): New function.
3117 (s390_emit_mul): New function.
3118 (s390_emit_lsh): New function.
3119 (s390_emit_rsh_signed): New function.
3120 (s390_emit_rsh_unsigned): New function.
3121 (s390_emit_ext): New function.
3122 (s390_emit_log_not): New function.
3123 (s390_emit_bit_and): New function.
3124 (s390_emit_bit_or): New function.
3125 (s390_emit_bit_xor): New function.
3126 (s390_emit_bit_not): New function.
3127 (s390_emit_equal): New function.
3128 (s390_emit_less_signed): New function.
3129 (s390_emit_less_unsigned): New function.
3130 (s390_emit_ref): New function.
3131 (s390_emit_if_goto): New function.
3132 (s390_emit_goto): New function.
3133 (s390_write_goto_address): New function.
3134 (s390_emit_litpool): New function.
3135 (s390_emit_const): New function.
3136 (s390_emit_call): New function.
3137 (s390_emit_reg): New function.
3138 (s390_emit_pop): New function.
3139 (s390_emit_stack_flush): New function.
3140 (s390_emit_zero_ext): New function.
3141 (s390_emit_swap): New function.
3142 (s390_emit_stack_adjust): New function.
3143 (s390_emit_set_r2): New function.
3144 (s390_emit_int_call_1): New function.
3145 (s390_emit_void_call_2): New function.
3146 (s390_emit_eq_goto): New function.
3147 (s390_emit_ne_goto): New function.
3148 (s390_emit_lt_goto): New function.
3149 (s390_emit_le_goto): New function.
3150 (s390_emit_gt_goto): New function.
3151 (s390_emit_ge_goto): New function.
3152 (s390x_emit_prologue): New function.
3153 (s390x_emit_epilogue): New function.
3154 (s390x_emit_add): New function.
3155 (s390x_emit_sub): New function.
3156 (s390x_emit_mul): New function.
3157 (s390x_emit_lsh): New function.
3158 (s390x_emit_rsh_signed): New function.
3159 (s390x_emit_rsh_unsigned): New function.
3160 (s390x_emit_ext): New function.
3161 (s390x_emit_log_not): New function.
3162 (s390x_emit_bit_and): New function.
3163 (s390x_emit_bit_or): New function.
3164 (s390x_emit_bit_xor): New function.
3165 (s390x_emit_bit_not): New function.
3166 (s390x_emit_equal): New function.
3167 (s390x_emit_less_signed): New function.
3168 (s390x_emit_less_unsigned): New function.
3169 (s390x_emit_ref): New function.
3170 (s390x_emit_if_goto): New function.
3171 (s390x_emit_const): New function.
3172 (s390x_emit_call): New function.
3173 (s390x_emit_reg): New function.
3174 (s390x_emit_pop): New function.
3175 (s390x_emit_stack_flush): New function.
3176 (s390x_emit_zero_ext): New function.
3177 (s390x_emit_swap): New function.
3178 (s390x_emit_stack_adjust): New function.
3179 (s390x_emit_int_call_1): New function.
3180 (s390x_emit_void_call_2): New function.
3181 (s390x_emit_eq_goto): New function.
3182 (s390x_emit_ne_goto): New function.
3183 (s390x_emit_lt_goto): New function.
3184 (s390x_emit_le_goto): New function.
3185 (s390x_emit_gt_goto): New function.
3186 (s390x_emit_ge_goto): New function.
3187 (s390_emit_ops): New function.
3188 (struct linux_target_ops): Fill in emit_ops hook.
3189
3190 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
3191
3192 PR 18377
3193 * Makefile.in: Add s390 IPA files.
3194 * configure.srv: Build IPA for s390.
3195 * linux-s390-ipa.c: New file.
3196 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
3197 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
3198 (tdesc_s390_linux32): Likewise.
3199 (init_registers_s390_linux32v1): Likewise.
3200 (tdesc_s390_linux32v1): Likewise.
3201 (init_registers_s390_linux32v2): Likewise.
3202 (tdesc_s390_linux32v2): Likewise.
3203 (init_registers_s390_linux64): Likewise.
3204 (tdesc_s390_linux64): Likewise.
3205 (init_registers_s390_linux64v1): Likewise.
3206 (tdesc_s390_linux64v1): Likewise.
3207 (init_registers_s390_linux64v2): Likewise.
3208 (tdesc_s390_linux64v2): Likewise.
3209 (init_registers_s390_te_linux64): Likewise.
3210 (tdesc_s390_te_linux64): Likewise.
3211 (init_registers_s390_vx_linux64): Likewise.
3212 (tdesc_s390_vx_linux64): Likewise.
3213 (init_registers_s390_tevx_linux64): Likewise.
3214 (tdesc_s390_tevx_linux64): Likewise.
3215 (init_registers_s390x_linux64): Likewise.
3216 (tdesc_s390x_linux64): Likewise.
3217 (init_registers_s390x_linux64v1): Likewise.
3218 (tdesc_s390x_linux64v1): Likewise.
3219 (init_registers_s390x_linux64v2): Likewise.
3220 (tdesc_s390x_linux64v2): Likewise.
3221 (init_registers_s390x_te_linux64): Likewise.
3222 (tdesc_s390x_te_linux64): Likewise.
3223 (init_registers_s390x_vx_linux64): Likewise.
3224 (tdesc_s390x_vx_linux64): Likewise.
3225 (init_registers_s390x_tevx_linux64): Likewise.
3226 (tdesc_s390x_tevx_linux64): Likewise.
3227 (have_hwcap_s390_vx): New static variable.
3228 (s390_arch_setup): Fill have_hwcap_s390_vx.
3229 (s390_get_thread_area): New function.
3230 (s390_ft_entry_gpr_esa): New const.
3231 (s390_ft_entry_gpr_zarch): New const.
3232 (s390_ft_entry_misc): New const.
3233 (s390_ft_entry_fr): New const.
3234 (s390_ft_entry_vr): New const.
3235 (s390_ft_main_31): New const.
3236 (s390_ft_main_64): New const.
3237 (s390_ft_exit_fr): New const.
3238 (s390_ft_exit_vr): New const.
3239 (s390_ft_exit_misc): New const.
3240 (s390_ft_exit_gpr_esa): New const.
3241 (s390_ft_exit_gpr_zarch): New const.
3242 (append_insns): New function.
3243 (s390_relocate_instruction): New function.
3244 (s390_install_fast_tracepoint_jump_pad): New function.
3245 (s390_get_min_fast_tracepoint_insn_len): New function.
3246 (s390_get_ipa_tdesc_idx): New function.
3247 (struct linux_target_ops): Wire in the above functions.
3248 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
3249 * linux-s390-tdesc.h: New file.
3250
3251 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
3252
3253 * linux-s390-low.c (s390_supports_tracepoints): New function.
3254 (struct linux_target_ops): Fill supports_tracepoints hook.
3255
3256 2016-03-18 Yao Qi <yao.qi@linaro.org>
3257
3258 * linux-low.c (lwp_signal_can_be_delivered): New function.
3259 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
3260
3261 2016-03-18 Yao Qi <yao.qi@linaro.org>
3262
3263 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
3264 0 if signal is enqueued. Remove 'signal' from one debugging
3265 message. Move one debugging message to some lines below.
3266 Remove code setting 'signal' to 0.
3267
3268 2016-03-18 Yao Qi <yao.qi@linaro.org>
3269
3270 * linux-low.c (linux_low_filter_event): Remove redundant
3271 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
3272
3273 2016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
3274
3275 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
3276 (struct linux_target_ops): Wire in the above.
3277
3278 2016-03-03 Yao Qi <yao.qi@linaro.org>
3279
3280 * linux-low.c: Update comments to start_step_over.
3281
3282 2016-03-03 Yao Qi <yao.qi@linaro.org>
3283
3284 PR server/19736
3285 * linux-low.c (handle_extended_wait): Set child suspended
3286 if event_lwp->bp_reinsert isn't zero.
3287
3288 2016-03-02 Yao Qi <yao.qi@linaro.org>
3289
3290 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
3291 enqueue_pending_signal.
3292
3293 2016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
3294
3295 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
3296 is actually loaded.
3297
3298 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
3299
3300 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
3301 (s390_regmap_3264) [!__s390x__]: New global.
3302 (s390_collect_ptrace_register): Skip map entries containing -1.
3303 (s390_supply_ptrace_register): Ditto.
3304 (s390_fill_gprs_high): New function.
3305 (s390_store_gprs_high): New function.
3306 (s390_regsets): Add NT_S390_HIGH_GPRS.
3307 (s390_get_hwcap): Enable on 31-bit.
3308 (have_hwcap_s390_high_gprs): Enable on 31-bit.
3309 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
3310 Detect NT_S390_HIGH_GPRS.
3311 (s390_usrregs_info_3264): Enable on 31-bit.
3312 (s390_regs_info): Enable regs_info_3264 on 31-bit.
3313 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
3314
3315 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
3316
3317 PR gdb/13808
3318 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
3319 * configure.srv: Ditto.
3320 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
3321 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
3322 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
3323 (init_registers_amd64_linux): Remove prototype.
3324 (tdesc_amd64_linux): Remove declaration.
3325 (get_ipa_tdesc): New function.
3326 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
3327 initialize remaining tdescs.
3328 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
3329 (init_registers_i386_linux): Remove prototype.
3330 (tdesc_i386_linux): Remove declaration.
3331 (get_ipa_tdesc): New function.
3332 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
3333 initialize remaining tdescs.
3334 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
3335 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
3336 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
3337 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
3338 (x86_get_ipa_tdesc_idx): New function.
3339 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
3340 * linux-x86-tdesc.h: New file.
3341 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
3342 (target_get_ipa_tdesc_idx): New macro.
3343 * tracepoint.c (ipa_tdesc_idx): New macro.
3344 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
3345 (symbol_list): Add ipa_tdesc_idx.
3346 (cmd_qtstart): Write ipa_tdesc_idx in the target.
3347 (ipa_tdesc): Remove.
3348 (ipa_tdesc_idx): New variable.
3349 (get_context_regcache): Use get_ipa_tdesc.
3350 (gdb_collect): Ditto.
3351 (gdb_probe): Ditto.
3352 * tracepoint.h (get_ipa_tdesc): New prototype.
3353 (ipa_tdesc): Remove.
3354
3355 2016-02-24 Pedro Alves <palves@redhat.com>
3356
3357 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
3358 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
3359 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
3360 Factor out common code between the USE_SIGTRAP_SIGINFO and
3361 !USE_SIGTRAP_SIGINFO blocks.
3362 (linux_low_filter_event): Call save_stop_reason instead of
3363 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
3364 Update comments.
3365 (linux_wait_1): Update comments.
3366
3367 2016-02-24 Wei-cheng Wang <cole945@gmail.com>
3368
3369 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
3370 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
3371 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
3372 ppc_insert_point, ppc_remove_point.
3373
3374 2016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
3375
3376 * linux-s390-low.c (s390_supports_z_point_type): New function.
3377 (struct linux_target_ops): Wire s390_supports_z_point_type in.
3378
3379 2016-02-16 Yao Qi <yao.qi@linaro.org>
3380
3381 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
3382 PC. Get pc from regcache_read_pc.
3383
3384 2016-02-12 Yao Qi <yao.qi@linaro.org>
3385
3386 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
3387 or linux_get_pc_32bit.
3388 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
3389
3390 2016-02-12 Yao Qi <yao.qi@linaro.org>
3391
3392 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
3393 arm_linux_get_next_pcs_fixup.
3394
3395 2016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
3396
3397 * tracepoint.c (x_tracepoint_action_download): Change
3398 write_inferior_data_ptr to write_inferior_data_pointer.
3399 (cmd_qtstart): Likewise.
3400 (write_inferior_data_ptr): Remove.
3401 (download_agent_expr): Change write_inferior_data_ptr to
3402 write_inferior_data_pointer.
3403 (download_tracepoint_1): Likewise.
3404 (download_tracepoint): Likewise.
3405 (download_trace_state_variables): Likewise.
3406
3407 2016-02-11 Wei-cheng Wang <cole945@gmail.com>
3408 Marcin Kościelnicki <koriakin@0x04.net>
3409
3410 * tracepoint.c (struct tracepoint_action_ops): Remove.
3411 (struct tracepoint_action): Remove ops.
3412 (m_tracepoint_action_download, r_tracepoint_action_download)
3413 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
3414 size and offset accordingly.
3415 (m_tracepoint_action_ops, r_tracepoint_action_ops)
3416 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
3417 (tracepoint_action_send, tracepoint_action_download): New functions.
3418 Helpers for trace action handlers.
3419 (add_tracepoint_action): Remove setup actions ops.
3420 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
3421
3422 2016-02-10 Yao Qi <yao.qi@linaro.org>
3423
3424 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
3425
3426 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
3427
3428 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
3429 to AC_OUTPUT.
3430 * configure: Regenerate.
3431
3432 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
3433
3434 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
3435 void * to gdb_byte *.
3436 * linux-low.c (siginfo_fixup): Likewise.
3437 (linux_xfer_siginfo): Likewise.
3438 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
3439 Likewise.
3440 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
3441
3442 2016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
3443
3444 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
3445 to srv_tgtobj.
3446 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
3447 to srv_tgtobj.
3448 * linux-x86-low.c [__x86_64__]: Include
3449 "nat/amd64-linux-siginfo.h".
3450 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
3451 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
3452 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
3453 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
3454 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
3455 (cpt_si_fd, si_timerid, si_overrun): Move from
3456 nat/amd64-linux-siginfo.c.
3457 * Makefile.in (amd64-linux-siginfo.o:): New rule.
3458
3459 2016-01-28 Simon Marchi <simon.marchi@ericsson.com>
3460
3461 * server.c (skip_to_semicolon): Remove.
3462 (process_point_options): Use strchrnul instead of
3463 skip_to_semicolon.
3464
3465 2016-01-26 Yao Qi <yao.qi@linaro.org>
3466
3467 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
3468 * linux-low.c (install_software_single_step_breakpoints): Don't
3469 call regcache_read_pc.
3470 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
3471 argument pc.
3472
3473 2016-01-26 Yao Qi <yao.qi@linaro.org>
3474
3475 * linux-low.c (install_software_single_step_breakpoints): Call
3476 regcache_read_pc instead of get_pc.
3477
3478 2016-01-26 Yao Qi <yao.qi@linaro.org>
3479
3480 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
3481 (unblock_async_io): Rename to ...
3482 (block_unblock_async_io): ... it. New function.
3483 (enable_async_io): Don't install SIGIO handler. Unblock it
3484 instead.
3485 (disable_async_io): Don't ignore SIGIO. Block it instead.
3486 (initialize_async_io): Install SIGIO handler. Don't call
3487 unblock_async_io.
3488
3489 2016-01-26 Yao Qi <yao.qi@linaro.org>
3490
3491 * remote-utils.c (getpkt): If the buffer isn't empty, and the
3492 first character is '\003', call *the_target->request_interrupt.
3493
3494 2016-01-25 Yao Qi <yao.qi@linaro.org>
3495
3496 * remote-utils.c (new_thread_notify): Remove.
3497 (dead_thread_notify): Likewise.
3498 * remote-utils.h (new_thread_notify): Remove declaration.
3499 (dead_thread_notify): Likewise.
3500
3501 2016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
3502
3503 * gdb.trace/pending.exp: Fix expected message on continue.
3504
3505 2016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
3506
3507 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
3508 it works properly on big-endian machines where sizeof (CORE_ADDR)
3509 != sizeof (void *).
3510
3511 2016-01-21 Pedro Alves <palves@redhat.com>
3512
3513 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
3514 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
3515 * configure: Regenerate.
3516
3517 2016-01-21 Yao Qi <yao.qi@linaro.org>
3518
3519 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
3520 is_thumb and set it according to CPSR saved on the stack.
3521 (get_next_pcs_syscall_next_pc): Pass is_thumb to
3522 arm_sigreturn_next_pc.
3523
3524 2016-01-18 Yao Qi <yao.qi@linaro.org>
3525
3526 * linux-low.c (linux_set_pc_64bit): New function.
3527 (linux_get_pc_64bit): New function.
3528 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
3529 Declare.
3530 * linux-sparc-low.c (debug_threads): Remove declaration.
3531 (sparc_get_pc): Remove.
3532 (the_low_target): Use linux_get_pc_64bit instead of
3533 sparc_get_pc.
3534 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
3535 (the_low_target): Use linux_get_pc_64bit and
3536 linux_set_pc_64bit.
3537
3538 2016-01-18 Yao Qi <yao.qi@linaro.org>
3539
3540 * linux-arm-low.c (debug_threads): Remove declaration.
3541 (arm_get_pc, arm_set_pc): Remove.
3542 (the_low_target): Use linux_get_pc_32bit and
3543 linux_set_pc_32bit.
3544 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
3545 (the_low_target): Use linux_get_pc_32bit and
3546 linux_set_pc_32bit.
3547 * linux-cris-low.c (debug_threads): Remove declaration.
3548 (cris_get_pc, cris_set_pc,): Remove.
3549 (the_low_target): Use linux_get_pc_32bit and
3550 linux_set_pc_32bit.
3551 * linux-crisv32-low.c (debug_threads): Remove declaration.
3552 (cris_get_pc, cris_set_pc): Remove.
3553 (the_low_target): Use linux_get_pc_32bit and
3554 linux_set_pc_32bit.
3555 * linux-low.c: Include inttypes.h.
3556 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
3557 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
3558 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
3559 (the_low_target): Use linux_get_pc_32bit and
3560 linux_set_pc_32bit.
3561 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
3562 (the_low_target): Use linux_get_pc_32bit and
3563 linux_set_pc_32bit.
3564 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
3565 (the_low_target): Use linux_get_pc_32bit and
3566 linux_set_pc_32bit.
3567 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
3568 (the_low_target): Use linux_get_pc_32bit and
3569 linux_set_pc_32bit.
3570 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
3571 (the_low_target): Use linux_get_pc_32bit and
3572 linux_set_pc_32bit.
3573
3574 2016-01-18 Gary Benson <gbenson@redhat.com>
3575
3576 * configure.ac (AC_FUNC_FORK): New check.
3577 * config.in: Regenerate.
3578 * configure: Likewise.
3579
3580 2016-01-14 Yao Qi <yao.qi@linaro.org>
3581
3582 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
3583 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
3584 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
3585 arm_get_next_pcs_ctor.
3586
3587 2016-01-12 Josh Stone <jistone@redhat.com>
3588 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3589
3590 * inferiors.h: Include "gdb_vecs.h".
3591 (struct process_info): Add syscalls_to_catch.
3592 * inferiors.c (remove_process): Free syscalls_to_catch.
3593 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
3594 syscall_return stops.
3595 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
3596 * server.c (handle_general_set): Handle QCatchSyscalls.
3597 (handle_query): Report support for QCatchSyscalls.
3598 * target.h (struct target_ops): Add supports_catch_syscall.
3599 (target_supports_catch_syscall): New macro.
3600 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
3601 (struct lwp_info): Add syscall_state.
3602 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
3603 Maintain syscall_state and syscalls_to_catch across exec.
3604 (get_syscall_trapinfo): New function, proxy to the_low_target.
3605 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
3606 (linux_low_filter_event): Toggle syscall_state entry/return for
3607 syscall traps, and set it ignored for all others.
3608 (gdb_catching_syscalls_p): New function.
3609 (gdb_catch_this_syscall_p): New function.
3610 (linux_wait_1): Handle SYSCALL_SIGTRAP.
3611 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
3612 (linux_supports_catch_syscall): New function.
3613 (linux_target_ops): Install it.
3614 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
3615 (the_low_target): Install it.
3616
3617 2016-01-12 Mike Frysinger <vapier@gentoo.org>
3618
3619 * acinclude.m4: Include new ../warning.m4 file.
3620 * configure: Regenerated.
3621 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
3622
3623 2016-01-12 Mike Frysinger <vapier@gentoo.org>
3624
3625 * ax.c (is_goto_target): Mark static.
3626 * linux-low.c (register_addr): Likewise.
3627 (linux_fetch_registers, linux_store_registers): Likewise.
3628 * mem-break.c (any_persistent_commands): Fix old prototype.
3629 (add_commands_to_breakpoint): Mark static.
3630 * regcache.c (find_register_by_name): Delete unused func.
3631 * remote-utils.c (hex_or_minus_one): Mark static.
3632 * server.c (monitor_show_help): Mark static.
3633 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
3634 handle_v_requests): Likewise.
3635
3636 2016-01-12 Pedro Alves <palves@redhat.com>
3637
3638 Remove use of the registered trademark symbol throughout.
3639
3640 2016-01-08 Yao Qi <yao.qi@linaro.org>
3641
3642 * remote-utils.c (getpkt): If c is '\003', call target hook
3643 request_interrupt.
3644
3645 2016-01-06 Yao Qi <yao.qi@linaro.org>
3646
3647 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
3648 linux-aarch32-low.c.
3649 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3650 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
3651 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
3652 (thumb2_breakpoint): Declare.
3653 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
3654 linux-aarch32-low.h.
3655 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3656 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
3657 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
3658
3659 2016-01-01 Joel Brobecker <brobecker@adacore.com>
3660
3661 * gdbreplay.c (gdbreplay_version): Change copyright year in
3662 version message.
3663 * server.c (gdbserver_version): Likewise.
3664
3665 2015-12-28 Patrick Palka <patrick@parcs.ath.cx>
3666
3667 * server.c (crc32_table): Delete.
3668 (crc32): Use libiberty's xcrc32 function.
3669
3670 2015-12-22 Joel Brobecker <brobecker@adacore.com>
3671
3672 * lynx-low.c (lynx_delete_thread_callback): New function.
3673 (lynx_mourn): Properly delete our process and all of its
3674 threads. Remove call to clear_inferiors.
3675
3676 2015-12-22 Joel Brobecker <brobecker@adacore.com>
3677
3678 * target.c (thread_search_callback): Add check that
3679 the thread_stopped target callback is not NULL before
3680 calling it.
3681
3682 2015-12-21 Yao Qi <yao.qi@linaro.org>
3683
3684 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
3685 arm breakpoint.
3686
3687 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3688
3689 * server.c (handle_query): Call target_supports_software_single_step.
3690
3691 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3692
3693 * linux-low.c (single_step): New function.
3694 (linux_resume_one_lwp_throw): Call single_step.
3695 (start_step_over): Likewise.
3696
3697 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3698
3699 * Makefile.in (SFILES): Append arch/arm-linux.c,
3700 arch/arm-get-next-pcs.c.
3701 (arm-linux.o): New rule.
3702 (arm-get-next-pcs.o): New rule.
3703 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
3704 arm-linux.o.
3705 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
3706 to linux-aarch32-low.c.
3707 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3708 (arm_breakpoint_len, thumb_breakpoint): Likewise.
3709 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
3710 (thumb2_breakpoint_len): Likewise.
3711 (arm_is_thumb_mode): Make non-static.
3712 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
3713 from linux-aarch32-low.c.
3714 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3715 (arm_breakpoint_len, thumb_breakpoint): Likewise.
3716 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
3717 (thumb2_breakpoint_len): Likewise.
3718 (arm_is_thumb_mode): New declaration.
3719 * linux-arm-low.c: Include arch/arm-linux.h
3720 aarch/arm-get-next-pcs.h, sys/syscall.h.
3721 (get_next_pcs_ops): New struct.
3722 (get_next_pcs_addr_bits_remove): New function.
3723 (get_next_pcs_is_thumb): New function.
3724 (get_next_pcs_read_memory_unsigned_integer): Likewise.
3725 (arm_sigreturn_next_pc): Likewise.
3726 (get_next_pcs_syscall_next_pc): Likewise.
3727 (arm_gdbserver_get_next_pcs): Likewise.
3728 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
3729 Initialize.
3730 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
3731 * server.h: Include gdb_vecs.h.
3732
3733 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3734
3735 * Makefile.in (SFILES): Append common/common-regcache.c.
3736 (OBS): Append common-regcache.o.
3737 (common-regcache.o): New rule.
3738 * regcache.c (init_register_cache): Initialize cache to
3739 REG_UNAVAILABLE.
3740 (regcache_raw_read_unsigned): New function.
3741 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
3742 register_status enum.
3743
3744 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3745
3746 * linux-aarch64-low.c (the_low_targets): Rename
3747 breakpoint_reinsert_addr to get_next_pcs.
3748 * linux-arm-low.c (the_low_targets): Likewise.
3749 * linux-bfin-low.c (the_low_targets): Likewise.
3750 * linux-cris-low.c (the_low_targets): Likewise.
3751 * linux-crisv32-low.c (the_low_targets): Likewise.
3752 * linux-low.c (can_software_single_step): Likewise.
3753 (install_software_single_step_breakpoints): New function.
3754 (start_step_over): Use install_software_single_step_breakpoints.
3755 * linux-low.h: New CORE_ADDR vector.
3756 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
3757 get_next_pcs.
3758 * linux-mips-low.c (the_low_targets): Likewise.
3759 * linux-nios2-low.c (the_low_targets): Likewise.
3760 * linux-sparc-low.c (the_low_targets): Likewise.
3761
3762 2015-12-17 Pedro Alves <palves@redhat.com>
3763
3764 * linux-low.c (linux_kill_one_lwp): Remove references to
3765 LinuxThreads.
3766 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
3767 to 'kill'.
3768 (linux_init_signals): Delete.
3769 (initialize_low): Adjust.
3770 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
3771
3772 2015-12-16 Pedro Alves <palves@redhat.com>
3773
3774 * configure.ac (compiler warning flags): When testing a
3775 -Wno-foo option, check whether -Wfoo works instead.
3776 * configure: Regenerate.
3777
3778 2015-12-11 Don Breazeal <donb@codesourcery.com>
3779
3780 * server.c (process_serial_event): Don't exit from gdbserver
3781 in remote mode if there are still active inferiors.
3782
3783 2015-12-11 Yao Qi <yao.qi@linaro.org>
3784
3785 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
3786 arm_breakpoint_at if the process is 32-bit.
3787
3788 2015-12-11 Yao Qi <yao.qi@linaro.org>
3789
3790 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
3791 arm breakpoint.
3792
3793 2015-12-07 Yao Qi <yao.qi@linaro.org>
3794
3795 * configure.srv: Append arm.o to srv_tgtobj for
3796 aarch64*-*-linux* target.
3797 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
3798 from linux-arm-low.c.
3799 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3800 (arm_breakpoint_len, thumb_breakpoint): Likewise.
3801 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
3802 (thumb2_breakpoint_len): Likewise.
3803 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
3804 (arm_breakpoint_kinds): Likewise.
3805 (arm_breakpoint_kind_from_pc): Likewise.
3806 (arm_sw_breakpoint_from_kind): Likewise.
3807 (arm_breakpoint_kind_from_current_state): Likewise.
3808 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
3809 (arm_sw_breakpoint_from_kind): Declare.
3810 (arm_breakpoint_kind_from_current_state): Declare.
3811 (arm_breakpoint_at): Declare.
3812 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
3813 arm_sw_breakpoint_from_kind if process is 32-bit.
3814 (aarch64_breakpoint_kind_from_pc): New function.
3815 (aarch64_breakpoint_kind_from_current_state): New function.
3816 (the_low_target): Initialize fields breakpoint_kind_from_pc
3817 and breakpoint_kind_from_current_state.
3818 * linux-arm-low.c (arm_breakpoint_kinds): Move to
3819 linux-aarch32-low.c.
3820 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
3821 (arm_breakpoint, arm_breakpoint_len): Likewise.
3822 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
3823 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
3824 (arm_is_thumb_mode): Likewise.
3825 (arm_breakpoint_at): Likewise.
3826 (arm_breakpoint_kind_from_pc): Likewise.
3827 (arm_sw_breakpoint_from_kind): Likewise.
3828 (arm_breakpoint_kind_from_current_state): Likewise.
3829
3830 Revert:
3831 2015-08-04 Yao Qi <yao.qi@linaro.org>
3832
3833 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
3834 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
3835 * server.c (extended_protocol): Remove "static".
3836 * server.h (extended_protocol): Declare it.
3837
3838 2015-12-04 Josh Stone <jistone@redhat.com>
3839
3840 * target.h (struct target_ops) <arch_setup>: Rename to ...
3841 (struct target_ops) <post_create_inferior>: ... this.
3842 (target_arch_setup): Rename to ...
3843 (target_post_create_inferior): ... this, calling post_create_inferior.
3844 * server.c (start_inferior): Update target_arch_setup calls to
3845 target_post_create_inferior.
3846 * linux-low.c (linux_low_ptrace_options): Forward declare.
3847 (linux_arch_setup): Update its comment for general use.
3848 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
3849 (struct linux_target_ops): Use linux_post_create_inferior.
3850 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
3851 to post_create_inferior.
3852 * nto-low.c (struct nto_target_ops): Likewise.
3853 * spu-low.c (struct spu_target_ops): Likewise.
3854 * win32-low.c (struct win32_target_ops): Likewise.
3855
3856 2015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
3857
3858 * linux-arm-low.c: Remove duplicate arch/arm.h include.
3859
3860 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3861
3862 * linux-arm-low.c (arm_reinsert_addr): Remove function.
3863 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
3864 * linux-cris-low.c (cris_reinsert_addr> Remove function.
3865 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3866 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
3867 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3868 * linux-mips-low.c (mips_reinsert_addr): Remove function.
3869 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3870 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
3871 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3872 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
3873 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3874
3875 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3876
3877 * linux-low.c (linux_look_up_symbols): Don't call
3878 linux_supports_traceclone.
3879 * linux-low.h (thread_db_init): Remove use_events argument.
3880 * thread-db.c (thread_db_use_event): Remove global variable.
3881 (struct thread_db) <td_thr_event_enable_p>: Remove field.
3882 (struct thread_db) <td_create_bp>: Remove field.
3883 (thread_db_create_event): Remove function.
3884 (thread_db_enable_reporting): Likewise.
3885 (find_one_thread): Don't check for thread_db_use_events.
3886 (attach_thread): Likewise.
3887 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
3888 (try_thread_db_load_1): Don't check for thread_db_use_events.
3889 (thread_db_init): Remove use_events argument and thread events
3890 handling.
3891 (remove_thread_event_breakpoints): Remove function.
3892 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
3893
3894 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3895
3896 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
3897 New function.
3898 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3899 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
3900 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3901 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
3902 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
3903 Initialize.
3904 * linux-crisv32-low.c (cris_supports_hardware_single_step):
3905 New function.
3906 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3907 * linux-low.c (can_hardware_single_step): Use
3908 supports_hardware_single_step.
3909 (can_software_single_step): New function.
3910 (start_step_over): Call can_software_single_step.
3911 (linux_supports_hardware_single_step): New function.
3912 (struct target_ops) <supports_software_single_step>: Initialize.
3913 * linux-low.h (struct linux_target_ops)
3914 <supports_hardware_single_step>: Initialize.
3915 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
3916 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3917 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
3918 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
3919 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
3920 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3921 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
3922 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3923 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
3924 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
3925 Initialize.
3926 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
3927 (struct linux_target_ops) <tile_supports_hardware_single_step>:
3928 Initialize.
3929 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
3930 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3931 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
3932 New function.
3933 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3934 * target.h (struct target_ops): <supports_software_single_step>:
3935 New field.
3936 (target_supports_software_single_step): New macro.
3937
3938 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3939
3940 * linux-low.c (linux_wait_1): Fix pc advance condition.
3941 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
3942 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
3943
3944 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3945
3946 * linux-arm-low.c (arm_is_thumb_mode): New function.
3947 (arm_breakpoint_at): Use arm_is_thumb_mode.
3948 (arm_breakpoint_kind_from_current_state): New function.
3949 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
3950 Initialize.
3951 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
3952 (linux_breakpoint_kind_from_current_state): New function.
3953 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
3954 * linux-low.h (struct linux_target_ops)
3955 <breakpoint_kind_from_current_state>: New field.
3956 * target.h (struct target_ops): Likewise.
3957 (target_breakpoint_kind_from_current_state): New macro.
3958
3959 2015-11-30 Pedro Alves <palves@redhat.com>
3960
3961 * linux-low.c (linux_resume): Wake up the event loop before
3962 returning.
3963
3964 2015-11-30 Pedro Alves <palves@redhat.com>
3965
3966 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
3967 check.
3968 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
3969 to -1.
3970 * target.c (struct thread_search): New structure.
3971 (thread_search_callback): New function.
3972 (prev_general_thread): New global.
3973 (prepare_to_access_memory, done_accessing_memory): New functions.
3974 * target.h (prepare_to_access_memory, done_accessing_memory):
3975 Replace macros with function declarations.
3976
3977 2015-11-30 Pedro Alves <palves@redhat.com>
3978
3979 PR 14618
3980 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
3981 report TARGET_WAITKIND_NO_RESUMED.
3982 * remote-utils.c (prepare_resume_reply): Handle
3983 TARGET_WAITKIND_NO_RESUMED.
3984 * server.c (report_no_resumed): New global.
3985 (handle_query) <qSupported>: Handle "no-resumed+". Report
3986 "no-resumed+" support.
3987 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
3988 return error if the client doesn't support no-resumed events.
3989 (push_stop_notification): New function.
3990 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
3991 events if the client supports them.
3992
3993 2015-11-30 Pedro Alves <palves@redhat.com>
3994
3995 * linux-low.c (thread_still_has_status_pending_p): Don't check
3996 vCont;t here.
3997 (lwp_resumed): New function.
3998 (status_pending_p_callback): Return early if the LWP is not
3999 supposed to be resumed.
4000
4001 2015-11-30 Pedro Alves <palves@redhat.com>
4002
4003 * linux-low.c (handle_extended_wait): Assert that the LWP's
4004 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
4005 thread create events, leave the new child's status pending.
4006 (linux_low_filter_event): If GDB wants to hear about thread exit
4007 events, leave the LWP marked dead and don't delete it.
4008 (linux_wait_for_event_filtered): Don't check for thread exit.
4009 (filter_exit_event): New function.
4010 (linux_wait_1): Use it, when returning an exit event.
4011 (linux_resume_one_lwp_throw): Assert that the LWP's
4012 waitstatus is TARGET_WAITKIND_IGNORE.
4013 * remote-utils.c (prepare_resume_reply): Handle
4014 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
4015 * server.c (report_thread_events): New global.
4016 (handle_general_set): Handle QThreadEvents.
4017 (handle_query) <qSupported>: Handle and report QThreadEvents+;
4018 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
4019 TARGET_WAITKIND_THREAD_EXITED.
4020 * server.h (report_thread_events): Declare.
4021
4022 2015-11-30 Pedro Alves <palves@redhat.com>
4023
4024 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
4025 the thread's last_resume_kind was resume_stop.
4026
4027 2015-11-30 Pedro Alves <palves@redhat.com>
4028
4029 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
4030 before returning.
4031
4032 2015-11-30 Pedro Alves <palves@redhat.com>
4033
4034 * server.c (handle_v_requests): Handle vCtrlC.
4035
4036 2015-11-30 Pedro Alves <palves@redhat.com>
4037
4038 * gdbthread.h (find_any_thread_of_pid): Declare.
4039 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
4040 functions.
4041 * server.c (handle_query): If current_thread is NULL, look for
4042 another thread of the selected process.
4043
4044 2015-11-26 Daniel Colascione <dancol@dancol.org>
4045 Simon Marchi <simon.marchi@ericsson.com>
4046
4047 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
4048 * server.c (handle_qxfer_threads_worker): Refactor to include thread
4049 name in reply.
4050 * target.h (struct target_ops) <thread_name>: New field.
4051 (target_thread_name): New macro.
4052
4053 2015-11-23 Joel Brobecker <brobecker@adacore.com>
4054
4055 * regcache.h (regcache_invalidate_pid): Add declaration.
4056 * regcache.c (regcache_invalidate_pid): New function, extracted
4057 from regcache_invalidate.
4058 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
4059 Add trivial documentation comment.
4060 * lynx-low.c: Use regcache_invalidate_pid instead of
4061 regcache_invalidate.
4062
4063 2015-11-23 Joel Brobecker <brobecker@adacore.com>
4064
4065 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
4066 and Elf64_auxv_t if the target is Android.
4067
4068 2015-11-22 Doug Evans <xdje42@gmail.com>
4069
4070 * target.h: #include <sys/types.h>.
4071
4072 2015-11-19 Pedro Alves <palves@redhat.com>
4073
4074 * linux-low.c (linux_process_qsupported): Change prototype.
4075 Adjust.
4076 * linux-low.h (struct linux_target_ops) <process_qsupported>:
4077 Change prototype.
4078 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
4079 and adjust to loop over all features.
4080 * server.c (handle_query) <qSupported>: Adjust to call
4081 target_process_qsupported once, passing it a vector of unprocessed
4082 features.
4083 * target.h (struct target_ops) <process_qsupported>: Change
4084 prototype.
4085 (target_process_qsupported): Adjust.
4086
4087 2015-11-19 Pedro Alves <palves@redhat.com>
4088
4089 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
4090 mode.
4091 * configure: Regenerate.
4092
4093 2015-11-19 Pedro Alves <palves@redhat.com>
4094
4095 * configure: Regenerate.
4096
4097 2015-11-19 Yao Qi <yao.qi@linaro.org>
4098
4099 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
4100 type to uint32_t.
4101
4102 2015-11-19 Yao Qi <yao.qi@linaro.org>
4103
4104 * linux-aarch64-low.c (enum aarch64_operand_type): New.
4105 (struct aarch64_operand): Move enum out.
4106
4107 2015-11-19 Yao Qi <yao.qi@linaro.org>
4108
4109 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
4110 struct user_fpsimd_state *.
4111 (aarch64_store_fpregset): Likewise.
4112
4113 2015-11-19 Yao Qi <yao.qi@linaro.org>
4114
4115 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
4116 struct user_pt_regs *.
4117 (aarch64_store_gregset): Likewise.
4118
4119 2015-11-18 Pedro Alves <palves@redhat.com>
4120
4121 * Makefile.in (all_object_files): Add $IPA_OBJS.
4122
4123 2015-11-17 Pedro Alves <palves@redhat.com>
4124
4125 * win32-low.c (win32_resume): Use gdb_signal_from_host,
4126 GDB_SIGNAL_0 and gdb_signal_to_string.
4127
4128 2015-11-17 Pedro Alves <palves@redhat.com>
4129
4130 * win32-low.c (handle_output_debug_string): Remove parameter.
4131 (win32_kill): Remove our_status local and adjust call to
4132 handle_output_debug_string.
4133 (get_child_debug_event): Adjust call to
4134 handle_output_debug_string.
4135
4136 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4137
4138 * linux-mips-low.c (mips_fill_gregset): Add cast.
4139 (mips_store_gregset): Likewise.
4140 (mips_fill_fpregset): Likewise.
4141 (mips_store_fpregset): Likewise.
4142
4143 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4144
4145 * linux-mips-low.c (mips_add_watchpoint): Rename private to
4146 priv.
4147
4148 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4149
4150 * linux-mips-low.c (mips_linux_new_thread): Change type of
4151 watch_type to enum target_hw_bp_type.
4152
4153 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4154
4155 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
4156 Change return type to arm_hwbp_type.
4157
4158 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4159
4160 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
4161 (arm_store_gregset): Likewise.
4162 * linux-arm-low.c (arm_get_hwcap): Likewise.
4163 (arm_read_description): Likewise.
4164
4165 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4166
4167 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
4168
4169 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4170
4171 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
4172 (ppc_fill_vsxregset): Likewise.
4173 (ppc_store_vsxregset): Likewise.
4174 (ppc_fill_vrregset): Likewise.
4175 (ppc_store_vrregset): Likewise.
4176 (ppc_fill_evrregset): Likewise.
4177 (ppc_store_evrregset): Likewise.
4178
4179 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4180
4181 * linux-ppc-low.c (ppc_usrregs_info): Remove
4182 forward-declaration.
4183 (ppc_arch_setup): Move lower in file.
4184
4185 2015-10-30 Simon Marchi <simon.marchi@ericsson.com>
4186
4187 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
4188 (ps_pdwrite): Likewise.
4189
4190 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
4191
4192 * linux-arm-low.c (arm_new_thread): Move pointer dereference
4193 to after assert checks.
4194
4195 2015-10-29 Simon Marchi <simon.marchi@ericsson.com>
4196
4197 * proc-service.c (ps_pdread): Add/adjust casts.
4198 (ps_pdwrite): Add/adjust casts.
4199
4200 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
4201
4202 * server.c (handle_search_memory_1): Cast return value of
4203 memmem.
4204
4205 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
4206
4207 * server.c (write_qxfer_response): Change type of data to
4208 gdb_byte *.
4209
4210 2015-10-29 Pedro Alves <palves@redhat.com>
4211
4212 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
4213
4214 2015-10-29 Pedro Alves <palves@redhat.com>
4215
4216 * tracepoint.c (clear_installed_tracepoints): Add casts.
4217
4218 2015-10-29 Pedro Alves <palves@redhat.com>
4219
4220 * server.c (handle_v_cont, process_serial_event): Add enum
4221 gdb_signal casts to signal parsing code.
4222
4223 2015-10-29 Pedro Alves <palves@redhat.com>
4224
4225 * linux-low.h (NULL_REGSET): Define.
4226 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
4227 * linux-arm-low.c (arm_regsets): Likewise.
4228 * linux-crisv32-low.c (cris_regsets): Likewise.
4229 * linux-m68k-low.c (m68k_regsets): Likewise.
4230 * linux-mips-low.c (mips_regsets): Likewise.
4231 * linux-nios2-low.c (nios2_regsets): Likewise.
4232 * linux-ppc-low.c (ppc_regsets): Likewise.
4233 * linux-s390-low.c (s390_regsets): Likewise.
4234 * linux-sh-low.c (sh_regsets): Likewise.
4235 * linux-sparc-low.c (sparc_regsets): Likewise.
4236 * linux-tic6x-low.c (tic6x_regsets): Likewise.
4237 * linux-tile-low.c (tile_regsets): Likewise.
4238 * linux-x86-low.c (x86_regsets): Likewise.
4239 * linux-xtensa-low.c (xtensa_regsets): Likewise.
4240
4241 2015-10-29 Pedro Alves <palves@redhat.com>
4242
4243 * linux-low.h (NULL_REGSET): Define.
4244 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
4245 * linux-arm-low.c (arm_regsets): Likewise.
4246 * linux-crisv32-low.c (cris_regsets): Likewise.
4247 * linux-m68k-low.c (m68k_regsets): Likewise.
4248 * linux-mips-low.c (mips_regsets): Likewise.
4249 * linux-nios2-low.c (nios2_regsets): Likewise.
4250 * linux-ppc-low.c (ppc_regsets): Likewise.
4251 * linux-s390-low.c (s390_regsets): Likewise.
4252 * linux-sh-low.c (sh_regsets): Likewise.
4253 * linux-sparc-low.c (sparc_regsets): Likewise.
4254 * linux-tic6x-low.c (tic6x_regsets): Likewise.
4255 * linux-tile-low.c (tile_regsets): Likewise.
4256 * linux-x86-low.c (x86_regsets): Likewise.
4257 * linux-xtensa-low.c (xtensa_regsets): Likewise.
4258
4259 2015-10-26 Doug Evans <dje@google.com>
4260
4261 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
4262
4263 2015-10-26 Doug Evans <dje@google.com>
4264
4265 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
4266
4267 2015-10-26 Doug Evans <dje@google.com>
4268
4269 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
4270 for debug_printf.
4271 (attach_thread, find_new_threads_callback): Ditto.
4272
4273 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
4274
4275 * mem-break.h (set_breakpoint_data): Remove.
4276
4277 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
4278
4279 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
4280 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
4281 (initialize_low): Remove set_breakpoint_data call.
4282 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
4283 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
4284 (initialize_low): Remove set_breakpoint_data call.
4285 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
4286 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
4287 (initialize_low): Remove set_breakpoint_data call.
4288
4289 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
4290
4291 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
4292 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
4293 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
4294 * target.h (target_breakpoint_kind_from_pc): New macro.
4295
4296 2015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
4297
4298 * linux-low.c (default_breakpoint_kind_from_pc): New function.
4299 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
4300 the default breakpoint kind.
4301
4302 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4303
4304 * linux-arm-low.c (arm_supports_z_point_type): Add software
4305 breakpoint support.
4306
4307 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4308
4309 * linux-arm-low.c: Refactor breakpoint definitions.
4310 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
4311 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
4312
4313 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4314
4315 * Makefile.in: Add arm.c/o.
4316 * configure.srv: Likewise.
4317 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
4318 (arm_breakpoint_kind_from_pc): New function.
4319 (arm_sw_breakpoint_from_kind): Return proper kind.
4320 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
4321
4322 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4323
4324 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
4325 removal.
4326 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
4327 (struct raw_breakpoint) <size>: Remove.
4328 (struct raw_breakpoint) <kind>: Add.
4329 (bp_size): New function.
4330 (bp_opcode): Likewise.
4331 (find_raw_breakpoint_at): Adjust for kind.
4332 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
4333 (remove_memory_breakpoint): Adjust for kind call bp_size.
4334 (set_raw_breakpoint_at): Adjust for kind.
4335 (set_breakpoint): Likewise.
4336 (set_breakpoint_at): Call breakpoint_kind_from_pc.
4337 (delete_raw_breakpoint): Adjust for kind.
4338 (delete_breakpoint): Likewise.
4339 (find_gdb_breakpoint): Likewise.
4340 (set_gdb_breakpoint_1): Likewise.
4341 (set_gdb_breakpoint): Likewise.
4342 (delete_gdb_breakpoint_1): Likewise.
4343 (delete_gdb_breakpoint): Likewise.
4344 (uninsert_raw_breakpoint): Likewise.
4345 (reinsert_raw_breakpoint): Likewise.
4346 (set_breakpoint_data): Remove.
4347 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
4348 (check_mem_read): Adjust for kind call bp_size.
4349 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
4350 (clone_one_breakpoint): Adjust for kind.
4351 * mem-break.h (set_gdb_breakpoint): Likewise.
4352 (delete_gdb_breakpoint): Likewise.
4353 * server.c (process_serial_event): Likewise.
4354
4355 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4356
4357 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
4358 (struct linux_target_ops) <breakpoint>: Remove.
4359 (struct linux_target_ops) <breakpoint_len>: Remove.
4360 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4361 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4362 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
4363 (arm_sw_breakpoint_from_kind): New function.
4364 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
4365 (struct linux_target_ops) <breakpoint>: Remove.
4366 (struct linux_target_ops) <breakpoint_len>: Remove.
4367 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4368 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4369 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
4370 (struct linux_target_ops) <breakpoint>: Remove.
4371 (struct linux_target_ops) <breakpoint_len>: Remove.
4372 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4373 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4374 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
4375 (struct linux_target_ops) <breakpoint>: Remove.
4376 (struct linux_target_ops) <breakpoint_len>: Remove.
4377 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4378 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4379 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
4380 and sw_breakpoint_from_kind to increment the pc.
4381 (linux_breakpoint_kind_from_pc): New function.
4382 (linux_sw_breakpoint_from_kind): New function.
4383 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
4384 (initialize_low): Call breakpoint_kind_from_pc and
4385 sw_breakpoint_from_kind to replace breakpoint_data/len.
4386 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
4387 New field.
4388 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
4389 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
4390 (struct linux_target_ops) <breakpoint>: Remove.
4391 (struct linux_target_ops) <breakpoint_len>: Remove.
4392 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4393 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4394 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
4395 (struct linux_target_ops) <breakpoint>: Remove.
4396 (struct linux_target_ops) <breakpoint_len>: Remove.
4397 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4398 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4399 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
4400 (struct linux_target_ops) <breakpoint>: Remove.
4401 (struct linux_target_ops) <breakpoint_len>: Remove.
4402 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4403 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4404 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
4405 (struct linux_target_ops) <breakpoint>: Remove.
4406 (struct linux_target_ops) <breakpoint_len>: Remove.
4407 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4408 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4409 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
4410 (struct linux_target_ops) <breakpoint>: Remove.
4411 (struct linux_target_ops) <breakpoint_len>: Remove.
4412 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4413 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4414 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
4415 (struct linux_target_ops) <breakpoint>: Remove.
4416 (struct linux_target_ops) <breakpoint_len>: Remove.
4417 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4418 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4419 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
4420 (struct linux_target_ops) <breakpoint>: Remove.
4421 (struct linux_target_ops) <breakpoint_len>: Remove.
4422 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4423 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4424 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
4425 (struct linux_target_ops) <breakpoint>: Remove.
4426 (struct linux_target_ops) <breakpoint_len>: Remove.
4427 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4428 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4429 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
4430 (struct linux_target_ops) <breakpoint>: Remove.
4431 (struct linux_target_ops) <breakpoint_len>: Remove.
4432 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4433 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4434 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
4435 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
4436 (struct linux_target_ops) <breakpoint>: Remove.
4437 (struct linux_target_ops) <breakpoint_len>: Remove.
4438 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4439 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4440 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
4441 (struct linux_target_ops) <breakpoint>: Remove.
4442 (struct linux_target_ops) <breakpoint_len>: Remove.
4443 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4444 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4445
4446 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4447
4448 * linux-cris-low.c (cris_get_pc): Remove void arg.
4449
4450 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
4451
4452 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
4453 variable name.
4454
4455 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
4456
4457 * inferiors.c (thread_pid_matches_callback): New function.
4458 (find_thread_process): New function.
4459 (remove_thread): Reset current_thread.
4460 (remove_process): Assert threads have been removed first.
4461
4462 2015-10-15 Yao Qi <yao.qi@linaro.org>
4463
4464 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
4465 if it is 3.
4466 (aarch64_remove_point): Likewise.
4467 * regcache.c (regcache_register_size): New function.
4468
4469 2015-10-12 Yao Qi <yao.qi@linaro.org>
4470
4471 * linux-aarch64-low.c: Update all callers as emit_load_store
4472 is renamed to aarch64_emit_load_store.
4473
4474 2015-10-12 Yao Qi <yao.qi@linaro.org>
4475
4476 * linux-aarch64-low.c: Update all callers of function renaming
4477 from emit_insn to aarch64_emit_insn.
4478
4479 2015-10-12 Yao Qi <yao.qi@linaro.org>
4480
4481 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
4482 arch/aarch64-insn.h.
4483 (struct aarch64_memory_operand): Likewise.
4484 (ENCODE): Likewise.
4485 (emit_insn): Move to arch/aarch64-insn.c.
4486 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
4487 (emit_load_store): Move to arch/aarch64-insn.c.
4488 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
4489 (can_encode_int32): Remove.
4490
4491 2015-10-12 Yao Qi <yao.qi@linaro.org>
4492
4493 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
4494 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
4495 (aarch64_relocate_instruction): Likewise.
4496 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
4497 (struct aarch64_insn_visitor): Likewise.
4498
4499 2015-10-12 Yao Qi <yao.qi@linaro.org>
4500
4501 * linux-aarch64-low.c (struct aarch64_insn_data): New.
4502 (struct aarch64_insn_visitor): New.
4503 (struct aarch64_insn_relocation_data): New.
4504 (aarch64_ftrace_insn_reloc_b): New function.
4505 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
4506 (aarch64_ftrace_insn_reloc_cb): Likewise.
4507 (aarch64_ftrace_insn_reloc_tb): Likewise.
4508 (aarch64_ftrace_insn_reloc_adr): Likewise.
4509 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
4510 (aarch64_ftrace_insn_reloc_others): Likewise.
4511 (visitor): New.
4512 (aarch64_relocate_instruction): Use visitor.
4513
4514 2015-10-12 Yao Qi <yao.qi@linaro.org>
4515
4516 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
4517 int. Add argument buf.
4518 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
4519 aarch64_relocate_instruction.
4520
4521 2015-10-12 Yao Qi <yao.qi@linaro.org>
4522
4523 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
4524 argument insn. Remove local variable insn. Don't call
4525 target_read_uint32.
4526 (aarch64_install_fast_tracepoint_jump_pad): Call
4527 target_read_uint32.
4528
4529 2015-09-30 Yao Qi <yao.qi@linaro.org>
4530
4531 * linux-aarch64-low.c (emit_movk): Shorten a long line.
4532 (emit_load_store_pair): Likewise.
4533
4534 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
4535
4536 * dll.c (match_dll): Add cast(s).
4537 (unloaded_dll): Likewise.
4538 * linux-low.c (second_thread_of_pid_p): Likewise.
4539 (delete_lwp_callback): Likewise.
4540 (count_events_callback): Likewise.
4541 (select_event_lwp_callback): Likewise.
4542 (linux_set_resume_request): Likewise.
4543 * server.c (accumulate_file_name_length): Likewise.
4544 (emit_dll_description): Likewise.
4545 (handle_qxfer_threads_worker): Likewise.
4546 (visit_actioned_threads): Likewise.
4547 * thread-db.c (any_thread_of): Likewise.
4548 * tracepoint.c (same_process_p): Likewise.
4549 (match_blocktype): Likewise.
4550 (build_traceframe_info_xml): Likewise.
4551
4552 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
4553
4554 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
4555 assignment.
4556 (gdb_unparse_agent_expr): Likewise.
4557 * hostio.c (require_data): Likewise.
4558 (handle_pread): Likewise.
4559 * linux-low.c (disable_regset): Likewise.
4560 (fetch_register): Likewise.
4561 (store_register): Likewise.
4562 (get_dynamic): Likewise.
4563 (linux_qxfer_libraries_svr4): Likewise.
4564 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
4565 (set_fast_tracepoint_jump): Likewise.
4566 (uninsert_fast_tracepoint_jumps_at): Likewise.
4567 (reinsert_fast_tracepoint_jumps_at): Likewise.
4568 (validate_inserted_breakpoint): Likewise.
4569 (clone_agent_expr): Likewise.
4570 * regcache.c (init_register_cache): Likewise.
4571 * remote-utils.c (putpkt_binary_1): Likewise.
4572 (decode_M_packet): Likewise.
4573 (decode_X_packet): Likewise.
4574 (look_up_one_symbol): Likewise.
4575 (relocate_instruction): Likewise.
4576 (monitor_output): Likewise.
4577 * server.c (handle_search_memory): Likewise.
4578 (handle_qxfer_exec_file): Likewise.
4579 (handle_qxfer_libraries): Likewise.
4580 (handle_qxfer): Likewise.
4581 (handle_query): Likewise.
4582 (handle_v_cont): Likewise.
4583 (handle_v_run): Likewise.
4584 (captured_main): Likewise.
4585 * target.c (write_inferior_memory): Likewise.
4586 * thread-db.c (try_thread_db_load_from_dir): Likewise.
4587 * tracepoint.c (init_trace_buffer): Likewise.
4588 (add_tracepoint_action): Likewise.
4589 (add_traceframe): Likewise.
4590 (add_traceframe_block): Likewise.
4591 (cmd_qtdpsrc): Likewise.
4592 (cmd_qtdv): Likewise.
4593 (cmd_qtstatus): Likewise.
4594 (response_source): Likewise.
4595 (response_tsv): Likewise.
4596 (cmd_qtnotes): Likewise.
4597 (gdb_collect): Likewise.
4598 (initialize_tracepoint): Likewise.
4599
4600 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
4601
4602 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
4603 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
4604 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
4605 <NOP>: New.
4606 (enum aarch64_condition_codes): New enum.
4607 (w0): New static global.
4608 (fp): Likewise.
4609 (lr): Likewise.
4610 (struct aarch64_memory_operand) <type>: New
4611 MEMORY_OPERAND_POSTINDEX type.
4612 (postindex_memory_operand): New helper function.
4613 (emit_ret): New function.
4614 (emit_load_store_pair): New function, factored out of emit_stp
4615 with support for MEMORY_OPERAND_POSTINDEX.
4616 (emit_stp): Rewrite using emit_load_store_pair.
4617 (emit_ldp): New function.
4618 (emit_load_store): Likewise.
4619 (emit_ldr): Mention post-index instruction in comment.
4620 (emit_ldrh): New function.
4621 (emit_ldrb): New function.
4622 (emit_ldrsw): Mention post-index instruction in comment.
4623 (emit_str): Likewise.
4624 (emit_subs): New function.
4625 (emit_cmp): Likewise.
4626 (emit_and): Likewise.
4627 (emit_orr): Likewise.
4628 (emit_orn): Likewise.
4629 (emit_eor): Likewise.
4630 (emit_mvn): Likewise.
4631 (emit_lslv): Likewise.
4632 (emit_lsrv): Likewise.
4633 (emit_asrv): Likewise.
4634 (emit_mul): Likewise.
4635 (emit_sbfm): Likewise.
4636 (emit_sbfx): Likewise.
4637 (emit_ubfm): Likewise.
4638 (emit_ubfx): Likewise.
4639 (emit_csinc): Likewise.
4640 (emit_cset): Likewise.
4641 (emit_nop): Likewise.
4642 (emit_ops_insns): New helper function.
4643 (emit_pop): Likewise.
4644 (emit_push): Likewise.
4645 (aarch64_emit_prologue): New function.
4646 (aarch64_emit_epilogue): Likewise.
4647 (aarch64_emit_add): Likewise.
4648 (aarch64_emit_sub): Likewise.
4649 (aarch64_emit_mul): Likewise.
4650 (aarch64_emit_lsh): Likewise.
4651 (aarch64_emit_rsh_signed): Likewise.
4652 (aarch64_emit_rsh_unsigned): Likewise.
4653 (aarch64_emit_ext): Likewise.
4654 (aarch64_emit_log_not): Likewise.
4655 (aarch64_emit_bit_and): Likewise.
4656 (aarch64_emit_bit_or): Likewise.
4657 (aarch64_emit_bit_xor): Likewise.
4658 (aarch64_emit_bit_not): Likewise.
4659 (aarch64_emit_equal): Likewise.
4660 (aarch64_emit_less_signed): Likewise.
4661 (aarch64_emit_less_unsigned): Likewise.
4662 (aarch64_emit_ref): Likewise.
4663 (aarch64_emit_if_goto): Likewise.
4664 (aarch64_emit_goto): Likewise.
4665 (aarch64_write_goto_address): Likewise.
4666 (aarch64_emit_const): Likewise.
4667 (aarch64_emit_call): Likewise.
4668 (aarch64_emit_reg): Likewise.
4669 (aarch64_emit_pop): Likewise.
4670 (aarch64_emit_stack_flush): Likewise.
4671 (aarch64_emit_zero_ext): Likewise.
4672 (aarch64_emit_swap): Likewise.
4673 (aarch64_emit_stack_adjust): Likewise.
4674 (aarch64_emit_int_call_1): Likewise.
4675 (aarch64_emit_void_call_2): Likewise.
4676 (aarch64_emit_eq_goto): Likewise.
4677 (aarch64_emit_ne_goto): Likewise.
4678 (aarch64_emit_lt_goto): Likewise.
4679 (aarch64_emit_le_goto): Likewise.
4680 (aarch64_emit_gt_goto): Likewise.
4681 (aarch64_emit_ge_got): Likewise.
4682 (aarch64_emit_ops_impl): New static global variable.
4683 (aarch64_emit_ops): New target function, return
4684 &aarch64_emit_ops_impl.
4685 (struct linux_target_ops): Install it.
4686
4687 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
4688
4689 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
4690 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
4691 aarch64-ipa.o.
4692 * linux-aarch64-ipa.c: New file.
4693 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
4694 and endian.h.
4695 (aarch64_get_thread_area): New target method.
4696 (extract_signed_bitfield): New helper function.
4697 (aarch64_decode_ldr_literal): New function.
4698 (enum aarch64_opcodes): New enum.
4699 (struct aarch64_register): New struct.
4700 (struct aarch64_operand): New struct.
4701 (x0): New static global.
4702 (x1): Likewise.
4703 (x2): Likewise.
4704 (x3): Likewise.
4705 (x4): Likewise.
4706 (w2): Likewise.
4707 (ip0): Likewise.
4708 (sp): Likewise.
4709 (xzr): Likewise.
4710 (aarch64_register): New helper function.
4711 (register_operand): Likewise.
4712 (immediate_operand): Likewise.
4713 (struct aarch64_memory_operand): New struct.
4714 (offset_memory_operand): New helper function.
4715 (preindex_memory_operand): Likewise.
4716 (enum aarch64_system_control_registers): New enum.
4717 (ENCODE): New macro.
4718 (emit_insn): New helper function.
4719 (emit_b): New function.
4720 (emit_bcond): Likewise.
4721 (emit_cb): Likewise.
4722 (emit_tb): Likewise.
4723 (emit_blr): Likewise.
4724 (emit_stp): Likewise.
4725 (emit_ldp_q_offset): Likewise.
4726 (emit_stp_q_offset): Likewise.
4727 (emit_load_store): Likewise.
4728 (emit_ldr): Likewise.
4729 (emit_ldrsw): Likewise.
4730 (emit_str): Likewise.
4731 (emit_ldaxr): Likewise.
4732 (emit_stxr): Likewise.
4733 (emit_stlr): Likewise.
4734 (emit_data_processing_reg): Likewise.
4735 (emit_data_processing): Likewise.
4736 (emit_add): Likewise.
4737 (emit_sub): Likewise.
4738 (emit_mov): Likewise.
4739 (emit_movk): Likewise.
4740 (emit_mov_addr): Likewise.
4741 (emit_mrs): Likewise.
4742 (emit_msr): Likewise.
4743 (emit_sevl): Likewise.
4744 (emit_wfe): Likewise.
4745 (append_insns): Likewise.
4746 (can_encode_int32_in): New helper function.
4747 (aarch64_relocate_instruction): New function.
4748 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
4749 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
4750 (struct linux_target_ops): Install aarch64_get_thread_area,
4751 aarch64_install_fast_tracepoint_jump_pad and
4752 aarch64_get_min_fast_tracepoint_insn_len.
4753
4754 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
4755
4756 * Makefile.in (aarch64-insn.o): New rule.
4757 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
4758
4759 2015-09-21 Yao Qi <yao.qi@linaro.org>
4760
4761 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
4762
4763 2015-09-21 Yao Qi <yao.qi@linaro.org>
4764
4765 * tracepoint.c (max_jump_pad_size): Remove.
4766
4767 2015-09-18 Yao Qi <yao.qi@linaro.org>
4768
4769 * linux-aarch64-low.c: Don't include sys/uio.h.
4770 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
4771
4772 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
4773
4774 * tracepoint.c (eval_result_type): Change prototype.
4775 (condition_true_at_tracepoint): Fix argument to compiled_cond.
4776
4777 2015-09-15 Pedro Alves <palves@redhat.com>
4778
4779 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
4780 Check whether to report exec events instead of checking whether
4781 multiprocess is enabled.
4782
4783 2015-09-15 Pedro Alves <palves@redhat.com>
4784
4785 PR remote/18965
4786 * remote-utils.c (prepare_resume_reply): Merge
4787 TARGET_WAITKIND_VFORK_DONE switch case with the
4788 TARGET_WAITKIND_FORKED case.
4789
4790 2015-09-15 Yao Qi <yao.qi@linaro.org>
4791
4792 * server.c (handle_query): Check string comparison using
4793 "else if" instead of "if".
4794
4795 2015-09-15 Yao Qi <yao.qi@linaro.org>
4796
4797 * server.c (vCont_supported): New global variable.
4798 (handle_query): Set vCont_supported to 1 if "vContSupported+"
4799 matches. Append ";vContSupported+" to own_buf.
4800 (handle_v_requests): Append ";s;S" to own_buf if target supports
4801 hardware single step or vCont_supported is false.
4802 (capture_main): Set vCont_supported to zero.
4803
4804 2015-09-15 Yao Qi <yao.qi@linaro.org>
4805
4806 * linux-low.c (linux_supports_conditional_breakpoints): Rename
4807 it to ...
4808 (linux_supports_hardware_single_step): ... New function.
4809 (linux_target_ops): Update.
4810 * lynx-low.c (lynx_target_ops): Set field
4811 supports_hardware_single_step to target_can_do_hardware_single_step.
4812 * nto-low.c (nto_target_ops): Likewise.
4813 * spu-low.c (spu_target_ops): Likewise.
4814 * win32-low.c (win32_target_ops): Likewise.
4815 * target.c (target_can_do_hardware_single_step): New function.
4816 * target.h (struct target_ops) <supports_conditional_breakpoints>:
4817 Remove. <supports_hardware_single_step>: New field.
4818 (target_supports_conditional_breakpoints): Remove.
4819 (target_supports_hardware_single_step): New macro.
4820 (target_can_do_hardware_single_step): Declare.
4821 * server.c (handle_query): Use target_supports_hardware_single_step
4822 instead of target_supports_conditional_breakpoints.
4823
4824 2015-09-15 Yao Qi <yao.qi@linaro.org>
4825
4826 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
4827 function.
4828 (struct linux_target_ops the_low_target): Install
4829 aarch64_linux_siginfo_fixup.
4830
4831 2015-09-11 Don Breazeal <donb@codesourcery.com>
4832 Luis Machado <lgustavo@codesourcery.com>
4833
4834 * linux-low.c (linux_mourn): Static declaration.
4835 (linux_arch_setup): Move in front of
4836 handle_extended_wait.
4837 (linux_arch_setup_thread): New function.
4838 (handle_extended_wait): Handle exec events. Call
4839 linux_arch_setup_thread. Make event_lwp argument a
4840 pointer-to-a-pointer.
4841 (check_zombie_leaders): Do not check stopped threads.
4842 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
4843 (linux_low_filter_event): Add lwp and thread for exec'ing
4844 non-leader thread if leader thread has been deleted.
4845 Refactor code into linux_arch_setup_thread and call it.
4846 Pass child lwp pointer by reference to handle_extended_wait.
4847 (linux_wait_for_event_filtered): Update comment.
4848 (linux_wait_1): Prevent clobbering exec event status.
4849 (linux_supports_exec_events): New function.
4850 (linux_target_ops) <supports_exec_events>: Initialize new member.
4851 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
4852 new member.
4853 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
4854 * server.c (report_exec_events): New global variable.
4855 (handle_query): Handle qSupported query for exec-events feature.
4856 (captured_main): Initialize report_exec_events.
4857 * server.h (report_exec_events): Declare new global variable.
4858 * target.h (struct target_ops) <supports_exec_events>: New
4859 member.
4860 (target_supports_exec_events): New macro.
4861 * win32-low.c (win32_target_ops) <supports_exec_events>:
4862 Initialize new member.
4863
4864 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
4865
4866 * linux-low.c (linux_low_enable_btrace): Remove.
4867 (linux_target_ops): Replace linux_low_enable_btrace with
4868 linux_enable_btrace.
4869
4870 2015-09-03 Yao Qi <yao.qi@linaro.org>
4871
4872 * linux-aarch64-low.c (aarch64_insert_point): Call
4873 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
4874 returns true.
4875
4876 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
4877
4878 * linux-low.c (check_stopped_by_breakpoint): Use
4879 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
4880
4881 2015-08-27 Pedro Alves <palves@redhat.com>
4882
4883 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
4884
4885 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
4886
4887 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
4888 the XNEW-family equivalent.
4889 (compile_bytecodes): Likewise.
4890 * dll.c (loaded_dll): Likewise.
4891 * event-loop.c (append_callback_event): Likewise.
4892 (create_file_handler): Likewise.
4893 (create_file_event): Likewise.
4894 * hostio.c (handle_open): Likewise.
4895 * inferiors.c (add_thread): Likewise.
4896 (add_process): Likewise.
4897 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
4898 * linux-arm-low.c (arm_new_process): Likewise.
4899 (arm_new_thread): Likewise.
4900 * linux-low.c (add_to_pid_list): Likewise.
4901 (linux_add_process): Likewise.
4902 (handle_extended_wait): Likewise.
4903 (add_lwp): Likewise.
4904 (enqueue_one_deferred_signal): Likewise.
4905 (enqueue_pending_signal): Likewise.
4906 (linux_resume_one_lwp_throw): Likewise.
4907 (linux_resume_one_thread): Likewise.
4908 (linux_read_memory): Likewise.
4909 (linux_write_memory): Likewise.
4910 * linux-mips-low.c (mips_linux_new_process): Likewise.
4911 (mips_linux_new_thread): Likewise.
4912 (mips_add_watchpoint): Likewise.
4913 * linux-x86-low.c (initialize_low_arch): Likewise.
4914 * lynx-low.c (lynx_add_process): Likewise.
4915 * mem-break.c (set_raw_breakpoint_at): Likewise.
4916 (set_breakpoint): Likewise.
4917 (add_condition_to_breakpoint): Likewise.
4918 (add_commands_to_breakpoint): Likewise.
4919 (clone_agent_expr): Likewise.
4920 (clone_one_breakpoint): Likewise.
4921 * regcache.c (new_register_cache): Likewise.
4922 * remote-utils.c (look_up_one_symbol): Likewise.
4923 * server.c (queue_stop_reply): Likewise.
4924 (start_inferior): Likewise.
4925 (queue_stop_reply_callback): Likewise.
4926 (handle_target_event): Likewise.
4927 * spu-low.c (fetch_ppc_memory): Likewise.
4928 (store_ppc_memory): Likewise.
4929 * target.c (set_target_ops): Likewise.
4930 * thread-db.c (thread_db_load_search): Likewise.
4931 (try_thread_db_load_1): Likewise.
4932 * tracepoint.c (add_tracepoint): Likewise.
4933 (add_tracepoint_action): Likewise.
4934 (create_trace_state_variable): Likewise.
4935 (cmd_qtdpsrc): Likewise.
4936 (cmd_qtro): Likewise.
4937 (add_while_stepping_state): Likewise.
4938 * win32-low.c (child_add_thread): Likewise.
4939 (get_image_name): Likewise.
4940
4941 2015-08-25 Yao Qi <yao.qi@linaro.org>
4942
4943 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
4944
4945 2015-08-25 Yao Qi <yao.qi@linaro.org>
4946
4947 * Makefile.in (aarch64-linux.o): New rule.
4948 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
4949 srv_tgtobj.
4950 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
4951 (aarch64_init_debug_reg_state): Make it extern.
4952 (aarch64_linux_prepare_to_resume): Remove.
4953
4954 2015-08-25 Yao Qi <yao.qi@linaro.org>
4955
4956 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
4957 lwp_arch_private_info and ptid_of_lwp.
4958
4959 2015-08-25 Yao Qi <yao.qi@linaro.org>
4960
4961 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
4962 Find proc_info by find_process_pid. All callers updated.
4963
4964 2015-08-25 Yao Qi <yao.qi@linaro.org>
4965
4966 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
4967 Remove.
4968 (debug_reg_change_callback): Remove.
4969 (aarch64_notify_debug_reg_change): Remove.
4970
4971 2015-08-25 Yao Qi <yao.qi@linaro.org>
4972
4973 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
4974 Call current_lwp_ptid.
4975
4976 2015-08-25 Yao Qi <yao.qi@linaro.org>
4977
4978 * linux-aarch64-low.c (debug_reg_change_callback): Use
4979 debug_printf.
4980
4981 2015-08-25 Yao Qi <yao.qi@linaro.org>
4982
4983 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
4984
4985 2015-08-25 Yao Qi <yao.qi@linaro.org>
4986
4987 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
4988
4989 2015-08-25 Yao Qi <yao.qi@linaro.org>
4990
4991 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
4992 the code.
4993
4994 2015-08-25 Yao Qi <yao.qi@linaro.org>
4995
4996 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
4997 Remove.
4998 (debug_reg_change_callback): Remove argument entry and add argument
4999 lwp. Remove local variable thread. Don't print thread id in the
5000 debugging output. Don't check whether pid of thread equals to pid.
5001 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
5002 iterate_over_lwps instead find_inferior.
5003
5004 2015-08-24 Pedro Alves <palves@redhat.com>
5005
5006 * inferiors.c (get_first_process): New function.
5007 * inferiors.h (get_first_process): New declaration.
5008 * remote-utils.c (read_ptid): Default to the first process in the
5009 list, instead of to the current thread's process.
5010
5011 2015-08-24 Pedro Alves <palves@redhat.com>
5012
5013 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
5014 * event-loop.c: Likewise.
5015 * remote-utils.c: Likewise.
5016 * tracepoint.c: Likewise.
5017
5018 2015-08-24 Pedro Alves <palves@redhat.com>
5019
5020 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
5021 ptid_get_lwp.
5022
5023 2015-08-21 Pedro Alves <palves@redhat.com>
5024
5025 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
5026 instead of literal 1.
5027
5028 2015-08-21 Pedro Alves <palves@redhat.com>
5029
5030 * tdesc.c (default_description): Explicitly zero-initialize.
5031
5032 2015-08-21 Pedro Alves <palves@redhat.com>
5033
5034 PR gdb/18749
5035 * inferiors.c (remove_thread): Discard any pending stop reply for
5036 this thread.
5037 * server.c (remove_all_on_match_pid): Rename to ...
5038 (remove_all_on_match_ptid): ... this. Work with a filter ptid
5039 instead of a pid.
5040 (discard_queued_stop_replies): Change parameter to a ptid. Now
5041 extern.
5042 (handle_v_kill, kill_inferior_callback, captured_main)
5043 (process_serial_event): Adjust.
5044 * server.h (discard_queued_stop_replies): Declare.
5045
5046 2015-08-21 Pedro Alves <palves@redhat.com>
5047
5048 * linux-low.c (wait_for_sigstop): Always switch to no thread
5049 selected if the previously current thread dies.
5050 * lynx-low.c (lynx_request_interrupt): Use the first thread's
5051 process instead of the current thread's.
5052 * remote-utils.c (input_interrupt): Don't check if there's no
5053 current thread.
5054 * server.c (gdb_read_memory, gdb_write_memory): If setting the
5055 current thread to the general thread fails, error out.
5056 (handle_qxfer_auxv, handle_qxfer_libraries)
5057 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
5058 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
5059 (handle_query): Check if there's a thread selected instead of
5060 checking whether there's any thread in the thread list.
5061 (handle_qxfer_threads, handle_qxfer_btrace)
5062 (handle_qxfer_btrace_conf): Don't error out early if there's no
5063 thread in the thread list.
5064 (handle_v_cont, myresume): Don't set the current thread to the
5065 continue thread.
5066 (process_serial_event) <Hg handling>: Also set thread_id if the
5067 previous general thread is still alive.
5068 (process_serial_event) <g/G handling>: If setting the current
5069 thread to the general thread fails, error out.
5070 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
5071 thread's lwp instead of the current thread's.
5072 * target.c (set_desired_thread): If the desired thread was not
5073 found, leave the current thread pointing to NULL. Return an int
5074 (boolean) indicating success.
5075 * target.h (set_desired_thread): Change return type to int.
5076
5077 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
5078
5079 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
5080 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
5081 #includes.
5082 (ps_get_thread_area): New function.
5083
5084 2015-08-19 Gary Benson <gbenson@redhat.com>
5085
5086 * hostio.c (handle_pread): Do not attempt to read more data
5087 than hostio_reply_with_data can fit in a packet.
5088
5089 2015-08-18 Joel Brobecker <brobecker@adacore.com>
5090
5091 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
5092
5093 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
5094
5095 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
5096
5097 2015-08-06 Pedro Alves <palves@redhat.com>
5098
5099 * tracepoint.c (expr_eval_result): Now an int.
5100
5101 2015-08-06 Pedro Alves <palves@redhat.com>
5102
5103 * gdbthread.h (struct regcache): Forward declare.
5104 (struct thread_info) <regcache_data>: Now a struct regcache
5105 pointer.
5106 * inferiors.c (inferior_regcache_data)
5107 (set_inferior_regcache_data): Now work with struct regcache
5108 pointers.
5109 * inferiors.h (struct regcache): Forward declare.
5110 (inferior_regcache_data, set_inferior_regcache_data): Now work
5111 with struct regcache pointers.
5112 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
5113 (free_register_cache_thread): Remove struct regcache pointer
5114 casts.
5115
5116 2015-08-06 Pedro Alves <palves@redhat.com>
5117
5118 * server.c (captured_main): On error, print the exception message
5119 to stderr, and if run_once is set, throw a quit.
5120
5121 2015-08-06 Pedro Alves <palves@redhat.com>
5122
5123 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
5124 the current thread.
5125
5126 2015-08-06 Pedro Alves <palves@redhat.com>
5127
5128 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
5129 reading beyond the passed in buffer length.
5130
5131 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
5132
5133 * tracepoint.c (symbol_list) <required>: Remove.
5134
5135 2015-08-06 Pedro Alves <palves@redhat.com>
5136
5137 * linux-low.c (handle_extended_wait): Set the fork child's suspend
5138 count if stopping and suspending threads.
5139 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
5140 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
5141 (linux_detach): Complete an ongoing step-over.
5142 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
5143 throughout.
5144 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
5145 (linux_wait_1): If passing a signal to the inferior after
5146 finishing a step-over, unsuspend and re-resume all lwps. If we
5147 see a single-step event but the thread should be continuing, don't
5148 pass the trap to gdb.
5149 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
5150 internal_error instead of gdb_assert.
5151 (enqueue_pending_signal): New function.
5152 (check_ptrace_stopped_lwp_gone): Add debug output.
5153 (start_step_over): Use internal_error instead of gdb_assert.
5154 (complete_ongoing_step_over): New function.
5155 (linux_resume_one_thread): Don't resume a suspended thread.
5156 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
5157 it stepping.
5158
5159 2015-08-06 Pedro Alves <palves@redhat.com>
5160
5161 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
5162 (linux_thread_alive): Use lwp_is_marked_dead.
5163 (extended_event_reported): Delete.
5164 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
5165 instead of extended_event_reported.
5166 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
5167 as well.
5168 (lwp_is_marked_dead): New function.
5169 (lwp_running): Use lwp_is_marked_dead.
5170 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
5171 comment.
5172
5173 2015-08-06 Pedro Alves <palves@redhat.com>
5174
5175 * linux-low.c (linux_wait_1): Move fork event output out of the
5176 !report_to_gdb check. Pass event_child->waitstatus to
5177 target_waitstatus_to_string instead of ourstatus.
5178
5179 2015-08-04 Yao Qi <yao.qi@linaro.org>
5180
5181 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
5182 if current_thread is 32 bit.
5183
5184 2015-08-04 Yao Qi <yao.qi@linaro.org>
5185
5186 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
5187 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
5188 * server.c (extended_protocol): Remove "static".
5189 * server.h (extended_protocol): Declare it.
5190
5191 2015-08-04 Yao Qi <yao.qi@linaro.org>
5192
5193 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
5194 both aarch64 and aarch32.
5195 (aarch64_set_pc): Likewise.
5196
5197 2015-08-04 Yao Qi <yao.qi@linaro.org>
5198
5199 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
5200 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
5201 arm-with-neon.xml to srv_xmlfiles.
5202 * linux-aarch64-low.c: Include linux-aarch32-low.h.
5203 (is_64bit_tdesc): New function.
5204 (aarch64_linux_read_description): New function.
5205 (aarch64_arch_setup): Call aarch64_linux_read_description.
5206 (regs_info): Rename to regs_info_aarch64.
5207 (aarch64_regs_info): Return right regs_info.
5208 (initialize_low_arch): Call initialize_low_arch_aarch32.
5209
5210 2015-08-04 Yao Qi <yao.qi@linaro.org>
5211
5212 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
5213 * linux-aarch32-low.c: New file.
5214 * linux-aarch32-low.h: New file.
5215 * linux-arm-low.c (arm_fill_gregset): Move it to
5216 linux-aarch32-low.c.
5217 (arm_store_gregset): Likewise.
5218 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
5219 (arm_store_vfpregset): Call arm_store_vfpregset_num.
5220 (arm_arch_setup): Check if PTRACE_GETREGSET works.
5221 (regs_info): Rename to regs_info_arm.
5222 (arm_regs_info): Return regs_info_aarch32 if
5223 have_ptrace_getregset is 1 and target description is
5224 arm_with_neon or arm_with_vfpv3.
5225 (initialize_low_arch): Don't call init_registers_arm_with_neon.
5226 Call initialize_low_arch_aarch32 instead.
5227
5228 2015-08-04 Yao Qi <yao.qi@linaro.org>
5229
5230 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
5231 * linux-low.c: ... here.
5232 * linux-low.h (have_ptrace_getregset): Declare it.
5233
5234 2015-08-04 Pedro Alves <palves@redhat.com>
5235
5236 * thread-db.c (struct thread_db): Use new typedefs.
5237 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
5238 CHK calls.
5239 (disable_thread_event_reporting): Cast result of dlsym to
5240 destination function pointer type.
5241 (thread_db_mourn): Use td_ta_delete_ftype.
5242
5243 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
5244
5245 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
5246 arch variant.
5247 (CDX_BREAKPOINT): Define for R2.
5248 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
5249 (the_low_target): Add comments.
5250
5251 2015-07-30 Yao Qi <yao.qi@linaro.org>
5252
5253 * linux-arm-low.c (arm_hwcap): Remove it.
5254 (arm_read_description): New local variable arm_hwcap. Don't
5255 set arm_hwcap to zero.
5256
5257 2015-07-30 Yao Qi <yao.qi@linaro.org>
5258
5259 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
5260 Use regcache->tdesc instead.
5261 (arm_store_wmmxregset): Likewise.
5262 (arm_fill_vfpregset): Likewise.
5263 (arm_store_vfpregset): Likewise.
5264
5265 2015-07-30 Yao Qi <yao.qi@linaro.org>
5266
5267 * linux-arm-low.c: Include arch/arm.h.
5268 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
5269 (arm_store_gregset): Likewise.
5270
5271 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
5272
5273 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
5274 ptrace's 4th parameter.
5275
5276 2015-07-27 Yao Qi <yao.qi@linaro.org>
5277
5278 * configure.srv (case aarch64*-*-linux*): Don't set
5279 srv_linux_usrregs.
5280
5281 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
5282
5283 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
5284 sys/ptrace.h.
5285 * linux-arm-low.c: Likewise.
5286 * linux-cris-low.c: Likewise.
5287 * linux-crisv32-low.c: Likewise.
5288 * linux-low.c: Likewise.
5289 * linux-m68k-low.c: Likewise.
5290 * linux-mips-low.c: Likewise.
5291 * linux-nios2-low.c: Likewise.
5292 * linux-s390-low.c: Likewise.
5293 * linux-sparc-low.c: Likewise.
5294 * linux-tic6x-low.c: Likewise.
5295 * linux-tile-low.c: Likewise.
5296 * linux-x86-low.c: Likewise.
5297
5298 2015-07-24 Pedro Alves <palves@redhat.com>
5299
5300 * config.in: Regenerate.
5301 * configure: Regenerate.
5302
5303 2015-07-24 Pedro Alves <palves@redhat.com>
5304
5305 * acinclude.m4: Include ../ptrace.m4.
5306 * configure.ac: Call GDB_AC_PTRACE.
5307 * config.in, configure: Regenerate.
5308
5309 2015-07-24 Yao Qi <yao.qi@linaro.org>
5310
5311 * linux-low.c (linux_create_inferior): Remove setting to
5312 proc->priv->new_inferior.
5313 (linux_attach): Likewise.
5314 (linux_low_filter_event): Likewise.
5315 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
5316
5317 2015-07-24 Yao Qi <yao.qi@linaro.org>
5318
5319 * linux-low.c (linux_arch_setup): New function.
5320 (linux_low_filter_event): If proc->tdesc is NULL and
5321 proc->attached is true, call the_low_target.arch_setup.
5322 Otherwise, keep status pending, and return.
5323 (linux_resume_one_lwp_throw): Don't call get_pc if
5324 thread->while_stepping isn't NULL. Don't call
5325 get_thread_regcache if proc->tdesc is NULL.
5326 (need_step_over_p): Return 0 if proc->tdesc is NULL.
5327 (linux_target_ops): Install arch_setup.
5328 * server.c (start_inferior): Call the_target->arch_setup.
5329 * target.h (struct target_ops) <arch_setup>: New field.
5330 (target_arch_setup): New marco.
5331 * lynx-low.c (lynx_target_ops): Update.
5332 * nto-low.c (nto_target_ops): Update.
5333 * spu-low.c (spu_target_ops): Update.
5334 * win32-low.c (win32_target_ops): Update.
5335
5336 2015-07-24 Yao Qi <yao.qi@linaro.org>
5337
5338 * linux-low.c (linux_add_process): Don't set
5339 proc->priv->new_inferior.
5340 (linux_create_inferior): Set proc->priv->new_inferior to 1.
5341 (linux_attach): Likewise.
5342
5343 2015-07-24 Yao Qi <yao.qi@linaro.org>
5344
5345 * server.c (start_inferior): Code refactor.
5346
5347 2015-07-24 Yao Qi <yao.qi@linaro.org>
5348
5349 * server.c (process_serial_event): Set general_thread.
5350
5351 2015-07-21 Yao Qi <yao.qi@linaro.org>
5352
5353 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
5354 aarch64_linux_get_debug_reg_capacity.
5355
5356 2015-07-17 Yao Qi <yao.qi@linaro.org>
5357
5358 * Makefile.in (aarch64-linux-hw-point.o): New rule.
5359 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
5360 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
5361 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
5362 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
5363 (AARCH64_HWP_ALIGNMENT): Likewise.
5364 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
5365 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
5366 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
5367 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
5368 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
5369 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
5370 (struct aarch64_debug_reg_state): Likewise.
5371 (struct arch_lwp_info): Likewise.
5372 (aarch64_align_watchpoint): Likewise.
5373 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
5374 (aarch64_watchpoint_length): Likewise.
5375 (aarch64_point_encode_ctrl_reg): Likewise
5376 (aarch64_point_is_aligned): Likewise.
5377 (aarch64_align_watchpoint): Likewise.
5378 (aarch64_linux_set_debug_regs):
5379 (aarch64_dr_state_insert_one_point): Likewise.
5380 (aarch64_dr_state_remove_one_point): Likewise.
5381 (aarch64_handle_breakpoint): Likewise.
5382 (aarch64_handle_aligned_watchpoint): Likewise.
5383 (aarch64_handle_unaligned_watchpoint): Likewise.
5384 (aarch64_handle_watchpoint): Likewise.
5385
5386 2015-07-17 Yao Qi <yao.qi@linaro.org>
5387
5388 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
5389 and don't aarch64_get_debug_reg_state. All callers update.
5390 (aarch64_handle_aligned_watchpoint): Likewise.
5391 (aarch64_handle_unaligned_watchpoint): Likewise.
5392 (aarch64_handle_watchpoint): Likewise.
5393 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
5394 (aarch64_remove_point): Likewise.
5395
5396 2015-07-17 Yao Qi <yao.qi@linaro.org>
5397
5398 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
5399 debug_printf.
5400 (aarch64_handle_unaligned_watchpoint): Likewise.
5401
5402 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
5403
5404 Revert the previous 3 commits:
5405 Move gdb_regex* to common/
5406 Move linux_find_memory_regions_full & co.
5407 gdbserver build-id attribute generator
5408
5409 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
5410 Jan Kratochvil <jan.kratochvil@redhat.com>
5411
5412 gdbserver build-id attribute generator.
5413 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
5414 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
5415 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
5416 (find_phdr): New.
5417 (get_dynamic): Use find_pdhr to traverse program headers.
5418 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
5419 (compare_mapping_entry_range, struct find_memory_region_callback_data)
5420 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
5421 (get_hex_build_id): New.
5422 (linux_qxfer_libraries_svr4): Add optional build-id attribute
5423 to reply XML document.
5424
5425 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
5426 Jan Kratochvil <jan.kratochvil@redhat.com>
5427
5428 * target.c: Include target/target-utils.h and fcntl.h.
5429 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
5430 (target_fileio_read_stralloc): New functions.
5431
5432 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
5433
5434 * Makefile.in (OBS): Add gdb_regex.o.
5435 (gdb_regex.o): New.
5436 * config.in: Rebuilt.
5437 * configure: Rebuilt.
5438
5439 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
5440 Jan Kratochvil <jan.kratochvil@redhat.com>
5441
5442 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
5443 * Makefile.in (OBS): Add target-utils.o.
5444 (linux-maps.o, target-utils.o): New.
5445 * configure.srv (srv_linux_obj): Add linux-maps.o.
5446
5447 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
5448
5449 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
5450 function, return 1.
5451 (the_low_target): Install it.
5452
5453 2015-07-14 Pedro Alves <palves@redhat.com>
5454
5455 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
5456 Instead, ignore ECHILD, and throw an error for other errnos.
5457
5458 2015-07-10 Pedro Alves <palves@redhat.com>
5459
5460 * event-loop.c (struct callback_event) <data>: Change type to
5461 gdb_client_data instance instead of gdb_client_data pointer.
5462 (append_callback_event): Adjust.
5463
5464 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
5465
5466 * linux-aarch64-low.c: Add comments for each linux_target_ops
5467 method. Remove comments already covered in target_ops and
5468 linux_target_ops definitions.
5469 (the_low_target): Add comments for each unimplemented method.
5470
5471 2015-07-09 Yao Qi <yao.qi@linaro.org>
5472
5473 * linux-aarch64-low.c (aarch64_regmap): Remove.
5474 (aarch64_usrregs_info): Remove.
5475 (regs_info): Set field usrregs to NULL.
5476
5477 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
5478
5479 * linux-low.c: Include "rsp-low.h"
5480 (linux_low_encode_pt_config, linux_low_encode_raw): New.
5481 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
5482 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
5483 (handle_btrace_enable_pt): New.
5484 (handle_btrace_general_set): Support "pt".
5485 (handle_btrace_conf_general_set): Support "pt:size".
5486
5487 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
5488
5489 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
5490 Z_PACKET_SW_BP.
5491
5492 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
5493
5494 * linux-aarch64-low.c: Remove comment about endianness.
5495 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
5496 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
5497 memcmp.
5498
5499 2015-06-24 Gary Benson <gbenson@redhat.com>
5500
5501 * linux-i386-ipa.c (stdint.h): Do not include.
5502 * lynx-i386-low.c (stdint.h): Likewise.
5503 * lynx-ppc-low.c (stdint.h): Likewise.
5504 * mem-break.c (stdint.h): Likewise.
5505 * thread-db.c (stdint.h): Likewise.
5506 * tracepoint.c (stdint.h): Likewise.
5507 * win32-low.c (stdint.h): Likewise.
5508
5509 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
5510
5511 * server.c (write_qxfer_response): Update call to
5512 remote_escape_output.
5513
5514 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
5515 Jan Kratochvil <jan.kratochvil@redhat.com>
5516
5517 Merge multiple hex conversions.
5518 * gdbreplay.c (tohex): Rename to 'fromhex'.
5519 (logchar): Use fromhex.
5520
5521 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
5522
5523 * server.c (handle_qxfer_libraries): Set `version' attribute for
5524 <library-list>.
5525
5526 2015-06-10 Gary Benson <gbenson@redhat.com>
5527
5528 * target.h (struct target_ops) <multifs_open>: New field.
5529 <multifs_unlink>: Likewise.
5530 <multifs_readlink>: Likewise.
5531 * linux-low.c (nat/linux-namespaces.h): New include.
5532 (linux_target_ops): Initialize the_target->multifs_open,
5533 the_target->multifs_unlink and the_target->multifs_readlink.
5534 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
5535 * hostio.c (hostio_fs_pid): New static variable.
5536 (hostio_handle_new_gdb_connection): New function.
5537 (handle_setfs): Likewise.
5538 (handle_open): Use the_target->multifs_open as appropriate.
5539 (handle_unlink): Use the_target->multifs_unlink as appropriate.
5540 (handle_readlink): Use the_target->multifs_readlink as
5541 appropriate.
5542 (handle_vFile): Handle vFile:setfs packets.
5543 * server.c (handle_query): Call hostio_handle_new_gdb_connection
5544 after target_handle_new_gdb_connection.
5545
5546 2015-06-10 Gary Benson <gbenson@redhat.com>
5547
5548 * configure.ac (AC_CHECK_FUNCS): Add setns.
5549 * config.in: Regenerate.
5550 * configure: Likewise.
5551 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
5552 (linux-namespaces.o): New rule.
5553 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
5554
5555 2015-06-09 Gary Benson <gbenson@redhat.com>
5556
5557 * hostio.c (handle_open): Process mode argument with
5558 fileio_to_host_mode.
5559
5560 2015-06-01 Yao Qi <yao.qi@linaro.org>
5561
5562 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
5563 * linux-x86-low.c: Likewise.
5564
5565 2015-05-28 Don Breazeal <donb@codesourcery.com>
5566
5567 * linux-low.c (handle_extended_wait): Initialize
5568 thread_info.last_resume_kind for new fork children.
5569
5570 2015-05-15 Pedro Alves <palves@redhat.com>
5571
5572 * target.h (target_handle_new_gdb_connection): Rewrite using if
5573 wrapped in do/while.
5574
5575 2015-05-14 Joel Brobecker <brobecker@adacore.com>
5576
5577 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
5578 * configure, config.in: Regenerate.
5579 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
5580 Declare typedef.
5581
5582 2015-05-12 Don Breazeal <donb@codesourcery.com>
5583
5584 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
5585 PTRACE_EVENT_VFORK_DONE.
5586 (linux_low_ptrace_options, extended_event_reported): Add vfork
5587 events.
5588 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
5589 and "vforkdone" for RSP 'T' Stop Reply Packet.
5590 * server.h (report_vfork_events): Declare
5591 global variable.
5592
5593 2015-05-12 Don Breazeal <donb@codesourcery.com>
5594
5595 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
5596 (the_low_target) <new_fork>: Initialize new member.
5597 * linux-arm-low.c (arm_new_fork): New function.
5598 (the_low_target) <new_fork>: Initialize new member.
5599 * linux-low.c (handle_extended_wait): Call new target function
5600 new_fork.
5601 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
5602 * linux-mips-low.c (mips_add_watchpoint): New function
5603 extracted from mips_insert_point.
5604 (the_low_target) <new_fork>: Initialize new member.
5605 (mips_linux_new_fork): New function.
5606 (mips_insert_point): Call mips_add_watchpoint.
5607 * linux-x86-low.c (x86_linux_new_fork): New function.
5608 (the_low_target) <new_fork>: Initialize new member.
5609
5610 2015-05-12 Don Breazeal <donb@codesourcery.com>
5611
5612 * linux-low.c (handle_extended_wait): Implement return value,
5613 rename argument 'event_child' to 'event_lwp', handle
5614 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
5615 (linux_low_ptrace_options): New function.
5616 (linux_low_filter_event): Call linux_low_ptrace_options,
5617 use different argument fo linux_enable_event_reporting,
5618 use return value from handle_extended_wait.
5619 (extended_event_reported): New function.
5620 (linux_wait_1): Call extended_event_reported and set
5621 status to report fork events.
5622 (linux_write_memory): Add pid to debug message.
5623 (reset_lwp_ptrace_options_callback): New function.
5624 (linux_handle_new_gdb_connection): New function.
5625 (linux_target_ops): Initialize new structure member.
5626 * linux-low.h (struct lwp_info) <waitstatus>: New member.
5627 * lynx-low.c: Initialize new structure member.
5628 * remote-utils.c (prepare_resume_reply): Implement stop reason
5629 "fork" for "T" stop message.
5630 * server.c (handle_query): Call handle_new_gdb_connection.
5631 * server.h (report_fork_events): Declare global flag.
5632 * target.h (struct target_ops) <handle_new_gdb_connection>:
5633 New member.
5634 (target_handle_new_gdb_connection): New macro.
5635 * win32-low.c: Initialize new structure member.
5636
5637 2015-05-12 Don Breazeal <donb@codesourcery.com>
5638
5639 * mem-break.c (APPEND_TO_LIST): Define macro.
5640 (clone_agent_expr): New function.
5641 (clone_one_breakpoint): New function.
5642 (clone_all_breakpoints): New function.
5643 * mem-break.h: Declare new functions.
5644
5645 2015-05-12 Don Breazeal <donb@codesourcery.com>
5646
5647 * linux-low.c (linux_supports_fork_events): New function.
5648 (linux_supports_vfork_events): New function.
5649 (linux_target_ops): Initialize new structure members.
5650 (initialize_low): Call linux_check_ptrace_features.
5651 * lynx-low.c (lynx_target_ops): Initialize new structure
5652 members.
5653 * server.c (report_fork_events, report_vfork_events):
5654 New global flags.
5655 (handle_query): Add new features to qSupported packet and
5656 response.
5657 (captured_main): Initialize new global variables.
5658 * target.h (struct target_ops) <supports_fork_events>:
5659 New member.
5660 <supports_vfork_events>: New member.
5661 (target_supports_fork_events): New macro.
5662 (target_supports_vfork_events): New macro.
5663 * win32-low.c (win32_target_ops): Initialize new structure
5664 members.
5665
5666 2015-05-12 Gary Benson <gbenson@redhat.com>
5667
5668 * server.c (handle_qxfer_exec_file): Use current process
5669 if annex is empty.
5670
5671 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
5672
5673 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
5674 Remove HAVE_PTRACE_GETREGS conditionals.
5675 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
5676 instead of PTRACE_GETREGS and PTRACE_SETREGS.
5677
5678 2015-05-08 Yao Qi <yao.qi@linaro.org>
5679
5680 * linux-low.c (linux_supports_conditional_breakpoints): New
5681 function.
5682 (linux_target_ops): Install new target method.
5683 * lynx-low.c (lynx_target_ops): Install NULL hook for
5684 supports_conditional_breakpoints.
5685 * nto-low.c (nto_target_ops): Likewise.
5686 * spu-low.c (spu_target_ops): Likewise.
5687 * win32-low.c (win32_target_ops): Likewise.
5688 * server.c (handle_query): Check
5689 target_supports_conditional_breakpoints.
5690 * target.h (struct target_ops) <supports_conditional_breakpoints>:
5691 New field.
5692 (target_supports_conditional_breakpoints): New macro.
5693
5694 2015-05-06 Pedro Alves <palves@redhat.com>
5695
5696 PR server/18081
5697 * server.c (start_inferior): If the process exits, mourn it.
5698
5699 2015-04-21 Gary Benson <gbenson@redhat.com>
5700
5701 * hostio.c (fileio_open_flags_to_host): Factored out to
5702 fileio_to_host_openflags in common/fileio.c. Single use
5703 updated.
5704
5705 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
5706
5707 * linux-xtensa-low.c (xtensa_fill_gregset)
5708 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
5709 XCHAL_HAVE_LOOP.
5710
5711 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
5712
5713 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
5714 (regs_info): Replace usrregs pointer with NULL.
5715
5716 2015-04-17 Gary Benson <gbenson@redhat.com>
5717
5718 * target.h (struct target_ops) <pid_to_exec_file>: New field.
5719 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
5720 * server.c (handle_qxfer_exec_file): New function.
5721 (qxfer_packets): Add exec-file entry.
5722 (handle_query): Report qXfer:exec-file:read as supported packet.
5723
5724 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
5725
5726 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
5727
5728 2015-04-09 Gary Benson <gbenson@redhat.com>
5729
5730 * hostio-errno.c (errno_to_fileio_error): Remove function.
5731 Update caller to use remote_fileio_to_fio_error.
5732
5733 2015-04-09 Yao Qi <yao.qi@linaro.org>
5734
5735 * linux-low.c (linux_insert_point): Call
5736 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
5737 (linux_remove_point): Call remove_memory_breakpoint if type is
5738 raw_bkpt_type_sw.
5739 * linux-x86-low.c (x86_insert_point): Don't call
5740 insert_memory_breakpoint.
5741 (x86_remove_point): Don't call remove_memory_breakpoint.
5742
5743 2015-04-01 Pedro Alves <palves@redhat.com>
5744 Cleber Rosa <crosa@redhat.com>
5745
5746 * server.c (gdbserver_usage): Reorganize and extend the usage
5747 message.
5748
5749 2015-03-24 Pedro Alves <palves@redhat.com>
5750
5751 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
5752 output. Also dump TRAP_TRACE.
5753 (linux_low_filter_event): In debug output, distinguish a
5754 resume_stop SIGSTOP from a delayed SIGSTOP.
5755
5756 2015-03-24 Gary Benson <gbenson@redhat.com>
5757
5758 * linux-x86-low.c (x86_linux_new_thread): Moved to
5759 nat/x86-linux.c.
5760 (x86_linux_prepare_to_resume): Likewise.
5761
5762 2015-03-24 Gary Benson <gbenson@redhat.com>
5763
5764 * Makefile.in (x86-linux-dregs.o): New rule.
5765 * configure.srv: Add x86-linux-dregs.o to relevant targets.
5766 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
5767 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
5768 (x86_linux_dr_get): Likewise.
5769 (x86_linux_dr_set): Likewise.
5770 (update_debug_registers_callback): Likewise.
5771 (x86_linux_dr_set_addr): Likewise.
5772 (x86_linux_dr_get_addr): Likewise.
5773 (x86_linux_dr_set_control): Likewise.
5774 (x86_linux_dr_get_control): Likewise.
5775 (x86_linux_dr_get_status): Likewise.
5776 (x86_linux_update_debug_registers): Likewise.
5777
5778 2015-03-24 Gary Benson <gbenson@redhat.com>
5779
5780 * linux-x86-low.c (x86_linux_update_debug_registers):
5781 New function, factored out from...
5782 (x86_linux_prepare_to_resume): ...this.
5783
5784 2015-03-24 Gary Benson <gbenson@redhat.com>
5785
5786 * linux-x86-low.c (x86_linux_dr_get): Update comments.
5787 (x86_linux_dr_set): Likewise.
5788 (update_debug_registers_callback): Likewise.
5789 (x86_linux_dr_set_addr): Likewise.
5790 (x86_linux_dr_get_addr): Likewise.
5791 (x86_linux_dr_set_control): Likewise.
5792 (x86_linux_dr_get_control): Likewise.
5793 (x86_linux_dr_get_status): Likewise.
5794 (x86_linux_prepare_to_resume): Likewise.
5795
5796 2015-03-24 Gary Benson <gbenson@redhat.com>
5797
5798 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
5799 Use perror_with_name. Pass string through gettext.
5800 (x86_linux_dr_set): Likewise.
5801
5802 2015-03-24 Gary Benson <gbenson@redhat.com>
5803
5804 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
5805 (x86_linux_dr_set_addr): ...this.
5806 (x86_dr_low_get_addr): Rename to...
5807 (x86_linux_dr_get_addr): ...this.
5808 (x86_dr_low_set_control): Rename to...
5809 (x86_linux_dr_set_control): ...this.
5810 (x86_dr_low_get_control): Rename to...
5811 (x86_linux_dr_get_control): ...this.
5812 (x86_dr_low_get_status): Rename to...
5813 (x86_linux_dr_get_status): ...this.
5814 (x86_dr_low): Update with new function names.
5815
5816 2015-03-24 Gary Benson <gbenson@redhat.com>
5817
5818 * Makefile.in (x86-linux.o): New rule.
5819 * configure.srv: Add x86-linux.o to relevant targets.
5820 * linux-low.c (lwp_set_arch_private_info): New function.
5821 (lwp_arch_private_info): Likewise.
5822 * linux-x86-low.c: Include nat/x86-linux.h.
5823 (arch_lwp_info): Removed structure.
5824 (update_debug_registers_callback):
5825 Use lwp_set_debug_registers_changed.
5826 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
5827 and lwp_set_debug_registers_changed.
5828 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
5829
5830 2015-03-24 Gary Benson <gbenson@redhat.com>
5831
5832 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
5833 * linux-arm-low.c (arm_new_thread): Likewise.
5834 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
5835 * linux-mips-low.c (mips_linux_new_thread): Likewise.
5836 * linux-x86-low.c (x86_linux_new_thread): Likewise.
5837 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
5838
5839 2015-03-24 Gary Benson <gbenson@redhat.com>
5840
5841 * linux-low.c (ptid_of_lwp): New function.
5842 (lwp_is_stopped): Likewise.
5843 (lwp_stop_reason): Likewise.
5844 * linux-x86-low.c (update_debug_registers_callback):
5845 Use lwp_is_stopped.
5846 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
5847 lwp_stop_reason.
5848
5849 2015-03-24 Gary Benson <gbenson@redhat.com>
5850
5851 * linux-low.h (linux_stop_lwp): Remove declaration.
5852
5853 2015-03-24 Gary Benson <gbenson@redhat.com>
5854
5855 * linux-low.h: Include nat/linux-nat.h.
5856 * linux-low.c (iterate_over_lwps_args): New structure.
5857 (iterate_over_lwps_filter): New function.
5858 (iterate_over_lwps): Likewise.
5859 * linux-x86-low.c (update_debug_registers_callback):
5860 Update signature to what iterate_over_lwps expects.
5861 Remove PID check that iterate_over_lwps now performs.
5862 (x86_dr_low_set_addr): Use iterate_over_lwps.
5863 (x86_dr_low_set_control): Likewise.
5864
5865 2015-03-24 Gary Benson <gbenson@redhat.com>
5866
5867 * linux-x86-low.c (x86_debug_reg_state): New function.
5868 (x86_linux_prepare_to_resume): Use the above.
5869
5870 2015-03-24 Gary Benson <gbenson@redhat.com>
5871
5872 * linux-low.c (current_lwp_ptid): New function.
5873 * linux-x86-low.c: Include nat/linux-nat.h.
5874 (x86_dr_low_get_addr): Use current_lwp_ptid.
5875 (x86_dr_low_get_control): Likewise.
5876 (x86_dr_low_get_status): Likewise.
5877
5878 2015-03-20 Pedro Alves <palves@redhat.com>
5879
5880 * tracepoint.c (cmd_qtstatus): Make "str" const.
5881
5882 2015-03-20 Pedro Alves <palves@redhat.com>
5883
5884 * server.c (handle_general_set): Make "req_str" const.
5885
5886 2015-03-19 Pedro Alves <palves@redhat.com>
5887
5888 * linux-low.c (linux_resume_one_lwp): Rename to ...
5889 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
5890 instead call perror_with_name.
5891 (check_ptrace_stopped_lwp_gone): New function.
5892 (linux_resume_one_lwp): Reimplement as wrapper around
5893 linux_resume_one_lwp_throw that swallows errors if the LWP is
5894 gone.
5895
5896 2015-03-19 Pedro Alves <palves@redhat.com>
5897
5898 * linux-low.c (count_events_callback, select_event_lwp_callback):
5899 No longer check whether the thread has resume_stop as last resume
5900 kind.
5901
5902 2015-03-19 Pedro Alves <palves@redhat.com>
5903
5904 * linux-low.c (count_events_callback, select_event_lwp_callback):
5905 Use the lwp's status_pending_p field, not the thread's.
5906
5907 2015-03-19 Pedro Alves <palves@redhat.com>
5908
5909 * linux-low.c (select_event_lwp_callback): Update comments to
5910 no longer mention SIGTRAP.
5911
5912 2015-03-18 Gary Benson <gbenson@redhat.com>
5913
5914 * server.c (handle_query): Do not report vFile:fstat as supported.
5915
5916 2015-03-11 Gary Benson <gbenson@redhat.com>
5917
5918 * hostio.c (sys/types.h): New include.
5919 (sys/stat.h): Likewise.
5920 (common-remote-fileio.h): Likewise.
5921 (handle_fstat): New function.
5922 (handle_vFile): Handle vFile:fstat packets.
5923
5924 2015-03-11 Gary Benson <gbenson@redhat.com>
5925
5926 * configure.ac (AC_CHECK_MEMBERS): Add checks for
5927 struct stat.st_blocks and struct stat.st_blksize.
5928 * configure: Regenerate.
5929 * config.in: Likewise.
5930 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
5931 (OBS): Add common-remote-fileio.o.
5932 (common-remote-fileio.o): New rule.
5933
5934 2015-03-09 Pedro Alves <palves@redhat.com>
5935
5936 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
5937 'struct sockaddr' pointer in 'accept' call.
5938
5939 2015-03-09 Pedro Alves <palves@redhat.com>
5940
5941 Revert:
5942 2015-03-07 Pedro Alves <palves@redhat.com>
5943 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
5944 or <winsock2.h> here. Instead include "gdb_socket.h".
5945 (remote_open): Use union gdb_sockaddr_u.
5946 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
5947 or <winsock2.h> here. Instead include "gdb_socket.h".
5948 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
5949 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
5950 or <sys/un.h>.
5951 (init_named_socket, gdb_agent_helper_thread): Use union
5952 gdb_sockaddr_u.
5953
5954 2015-03-07 Pedro Alves <palves@redhat.com>
5955
5956 * configure.ac (build_warnings): Move
5957 -Wdeclaration-after-statement to the C-specific set.
5958 * configure: Regenerate.
5959
5960 2015-03-07 Pedro Alves <palves@redhat.com>
5961
5962 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
5963 or <winsock2.h> here. Instead include "gdb_socket.h".
5964 (remote_open): Use union gdb_sockaddr_u.
5965 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
5966 or <winsock2.h> here. Instead include "gdb_socket.h".
5967 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
5968 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
5969 or <sys/un.h>.
5970 (init_named_socket, gdb_agent_helper_thread): Use union
5971 gdb_sockaddr_u.
5972
5973 2015-03-07 Pedro Alves <palves@redhat.com>
5974
5975 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
5976 instead.
5977
5978 2015-03-06 Yao Qi <yao.qi@linaro.org>
5979
5980 * linux-aarch64-low.c (aarch64_insert_point): Use
5981 show_debug_regs as a boolean.
5982 (aarch64_remove_point): Likewise.
5983
5984 2015-03-05 Pedro Alves <palves@redhat.com>
5985
5986 * lynx-low.c (lynx_target_ops): Install NULL hooks for
5987 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
5988 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
5989 * nto-low.c (nto_target_ops): Likewise.
5990 * spu-low.c (spu_target_ops): Likewise.
5991 * win32-low.c (win32_target_ops): Likewise.
5992
5993 2015-03-04 Pedro Alves <palves@redhat.com>
5994
5995 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
5996 Decide whether a breakpoint triggered based on the SIGTRAP's
5997 siginfo.si_code.
5998 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
5999 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
6000 (linux_low_filter_event): Check for breakpoints before checking
6001 watchpoints.
6002 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
6003 siginfo.si_code.
6004 (linux_stopped_by_sw_breakpoint)
6005 (linux_supports_stopped_by_sw_breakpoint)
6006 (linux_stopped_by_hw_breakpoint)
6007 (linux_supports_stopped_by_hw_breakpoint): New functions.
6008 (linux_target_ops): Install new target methods.
6009
6010 2015-03-04 Pedro Alves <palves@redhat.com>
6011
6012 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
6013 * server.c (swbreak_feature, hwbreak_feature): New globals.
6014 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
6015 (captured_main): Clear swbreak_feature and hwbreak_feature.
6016 * server.h (swbreak_feature, hwbreak_feature): Declare.
6017 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
6018 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
6019 supports_stopped_by_hw_breakpoint>: New fields.
6020 (target_supports_stopped_by_sw_breakpoint)
6021 (target_stopped_by_sw_breakpoint)
6022 (target_supports_stopped_by_hw_breakpoint)
6023 (target_stopped_by_hw_breakpoint): Declare.
6024
6025 2015-03-04 Pedro Alves <palves@redhat.com>
6026
6027 enum lwp_stop_reason -> enum target_stop_reason
6028 * linux-low.c (check_stopped_by_breakpoint): Adjust.
6029 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
6030 (linux_wait_1, stuck_in_jump_pad_callback)
6031 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
6032 (linux_stopped_by_watchpoint):
6033 * linux-low.h (enum lwp_stop_reason): Delete.
6034 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
6035 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
6036
6037 2015-03-04 Yao Qi <yao.qi@linaro.org>
6038
6039 * Makefile.in (SFILES): Add linux-aarch64-low.c.
6040
6041 2015-03-03 Gary Benson <gbenson@redhat.com>
6042
6043 * hostio.c (handle_vFile): Fix prefix lengths.
6044
6045 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
6046
6047 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
6048 ptr_bits.
6049
6050 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
6051
6052 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
6053 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
6054 (clean): Add "rm -f" for above C files.
6055 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
6056 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
6057 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
6058 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
6059 * linux-s390-low.c (HWCAP_S390_VX): New macro.
6060 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
6061 (init_registers_s390x_vx_linux64)
6062 (init_registers_s390x_tevx_linux64)
6063 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
6064 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
6065 declarations.
6066 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
6067 (s390_store_vxrs_high): New functions.
6068 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
6069 NT_S390_VXRS_HIGH.
6070 (s390_arch_setup): Add logic for selecting one of the new target
6071 descriptions. Activate the new vector regsets if applicable.
6072 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
6073 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
6074 and init_registers_s390x_tevx_linux64.
6075
6076 2015-03-01 Pedro Alves <palves@redhat.com>
6077
6078 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
6079 parameter.
6080
6081 2015-02-27 Pedro Alves <palves@redhat.com>
6082
6083 * linux-x86-low.c (u_debugreg_offset): New function.
6084 (x86_linux_dr_get, x86_linux_dr_set): Use it.
6085
6086 2015-02-27 Pedro Alves <palves@redhat.com>
6087
6088 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
6089 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
6090 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
6091 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
6092 (ps_lsetfpregs, ps_getpid)
6093 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
6094 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
6095 (ps_lsetxregs, ps_plog): Declare.
6096
6097 2015-02-27 Pedro Alves <palves@redhat.com>
6098
6099 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
6100 IP_AGENT_EXPORT_FUNC.
6101 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
6102 IP_AGENT_EXPORT_FUNC.
6103 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
6104 (IP_AGENT_EXPORT): Delete.
6105 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
6106 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
6107 (gdb_trampoline_buffer_error, collecting, gdb_collect)
6108 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
6109 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
6110 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
6111 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
6112 (traceframe_read_count, traceframe_write_count)
6113 (traceframes_created, trace_state_variables, get_raw_reg)
6114 (get_trace_state_variable_value, set_trace_state_variable_value)
6115 (ust_loaded, helper_thread_id, cmd_buf): Use
6116 IPA_SYM_EXPORTED_NAME.
6117 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
6118 (tracepoints) Use IP_AGENT_EXPORT_VAR.
6119 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
6120 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
6121 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
6122 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
6123 EXTERN_C_PUSH/EXTERN_C_POP.
6124 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
6125 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
6126 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
6127 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
6128 (traceframe_write_count, traceframe_read_count)
6129 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
6130 (about_to_request_buffer_space, get_trace_state_variable_value)
6131 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
6132 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
6133 EXTERN_C_PUSH/EXTERN_C_POP.
6134 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
6135 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
6136 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
6137 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
6138 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
6139 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
6140 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
6141 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
6142 Define.
6143 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
6144 (IP_AGENT_EXPORT_VAR_DECL): Define.
6145 (tracing): Declare.
6146 (gdb_agent_get_raw_reg): Declare.
6147
6148 2015-02-27 Tom Tromey <tromey@redhat.com>
6149 Pedro Alves <palves@redhat.com>
6150
6151 Rename symbols whose names are reserved C++ keywords throughout.
6152
6153 2015-02-27 Pedro Alves <palves@redhat.com>
6154
6155 * Makefile.in (COMPILER): New, get it from autoconf.
6156 (CXX): Get from autoconf instead.
6157 (COMPILE.pre): Use COMPILER.
6158 (CC-LD): Rename to ...
6159 (CC_LD): ... this. Use COMPILER.
6160 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
6161 (CXX_FOR_TARGET): Default to g++ instead of gcc.
6162 * acinclude.m4: Include build-with-cxx.m4.
6163 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
6164 Disable -Werror by default if building in C++ mode.
6165 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
6166 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
6167 the C++ compiler. Save/restore CXXFLAGS too.
6168 * configure: Regenerate.
6169
6170 2015-02-27 Pedro Alves <palves@redhat.com>
6171
6172 * acinclude.m4: Include libiberty.m4.
6173 * configure.ac: Call libiberty_INIT.
6174 * config.in, configure: Regenerate.
6175
6176 2015-02-26 Pedro Alves <palves@redhat.com>
6177
6178 * linux-low.c (linux_wait_1): When incrementing the PC past a
6179 program breakpoint always use the_low_target.breakpoint_len as
6180 increment, rather than the maximum between that and
6181 the_low_target.decr_pc_after_break.
6182
6183 2015-02-23 Pedro Alves <palves@redhat.com>
6184
6185 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
6186 thread was doing a step-over; always adjust the PC if
6187 we stepped over a permanent breakpoint.
6188 (linux_wait_1): If we stepped over breakpoint that was on top of a
6189 permanent breakpoint, manually advance the PC past it.
6190
6191 2015-02-23 Pedro Alves <palves@redhat.com>
6192
6193 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
6194 modes.
6195 (x86_fill_gregset, x86_store_gregset): Use it when handling
6196 $orig_eax.
6197
6198 2015-02-20 Pedro Alves <palves@redhat.com>
6199
6200 * thread-db.c: Include "nat/linux-procfs.h".
6201 (thread_db_init): Skip listing new threads if the kernel supports
6202 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
6203
6204 2015-02-20 Pedro Alves <palves@redhat.com>
6205
6206 * linux-low.c (status_pending_p_callback): Use ptid_match.
6207
6208 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
6209
6210 PR breakpoints/16812
6211 * linux-low.c (wstatus_maybe_breakpoint): Remove.
6212 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
6213 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
6214
6215 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
6216
6217 PR breakpoints/15956
6218 * tracepoint.c (cmd_qtinit): Add check for current_thread.
6219
6220 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6221
6222 * linux-low.c (linux_low_btrace_conf): Print size.
6223 * server.c (handle_btrace_conf_general_set): New.
6224 (hanle_general_set): Call handle_btrace_conf_general_set.
6225 (handle_query): Report Qbtrace-conf:bts:size as supported.
6226
6227 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6228
6229 * linux-low.c (linux_low_enable_btrace): Update parameters.
6230 (linux_low_btrace_conf): New.
6231 (linux_target_ops)<to_btrace_conf>: Initialize.
6232 * server.c (current_btrace_conf): New.
6233 (handle_btrace_enable): Rename to ...
6234 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
6235 to target_enable_btrace. Update comment. Update users.
6236 (handle_qxfer_btrace_conf): New.
6237 (qxfer_packets): Add btrace-conf entry.
6238 (handle_query): Report qXfer:btrace-conf:read as supported packet.
6239 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
6240 (target_ops)<read_btrace_conf>: New.
6241 (target_enable_btrace): Update parameters.
6242 (target_read_btrace_conf): New.
6243
6244 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6245
6246 * server.c (handle_btrace_general_set): Remove call to
6247 target_supports_btrace.
6248 (supported_btrace_packets): New.
6249 (handle_query): Call supported_btrace_packets.
6250 * target.h: include btrace-common.h.
6251 (btrace_target_info): Removed.
6252 (supports_btrace, target_supports_btrace): Update parameters.
6253
6254 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6255
6256 * Makefile.in (SFILES): Add common/btrace-common.c.
6257 (OBS): Add common/btrace-common.o.
6258 (btrace-common.o): Add build rules.
6259 * linux-low: Include btrace-common.h.
6260 (linux_low_read_btrace): Use struct btrace_data. Call
6261 btrace_data_init and btrace_data_fini.
6262
6263 2015-02-06 Pedro Alves <palves@redhat.com>
6264
6265 * thread-db.c (find_new_threads_callback): Add debug output.
6266
6267 2015-02-04 Pedro Alves <palves@redhat.com>
6268
6269 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
6270 (resume_stopped_resumed_lwps): New function.
6271 (linux_wait_for_event_filtered): Use it.
6272
6273 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
6274
6275 * Makefile.in (SFILES): Add linux-personality.c.
6276 (linux-personality.o): New rule.
6277 * configure.srv (srv_linux_obj): Add linux-personality.o to the
6278 list of objects to be built.
6279 * linux-low.c: Include nat/linux-personality.h.
6280 (linux_create_inferior): Remove code to disable address space
6281 randomization (moved to ../nat/linux-personality.c). Create
6282 cleanup to disable address space randomization.
6283
6284 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
6285
6286 * Makefile.in (posix-strerror.o): New rule.
6287 (mingw-strerror.o): Likewise.
6288 * configure: Regenerated.
6289 * configure.ac: Source file ../common/common.host. Initialize new
6290 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
6291
6292 2015-01-14 Yao Qi <yao@codesourcery.com>
6293
6294 * Makefile.in (SFILES): Add nat/ppc-linux.c.
6295 (ppc-linux.o): New rule.
6296 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
6297 * configure.ac: AC_CHECK_FUNCS(getauxval).
6298 * config.in: Re-generated.
6299 * configure: Re-generated.
6300 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
6301 ppc64_64bit_inferior_p
6302
6303 2015-01-14 Yao Qi <yao@codesourcery.com>
6304
6305 * linux-ppc-low.c: Include "nat/ppc-linux.h".
6306 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
6307 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
6308 (PT_ORIG_R3, PT_TRAP): Likewise.
6309 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
6310 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
6311 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
6312
6313 2015-01-10 Joel Brobecker <brobecker@adacore.com>
6314
6315 * i387-fp.c (i387_cache_to_xsave): In look over
6316 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
6317 zmmh_low_space field by use of zmmh_high_space.
6318
6319 2015-01-09 Pedro Alves <palves@redhat.com>
6320
6321 * linux-low.c (step_over_bkpt): Move higher up in the file.
6322 (handle_extended_wait): Don't store the stop_pc here.
6323 (get_stop_pc): Adjust comments and rename to ...
6324 (check_stopped_by_breakpoint): ... this. Record whether the LWP
6325 stopped for a software breakpoint or hardware breakpoint.
6326 (thread_still_has_status_pending_p): New function.
6327 (status_pending_p_callback): Use
6328 thread_still_has_status_pending_p. If the event is no longer
6329 interesting, resume the LWP.
6330 (handle_tracepoints): Add assert.
6331 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
6332 (wstatus_maybe_breakpoint): New function.
6333 (cancel_breakpoint): Delete function.
6334 (check_stopped_by_watchpoint): New function, factored out from
6335 linux_low_filter_event.
6336 (lp_status_maybe_breakpoint): Delete function.
6337 (linux_low_filter_event): Remove filter_ptid argument.
6338 Leave thread group exits pending here. Store the LWP's stop PC.
6339 Always leave events pending.
6340 (linux_wait_for_event_filtered): Pull all events out of the
6341 kernel, and leave them all pending.
6342 (count_events_callback, select_event_lwp_callback): Consider all
6343 events.
6344 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
6345 (select_event_lwp): Only give preference to the stepping LWP in
6346 all-stop mode. Adjust comments.
6347 (ignore_event): New function.
6348 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
6349 references to cancel_breakpoints. Adjust to renames. Also give
6350 equal priority to all LWPs that have had events in non-stop mode.
6351 If reporting a software breakpoint event, unadjust the LWP's PC.
6352 (linux_wait): If linux_wait_1 returned an ignored event, retry.
6353 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
6354 Adjust.
6355 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
6356 (resume_status_pending_p): Use thread_still_has_status_pending_p.
6357 (linux_stopped_by_watchpoint): Adjust.
6358 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
6359 * linux-low.h (enum lwp_stop_reason): New.
6360 (struct lwp_info) <stop_pc>: Adjust comment.
6361 <stopped_by_watchpoint>: Delete field.
6362 <stop_reason>: New field.
6363 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
6364 * mem-break.c (software_breakpoint_inserted_here)
6365 (hardware_breakpoint_inserted_here): New function.
6366 * mem-break.h (software_breakpoint_inserted_here)
6367 (hardware_breakpoint_inserted_here): Declare.
6368 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
6369 (cancel_breakpoints): Delete.
6370 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
6371 (upload_fast_traceframes): Remove references to
6372 cancel_breakpoints.
6373
6374 2015-01-09 Pedro Alves <palves@redhat.com>
6375
6376 * thread-db.c (find_new_threads_callback): Ignore thread if the
6377 kernel thread ID is -1.
6378
6379 2015-01-09 Pedro Alves <palves@redhat.com>
6380
6381 * linux-low.c (linux_attach_fail_reason_string): Move to
6382 nat/linux-ptrace.c, and rename.
6383 (linux_attach_lwp): Update comment.
6384 (attach_proc_task_lwp_callback): New function.
6385 (linux_attach): Adjust to rename and use
6386 linux_proc_attach_tgid_threads.
6387 (linux_attach_fail_reason_string): Delete declaration.
6388
6389 2015-01-01 Joel Brobecker <brobecker@adacore.com>
6390
6391 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
6392 * server.c (gdbserver_version): Likewise.
6393
6394 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
6395
6396 * remote-utils.c: Include ctype.h.
6397 (input_interrupt): Explicitly handle the case when the char
6398 received is the NUL byte. Improve the printing of non-ASCII
6399 characters.
6400
6401 2014-12-16 Joel Brobecker <brobecker@adacore.com>
6402
6403 * linux-low.c (linux_low_filter_event): Update call to
6404 linux_enable_event_reporting following the addition of
6405 a new parameter to that function.
6406
6407 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
6408
6409 PR server/17457
6410 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
6411 (AARCH64_FPCR_REGNO): Likewise.
6412 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
6413 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
6414 (aarch64_store_fpregset): Likewise.
6415
6416 2014-12-15 Joel Brobecker <brobecker@adacore.com>
6417
6418 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
6419 Remove FIXME comment about assumption about N.
6420
6421 2014-12-13 Joel Brobecker <brobecker@adacore.com>
6422
6423 * configure.ac: If large-file support is disabled in GDBserver,
6424 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
6425 * configure: Regenerate.
6426
6427 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6428
6429 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
6430 warning upon ENODATA from ptrace.
6431 * linux-s390-low.c (s390_store_tdb): New.
6432 (s390_regsets): Add regset for NT_S390_TDB.
6433
6434 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6435
6436 * linux-low.c (regsets_store_inferior_registers): Skip regsets
6437 without a fill_function.
6438 * linux-s390-low.c (s390_fill_last_break): Remove.
6439 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
6440 (s390_arch_setup): Use regset's size instead of fill_function for
6441 loop end condition.
6442
6443 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6444
6445 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
6446 the regset's store function when ptrace returned an error.
6447 * regcache.c (get_thread_regcache): Invalidate register cache
6448 before fetching inferior's registers.
6449
6450 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6451
6452 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
6453 while-loop as for-loop.
6454 (regsets_store_inferior_registers): Likewise.
6455
6456 2014-11-28 Yao Qi <yao@codesourcery.com>
6457
6458 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
6459 * config.in, configure: Re-generate.
6460 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
6461 is defined.
6462
6463 2014-11-21 Yao Qi <yao@codesourcery.com>
6464
6465 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
6466 (AC_CHECK_HEADERS): Remove malloc.h.
6467 * configure: Re-generated.
6468 * config.in: Re-generated.
6469 * server.h: Don't include alloca.h and malloc.h.
6470 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
6471 Don't include malloc.h.
6472
6473 2014-11-17 Joel Brobecker <brobecker@adacore.com>
6474
6475 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
6476 corresponding ERRNO check in same block.
6477
6478 2014-11-12 Pedro Alves <palves@redhat.com>
6479
6480 * server.c (cont_thread): Update comment.
6481 (start_inferior, attach_inferior): No longer clear cont_thread.
6482 (handle_v_cont): No longer set cont_thread.
6483 (captured_main): Clear cont_thread each time a GDB connects.
6484
6485 2014-11-12 Pedro Alves <palves@redhat.com>
6486
6487 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
6488 thread, and don't resume all threads if the Hc thread has exited.
6489
6490 2014-11-12 Pedro Alves <palves@redhat.com>
6491
6492 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
6493 the process group instead of to a specific LWP.
6494
6495 2014-10-15 Pedro Alves <palves@redhat.com>
6496
6497 PR server/17487
6498 * win32-arm-low.c (arm_set_thread_context): Remove current_event
6499 parameter.
6500 (arm_set_thread_context): Delete.
6501 (the_low_target): Adjust.
6502 * win32-i386-low.c (debug_registers_changed)
6503 (debug_registers_used): Delete.
6504 (update_debug_registers_callback): New function.
6505 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
6506 needing to update their debug registers.
6507 (win32_get_current_dr): New function.
6508 (x86_dr_low_get_addr, x86_dr_low_get_control)
6509 (x86_dr_low_get_status): Fetch the debug register from the thread
6510 record's context.
6511 (i386_initial_stuff): Adjust.
6512 (i386_get_thread_context): Remove current_event parameter. Don't
6513 clear debug_registers_changed nor copy DR values to
6514 debug_reg_state.
6515 (i386_set_thread_context): Delete.
6516 (i386_prepare_to_resume): New function.
6517 (i386_thread_added): Mark the thread as needing to update irs
6518 debug registers.
6519 (the_low_target): Remove i386_set_thread_context and install
6520 i386_prepare_to_resume.
6521 * win32-low.c (win32_get_thread_context): Adjust.
6522 (win32_set_thread_context): Use SetThreadContext
6523 directly.
6524 (win32_prepare_to_resume): New function.
6525 (win32_require_context): New function, factored out from ...
6526 (thread_rec): ... this.
6527 (continue_one_thread): Call win32_prepare_to_resume on each thread
6528 we're about to continue.
6529 (win32_resume): Call win32_prepare_to_resume on the event thread.
6530 * win32-low.h (struct win32_thread_info)
6531 <debug_registers_changed>: New field.
6532 (struct win32_target_ops): Change prototype of set_thread_context,
6533 delete set_thread_context and add prepare_to_resume.
6534 (win32_require_context): New declaration.
6535
6536 2014-10-08 Gary Benson <gbenson@redhat.com>
6537
6538 * server.h: Do not include common-exceptions.h.
6539
6540 2014-10-08 Gary Benson <gbenson@redhat.com>
6541
6542 * server.h: Do not include cleanups.h.
6543
6544 2014-09-30 James Hogan <james.hogan@imgtec.com>
6545
6546 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
6547 mips64-dsp-linux.c.
6548
6549 2014-09-23 Yao Qi <yao@codesourcery.com>
6550
6551 * linux-low.c (lp_status_maybe_breakpoint): New function.
6552 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
6553 (count_events_callback): Likewise.
6554 (select_event_lwp_callback): Likewise.
6555 (cancel_breakpoints_callback): Likewise.
6556
6557 2014-09-19 Don Breazeal <donb@codesourcery.com>
6558
6559 * linux-low.c (handle_extended_wait): Call
6560 linux_ptrace_get_extended_event.
6561 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
6562 linux_is_extended_waitstatus.
6563
6564 2014-09-16 Joel Brobecker <brobecker@adacore.com>
6565
6566 * Makefile.in (CPPFLAGS): Define.
6567 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
6568 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
6569
6570 2014-09-16 Gary Benson <gbenson@redhat.com>
6571
6572 * inferiors.h (current_inferior): Renamed as...
6573 (current_thread): New variable. All uses updated.
6574 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
6575 (maybe_move_out_of_jump_pad): Likewise.
6576 (cancel_breakpoint): Likewise.
6577 (linux_low_filter_event): Likewise.
6578 (wait_for_sigstop): Likewise.
6579 (linux_resume_one_lwp): Likewise.
6580 (need_step_over_p): Likewise.
6581 (start_step_over): Likewise.
6582 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
6583 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
6584 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
6585 and save_inferior as saved_thread.
6586 * regcache.c (get_thread_regcache): Renamed saved_inferior as
6587 saved_thread.
6588 (regcache_invalidate_thread): Likewise.
6589 * remote-utils.c (prepare_resume_reply): Likewise.
6590 * thread-db.c (thread_db_get_tls_address): Likewise.
6591 (disable_thread_event_reporting): Likewise.
6592 (remove_thread_event_breakpoints): Likewise.
6593 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
6594 as saved_thread.
6595 * target.h (set_desired_inferior): Renamed as...
6596 (set_desired_thread): New declaration. All uses updated.
6597 * server.c (myresume): Updated comment to reference thread instead
6598 of inferior.
6599 (handle_serial_event): Likewise.
6600 (handle_target_event): Likewise.
6601
6602 2014-09-12 Tom Tromey <tromey@redhat.com>
6603 Gary Benson <gbenson@redhat.com>
6604
6605 * regcache.h: Include common-regcache.h.
6606 (regcache_read_pc): Don't declare.
6607 * regcache.c (get_thread_regcache_for_ptid): New function.
6608
6609 2014-09-11 Tom Tromey <tromey@redhat.com>
6610 Gary Benson <gbenson@redhat.com>
6611
6612 * symbol.c: New file.
6613 * Makefile.in (SFILES): Add symbol.c.
6614 (OBS): Add symbol.o.
6615
6616 2014-09-11 Gary Benson <gbenson@redhat.com>
6617
6618 * target.c (target_stop_ptid, target_continue_ptid): New
6619 functions.
6620
6621 2014-09-11 Tom Tromey <tromey@redhat.com>
6622 Gary Benson <gbenson@redhat.com>
6623
6624 * target.h: Include target/target.h.
6625 * target.c (target_read_memory, target_read_uint32)
6626 (target_write_memory): New functions.
6627
6628 2014-09-11 Gary Benson <gbenson@redhat.com>
6629
6630 * server.h (debug_hw_points): Don't declare.
6631 * server.c (debug_hw_points): Don't define. Replace all uses
6632 with show_debug_regs.
6633 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
6634 all uses with show_debug_regs.
6635
6636 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
6637
6638 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
6639 endianness into account.
6640 (ppc_supply_ptrace_register): Likewise.
6641
6642 2014-09-03 James Hogan <james.hogan@imgtec.com>
6643
6644 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
6645 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
6646
6647 2014-09-03 Gary Benson <gbenson@redhat.com>
6648
6649 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
6650 ALL_DEBUG_ADDRESS_REGISTERS.
6651
6652 2014-09-02 Gary Benson <gbenson@redhat.com>
6653
6654 * i386-low.h: Renamed as...
6655 * x86-low.h: New file. All type, function and variable name
6656 prefixes changed from "i386_" to "x86_". All references updated.
6657 * i386-low.c: Renamed as...
6658 * x86-low.c: New file. All type, function and variable name
6659 prefixes changed from "i386_" to "x86_". All references updated.
6660
6661 2014-09-02 Gary Benson <gbenson@redhat.com>
6662
6663 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
6664 (x86_linux_new_thread): Likewise.
6665
6666 2014-08-29 Gary Benson <gbenson@redhat.com>
6667
6668 * server.h (setjmp.h): Do not include.
6669 (toplevel): Do not declare.
6670 (common-exceptions.h): Include.
6671 (cleanups.h): Likewise.
6672 * server.c (toplevel): Do not define.
6673 (exit_code): New static global.
6674 (detach_or_kill_for_exit_cleanup): New function.
6675 (main): New function. Original main renamed to...
6676 (captured_main): New function.
6677 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
6678
6679 2014-08-29 Gary Benson <gbenson@redhat.com>
6680
6681 * Makefile.in (SFILES): Add common/common-exceptions.c.
6682 (OBS): Add common-exceptions.o.
6683 (common-exceptions.o): New rule.
6684 * utils.c (prepare_to_throw_exception): New function.
6685
6686 2014-08-29 Gary Benson <gbenson@redhat.com>
6687
6688 * config.in: Regenerate.
6689 * configure: Likewise.
6690
6691 2014-08-29 Gary Benson <gbenson@redhat.com>
6692
6693 * Makefile.in (SFILES): Add common/cleanups.c.
6694 (OBS): cleanups.o.
6695 (cleanups.o): New rule.
6696
6697 2014-08-29 Gary Benson <gbenson@redhat.com>
6698
6699 * utils.c (internal_vwarning): New function.
6700
6701 2014-08-28 Gary Benson <gbenson@redhat.com>
6702
6703 * utils.h (fatal): Remove declaration.
6704 * utils.c (fatal): Remove function.
6705
6706 2014-08-28 Gary Benson <gbenson@redhat.com>
6707
6708 * tracepoint.c (gdb_agent_init): Replace fatal with
6709 perror_with_name.
6710 (initialize_tracepoint): Likewise.
6711
6712 2014-08-28 Gary Benson <gbenson@redhat.com>
6713
6714 * remote-utils.c (remote_prepare): Replace fatal with error.
6715
6716 2014-08-28 Gary Benson <gbenson@redhat.com>
6717
6718 * linux-low.c (linux_async): Replace fatal with warning.
6719 Tidy up and return.
6720 (linux_start_non_stop): Return -1 if linux_async failed.
6721
6722 2014-08-28 Gary Benson <gbenson@redhat.com>
6723
6724 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
6725 gdb_assert.
6726 (i386_dr_low_get_addr): Remove vague comment.
6727 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
6728 gdb_assert.
6729
6730 2014-08-28 Gary Benson <gbenson@redhat.com>
6731
6732 * inferiors.c (get_thread_process): Replace check with gdb_assert.
6733 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
6734 internal_error.
6735 (linux_resume_one_lwp): Likewise.
6736 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
6737 gdb_assert.
6738 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
6739 with internal_error.
6740 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
6741 (init_register_cache): Replace fatal with gdb_assert_not_reached.
6742 (find_register_by_name): Replace fatal with internal_error.
6743 (find_regno): Likewise.
6744 * tdesc.c (init_target_desc): Replace check with gdb_assert.
6745 * thread-db.c (thread_db_create_event): Likewise.
6746 (thread_db_load_search): Likewise.
6747 (try_thread_db_load_1): Likewise.
6748 * tracepoint.c (get_jump_space_head): Replace fatal with
6749 internal_error.
6750 (claim_trampoline_space): Likewise.
6751 (have_fast_tracepoint_trampoline_buffer): Likewise.
6752 (cmd_qtstart): Likewise.
6753 (stop_tracing): Likewise.
6754 (fast_tracepoint_collecting): Likewise.
6755 (target_malloc): Likewise.
6756 (download_tracepoint): Likewise.
6757 (download_trace_state_variables): Replace check with gdb_assert.
6758 (upload_fast_traceframes): Replace fatal with internal_error.
6759
6760 2014-08-19 Tom Tromey <tromey@redhat.com>
6761 Gary Benson <gbenson@redhat.com>
6762
6763 * Makefile.in (SFILES): Add common/common-debug.c.
6764 (OBS): Add common-debug.o.
6765 (common-debug.o): New rule.
6766 * debug.h (debug_printf): Don't declare.
6767 * debug.c (debug_printf): Renamed and rewritten as...
6768 (debug_vprintf): New function.
6769
6770 2014-08-19 Gary Benson <gbenson@redhat.com>
6771
6772 * utils.h: Do not include print-utils.h.
6773
6774 2014-08-19 Tom Tromey <tromey@redhat.com>
6775 Gary Benson <gbenson@redhat.com>
6776
6777 * server.h: Add static assertion.
6778 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
6779
6780 2014-08-19 Tom Tromey <tromey@redhat.com>
6781 Gary Benson <gbenson@redhat.com>
6782
6783 * Makefile.in (SFILES): Add common/errors.c.
6784 (OBS): Add errors.o.
6785 (IPA_OBS): Add errors-ipa.o.
6786 (errors.o): New rule.
6787 (errors-ipa.o): Likewise.
6788 * utils.h (perror_with_name, error, warning): Don't declare.
6789 * utils.c (warning): Renamed and rewritten as...
6790 (vwarning): New function.
6791 (error): Renamed and rewritten as...
6792 (verror): New function.
6793 (internal_error): Renamed and rewritten as...
6794 (internal_verror): New function.
6795
6796 2014-08-07 Gary Benson <gbenson@redhat.com>
6797
6798 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
6799 * configure: Regenerate.
6800 * config.in: Likewise.
6801 * server.h: Do not include errno.h.
6802 * event-loop.c: Likewise.
6803 * hostio-errno.c: Likewise.
6804 * linux-low.c: Likewise.
6805 * remote-utils.c: Likewise.
6806 * spu-low.c: Likewise.
6807 * utils.c: Likewise.
6808 * gdbreplay.c: Unconditionally include errno.h.
6809
6810 2014-08-07 Gary Benson <gbenson@redhat.com>
6811
6812 * server.h: Do not include string.h.
6813 * event-loop.c: Likewise.
6814 * linux-low.c: Likewise.
6815 * regcache.c: Likewise.
6816 * remote-utils.c: Likewise.
6817 * spu-low.c: Likewise.
6818 * utils.c: Likewise.
6819
6820 2014-08-07 Gary Benson <gbenson@redhat.com>
6821
6822 * server.h: Do not include gdb_assert.h.
6823
6824 2014-08-07 Gary Benson <gbenson@redhat.com>
6825
6826 * server.h: Do not include common-utils.h.
6827
6828 2014-08-07 Gary Benson <gbenson@redhat.com>
6829
6830 * server.h: Do not include ptid.h.
6831 * notif.h: Likewise.
6832
6833 2014-08-07 Gary Benson <gbenson@redhat.com>
6834
6835 * server.h: Do not include gdb_locale.h.
6836
6837 2014-08-07 Gary Benson <gbenson@redhat.com>
6838
6839 * server.h: Do not include gdb/signals.h.
6840 * win32-low.c: Likewise.
6841
6842 2014-08-07 Gary Benson <gbenson@redhat.com>
6843
6844 * server.h: Do not include pathmax.h.
6845
6846 2014-08-07 Gary Benson <gbenson@redhat.com>
6847
6848 * server.h: Do not include libiberty.h.
6849 * linux-bfin-low.c: Likewise.
6850
6851 2014-08-07 Gary Benson <gbenson@redhat.com>
6852
6853 * server.h: Do not include ansidecl.h.
6854
6855 2014-08-07 Gary Benson <gbenson@redhat.com>
6856
6857 * linux-x86-low.c: Do not include stddef.h.
6858 * lynx-ppc-low.c: Likewise.
6859 * tracepoint.c: Likewise.
6860
6861 2014-08-07 Gary Benson <gbenson@redhat.com>
6862
6863 * server.h: Do not include stdarg.h.
6864 * nto-low.c: Likewise.
6865
6866 2014-08-07 Gary Benson <gbenson@redhat.com>
6867
6868 * server.h: Do not include stdlib.h.
6869 * inferiors.c: Likewise.
6870 * linux-low.c: Likewise.
6871 * regcache.c: Likewise.
6872 * spu-low.c: Likewise.
6873 * tracepoint.c: Likewise.
6874 * utils.c: Likewise.
6875
6876 2014-08-07 Gary Benson <gbenson@redhat.com>
6877
6878 * server.h: Do not include stdio.h.
6879 * linux-low.c: Likewise.
6880 * remote-utils.c: Likewise.
6881 * spu-low.c: Likewise.
6882 * utils.c: Likewise.
6883 * wincecompat.c: Likewise.
6884
6885 2014-08-06 Gary Benson <gbenson@redhat.com>
6886
6887 * regcache.c (init_register_cache): Move conditionals inside if.
6888
6889 2014-08-06 Gary Benson <gbenson@redhat.com>
6890
6891 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
6892
6893 2014-07-31 Gary Benson <gbenson@redhat.com>
6894
6895 * ax.h: Do not include server.h.
6896 * gdbthread.h: Likewise.
6897 * lynx-low.h: Likewise.
6898 * notif.h: Likewise.
6899
6900 2014-07-30 Gary Benson <gbenson@redhat.com>
6901
6902 * server.h: Include common-defs.h.
6903 Do not include config.h or build-gnulib-gdbserver/config.h.
6904
6905 2014-07-30 Gary Benson <gbenson@redhat.com>
6906
6907 * hostio-errno.c: Move server.h to top of includes list.
6908 * inferiors.c: Likewise.
6909 * linux-x86-low.c: Likewise.
6910 * notif.c: Include server.h.
6911
6912 2014-07-24 Tom Tromey <tromey@redhat.com>
6913 Gary Benson <gbenson@redhat.com>
6914
6915 * server.h (CORE_ADDR): Now unsigned.
6916
6917 2014-07-16 Pedro Alves <palves@redhat.com>
6918
6919 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
6920
6921 2014-07-15 Pedro Alves <palves@redhat.com>
6922
6923 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
6924 copy.
6925
6926 2014-07-11 Pedro Alves <palves@redhat.com>
6927
6928 * linux-low.c (kill_wait_lwp): New function, based on
6929 kill_one_lwp_callback, but use my_waitpid directly.
6930 (kill_one_lwp_callback, linux_kill): Use it.
6931
6932 2014-06-23 Pedro Alves <palves@redhat.com>
6933
6934 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
6935 before setting DR0..DR3.
6936
6937 2014-06-20 Gary Benson <gbenson@redhat.com>
6938
6939 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
6940 * configure: Regenerated.
6941 * config.in: Likewise.
6942
6943 2014-06-20 Gary Benson <gbenson@redhat.com>
6944
6945 * Makefile.in (SFILES): Update locations for files moved
6946 from common to nat.
6947 (object file files): Reordered.
6948
6949 2014-06-20 Gary Benson <gbenson@redhat.com>
6950
6951 * i386-low.h (i386_dr_low_can_set_addr): Removed.
6952 (i386_dr_low_set_addr): Likewise.
6953 (i386_dr_low_get_addr): Likewise.
6954 (i386_dr_low_can_set_control): Likewise.
6955 (i386_dr_low_set_control): Likewise.
6956 (i386_dr_low_get_control): Likewise.
6957 (i386_dr_low_get_status): Likewise.
6958 (i386_get_debug_register_length): Likewise.
6959 * linux-x86-low.c (i386_dr_low_set_addr):
6960 Changed signature. Made static.
6961 (i386_dr_low_get_addr): Likewise.
6962 (i386_dr_low_set_control): Likewise.
6963 (i386_dr_low_get_control): Likewise.
6964 (i386_dr_low_get_status): Likewise.
6965 (i386_dr_low): New global variable.
6966 * win32-i386-low.c (i386_dr_low_set_addr):
6967 Changed signature. Made static.
6968 (i386_dr_low_get_addr): Likewise.
6969 (i386_dr_low_set_control): Likewise.
6970 (i386_dr_low_get_control): Likewise.
6971 (i386_dr_low_get_status): Likewise.
6972 (i386_dr_low): New global variable.
6973
6974 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
6975
6976 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
6977 * Makefile.in (AR, AR_FLAGS): Define.
6978 * configure: Regenerate.
6979
6980 2014-06-19 Gary Benson <gbenson@redhat.com>
6981
6982 * Makefile.in (i386-dregs.o): New rule.
6983 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
6984 * i386-low.c (target.h): Remove include.
6985 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
6986 (DR_CONTROL_SHIFT): Likewise.
6987 (DR_CONTROL_SIZE): Likewise.
6988 (DR_RW_EXECUTE): Likewise.
6989 (DR_RW_WRITE): Likewise.
6990 (DR_RW_READ): Likewise.
6991 (DR_RW_IORW): Likewise.
6992 (DR_LEN_1): Likewise.
6993 (DR_LEN_2): Likewise.
6994 (DR_LEN_4): Likewise.
6995 (DR_LEN_8): Likewise.
6996 (DR_LOCAL_ENABLE_SHIFT): Likewise.
6997 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
6998 (DR_ENABLE_SIZE): Likewise.
6999 (DR_LOCAL_SLOWDOWN): Likewise.
7000 (DR_GLOBAL_SLOWDOWN): Likewise.
7001 (DR_CONTROL_RESERVED): Likewise.
7002 (I386_DR_CONTROL_MASK): Likewise.
7003 (I386_DR_VACANT): Likewise.
7004 (I386_DR_LOCAL_ENABLE): Likewise.
7005 (I386_DR_GLOBAL_ENABLE): Likewise.
7006 (I386_DR_DISABLE): Likewise.
7007 (I386_DR_SET_RW_LEN): Likewise.
7008 (I386_DR_GET_RW_LEN): Likewise.
7009 (I386_DR_WATCH_HIT): Likewise.
7010 (i386_wp_op_t): Likewise.
7011 (i386_show_dr): Likewise.
7012 (i386_length_and_rw_bits): Likewise.
7013 (i386_insert_aligned_watchpoint): Likewise.
7014 (i386_remove_aligned_watchpoint): Likewise.
7015 (i386_handle_nonaligned_watchpoint): Likewise.
7016 i386_update_inferior_debug_regs(): Likewise.
7017 (i386_dr_insert_watchpoint): Likewise.
7018 (i386_dr_remove_watchpoint): Likewise.
7019 (i386_dr_region_ok_for_watchpoint): Likewise.
7020 (i386_dr_stopped_data_address): Likewise.
7021 (i386_dr_stopped_by_watchpoint): Likewise.
7022
7023 2014-06-19 Gary Benson <gbenson@redhat.com>
7024
7025 * i386-low.c (i386_dr_show): Renamed to
7026 i386_show_dr and made static. All uses updated.
7027 (i386_dr_length_and_rw_bits): Renamed to
7028 i386_length_and_rw_bits and made static.
7029 All uses updated.
7030 (i386_dr_insert_aligned_watchpoint): Renamed to
7031 i386_insert_aligned_watchpoint and made static.
7032 All uses updated.
7033 (i386_dr_remove_aligned_watchpoint): Renamed to
7034 i386_remove_aligned_watchpoint and made static.
7035 All uses updated.
7036 (i386_dr_update_inferior_debug_regs): Renamed to
7037 i386_update_inferior_debug_regs and made static.
7038 All uses updated.
7039
7040 2014-06-18 Gary Benson <gbenson@redhat.com>
7041
7042 * i386-low.h (i386_dr_low_can_set_addr): New macro.
7043 (i386_dr_low_can_set_control): Likewise.
7044 (i386_get_debug_register_length): Likewise.
7045 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
7046 (i386_dr_low_can_set_control): Likewise.
7047 (i386_get_debug_register_length): Likewise.
7048
7049 2014-06-17 Gary Benson <gbenson@redhat.com>
7050
7051 * i386-low.h (i386-dregs.h): New include.
7052 (DR_FIRSTADDR): Now in i386-dregs.h.
7053 (DR_LASTADDR): Likewise.
7054 (DR_NADDR): Likewise.
7055 (DR_STATUS): Likewise.
7056 (DR_CONTROL): Likewise.
7057 (i386_debug_reg_state): Likewise.
7058 (i386_dr_insert_watchpoint): Likewise.
7059 (i386_dr_remove_watchpoint): Likewise.
7060 (i386_dr_region_ok_for_watchpoint): Likewise.
7061 (i386_dr_stopped_data_address): Likewise.
7062 (i386_dr_stopped_by_watchpoint): Likewise.
7063 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
7064
7065 2014-06-18 Gary Benson <gbenson@redhat.com>
7066
7067 * i386-low.h (i386_low_insert_watchpoint): Renamed to
7068 i386_dr_insert_watchpoint.
7069 (i386_low_remove_watchpoint): Renamed to
7070 i386_dr_remove_watchpoint.
7071 (i386_low_region_ok_for_watchpoint): Renamed to
7072 i386_dr_region_ok_for_watchpoint.
7073 (i386_low_stopped_data_address): Renamed to
7074 i386_dr_stopped_data_address.
7075 (i386_low_stopped_by_watchpoint): Renamed to
7076 i386_dr_stopped_by_watchpoint.
7077 * i386-low.c (i386_show_dr): Renamed to
7078 i386_dr_show and made nonstatic. All uses updated.
7079 (i386_length_and_rw_bits): Renamed to
7080 i386_dr_length_and_rw_bits and made nonstatic.
7081 All uses updated.
7082 (i386_insert_aligned_watchpoint): Renamed to
7083 i386_dr_insert_aligned_watchpoint and made nonstatic.
7084 All uses updated.
7085 (i386_remove_aligned_watchpoint): Renamed to
7086 i386_dr_remove_aligned_watchpoint and made nonstatic.
7087 All uses updated.
7088 (i386_update_inferior_debug_regs): Renamed to
7089 i386_dr_update_inferior_debug_regs and made nonstatic.
7090 All uses updated.
7091 (i386_low_insert_watchpoint): Renamed to
7092 i386_dr_insert_watchpoint. All uses updated.
7093 (i386_low_remove_watchpoint): Renamed to
7094 i386_dr_remove_watchpoint. All uses updated.
7095 (i386_low_region_ok_for_watchpoint): Renamed to
7096 i386_dr_region_ok_for_watchpoint. All uses updated.
7097 (i386_low_stopped_data_address): Renamed to
7098 i386_dr_stopped_data_address. All uses updated.
7099 (i386_low_stopped_by_watchpoint): Renamed to
7100 i386_dr_stopped_by_watchpoint. All uses updated.
7101
7102 2014-06-18 Gary Benson <gbenson@redhat.com>
7103
7104 * i386-low.c (i386_dr_low_can_set_addr): New macro.
7105 (i386_dr_low_can_set_control): Likewise.
7106 (i386_insert_aligned_watchpoint): New check.
7107
7108 2014-06-18 Gary Benson <gbenson@redhat.com>
7109
7110 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
7111 Renamed to state.
7112
7113 2014-06-18 Gary Benson <gbenson@redhat.com>
7114
7115 * i386-low.c (i386_length_and_rw_bits): Use internal_error
7116 instead of fatal and error.
7117 (i386_handle_nonaligned_watchpoint): Likewise.
7118
7119 2014-06-18 Gary Benson <gbenson@redhat.com>
7120
7121 * i386-low.c (i386_get_debug_register_length): New macro.
7122 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
7123 (i386_show_dr): Use debug_printf instead of fprintf. Use
7124 phex to format values.
7125
7126 2014-06-18 Gary Benson <gbenson@redhat.com>
7127
7128 * i386-low.h: Comment changes.
7129 * i386-low.c: Likewise.
7130
7131 2014-06-18 Gary Benson <gbenson@redhat.com>
7132
7133 * i386-low.c: Whitespace changes.
7134
7135 2014-06-12 Tom Tromey <tromey@redhat.com>
7136
7137 * utils.c (freeargv): Remove.
7138
7139 2014-06-12 Tom Tromey <tromey@redhat.com>
7140
7141 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
7142 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
7143 (parse_debug_format_options): Likewise.
7144 (gdbserver_usage): Likewise.
7145 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
7146 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
7147 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
7148 against libiberty.
7149 ($(LIBGNU)): Depend on libiberty.
7150 (all-lib): Recurse into all subdirs.
7151 (install-only): Invoke "install" target in subdirs.
7152 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
7153 targets.
7154 * configure: Rebuild.
7155 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
7156 for vasprintf, vsnprintf, or gettimeofday.
7157 * configure.srv: Don't add safe-ctype.o or lbasename.o to
7158 srv_tgtobj.
7159
7160 2014-06-05 Joel Brobecker <brobecker@adacore.com>
7161
7162 * development.sh: Delete.
7163 * Makefile.in (config.status): Adjust dependency on development.sh.
7164 * configure.ac: Adjust development.sh source call.
7165 * configure: Regenerate.
7166
7167 2014-06-02 Pedro Alves <palves@redhat.com>
7168
7169 * ax.c (gdb_free_agent_expr): New function.
7170 * ax.h (gdb_free_agent_expr): New declaration.
7171 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
7172 list.
7173 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
7174 static.
7175 (clear_breakpoint_conditions_and_commands): New function.
7176 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
7177 (clear_breakpoint_conditions_and_commands): New declaration.
7178
7179 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
7180
7181 * linux-aarch64-low.c (asm/ptrace.h): Include.
7182
7183 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
7184
7185 Fix TLS access for -static -pthread.
7186 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
7187 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
7188 (thread_db_load_search, try_thread_db_load_1): Initialize it.
7189
7190 2014-05-20 Pedro Alves <palves@redhat.com>
7191
7192 * linux-aarch64-low.c (aarch64_insert_point)
7193 (aarch64_remove_point): No longer check whether the type is
7194 supported here. Adjust to new interface.
7195 (the_low_target): Install aarch64_supports_z_point_type as
7196 supports_z_point_type method.
7197 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
7198 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
7199 instead of a Z packet char. Adjust.
7200 (arm_supports_z_point_type): New function.
7201 (arm_insert_point, arm_remove_point): Adjust to new interface.
7202 (the_low_target): Install arm_supports_z_point_type.
7203 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
7204 (cris_insert_point, cris_remove_point): Adjust to new interface.
7205 Don't check whether the type is supported here.
7206 (the_low_target): Install cris_supports_z_point_type.
7207 * linux-low.c (linux_supports_z_point_type): New function.
7208 (linux_insert_point, linux_remove_point): Adjust to new interface.
7209 * linux-low.h (struct linux_target_ops) <insert_point,
7210 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
7211 raw_breakpoint pointer parameter.
7212 <supports_z_point_type>: New method.
7213 * linux-mips-low.c (mips_supports_z_point_type): New function.
7214 (mips_insert_point, mips_remove_point): Adjust to new interface.
7215 Use mips_supports_z_point_type.
7216 (the_low_target): Install mips_supports_z_point_type.
7217 * linux-ppc-low.c (the_low_target): Install NULL as
7218 supports_z_point_type method.
7219 * linux-s390-low.c (the_low_target): Install NULL as
7220 supports_z_point_type method.
7221 * linux-sparc-low.c (the_low_target): Install NULL as
7222 supports_z_point_type method.
7223 * linux-x86-low.c (x86_supports_z_point_type): New function.
7224 (x86_insert_point): Adjust to new insert_point interface. Use
7225 insert_memory_breakpoint. Adjust to new
7226 i386_low_insert_watchpoint interface.
7227 (x86_remove_point): Adjust to remove_point interface. Use
7228 remove_memory_breakpoint. Adjust to new
7229 i386_low_remove_watchpoint interface.
7230 (the_low_target): Install x86_supports_z_point_type.
7231 * lynx-low.c (lynx_target_ops): Install NULL as
7232 supports_z_point_type callback.
7233 * nto-low.c (nto_supports_z_point_type): New.
7234 (nto_insert_point, nto_remove_point): Adjust to new interface.
7235 (nto_target_ops): Install nto_supports_z_point_type.
7236 * mem-break.c: Adjust intro comment.
7237 (struct raw_breakpoint) <raw_type, size>: New fields.
7238 <inserted>: Update comment.
7239 <shlib_disabled>: Delete field.
7240 (enum bkpt_type) <gdb_breakpoint>: Delete value.
7241 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
7242 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
7243 (raw_bkpt_type_to_target_hw_bp_type): New function.
7244 (find_enabled_raw_code_breakpoint_at): New function.
7245 (find_raw_breakpoint_at): New type and size parameters. Use them.
7246 (insert_memory_breakpoint): New function, based off
7247 set_raw_breakpoint_at.
7248 (remove_memory_breakpoint): New function.
7249 (set_raw_breakpoint_at): Reimplement.
7250 (set_breakpoint): New, based on set_breakpoint_at.
7251 (set_breakpoint_at): Reimplement.
7252 (delete_raw_breakpoint): Go through the_target->remove_point
7253 instead of assuming memory breakpoints.
7254 (find_gdb_breakpoint_at): Delete.
7255 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
7256 (find_gdb_breakpoint): New function.
7257 (set_gdb_breakpoint_at): Delete.
7258 (z_type_supported): New function.
7259 (set_gdb_breakpoint_1): New function, loosely based off
7260 set_gdb_breakpoint_at.
7261 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
7262 (delete_gdb_breakpoint_at): Delete.
7263 (delete_gdb_breakpoint_1): New function, loosely based off
7264 delete_gdb_breakpoint_at.
7265 (delete_gdb_breakpoint): New function.
7266 (clear_gdb_breakpoint_conditions): Rename to ...
7267 (clear_breakpoint_conditions): ... this. Don't handle a NULL
7268 breakpoint.
7269 (add_condition_to_breakpoint): Make static.
7270 (add_breakpoint_condition): Take a struct breakpoint pointer
7271 instead of an address. Adjust.
7272 (gdb_condition_true_at_breakpoint): Rename to ...
7273 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
7274 z_type parameter.
7275 (gdb_condition_true_at_breakpoint): Reimplement.
7276 (add_breakpoint_commands): Take a struct breakpoint pointer
7277 instead of an address. Adjust.
7278 (gdb_no_commands_at_breakpoint): Rename to ...
7279 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
7280 parameter. Return true if no breakpoint was found. Change debug
7281 output.
7282 (gdb_no_commands_at_breakpoint): Reimplement.
7283 (run_breakpoint_commands): Rename to ...
7284 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
7285 and change return type to boolean.
7286 (run_breakpoint_commands): New function.
7287 (gdb_breakpoint_here): Also check for Z1 breakpoints.
7288 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
7289 breakpoint. Go through the_target->remove_point instead of
7290 assuming memory breakpoint.
7291 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
7292 software and hardware breakpoints.
7293 (reinsert_raw_breakpoint): Go through the_target->insert_point
7294 instead of assuming memory breakpoint.
7295 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
7296 software and hardware breakpoints.
7297 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
7298 Check both software and hardware breakpoints.
7299 (validate_inserted_breakpoint): Assert the breakpoint is a
7300 software breakpoint. Set the inserted flag to -1 instead of
7301 setting shlib_disabled.
7302 (delete_disabled_breakpoints): Adjust.
7303 (validate_breakpoints): Only validate software breakpoints.
7304 Adjust to inserted flag change.
7305 (check_mem_read, check_mem_write): Skip breakpoint types other
7306 than software breakpoints. Adjust to inserted flag change.
7307 * mem-break.h (enum raw_bkpt_type): New enum.
7308 (raw_breakpoint, struct process_info): Forward declare.
7309 (Z_packet_to_target_hw_bp_type): Delete declaration.
7310 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
7311 (set_gdb_breakpoint, delete_gdb_breakpoint)
7312 (clear_breakpoint_conditions): New declarations.
7313 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
7314 (breakpoint_inserted_here): Update comment.
7315 (add_breakpoint_condition, add_breakpoint_commands): Replace
7316 address parameter with a breakpoint pointer parameter.
7317 (gdb_breakpoint_here): Update comment.
7318 (delete_gdb_breakpoint_at): Delete.
7319 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
7320 * server.c (process_point_options): Take a struct breakpoint
7321 pointer instead of an address. Adjust.
7322 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
7323 delete_gdb_breakpoint.
7324 * spu-low.c (spu_target_ops): Install NULL as
7325 supports_z_point_type method.
7326 * target.h: Include mem-break.h.
7327 (struct target_ops) <prepare_to_access_memory>: Update comment.
7328 <supports_z_point_type>: New field.
7329 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
7330 instead of a char. Also take a raw breakpoint pointer.
7331 * win32-arm-low.c (the_low_target): Install NULL as
7332 supports_z_point_type.
7333 * win32-i386-low.c (i386_supports_z_point_type): New function.
7334 (i386_insert_point, i386_remove_point): Adjust to new interface.
7335 (the_low_target): Install i386_supports_z_point_type.
7336 * win32-low.c (win32_supports_z_point_type): New function.
7337 (win32_insert_point, win32_remove_point): Adjust to new interface.
7338 (win32_target_ops): Install win32_supports_z_point_type.
7339 * win32-low.h (struct win32_target_ops):
7340 <supports_z_point_type>: New method.
7341 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
7342 instead of a char. Also take a raw breakpoint pointer.
7343
7344 2014-05-20 Pedro Alves <palves@redhat.com>
7345
7346 * mem-break.h: Include break-common.h.
7347 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
7348 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
7349 (Z_packet_to_target_hw_bp_type): New declaration.
7350 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
7351 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
7352 (Z_PACKET_ACCESS_WP): Delete macros.
7353 (Z_packet_to_hw_type): Delete function.
7354 * i386-low.h: Don't include break-common.h here.
7355 (Z_packet_to_hw_type): Delete declaration.
7356 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
7357 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
7358 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
7359 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
7360 * linux-aarch64-low.c: Don't include break-common.h here.
7361 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
7362 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
7363 (Z_packet_to_target_hw_bp_type): Delete function.
7364 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
7365 function.
7366 (mips_insert_point, mips_remove_point): Use
7367 Z_packet_to_target_hw_bp_type.
7368
7369 2014-05-20 Pedro Alves <palves@redhat.com>
7370
7371 * linux-aarch64-low.c: Include break-common.h.
7372 (enum target_point_type): Delete.
7373 (Z_packet_to_point_type): Rename to ...
7374 (Z_packet_to_target_hw_bp_type): ... this, and return a
7375 target_hw_bp_type instead.
7376 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
7377 instead of an enum target_point_type.
7378 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
7379 breakpoint type.
7380 (aarch64_dr_state_insert_one_point)
7381 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
7382 (aarch64_handle_aligned_watchpoint)
7383 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
7384 Take an enum target_hw_bp_type instead of an enum
7385 target_point_type.
7386 (aarch64_supports_z_point_type): New function.
7387 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
7388 use Z_packet_to_target_hw_bp_type.
7389
7390 2014-05-20 Joel Brobecker <brobecker@adacore.com>
7391
7392 * configure.ac: Only use -Werror by default when DEVELOPMENT
7393 is true.
7394 * configure: Regenerate.
7395
7396 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
7397
7398 Fix gdbserver qGetTLSAddr for x86_64 -m32.
7399 * linux-x86-low.c (X86_64_USER_REGS): New.
7400 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
7401
7402 2014-04-28 Yao Qi <yao@codesourcery.com>
7403
7404 * Makefile.in (i386-avx512.c): Fix the typo of generated file
7405 name.
7406
7407 2014-04-25 Pedro Alves <palves@redhat.com>
7408
7409 PR server/16255
7410 * linux-low.c (linux_attach_fail_reason_string): New function.
7411 (linux_attach_lwp): Delete.
7412 (linux_attach_lwp_1): Rename to ...
7413 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
7414 argument. Remove "initial" parameter. Return int instead of
7415 void. Don't error or warn here.
7416 (linux_attach): Adjust to call linux_attach_lwp. Call error on
7417 failure to attach to the tgid. Call warning when failing to
7418 attach to an lwp.
7419 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
7420 argument. Remove "initial" parameter. Return int instead of
7421 void. Don't error or warn here.
7422 (linux_attach_fail_reason_string): New declaration.
7423 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
7424 interface change. Use linux_attach_fail_reason_string.
7425
7426 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
7427 Walfred Tedeschi <walfred.tedeschi@intel.com>
7428
7429 * Makefile.in: Added rules to handle new files
7430 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
7431 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
7432 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
7433 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
7434 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
7435 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
7436 x32-avx512-linux.o.
7437 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
7438 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
7439 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
7440 i386/x32-avx512.xml.
7441 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
7442 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
7443 i386/x32-avx512-linux.xml.
7444 * i387-fp.c (num_avx512_k_registers): New constant for number
7445 of K registers.
7446 (num_avx512_zmmh_low_registers): New constant for number of
7447 lower ZMM registers (0-15).
7448 (num_avx512_zmmh_high_registers): New constant for number of
7449 higher ZMM registers (16-31).
7450 (num_avx512_ymmh_registers): New contant for number of higher
7451 YMM registers (ymm16-31 added by avx521 on x86_64).
7452 (num_avx512_xmm_registers): New constant for number of higher
7453 XMM registers (xmm16-31 added by AVX512 on x86_64).
7454 (struct i387_xsave): Add space for AVX512 registers.
7455 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
7456 Add code to handle AVX512 registers.
7457 (i387_xsave_to_cache): Add code to handle AVX512 registers.
7458 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
7459 prototypei from generated file.
7460 (tdesc_amd64_avx512_linux): Likewise.
7461 (init_registers_x32_avx512_linux): Likewise.
7462 (tdesc_x32_avx512_linux): Likewise.
7463 (init_registers_i386_avx512_linux): Likewise.
7464 (tdesc_i386_avx512_linux): Likewise.
7465 (x86_64_regmap): Add AVX512 registers.
7466 (x86_linux_read_description): Add code to handle AVX512 XSTATE
7467 mask.
7468 (initialize_low_arch): Add code to initialize AVX512 registers.
7469
7470 2014-04-23 Pedro Alves <palves@redhat.com>
7471
7472 * mem-break.c (find_gdb_breakpoint_at): Make static.
7473 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
7474
7475 2014-04-23 Pedro Alves <palves@redhat.com>
7476
7477 * i386-low.c: Don't include break-common.h here.
7478 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
7479 prototype to take target_hw_bp_type as argument instead of a Z
7480 packet char.
7481 * i386-low.h: Include break-common.h here.
7482 (Z_packet_to_hw_type): Declare.
7483 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
7484 prototypes.
7485 * linux-x86-low.c (x86_insert_point): Convert the packet number to
7486 a target_hw_bp_type before calling i386_low_insert_watchpoint.
7487 (x86_remove_point): Convert the packet number to a
7488 target_hw_bp_type before calling i386_low_remove_watchpoint.
7489 * win32-i386-low.c (i386_insert_point): Convert the packet number
7490 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
7491 (i386_remove_point): Convert the packet number to a
7492 target_hw_bp_type before calling i386_low_remove_watchpoint.
7493
7494 2014-04-23 Pedro Alves <palves@redhat.com>
7495
7496 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
7497
7498 2014-04-10 Pedro Alves <palves@redhat.com>
7499
7500 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
7501 Check if the condition or command is NULL before checking if the
7502 breakpoint is known. On success, return true.
7503 * mem-break.h (add_breakpoint_condition): Document return.
7504 (add_breakpoint_commands): Add describing comment.
7505 * server.c (skip_to_semicolon): New function.
7506 (process_point_options): Use it.
7507
7508 2014-04-09 Pedro Alves <palves@redhat.com>
7509
7510 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
7511 to lwpid_of.
7512
7513 2014-02-27 Pedro Alves <palves@redhat.com>
7514
7515 PR 12702
7516 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
7517 macros.
7518 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
7519 output.
7520 (last_thread_of_process_p): Take a PID argument instead of a
7521 thread pointer.
7522 (linux_wait_for_lwp): Delete.
7523 (num_lwps, check_zombie_leaders, not_stopped_callback): New
7524 functions.
7525 (linux_low_filter_event): New function, party factored out from
7526 linux_wait_for_event.
7527 (linux_wait_for_event): Rename to ...
7528 (linux_wait_for_event_filtered): ... this. Add new filter ptid
7529 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
7530 sigsuspend. Check for zombie leaders.
7531 (linux_wait_for_event): Reimplement as wrapper around
7532 linux_wait_for_event_filtered.
7533 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
7534 a normal or signal exit is seen, it's the whole process exiting.
7535 (wait_for_sigstop): No longer a for_each_inferior callback.
7536 Rewrite on top of linux_wait_for_event_filtered.
7537 (stop_all_lwps): Call wait_for_sigstop directly.
7538 * server.c (resume, handle_target_event): Handle
7539 TARGET_WAITKIND_NO_RESUMED.
7540
7541 2014-02-26 Joel Brobecker <brobecker@adacore.com>
7542
7543 * win32-low.c (psapi_get_dll_name,
7544 * win32_CreateToolhelp32Snapshot): Delete.
7545 (win32_CreateToolhelp32Snapshot, win32_Module32First)
7546 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
7547 Delete.
7548 (handle_load_dll): Add function description.
7549 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
7550
7551 2014-02-26 Joel Brobecker <brobecker@adacore.com>
7552
7553 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
7554 Add comment.
7555 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
7556 base address when calling win32_add_one_solib.
7557 (handle_load_dll): Delete local variable load_addr.
7558 Remove 0x1000 offset applied to DLL base address when calling
7559 win32_add_one_solib.
7560 (handle_unload_dll): Add comment.
7561
7562 2014-02-26 Joel Brobecker <brobecker@adacore.com>
7563
7564 * win32-low.c (win32_add_all_dlls): Renames
7565 win32_ensure_ntdll_loaded. Rewrite function documentation.
7566 Adjust implementation to always load all DLLs.
7567 Add 0x1000 offset to DLL base address when calling
7568 win32_add_one_solib.
7569 (child_initialization_done): New static global.
7570 (do_initial_child_stuff): Set child_initialization_done to
7571 zero during child initialization, and 1 after. Replace call
7572 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
7573 Add comment.
7574 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
7575 (handle_unload_dll): Add function documentation.
7576 (get_child_debug_event): Ignore load and unload DLL events
7577 during child initialization.
7578
7579 2014-02-20 Doug Evans <dje@google.com>
7580
7581 Remove global all_lwps.
7582 * inferiors.h (ptid_of): Move here from linux-low.h.
7583 (pid_of, lwpid_of): Ditto.
7584 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
7585 parameter is a struct thread_info * now.
7586 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
7587 directly. Pass &all_threads to find_inferior instead of &all_lwps.
7588 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
7589 directly.
7590 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
7591 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
7592 * linux-arm-low.c (update_registers_callback): Update, "entry"
7593 parameter is a struct thread_info * now.
7594 Fetch lwpid from current_inferior directly.
7595 (arm_insert_point): Pass &all_threads to find_inferior instead of
7596 &all_lwps.
7597 (arm_remove_point): Ditto.
7598 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
7599 (arm_prepare_to_resume): Fetch pid from thread.
7600 (arm_read_description): Fetch lwpid from current_inferior directly.
7601 * linux-low.c (all_lwps): Delete.
7602 (delete_lwp): Delete call to remove_inferior.
7603 (handle_extended_wait): Fetch lwpid from thread.
7604 (add_lwp): Don't set lwp->entry.id. Remove call to
7605 add_inferior_to_list.
7606 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
7607 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
7608 (kill_one_lwp_callback): Ditto.
7609 (linux_kill): Don't dereference NULL pointer.
7610 Fetch ptid,lwpid from thread.
7611 (get_detach_signal): Fetch ptid from thread.
7612 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
7613 Simplify call to regcache_invalidate_thread.
7614 (delete_lwp_callback): Update, "entry" parameter is a
7615 struct thread_info * now. Fetch pid from thread.
7616 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
7617 (status_pending_p_callback): Update, "entry" parameter is a
7618 struct thread_info * now. Fetch ptid from thread.
7619 (find_lwp_pid): Update, "entry" parameter is a
7620 struct thread_info * now.
7621 (linux_wait_for_lwp): Fetch pid from thread.
7622 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
7623 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
7624 (enqueue_one_deferred_signal): Fetch lwpid from thread.
7625 (dequeue_one_deferred_signal): Ditto.
7626 (cancel_breakpoint): Fetch ptid from current_inferior.
7627 (linux_wait_for_event): Pass &all_threads to find_inferior,
7628 not &all_lwps. Fetch ptid, lwpid from thread.
7629 (count_events_callback): Update, "entry" parameter is a
7630 struct thread_info * now.
7631 (select_singlestep_lwp_callback): Ditto.
7632 (select_event_lwp_callback): Ditto.
7633 (cancel_breakpoints_callback): Ditto.
7634 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
7635 not &all_lwps.
7636 (select_event_lwp): Ditto. Fetch ptid from event_thread.
7637 (unsuspend_one_lwp): Update, "entry" parameter is a
7638 struct thread_info * now.
7639 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
7640 not &all_lwps.
7641 (linux_stabilize_threads): Ditto. And for for_each_inferior.
7642 Fetch lwpid from thread, not lwp.
7643 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
7644 Pass &all_threads to find_inferior, not &all_lwps.
7645 (send_sigstop): Fetch lwpid from thread, not lwp.
7646 (send_sigstop_callback): Update, "entry" parameter is a
7647 struct thread_info * now.
7648 (suspend_and_send_sigstop_callback): Ditto.
7649 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
7650 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
7651 struct thread_info * now.
7652 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
7653 from thread, lwp.
7654 (lwp_running): Update, "entry" parameter is a
7655 struct thread_info * now.
7656 (stop_all_lwps): Fetch ptid from thread.
7657 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
7658 (linux_resume_one_lwp): Fetch lwpid from thread.
7659 (linux_set_resume_request): Update, "entry" parameter is a
7660 struct thread_info * now. Fetch pid, lwpid from thread.
7661 (resume_status_pending_p): Update, "entry" parameter is a
7662 struct thread_info * now.
7663 (need_step_over_p): Ditto. Fetch lwpid from thread.
7664 (start_step_over): Fetch lwpid from thread.
7665 (linux_resume_one_thread): Update, "entry" parameter is a
7666 struct thread_info * now. Fetch lwpid from thread.
7667 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
7668 (proceed_one_lwp): Update, "entry" parameter is a
7669 struct thread_info * now. Fetch lwpid from thread.
7670 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
7671 struct thread_info * now.
7672 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
7673 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
7674 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
7675 directly.
7676 (regsets_store_inferior_registers): Ditto.
7677 (fetch_register, store_register): Ditto.
7678 (linux_read_memory, linux_write_memory): Ditto.
7679 (linux_request_interrupt): Ditto.
7680 (linux_read_auxv): Ditto.
7681 (linux_xfer_siginfo): Ditto.
7682 (linux_qxfer_spu): Ditto.
7683 (linux_qxfer_libraries_svr4): Ditto.
7684 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
7685 moved to inferiors.h.
7686 (get_lwp): Delete.
7687 (get_thread_lwp): Update.
7688 (struct lwp_info): Delete member "entry". Simplify comment for
7689 member "thread".
7690 (all_lwps): Delete.
7691 * linux-mips-low.c (mips_read_description): Fetch lwpid from
7692 current_inferior directly.
7693 (update_watch_registers_callback): Update, "entry" parameter is a
7694 struct thread_info * now. Fetch pid from thread.
7695 (mips_linux_prepare_to_resume): Fetch ptid from thread.
7696 (mips_insert_point): Fetch lwpid from current_inferior.
7697 Pass &all_threads to find_inferior, not &all_lwps.
7698 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
7699 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
7700 directly.
7701 (mips_stopped_data_address): Ditto.
7702 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
7703 directly.
7704 * linux-tile-low.c (tile_arch_setup): Ditto.
7705 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
7706 (update_debug_registers_callback): Update, "entry" parameter is a
7707 struct thread_info * now. Fetch pid from thread.
7708 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
7709 Pass &all_threads to find_inferior, not &all_lwps.
7710 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
7711 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
7712 Pass &all_threads to find_inferior, not &all_lwps.
7713 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
7714 (i386_dr_low_get_status): Ditto.
7715 (x86_linux_prepare_to_resume): Fetch ptid from thread.
7716 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
7717 (x86_linux_read_description): Ditto.
7718 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
7719
7720 2014-02-20 Doug Evans <dje@google.com>
7721
7722 * inferiors.c (get_first_inferior): Fix buglet.
7723
7724 2014-02-19 Doug Evans <dje@google.com>
7725
7726 * gdbthread.h (add_thread): Change result type to struct thread_info *.
7727 * inferiors.c (add_thread): Change result type to struct thread_info *.
7728 All callers updated.
7729 (add_lwp): Call add_thread here instead of in callers.
7730 All callers updated.
7731 * linux-low.h (get_lwp_thread): Rewrite.
7732 (struct lwp_info): New member "thread".
7733
7734 2014-02-19 Doug Evans <dje@google.com>
7735
7736 * linux-low.c (add_lwp): Change result to struct lwp_info *.
7737 All callers updated.
7738
7739 2014-02-19 Doug Evans <dje@google.com>
7740
7741 * inferiors.c (add_thread): Fix whitespace.
7742
7743 2014-02-19 Doug Evans <dje@google.com>
7744
7745 * dll.c (clear_dlls): Replace accessing list implemention details
7746 with API function.
7747 * gdbthread.h (get_first_thread): Declare.
7748 * inferiors.c (for_each_inferior_with_data): New function.
7749 (get_first_thread): New function.
7750 (find_thread_ptid): Simplify.
7751 (get_first_inferior): New function.
7752 (clear_list): Delete.
7753 (one_inferior_p): New function.
7754 (clear_inferior_list): New function.
7755 (clear_inferiors): Update.
7756 * inferiors.h (for_each_inferior_with_data): Declare.
7757 (clear_inferior_list): Declare.
7758 (one_inferior_p): Declare.
7759 (get_first_inferior): Declare.
7760 * linux-low.c (linux_wait_for_event): Replace accessing list
7761 implemention details with API function.
7762 * server.c (target_running): Ditto.
7763 (accumulate_file_name_length): New function.
7764 (emit_dll_description): New function.
7765 (handle_qxfer_libraries): Replace accessing list implemention
7766 details with API function.
7767 (handle_qxfer_threads_worker): New function.
7768 (handle_qxfer_threads_proper): Replace accessing list implemention
7769 details with API function.
7770 (handle_query): Ditto.
7771 (visit_actioned_threads_callback_ftype): New typedef.
7772 (visit_actioned_threads_data): New struct.
7773 (visit_actioned_threads): Rewrite to be find_inferior callback.
7774 (resume): Call find_inferior.
7775 (handle_status): Replace accessing list implemention
7776 details with API function.
7777 (process_serial_event): Replace accessing list implemention details
7778 with API function.
7779 * target.c (set_desired_inferior): Replace accessing list implemention
7780 details with API function.
7781 * tracepoint.c (same_process_p): New function.
7782 (gdb_agent_about_to_close): Replace accessing list implemention
7783 details with API function.
7784 * win32-low.c (child_delete_thread): Replace accessing list
7785 implemention details with API function.
7786 (match_dll_by_basename): New function.
7787 (dll_is_loaded_by_basename): New function.
7788 (win32_ensure_ntdll_loaded): Replace accessing list implemention
7789 details call to dll_is_loaded_by_basename.
7790
7791 2014-02-19 Doug Evans <dje@google.com>
7792
7793 * dll.h (struct dll_info): Add comment.
7794 * gdbthread.h (struct thread_info): Add comment.
7795 (current_ptid): Simplify.
7796 * inferiors.c (add_process): Update.
7797 (remove_process): Update.
7798 * inferiors.h (struct process_info): Rename member "head" to "entry".
7799 * linux-low.c (delete_lwp): Update.
7800 (add_lwp): Update.
7801 (last_thread_of_process_p): Update.
7802 (kill_one_lwp_callback, linux_kill): Update.
7803 (status_pending_p_callback): Update.
7804 (wait_for_sigstop): Update. Simplify read of ptid.
7805 (start_step_over): Update.
7806 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
7807 (get_lwp_thread): Update.
7808 (struct lwp_info): Rename member "head" to "entry".
7809 * regcache.h (inferior_list_entry): Delete.
7810 * server.c (kill_inferior_callback): Update.
7811 (detach_or_kill_inferior_callback): Update.
7812 (print_started_pid): Update.
7813 (print_attached_pid): Update.
7814 (process_serial_event): Simplify read of ptid.
7815 * thread-db.c (thread_db_create_event): Update.
7816 (thread_db_get_tls_address): Update.
7817 * win32-low.c (current_inferior_ptid): Simplify.
7818
7819 2014-02-19 Tom Tromey <tromey@redhat.com>
7820
7821 * target.h (struct target_ops) <supports_btrace>: Add target_ops
7822 argument.
7823 (target_supports_btrace): Update.
7824
7825 2014-02-14 Yao Qi <yao@codesourcery.com>
7826
7827 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
7828 (rsp-low-ipa.o): New target.
7829
7830 2014-02-12 Tom Tromey <tromey@redhat.com>
7831
7832 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
7833 convert_ascii_to_int.
7834 * regcache.c (registers_to_string): Likewise.
7835 * remote-utils.c (decode_M_packet): Likewise.
7836 * server.c (process_serial_event): Likewise.
7837
7838 2014-02-12 Tom Tromey <tromey@redhat.com>
7839
7840 * server.c (handle_query, handle_v_run): Use hex2bin, not
7841 unhexify.
7842 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
7843
7844 2014-02-12 Tom Tromey <tromey@redhat.com>
7845
7846 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
7847 convert_int_to_ascii.
7848 * regcache.c (registers_to_string, collect_register_as_string):
7849 Likewise.
7850 * remote-utils.c (look_up_one_symbol, relocate_instruction):
7851 Likewise.
7852 * server.c (process_serial_event): Likewise.
7853 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
7854 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
7855
7856 2014-02-12 Tom Tromey <tromey@redhat.com>
7857
7858 * remote-utils.c (look_up_one_symbol, monitor_output): Use
7859 bin2hex, not hexify.
7860 * tracepoint.c (cmd_qtstatus): Likewise.
7861
7862 2014-02-12 Tom Tromey <tromey@redhat.com>
7863
7864 * remote-utils.c (monitor_output): Pass explicit length to
7865 hexify.
7866
7867 2014-02-12 Tom Tromey <tromey@redhat.com>
7868
7869 * tracepoint.c: Include rsp-low.h.
7870 * server.c: Include rsp-low.h.
7871 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
7872 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
7873 declare.
7874 * remote-utils.c: Include rsp-low.h.
7875 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
7876 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
7877 (convert_int_to_ascii, convert_ascii_to_int): Move to
7878 common/rsp-low.c.
7879 * regcache.c: Include rsp-low.h.
7880 * ax.c: Include rsp-low.h.
7881 * Makefile.in (SFILES): Add common/rsp-low.c.
7882 (OBS): Add rsp-low.o.
7883 (rsp-low.o): New target.
7884
7885 2014-02-12 Tom Tromey <tromey@redhat.com>
7886
7887 * utils.h (pulongest, plongest, phex_nz): Don't declare.
7888 Include print-utils.h.
7889 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
7890 (plongest, thirty_two, phex_nz): Remove.
7891 * Makefile.in (SFILES): Add common/print-utils.c.
7892 (OBS): Add print-utils.o.
7893 (print-utils-ipa.o): New target.
7894 (print-utils.o): New target.
7895 (IPA_OBJS): Add print-utils-ipa.o.
7896
7897 2014-02-06 Tom Tromey <tromey@redhat.com>
7898
7899 * Makefile.in (SFILES): Fix indentation.
7900
7901 2014-02-05 Doug Evans <dje@google.com>
7902
7903 * linux-low.c (linux_wait_for_event): Improve comment.
7904 (linux_wait_1): Keep current_inferior in sync with event_child.
7905
7906 2014-01-22 Doug Evans <dje@google.com>
7907
7908 * gdbthread.h (gdb_id_to_thread): Delete, unused.
7909
7910 2014-01-22 Doug Evans <dje@google.com>
7911
7912 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
7913 * configure: Regenerate.
7914 * config.in: Regenerate.
7915 * Makefile.in (SFILES): Add debug.c.
7916 (OBS): Add debug.o.
7917 * debug.c: New file.
7918 * debug.h: New file.
7919 * linux-aarch64-low.c (*): Update all debugging printfs to use
7920 debug_printf instead of fprintf.
7921 * linux-arm-low.c (*): Ditto.
7922 * linux-cris-low.c (*): Ditto.
7923 * linux-crisv32-low.c (*): Ditto.
7924 * linux-m32r-low.c (*): Ditto.
7925 * linux-sparc-low.c (*): Ditto.
7926 * linux-x86.c (*): Ditto.
7927 * linux-low.c (*): Ditto.
7928 (linux_wait_1): Add calls to debug_enter, debug_exit.
7929 (linux_wait): Remove redundant debugging printf.
7930 (stop_all_lwps): Add calls to debug_enter, debug_exit.
7931 (linux_resume, unstop_all_lwps): Ditto.
7932 * mem-break.c (*): Update all debugging printfs to use
7933 debug_printf instead of fprintf.
7934 * remote-utils.c (*): Ditto.
7935 * thread-db.c (*): Ditto.
7936 * server.c #include <ctype.h>, "gdb_vecs.h".
7937 (debug_threads): Moved to debug.c.
7938 (*): Update all debugging printfs to use debug_printf instead of
7939 fprintf.
7940 (start_inferior): Replace call to fflush with call to debug_flush.
7941 (monitor_show_help): Mention set debug-format.
7942 (parse_debug_format_options): New function.
7943 (handle_monitor_command): Handle "monitor set debug-format".
7944 (gdbserver_usage): Mention --debug-format.
7945 (main): Parse --debug-format.
7946 * server.h (debug_threads): Declaration moved to debug.h.
7947 #include "debug.h".
7948 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
7949 trace_debug_1 that uses debug_printf.
7950 (tracepoint_look_up_symbols): Update all debugging printfs to use
7951 debug_printf instead of fprintf.
7952
7953 2014-01-20 Baruch Siach <baruch@tkos.co.il>
7954
7955 * linux-xtensa-low.c: Include asm/ptrace.h instead of
7956 sys/ptrace.h.
7957
7958 2014-01-17 Pedro Alves <palves@redhat.com>
7959
7960 PR build/16445
7961 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
7962 defined after including gdb_proc_service.h.
7963
7964 2014-01-16 Doug Evans <dje@google.com>
7965
7966 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
7967 (match_dll): Use it.
7968
7969 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
7970
7971 * target.h (target_ops) <read_btrace>: Change parameters and
7972 return type to allow error reporting.
7973 * server.c (handle_qxfer_btrace): Support delta reads. Pass
7974 trace reading errors on.
7975 * linux-low.c (linux_low_read_btrace): Pass trace reading
7976 errors on.
7977 (linux_low_disable_btrace): New.
7978
7979 2014-01-15 Doug Evans <dje@google.com>
7980
7981 * inferiors.c (thread_id_to_gdb_id): Delete.
7982 * inferiors.h (thread_id_to_gdb_id): Delete.
7983
7984 2014-01-13 Eli Zaretskii <eliz@gnu.org>
7985
7986 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
7987 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
7988 versions.
7989
7990 2014-01-08 Pedro Alves <palves@redhat.com>
7991
7992 * server.c (handle_status): Don't discard previous queued stop
7993 replies or thread's pending status here.
7994 (main) <disconnection>: Do it here instead.
7995
7996 2014-01-08 Pedro Alves <palves@redhat.com>
7997
7998 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
7999 * server.c (visit_actioned_threads, handle_pending_status): New
8000 function.
8001 (handle_v_cont): Factor out parts to ...
8002 (resume): ... this new function. If in all-stop, and a thread
8003 being resumed has a pending status, report it without actually
8004 resuming.
8005 (myresume): Adjust to use the new 'resume' function.
8006 (clear_pending_status_callback, set_pending_status_callback)
8007 (find_status_pending_thread_callback): New functions.
8008 (handle_status): Handle the case of multiple threads having
8009 interesting statuses to report. Report threads' real last signal
8010 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
8011 with an interesting thread to report the status for, instead of
8012 always reporting the status of the first thread.
8013
8014 2014-01-01 Joel Brobecker <brobecker@adacore.com>
8015
8016 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
8017 * gdbreplay.c (gdbreplay_version): Likewise.
8018
8019 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
8020
8021 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
8022 iov.iov_len with the real length in use.
8023
8024 2013-12-13 Joel Brobecker <brobecker@adacore.com>
8025
8026 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
8027 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
8028 for all targets that use win32-low.c.
8029 * win32-low.c (win32_ensure_ntdll_loaded): New function.
8030 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
8031
8032 2013-12-13 Pedro Alves <palves@redhat.com>
8033
8034 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
8035 if equal to TARGET_WAITKIND_LOADED.
8036 * win32-low.c (cached_status): New static global.
8037 (win32_wait): Add declaration.
8038 (do_initial_child_stuff): Flush all initial pending debug events
8039 up to the initial breakpoint.
8040 (win32_wait): If CACHED_STATUS was set, return that instead
8041 of doing a real wait. Remove the code resuming the execution
8042 of the inferior after receiving a TARGET_WAITKIND_LOADED event
8043 during the initial phase. Also remove the code changing
8044 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
8045 TARGET_WAITKIND_STOPPED.
8046
8047 2013-12-11 Yao Qi <yao@codesourcery.com>
8048
8049 * notif.c (handle_notif_ack): Return 0 if no notification
8050 matches.
8051
8052 2013-11-20 Doug Evans <dje@google.com>
8053
8054 * linux-low.c (linux_set_resume_request): Fix comment.
8055
8056 2013-11-20 Doug Evans <dje@google.com>
8057
8058 * linux-low.c (resume_status_pending_p): Tweak comment.
8059
8060 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
8061
8062 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
8063 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
8064 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
8065 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
8066 (srv_amd64_regobj): Add amd64-mpx.o.
8067 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
8068 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
8069 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
8070 * i387-fp.c (num_pl_bnd_register) Added constant.
8071 (num_pl_bnd_cfg_registers) Added constant.
8072 (struct i387_xsave) Added reserved area and MPX fields.
8073 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
8074 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
8075 function.
8076 (tdesc_i386_mpx_linux): Add MPX amd64 target.
8077 (init_registers_amd64_mpx_linux): Declare new function.
8078 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
8079 (x86_64_regmap): Add MPX registers.
8080 (x86_linux_read_description): Add MPX case.
8081 (initialize_low_arch): Initialize MPX targets.
8082
8083 2013-11-18 Tom Tromey <tromey@redhat.com>
8084
8085 * configure: Rebuild.
8086 * configure.ac: Don't check for stdlib.h.
8087 * gdbreplay.c: Unconditionally include stdlib.h.
8088
8089 2013-11-18 Tom Tromey <tromey@redhat.com>
8090
8091 * config.in: Rebuild.
8092 * configure: Rebuild.
8093 * configure.ac: Don't use AC_HEADER_DIRENT.
8094
8095 2013-11-18 Tom Tromey <tromey@redhat.com>
8096
8097 * server.h: Don't check HAVE_STRING_H.
8098 * gdbreplay.c: Don't check HAVE_STRING_H.
8099 * configure: Rebuild.
8100
8101 2013-11-18 Tom Tromey <tromey@redhat.com>
8102
8103 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
8104 LIBGNU.
8105
8106 2013-11-08 Tom Tromey <tromey@redhat.com>
8107
8108 * configure, config.in: Rebuild.
8109 * configure.ac: Remove unused configury.
8110
8111 2013-11-08 Tom Tromey <tromey@redhat.com>
8112
8113 * acinclude.m4: Include common.m4, codeset.m4.
8114 * configure, config.in: Rebuild.
8115 * configure.ac: Use GDB_AC_COMMON.
8116
8117 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
8118
8119 * linux-s390-low.c (HWCAP_S390_TE): New define.
8120 (s390_arch_setup): Consider the TE field in the HWCAP for
8121 determining 'have_regset_tdb'.
8122
8123 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
8124
8125 PR gdb/16014
8126 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
8127 call to sizeof.
8128
8129 2013-10-02 Pedro Alves <palves@redhat.com>
8130
8131 * server.c (process_serial_event): Don't output "GDBserver
8132 exiting" if GDB is connected through stdio.
8133 * target.c (mywait): Likewise, be silent if GDB is connected
8134 through stdio.
8135
8136 2013-10-01 Joel Brobecker <brobecker@adacore.com>
8137
8138 * lynx-low.c (lynx_add_threads_after_attach): New function.
8139 (lynx_attach): Remove call to add_thread. Add call to
8140 lynx_add_threads_after_attach instead.
8141
8142 2013-09-28 Mike Frysinger <vapier@gentoo.org>
8143
8144 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
8145 * config.in, configure: Regenerated.
8146
8147 2013-09-18 Yao Qi <yao@codesourcery.com>
8148
8149 PR server/15959
8150 * server.c (start_inferior): Clear 'resume_info'.
8151
8152 2013-09-16 Jiong Wang <jiwang@tilera.com>
8153
8154 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
8155 for each register.
8156
8157 2013-09-16 Jiong Wang <jiwang@tilera.com>
8158
8159 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
8160 linux-tile-low.o to srv_tgtobj.
8161
8162 2013-09-16 Will Newton <will.newton@linaro.org>
8163
8164 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
8165 out regs.
8166
8167 2013-09-06 Pedro Alves <palves@redhat.com>
8168
8169 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
8170 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
8171 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
8172 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
8173 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
8174 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
8175
8176 2013-09-06 Pedro Alves <palves@redhat.com>
8177
8178 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
8179 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
8180
8181 2013-09-06 Pedro Alves <palves@redhat.com>
8182
8183 * linux-amd64-ipa.c: Include tracepoint.h.
8184 * linux-i386-ipa.c: Include tracepoint.h.
8185
8186 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
8187
8188 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
8189 (ps_get_thread_area): New function.
8190
8191 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
8192
8193 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
8194 (initialize_low_arch): Call init_registers_crisv32 rather than
8195 init_register_crisv32.
8196
8197 2013-09-05 Pedro Alves <palves@redhat.com>
8198
8199 * server.h (handle_vFile, hostio_last_error_from_errno): Move
8200 to ...
8201 * hostio.h: ... this new file.
8202 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
8203 win32-low.c: Include hostio.h.
8204
8205 2013-09-05 Pedro Alves <palves@redhat.com>
8206
8207 * server.h (gdb_client_data, handler_func, callback_handler_func)
8208 (delete_file_handler, add_file_handler, append_callback_event)
8209 (delete_callback_event, start_event_loop, initialize_event_loop):
8210 Move to event-loop.h and include it.
8211 * event-loop.h: New file.
8212
8213 2013-09-05 Pedro Alves <palves@redhat.com>
8214
8215 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
8216 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
8217 (loaded_dll, unloaded_dll): Move to ...
8218 * dll.h: ... this new file.
8219 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
8220
8221 2013-09-05 Pedro Alves <palves@redhat.com>
8222
8223 * server.h (current_process, get_thread_process, all_processes)
8224 (add_inferior_to_list, for_each_inferior, current_inferior)
8225 (remove_inferior, add_process, remove_process, find_process_pid)
8226 (have_started_inferiors_p, have_attached_inferiors_p)
8227 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
8228 (clear_inferiors, find_inferior, find_inferior_id)
8229 (inferior_target_data, set_inferior_target_data)
8230 (inferior_regcache_data, set_inferior_regcache_data): Move to
8231 inferiors.h, and include it.
8232 * inferiors.h: New file.
8233
8234 2013-09-05 Pedro Alves <palves@redhat.com>
8235
8236 * server.h (struct emit_ops, current_insn_ptr, emit_error):
8237 Move ...
8238 * ax.h: ... here.
8239
8240 2013-09-05 Pedro Alves <palves@redhat.com>
8241
8242 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
8243 tracepoint.h.
8244 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
8245 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
8246 (handle_tracepoint_general_set, handle_tracepoint_query)
8247 (tracepoint_finished_step, tracepoint_was_hit)
8248 (release_while_stepping_state_list, current_traceframe)
8249 (in_readonly_region, traceframe_read_mem)
8250 (fetch_traceframe_registers, traceframe_read_sdata)
8251 (traceframe_read_info, struct fast_tpoint_collect_status)
8252 (fast_tracepoint_collecting, force_unlock_trace_buffer)
8253 (handle_tracepoit_bkpts, initialize_low_tracepoint)
8254 (supply_fast_tracepoint_registers)
8255 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
8256 (ipa_tdesc, claim_trampoline_space)
8257 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
8258 (agent_mem_read, agent_get_trace_state_variable_value)
8259 (agent_set_trace_state_variable_value, agent_tsv_read)
8260 (agent_mem_read_string, get_raw_reg_func_addr)
8261 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
8262 * tracepoint.h: ... this new file.
8263
8264 2013-09-05 Pedro Alves <palves@redhat.com>
8265
8266 * server.h (perror_with_name, error, fatal, warning, paddress)
8267 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
8268 include it.
8269 * utils.h: New file.
8270
8271 2013-09-05 Pedro Alves <palves@redhat.com>
8272
8273 * server.h (remote_debug, noack_mode, transport_is_reliable)
8274 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
8275 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
8276 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
8277 (write_enn, initialize_async_io, enable_async_io)
8278 (disable_async_io, check_remote_input_interrupt_request)
8279 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
8280 (dead_thread_notify, prepare_resume_reply)
8281 (decode_address_to_semicolon, decode_address, decode_m_packet)
8282 (decode_M_packet, decode_X_packet, decode_xfer_write)
8283 (decode_search_memory_packet, unhexify, hexify)
8284 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
8285 (look_up_one_symbol, relocate_instruction)
8286 (monitor_output): Move to remote-utils.h, and include it.
8287 * remote-utils.h: New file.
8288
8289 2013-09-05 Pedro Alves <palves@redhat.com>
8290
8291 * server.h (_): Delete.
8292
8293 2013-09-02 Pedro Alves <palves@redhat.com>
8294
8295 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
8296 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
8297 allocated.
8298 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
8299
8300 2013-09-02 Pierre Muller <muller@sourceware.org>
8301
8302 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
8303 or WriteProcessMemory complete successfully and handle
8304 ERROR_PARTIAL_COPY error.
8305
8306 2013-09-02 Pedro Alves <palves@redhat.com>
8307
8308 * server.c (gdb_read_memory): Return -1 on traceframe memory read
8309 error instead of EIO.
8310
8311 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8312
8313 PR server/15604
8314 * linux-low.c: Include filestuff.h.
8315 (linux_create_inferior) <pid == 0>: Call close_most_fds.
8316 * lynx-low.c: Include filestuff.h.
8317 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
8318 * server.c: Include filestuff.h.
8319 (main): Call notice_open_fds.
8320 * spu-low.c: Include filestuff.h.
8321 (spu_create_inferior) <pid == 0>: Call close_most_fds.
8322
8323 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
8324
8325 * Makefile.in: Explain why ../target and ../nat are not
8326 listed as include file search paths.
8327 (linux-waitpid.o): New object file rule.
8328 * configure.srv (srv_native_linux_obj): New variable.
8329 Replace all occurrences of linux native object files with
8330 $srv_native_linux_obj.
8331 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
8332 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
8333 (linux_enable_event_reporting): Remove declaration.
8334 (my_waitpid): Moved to common/linux-waitpid.c.
8335 (linux_wait_for_event): Pass ptid when calling
8336 linux_enable_event_reporting.
8337 (linux_supports_tracefork_flag): Remove.
8338 (linux_enable_event_reporting): Likewise.
8339 (linux_tracefork_grandchild): Remove.
8340 (STACK_SIZE): Moved to common/linux-ptrace.c.
8341 (linux_tracefork_child): Remove.
8342 (linux_test_for_tracefork): Remove.
8343 (linux_look_up_symbols): Call linux_supports_traceclone.
8344 (initialize_low): Remove call to linux_test_for_tracefork.
8345 * linux-low.h (PTRACE_TYPE_ARG3): Move to
8346 common/linux-ptrace.h.
8347 (PTRACE_TYPE_ARG4): Likewise.
8348 Include linux-ptrace.h.
8349
8350 2013-08-21 Pedro Alves <palves@redhat.com>
8351
8352 * config.in: Renegerate.
8353
8354 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
8355
8356 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
8357 (SFILES): Remove $(srcdir)/common/target-common.c and
8358 add $(srcdir)/target/waitstatus.c.
8359 (OBS): Remove target-common.o and add waitstatus.o.
8360 (server_h): Remove $(srcdir)/../common/target-common.h and
8361 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
8362 and $(srcdir)/../target/waitstatus.h.
8363 (target-common.o): Remove.
8364 (waitstatus.o): New target object file.
8365 * target.h: Do not include target-common.h and
8366 include target/resume.h, target/wait.h and
8367 target/waitstatus.h.
8368
8369 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
8370
8371 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
8372 to PTRACE_TYPE_ARG3.
8373 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
8374 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
8375 PTRACE_TYPE_ARG4.
8376 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
8377 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
8378
8379 2013-07-27 Jie Zhang <jie@codesourcery.com>
8380 Daniel Jacobowitz <dan@codesourcery.com>
8381 Yao Qi <yao@codesourcery.com>
8382
8383 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
8384 (mips-linux-watch.o): New rule.
8385 (mips_linux_watch_h): New variable.
8386 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
8387 srv_tgtobj.
8388 * linux-mips-low.c: Include mips-linux-watch.h.
8389 (struct arch_process_info, struct arch_lwp_info): New.
8390 (update_watch_registers_callback): New function.
8391 (mips_linux_new_process, mips_linux_new_thread) New functions.
8392 (mips_linux_prepare_to_resume, mips_insert_point): New
8393 functions.
8394 (mips_remove_point, mips_stopped_by_watchpoint): New
8395 functions.
8396 (rsp_bp_type_to_target_hw_bp_type): New function.
8397 (mips_stopped_data_address): New function.
8398 (the_low_target): Add watchpoint support functions.
8399
8400 2013-07-27 Yao Qi <yao@codesourcery.com>
8401
8402 * i386-low.c: Include break-common.h.
8403 (enum target_hw_bp_type): Remove.
8404
8405 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
8406
8407 * Makefile.in (SFILES): /common/target-common.c.
8408 (OBS): Add target-common.o.
8409 (server_h): Add $(srcdir)/../common/target-common.h.
8410 (target-common.o): New target.
8411 * server.c (queue_stop_reply_callback): Free
8412 status string after use.
8413 * target.c (target_waitstatus_to_string): Remove.
8414 * target.h: Include target-common.h.
8415 (resume_kind): Likewise.
8416 (target_waitkind): Likewise.
8417 (target_waitstatus): Likewise.
8418 (TARGET_WNOHANG): Likewise.
8419
8420 2013-07-04 Yao Qi <yao@codesourcery.com>
8421
8422 * Makefile.in (host_alias): Use @host_noncanonical@.
8423 (target_alias): Use @target_noncanonical@.
8424 * configure.ac: Use ACX_NONCANONICAL_TARGET and
8425 ACX_NONCANONICAL_HOST.
8426 * configure: Regenerated.
8427
8428 Revert:
8429 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
8430
8431 * configure.ac (version_host, version_target): Set and AC_SUBST them.
8432 * configure: Rebuild.
8433 * Makefile.in (version_host, version_target): Get from configure.
8434 (version.c): Use $(version_host) and $(version_target).
8435
8436 2013-07-03 Pedro Alves <palves@redhat.com>
8437
8438 * Makefile.in (config.status): Depend on development.sh.
8439 * acinclude.m4: Include libmcheck.m4.
8440 * configure: Regenerate.
8441
8442 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
8443
8444 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
8445 attribute inside the parentheses.
8446 (winapi_DebugSetProcessKillOnExit): Ditto.
8447 (winapi_DebugBreakProcess): Ditto.
8448 (winapi_GenerateConsoleCtrlEvent): Ditto.
8449
8450 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
8451
8452 * notif.h (notif_event): Add a dummy member to avoid compiler
8453 errors.
8454
8455 2013-07-01 Pedro Alves <palves@redhat.com>
8456
8457 * hostio.c (HOSTIO_PATH_MAX): Define.
8458 (require_filename, handle_open, handle_unlink, handle_readlink):
8459 Use it.
8460
8461 2013-07-01 Pedro Alves <palves@redhat.com>
8462
8463 * server.h: Include "pathmax.h".
8464 * linux-low.c: Don't include sys/param.h.
8465 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
8466 MAXPATHLEN.
8467 * win32-low.c: Don't include sys/param.h.
8468 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
8469
8470 2013-07-01 Pedro Alves <palves@redhat.com>
8471
8472 * event-loop.c: Don't check HAVE_UNISTD_H before including
8473 <unistd.h>.
8474 * gdbreplay.c: Likewise.
8475 * remote-utils.c: Likewise.
8476 * server.c: Likewise.
8477 * configure.ac: Don't check for unistd.h.
8478 * configure: Regenerate.
8479
8480 2013-06-28 Tom Tromey <tromey@redhat.com>
8481
8482 * Makefile.in (version.c): Use version.in, not
8483 common/version.in.
8484
8485 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
8486
8487 * configure.ac (version_host, version_target): Set and AC_SUBST them.
8488 * configure: Rebuild.
8489 * Makefile.in (version_host, version_target): Get from configure.
8490 (version.c): Use $(version_host) and $(version_target).
8491
8492 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
8493
8494 Fix trace-status to output user name without trailing colon.
8495 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
8496
8497 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
8498
8499 Fix trace-status to output proper start-time and stop-time.
8500 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
8501 output start time and stop time in hex as gdb expects.
8502
8503 2013-06-26 Pedro Alves <pedro@codesourcery.com>
8504
8505 * tracepoint.c (build_traceframe_info_xml): Output trace state
8506 variables present in the trace buffer.
8507
8508 2013-06-24 Tom Tromey <tromey@redhat.com>
8509
8510 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
8511 create-version.sh.
8512 (version.o): Remove.
8513 * gdbreplay.c: Include version.h.
8514 (version, host_name): Don't declare.
8515 * server.h: Include version.h.
8516 (version, host_name): Don't declare.
8517
8518 2013-06-12 Pedro Alves <palves@redhat.com>
8519
8520 * linux-x86-low.c (linux_is_elf64): Delete global.
8521 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
8522 with local linux_pid_exe_is_elf_64_file use.
8523
8524 2013-06-11 Pedro Alves <palves@redhat.com>
8525
8526 * linux-low.c (regset_disabled, disable_regset): New functions.
8527 (regsets_fetch_inferior_registers)
8528 (regsets_store_inferior_registers): Use them.
8529 (initialize_regsets_info); Don't allocate the disabled_regsets
8530 array here.
8531 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
8532 comment.
8533
8534 2013-06-11 Pedro Alves <palves@redhat.com>
8535
8536 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
8537 xmalloc.
8538
8539 2013-06-11 Pedro Alves <palves@redhat.com>
8540
8541 * linux-x86-low.c (initialize_low_arch): Call
8542 init_registers_x32_avx_linux.
8543
8544 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
8545
8546 Fix compatibility with Android Bionic.
8547 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
8548 it is not empty.
8549
8550 2013-06-07 Pedro Alves <palves@redhat.com>
8551
8552 PR server/14823
8553 * Makefile.in (OBS): Add tdesc.o.
8554 (IPA_OBJS): Add tdesc-ipa.o.
8555 (tdesc-ipa.o): New rule.
8556 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
8557 interface.
8558 * linux-low.c (new_inferior): Delete.
8559 (disabled_regsets, num_regsets): Delete.
8560 (linux_add_process): Adjust to set the new per-process
8561 new_inferior flag.
8562 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
8563 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
8564 was a stop. When calling arch_setup, switch the current inferior
8565 to the thread that got an event.
8566 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
8567 (regsets_fetch_inferior_registers)
8568 (regsets_store_inferior_registers): New regsets_info parameter.
8569 Adjust to use it.
8570 (linux_register_in_regsets): New regs_info parameter. Adjust to
8571 use it.
8572 (register_addr, fetch_register, store_register): New usrregs_info
8573 parameter. Adjust to use it.
8574 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
8575 parameter regs_info. Adjust to use it.
8576 (linux_fetch_registers): Get the current inferior's regs_info, and
8577 adjust to use it.
8578 (linux_store_registers): Ditto.
8579 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
8580 (initialize_low): Don't initialize the target_regsets here. Call
8581 initialize_low_arch.
8582 * linux-low.h (target_regsets): Delete declaration.
8583 (struct regsets_info): New.
8584 (struct usrregs_info): New.
8585 (struct regs_info): New.
8586 (struct process_info_private) <new_inferior>: New field.
8587 (struct linux_target_ops): Delete the num_regs, regmap, and
8588 regset_bitmap fields. New field regs_info.
8589 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
8590 * i387-fp.c (num_xmm_registers): Delete.
8591 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
8592 calls to new interface.
8593 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
8594 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
8595 Infer the number of xmm registers from the regcache's target
8596 description.
8597 * i387-fp.h (num_xmm_registers): Delete.
8598 * inferiors.c (add_thread): Don't install the thread's regcache
8599 here.
8600 * proc-service.c (gregset_info): Fetch the current inferior's
8601 regs_info. Adjust to use it.
8602 * regcache.c: Include tdesc.h.
8603 (register_bytes, reg_defs, num_registers)
8604 (gdbserver_expedite_regs): Delete.
8605 (get_thread_regcache): If the thread doesn't have a regcache yet,
8606 create one, instead of aborting gdbserver.
8607 (regcache_invalidate_one): Rename to ...
8608 (regcache_invalidate_thread): ... this.
8609 (regcache_invalidate_one): New.
8610 (regcache_invalidate): Only invalidate registers of the current
8611 process.
8612 (init_register_cache): Add target_desc parameter, and use it.
8613 (new_register_cache): Ditto. Assert the target description has a
8614 non zero registers_size.
8615 (regcache_cpy): Add assertions. Adjust.
8616 (realloc_register_cache, set_register_cache): Delete.
8617 (registers_to_string, registers_from_string): Adjust.
8618 (find_register_by_name, find_regno, find_register_by_number)
8619 (register_cache_size): Add target_desc parameter, and use it.
8620 (free_register_cache_thread, free_register_cache_thread_one)
8621 (regcache_release, register_cache_size): New.
8622 (register_size): Add target_desc parameter, and use it.
8623 (register_data, supply_register, supply_register_zeroed)
8624 (supply_regblock, supply_register_by_name, collect_register)
8625 (collect_register_as_string, collect_register_by_name): Adjust.
8626 * regcache.h (struct target_desc): Forward declare.
8627 (struct regcache) <tdesc>: New field.
8628 (init_register_cache, new_register_cache): Add target_desc
8629 parameter.
8630 (regcache_invalidate_thread): Declare.
8631 (regcache_invalidate_one): Delete declaration.
8632 (regcache_release): Declare.
8633 (find_register_by_number, register_cache_size, register_size)
8634 (find_regno): Add target_desc parameter.
8635 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
8636 declarations.
8637 * remote-utils.c: Include tdesc.h.
8638 (outreg, prepare_resume_reply): Adjust.
8639 * server.c: Include tdesc.h.
8640 (gdbserver_xmltarget): Delete declaration.
8641 (get_features_xml, process_serial_event): Adjust.
8642 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
8643 declare.
8644 (struct process_info) <tdesc>: New field.
8645 (ipa_tdesc): Declare.
8646 * tdesc.c: New file.
8647 * tdesc.h: New file.
8648 * tracepoint.c: Include tdesc.h.
8649 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
8650 (get_context_regcache): Adjust to pass ipa_tdesc down.
8651 (do_action_at_tracepoint): Adjust to get the register cache size
8652 from the context regcache's description.
8653 (traceframe_walk_blocks): Adjust to get the register cache size
8654 from the current trace frame's description.
8655 (traceframe_get_pc): Adjust to get current trace frame's
8656 description and pass it down.
8657 (gdb_collect): Adjust to get the register cache size from the
8658 IPA's description.
8659 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
8660 (gdbserver_xmltarget): Delete.
8661 (initialize_low_tracepoint): Set the ipa's target description.
8662 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
8663 (initialize_low_tracepoint): Set the ipa's target description.
8664 * linux-x86-low.c: Include tdesc.h.
8665 [__x86_64__] (is_64bit_tdesc): New.
8666 (ps_get_thread_area, x86_get_thread_area): Use it.
8667 (i386_cannot_store_register): Rename to ...
8668 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
8669 (i386_cannot_fetch_register): Rename to ...
8670 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
8671 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
8672 to new interface.
8673 (target_regsets): Rename to ...
8674 (x86_regsets): ... this.
8675 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
8676 interface.
8677 (x86_siginfo_fixup): Use is_64bit_tdesc.
8678 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
8679 (tdesc_x32_avx_linux, tdesc_x32_linux)
8680 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
8681 Declare.
8682 (x86_linux_update_xmltarget): Delete.
8683 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
8684 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
8685 (AMD64_LINUX_USER64_CS): New.
8686 (x86_linux_read_description): New, based on
8687 x86_linux_update_xmltarget.
8688 (same_process_callback): New.
8689 (x86_arch_setup_process_callback): New.
8690 (x86_linux_update_xmltarget): New.
8691 (x86_regsets_info): New.
8692 (amd64_linux_regs_info): New.
8693 (i386_linux_usrregs_info): New.
8694 (i386_linux_regs_info): New.
8695 (x86_linux_regs_info): New.
8696 (x86_arch_setup): Reimplement.
8697 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
8698 (x86_emit_ops): Ditto.
8699 (the_low_target): Adjust. Install x86_linux_regs_info,
8700 x86_cannot_fetch_register, and x86_cannot_store_register.
8701 (initialize_low_arch): New.
8702 * linux-ia64-low.c (tdesc_ia64): Declare.
8703 (ia64_fetch_register): Adjust.
8704 (ia64_usrregs_info, regs_info): New globals.
8705 (ia64_regs_info): New function.
8706 (the_low_target): Adjust.
8707 (initialize_low_arch): New function.
8708 * linux-sparc-low.c (tdesc_sparc64): Declare.
8709 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
8710 Adjust.
8711 (sparc_arch_setup): New function.
8712 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
8713 (the_low_target): Adjust.
8714 (initialize_low_arch): New function.
8715 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
8716 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
8717 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
8718 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
8719 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
8720 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
8721 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
8722 (tdesc_powerpc_isa205_vsx64l): Declare.
8723 (ppc_cannot_store_register, ppc_collect_ptrace_register)
8724 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
8725 (ppc_set_pc, ppc_get_hwcap): Adjust.
8726 (ppc_usrregs_info): Forward declare.
8727 (!__powerpc64__) ppc_regmap_adjusted: New global.
8728 (ppc_arch_setup): Adjust to the current process'es target
8729 description.
8730 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
8731 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
8732 (ppc_store_evrregset): Adjust.
8733 (target_regsets): Rename to ...
8734 (ppc_regsets): ... this, and make static.
8735 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
8736 (ppc_regs_info): New function.
8737 (the_low_target): Adjust.
8738 (initialize_low_arch): New function.
8739 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
8740 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
8741 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
8742 (tdesc_s390x_linux64v2): Declare.
8743 (s390_collect_ptrace_register, s390_supply_ptrace_register)
8744 (s390_fill_gregset, s390_store_last_break): Adjust.
8745 (target_regsets): Rename to ...
8746 (s390_regsets): ... this, and make static.
8747 (s390_get_pc, s390_set_pc): Adjust.
8748 (s390_get_hwcap): New target_desc parameter, and use it.
8749 [__s390x__] (have_hwcap_s390_high_gprs): New global.
8750 (s390_arch_setup): Adjust to set the current process'es target
8751 description. Don't adjust the regmap.
8752 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
8753 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
8754 (regs_info_3264): New globals.
8755 (s390_regs_info): New function.
8756 (the_low_target): Adjust.
8757 (initialize_low_arch): New function.
8758 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
8759 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
8760 [__mips64] (init_registers_mips_linux)
8761 (init_registers_mips_dsp_linux): Delete defines.
8762 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
8763 (have_dsp): New global.
8764 (mips_read_description): New, based on mips_arch_setup.
8765 (mips_arch_setup): Reimplement.
8766 (get_usrregs_info): New function.
8767 (mips_cannot_fetch_register, mips_cannot_store_register)
8768 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
8769 (mips_fill_fpregset, mips_store_fpregset): Adjust.
8770 (target_regsets): Rename to ...
8771 (mips_regsets): ... this, and make static.
8772 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
8773 (dsp_regs_info, regs_info): New globals.
8774 (mips_regs_info): New function.
8775 (the_low_target): Adjust.
8776 (initialize_low_arch): New function.
8777 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
8778 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
8779 Declare.
8780 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
8781 (arm_read_description): New, with bits factored from
8782 arm_arch_setup.
8783 (arm_arch_setup): Reimplement.
8784 (target_regsets): Rename to ...
8785 (arm_regsets): ... this, and make static.
8786 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
8787 (arm_regs_info): New function.
8788 (the_low_target): Adjust.
8789 (initialize_low_arch): New function.
8790 * linux-m68k-low.c (tdesc_m68k): Declare.
8791 (target_regsets): Rename to ...
8792 (m68k_regsets): ... this, and make static.
8793 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
8794 (m68k_regs_info): New function.
8795 (m68k_arch_setup): New function.
8796 (the_low_target): Adjust.
8797 (initialize_low_arch): New function.
8798 * linux-sh-low.c (tdesc_sharch): Declare.
8799 (target_regsets): Rename to ...
8800 (sh_regsets): ... this, and make static.
8801 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
8802 (sh_regs_info, sh_arch_setup): New functions.
8803 (the_low_target): Adjust.
8804 (initialize_low_arch): New function.
8805 * linux-bfin-low.c (tdesc_bfin): Declare.
8806 (bfin_arch_setup): New function.
8807 (bfin_usrregs_info, regs_info): New globals.
8808 (bfin_regs_info): New function.
8809 (the_low_target): Adjust.
8810 (initialize_low_arch): New function.
8811 * linux-cris-low.c (tdesc_cris): Declare.
8812 (cris_arch_setup): New function.
8813 (cris_usrregs_info, regs_info): New globals.
8814 (cris_regs_info): New function.
8815 (the_low_target): Adjust.
8816 (initialize_low_arch): New function.
8817 * linux-cris-low.c (tdesc_crisv32): Declare.
8818 (cris_arch_setup): New function.
8819 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
8820 (cris_regs_info): New function.
8821 (the_low_target): Adjust.
8822 (initialize_low_arch): New function.
8823 * linux-m32r-low.c (tdesc_m32r): Declare.
8824 (m32r_arch_setup): New function.
8825 (m32r_usrregs_info, regs_info): New globals.
8826 (m32r_regs_info): Adjust.
8827 (initialize_low_arch): New function.
8828 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
8829 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
8830 (tic6x_usrregs_info): Forward declare.
8831 (tic6x_read_description): New function, based on ...
8832 (tic6x_arch_setup): ... this. Reimplement.
8833 (target_regsets): Rename to ...
8834 (tic6x_regsets): ... this, and make static.
8835 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
8836 (tic6x_regs_info): New function.
8837 (the_low_target): Adjust.
8838 (initialize_low_arch): New function.
8839 * linux-xtensa-low.c (tdesc_xtensa): Declare.
8840 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
8841 (target_regsets): Rename to ...
8842 (xtensa_regsets): ... this, and make static.
8843 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
8844 globals.
8845 (xtensa_arch_setup, xtensa_regs_info): New functions.
8846 (the_low_target): Adjust.
8847 (initialize_low_arch): New function.
8848 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
8849 (nios2_arch_setup): Set the current process'es tdesc.
8850 (target_regsets): Rename to ...
8851 (nios2_regsets): ... this.
8852 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
8853 (nios2_regs_info): New function.
8854 (the_low_target): Adjust.
8855 (initialize_low_arch): New function.
8856 * linux-aarch64-low.c (tdesc_aarch64): Declare.
8857 (aarch64_arch_setup): Set the current process'es tdesc.
8858 (target_regsets): Rename to ...
8859 (aarch64_regsets): ... this.
8860 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
8861 (aarch64_regs_info): New function.
8862 (the_low_target): Adjust.
8863 (initialize_low_arch): New function.
8864 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
8865 globals.
8866 (target_regsets): Rename to ...
8867 (tile_regsets): ... this.
8868 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
8869 (tile_regs_info): New function.
8870 (tile_arch_setup): Set the current process'es tdesc.
8871 (the_low_target): Adjust.
8872 (initialize_low_arch): New function.
8873 * spu-low.c (tdesc_spu): Declare.
8874 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
8875 * win32-arm-low.c (tdesc_arm): Declare.
8876 (arm_arch_setup): New function.
8877 (the_low_target): Install arm_arch_setup instead of
8878 init_registers_arm.
8879 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
8880 (init_windows_x86): Rename to ...
8881 (i386_arch_setup): ... this. Set `win32_tdesc'.
8882 (the_low_target): Adjust.
8883 * win32-low.c (win32_tdesc): New global.
8884 (child_add_thread): Don't create the thread cache here.
8885 (do_initial_child_stuff): Set the new process'es tdesc.
8886 * win32-low.h (struct target_desc): Forward declare.
8887 (win32_tdesc): Declare.
8888 * lynx-i386-low.c (tdesc_i386): Declare global.
8889 (lynx_i386_arch_setup): Set `lynx_tdesc'.
8890 * lynx-low.c (lynx_tdesc): New global.
8891 (lynx_add_process): Set the new process'es tdesc.
8892 * lynx-low.h (struct target_desc): Forward declare.
8893 (lynx_tdesc): Declare global.
8894 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
8895 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
8896 * nto-low.c (nto_tdesc): New global.
8897 (do_attach): Set the new process'es tdesc.
8898 * nto-low.h (struct target_desc): Forward declare.
8899 (nto_tdesc): Declare.
8900 * nto-x86-low.c (tdesc_i386): Declare.
8901 (nto_x86_arch_setup): Set `nto_tdesc'.
8902
8903 2013-06-04 Gary Benson <gbenson@redhat.com>
8904
8905 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
8906 to qSupported response when appropriate.
8907 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
8908 with nonzero-length annex.
8909 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
8910 arguments supplied in annex.
8911
8912 2013-05-31 Doug Evans <dje@google.com>
8913
8914 PR server/15594
8915 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
8916 64 bits in 64-cross-32 environment.
8917
8918 2013-05-28 Pedro Alves <palves@redhat.com>
8919
8920 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
8921 (aarch64-without-fpu.c): Delete rule.
8922 * configure.srv (aarch64*-*-linux*): Remove references to
8923 aarch64-without-fpu.o and aarch64-without-fpu.xml.
8924 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
8925 declaration.
8926
8927 2013-05-24 Pedro Alves <palves@redhat.com>
8928
8929 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
8930 instead of strchr/decode_address. Error if the range isn't split
8931 with a ','. Don't assume there's be a ':' in the action.
8932
8933 2013-05-23 Yao Qi <yao@codesourcery.com>
8934 Pedro Alves <palves@redhat.com>
8935
8936 * linux-low.c (lwp_in_step_range): New function.
8937 (linux_wait_1): If the thread was range stepping and stopped
8938 outside the stepping range, report the stop to GDB. Otherwise,
8939 continue stepping. Add range stepping debug output.
8940 (linux_set_resume_request): Copy the step range from the resume
8941 request to the lwp.
8942 (linux_supports_range_stepping): New.
8943 (linux_target_ops) <supports_range_stepping>: Set to
8944 linux_supports_range_stepping.
8945 * linux-low.h (struct linux_target_ops)
8946 <supports_range_stepping>: New field.
8947 (struct lwp_info) <step_range_start, step_range_end>: New fields.
8948 * linux-x86-low.c (x86_supports_range_stepping): New.
8949 (the_low_target) <supports_range_stepping>: Set to
8950 x86_supports_range_stepping.
8951 * server.c (handle_v_cont): Handle 'r' action.
8952 (handle_v_requests): Append ";r" if the target supports range
8953 stepping.
8954 * target.h (struct thread_resume) <step_range_start,
8955 step_range_end>: New fields.
8956 (struct target_ops) <supports_range_stepping>:
8957 New field.
8958 (target_supports_range_stepping): New macro.
8959
8960 2013-05-17 Joel Brobecker <brobecker@adacore.com>
8961
8962 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
8963 confusion in comment.
8964
8965 2013-05-17 Joel Brobecker <brobecker@adacore.com>
8966
8967 * lynx-low.c (struct process_info_private): New type.
8968 (lynx_add_process): New function.
8969 (lynx_create_inferior, lynx_attach): Replace calls to
8970 add_process by calls to lynx_add_process.
8971 (lynx_resume): If PTID is null, then try using
8972 current_process()->private->last_wait_event_ptid.
8973 Add comments.
8974 (lynx_clear_inferiors): Delete. The contents of that function
8975 has been inlined in lynx_mourn;
8976 (lynx_wait_1): Save the ptid in the process's private data.
8977 (lynx_mourn): Free the process' private data. Replace call
8978 to lynx_clear_inferiors by call to clear_inferiors.
8979
8980 2013-05-17 Yao Qi <yao@codesourcery.com>
8981
8982 * i386-low.c (i386_length_and_rw_bits): Move the comment to
8983 the right place.
8984
8985 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
8986
8987 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
8988 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
8989 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
8990 PT_TEXT_END_ADDR guards. Update comments.
8991 (linux_target_op) <read_offsets>: Conditionally define to
8992 linux_read_offsets if the target is UCLIBC and if it defines
8993 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
8994
8995 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
8996 Andrew Jenner <andrew@codesourcery.com>
8997
8998 * Makefile.in (SFILES): Add linux-nios2-low.c.
8999 (clean): Add action to delete nios2-linux.c.
9000 (nios2-linux.c): New rule.
9001 * configure.srv: Add nios2*-*-linux*.
9002 * linux-nios2-low.c: New.
9003
9004 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
9005
9006 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
9007
9008 2013-04-25 Hui Zhu <hui@codesourcery.com>
9009
9010 PR gdb/15186
9011 * ax.c (ax_printf): Add fflush.
9012
9013 2013-04-22 Tom Tromey <tromey@redhat.com>
9014
9015 * Makefile.in (SFILES): Add filestuff.c.
9016 (OBS): Add filestuff.o.
9017 (filestuff.o): New target.
9018 * config.in, configure: Rebuild.
9019 * configure.ac: Check for fdwalk, pipe2.
9020
9021 2013-04-17 Pedro Alves <palves@redhat.com>
9022
9023 * configure.ac (USE_THREAD_DB): Delete variable.
9024 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
9025 Don't AC_SUBST USE_THREAD_DB.
9026 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
9027 * config.in, configure: Regenerate.
9028
9029 2013-04-16 Pedro Alves <palves@redhat.com>
9030
9031 * linux-low.h (struct lwp_info) <thread_known>: Move under
9032 the USE_THREAD_DB #ifdef.
9033
9034 2013-04-16 Pedro Alves <palves@redhat.com>
9035
9036 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
9037 (linux-low.o): Delete rule.
9038 * linux-low.h: Always include "gdb_thread_db.h" instead of
9039 conditionally including thread_db.h.
9040 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
9041 HAVE_THREAD_DB_H.
9042
9043 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
9044
9045 * Makefile.in (install-only): Fix make install regression.
9046
9047 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
9048
9049 Convert man pages to texinfo, new gdbinit.5 texinfo page.
9050 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
9051 installation.
9052 * gdbserver.1: Remove.
9053
9054 2013-03-22 Pedro Alves <palves@redhat.com>
9055
9056 * linux-low.c (handle_extended_wait): Don't call
9057 linux_enable_event_reporting.
9058
9059 2013-03-15 Tony Theodore <tonyt@logyst.com>
9060
9061 PR build/9098:
9062 * Makefile.in (SHELL): Use @SHELL@.
9063
9064 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
9065
9066 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
9067 compiler warning.
9068
9069 2013-03-13 Joel Brobecker <brobecker@adacore.com>
9070
9071 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
9072 Remove extraneous NULL element.
9073
9074 2013-03-13 Yao Qi <yao@codesourcery.com>
9075
9076 * tracepoint.c (traceframe_read_tsv): Look for the last matched
9077 'V' block in trace frame.
9078
9079 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
9080
9081 * target.h (struct target_ops): Add btrace ops.
9082 (target_supports_btrace): New macro.
9083 (target_enable_btrace): New macro.
9084 (target_disable_btrace): New macro.
9085 (target_read_btrace): New macro.
9086 * gdbthread.h (struct thread_info): Add btrace field.
9087 * server.c: Include btrace-common.h.
9088 (handle_btrace_general_set): New function.
9089 (handle_btrace_enable): New function.
9090 (handle_btrace_disable): New function.
9091 (handle_general_set): Call handle_btrace_general_set.
9092 (handle_qxfer_btrace): New function.
9093 (struct qxfer qxfer_packets[]): Add btrace entry.
9094 * inferiors.c (remove_thread): Disable btrace.
9095 * linux-low: Include linux-btrace.h.
9096 (linux_low_enable_btrace): New function.
9097 (linux_low_read_btrace): New function.
9098 (linux_target_ops): Add btrace ops.
9099 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
9100 Add srv_linux_btrace=yes.
9101 (x86_64-*-linux*): Add linux-btrace.o.
9102 Add srv_linux_btrace=yes.
9103 * configure.ac: Define HAVE_LINUX_BTRACE.
9104 * config.in: Regenerated.
9105 * configure: Regenerated.
9106
9107 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
9108
9109 * server.c (handle_qxfer): Preserve error message if -3 is
9110 returned.
9111 (qxfer): Document the -3 return value.
9112
9113 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
9114
9115 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
9116 (linux_btrace_h): New variable.
9117 (linux-btrace.o): New rule.
9118
9119 2013-03-08 Stan Shebs <stan@codesourcery.com>
9120 Hafiz Abid Qadeer <abidh@codesourcery.com>
9121
9122 * tracepoint.c (trace_buffer_size): New global.
9123 (DEFAULT_TRACE_BUFFER_SIZE): New define.
9124 (init_trace_buffer): Change to one-argument function. Allocate
9125 trace buffer memory.
9126 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
9127 handle QTBuffer:size packet.
9128 (cmd_bigqtbuffer_size): New function.
9129 (initialize_tracepoint): Call init_trace_buffer with
9130 DEFAULT_TRACE_BUFFER_SIZE.
9131 * server.c (handle_query): Add QTBuffer:size in the
9132 supported packets.
9133
9134 2013-03-07 Yao Qi <yao@codesourcery.com>
9135
9136 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
9137 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
9138 of -1.
9139 (cmd_qtsp): Adjust condition. Do post increment.
9140 Set cur_action and cur_step_action back to 0.
9141
9142 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
9143
9144 PR server/15236
9145 * linux-low.c (linux_write_memory): Return early success if LEN is
9146 zero.
9147
9148 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
9149
9150 * configure.srv: Add x86_64-*-cygwin* as target.
9151
9152 2013-02-28 Tom Tromey <tromey@redhat.com>
9153
9154 * configure.ac: Invoke AC_SYS_LARGEFILE.
9155 * configure, config.in: Rebuild.
9156
9157 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
9158
9159 * win32-low.c: Throughout, fix format strings and casts of
9160 printf-like functions to avoid type related warnings on all
9161 platforms.
9162 (get_child_debug_event): Print dwDebugEventCode as hex since
9163 that's how it's usually documented.
9164
9165 2013-02-28 Yao Qi <yao@codesourcery.com>
9166
9167 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
9168 pulongest.
9169
9170 2013-02-27 Jiong Wang <jiwang@tilera.com>
9171
9172 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
9173 (reg-tilegx32.c): New rule.
9174 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
9175 * linux-tile-low.c (tile_arch_setup): New function. Invoke
9176 different register info initializer according to elf class.
9177 (init_registers_tilgx32): New function. The tilegx32 register info
9178 initializer.
9179 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
9180 (tile_store_gregset): Likewise.
9181
9182 2013-02-27 Yao Qi <yao@codesourcery.com>
9183
9184 * server.c (process_point_options): Print debug message when
9185 debug_threads is true.
9186
9187 2013-02-26 Yao Qi <yao@codesourcery.com>
9188
9189 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
9190
9191 2013-02-19 Pedro Alves <palves@redhat.com>
9192 Kai Tietz <ktietz@redhat.com>
9193
9194 PR gdb/15161
9195
9196 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
9197 instead of strtoul to extract address from packet.
9198 (process_serial_event) <'z'>: Likewise.
9199
9200 2013-02-18 Yao Qi <yao@codesourcery.com>
9201
9202 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
9203
9204 2013-02-14 Pedro Alves <palves@redhat.com>
9205
9206 Plug memory leak.
9207
9208 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
9209 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
9210
9211 2013-02-14 Pedro Alves <palves@redhat.com>
9212
9213 * tracepoint.c (cmd_qtdpsrc): Use savestring.
9214
9215 2013-02-14 Pedro Alves <palves@redhat.com>
9216
9217 * tracepoint.c (save_string): Delete.
9218 (add_tracepoint_action): Use savestring instead of save_string.
9219
9220 2013-02-12 Pedro Alves <palves@redhat.com>
9221
9222 * linux-xtensa-low.c: Ditto.
9223 * xtensa-xtregs.c: Ditto.
9224
9225 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
9226
9227 * thread-db.c (thread_db_get_tls_address): NULL pointer check
9228 thread_db.
9229
9230 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
9231
9232 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
9233 aarch64_num_wp_regs and aarch64_num_bp_regs to
9234 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
9235
9236 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
9237
9238 * linux-aarch64-low.c (ps_get_thread_area): Replace
9239 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
9240
9241 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
9242 Marcus Shawcroft <marcus.shawcroft@arm.com>
9243 Nigel Stephens <nigel.stephens@arm.com>
9244 Yufeng Zhang <yufeng.zhang@arm.com>
9245
9246 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
9247 (aarch64.c, aarch64-without-fpu.c): New targets.
9248 * configure.srv (aarch64*-*-linux*): New.
9249 * linux-aarch64-low.c: New file.
9250
9251 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
9252
9253 * linux-low.c (handle_extended_wait, linux_create_inferior)
9254 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
9255 (dequeue_one_deferred_signal, linux_resume_one_thread)
9256 (fetch_register, linux_write_memory, linux_enable_event_reporting)
9257 (linux_tracefork_grandchild, linux_test_for_tracefork)
9258 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
9259 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
9260 where the argument is 0.
9261
9262 2013-01-25 Yao Qi <yao@codesourcery.com>
9263
9264 * event-loop.c: Include "queue.h".
9265 (gdb_event_p): New typedef.
9266 (struct gdb_event) <next_event>: Remove.
9267 (event_queue): Change to QUEUE(gdb_event_p).
9268 (async_queue_event): Remove.
9269 (gdb_event_xfree): New.
9270 (initialize_event_loop): New.
9271 (process_event): Use API from QUEUE.
9272 (wait_for_event): Likewise.
9273 * server.c (main): Call initialize_event_loop.
9274 * server.h (initialize_event_loop): Declare.
9275
9276 2013-01-18 Yao Qi <yao@codesourcery.com>
9277
9278 * ax.h (struct eval_agent_expr_context): New.
9279 (gdb_eval_agent_expr): Update declaration.
9280 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
9281 TFRAME. Add new argument CTX.
9282 * server.h (struct eval_agent_expr_context): Declare.
9283 (agent_mem_read, agent_tsv_read): Update declaration.
9284 (agent_mem_read_string): Likewise.
9285 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
9286 (add_traceframe_block): Add new argument TPOINT.
9287 Increase TPOINT->traceframe_usage.
9288 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
9289 eval_tracepoint_agent_expr.
9290 (condition_true_at_tracepoint): Likewise.
9291 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
9292 (agent_mem_read_string, agent_tsv_read): Likewise.
9293
9294 2013-01-16 Yao Qi <yao@codesourcery.com>
9295
9296 * linux-low.c (linux_resume_one_lwp): Don't check
9297 'lwp->bp_reinsert != 0'.
9298
9299 2013-01-07 Joel Brobecker <brobecker@adacore.com>
9300 Pedro Alves <palves@redhat.com>
9301
9302 * lynx-low.c (ptrace_request_to_str): Define a temporary
9303 macro and use it to simplify this function's implementation.
9304
9305 2013-01-07 Joel Brobecker <brobecker@adacore.com>
9306
9307 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
9308 sets errno.
9309
9310 2013-01-07 Joel Brobecker <brobecker@adacore.com>
9311
9312 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
9313
9314 2013-01-07 Joel Brobecker <brobecker@adacore.com>
9315
9316 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
9317
9318 2013-01-07 Joel Brobecker <brobecker@adacore.com>
9319
9320 * lynx-low.c (lynx_resume): Use the resume_info parameter
9321 to determine the ptid for the lynx_ptrace call, unless
9322 it is equal to minus_one_ptid, in which case we use the
9323 ptid of the current_inferior.
9324 (lynx_wait_1): After having received a thread create/exit
9325 event, resume the inferior's execution using the signaling
9326 thread's ptid, rather than the old ptid.
9327
9328 2013-01-07 Joel Brobecker <brobecker@adacore.com>
9329
9330 * lynx-low.c (lynx_resume): Delete variable ret.
9331
9332 2013-01-01 Joel Brobecker <brobecker@adacore.com>
9333
9334 * gdbreplay.c (gdbreplay_version): Update copyright year.
9335 * server.c (gdbserver_version): Likewise.
9336
9337 2012-12-17 Joel Brobecker <brobecker@adacore.com>
9338
9339 * lynx-low.c (lynx_wait_1): Add debug trace before adding
9340 new thread.
9341
9342 2012-12-17 Joel Brobecker <brobecker@adacore.com>
9343
9344 * lynx-low.c (ptrace_request_to_str): Add handling for
9345 PTRACE_GETTRACESIG.
9346
9347 2012-12-17 Joel Brobecker <brobecker@adacore.com>
9348
9349 * lynx-low.c (lynx_attach): Delete variable new_process.
9350
9351 2012-12-17 Joel Brobecker <brobecker@adacore.com>
9352
9353 * lynx-low.c (lynx_create_inferior): Delete variable
9354 new_process.
9355
9356 2012-12-17 Joel Brobecker <brobecker@adacore.com>
9357
9358 * lynx-low.c (ptrace_request_to_str): Do not handle
9359 PTRACE_GETTHREADLIST if this macro does not exist.
9360
9361 2012-12-15 Yao Qi <yao@codesourcery.com>
9362
9363 * Makefile.in (OBS): Add notif.o.
9364 * notif.c, notif.h: New.
9365 * server.c: Include "notif.h".
9366 (struct vstop_notif) <next>: Remove.
9367 <base>: New field.
9368 (queue_stop_reply): Update.
9369 (push_event, send_next_stop_reply): Remove.
9370 (discard_queued_stop_replies): Update.
9371 (notif_stop): New variable.
9372 (handle_v_stopped): Remove.
9373 (handle_v_requests): Don't call handle_v_stopped. Call
9374 handle_ack_notif instead.
9375 (queue_stop_reply_callback): Call notif_event_enque instead
9376 of queue_stop_reply.
9377 (handle_status): Don't call send_next_stop_reply, call
9378 notif_write_event instead.
9379 (kill_inferior_callback): Likewise.
9380 (detach_or_kill_inferior_callback): Likewise.
9381 (main): Call initialize_notif.
9382 (process_serial_event): Call QUEUE_is_empty.
9383 (handle_target_event): Call notif_push instead of push event.
9384 * server.h (push_event): Remove declaration.
9385
9386 2012-12-10 Tom Tromey <tromey@redhat.com>
9387
9388 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
9389 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
9390 macros.
9391 (.c.o): Rewrite.
9392 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
9393 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
9394 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
9395 (amd64-linux-ipa.o, ax.o): Rewrite.
9396 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
9397 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
9398 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
9399 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
9400 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
9401 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
9402 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
9403 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
9404 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
9405 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
9406 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
9407 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
9408 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
9409 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
9410 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
9411 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
9412 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
9413 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
9414 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
9415 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
9416 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
9417 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
9418 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
9419 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
9420 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
9421 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
9422 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
9423 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
9424 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
9425 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
9426 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
9427 (reg-tilegx.o): Remove.
9428 (all_object_files): New macro.
9429 Include .deps files.
9430 * aclocal.m4, configure: Rebuild.
9431 * acinclude.m4: Include depstand.m4, lead-dot.m4.
9432 * configure.ac: Invoke ZW_CREATE_DEPDIR,
9433 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
9434
9435 2012-12-05 Tom Tromey <tromey@redhat.com>
9436
9437 PR gdb/14917:
9438 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
9439
9440 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
9441
9442 * configure.ac: Check for linux/perf_event.h.
9443 * config.in: Regenerated.
9444 * configure: Regenerated.
9445
9446 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
9447
9448 * hostio.c (handle_readlink): Decrease buffer size
9449 parameter passed to readlink by one byte.
9450
9451 2012-11-26 Yao Qi <yao@codesourcery.com>
9452
9453 * configure.ac (build_warnings): Append '-Wempty-body'.
9454 * configure: Regenerated.
9455 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
9456 body.
9457
9458 2012-11-15 Pierre Muller <muller@sourceware.org>
9459
9460 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
9461 * config.in: Regenerate.
9462 * configure: Regenerate.
9463 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
9464 Use "gdb_wait.h" header instead of <sys/wait.h> header.
9465 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
9466 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
9467 header.
9468 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
9469 instead of <sys/wait.h> header.
9470 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
9471
9472 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
9473
9474 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
9475 (various make rules): Remove -DGDBSERVER
9476
9477 2012-11-09 Yao Qi <yao@codesourcery.com>
9478
9479 * spu-low.c (current_ptid): Move it to ..
9480 * gdbthread.h: ... here. New.
9481 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
9482 * server.c (myresume, process_serial_event): Likewise.
9483 * thread-db.c (thread_db_find_new_threads): Likewise.
9484 * tracepoint.c (run_inferior_command): Likewise.
9485
9486 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
9487
9488 * server.c (handle_search_memory_1): Include access length in
9489 warning message.
9490
9491 2012-09-05 Michael Brandt <michael.brandt@axis.com>
9492
9493 * linux-crisv32-low.c: Fix compile errors.
9494
9495 2012-09-04 Yao Qi <yao@codesourcery.com>
9496
9497 * tracepoint.c (cmd_qtsv): Adjust debug message.
9498 Don't check CUR_TPOINT.
9499
9500 2012-08-28 Yao Qi <yao@codesourcery.com>
9501
9502 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
9503 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
9504 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
9505 Remove declarations of xmalloc, xreallloc, xstrdup and
9506 freeargv.
9507 * Makefile.in (libiberty_h): New.
9508 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
9509 (linux-bfin-low.o): Append dependency 'libiberty.h'.
9510
9511 2012-08-23 Yao Qi <yao@codesourcery.com>
9512
9513 * server.h: Remove declaration of 'xsnprintf'.
9514
9515 2012-08-22 Keith Seitz <keiths@redhat.com>
9516
9517 * server.h: Include build-gnulib-gbserver/config.h.
9518 * gdbreplay.c: Likewise.
9519
9520 2012-08-08 Doug Evans <dje@google.com>
9521
9522 * Makefile.in (SFILES): Add gdb_vecs.c.
9523 (OBS): Add gdb_vecs.o.
9524 (gdb_vecs_h, host_defs_h): New variables.
9525 (thread-db.o): Add $(gdb_vecs_h) dependency.
9526 (gdb_vecs.o): New rule.
9527 * thread-db.c: #include "gdb_vecs.h".
9528 (thread_db_load_search): Use a vector to iterate over path elements.
9529 Handle text appearing after "$pdir".
9530
9531 * configure.ac: Add check for strstr.
9532 * config.in: Regenerate.
9533 * configure: Regenerate.
9534
9535 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
9536
9537 * hostio.c (handle_pread): If pread fails, fall back to attempting
9538 lseek/read.
9539 (handle_pwrite): Likewise for pwrite.
9540
9541 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
9542
9543 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
9544 between unsupported TYPE and unimplementable ADDR/LEN combination.
9545 (arm_insert_point): Act on new return value.
9546
9547 2012-07-31 Pedro Alves <palves@redhat.com>
9548
9549 * server.c (process_point_options): Only skip tokens if we find
9550 one that is unrecognized. Don't treat 'X' specially while
9551 skipping unrecognized tokens.
9552
9553 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
9554
9555 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
9556 to 4-byte-align HW breakpoint addresses for Thumb.
9557
9558 2012-07-27 Yao Qi <yao@codesourcery.com>
9559
9560 PR remote/14161.
9561
9562 * server.h: Declare gdb_agent_about_to_close.
9563 * target.c (kill_inferior): Include "agent.h".
9564 New. Send command 'kill'.
9565 * target.h (kill_inferior): Removed macro.
9566 * tracepoint.c (gdb_agent_about_to_close): New.
9567 (gdb_agent_helper_thread): Handle command 'close'.
9568 Wait endlessly until the inferior stops.
9569 Install gdb_agent_remove_socket to atexit hook.
9570 (agent_socket_name): New static variable.
9571 (gdb_agent_socket_init): Replace local variable 'name' with
9572 'agent_socket_name'.
9573 (gdb_agent_remove_socket): New.
9574
9575 2012-07-27 Yao Qi <yao@codesourcery.com>
9576
9577 * server.c (process_point_options): Stop at 'X' when parsing.
9578
9579 2012-07-19 Michael Eager <eager@eagercon.com>
9580
9581 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
9582 to hw_execute.
9583 * linux-x86-low.c (x86_insert_point, x86_remove_point):
9584 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
9585 hardware breakpoint.
9586
9587 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
9588
9589 * gdbserver/linux-low.c (initialize_low): Call
9590 linux_ptrace_init_warnings.
9591
9592 2012-07-02 Doug Evans <dje@google.com>
9593
9594 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
9595 pointer to int.
9596
9597 2012-07-02 Stan Shebs <stan@codesourcery.com>
9598
9599 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
9600 (ax.o): Add it to build rule.
9601 (ax-ipa.o): Ditto.
9602 (OBS): Add format.o.
9603 (IPA_OBS): Add format.o.
9604 * server.c (handle_query): Claim support for breakpoint commands.
9605 (process_point_options): Add command case.
9606 (process_serial_event): Leave running if there are printfs in
9607 effect.
9608 * mem-break.h (any_persistent_commands): Declare.
9609 (add_breakpoint_commands): Declare.
9610 (gdb_no_commands_at_breakpoint): Declare.
9611 (run_breakpoint_commands): Declare.
9612 * mem-break.c (struct point_command_list): New struct.
9613 (struct breakpoint): New field command_list.
9614 (any_persistent_commands): New function.
9615 (add_commands_to_breakpoint): New function.
9616 (add_breakpoint_commands): New function.
9617 (gdb_no_commands_at_breakpoint): New function.
9618 (run_breakpoint_commands): New function.
9619 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
9620 locally.
9621 * ax.c: Include format.h.
9622 (ax_printf): New function.
9623 (gdb_eval_agent_expr): Add printf opcode.
9624
9625 2012-06-13 Yao Qi <yao@codesourcery.com>
9626
9627 * server.c (start_inferior): Remove duplicated writes to fields
9628 'last_resume_kind' and 'last_status' of 'current_inferior'.
9629
9630 2012-06-12 Yao Qi <yao@codesourcery.com>
9631 Pedro Alves <palves@redhat.com>
9632
9633 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
9634 comment.
9635 * server.c (handle_v_cont): Extend comment.
9636
9637 2012-06-11 Yao Qi <yao@codesourcery.com>
9638
9639 * linux-low.c (linux_attach): Add 'static'.
9640
9641 2012-06-06 Yao Qi <yao@codesourcery.com>
9642
9643 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
9644
9645 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
9646
9647 Fix gcc -flto compilation warning.
9648 * server.c (main): Make variable multi_mode and attach volatile.
9649
9650 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9651
9652 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
9653 if the platform doesn't know about it.
9654
9655 2012-05-30 Jeff Kenton <jkenton@tilera.com>
9656
9657 * Makefile.in (SFILES): Add linux-tile-low.c.
9658 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
9659 * configure.srv: Handle tilegx-*-linux*.
9660 * linux-tile-low.c: New file.
9661
9662 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9663
9664 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
9665
9666 2012-05-24 Pedro Alves <palves@redhat.com>
9667
9668 PR gdb/7205
9669
9670 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
9671
9672 2012-05-24 Pedro Alves <palves@redhat.com>
9673
9674 PR gdb/7205
9675
9676 Replace target_signal with gdb_signal throughout.
9677
9678 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
9679
9680 * linux-low.c (linux_store_registers): Avoid the copying sequence
9681 when no data has been retrieved by ptrace.
9682
9683 2012-05-22 Will Deacon <will.deacon@arm.com>
9684
9685 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
9686 Include asm/ptrace.h.
9687 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
9688 already defined.
9689
9690 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
9691
9692 * linux-low.c (linux_store_registers): Don't re-retrieve data
9693 with ptrace that has already been obtained from /proc. Always
9694 copy any data retrieved with ptrace to the buffer supplied.
9695
9696 2012-05-11 Yao Qi <yao@codesourcery.com>
9697 Pedro Alves <palves@redhat.com>
9698
9699 * linux-low.c (enum stopping_threads_kind): New.
9700 (stopping_threads): Change type to `enum stopping_threads_kind'.
9701 (handle_extended_wait): If stopping and suspending threads, leave
9702 the new_lwp suspended too.
9703 (linux_wait_for_event): Adjust.
9704 (stop_all_lwps): Set `stopping_threads' to
9705 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
9706 whether we're suspending threads or just stopping them. Assert no
9707 recursion happens.
9708
9709 2012-04-29 Yao Qi <yao@codesourcery.com>
9710
9711 * server.h: Move some code to ...
9712 * gdbthread.h: ... here. New.
9713 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
9714 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
9715 (nto-low.o, win32-low.o): Likewise.
9716 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
9717 * regcache.c, remote-utils.c, server.c: Likewise.
9718 * target.c, tracepoint.c, win32-low.c: Likewise.
9719
9720 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9721
9722 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
9723 (PTRACE_ARG4_TYPE): Likewise.
9724 (PTRACE_XFER_TYPE): Likewise.
9725 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
9726 ptrace to PTRACE_ARG3_TYPE.
9727 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
9728 (PTRACE_ARG4_TYPE): Likewise.
9729 (PTRACE_XFER_TYPE): Likewise.
9730 (linux_detach_one_lwp): Cast fourth argument of
9731 ptrace to long then PTRACE_ARG4_TYPE.
9732 (regsets_fetch_inferior_registers): Cast third argument of
9733 ptrace to long then PTRACE_ARG3_TYPE.
9734 (regsets_store_inferior_registers): Likewise.
9735
9736 2012-04-20 Pedro Alves <palves@redhat.com>
9737
9738 * configure: Regenerate.
9739
9740 2012-04-19 Pedro Alves <palves@redhat.com>
9741
9742 * Makefile.in (GNULIB_BUILDDIR): New.
9743 (LIBGNU, INCGNU, GNULIB_H): Adjust.
9744 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
9745 (all, install-only, uninstall, clean-info, all-lib, clean): No
9746 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
9747 (maintainer-clean realclean distclean): Use subdir_do.
9748 (subdir_do): New.
9749 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
9750 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
9751 * acinclude.m4: Include acx_configure_dir.m4.
9752 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
9753 calls. Call AC_PROG_RANLIB. Configure gnulib using
9754 ACX_CONFIGURE_DIR.
9755 (GNULIB): New.
9756 (GNULIB_STDINT_H): Adjust.
9757 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
9758 * gdbreplay.c: Include build-gnulib/config.h.
9759 * server.h: Likewise.
9760 * aclocal.m4: Regenerate.
9761 * config.in: Regenerate.
9762 * configure: Regenerate.
9763
9764 2012-04-19 Pedro Alves <palves@redhat.com>
9765
9766 * Makefile.in (LIBGNU, INCGNU): Adjust.
9767 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
9768 (all, install-only, uninstall, clean-info, all-lib, clean)
9769 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
9770 * configure.ac: Adjust AC_OUTPUT output.
9771 * aclocal.m4: Regenerate.
9772 * configure: Regenerate.
9773
9774 2012-04-19 Pedro Alves <palves@redhat.com>
9775
9776 * Makefile.in (generated_files): New.
9777 (server_h): Remove the explicit dependency on config.h, and depend
9778 on $generated_files.
9779
9780 2012-04-19 Pedro Alves <palves@redhat.com>
9781
9782 * Makefile.in (INCGNU): Add -Ignulib.
9783
9784 2012-04-19 Pedro Alves <palves@redhat.com>
9785
9786 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
9787 (INCGNU): ... this, and spell out -I here.
9788 (GNULIB_LIB): Rename to ...
9789 (LIBGNU): ... this.
9790 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
9791
9792 2012-04-19 Pedro Alves <palves@redhat.com>
9793
9794 * config.in: Regenerate.
9795
9796 2012-04-19 Pedro Alves <palves@redhat.com>
9797
9798 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
9799 * server.h (memmem): Remove declaration.
9800 * config.in: Regenerate.
9801 * configure: Regenerate.
9802
9803 2012-04-19 Yao Qi <yao@codesourcery.com>
9804
9805 * Makefile.in (SFILES): Add common/vec.c.
9806 (OBS): Add vec.o.
9807 (vec.o): New rule.
9808
9809 2012-04-19 Yao Qi <yao@codesourcery.com>
9810
9811 * remote-utils.c (prepare_resume_reply): Replace with macro
9812 target_core_of_thread.
9813 * server.c (handle_qxfer_threads_proper): Likewise.
9814 * target.h (traget_core_of_thread): New macro.
9815
9816 2012-04-18 Pedro Alves <palves@redhat.com>
9817
9818 * aclocal.m4: Regenerate.
9819 * configure: Regenerate.
9820
9821 2012-04-16 Yao Qi <yao@codesourcery.com>
9822
9823 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
9824 duplicated on address.
9825
9826 2012-04-16 Yao Qi <yao@codesourcery.com>
9827
9828 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
9829 (struct tracepoint_action_ops) <send>: New field.
9830 (m_tracepoint_action_send, r_tracepoint_action_send): New.
9831 (agent_expr_send, x_tracepoint_action_send): New.
9832 (l_tracepoint_action_send): New.
9833 (cmd_qtdp): Download and install tracepoint
9834 according to `use_agent'.
9835 (run_inferior_command): Add one more parameter `len'.
9836 Update callers.
9837 (tracepoint_send_agent): New.
9838 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
9839
9840 2012-04-16 Yao Qi <yao@codesourcery.com>
9841
9842 * tracepoint.c (download_tracepoints): Moved to ...
9843 (cmd_qtstart): ... here.
9844
9845 2012-04-14 Yao Qi <yao@codesourcery.com>
9846
9847 * tracepoint.c: Include inttypes.h.
9848 (struct collect_memory_action): Use sized types.
9849 (struct tracepoint): Likewise.
9850 (cmd_qtdp, stop_tracing): Update print specifiers.
9851 (cmd_qtp, response_tracepoint): Likewise.
9852 (collect_data_at_tracepoint): Likewise.
9853 (collect_data_at_step): Likewise.
9854
9855 2012-04-14 Yao Qi <yao@codesourcery.com>
9856
9857 Import gnulib module inttypes.
9858 * aclocal.m4, config.in, configure: Regenerated.
9859
9860 2012-04-14 Yao Qi <yao@codesourcery.com>
9861
9862 * Makefile.in (maintainer-clean, realclean, distclean): Remove
9863 Makefile and config.status at last.
9864
9865 2012-04-13 Yao Qi <yao@codesourcery.com>
9866
9867 * tracepoint.c: Include stdint.h unconditionally.
9868
9869 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9870
9871 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
9872 on BFD_HAVE_SYS_PROCFS_TYPE.
9873 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
9874 * configure: Regenerate.
9875 * config.in: Likewise.
9876
9877 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
9878
9879 * Makefile.in (clean): Also remove x32.c x32-linux.c
9880 x32-avx.c x32-avx-linux.c.
9881 (x32.o): New target.
9882 (x32.c): Likewise.
9883 (x32-linux.o): Likewise.
9884 (x32-linux.c): Likewise.
9885 (x32-avx.o): Likewise.
9886 (x32-avx.c): Likewise.
9887 (x32-avx-linux.o): Likewise.
9888 (x32-avx-linux.c): Likewise.
9889
9890 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
9891 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
9892 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
9893 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
9894 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
9895 i386/x32-avx-linux.xml.
9896
9897 * linux-x86-low.c (init_registers_x32_linux): New prototype.
9898 (init_registers_x32_avx_linux): Likwise.
9899 (x86_linux_update_xmltarget): Call init_registers_x32_linux
9900 or init_registers_x32_avx_linux if linux_is_elf64 is false.
9901
9902 2012-04-13 Pedro Alves <palves@redhat.com>
9903
9904 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
9905 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
9906 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
9907 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
9908 the sub-make.
9909
9910 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
9911
9912 * linux-x86-low.c (compat_x32_clock_t): New.
9913 (compat_x32_siginfo_t): Likewise.
9914 (compat_x32_siginfo_from_siginfo): Likewise.
9915 (siginfo_from_compat_x32_siginfo): Likewise.
9916 (linux_is_elf64): Likewise.
9917 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
9918 and siginfo_from_compat_x32_siginfo for x32.
9919 (x86_arch_setup): Set linux_is_elf64.
9920
9921 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
9922
9923 PR gdb/13969
9924 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
9925 e_machine field.
9926 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
9927 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
9928 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
9929 compatible with process.
9930
9931 2012-04-12 Yao Qi <yao@codesourcery.com>
9932
9933 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
9934 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
9935 (install-only, install-info, clean): Handle sub dir gnulib.
9936 (all-lib, am--refresh): New targets.
9937 (memmem.o): Remove target.
9938 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
9939 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
9940 (AC_REPLACE_FUNCS): Remove memmem.
9941 Invoke gl_INIT and AM_INIT_AUTOMAKE.
9942 (AC_OUTPUT): Generate Makefile in gnulib/.
9943 * aclocal.m4, config.in, configure: Regenerated.
9944
9945 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
9946
9947 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
9948
9949 2012-04-05 Pedro Alves <palves@redhat.com>
9950
9951 -Werror=strict-aliasing
9952
9953 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
9954 pointer.
9955
9956 2012-04-04 Pedro Alves <palves@redhat.com>
9957
9958 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
9959 (sparc_store_gregset_from_stack, sparc_store_gregset)
9960 (sparc_breakpoint_at): Fix formatting.
9961
9962 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9963
9964 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
9965 are available.
9966 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
9967 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
9968 * config.in: Regenerate.
9969 * configure: Likewise.
9970
9971 2012-03-29 Pedro Alves <palves@redhat.com>
9972
9973 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
9974 Correct ptrace arguments.
9975
9976 2012-03-28 Pedro Alves <palves@redhat.com>
9977
9978 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
9979 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
9980 (IA64_FR1_REGNUM): New defines.
9981 (ia64_fetch_register): New.
9982 (the_low_target): Install it.
9983 * linux-low.h (struct linux_target_ops) <fetch_register>: New
9984 field.
9985 * linux-low.c (linux_fetch_registers): Try the
9986 the_low_target.fetch_register hook first.
9987
9988 * linux-arm-low.c (the_low_target): Adjust.
9989 * linux-bfin-low.c (the_low_target): Adjust.
9990 * linux-cris-low.c (the_low_target): Adjust.
9991 * linux-crisv32-low.c (the_low_target): Adjust.
9992 * linux-m32r-low.c (the_low_target): Adjust.
9993 * linux-m68k-low.c (the_low_target): Adjust.
9994 * linux-mips-low.c (the_low_target): Adjust.
9995 * linux-ppc-low.c (the_low_target): Adjust.
9996 * linux-s390-low.c (the_low_target): Adjust.
9997 * linux-sh-low.c (the_low_target): Adjust.
9998 * linux-sparc-low.c (the_low_target): Adjust.
9999 * linux-tic6x-low.c (the_low_target): Adjust.
10000 * linux-x86-low.c (the_low_target): Adjust.
10001 * linux-xtensa-low.c (the_low_target): Adjust.
10002
10003 2012-03-26 Pedro Alves <palves@redhat.com>
10004
10005 * server.c (handle_qxfer_libraries): Don't bail early if
10006 the_target->qxfer_libraries_svr4 is not NULL.
10007
10008 2012-03-26 Pedro Alves <palves@redhat.com>
10009
10010 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
10011
10012 2012-03-23 Pedro Alves <palves@redhat.com>
10013
10014 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
10015 "library-list-svr4" element's start tag when the the DSO list is
10016 empty.
10017
10018 2012-03-23 Pedro Alves <palves@redhat.com>
10019
10020 * linux-low.c (read_one_ptr): Read the inferior's pointer through
10021 a variable whose type size is the same as the inferior's pointer
10022 size.
10023
10024 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
10025
10026 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
10027 struct siginfo.
10028 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
10029 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
10030 * linux-low.h: Include <signal.h>.
10031 (struct siginfo): Remove forward declaration.
10032 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
10033 struct siginfo.
10034
10035 2012-03-21 Mike Frysinger <vapier@gentoo.org>
10036
10037 * .gitignore: Ignore more files.
10038
10039 2012-03-19 Pedro Alves <palves@redhat.com>
10040 Jan Kratochvil <jan.kratochvil@redhat.com>
10041
10042 * server.c (cont_thread, general_thread): Add describing comments.
10043 (start_inferior): Clear `cont_thread'.
10044 (handle_v_cont): Don't set `cont_thread' if resuming all threads
10045 of a process.
10046
10047 2012-03-15 Yao Qi <yao@codesourcery.com>
10048
10049 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
10050 handling to ...
10051 (cmd_qtdp): ... here.
10052
10053 2012-03-15 Yao Qi <yao@codesourcery.com>
10054
10055 * tracepoint.c (struct tracepoint_action_ops): New.
10056 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
10057 (m_tracepoint_action_download): New.
10058 (r_tracepoint_action_download): New.
10059 (x_tracepoint_action_download): New.
10060 (l_tracepoint_action_download): New.
10061 (add_tracepoint_action): Install `action->ops' according type.
10062 (download_tracepoint_1): Move code `download' function pointer
10063 of various tracepoint_action_ops.
10064
10065 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
10066
10067 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
10068 linux_ptrace_attach_warnings.
10069
10070 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
10071
10072 * Makefile.in (linux-ptrace.o): New.
10073 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
10074 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
10075 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
10076 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
10077 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
10078 of these targets.
10079 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
10080
10081 2012-03-08 Yao Qi <yao@codesourcery.com>
10082 Pedro Alves <palves@redhat.com>
10083
10084 Fix PR server/13392.
10085 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
10086 offset of JMP insn.
10087 * tracepoint.c (remove_tracepoint): New.
10088 (cmd_qtdp): Call remove_tracepoint when failed to install.
10089
10090 2012-03-07 Pedro Alves <palves@redhat.com>
10091
10092 * linux-low.c (get_detach_signal): New.
10093 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
10094 Pass on pending signals to PTRACE_DETACH. Check the result of the
10095 ptrace call.
10096 * server.c (program_signals, program_signals_p): New.
10097 (handle_general_set): Handle QProgramSignals.
10098 * server.h (program_signals, program_signals_p): Declare.
10099
10100 2012-03-05 Pedro Alves <palves@redhat.com>
10101 Jan Kratochvil <jan.kratochvil@redhat.com>
10102
10103 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
10104 New comment why.
10105
10106 2012-03-03 Yao Qi <yao@codesourcery.com>
10107
10108 * tracepoint.c (tracepoint_look_up_symbols): Update call to
10109 agent_look_up_symbols.
10110
10111 2012-03-03 Yao Qi <yao@codesourcery.com>
10112
10113 * Makefile.in (linux-low.o): Keep dependence on agent.h.
10114 (linux-x86-low.o): Likewise.
10115 * server.h: Remove in_process_agent_loaded.
10116 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
10117 common/agent.c.
10118 Update callers.
10119
10120 2012-03-03 Yao Qi <yao@codesourcery.com>
10121
10122 * tracepoint.c (gdb_agent_capability): New global.
10123 (in_process_agent_loaded_ust): Renamed to
10124 `in_process_agent_supports_ust'.
10125 Update callers.
10126 (in_process_agent_supports_ust): Call agent_capability_check.
10127 (clear_installed_tracepoints): Assert that agent supports
10128 agent.
10129
10130 2012-03-03 Yao Qi <yao@codesourcery.com>
10131
10132 * linux-low.c (linux_supports_agent): New.
10133 (linux_target_ops): Initialize field `supports_agent' with
10134 linux_supports_agent.
10135 * target.h (struct target_ops) <supports_agent>: New.
10136 (target_supports_agent): New macro.
10137 * server.c (handle_general_set): Handle packet 'QAgent'.
10138 (handle_query): Send `QAgent+'.
10139 * Makefile.in (server.o): Depends on agent.h.
10140
10141 2012-03-03 Yao Qi <yao@codesourcery.com>
10142
10143 * Makefile.in (OBS): Add agent.o.
10144 Add new rule for agent.o.
10145 Track dependence of tracepoint.c on agent.h.
10146 * tracepoint.c (run_inferior_command_1):
10147 (run_inferior_command): Call agent_run_command.
10148 (gdb_ust_connect_sync_socket): Deleted. Move it to
10149 common/agent.c.
10150 (resume_thread, stop_thread): Likewise.
10151 (gdb_ust_socket_init): Renamed to ...
10152 (gdb_agent_socket_init): ... New.
10153 (gdb_ust_thread): Renamed to ...
10154 (gdb_agent_helper_thread): ... New.
10155 (gdb_ust_init): Move some code to ...
10156 (gdb_agent_init): ... here. New.
10157 [HAVE_UST]: Call gdb_ust_init.
10158 (initialize_tracepoint_ftlib): Call gdb_agent_init.
10159 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
10160 * config.in, configure: Regenerated.
10161
10162 2012-03-02 Pedro Alves <palves@redhat.com>
10163
10164 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
10165 * linux-low.c (struct simple_pid_list): New.
10166 (stopped_pids): New a struct simple_pid_list pointer.
10167 (add_to_pid_list, pull_pid_from_list): New.
10168 (handle_extended_wait): Don't assume the first signal new children
10169 report is SIGSTOP. Adjust call to pull_pid_from_list.
10170 (linux_wait_for_lwp): Adjust.
10171
10172 2012-03-02 Yao Qi <yao@codesourcery.com>
10173
10174 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
10175 debug log.
10176
10177 2012-03-02 Yao Qi <yao@codesourcery.com>
10178
10179 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
10180 `stop_pc' and `tpoint'. Update caller.
10181
10182 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
10183
10184 * linux-low.h (linux_target_ops): Add regset_bitmap member.
10185 * linux-low.c (use_linux_regsets): New macro.
10186 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
10187 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
10188 (linux_register_in_regsets): New function.
10189 (usr_fetch_inferior_registers): Skip registers covered by
10190 regsets.
10191 (usr_store_inferior_registers): Likewise.
10192 (usr_fetch_inferior_registers): New macro.
10193 (usr_store_inferior_registers): Likewise.
10194 (linux_fetch_registers): Handle mixed regset/non-regset targets.
10195 (linux_store_registers): Likewise.
10196 * linux-mips-low.c (init_registers_mips_dsp_linux): New
10197 prototype.
10198 (init_registers_mips64_dsp_linux): Likewise.
10199 (init_registers_mips_linux): New macro.
10200 (init_registers_mips_dsp_linux): Likewise.
10201 (mips_dsp_num_regs): Likewise.
10202 (DSP_BASE, DSP_CONTROL): New fallback macros.
10203 (mips_base_regs): New macro.
10204 (mips_regmap): Use it. Fix the size.
10205 (mips_dsp_regmap): New variable.
10206 (mips_dsp_regset_bitmap): Likewise.
10207 (mips_arch_setup): New function.
10208 (mips_cannot_fetch_register): Use the_low_target.regmap rather
10209 than mips_regmap.
10210 (mips_cannot_store_register): Likewise.
10211 (the_low_target): Update .arch_setup, .num_regs and .regmap
10212 initializers. Add .regset_bitmap initializer.
10213 * linux-arm-low.c (the_low_target): Add .regset_bitmap
10214 initializer.
10215 * linux-bfin-low.c (the_low_target): Likewise.
10216 * linux-cris-low.c (the_low_target): Likewise.
10217 * linux-crisv32-low.c (the_low_target): Likewise.
10218 * linux-ia64-low.c (the_low_target): Likewise.
10219 * linux-m32r-low.c (the_low_target): Likewise.
10220 * linux-m68k-low.c (the_low_target): Likewise.
10221 * linux-ppc-low.c (the_low_target): Likewise.
10222 * linux-s390-low.c (the_low_target): Likewise.
10223 * linux-sh-low.c (the_low_target): Likewise.
10224 * linux-sparc-low.c (the_low_target): Likewise.
10225 * linux-tic6x-low.c (the_low_target): Likewise.
10226 * linux-x86-low.c (the_low_target): Likewise.
10227 * linux-xtensa-low.c (the_low_target): Likewise.
10228 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
10229 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
10230 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
10231 srv_xmlfiles.
10232 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
10233 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
10234
10235 2012-02-29 Yao Qi <yao@codesourcery.com>
10236 Pedro Alves <palves@redhat.com>
10237
10238 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
10239 `step_over_finished' is true.
10240
10241 2012-02-27 Pedro Alves <palves@redhat.com>
10242
10243 * linux-low.c (pid_is_stopped): Delete, moved to common/.
10244 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
10245
10246 2012-02-27 Pedro Alves <palves@redhat.com>
10247
10248 PR server/9684
10249 * linux-low.c (pid_is_stopped): New.
10250 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
10251
10252 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
10253
10254 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
10255 of conditions.
10256
10257 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
10258
10259 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
10260
10261 2012-02-24 Luis Machado <lgustavo@codesourcery>
10262
10263 * server.c (handle_query): Advertise support for target-side
10264 breakpoint condition evaluation.
10265 (process_point_options): New function.
10266 (process_serial_event): When inserting a breakpoint, check for
10267 a target-side condition that should be evaluated.
10268
10269 * mem-break.c: Include regcache.h and ax.h.
10270 (point_cond_list_t): New data structure.
10271 (breakpoint) <cond_list>: New field.
10272 (find_gdb_breakpoint_at): Make non-static.
10273 (delete_gdb_breakpoint_at): Clear any target-side
10274 conditions.
10275 (clear_gdb_breakpoint_conditions): New function.
10276 (add_condition_to_breakpoint): Likewise.
10277 (add_breakpoint_condition): Likewise.
10278 (gdb_condition_true_at_breakpoint): Likewise.
10279 (gdb_breakpoint_here): Return result directly instead
10280 of going through a local variable.
10281
10282 * mem-break.h (find_gdb_breakpoint_at): New prototype.
10283 (clear_gdb_breakpoint_conditions): Likewise.
10284 (add_breakpoint_condition): Likewise.
10285 (gdb_condition_true_at_breakpoint): Likewise.
10286
10287 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
10288 (need_step_over_p): Take target-side breakpoint condition into
10289 consideration.
10290
10291 2012-02-24 Luis Machado <lgustavo@codesourcery>
10292
10293 * server.h: Include tracepoint.h.
10294 (agent_mem_read, agent_get_trace_state_variable_value,
10295 agent_set_trace_state_variable_value,
10296 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
10297 get_set_tsv_func_addr): New prototypes.
10298
10299 * ax.h: New include file.
10300 * ax.c: New source file.
10301
10302 * tracepoint.c: Include ax.h.
10303 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
10304 agent_expr, eval_result_type): Move to ax.h.
10305 (parse_agent_expr): Rename to ...
10306 (gdb_parse_agent_expr): ... this, make it non-static and move
10307 to ax.h.
10308 (unparse_agent_expr) Rename to ...
10309 (gdb_unparse_agent_expr): ... this, make it non-static and move
10310 to ax.h.
10311 (eval_agent_expr): Rename to ...
10312 (eval_tracepoint_agent_expr): ... this.
10313 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
10314 forward declarations.
10315 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
10316 (agent_get_trace_state_variable_value): New function.
10317 (agent_set_trace_state_variable_value): New function.
10318 (cmd_qtdp): Call gdb_parse_agent_expr (...).
10319 (response_tracepoint): Call gdb_unparse_agent_expr (...).
10320 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
10321 (condition_true_at_tracepoint): Likewise.
10322 (parse_agent_expr): Rename to ...
10323 (gdb_parse_agent_expr): ... this and move to ax.c.
10324 (unparse_agent_expr): Rename to ...
10325 (gdb_unparse_agent_expr): ... this and move to ax.c.
10326 (gdb_agent_op_name): Move to ax.c.
10327 (eval_agent_expr): Rename to ...
10328 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
10329 and move to ax.c.
10330 (eval_tracepoint_agent_expr): New function.
10331 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
10332 non-static.
10333 (current_insn_ptr, emit_error, struct bytecode_address): Move to
10334 ax.c.
10335 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
10336 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
10337 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
10338 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
10339 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
10340 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
10341 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
10342 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
10343 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
10344 (compile_bytecodes): Remove forward declaration.
10345 (is_goto_target): Move to ax.c.
10346 (compile_bytecodes): Move to ax.c and call
10347 agent_get_trace_state_variable_value (...) and
10348 agent_set_trace_state_variable_value (...).
10349
10350 * Makefile.in: Update ax.c and IPA dependencies.
10351
10352 2012-02-24 Pedro Alves <palves@redhat.com>
10353
10354 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
10355 (cmd_bigqtbuffer_circular): ... this. Only handle
10356 'QTBuffer:circular:'.
10357 (handle_tracepoint_general_set): Adjust.
10358
10359 2012-02-16 Yao Qi <yao@codesourcery.com>
10360
10361 * inferiors.c: Move code to ...
10362 * dll.c: .... here. New.
10363 * server.h: Declare clear_dlls.
10364 * Makefile.in (SFILES): Add dll.c.
10365 (OBS): Add dll.o
10366 (dll.o): New rule.
10367
10368 2012-02-11 Yao Qi <yao@codesourcery.com>
10369
10370 * server.c: (handle_monitor_command): Add a new parameter
10371 `own_buf'.
10372 (handle_query): Update caller.
10373
10374 2012-02-09 Joel Brobecker <brobecker@adacore.com>
10375
10376 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
10377 * configure, config.in: Regenerate.
10378 * hostio.c: Provide an alternate implementation if HAVE_READLINK
10379 is not defined.
10380
10381 2012-02-02 Pedro Alves <palves@redhat.com>
10382
10383 Try SIGKILL first, then PTRACE_KILL.
10384 * linux-low.c (linux_kill_one_lwp): New.
10385 (linux_kill_one_lwp): Rename to ...
10386 (kill_one_lwp_callback): ... this. Use the new
10387 linux_kill_one_lwp.
10388
10389 2012-02-02 Pedro Alves <palves@redhat.com>
10390
10391 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
10392 inferior.
10393
10394 2012-01-27 Pedro Alves <palves@redhat.com>
10395
10396 * linux-low.c (linux_child_pid_to_exec_file): Delete.
10397 (elf_64_file_p): Make static.
10398 (linux_pid_exe_is_elf_64_file): New.
10399 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
10400 Delete declarations.
10401 (linux_pid_exe_is_elf_64_file): Declare.
10402 * linux-x86-low.c (x86_arch_setup): Use
10403 linux_pid_exe_is_elf_64_file.
10404
10405 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
10406
10407 * linux-low.c (linux_wait_for_event_1): Rename to ...
10408 (linux_wait_for_event): ... here and merge it with former
10409 linux_wait_for_event - new variable wait_ptid, use it.
10410 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
10411
10412 2012-01-23 Pedro Alves <palves@redhat.com>
10413
10414 * server.c (main): Avoid yet another case of infinite loop while
10415 detaching/killing after a longjmp.
10416
10417 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
10418
10419 Code cleanup.
10420 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
10421
10422 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
10423
10424 * hostio.c (handle_readlink): New function.
10425 (handle_vFile): Call it to handle "vFile:readlink" packets.
10426
10427 2012-01-20 Pedro Alves <palves@redhat.com>
10428 Ulrich Weigand <ulrich.weigand@linaro.org>
10429
10430 * server.c (handle_v_requests): Only support vAttach and vRun to
10431 start multiple processes when in extended protocol mode.
10432
10433 2012-01-17 Pedro Alves <palves@redhat.com>
10434
10435 * tracepoint.c (initialize_tracepoint): Use mmap instead of
10436 memalign plus mprotect to allocate the scratch buffer.
10437
10438 2012-01-13 Pedro Alves <palves@redhat.com>
10439
10440 * server.c (attach_inferior): Clear `cont_thread'.
10441
10442 2012-01-13 Pedro Alves <palves@redhat.com>
10443
10444 * server.c (main): Avoid infinite loop while detaching/killing
10445 after a longjmp.
10446
10447 2012-01-09 Doug Evans <dje@google.com>
10448
10449 * server.c (start_inferior): Set last_ptid in --wrapper case.
10450
10451 2012-01-06 Yao Qi <yao@codesourcery.com>
10452
10453 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
10454 defined.
10455 [IN_PROCESS_AGENT] (debug_agent): New global variable.
10456
10457 2012-01-04 Yao Qi <yao@codesourcery.com>
10458
10459 * tracepoint.c (cmd_qtdp): Print debug message
10460 for static tracepoint.
10461
10462 2012-01-04 Yao Qi <yao@codesourcery.com>
10463
10464 * tracepoint.c (trace_vdebug): Differentiate debug message
10465 between gdbserver and IPA.
10466
10467 2012-01-03 Yao Qi <yao@codesourcery.com>
10468
10469 * tracepoint.c (tracepoint_was_hit): Don't collect for
10470 static tracepoint.
10471
10472 2012-01-02 Joel Brobecker <brobecker@adacore.com>
10473
10474 * terminal.h: Reformat copyright header.
10475
10476 2012-01-02 Joel Brobecker <brobecker@adacore.com>
10477
10478 * server.c (gdbserver_version): Update copyright year.
10479 * gdbreplay.c (gdbreplay_version): Likewise.
10480
10481 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
10482
10483 * linux-low.c (linux_create_inferior): Put empty if clause for write.
10484
10485 Revert:
10486 2011-12-18 Hui Zhu <teawater@gmail.com>
10487 * linux-low.c (linux_create_inferior): Save return value to ret.
10488
10489 2011-12-18 Hui Zhu <teawater@gmail.com>
10490
10491 * linux-low.c (linux_create_inferior): Save return value to ret.
10492
10493 2011-12-16 Doug Evans <dje@google.com>
10494
10495 * linux-low.c (linux_create_inferior): If stdio connection,
10496 redirect stdin from /dev/null, stdout to stderr.
10497 * remote-utils.c (remote_is_stdio): New static global.
10498 (remote_connection_is_stdio): New function.
10499 (remote_prepare): Handle stdio connection.
10500 (remote_open): Ditto.
10501 (remote_close): Don't close stdin for stdio connections.
10502 (read_prim,write_prim): New functions. Replace all calls to
10503 read/write to these.
10504 * server.c (main): Watch for "-" argument. Move call to
10505 remote_prepare before start_inferior.
10506 * server.h (STDIO_CONNECTION_NAME): New macro.
10507 (remote_connection_is_stdio): Declare.
10508
10509 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
10510 in debugging output.
10511
10512 2011-12-15 Yao Qi <yao@codesourcery.com>
10513
10514 * tracepoint.c: Include sys/syscall.h.
10515 (gdb_ust_thread): Remove preprocessor conditional.
10516
10517 2011-12-14 Pedro Alves <pedro@codesourcery.com>
10518
10519 * linux-low.c (linux_detach_one_lwp): Call
10520 the_low_target.prepare_to_resume before detaching.
10521
10522 2011-12-14 Yao Qi <yao@codesourcery.com>
10523
10524 * tracepoint.c (gdb_ust_thread): Don't ignore return value
10525 of write.
10526
10527 2011-12-14 Yao Qi <yao@codesourcery.com>
10528
10529 * i386-low.c (i386_low_stopped_data_address): Initialize local
10530 variable `control'.
10531
10532 2011-12-13 Pedro Alves <pedro@codesourcery.com>
10533
10534 PR remote/13492
10535
10536 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
10537 DR_CONTROL unless necessary. Extend comments.
10538 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
10539 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
10540
10541 2011-12-13 Yao Qi <yao@codesourcery.com>
10542
10543 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
10544 macros.
10545 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
10546
10547 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
10548
10549 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
10550 Print new debug message for such case.
10551
10552 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
10553
10554 Fix overlapping memcpy.
10555 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
10556 the read_inferior_memory transfer.
10557 (delete_fast_tracepoint_jump): New variable buf. Use it for the
10558 write_inferior_memory transfer.
10559 (set_fast_tracepoint_jump): New variable buf. Use it for the
10560 read_inferior_memory and write_inferior_memory transfers.
10561 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
10562 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
10563 Use it for the write_inferior_memory transfer.
10564 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
10565 buffers.
10566
10567 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
10568
10569 * linux-low.c (fetch_register, store_register): Make code
10570 consistent, fix formatting.
10571
10572 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
10573
10574 * linux-low.c (usr_store_inferior_registers): Factor out code
10575 to handle individual registers into...
10576 (store_register): ... this new function.
10577
10578 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
10579
10580 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
10581 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
10582 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
10583 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
10584 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
10585 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
10586 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
10587 (srv_xmlfiles): Add new XML files.
10588
10589 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
10590 and <sys/uio.h>.
10591 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
10592 (init_registers_s390_linux32v1): Add prototype.
10593 (init_registers_s390_linux32v2): Likewise.
10594 (init_registers_s390_linux64v1): Likewise.
10595 (init_registers_s390_linux64v2): Likewise.
10596 (init_registers_s390x_linux64v1): Likewise.
10597 (init_registers_s390x_linux64v2): Likewise.
10598 (s390_num_regs): Increment to 52.
10599 (s390_regmap): Add orig_r2 register.
10600 (s390_num_regs_3264): Increment to 68.
10601 (s390_regmap_3264): Add orig_r2 register.
10602 (s390_collect_ptrace_register): Handle orig_r2 register.
10603 (s390_supply_ptrace_register): Likewise.
10604 (s390_fill_last_break): New function.
10605 (s390_store_last_break): Likewise.
10606 (s390_fill_system_call): New function.
10607 (s390_store_system_call): Likewise.
10608 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
10609 register sets.
10610 (s390_check_regset): New function.
10611 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
10612 NT_S390_SYSTEM_CALL regsets and use appropriate description.
10613 Update target_regsets for available register sets.
10614
10615 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
10616 Jan Kratochvil <jan.kratochvil@redhat.com>
10617
10618 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
10619 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
10620 New.
10621 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
10622 * linux-low.h (struct process_info_private): New member r_debug.
10623 * server.c (handle_qxfer_libraries): Call
10624 the_target->qxfer_libraries_svr4.
10625 (handle_qxfer_libraries_svr4): New function.
10626 (qxfer_packets): New entry "libraries-svr4".
10627 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
10628 * target.h (struct target_ops): New member qxfer_libraries_svr4.
10629 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
10630 PACKET_qXfer_libraries_svr4.
10631
10632 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
10633
10634 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
10635 PSW address/mask between 8-byte and 16-byte formats.
10636 (s390_supply_ptrace_register): Likewise.
10637 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
10638 basic addressing mode bit.
10639
10640 2011-11-24 Stan Shebs <stan@codesourcery.com>
10641
10642 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
10643
10644 2011-11-17 Stan Shebs <stan@codesourcery.com>
10645
10646 * tracepoint.c (struct tracepoint): New field traceframe_usage.
10647 (tracing_start_time): New global.
10648 (tracing_stop_time): New global.
10649 (tracing_user_name): New global.
10650 (tracing_notes): New global.
10651 (tracing_stop_note): New global.
10652 (cmd_qtstart): Set traceframe_usage, start_time.
10653 (stop_tracing): Set stop_time.
10654 (cmd_qtstatus): Report additional status.
10655 (cmd_qtp): New function.
10656 (handle_tracepoint_query): Call it.
10657 (cmd_qtnotes): New function.
10658 (handle_tracepoint_general_set): Call it.
10659 (get_timestamp): Rename from tsv_get_timestamp.
10660
10661 2011-11-14 Stan Shebs <stan@codesourcery.com>
10662 Kwok Cheung Yeung <kcy@codesourcery.com>
10663
10664 * linux-x86-low.c (small_jump_insn): New.
10665 (i386_install_fast_tracepoint_jump_pad): Add arguments for
10666 trampoline and error message, build a trampoline and issue a small
10667 jump instruction to it.
10668 (x86_install_fast_tracepoint_jump_pad): Add arguments for
10669 trampoline and error message.
10670 (x86_get_min_fast_tracepoint_insn_len): New.
10671 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
10672 * linux-low.h (struct linux_target_ops): Add arguments to
10673 install_fast_tracepoint_jump_pad operation, add new operation.
10674 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
10675 arguments.
10676 (linux_get_min_fast_tracepoint_insn_len): New function.
10677 (linux_target_op): Add new operation.
10678 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
10679 (gdb_trampoline_buffer_end): Ditto.
10680 (gdb_trampoline_buffer_error): Ditto.
10681 (struct ipa_sym_addresses): Add fields for new IPA variables.
10682 (symbol_list): Add entries for new IPA variables.
10683 (struct tracepoint): Add fields to hold the address range of the
10684 trampoline used by the tracepoint.
10685 (trampoline_buffer_head): New static variable.
10686 (trampoline_buffer_tail): Ditto.
10687 (claim_trampoline_space): New function.
10688 (have_fast_tracepoint_trampoline_buffer): New function.
10689 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
10690 structure.
10691 (install_fast_tracepoint): Ditto, also add error buffer argument.
10692 (cmd_qtminftpilen): New function.
10693 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
10694 (fast_tracepoint_from_trampoline_address): New function.
10695 (fast_tracepoint_collecting): Handle trampoline as part of jump
10696 pad space.
10697 (set_trampoline_buffer_space): New function.
10698 (initialize_tracepoint): Initialize new IPA variables.
10699 * target.h (struct target_ops): Add arguments to
10700 install_fast_tracepoint_jump_pad operation, add new
10701 get_min_fast_tracepoint_insn_len operation.
10702 (target_get_min_fast_tracepoint_insn_len): New.
10703 (install_fast_tracepoint_jump_pad): Add arguments.
10704 * server.h (IPA_BUFSIZ): Define.
10705 * linux-i386-ipa.c: Include extra header files.
10706 (initialize_fast_tracepoint_trampoline_buffer): New function.
10707 (initialize_low_tracepoint): Call it.
10708 * server.h (set_trampoline_buffer_space): Declare.
10709 (claim_trampoline_space): Ditto.
10710 (have_fast_tracepoint_trampoline_buffer): Ditto.
10711
10712 2011-11-14 Yao Qi <yao@codesourcery.com>
10713
10714 * server.c (handle_query): Handle InstallInTrace for qSupported.
10715 * tracepoint.c (add_tracepoint): Sort list.
10716 (install_tracepoint, download_tracepoint): New.
10717 (cmd_qtdp): Call them to install and download tracepoints.
10718 (sort_tracepoints): Removed.
10719 (cmd_qtstart): Update.
10720
10721 2011-11-14 Yao Qi <yao@codesourcery.com>
10722
10723 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
10724 * mem-break.h: Declare.
10725 * tracepoint.c (cmd_qtstart): Move some code to ...
10726 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
10727 New.
10728 (download_tracepoints): Move some code to ...
10729 (download_tracepoint_1): ... here. New.
10730
10731 2011-11-08 Yao Qi <yao@codesourcery.com>
10732
10733 * remote-utils.c (relocate_instruction): A comment fix.
10734
10735 2011-11-07 Joel Brobecker <brobecker@adacore.com>
10736
10737 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
10738 (i386_dr_low_get_control, i386_dr_low_get_status): Use
10739 dr_status_mirror and dr_control_mirror from debug_reg_state.
10740 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
10741 (i386_initial_stuff): Remove use of deleted globals.
10742 (i386_get_thread_context, i386_set_thread_context,
10743 i386_thread_added): Use dr_status_mirror and dr_control_mirror
10744 from debug_reg_state.
10745
10746 2011-11-05 Yao Qi <yao@codesourcery.com>
10747
10748 * tracepoint.c (gdb_collect): Loop over tracepoints of same
10749 address as TPOINT's.
10750
10751 2011-11-02 Stan Shebs <stan@codesourcery.com>
10752
10753 * tracepoint.c (agent_mem_read_string): New function.
10754 (eval_agent_expr): Call it for tracenz.
10755 * server.c (handle_query): Report support for tracenz.
10756
10757 2011-11-02 Yao Qi <yao@codesourcery.com>
10758
10759 * tracepoint.c (cmd_qtstart): Remove unused local variables.
10760
10761 2011-11-02 Yao Qi <yao@codesourcery.com>
10762
10763 * target.h: Fix a typo in comment.
10764
10765 2011-10-31 Pedro Alves <pedro@codesourcery.com>
10766
10767 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
10768 clobber the breakpoints' shadows with fast tracepoint jumps.
10769 * mem-break.h (check_mem_write): Add `myaddr' parameter.
10770 * target.c (write_inferior_memory): Also pass MYADDR down to
10771 check_mem_write.
10772
10773 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
10774
10775 * configure.ac: Check support for personality routine.
10776 * configure: Regenerate.
10777 * config.in: Likewise.
10778 * linux-low.c: Include <sys/personality.h>.
10779 Define ADDR_NO_RANDOMIZE if necessary.
10780 (linux_create_inferior): Disable address space randomization when
10781 forking inferior, if requested.
10782 (linux_supports_disable_randomization): New function.
10783 (linux_target_ops): Install it.
10784 * server.h (disable_randomization): Declare.
10785 * server.c (disable_randomization): New global variable.
10786 (handle_general_set): Handle QDisableRandomization.
10787 (handle_query): Likewise for qSupported.
10788 (main): Support --disable-randomization and --no-disable-randomization
10789 command line arguments.
10790 * target.h (struct target_ops): Add supports_disable_randomization.
10791 (target_supports_disable_randomization): New macro.
10792
10793 2011-09-29 Mike Frysinger <vapier@gentoo.org>
10794
10795 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
10796 ifdef check.
10797 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
10798 [!PT_GETDSBT] (target_loadmap): New definition.
10799 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
10800 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
10801 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
10802 and PT_GETDSBT to LINUX_LOADMAP.
10803 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
10804 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
10805
10806 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
10807
10808 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
10809 (arm_linux_hwbp_cap): New static variable.
10810 (arm_linux_get_hwbp_cap): Replace by ...
10811 (arm_linux_init_hwbp_cap): ... this new function.
10812 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
10813 (arm_linux_get_hw_watchpoint_count): Likewise.
10814 (arm_linux_get_hw_watchpoint_max_length): Likewise.
10815 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
10816 (arm_prepare_to_resume): Use perror_with_name instead of error.
10817
10818 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
10819
10820 * linux-arm-low.c: Include <signal.h>.
10821 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
10822 (struct arm_linux_hwbp_cap): New data type.
10823 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
10824 (struct arm_linux_hw_breakpoint): New data type.
10825 (MAX_BPTS, MAX_WPTS): Define.
10826 (struct arch_process_info, struct arch_lwp_info): New data types.
10827 (arm_linux_get_hwbp_cap): New function.
10828 (arm_linux_get_hw_breakpoint_count): Likewise.
10829 (arm_linux_get_hw_watchpoint_count): Likewise.
10830 (arm_linux_get_hw_watchpoint_max_length): Likewise.
10831 (arm_hwbp_control_initialize): Likewise.
10832 (arm_hwbp_control_is_enabled): Likewise.
10833 (arm_hwbp_control_is_initialized): Likewise.
10834 (arm_hwbp_control_disable): Likewise.
10835 (arm_linux_hw_breakpoint_equal): Likewise.
10836 (arm_linux_hw_point_initialize): Likewise.
10837 (struct update_registers_data): New data structure.
10838 (update_registers_callback: New function.
10839 (arm_insert_point): Likewise.
10840 (arm_remove_point): Likewise.
10841 (arm_stopped_by_watchpoint): Likewise.
10842 (arm_stopped_data_address): Likewise.
10843 (arm_new_process): Likewise.
10844 (arm_new_thread): Likewise.
10845 (arm_prepare_to_resume): Likewise.
10846 (the_low_target): Register arm_insert_point, arm_remove_point,
10847 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
10848 arm_new_thread, and arm_prepare_to_resume.
10849
10850 2011-09-15 Stan Shebs <stan@codesourcery.com>
10851
10852 * server.h (struct emit_ops): Add compare-goto fields.
10853 * tracepoint.c (gdb_agent_op_sizes): New table.
10854 (emit_eq_goto): New function.
10855 (emit_ne_goto): New function.
10856 (emit_lt_goto): New function.
10857 (emit_le_goto): New function.
10858 (emit_gt_goto): New function.
10859 (emit_ge_goto): New function.
10860 (is_goto_target): New function.
10861 (compile_bytecodes): Recognize special cases of compare-goto
10862 combinations and call specialized emitters for them.
10863 * linux-x86-low.c (amd64_emit_eq_goto): New function.
10864 (amd64_emit_ne_goto): New function.
10865 (amd64_emit_lt_goto): New function.
10866 (amd64_emit_le_goto): New function.
10867 (amd64_emit_gt_goto): New function.
10868 (amd64_emit_ge_goto): New function.
10869 (amd64_emit_ops): Add the new functions.
10870 (i386_emit_eq_goto): New function.
10871 (i386_emit_ne_goto): New function.
10872 (i386_emit_lt_goto): New function.
10873 (i386_emit_le_goto): New function.
10874 (i386_emit_gt_goto): New function.
10875 (i386_emit_ge_goto): New function.
10876 (i386_emit_ops): Add the new functions.
10877
10878 2011-09-08 Stan Shebs <stan@codesourcery.com>
10879
10880 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
10881 (i386_emit_epilogue): Restore %ebx.
10882
10883 2011-08-31 Jie Zhang <jzhang918@gmail.com>
10884
10885 * server.c (step_thread): Remove definition.
10886 (process_serial_event): Don't handle Hs.
10887 * server.h (step_thread): Remove declaration.
10888 * target.c (set_desired_inferior): Remove use of step_thread.
10889
10890 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
10891
10892 * linux-low.c: Include linux-procfs.h.
10893 (linux_attach_lwp_1): Update comments.
10894 (linux_attach): Scan for existing threads when attaching to a
10895 process that is the tgid.
10896 * Makefile.in: Update dependencies.
10897
10898 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
10899
10900 * configure.srv: Add linux-procfs.o dependencies.
10901
10902 2011-08-14 Yao Qi <yao@codesourcery.com>
10903
10904 * target.h (struct target_ops): Fix indent.
10905 * win32-low.c (win32_target_ops): Fix comment.
10906
10907 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
10908 Yao Qi <yao@codesourcery.com>
10909
10910 * Makefile.in (clean): Remove tic6x-*.c files.
10911 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
10912 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
10913 (tic6x-c64xp-linux.c): Likewise.
10914 * configure.srv: Add support for tic6x-*-uclinux.
10915 * linux-tic6x-low.c: New.
10916 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
10917
10918 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
10919 Yao Qi <yao@codesourcery.com>
10920
10921 * target.h (struct target_ops): Add read_loadmap.
10922 * linux-low.c (struct target_loadseg): New type.
10923 (struct target_loadmap): New type.
10924 (linux_read_loadmap): New function.
10925 (linux_target_ops): Add linux_read_loadmap.
10926 * server.c (handle_query): Support qXfer:fdpic:read packet.
10927 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
10928 to NULL.
10929
10930 2011-08-05 Eli Zaretskii <eliz@gnu.org>
10931
10932 * win32-low.c: Include <stdint.h>.
10933
10934 2011-07-22 Pedro Alves <pedro@codesourcery.com>
10935
10936 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
10937 to the inferior here.
10938 (i386_remove_aligned_watchpoint): Ditto.
10939 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
10940 fit part of the watchpoint in the debug registers.
10941 (i386_update_inferior_debug_regs): New.
10942 (i386_low_insert_watchpoint): Work on a local mirror of the debug
10943 registers, and only update the inferior on success.
10944 (i386_low_remove_watchpoint): Ditto.
10945
10946 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
10947
10948 * linux-low.c (compare_ints, unique, list_threads, show_process,
10949 linux_core_of_thread): Delete.
10950 (linux_target_ops): Change linux_core_of_thread to
10951 linux_common_core_of_thread.
10952 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
10953 * utils.c (malloc_failure): Change type of argument.
10954 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
10955 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
10956 common/linux-osdata.c, common/ptid.c and common/buffer.c.
10957 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
10958 (IPA_OBJS): Add common-utils-ipa.o.
10959 (ptid_h, linux_osdata_h): New macros.
10960 (server_h): Add common/common-utils.h, common/xml-utils.h,
10961 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
10962 common/ptid.h.
10963 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
10964 ptid.o, buffer.o): New rules.
10965 (linux-low.o): Add common/linux-osdata.h as a dependency.
10966 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
10967 * configure.ac: Add AC_HEADER_DIRENT check.
10968 * config.in: Regenerate.
10969 * configure: Regenerate.
10970 * remote-utils.c (xml_escape_text): Delete.
10971 (buffer_grow, buffer_free, buffer_init, buffer_finish,
10972 buffer_xml_printf): Move to common/buffer.c.
10973 * server.c (main): Remove call to initialize_inferiors.
10974 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
10975 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
10976 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
10977 internal_error, gdb_assert, gdb_assert_fail): Delete.
10978 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
10979 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
10980 common/buffer.h.
10981 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
10982 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
10983 initialize_inferiors): Delete.
10984
10985 2011-07-20 Pedro Alves <pedro@codesourcery.com>
10986
10987 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
10988 symbol error.
10989
10990 2011-05-31 Pedro Alves <pedro@codesourcery.com>
10991
10992 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
10993 assertion.
10994 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
10995
10996 2011-05-26 Yao Qi <yao@codesourcery.com>
10997
10998 * Makefile.in (thread-db.o): Track dependence to
10999 common/gdb_thread_db.h.
11000 * thread-db.c: include gdb_thread_db.h from right place.
11001
11002 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
11003
11004 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
11005 __FILE__ and __LINE__ to internal_error.
11006
11007 2011-05-13 Doug Evans <dje@google.com>
11008
11009 * thread-db.c (try_thread_db_load_from_sdir): New function.
11010 (try_thread_db_load_from_dir): New function.
11011 (thread_db_load_search): Handle $sdir, ignore $pdir.
11012 Remove trying of system directories if search of
11013 libthread-db-search-path fails, that is now done via $sdir.
11014
11015 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
11016
11017 * server.c (handle_query): Add EnableDisableTracepoints to the list
11018 of supported features.
11019 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
11020 tracepoints.
11021 (cmd_qtenable_disable): New.
11022 (cmd_qtstart): Install tracepoints even if disabled.
11023 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
11024 receiving a QTEnable or QTDisable packet.
11025 (gdb_collect): Skip data collection if fast tracepoint is disabled.
11026 (ust_marker_to_static_tracepoint): Do not ignore disabled static
11027 tracepoints.
11028 (gdb_probe): Skip data collection if static tracepoint is disabled.
11029
11030 2011-05-10 Doug Evans <dje@google.com>
11031
11032 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
11033
11034 2011-05-04 Doug Evans <dje@google.com>
11035
11036 * linux-low.c (linux_join): Skip process lookup.
11037 * spu-low.c (spu_join): Ditto.
11038 * server.c (join_inferiors_callback): Delete.
11039 (process_serial_event): For 'D' packet (detach) call join_inferior
11040 directly.
11041
11042 2011-05-04 Joseph Myers <joseph@codesourcery.com>
11043
11044 * README: Don't mention xscale*-*-linux*.
11045 * configure.srv (xscale*-*-linux*): Don't handle target.
11046
11047 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
11048
11049 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
11050 casting pointers.
11051 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
11052 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
11053 (i386_emit_void_call_2): Likewise.
11054
11055 2011-04-26 Yao Qi <yao@codesourcery.com>
11056
11057 * linux-low.c: Move common macros to linux-ptrace.h.
11058 Include linux-ptrace.h.
11059 * Makefile.in (linux_ptrace_h): New.
11060 (linux-low.o): Depends on linux-ptrace.h.
11061
11062 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
11063
11064 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
11065 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
11066 (remote_prepare): New function with most of the TCP code from ...
11067 (remote_open): ... here. Detect PORT here unconditionally. Move also
11068 setting transport_is_reliable.
11069 * server.c (run_once): New variable.
11070 (gdbserver_usage): Document it.
11071 (main): Set run_once for `--once'. Call remote_prepare. Exit after
11072 the first run if RUN_ONCE.
11073 * server.h (run_once, remote_prepare): New declarations.
11074
11075 2011-04-19 Tom Tromey <tromey@redhat.com>
11076
11077 * win32-low.c (handle_load_dll): Remove duplicate "the".
11078
11079 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
11080
11081 Remove support for old Cygwin 1.5 versions.
11082 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
11083 function to avoid warning.
11084 (win32_add_one_solib): Use cygwin_conv_path function to avoid
11085 warning.
11086
11087 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
11088
11089 * gdbserver/server.h (Macro _): Define it if not available.
11090
11091 2011-03-14 Michael Snyder <msnyder@vmware.com>
11092
11093 * hostio.c (handle_close): Remove unnecessary null test.
11094
11095 2011-03-10 Joel Brobecker <brobecker@adacore.com>
11096
11097 * Makefile.in (maintainer-clean realclean distclean): Remove
11098 "make ... subdir_do" command.
11099
11100 2011-03-10 Michael Snyder <msnyder@vmware.com>
11101
11102 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
11103
11104 * server.c (handle_v_run): Free alloced buffer on early return.
11105
11106 2011-03-09 Yao Qi <yao@codesourcery.com>
11107
11108 Revert:
11109 2011-03-04 Yao Qi <yao@codesourcery.com>
11110
11111 * Makefile.in: Remove GNU make feature --directory.
11112
11113 2011-03-05 Yao Qi <yao@codesourcery.com>
11114
11115 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
11116 (subdir_do): New make target. Copied from gdb/Makefile.
11117 (maintainer-clean, realclean, distclean, clean): Call corresponding
11118 make targets in common/Makefile.
11119
11120 2011-02-11 Yao Qi <yao@codesourcery.com>
11121
11122 * configure.ac: Call AC_PROG_RANLIB.
11123 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
11124 * configure: Regenerate.
11125
11126 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
11127
11128 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
11129
11130 2011-03-06 Yao Qi <yao@codesourcery.com>
11131
11132 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
11133
11134 2011-03-05 Yao Qi <yao@codesourcery.com>
11135
11136 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
11137 (subdir_do): New make target. Copied from gdb/Makefile.
11138 (maintainer-clean, realclean, distclean, clean): Call corresponding
11139 make targets in common/Makefile.
11140
11141 2011-03-04 Yao Qi <yao@codesourcery.com>
11142
11143 * Makefile.in: Remove GNU make feature --directory.
11144
11145 2011-03-04 Michael Snyder <msnyder@vmware.com>
11146
11147 * server.c (queue_stop_reply): Call xmalloc not malloc.
11148
11149 2011-03-02 Michael Snyder <msnyder@vmware.com>
11150
11151 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
11152
11153 2011-02-28 Michael Snyder <msnyder@vmware.com>
11154
11155 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
11156 (cmd_qtframe): Ditto.
11157 (cmd_qtbuffer): Ditto.
11158 (cmd_bigqtbuffer): Ditto.
11159
11160 * utils.c (decimal2str): Initialize 'width' to nine, then
11161 don't mess with it.
11162
11163 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
11164
11165 * hostio.c (require_data): Free *data, not data.
11166
11167 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11168
11169 * hostio.c (require_data): Use free, not xfree.
11170
11171 2011-02-27 Michael Snyder <msnyder@vmware.com>
11172
11173 * server.c (handle_query): Discard unused value.
11174
11175 * hostio.c (require_data): Free malloc memory before returning
11176 error.
11177
11178 2011-02-26 Michael Snyder <msnyder@vmware.com>
11179
11180 * linux-low.c (list_threads): Call closedir for dirent.
11181
11182 2011-02-27 Michael Snyder <msnyder@vmware.com>
11183
11184 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
11185 a case statement falls through.
11186
11187 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
11188
11189 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
11190 in comparison.
11191
11192 2011-02-26 Michael Snyder <msnyder@vmware.com>
11193
11194 * utils.c (decimal2str): Eliminate dead code and dead param.
11195 (pulongest): Drop dead param from call to decimal2str.
11196 (plongest): Ditto.
11197
11198 2011-02-24 Joel Brobecker <brobecker@adacore.com>
11199
11200 Revert the following patch (not approved yet):
11201 2011-02-21 Hui Zhu <teawater@gmail.com>
11202 * tracepoint.c (tp_printf): New function.
11203 (eval_agent_expr): Handle gdb_agent_op_printf.
11204
11205 2011-02-21 Hui Zhu <teawater@gmail.com>
11206
11207 * tracepoint.c (tp_printf): New function.
11208 (eval_agent_expr): Handle gdb_agent_op_printf.
11209
11210 2011-02-18 Tom Tromey <tromey@redhat.com>
11211
11212 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
11213 (tracepoint.o): Likewise.
11214 * tracepoint.c (enum gdb_agent_op): Use ax.def.
11215 (gdb_agent_op_names): Likewise.
11216
11217 2011-02-18 Tom Tromey <tromey@redhat.com>
11218
11219 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
11220 gdb_agent_op_rot>: New constants.
11221 (gdb_agent_op_names): Add pick and roll.
11222 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
11223 cases.
11224
11225 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
11226
11227 * aclocal.m4: Regenerated with aclocal-1.11.1.
11228
11229 2011-02-14 Pedro Alves <pedro@codesourcery.com>
11230
11231 * server.c (handle_qxfer_traceframe_info): New.
11232 (qxfer_packets): Register "traceframe-info".
11233 (handle_query): Report support for qXfer:traceframe-info:read+.
11234 * tracepoint.c (match_blocktype): New.
11235 (traceframe_find_block_type): Rename to ...
11236 (traceframe_walk_blocks): ... this. Add callback filter argument,
11237 and use it.
11238 (traceframe_find_block_type): New, reimplemented on top of
11239 traceframe_walk_blocks.
11240 (build_traceframe_info_xml): New.
11241 (traceframe_read_info): New.
11242 * server.h (traceframe_read_info): Declare.
11243
11244 2011-02-11 Yao Qi <yao@codesourcery.com>
11245
11246 * configure.ac: Call AC_PROG_RANLIB.
11247 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
11248 * configure: Regenerate.
11249
11250 2011-02-07 Pedro Alves <pedro@codesourcery.com>
11251
11252 * server.c (gdb_read_memory): Change return semantics to allow
11253 partial transfers.
11254 (handle_search_memory_1): Adjust.
11255 (process_serial_event) <'m' packet>: Handle partial transfers.
11256 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
11257
11258 2011-01-28 Pedro Alves <pedro@codesourcery.com>
11259
11260 * regcache.c (init_register_cache): Initialize
11261 regcache->register_status.
11262 (free_register_cache): Release regcache->register_status.
11263 (regcache_cpy): Copy register_status.
11264 (registers_to_string): Print 'x's for unavailable registers.
11265 (supply_register): Mark the register's status valid or
11266 unavailable, depending on whether a buffer was passed in or not.
11267 (supply_register_zeroed): New.
11268 (supply_regblock): Mark the registers' status valid or
11269 unavailable, depending on whether a buffer was passed in or not.
11270 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
11271 (struct regcache): New `register_status' field.
11272 (supply_register_zeroed): Declare.
11273 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
11274 supply_register_zeroed, rather than passing a NULL buffer to
11275 supply_register.
11276 * tracepoint.c (fetch_traceframe_registers): Update comment.
11277
11278 2011-01-28 Pedro Alves <pedro@codesourcery.com>
11279
11280 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
11281 buffer explicit.
11282
11283 2011-01-25 Pedro Alves <pedro@codesourcery.com>
11284
11285 * server.h (decode_xfer_write): Change prototype.
11286 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
11287 and don't extract the annex here.
11288 * server.c (decode_xfer_read): Remove `annex' parameter,
11289 and don't extract the annex here.
11290 (decode_xfer): New.
11291 (struct qxfer): New.
11292 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
11293 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
11294 (handle_qxfer_statictrace): New functions, abstracted out from
11295 handle_query, and made to use the struct qxfer interface.
11296 (handle_threads_qxfer_proper): Rename to ...
11297 (handle_qxfer_threads_proper): ... this.
11298 (handle_threads_qxfer): Rename to ...
11299 (handle_qxfer_threads): ... this. Adjust.
11300 (qxfer_packets): New array.
11301 (handle_qxfer): New function.
11302 (handle_query): Use handle_qxfer.
11303
11304 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
11305
11306 * gdbreplay.c: Shorten lines of >= 80 columns.
11307 * linux-low.c: Ditto.
11308 * linux-ppc-low.c: Ditto.
11309 * linux-s390-low.c: Ditto.
11310 * linux-sparc-low.c: Ditto.
11311 * linux-x86-low.c: Ditto.
11312 * linux-xtensa-low.c: Ditto.
11313 * mem-break.c: Ditto.
11314 * nto-low.c: Ditto.
11315 * regcache.h: Ditto.
11316 * remote-utils.c: Ditto.
11317 * server.c: Ditto.
11318 * server.h: Ditto.
11319 * thread-db.c: Ditto.
11320 * tracepoint.c: Ditto.
11321 * utils.c: Ditto.
11322 * win32-low.h: Ditto.
11323
11324 2011-01-05 Joel Brobecker <brobecker@adacore.com>
11325
11326 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
11327 update.
11328
11329 2011-01-01 Joel Brobecker <brobecker@adacore.com>
11330
11331 * server.c (gdbserver_version): Update copyright year in version
11332 output.
11333 * gdbreplay.c (gdbreplay_version): Ditto.
11334
11335 2010-12-29 Jie Zhang <jie.zhang@analog.com>
11336
11337 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
11338 * linux-bfin-low.c: New file.
11339 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
11340 PT_DATA_ADDR for BFIN targets.
11341 * Makefile.in (SFILES): Add linux-bfin-low.c.
11342 (clean): Remove reg-bfin.c.
11343 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
11344 * README: Mention supported Blackfin targets.
11345
11346 2010-12-23 Mike Frysinger <vapier@gentoo.org>
11347
11348 * .gitignore: New file.
11349
11350 2010-11-16 Mike Frysinger <vapier@gentoo.org>
11351
11352 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
11353
11354 2010-10-22 Jie Zhang <jie@codesourcery.com>
11355
11356 * Makefile.in: Add FLAGS_TO_PASS variable.
11357 (install): Remove dependency of install-only and recursively
11358 invoke make for install-only.
11359
11360 2010-10-04 Doug Evans <dje@google.com>
11361
11362 * Makefile.in (uninstall): Use $(DESTDIR).
11363
11364 2010-09-24 Pedro Alves <pedro@codesourcery.com>
11365
11366 PR gdb/11842
11367
11368 * linux-x86-low.c (compat_siginfo_from_siginfo)
11369 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
11370 si_code is < 0. Check for si_code == SI_TIMER before checking for
11371 si_code < 0.
11372
11373 2010-09-13 Joel Brobecker <brobecker@adacore.com>
11374
11375 * lynx-i386-low.c: New file.
11376 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
11377
11378 2010-09-13 Joel Brobecker <brobecker@adacore.com>
11379
11380 * lynx-low.c (ptrace_request_to_str): Remove handling for
11381 request values that have been removed in LynxOS 5.x.
11382
11383 2010-09-13 Joel Brobecker <brobecker@adacore.com>
11384
11385 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
11386 <ptrace.h>
11387
11388 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
11389
11390 * configure.ac: Add --enable-inprocess-agent option.
11391 * configure: Rebuilt.
11392
11393 2010-09-06 Yao Qi <yao@codesourcery.com>
11394
11395 * linux-low.c (linux_kill): Remove unused variable.
11396 (linux_stabilize_threads): Likewise.
11397 * server.c (start_inferior): Likewise.
11398 (queue_stop_reply_callback): Likewise.
11399 * tracepoint.c (do_action_at_tracepoint): Likewise.
11400
11401 2010-09-06 Yao Qi <yao@codesourcery.com>
11402
11403 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
11404 on return.
11405
11406 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
11407
11408 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
11409
11410 2010-09-06 Pedro Alves <pedro@codesourcery.com>
11411
11412 * Makefile.in (install-only): Replace $IPA_DEPFILES with
11413 "$(IPA_DEPFILES)".
11414
11415 2010-09-01 Joel Brobecker <brobecker@adacore.com>
11416
11417 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
11418 gdbserver/lynx-ppc-low.c: New files.
11419 * Makefile.in (lynx_low_h): New variable.
11420 (lynx-low.o, lynx-ppc-low.o): New rules.
11421 * configure.ac: On LynxOS, link with -lnetinet.
11422 * configure.srv: Add handling of powerpc-*-lynxos* targets.
11423 * configure: regenerate.
11424
11425 2010-09-01 Joel Brobecker <brobecker@adacore.com>
11426
11427 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
11428 * configure.ac: Add check for vasprintf and vsnprintf.
11429 * configure, config.in: Regenerate.
11430 * server.h (vasprintf, vsnprintf): Add conditional declarations.
11431
11432 2010-09-01 Joel Brobecker <brobecker@adacore.com>
11433
11434 * gdbreplay.c: Move include of alloca.h up, next to include of
11435 malloc.h.
11436 * server.h: Add include of malloc.h.
11437 * mem-break.c: Remove include of malloc.h.
11438 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
11439
11440 2010-09-01 Joel Brobecker <brobecker@adacore.com>
11441
11442 * Makefile.in (memmem.o): Build with -Wno-error.
11443
11444 2010-09-01 Joel Brobecker <brobecker@adacore.com>
11445
11446 * utils.c (xsnprintf): Make non-static.
11447 * server.h: Add xsnprintf declaration.
11448 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
11449 replace calls to snprintf by calls to xsnprintf throughout.
11450
11451 2010-09-01 Joel Brobecker <brobecker@adacore.com>
11452
11453 * configure.ac: Add configure check for alloca.
11454 * configure, config.in: Regenerate.
11455 * server.h: Include alloca.h if it exists.
11456 * gdbreplay.c: Include alloca.h if it exists.
11457
11458 2010-08-28 Pedro Alves <pedro@codesourcery.com>
11459
11460 * linux-low.c (__SIGRTMIN): Define if not already defined.
11461 (linux_create_inferior): Check for __ANDROID__ rather than
11462 __SIGRTMIN.
11463 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
11464 are already deferred.
11465 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
11466 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
11467 stopped and already has a pending signal to report.
11468 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
11469 a pending signal to report or is moving out of a jump pad.
11470 (linux_init_signals): Check for __ANDROID__ rather than
11471 __SIGRTMIN.
11472
11473 2010-08-28 Pedro Alves <pedro@codesourcery.com>
11474
11475 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
11476 debug_threads check. Avoid a linear search when not doing debug
11477 output.
11478
11479 2010-08-27 Pedro Alves <pedro@codesourcery.com>
11480
11481 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
11482 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
11483 (struct file_handler) <fd>: Change type to gdb_fildes_t.
11484 (process_event): Change local fd's type to gdb_fildes_t.
11485 (create_file_handler): Adjust prototype.
11486 (delete_file_handler): Adjust prototype.
11487 (handle_file_event): Adjust prototype. Use pfildes.
11488 (create_file_event): Adjsut prototype.
11489 * remote-utils.c (remote_desc, listen_desc): Change type to
11490 gdb_fildes_t.
11491 * server.h: New gdb_fildes_t typedef.
11492 [USE_WIN32API]: Include winsock2.h.
11493 (delete_file_handler, add_file_handler): Adjust prototypes.
11494 (pfildes): Declare.
11495 * utils.c (pfildes): New.
11496
11497 2010-08-27 Pedro Alves <pedro@codesourcery.com>
11498
11499 * configure.ac (build_warnings): Add -Wno-char-subscripts.
11500 * configure: Regenerate.
11501
11502 2010-08-27 Pedro Alves <pedro@codesourcery.com>
11503
11504 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
11505 (linux_done_accessing_memory): ... this.
11506 (linux_target_ops): Adjust.
11507 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
11508 * nto-low.c (nto_target_ops): Adjust comment.
11509 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
11510 * spu-low.c (spu_target_ops): Adjust comment.
11511 * target.h (target_ops): Rename unprepare_to_access_memory field
11512 to done_accessing_memory.
11513 (unprepare_to_access_memory): Rename to ...
11514 (done_accessing_memory): ... this.
11515
11516 2010-08-26 Pedro Alves <pedro@codesourcery.com>
11517
11518 * linux-low.c (linux_prepare_to_access_memory): New.
11519 (linux_unprepare_to_access_memory): New.
11520 (linux_target_ops): Install them.
11521 * server.c (read_memory): Rename to ...
11522 (gdb_read_memory): ... this. Use
11523 prepare_to_access_memory/prepare_to_access_memory.
11524 (write_memory): Rename to ...
11525 (gdb_write_memory): ... this. Use
11526 prepare_to_access_memory/prepare_to_access_memory.
11527 (handle_search_memory_1): Adjust.
11528 (process_serial_event): Adjust.
11529 * target.h (struct target_ops): New fields
11530 prepare_to_access_memory and unprepare_to_access_memory.
11531 (prepare_to_access_memory, unprepare_to_access_memory): New.
11532 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
11533 prepare_to_access_memory/prepare_to_access_memory.
11534 * nto-low.c (nto_target_ops): Adjust.
11535 * spu-low.c (spu_target_ops): Adjust.
11536 * win32-low.c (win32_target_ops): Adjust.
11537
11538 2010-08-26 Pedro Alves <pedro@codesourcery.com>
11539
11540 * Makefile.in (WARN_CFLAGS): Get it from configure.
11541 (WERROR_CFLAGS): New.
11542 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
11543 * configure.ac: Introduce --enable-werror, which adds -Werror to
11544 the compiler command line. Enabled by default. Disable with
11545 --disable-werror. Add -Wdeclaration-after-statement
11546 Wpointer-arith and -Wformat-nonliteral to warning flags.
11547 * configure: Regenerate.
11548
11549 2010-08-26 Pedro Alves <pedro@codesourcery.com>
11550
11551 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
11552
11553 2010-08-26 Pedro Alves <pedro@codesourcery.com>
11554
11555 * gdbreplay.c (remote_error): New.
11556 (gdbchar): New.
11557 (expect): Use gdbchar. Check for error reading from GDB.
11558 Clarify sync error output.
11559 (play): Check for errors writing to GDB.
11560 * linux-low.c (sigchld_handler): Really ignore `write' errors.
11561 * remote-utils.c (getpkt): Check for errors writing to the remote
11562 descriptor.
11563
11564 2010-08-25 Pedro Alves <pedro@codesourcery.com>
11565
11566 * linux-low.c (linux_wait_1): Move non-debugging code out of
11567 `debug_threads' control.
11568
11569 2010-08-25 Pedro Alves <pedro@codesourcery.com>
11570
11571 * linux-low.c (linux_wait_1): Don't set last_status here.
11572 * server.c (push_event, queue_stop_reply_callback): Assert we're
11573 not pushing a TARGET_WAITKIND_IGNORE event.
11574 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
11575 (myresume, handle_target_event): Set the thread's last_resume_kind
11576 and last_status from the target returned status.
11577
11578 2010-08-25 Pedro Alves <pedro@codesourcery.com>
11579
11580 PR threads/10729
11581
11582 * linux-x86-low.c (update_debug_registers_callback): New.
11583 (i386_dr_low_set_addr): Use it.
11584 (i386_dr_low_get_addr): New.
11585 (i386_dr_low_set_control): Use update_debug_registers_callback.
11586 (i386_dr_low_get_control): New.
11587 (i386_dr_low_get_status): Adjust.
11588 * linux-low.c (linux_stop_lwp): New.
11589 * linux-low.h (linux_stop_lwp): Declare.
11590
11591 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
11592 argument instead of a i386_debug_reg_state.
11593 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
11594 a i386_debug_reg_state.
11595 (i386_insert_aligned_watchpoint): Adjust.
11596 (i386_remove_aligned_watchpoint): Adjust.
11597 (i386_low_stopped_data_address): Read the debug registers from the
11598 inferior instead of from the mirrors.
11599 * i386-low.h (struct i386_debug_reg_state): Extend comment.
11600 (i386_dr_low_get_addr): Declare.
11601 (i386_dr_low_get_control): Declare.
11602 (i386_dr_low_get_status): Change prototype.
11603
11604 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
11605 (i386_dr_low_get_addr): New.
11606 (i386_dr_low_get_control): New.
11607 (i386_dr_low_get_status): Adjust prototype. Return
11608 dr_status_mirror.
11609 (i386_initial_stuff): Clear dr_status_mirror and
11610 dr_control_mirror.
11611 (i386_get_thread_context): Adjust.
11612 (i386_set_thread_context): Adjust.
11613 (i386_thread_added): Adjust.
11614
11615 2010-08-24 Pedro Alves <pedro@codesourcery.com>
11616
11617 * linux-low.h (linux_thread_area): Delete declaration.
11618
11619 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
11620
11621 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
11622 after its termination.
11623
11624 2010-08-09 Pedro Alves <pedro@codesourcery.com>
11625
11626 * linux-low.c (gdb_wants_lwp_stopped): Delete.
11627 (gdb_wants_all_stopped): Delete.
11628 (linux_wait_1): Don't call them.
11629 * server.c (handle_v_cont): Tag all threads as want-stopped.
11630 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
11631 stopped as "client-wants-stopped".
11632
11633 2010-07-31 Pedro Alves <pedro@codesourcery.com>
11634
11635 * Makefile.in (signals_h): New.
11636 (server_h): Depend on it.
11637 (server.o): Don't depend on $(signals_def).
11638 (signals.o): Depend on $(signals_def).
11639
11640 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
11641
11642 * Makefile.in (signals_def): New.
11643 (server_h): Append include/gdb/signals.h and signals_def.
11644 (server.o): Append signals_def.
11645
11646 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
11647
11648 * server.c (handle_target_event): Use target_signal_to_host for
11649 resume_info.sig initialization.
11650 * target.h (struct thread_resume) <sig>: New comment.
11651
11652 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
11653
11654 * server.c (handle_query): strcpy() the returned string from paddress()
11655 instead of sprintf().
11656 * utils.c (paddress): Return phex_nz().
11657
11658 2010-07-07 Joel Brobecker <brobecker@adacore.com>
11659
11660 * server.c (handle_v_cont): Call mourn_inferior if process
11661 just exited.
11662 (myresume): Likewise.
11663
11664 2010-07-01 Pedro Alves <pedro@codesourcery.com>
11665
11666 Static tracepoints, and integration with UST.
11667
11668 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
11669 * mem-break.c (uninsert_all_breakpoints)
11670 (reinsert_all_breakpoints): New.
11671 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
11672 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
11673 (gdb_agent_ust_loaded, helper_thread_id)
11674 (gdb_agent_helper_thread_id): New macros.
11675 (struct ipa_sym_addresses): Add addr_ust_loaded,
11676 addr_helper_thread_id, addr_cmd_buf.
11677 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
11678 (in_process_agent_loaded_ust): New.
11679 (write_e_ust_not_loaded): New.
11680 (maybe_write_ipa_ust_not_loaded): New.
11681 (struct collect_static_trace_data_action): New.
11682 (enum tracepoint_type) <static_tracepoint>: New.
11683 (struct tracepoint) <handle>: Mention static tracepoints.
11684 (struct static_tracepoint_ctx): New.
11685 (CMD_BUF_SIZE): New.
11686 (add_tracepoint_action): Handle static tracepoint actions.
11687 (unprobe_marker_at): New.
11688 (clear_installed_tracepoints): Handle static tracepoints.
11689 (cmd_qtdp): Handle static tracepoints.
11690 (probe_marker_at): New.
11691 (cmd_qtstart): Handle static tracepoints.
11692 (response_tracepoint): Handle static tracepoints.
11693 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
11694 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
11695 (get_context_regcache): Handle static tracepoints.
11696 (do_action_at_tracepoint): Handle static tracepoint actions.
11697 (traceframe_find_block_type): Handle static trace data blocks.
11698 (traceframe_read_sdata): New.
11699 (download_tracepoints): Download static tracepoint actions.
11700 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
11701 (GDB_PROBE_NAME): New.
11702 (ust_ops): New.
11703 (GET_UST_SYM): New.
11704 (USTF): New.
11705 (dlsym_ust): New.
11706 (ust_marker_to_static_tracepoint): New.
11707 (gdb_probe): New.
11708 (collect_ust_data_at_tracepoint): New.
11709 (gdb_ust_probe): New.
11710 (UNIX_PATH_MAX, SOCK_DIR): New.
11711 (gdb_ust_connect_sync_socket): New.
11712 (resume_thread, stop_thread): New.
11713 (run_inferior_command): New.
11714 (init_named_socket): New.
11715 (gdb_ust_socket_init): New.
11716 (cstr_to_hexstr): New.
11717 (next_st): New.
11718 (first_marker, next_marker): New.
11719 (response_ust_marker): New.
11720 (cmd_qtfstm, cmd_qtsstm): New.
11721 (unprobe_marker_at, probe_marker_at): New.
11722 (cmd_qtstmat, gdb_ust_thread): New.
11723 (gdb_ust_init): New.
11724 (initialize_tracepoint_ftlib): Call gdb_ust_init.
11725 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
11726 (ST_REGENTRY): New.
11727 (x86_64_st_collect_regmap): New.
11728 (X86_64_NUM_ST_COLLECT_GREGS): New.
11729 (AMD64_RIP_REGNUM): New.
11730 (supply_static_tracepoint_registers): New.
11731 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
11732 (ST_REGENTRY): New.
11733 (i386_st_collect_regmap): New.
11734 (i386_NUM_ST_COLLECT_GREGS): New.
11735 (supply_static_tracepoint_registers): New.
11736 * server.c (handle_query): Handle qXfer:statictrace:read.
11737 <qSupported>: Report support for StaticTracepoints, and
11738 qXfer:statictrace:read features.
11739 * server.h (traceframe_read_sdata)
11740 (supply_static_tracepoint_registers): Declare.
11741 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
11742 (unpack_varlen_hex): Include in IPA build.
11743 * Makefile.in (ustlibs, ustinc): New.
11744 (IPA_OBJS): Add remote-utils-ipa.o.
11745 ($(IPA_LIB)): Link -ldl and -lpthread.
11746 (UST_CFLAGS): New.
11747 (IPAGENT_CFLAGS): Add UST_CFLAGS.
11748 * config.in, configure: Regenerate.
11749
11750 2010-06-20 Ian Lance Taylor <iant@google.com>
11751 Pedro Alves <pedro@codesourcery.com>
11752
11753 * linux-x86-low.c (always_true): Delete.
11754 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
11755 trying to fool the compiler with always_true.
11756
11757 2010-06-20 Pedro Alves <pedro@codesourcery.com>
11758
11759 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
11760 conditions in gdbserver.
11761
11762 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
11763
11764 * spu-low.c (spu_read_memory): Wrap around local store limit.
11765 (spu_write_memory): Likewise.
11766
11767 2010-06-15 Pedro Alves <pedro@codesourcery.com>
11768
11769 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
11770 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
11771 LONGEST uses.
11772 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
11773 uses.
11774 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
11775 uses with LONGEST uses.
11776
11777 2010-06-14 Stan Shebs <stan@codesourcery.com>
11778 Pedro Alves <pedro@codesourcery.com>
11779
11780 Bytecode compiler.
11781
11782 * linux-x86-low.c: Include limits.h.
11783 (add_insns): New.
11784 (always_true): New.
11785 (EMIT_ASM): New.
11786 (EMIT_ASM32): New.
11787 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
11788 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
11789 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
11790 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
11791 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
11792 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
11793 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
11794 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
11795 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
11796 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
11797 (amd64_emit_void_call_2): New.
11798 (amd64_emit_ops): New.
11799 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
11800 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
11801 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
11802 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
11803 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
11804 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
11805 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
11806 (i386_emit_call, i386_emit_reg, i386_emit_pop)
11807 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
11808 (i386_emit_stack_adjust, i386_emit_int_call_1)
11809 (i386_emit_void_call_2): New.
11810 (i386_emit_ops): New.
11811 (x86_emit_ops): New.
11812 (the_low_target): Install x86_emit_ops.
11813 * server.h (struct emit_ops): New.
11814 (get_raw_reg_func_addr): Declare.
11815 (current_insn_ptr, emit_error): Declare.
11816 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
11817 (set_trace_state_variable_value): New defines.
11818 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
11819 addr_get_trace_state_variable_value and
11820 addr_set_trace_state_variable_value.
11821 (symbol_list): New fields for get_raw_reg,
11822 get_trace_state_variable_value and set_trace_state_variable_value.
11823 (condfn): New typedef.
11824 (struct tracepoint): New field `compiled_cond'.
11825 (do_action_at_tracepoint): Clear compiled_cond.
11826 (get_trace_state_variable_value, set_trace_state_variable_value):
11827 Export in the IPA.
11828 (condition_true_at_tracepoint): If there's a compiled condition,
11829 run that.
11830 (current_insn_ptr, emit_error): New globals.
11831 (struct bytecode_address): New.
11832 (get_raw_reg_func_addr): New.
11833 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
11834 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
11835 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
11836 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
11837 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
11838 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
11839 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
11840 (compile_tracepoint_condition, compile_bytecodes): New.
11841 * target.h (emit_ops): Forward declare.
11842 (struct target_ops): New field emit_ops.
11843 (target_emit_ops): New.
11844 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
11845 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
11846 * linux-low.c (linux_emit_ops): New.
11847 (linux_target_ops): Install it.
11848 * linux-low.h (struct linux_target_ops): New field emit_ops.
11849
11850 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
11851
11852 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
11853 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
11854
11855 2010-06-01 Pedro Alves <pedro@codesourcery.com>
11856 Stan Shebs <stan@codesourcery.com>
11857
11858 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
11859 (all): Depend on $(extra_libraries).
11860 (install-only): Install the IPA.
11861 (IPA_OBJS, IPA_LIB): New.
11862 (clean): Remove the IPA lib.
11863 (IPAGENT_CFLAGS): New.
11864 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
11865 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
11866 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
11867 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
11868 * configure.ac: Check for atomic builtins support in the compiler.
11869 (IPA_DEPFILES, extra_libraries): Define.
11870 * configure.srv (ipa_obj): Add description.
11871 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
11872 (i[34567]86-*-linux*): Set ipa_obj.
11873 (x86_64-*-linux*): Set ipa_obj.
11874 * linux-low.c (stabilizing_threads): New.
11875 (supports_fast_tracepoints): New.
11876 (linux_detach): Stabilize threads before detaching.
11877 (handle_tracepoints): Handle internal tracing breakpoints. Assert
11878 the lwp is either not stabilizing, or is moving out of a jump pad.
11879 (linux_fast_tracepoint_collecting): New.
11880 (maybe_move_out_of_jump_pad): New.
11881 (enqueue_one_deferred_signal): New.
11882 (dequeue_one_deferred_signal): New.
11883 (linux_wait_for_event_1): If moving out of a jump pad, defer
11884 pending signals to later.
11885 (linux_stabilize_threads): New.
11886 (linux_wait_1): Check if threads need moving out of jump pads, and
11887 do it if so.
11888 (stuck_in_jump_pad_callback): New.
11889 (move_out_of_jump_pad_callback): New.
11890 (lwp_running): New.
11891 (linux_resume_one_lwp): Handle moving out of jump pads.
11892 (linux_set_resume_request): Dequeue deferred signals.
11893 (need_step_over_p): Also step over fast tracepoint jumps.
11894 (start_step_over): Also uninsert fast tracepoint jumps.
11895 (finish_step_over): Also reinsert fast tracepoint jumps.
11896 (linux_install_fast_tracepoint_jump): New.
11897 (linux_target_ops): Install linux_stabilize_threads and
11898 linux_install_fast_tracepoint_jump_pad.
11899 * linux-low.h (linux_target_ops) <get_thread_area,
11900 install_fast_tracepoint_jump_pad>: New fields.
11901 (struct lwp_info) <collecting_fast_tracepoint,
11902 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
11903 (linux_get_thread_area): Declare.
11904 * linux-x86-low.c (jump_insn): New.
11905 (x86_get_thread_area): New.
11906 (append_insns): New.
11907 (push_opcode): New.
11908 (amd64_install_fast_tracepoint_jump_pad): New.
11909 (i386_install_fast_tracepoint_jump_pad): New.
11910 (x86_install_fast_tracepoint_jump_pad): New.
11911 (the_low_target): Install x86_get_thread_area and
11912 x86_install_fast_tracepoint_jump_pad.
11913 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
11914 (struct fast_tracepoint_jump): New.
11915 (fast_tracepoint_jump_insn): New.
11916 (fast_tracepoint_jump_shadow): New.
11917 (find_fast_tracepoint_jump_at): New.
11918 (fast_tracepoint_jump_here): New.
11919 (delete_fast_tracepoint_jump): New.
11920 (set_fast_tracepoint_jump): New.
11921 (uninsert_fast_tracepoint_jumps_at): New.
11922 (reinsert_fast_tracepoint_jumps_at): New.
11923 (set_breakpoint_at): Use write_inferior_memory.
11924 (uninsert_raw_breakpoint): Use write_inferior_memory.
11925 (check_mem_read): Mask out fast tracepoint jumps.
11926 (check_mem_write): Mask out fast tracepoint jumps.
11927 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
11928 (set_fast_tracepoint_jump): Declare.
11929 (delete_fast_tracepoint_jump)
11930 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
11931 (reinsert_fast_tracepoint_jumps_at): Declare.
11932 * regcache.c: Don't compile many functions when building the
11933 in-process agent library.
11934 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
11935 the register buffer in the heap.
11936 (free_register_cache): If the register buffer isn't owned by the
11937 regcache, don't free it.
11938 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
11939 pre-existing register caches.
11940 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
11941 type.
11942 (convert_ascii_to_int): : Constify `from' parameter type.
11943 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
11944 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
11945 the needed buffer in-place.
11946 (relocate_instruction): New.
11947 * server.c (handle_query) <qSymbols>: If the target supports
11948 tracepoints, give it a chance of looking up symbols. Report
11949 support for fast tracepoints.
11950 (handle_status): Stabilize threads.
11951 (process_serial_event): Adjust.
11952 * server.h (struct fast_tracepoint_jump): Forward declare.
11953 (struct process_info) <fast_tracepoint_jumps>: New field.
11954 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
11955 (decode_X_packet, decode_M_packet): Adjust.
11956 (relocate_instruction): Declare.
11957 (in_process_agent_loaded): Declare.
11958 (tracepoint_look_up_symbols): Declare.
11959 (struct fast_tpoint_collect_status): Declare.
11960 (fast_tracepoint_collecting): Declare.
11961 (force_unlock_trace_buffer): Declare.
11962 (handle_tracepoint_bkpts): Declare.
11963 (initialize_low_tracepoint)
11964 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
11965 * target.h (struct target_ops) <stabilize_threads,
11966 install_fast_tracepoint_jump_pad>: New fields.
11967 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
11968 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
11969 [HAVE_STDINT_H]: Include stdint.h.
11970 (trace_debug_1): Rename to ...
11971 (trace_vdebug): ... this.
11972 (trace_debug): Rename to ...
11973 (trace_debug_1): ... this. Add `level' parameter.
11974 (trace_debug): New.
11975 (ATTR_USED, ATTR_NOINLINE): New.
11976 (IP_AGENT_EXPORT): New.
11977 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
11978 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
11979 (about_to_request_buffer_space, trace_buffer_is_full)
11980 (stopping_tracepoint, expr_eval_result, error_tracepoint)
11981 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
11982 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
11983 (traceframe_write_count, traceframes_created)
11984 (trace_state_variables)
11985 New renaming defines.
11986 (struct ipa_sym_addresses): New.
11987 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
11988 (symbol_list): New.
11989 (ipa_sym_addrs): New.
11990 (all_tracepoint_symbols_looked_up): New.
11991 (in_process_agent_loaded): New.
11992 (write_e_ipa_not_loaded): New.
11993 (maybe_write_ipa_not_loaded): New.
11994 (tracepoint_look_up_symbols): New.
11995 (debug_threads) [IN_PROCESS_AGENT]: New.
11996 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
11997 (UNKNOWN_SIDE_EFFECTS): New.
11998 (stop_tracing): New.
11999 (flush_trace_buffer): New.
12000 (stop_tracing_bkpt): New.
12001 (flush_trace_buffer_bkpt): New.
12002 (read_inferior_integer): New.
12003 (read_inferior_uinteger): New.
12004 (read_inferior_data_pointer): New.
12005 (write_inferior_data_pointer): New.
12006 (write_inferior_integer): New.
12007 (write_inferior_uinteger): New.
12008 (struct collect_static_trace_data_action): Delete.
12009 (enum tracepoint_type): New.
12010 (struct tracepoint) <type>: New field `type'.
12011 <actions_str, step_actions, step_actions_str>: Only include in
12012 GDBserver.
12013 <orig_size, obj_addr_on_target, adjusted_insn_addr>
12014 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
12015 (tracepoints): Use IP_AGENT_EXPORT.
12016 (last_tracepoint): Don't include in the IPA.
12017 (stopping_tracepoint): Use IP_AGENT_EXPORT.
12018 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
12019 (alloced_trace_state_variables): New.
12020 (trace_state_variables): Use IP_AGENT_EXPORT.
12021 (traceframe_t): Delete unused variable.
12022 (circular_trace_buffer): Don't include in the IPA.
12023 (trace_buffer_start): Delete.
12024 (struct trace_buffer_control): New.
12025 (trace_buffer_free): Delete.
12026 (struct ipa_trace_buffer_control): New.
12027 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
12028 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
12029 New.
12030 (trace_buffer_ctrl): New.
12031 (TRACE_BUFFER_CTRL_CURR): New.
12032 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
12033 Reimplement as macros.
12034 (trace_buffer_wrap): Delete.
12035 (traceframe_write_count, traceframe_read_count)
12036 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
12037 (struct tracepoint_hit_ctx) <type>: New field.
12038 (struct fast_tracepoint_ctx): New.
12039 (memory_barrier): New.
12040 (cmpxchg): New.
12041 (record_tracepoint_error): Update atomically in the IPA.
12042 (clear_inferior_trace_buffer): New.
12043 (about_to_request_buffer_space): New.
12044 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
12045 updating the same buffer.
12046 (add_tracepoint): Default the tracepoint's type to trap
12047 tracepoint, and orig_size to -1.
12048 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
12049 internal variables.
12050 (create_trace_state_variable): New parameter `gdb'. Handle it.
12051 (clear_installed_tracepoints): Clear fast tracepoint jumps.
12052 (cmd_qtdp): Handle fast tracepoints.
12053 (cmd_qtdv): Adjust.
12054 (max_jump_pad_size): New.
12055 (gdb_jump_pad_head): New.
12056 (get_jump_space_head): New.
12057 (claim_jump_space): New.
12058 (sort_tracepoints): New.
12059 (MAX_JUMP_SIZE): New.
12060 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
12061 IPA.
12062 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
12063 support. Upload fast traceframes, and delete internal IPA
12064 breakpoints.
12065 (stop_tracing_handler): New.
12066 (flush_trace_buffer_handler): New.
12067 (cmd_qtstop): Upload fast tracepoints.
12068 (response_tracepoint): Handle fast tracepoints.
12069 (tracepoint_finished_step): Upload fast traceframes. Set the
12070 tracepoint hit context's tracepoint type.
12071 (handle_tracepoint_bkpts): New.
12072 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
12073 type. Add comment about fast tracepoints.
12074 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
12075 non-existing action_str field.
12076 (get_context_regcache): Handle fast tracepoints.
12077 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
12078 to the regcache.
12079 (fast_tracepoint_from_jump_pad_address): New.
12080 (fast_tracepoint_from_ipa_tpoint_address): New.
12081 (collecting_t): New.
12082 (force_unlock_trace_buffer): New.
12083 (fast_tracepoint_collecting): New.
12084 (collecting): New.
12085 (gdb_collect): New.
12086 (write_inferior_data_ptr): New.
12087 (target_tp_heap): New.
12088 (target_malloc): New.
12089 (download_agent_expr): New.
12090 (UALIGN): New.
12091 (download_tracepoints): New.
12092 (download_trace_state_variables): New.
12093 (upload_fast_traceframes): New.
12094 (IPA_FIRST_TRACEFRAME): New.
12095 (IPA_NEXT_TRACEFRAME_1): New.
12096 (IPA_NEXT_TRACEFRAME): New.
12097 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
12098 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
12099 (gdb_jump_pad_buffer_end): New.
12100 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
12101 (initialize_tracepoint): Adjust.
12102 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
12103 buffer. Initialize the low module.
12104 * utils.c (PREFIX, TOOLNAME): New.
12105 (malloc_failure): Use PREFIX.
12106 (error): In the IPA, an error causes an exit.
12107 (fatal, warning): Use PREFIX.
12108 (internal_error): Use TOOLNAME.
12109 (NUMCELLS): Increase to 10.
12110 * configure, config.in: Regenerate.
12111
12112 2010-06-01 Pedro Alves <pedro@codesourcery.com>
12113
12114 * server.c (handle_query) <qSupported>: Do two passes over the
12115 qSupported string to avoid nesting strtok.
12116
12117 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
12118
12119 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
12120 (CDEPS): New.
12121 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
12122 -Wl,--dynamic-list.
12123 * configure: Regenerate.
12124 * proc-service.list: New.
12125
12126 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
12127
12128 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
12129 New comment.
12130
12131 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
12132
12133 * gdbreplay.c (remote_open): Check error return from socket() call by
12134 its equality to -1 not by it being negative.
12135 * remote-utils.c (remote_open): Likewise.
12136
12137 2010-05-23 Pedro Alves <pedro@codesourcery.com>
12138
12139 * config.h: Regenerate.
12140
12141 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
12142
12143 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
12144 doesn't provide PTRACE_GET_THREAD_AREA.
12145
12146 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
12147
12148 * linux-m68k-low.c: Include <asm/ptrace.h>
12149 (ps_get_thread_area): Implement.
12150
12151 2010-05-03 Doug Evans <dje@google.com>
12152
12153 * event-loop.c (struct callback_event): New struct.
12154 (callback_list): New global.
12155 (append_callback_event, delete_callback_event): New functions.
12156 (process_callback): New function.
12157 (start_event_loop): Call it.
12158 * remote-utils.c (NOT_SCHEDULED): Define.
12159 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
12160 moved out of readchar.
12161 (readchar): Rewrite. Call reschedule before returning.
12162 (reset_readchar): New function.
12163 (remote_close): Call it.
12164 (process_remaining, reschedule): New functions.
12165 * server.h (callback_handler_func): New typedef.
12166 (append_callback_event, delete_callback_event): Declare.
12167
12168 2010-05-03 Pedro Alves <pedro@codesourcery.com>
12169
12170 * proc-service.c (ps_pglobal_lookup): Use
12171 thread_db_look_up_one_symbol.
12172 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
12173 parameter. Use it instead of all_symbols_looked_up.
12174 * server.h (struct process_info) <all_symbols_looked_up>: Delete
12175 field.
12176 (all_symbols_looked_up): Don't declare.
12177 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
12178 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
12179 field.
12180 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
12181 Set all_symbols_looked_up here.
12182 (thread_db_look_up_one_symbol): New.
12183 (thread_db_get_tls_address): Adjust.
12184 (thread_db_load_search, try_thread_db_load_1): Always allocate the
12185 thread_db object on the heap, and tentatively set it in the
12186 process structure.
12187 (thread_db_init): Don't set all_symbols_looked_up here.
12188 * linux-low.h (thread_db_look_up_one_symbol): Declare.
12189
12190 2010-05-03 Pedro Alves <pedro@codesourcery.com>
12191
12192 * linux-low.c (linux_kill, linux_detach): Adjust.
12193 (status_pending_p_callback): Remove redundant statement. Check
12194 for !TARGET_WAITIKIND_IGNORE, instead of
12195 TARGET_WAITKIND_STOPPED.
12196 (handle_tracepoints): Make sure LWP is locked. Adjust.
12197 (linux_wait_for_event_1): Adjust.
12198 (linux_cancel_breakpoints): New.
12199 (unsuspend_one_lwp): New.
12200 (unsuspend_all_lwps): New.
12201 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
12202 (send_sigstop_callback): Change return type to int, add new
12203 `except' parameter and handle it.
12204 (suspend_and_send_sigstop_callback): New.
12205 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
12206 pass them down. If SUSPEND, also increment the lwp's suspend
12207 count.
12208 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
12209 (need_step_over_p): Don't consider suspended LWPs.
12210 (start_step_over): Adjust.
12211 (proceed_one_lwp): Change return type to int, add new `except'
12212 parameter and handle it.
12213 (unsuspend_and_proceed_one_lwp): New.
12214 (proceed_all_lwps): Use find_inferior instead of
12215 for_each_inferior.
12216 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
12217 also decrement the suspend count of LWPs. Pass `except' down,
12218 instead of hacking its suspend count.
12219 (linux_pause_all): Add `freeze' parameter. Adjust.
12220 (linux_unpause_all): New.
12221 (linux_target_ops): Install linux_unpause_all.
12222 * server.c (handle_status): Adjust.
12223 * target.h (struct target_ops): New fields `unpause_all' and
12224 `cancel_breakpoints'. Add new parameter to `pause_all'.
12225 (pause_all): Add new `freeze' parameter.
12226 (unpause_all): New.
12227 (cancel_breakpoints): New.
12228 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
12229 cancel breakpoints.
12230 (cmd_qtstart): Pause threads.
12231 (stop_tracing): Pause threads, and cancel breakpoints.
12232 * win32-low.c (win32_target_ops): Adjust.
12233
12234 2010-05-03 Pedro Alves <pedro@codesourcery.com>
12235
12236 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
12237 the inferior right away from here...
12238 (linux_wait_1): ... to here, and adjust to check the thread's
12239 last_resume_kind instead of the lwp's step or stop_expected flags.
12240
12241 2010-05-02 Pedro Alves <pedro@codesourcery.com>
12242
12243 * README: Use consistent `GDB' and `GDBserver' spellings.
12244
12245 2010-05-02 Pedro Alves <pedro@codesourcery.com>
12246
12247 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
12248 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
12249 (linux_detach_one_lwp): Assume the lwp is stopped.
12250 (any_thread_of): Delete.
12251 (linux_detach): Stop all lwps here. Don't blindly delete all
12252 breakpoints.
12253 (delete_lwp_callback): New.
12254 (linux_mourn): Delete all lwps of the process that is gone.
12255 (linux_wait_1): Don't delete the last lwp of the process here.
12256 * mem-break.h (mark_breakpoints_out): Declare.
12257 * mem-break.c (mark_breakpoints_out): New.
12258 (free_all_breakpoints): Use it.
12259 * server.c (handle_target_event): If the process is gone, mark
12260 breakpoints out.
12261 * thread-db.c (struct thread_db) <create_bp>: New field.
12262 (thread_db_enable_reporting): Fix prototype. Store a thread event
12263 breakpoint reference in the thread_db struct.
12264 (thread_db_load_search): Clear the thread_db object.
12265 (try_thread_db_load_1): Ditto.
12266 (switch_to_process): New.
12267 (disable_thread_event_reporting): Use it.
12268 (remove_thread_event_breakpoints): New.
12269 (thread_db_detach, thread_db_mourn): Use it.
12270
12271 2010-05-01 Pedro Alves <pedro@codesourcery.com>
12272
12273 * linux-low.c (linux_enable_event_reporting): New.
12274 (linux_wait_for_event_1, handle_extended_wait): Use it.
12275
12276 2010-04-30 Pedro Alves <pedro@codesourcery.com>
12277
12278 * linux-low.c (linux_kill_one_lwp, linux_kill)
12279 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
12280 (send_sigstop): Take an lwp_info as parameter instead. Queue a
12281 SIGSTOP even if the LWP is stopped.
12282 (send_sigstop_callback): New.
12283 (stop_all_lwps): Use send_sigstop_callback instead.
12284 (linux_resume_one_thread): Adjust.
12285 (proceed_one_lwp): Still proceed an LWP that the client has
12286 requested to stop, if we haven't reported it as stopped yet. Make
12287 sure that LWPs the client want stopped, have a pending SIGSTOP.
12288
12289 2010-04-26 Doug Evans <dje@google.com>
12290
12291 * server.c (handle_general_set): Make static.
12292
12293 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
12294 Print received char after testing for error/eof instead of before.
12295 (input_interrupt): Tweak comment.
12296
12297 2010-04-23 Doug Evans <dje@google.com>
12298
12299 * server.c (start_inferior): Print inferior argv if --debug.
12300
12301 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
12302
12303 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
12304 * nto-x86-low.c: Include server.h
12305
12306 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
12307
12308 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
12309 be consistent with other sources of this directory.
12310 (init_registers_amd64): Correct name of source file of this function
12311 in the comment.
12312
12313 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12314
12315 * configure.srv (x86_64-*-mingw*): New configuration for Windows
12316 64-bit executables.
12317
12318 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12319
12320 * win32-i386-low.c: Add 64-bit support.
12321 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
12322 (init_registers_amd64): Declare.
12323 (mappings): Add 64-bit version of array.
12324 (init_windows_x86): New function.
12325 (the_low_target): Change init_arch field to init_windows_x86.
12326
12327 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12328
12329 * win32-low.c: Adapt to support also 64-bit architecture.
12330 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
12331 (get_image_name): Use SIZE_T type for local variable `done'.
12332 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
12333 (toolhelp_get_dll_name): Idem.
12334 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
12335 Use uintptr_t typecast to avoid warning.
12336 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
12337 (handle_exception): Use phex_nz to avoid warning.
12338 (win32_wait): Remove unused local variable `process'.
12339
12340 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12341
12342 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
12343 `amd64-avx.o'.
12344
12345 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
12346
12347 * configure.ac: Use `ws2_32' library for srv_mingw.
12348 * configure: Regenerate.
12349 * gdbreplay.c: Include winsock2.h instead of winsock.h.
12350 * remote-utils.c: Likewise.
12351
12352 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
12353
12354 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
12355 if __x86_64__ is defined.
12356
12357 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
12358
12359 * configure: Regenerate.
12360
12361 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
12362
12363 * server.c (handle_query): Handle 'qGetTIBAddr' query.
12364 * target.h (target_ops): New get_tib_address field.
12365 * win32-low.h (win32_thread_info): Add thread_local_base field.
12366 * win32-low.c (child_add_thread): Add tlb argument.
12367 Set thread_local_base field to TLB.
12368 (get_child_debug_event): Adapt to child_add_thread change.
12369 (win32_get_tib_address): New function.
12370 (win32_target_ops): Set get_tib_address field to
12371 win32_get_tib_address.
12372 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
12373
12374 2010-04-12 Pedro Alves <pedro@codesourcery.com>
12375
12376 * linux-low.c (linux_mourn): Also remove the process.
12377 * server.c (handle_target_event): Don't remove the process here.
12378 * nto-low.c (nto_mourn): New.
12379 (nto_target_ops): Install it.
12380 * spu-low.c (spu_mourn): New.
12381 (spu_target_ops): Install it.
12382 * win32-low.c (win32_mourn): New.
12383 (win32_target_ops): Install it.
12384
12385 2010-04-12 Pedro Alves <pedro@codesourcery.com>
12386
12387 * server.h (buffer_xml_printf): Remove redundant `;'.
12388
12389 2010-04-12 Pedro Alves <pedro@codesourcery.com>
12390
12391 * regcache.c (set_register_cache): Invalidate regcaches before
12392 changing the register cache layout.
12393 (regcache_invalidate_one): Allow a NULL regcache.
12394 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
12395 regcaches before changing the register cache layout or the target
12396 regsets.
12397
12398 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
12399
12400 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
12401 variable warning on Linux/x86-64.
12402
12403 2010-04-11 Pedro Alves <pedro@codesourcery.com>
12404
12405 GDBserver disconnected tracing support.
12406
12407 * linux-low.c (linux_remove_process): Delete.
12408 (add_lwp): Don't set last_resume_kind here.
12409 (linux_kill): Use `mourn'.
12410 (linux_detach): Use `thread_db_detach', and `mourn'.
12411 (linux_mourn): New.
12412 (linux_attach_lwp_1): Adjust comment.
12413 (linux_attach): last_resume_kind moved the thread_info; adjust.
12414 (status_pending_p_callback): Adjust.
12415 (linux_wait_for_event_1): Adjust.
12416 (count_events_callback, select_singlestep_lwp_callback)
12417 (select_event_lwp_callback, cancel_breakpoints_callback)
12418 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
12419 (proceed_one_lwp): Adjust.
12420 (linux_async): Add debug output.
12421 (linux_thread_stopped): New.
12422 (linux_pause_all): New.
12423 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
12424 linux_pause_all.
12425 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
12426 (thread_db_free): Delete declaration.
12427 (thread_db_detach, thread_db_mourn): Declare.
12428 * thread-db.c (thread_db_init): Use thread_db_mourn.
12429 (thread_db_free): Delete, split in two.
12430 (disable_thread_event_reporting): New.
12431 (thread_db_detach): New.
12432 (thread_db_mourn): New.
12433
12434 * server.h (struct thread_info) <last_resume_kind>: New field.
12435 <attached>: Add comment.
12436 <gdb_detached>: New field.
12437 (handler_func): Change return type to int.
12438 (handle_serial_event, handle_target_event): Ditto.
12439 (gdb_connected): Declare.
12440 (tracing): Delete.
12441 (disconnected_tracing): Declare.
12442 (stop_tracing): Declare.
12443
12444 * server.c (handle_query) <qSupported>: Report support for
12445 disconnected tracing.
12446 (queue_stop_reply_callback): Account for running threads.
12447 (gdb_wants_thread_stopped): New.
12448 (gdb_wants_all_threads_stopped): New.
12449 (gdb_reattached_process): New.
12450 (handle_status): Clear the `gdb_detached' flag of all processes.
12451 In all-stop, stop all threads.
12452 (main): Be sure to leave tfind mode. Handle disconnected tracing.
12453 (process_serial_event): If the remote connection breaks, or if an
12454 exit was forced with "monitor exit", force an event loop exit.
12455 Handle disconnected tracing on detach.
12456 (handle_serial_event): Adjust.
12457 (handle_target_event): If GDB isn't connected, forward events back
12458 to the inferior, unless the last process exited, in which case,
12459 exit gdbserver. Adjust interface.
12460
12461 * remote-utils.c (remote_open): Don't block in accept. Instead
12462 register an event loop source on the listen socket file
12463 descriptor. Refactor bits into ...
12464 (listen_desc): ... this new global.
12465 (gdb_connected): ... this new function.
12466 (enable_async_notification): ... this new function.
12467 (handle_accept_event): ... this new function.
12468 (remote_close): Clear remote_desc.
12469
12470 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
12471
12472 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
12473 New fields.
12474 (mourn_inferior): Define.
12475 (target_process_qsupported): Avoid the dangling else problem.
12476 (thread_stopped): Define.
12477 (pause_all): Define.
12478 (target_waitstatus_to_string): Declare.
12479 * target.c (target_waitstatus_to_string): New.
12480
12481 * tracepoint.c (tracing): Make extern.
12482 (disconnected_tracing): New.
12483 (stop_tracing): Make extern. Handle tracing stops due to GDB
12484 disconnecting.
12485 (cmd_qtdisconnected): New.
12486 (cmd_qtstatus): Report disconnected tracing status in trace reply.
12487 (handle_tracepoint_general_set): Handle QTDisconnected.
12488
12489 * event-loop.c (event_handler_func): Change return type to int.
12490 (process_event): Bail out if the event handler wants the event
12491 loop to stop.
12492 (handle_file_event): Ditto.
12493 (start_event_loop): Bail out if the event handler wants the event
12494 loop to stop.
12495
12496 * nto-low.c (nto_target_ops): Adjust.
12497 * spu-low.c (spu_wait): Don't remove the process here.
12498 (spu_target_ops): Adjust.
12499 * win32-low.c (win32_wait): Don't remove the process here.
12500 (win32_target_ops): Adjust.
12501
12502 2010-04-11 Pedro Alves <pedro@codesourcery.com>
12503
12504 * regcache.c (realloc_register_cache): Invalidate inferior's
12505 regcache before recreating it.
12506
12507 2010-04-09 Pedro Alves <pedro@codesourcery.com>
12508
12509 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
12510
12511 2010-04-09 Stan Shebs <stan@codesourcery.com>
12512 Pedro Alves <pedro@codesourcery.com>
12513
12514 * server.h (LONGEST): New.
12515 (struct thread_info) <while_stepping>: New field.
12516 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
12517 Declare.
12518 (initialize_tracepoint, handle_tracepoint_general_set)
12519 (handle_tracepoint_query, tracepoint_finished_step)
12520 (tracepoint_was_hit, release_while_stepping_state_list):
12521 (current_traceframe): Declare.
12522 * server.c (handle_general_set): Handle tracepoint packets.
12523 (read_memory): New.
12524 (write_memory): New.
12525 (handle_search_memory_1): Use read_memory.
12526 (handle_query): Report support for conditional tracepoints, trace
12527 state variables, and tracepoint sources. Handle tracepoint
12528 queries.
12529 (main): Initialize the tracepoints module.
12530 (process_serial_event): Handle traceframe reads/writes.
12531
12532 * linux-low.c (handle_tracepoints): New.
12533 (linux_wait_1): Call it.
12534 (linux_resume_one_lwp): Handle while-stepping.
12535 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
12536 (linux_target_ops): Install them.
12537 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
12538 New field.
12539 * linux-x86-low.c (x86_supports_tracepoints): New.
12540 (the_low_target). Install it.
12541
12542 * mem-break.h (delete_breakpoint): Declare.
12543 * mem-break.c (delete_breakpoint): Make external.
12544
12545 * target.h (struct target_ops): Add `supports_tracepoints',
12546 `read_pc', and `write_pc' fields.
12547 (target_supports_tracepoints): Define.
12548 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
12549 (phex_nz): New.
12550
12551 * regcache.h (struct regcache) <registers_owned>: New field.
12552 (init_register_cache, regcache_cpy): Declare.
12553 (regcache_read_pc, regcache_write_pc): Declare.
12554 (register_cache_size): Declare.
12555 (supply_regblock): Declare.
12556 * regcache.c (init_register_cache): New.
12557 (new_register_cache): Use it.
12558 (regcache_cpy): New.
12559 (register_cache_size): New.
12560 (supply_regblock): New.
12561 (regcache_read_pc, regcache_write_pc): New.
12562
12563 * tracepoint.c: New.
12564
12565 * Makefile.in (OBS): Add tracepoint.o.
12566 (tracepoint.o): New rule.
12567
12568 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
12569
12570 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
12571 (i386-mmx.o): New.
12572 (i386-mmx.c): Likewise.
12573 (i386-mmx-linux.o): Likewise.
12574 (i386-mmx-linux.c): Likewise.
12575
12576 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
12577 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
12578 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
12579 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
12580
12581 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
12582 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
12583 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
12584
12585 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
12586
12587 * Makefile.in (clean): Updated.
12588 (i386-avx.o): New.
12589 (i386-avx.c): Likewise.
12590 (i386-avx-linux.o): Likewise.
12591 (i386-avx-linux.c): Likewise.
12592 (amd64-avx.o): Likewise.
12593 (amd64-avx.c): Likewise.
12594 (amd64-avx-linux.o): Likewise.
12595 (amd64-avx-linux.c): Likewise.
12596
12597 * configure.srv (srv_i386_regobj): Add i386-avx.o.
12598 (srv_i386_linux_regobj): Add i386-avx-linux.o.
12599 (srv_amd64_regobj): Add amd64-avx.o.
12600 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
12601 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
12602 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
12603 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
12604 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
12605 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
12606 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
12607
12608 * i387-fp.c: Include "i386-xstate.h".
12609 (i387_xsave): New.
12610 (i387_cache_to_xsave): Likewise.
12611 (i387_xsave_to_cache): Likewise.
12612 (x86_xcr0): Likewise.
12613
12614 * i387-fp.h (i387_cache_to_xsave): Likewise.
12615 (i387_xsave_to_cache): Likewise.
12616 (x86_xcr0): Likewise.
12617
12618 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
12619 * linux-crisv32-low.c (target_regsets): Likewise.
12620 * linux-m68k-low.c (target_regsets): Likewise.
12621 * linux-mips-low.c (target_regsets): Likewise.
12622 * linux-ppc-low.c (target_regsets): Likewise.
12623 * linux-s390-low.c (target_regsets): Likewise.
12624 * linux-sh-low.c (target_regsets): Likewise.
12625 * linux-sparc-low.c (target_regsets): Likewise.
12626 * linux-xtensa-low.c (target_regsets): Likewise.
12627
12628 * linux-low.c: Include <sys/uio.h>.
12629 (regsets_fetch_inferior_registers): Support nt_type.
12630 (regsets_store_inferior_registers): Likewise.
12631 (linux_process_qsupported): New.
12632 (linux_target_ops): Add linux_process_qsupported.
12633
12634 * linux-low.h (regset_info): Add nt_type.
12635 (linux_target_ops): Add process_qsupported.
12636
12637 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
12638 and <sys/uio.h>.
12639 (init_registers_i386_avx_linux): New.
12640 (init_registers_amd64_avx_linux): Likewise.
12641 (xmltarget_i386_linux_no_xml): Likewise.
12642 (xmltarget_amd64_linux_no_xml): Likewise.
12643 (PTRACE_GETREGSET): Likewise.
12644 (PTRACE_SETREGSET): Likewise.
12645 (x86_fill_xstateregset): Likewise.
12646 (x86_store_xstateregset): Likewise.
12647 (use_xml): Likewise.
12648 (x86_linux_update_xmltarget): Likewise.
12649 (x86_linux_process_qsupported): Likewise.
12650 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
12651 (x86_arch_setup): Don't call init_registers_amd64_linux nor
12652 init_registers_i386_linux here. Call
12653 x86_linux_update_xmltarget.
12654 (the_low_target): Add x86_linux_process_qsupported.
12655
12656 * server.c (handle_query): Call target_process_qsupported.
12657
12658 * target.h (target_ops): Add process_qsupported.
12659 (target_process_qsupported): New.
12660
12661 2010-04-03 Pedro Alves <pedro@codesourcery.com>
12662
12663 * inferiors.c (add_thread): Set last_status kind to
12664 TARGET_WAITKIND_IGNORE.
12665 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
12666 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
12667 (linux_wait_1): Move `thread' local definition to block that uses
12668 it. Don't NULL initialize `event_child'.
12669 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
12670 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
12671 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
12672
12673 2010-04-01 Pedro Alves <pedro@codesourcery.com>
12674
12675 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
12676 an extended waitstatus, or by a watchpoint.
12677 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
12678 thread was stepping or has been stopped by a watchpoint.
12679
12680 2010-04-01 Pedro Alves <pedro@codesourcery.com>
12681
12682 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
12683 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
12684 of another, then delete the previous, and validate all
12685 breakpoints.
12686 (validate_inserted_breakpoint): New.
12687 (delete_disabled_breakpoints): New.
12688 (validate_breakpoints): New.
12689 (check_mem_read): Validate breakpoints before trusting their
12690 shadow. Delete disabled breakpoints.
12691 (check_mem_write): Validate breakpoints before trusting they
12692 should be inserted. Delete disabled breakpoints.
12693 * mem-break.h (validate_breakpoints):
12694 * server.c (handle_query): Validate breakpoints when we see a
12695 qSymbol query.
12696
12697 2010-04-01 Pedro Alves <pedro@codesourcery.com>
12698
12699 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
12700 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
12701 if we could tell there's a GDB breakpoint at stop_pc.
12702 (need_step_over_p): Don't do a step over if we find a GDB
12703 breakpoint at the resume PC.
12704
12705 * mem-break.c (struct raw_breakpoint): New.
12706 (enum bkpt_type): New type `gdb_breakpoint'.
12707 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
12708 fields. New field `raw'.
12709 (find_raw_breakpoint_at): New.
12710 (set_raw_breakpoint_at): Handle refcounting. Create a raw
12711 breakpoint instead.
12712 (set_breakpoint_at): Adjust.
12713 (delete_raw_breakpoint): New.
12714 (release_breakpoint): New.
12715 (delete_breakpoint): Rename to...
12716 (delete_breakpoint_1): ... this. Add proc parameter. Use
12717 release_breakpoint. Return ENOENT.
12718 (delete_breakpoint): Reimplement.
12719 (find_breakpoint_at): Delete.
12720 (find_gdb_breakpoint_at): New.
12721 (delete_breakpoint_at): Delete.
12722 (set_gdb_breakpoint_at): New.
12723 (delete_gdb_breakpoint_at): New.
12724 (gdb_breakpoint_here): New.
12725 (set_reinsert_breakpoint): Use release_breakpoint.
12726 (uninsert_breakpoint): Rename to ...
12727 (uninsert_raw_breakpoint): ... this.
12728 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
12729 (reinsert_raw_breakpoint): Change parameter type to
12730 raw_breakpoint.
12731 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
12732 instead.
12733 (check_breakpoints): Adjust. Use release_breakpoint.
12734 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
12735 (breakpoint_inserted_here): Ditto.
12736 (check_mem_read): Adjust to iterate over raw breakpoints instead.
12737 Don't trust the breakpoint's shadow if it is not inserted.
12738 (check_mem_write): Adjust to iterate over raw breakpoints instead.
12739 (delete_all_breakpoints): Adjust.
12740 (free_all_breakpoints): Mark all breakpoints as uninserted, and
12741 use delete_breakpoint_1.
12742
12743 * mem-break.h (breakpoints_supported): Delete declaration.
12744 (set_gdb_breakpoint_at): Declare.
12745 (gdb_breakpoint_here): Declare.
12746 (delete_breakpoint_at): Delete.
12747 (delete_gdb_breakpoint_at): Declare.
12748
12749 * server.h (struct raw_breakpoint): Forward declare.
12750 (struct process_info): New field `raw_breakpoints'.
12751
12752 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
12753 breakpoints.
12754
12755 2010-03-24 Pedro Alves <pedro@codesourcery.com>
12756
12757 * linux-low.c (status_pending_p_callback): Fix comment.
12758 (linux_wait_for_event_1): Move most of the internal breakpoint
12759 handling from here...
12760 (linux_wait_1): ... to here.
12761 (count_events_callback): New.
12762 (select_singlestep_lwp_callback): New.
12763 (select_event_lwp_callback): New.
12764 (cancel_breakpoints_callback): New.
12765 (select_event_lwp): New.
12766 (linux_wait_1): Simplify internal breakpoint handling. Give equal
12767 priority to all LWPs that have had events that should be reported
12768 to the client. Cancel breakpoints when about to reporting the
12769 event to the client, not while stopping lwps. No longer cancel
12770 finished single-steps here.
12771 (cancel_finished_single_step): Delete.
12772 (cancel_finished_single_steps): Delete.
12773
12774 2010-03-24 Pedro Alves <pedro@codesourcery.com>
12775
12776 * mem-break.c (enum bkpt_type): New.
12777 (struct breakpoint): New field `type'.
12778 (set_breakpoint_at): Change return type to struct breakpoint
12779 pointer. Set type to `other_breakpoint' by default.
12780 (delete_breakpoint): Rewrite, supporting more than one breakpoint
12781 in the breakpoint list.
12782 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
12783 (reinsert_breakpoint): Rename to ...
12784 (reinsert_raw_breakpoint): ... this.
12785 (reinsert_breakpoints_at): Adjust.
12786 * mem-break.h (struct breakpoint): Declare.
12787 (set_breakpoint_at): Change return type to struct breakpoint
12788 pointer.
12789
12790 2010-03-24 Pedro Alves <pedro@codesourcery.com>
12791
12792 * server.c (handle_query): Assign, not compare.
12793
12794 2010-03-24 Pedro Alves <pedro@codesourcery.com>
12795
12796 Teach linux gdbserver to step-over-breakpoints.
12797
12798 * linux-low.c (can_hardware_single_step): New.
12799 (supports_breakpoints): New.
12800 (handle_extended_wait): If stopping threads, read the stop pc of
12801 the new cloned LWP.
12802 (get_pc): New.
12803 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
12804 low target doesn't support retrieving the PC.
12805 (add_lwp): Set last_resume_kind to resume_continue.
12806 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
12807 (linux_attach): Don't clear stop_expected. Set the lwp's
12808 last_resume_kind to resume_stop.
12809 (linux_detach_one_lwp): Don't check for removed breakpoints.
12810 (check_removed_breakpoint): Delete.
12811 (status_pending_p): Rename to ...
12812 (status_pending_p_callback): ... this. Don't check for removed
12813 breakpoints. Don't consider threads that are stopped from GDB's
12814 perspective.
12815 (linux_wait_for_lwp): Always read the stop_pc here.
12816 (cancel_breakpoint): New.
12817 (step_over_bkpt): New global.
12818 (linux_wait_for_event_1): Implement stepping over breakpoints.
12819 (gdb_wants_lwp_stopped): New.
12820 (gdb_wants_all_stopped): New.
12821 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
12822 single-step traps here. Store the thread's last reported target
12823 wait status.
12824 (send_sigstop): Don't clear stop_expected. Always set it,
12825 instead.
12826 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
12827 (cancel_finished_single_step): New.
12828 (cancel_finished_single_steps): New.
12829 (wait_for_sigstop): Don't cancel finished single-step traps here.
12830 (linux_resume_one_lwp): Don't check for removed breakpoints.
12831 Don't set `step' on non-hardware step archs.
12832 (linux_set_resume_request): Ignore resume_stop requests if already
12833 stopping or stopped. Set the lwp's last_resume_kind.
12834 (resume_status_pending_p): Don't check for removed breakpoints.
12835 (need_step_over_p): New.
12836 (start_step_over): New.
12837 (finish_step_over): New.
12838 (linux_resume_one_thread): Always queue a sigstop for resume_stop
12839 requests. Clear the thread's last reported target waitstatus.
12840 Don't use the `suspended' flag. Don't consider pending breakpoints.
12841 (linux_resume): Start a step-over if necessary.
12842 (proceed_one_lwp): New.
12843 (proceed_all_lwps): New.
12844 (unstop_all_lwps): New.
12845 * linux-low.h (struct lwp_info): Rewrite comment for the
12846 `suspended' flag. Add the `stop_pc' field. Delete the
12847 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
12848 Add `'last_resume_kind' and `need_step_over' fields.
12849 * inferiors.c (struct thread_info): Delete, moved elsewhere.
12850 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
12851 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
12852 (set_raw_breakpoint_at): New.
12853 (set_breakpoint_at): Rewrite to use it.
12854 (reinsert_breakpoint_handler): Delete.
12855 (set_reinsert_breakpoint): New.
12856 (reinsert_breakpoint_by_bp): Delete.
12857 (delete_reinsert_breakpoints): New.
12858 (uninsert_breakpoint): Rewrite.
12859 (uninsert_breakpoints_at): New.
12860 (reinsert_breakpoint): Rewrite.
12861 (reinsert_breakpoints_at): New.
12862 (check_breakpoints): Rewrite.
12863 (breakpoint_here): New.
12864 (breakpoint_inserted_here): New.
12865 (check_mem_read): Adjust.
12866 * mem-break.h (breakpoints_supported, breakpoint_here)
12867 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
12868 (reinsert_breakpoint_by_bp): Delete declaration.
12869 (delete_reinsert_breakpoints): Declare.
12870 (reinsert_breakpoint): Delete declaration.
12871 (reinsert_breakpoints_at): Declare.
12872 (uninsert_breakpoint): Delete declaration.
12873 (uninsert_breakpoints_at): Declare.
12874 (check_breakpoints): Adjust prototype.
12875 * server.h: Adjust include order.
12876 (struct thread_info): Declare here. Add a `last_status' field.
12877
12878 2010-03-23 Michael Snyder <msnyder@vmware.com>
12879
12880 * server.c (crc32): New function.
12881 (handle_query): Add handling for 'qCRC:' request.
12882
12883 2010-03-23 Pedro Alves <pedro@codesourcery.com>
12884
12885 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
12886 lwp had been stopped by a watchpoint.
12887
12888 2010-03-16 Pedro Alves <pedro@codesourcery.com>
12889
12890 * server.h (internal_error): Declare.
12891 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
12892 * utils.c (internal_error): New function.
12893
12894 2010-03-15 Andreas Schwab <schwab@redhat.com>
12895
12896 * configure.srv: Fix typo setting srv_regobj.
12897
12898 2010-03-15 Pedro Alves <pedro@codesourcery.com>
12899
12900 * linux-low.c (fetch_register): Avoid passing a non string literal
12901 format to `error'.
12902 (usr_store_inferior_registers): Ditto.
12903
12904 2010-03-14 Pedro Alves <pedro@codesourcery.com>
12905
12906 * linux-low.c (linux_write_memory): Bail out early if peeking
12907 memory failed.
12908
12909 2010-03-14 Pedro Alves <pedro@codesourcery.com>
12910
12911 * linux-low.h (struct lwp_info): New fields
12912 `stopped_by_watchpoint' and `stopped_data_address'.
12913 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
12914 here, and cache them in the lwp object.
12915 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
12916 directly.
12917 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
12918 field.
12919 (linux_stopped_by_watchpoint): Rewrite.
12920 (linux_stopped_data_address): Rewrite.
12921
12922 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
12923
12924 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
12925 switching the current inferior, not before.
12926
12927 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
12928
12929 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
12930 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
12931 i386-linux.c and amd64-linux.c.
12932 (reg-i386.o): Removed.
12933 (reg-i386.c): Likewise.
12934 (reg-i386-linux.o): Likewise.
12935 (reg-i386-linux.c): Likewise.
12936 (reg-x86-64.o): Likewise.
12937 (reg-x86-64.c): Likewise.
12938 (reg-x86-64-linux.o): Likewise.
12939 (reg-x86-64-linux.c): Likewise.
12940 (i386.o): New.
12941 (i386.c): Likewise.
12942 (i386-linux.o): Likewise.
12943 (i386-linux.c): Likewise.
12944 (amd64.o): Likewise.
12945 (amd64.c): Likewise.
12946 (amd64-linux.o): Likewise.
12947 (amd64-linux.c): Likewise.
12948
12949 * configure.srv (srv_i386_regobj): New.
12950 (srv_i386_linux_regobj): Likewise.
12951 (srv_amd64_regobj): Likewise.
12952 (srv_amd64_linux_regobj): Likewise.
12953 (srv_i386_32bit_xmlfiles): Likewise.
12954 (srv_i386_64bit_xmlfiles): Likewise.
12955 (srv_i386_xmlfiles): Likewise.
12956 (srv_amd64_xmlfiles): Likewise.
12957 (srv_i386_linux_xmlfiles): Likewise.
12958 (srv_amd64_linux_xmlfiles): Likewise.
12959 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
12960 srv_xmlfiles to $srv_i386_xmlfiles.
12961 (i[34567]86-*-mingw32ce*): Likewise.
12962 (i[34567]86-*-mingw*): Likewise.
12963 (i[34567]86-*-nto*): Likewise.
12964 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
12965 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
12966 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
12967 (x86_64-*-linux*): Likewise.
12968
12969 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
12970 (init_registers_amd64_linux): New.
12971 (x86_arch_setup): Replace init_registers_x86_64_linux with
12972 init_registers_amd64_linux.
12973
12974 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
12975
12976 * configure.ac: Check for libdl. If it is not available link against
12977 static libthread_db.
12978 * configure: Regenerate.
12979
12980 2010-02-22 Pedro Alves <pedro@codesourcery.com>
12981
12982 PR9605
12983
12984 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
12985 handing a read watchpoint.
12986 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
12987
12988 2010-02-12 Doug Evans <dje@google.com>
12989
12990 * linux-low.c (linux_supports_tracefork_flag): Document.
12991 (linux_look_up_symbols): Add comment.
12992
12993 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
12994
12995 * regcache.c (supply_register): Clear regcache if buf is NULL.
12996
12997 2010-02-02 Nicolas Roche <roche@sourceware.org>
12998 Joel Brobecker <brobecker@adacore.com>
12999
13000 * inferiors.c (find_inferior): Add function documentation.
13001 (unloaded_dll): Handle the case where the unloaded dll has not
13002 been previously registered in the dll list.
13003
13004 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
13005
13006 * linux-arm-low.c (thumb_breakpoint_len): Delete.
13007 (thumb2_breakpoint): New.
13008 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
13009
13010 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
13011
13012 * linux-low.c (get_stop_pc): Check for SIGTRAP.
13013 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
13014 breakpoints.
13015
13016 2010-01-21 Pedro Alves <pedro@codesourcery.com>
13017
13018 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
13019
13020 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
13021
13022 * linux-s390-low.c (s390_collect_ptrace_register)
13023 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
13024
13025 2010-01-21 Doug Evans <dje@google.com>
13026
13027 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
13028 (PTRACE_ARG4_TYPE): New macro.
13029 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
13030 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
13031 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
13032 (usr_store_inferior_registers): Ditto.
13033 (linux_read_memory, linux_write_memory): Ditto.
13034 (linux_test_for_tracefork): Ditto.
13035
13036 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
13037 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
13038
13039 2010-01-21 Pedro Alves <pedro@codesourcery.com>
13040
13041 * proc-service.c (ps_lgetregs): Don't refetch registers from the
13042 target.
13043
13044 2010-01-21 Pedro Alves <pedro@codesourcery.com>
13045
13046 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
13047 prototype to take a regcache. Adjust.
13048
13049 2010-01-20 Pedro Alves <pedro@codesourcery.com>
13050
13051 * regcache.h (struct thread_info): Forward declare.
13052 (struct regcache): New.
13053 (new_register_cache): Adjust prototype.
13054 (get_thread_regcache): Declare.
13055 (free_register_cache): Adjust prototype.
13056 (registers_to_string, registers_from_string): Ditto.
13057 (supply_register, supply_register_by_name, collect_register)
13058 (collect_register_as_string, collect_register_by_name): Ditto.
13059 * regcache.c (struct inferior_regcache_data): Delete.
13060 (get_regcache): Rename to ...
13061 (get_thread_regcache): ... this. Adjust. Switch inferior before
13062 fetching registers.
13063 (regcache_invalidate_one): Adjust.
13064 (regcache_invalidate): Fix prototype.
13065 (new_register_cache): Return the new register cache.
13066 (free_register_cache): Change prototype.
13067 (realloc_register_cache): Adjust.
13068 (registers_to_string): Change prototype to take a regcache. Adjust.
13069 (registers_from_string): Ditto.
13070 (register_data): Ditto.
13071 (supply_register): Ditto.
13072 (supply_register_by_name): Ditto.
13073 (collect_register): Ditto.
13074 (collect_register_as_string): Ditto.
13075 (collect_register_by_name): Ditto.
13076 * server.c (process_serial_event): Adjust.
13077 * linux-low.h (regset_fill_func, regset_store_func): Change
13078 prototype.
13079 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
13080 Change prototype.
13081 * linux-low.c (get_stop_pc): Adjust.
13082 (check_removed_breakpoint): Adjust.
13083 (linux_wait_for_event): Adjust.
13084 (linux_resume_one_lwp): Adjust.
13085 (fetch_register): Add regcache parameter. Adjust.
13086 (usr_store_inferior_registers): Ditto.
13087 (regsets_fetch_inferior_registers): Ditto.
13088 (regsets_store_inferior_registers): Ditto.
13089 (linux_fetch_registers, linux_store_registers): Ditto.
13090 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
13091 regcache. Adjust.
13092 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
13093 Ditto.
13094 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
13095 prototype to take a regcache.
13096 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
13097 * remote-utils.c (convert_ascii_to_int, outreg)
13098 (prepare_resume_reply): Change prototype to take a regcache.
13099 Adjust.
13100 * target.h (struct target_ops) <fetch_registers, store_registers>:
13101 Change prototype to take a regcache.
13102 (fetch_inferior_registers, store_inferior_registers): Change
13103 prototype to take a regcache. Adjust.
13104 * proc-service.c (ps_lgetregs): Adjust.
13105 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
13106 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
13107 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
13108 take a regcache. Adjust.
13109 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
13110 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
13111 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
13112 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
13113 * linux-cris-low.c (cris_get_pc, cris_set_pc)
13114 (cris_cannot_fetch_register):
13115 (cris_breakpoint_at): Change prototype to take a regcache.
13116 Adjust.
13117 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
13118 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
13119 to take a regcache. Adjust.
13120 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
13121 Adjust.
13122 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
13123 take a regcache. Adjust.
13124 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
13125 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
13126 (m68k_set_pc): Change prototype to take a regcache. Adjust.
13127 * linux-mips-low.c (mips_get_pc):
13128 (mips_set_pc): Change prototype to take a regcache. Adjust.
13129 (mips_reinsert_addr): Adjust.
13130 (mips_collect_register): Change prototype to take a regcache.
13131 Adjust.
13132 (mips_supply_register):
13133 (mips_collect_register_32bit, mips_supply_register_32bit)
13134 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
13135 (mips_store_fpregset): Ditto.
13136 * linux-ppc-low.c (ppc_supply_ptrace_register)
13137 (ppc_supply_ptrace_register): Ditto.
13138 (parse_spufs_run): Adjust.
13139 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
13140 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
13141 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
13142 take a regcache. Adjust.
13143 * linux-s390-low.c (s390_collect_ptrace_register)
13144 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
13145 (s390_set_pc): Change prototype to take a regcache. Adjust.
13146 (s390_arch_setup): Adjust.
13147 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
13148 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
13149 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
13150 (sparc_fill_gregset, sparc_store_gregset_from_stack)
13151 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
13152 regcache. Adjust.
13153 (sparc_breakpoint_at): Adjust.
13154 * linux-xtensa-low.c (xtensa_fill_gregset):
13155 (xtensa_store_gregset):
13156 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
13157 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
13158 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
13159 prototype to take a regcache. Adjust.
13160 * win32-arm-low.c (arm_fetch_inferior_register)
13161 (arm_store_inferior_register): Change prototype to take a
13162 regcache. Adjust.
13163 * win32-i386-low.c (i386_fetch_inferior_register)
13164 (i386_store_inferior_register): Change prototype to take a
13165 regcache. Adjust.
13166 * win32-low.c (child_fetch_inferior_registers)
13167 (child_store_inferior_registers): Change prototype to take a
13168 regcache. Adjust.
13169 (win32_wait): Adjust.
13170 (win32_fetch_inferior_registers): Change prototype to take a
13171 regcache. Adjust.
13172 (win32_store_inferior_registers): Adjust.
13173 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
13174 store_inferior_register>: Change prototype to take a regcache.
13175
13176 2010-01-20 Doug Evans <dje@google.com>
13177
13178 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
13179 #ifdef.
13180 (linux_wait_for_event1, linux_init_signals): Ditto.
13181 (W_STOPCODE): Provide definition if missing.
13182
13183 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
13184
13185 * linux-low.c (linux_core_of_thread): New.
13186 (compare_ints, show_process, list_threads): New.
13187 (linux_qxfer_osdata): Report threads and cores.
13188 (linux_target_op): Register linux_core_of_thread.
13189 * remote-utils.c (prepare_resume_reply): Report the core.
13190 (buffer_xml_printf): Support %d specifier.
13191 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
13192 New.
13193 (handle_query): Handle qXfer:threads. Announce availability
13194 thereof.
13195 * target.h (struct target_ops): New field core_of_thread.
13196
13197 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
13198
13199 * Makefile.in (clean): Remove new generated files.
13200 (reg-s390.o, reg-s390.c): Remove rules.
13201 (reg-s390x.o, reg-s390x.c): Likewise.
13202 (s390-linux32.o, s390-linux32.c): Add rules.
13203 (s390-linux64.o, s390-linux64.c): Likewise.
13204 (s390x-linux64.o, s390x-linux64.c): Likewise.
13205 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
13206 * linux-s390-low.c: Include <elf.h>.
13207 (HWCAP_S390_HIGH_GPRS): Define if undefined.
13208 (init_registers_s390): Remove prototype.
13209 (init_registers_s390x): Likewise.
13210 (init_registers_s390_linux32): Add prototype.
13211 (init_registers_s390_linux64): Likewise.
13212 (init_registers_s390x_linux64): Likewise.
13213 (s390_num_regs_3264): New define.
13214 (s390_regmap_3264): New global variable.
13215 (s390_cannot_fetch_register): Remove obsolete check.
13216 (s390_cannot_store_register): Likewise.
13217 (s390_collect_ptrace_register): Handle upper/lower register halves.
13218 (s390_supply_ptrace_register): Likewise.
13219 (s390_fill_gregset): Update to register number changes.
13220 (s390_get_hwcap): New routine.
13221 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
13222 Install appropriate regmap and register set.
13223
13224 2010-01-01 Joel Brobecker <brobecker@adacore.com>
13225
13226 * server.c (gdbserver_version): Update copyright year to 2010.
13227 * gdbreplay.c (gdbreplay_version): Likewise.
13228
13229 2009-12-28 Doug Evans <dje@google.com>
13230
13231 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
13232 elf/external.h. Include <elf.h> instead but only if necessary.
13233
13234 2009-12-28 Pedro Alves <pedro@codesourcery.com>
13235
13236 * linux-low.c (linux_remove_process): Remove `detaching'
13237 parameter. Don't release/detach from thread_db here.
13238 (linux_kill): Release/detach from thread_db here, ...
13239 (linux_detach): ... and here, before actually detaching.
13240 (linux_wait_1): ... and here, when a process exits.
13241 * thread-db.c (any_thread_of): New.
13242 (thread_db_free): Switch the current inferior to a thread of the
13243 passed in process.
13244
13245 2009-12-21 Doug Evans <dje@google.com>
13246
13247 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
13248
13249 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
13250 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
13251 warning ifndef __NR_tkill. Move setting of errno there too.
13252 Delete unnecessary resetting of errno after syscall.
13253 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
13254
13255 * configure.ac: Check for dladdr.
13256 * config.in: Regenerate.
13257 * configure: Regenerate.
13258 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
13259 (try_thread_db_load): Update.
13260
13261 * linux-low.c (my_waitpid): Delete unnecessary prototype.
13262
13263 2009-12-18 Doug Evans <dje@google.com>
13264
13265 * event-loop.c: Include unistd.h if it exists.
13266
13267 * linux-low.c (my_waitpid): Move definition away from being in
13268 between linux_tracefork_child/linux_test_for_tracefork.
13269
13270 * gdb_proc_service.h (psaddr_t): Fix type.
13271 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
13272 signature to match glibc.
13273
13274 2009-12-16 Doug Evans <dje@google.com>
13275
13276 * linux-low.c (linux_read_memory): Fix argument to read.
13277
13278 2009-11-26 Pedro Alves <pedro@codesourcery.com>
13279
13280 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
13281 events, don't leave current_inferior pointing at null.
13282
13283 2009-11-26 Pedro Alves <pedro@codesourcery.com>
13284
13285 * win32-low.c (LOG): Delete.
13286 (OUTMSG): Output to stderr.
13287 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
13288 on compile time LOG macro.
13289 (win32_wait): Fix debug output.
13290
13291 2009-11-26 Pedro Alves <pedro@codesourcery.com>
13292
13293 * win32-low.c (win32_add_one_solib): If the dll name is
13294 "ntdll.dll", prepend the system directory to the dll path.
13295
13296 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
13297
13298 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
13299
13300 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
13301 Vladimir Prus <vladimir@codesourcery.com>
13302
13303 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
13304 * configure.ac: Check for __mcoldfire__ and set
13305 gdb_cv_m68k_is_coldfire.
13306 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
13307 reg-cf.o and reg-m68k.o.
13308 * configure: Regenerated.
13309
13310 2009-11-16 Pedro Alves <pedro@codesourcery.com>
13311
13312 * linux-low.c (linux_remove_process): Add `detaching' parameter.
13313 Pass it to thread_db_free.
13314 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
13315 proper `detaching' argument to linux_remove_process.
13316 * linux-low.h (thread_db_free): Add `detaching' parameter.
13317 * thread-db.c (thread_db_init): Pass false as `detaching' argument
13318 to thread_db_free.
13319 (thread_db_free): Add `detaching' parameter. Only
13320 call td_ta_clear_event if detaching from process.
13321
13322 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
13323
13324 * thread-db.c (thread_db_free): Fix typo.
13325
13326 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
13327
13328 PR gdb/10838
13329 * thread-db.c (thread_db_free): Call td_ta_clear_event.
13330
13331 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
13332
13333 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
13334 with an i686 compiler.
13335 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
13336 needed.
13337 * configure: Rebuilt.
13338
13339 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
13340
13341 PR gdb/10783
13342
13343 * server.c (handle_search_memory_1): Correct read_addr initialization
13344 in loop for searching subsequent chunks.
13345
13346 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
13347
13348 * configure.ac: New --with-libthread-db option.
13349 * thread-db.c: Allow direct dependence on libthread_db.
13350 (thread_db_free): Adjust.
13351 * config.in: Regenerate.
13352 * configure: Likewise.
13353
13354 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
13355
13356 PR gdb/10757
13357 * thread-db.c (attach_thread): New function.
13358 (maybe_attach_thread): Return success/failure.
13359 (find_new_threads_callback): Adjust.
13360 (thread_db_find_new_threads): Loop until no new threads.
13361
13362 2009-10-13 Pedro Alves <pedro@codesourcery.com>
13363
13364 * proc-service.c (ps_lgetregs): Formatting.
13365
13366 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
13367
13368 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
13369 * configure.ac: Adjust.
13370 * linux-low.h (struct process_info_private): Move members to struct
13371 thread_db.
13372 (thread_db_free, thread_db_handle_monitor_command): New prototype.
13373 * linux-low.c (linux_remove_process): Adjust.
13374 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
13375 * server.c (handle_query): Move code ...
13376 (handle_monitor_command): ... here. New function.
13377 * target.h (struct target_ops): New member.
13378 * thread-db.c (struct thread_db): New.
13379 (libthread_db_search_path): New variable.
13380 (thread_db_create_event, thread_db_enable_reporting)
13381 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
13382 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
13383 (try_thread_db_load_1, dladdr_to_soname): New functions.
13384 (try_thread_db_load, thread_db_load_search): New functions.
13385 (thread_db_init): Search for libthread_db.
13386 (thread_db_free): New function.
13387 (thread_db_handle_monitor_command): Likewise.
13388 * config.in: Regenerate.
13389 * configure: Regenerate.
13390
13391 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
13392
13393 * spu-low.c (spu_kill): Wait for inferior to terminate.
13394 Call clear_inferiors.
13395 (spu_detach): Call clear_inferiors.
13396
13397 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
13398
13399 * aclocal.m4: Regenerate.
13400 * config.in: Likewise.
13401 * configure: Likewise.
13402
13403 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
13404
13405 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
13406 (parse_spufs_run): New function.
13407 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
13408 (ppc_breakpoint_at): Handle SPU breakpoints.
13409
13410 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
13411
13412 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
13413 (SPUFS_MAGIC): Define.
13414 (spu_enumerate_spu_ids): New function.
13415 (linux_qxfer_spu): New function.
13416 (linux_target_ops): Install linux_qxfer_spu.
13417
13418 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
13419
13420 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
13421 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
13422 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
13423 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
13424 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
13425 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
13426 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
13427 (init_registers_powerpc_cell32l): Add prototype.
13428 (init_registers_powerpc_cell64l): Likewise.
13429 (ppc_arch_setup): Detect Cell/B.E. architecture.
13430
13431 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
13432
13433 * Makefile.in (datarootdir): New variable.
13434
13435 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
13436
13437 * linux-low.c (linux_write_memory): Update debugging output.
13438 * Makefile.in (clean): Add new descriptions.
13439 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
13440 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
13441 * configure.srv: Add new files for arm*-*-linux*.
13442 * linux-arm-low.c: Add new declarations.
13443 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
13444 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
13445 (HWCAP_VFPv3D16): New.
13446 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
13447 instead of __IWMMXT__.
13448 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
13449 (arm_arch_setup): New.
13450 (target_regsets): Remove #ifdef. Add VFP regset.
13451 (the_low_target): Use arm_arch_setup.
13452
13453 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
13454
13455 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
13456 the main thread again.
13457
13458 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
13459
13460 Adding Neutrino gdbserver.
13461 * configure: Regenerated.
13462 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
13463 * configure.srv (i[34567]86-*-nto*): New target.
13464 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
13465 * remote-utils.c [__QNX__]: Include sys/iomgr.h
13466 (nto_comctrl) [__QNX__]: New function.
13467 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
13468
13469 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
13470
13471 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
13472 srv_tgtobj.
13473
13474 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
13475 Pedro Alves <pedro@codesourcery.com>
13476
13477 * win32-i386-low.c (i386_get_thread_context): Handle systems that
13478 don't support CONTEXT_EXTENDED_REGISTERS.
13479 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
13480 (the_low_target): Install them.
13481 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
13482 failing with ERROR_PIPE_NOT_CONNECTED.
13483
13484 2009-06-30 Doug Evans <dje@google.com>
13485 Pierre Muller <muller@ics.u-strasbg.fr>
13486
13487 Add h/w watchpoint support to x86-linux, win32-i386.
13488 * Makefile.in (SFILES): Add i386-low.c
13489 (i386_low_h): Define.
13490 (i386-low.o): Add dependencies.
13491 (linux-x86-low.o): Add i386-low.h dependency.
13492 (win32-i386-low.o): Ditto.
13493 * i386-low.c: New file.
13494 * i386-low.h: New file.
13495 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
13496 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
13497 * linux-low.c (linux_add_process): Initialize arch_private.
13498 (linux_remove_process): Free arch_private.
13499 (add_lwp): Initialize arch_private.
13500 (delete_lwp): Free arch_private.
13501 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
13502 provided.
13503 * linux-low.h (process_info_private): New member arch_private.
13504 (lwp_info): New member arch_private.
13505 (linux_target_ops): New members new_process, new_thread,
13506 prepare_to_resume.
13507 (ptid_of): New macro.
13508 * linux-x86-low.c: Include stddef.h, i386-low.h.
13509 (arch_process_info): New struct.
13510 (arch_lwp_info): New struct.
13511 (x86_linux_dr_get, x86_linux_dr_set): New functions.
13512 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
13513 (i386_dr_low_get_status): New function.
13514 (x86_insert_point, x86_remove_point): New functions.
13515 (x86_stopped_by_watchpoint): New function.
13516 (x86_stopped_data_address): New function.
13517 (x86_linux_new_process, x86_linux_new_thread): New functions.
13518 (x86_linux_prepare_to_resume): New function.
13519 (the_low_target): Add entries for insert_point, remove_point,
13520 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
13521 prepare_to_resume.
13522 * server.c (debug_hw_points): New global.
13523 (monitor_show_help): Document set debug-hw-points.
13524 (handle_query): Process "set debug-hw-points".
13525 * server.h (debug_hw_points): Declare.
13526 (paddress): Declare.
13527 * utils.c (NUMCELLS, CELLSIZE): New macros.
13528 (get_sell, xsnprintf, paddress): New functions.
13529 * win32-arm-low.c (the_low_target): Add entries for insert_point,
13530 remove_point, stopped_by_watchpoint, stopped_data_address.
13531 * win32-i386-low.c: Include i386-low.h.
13532 (debug_reg_state): Replaces dr.
13533 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
13534 (i386_dr_low_get_status): New function.
13535 (i386_insert_point, i386_remove_point): New functions.
13536 (i386_stopped_by_watchpoint): New function.
13537 (i386_stopped_data_address): New function.
13538 (i386_initial_stuff): Update.
13539 (get_thread_context,set_thread_context,i386_thread_added): Update.
13540 (the_low_target): Add entries for insert_point,
13541 remove_point, stopped_by_watchpoint, stopped_data_address.
13542 * win32-low.c (win32_insert_watchpoint): New function.
13543 (win32_remove_watchpoint): New function.
13544 (win32_stopped_by_watchpoint): New function.
13545 (win32_stopped_data_address): New function.
13546 (win32_target_ops): Add entries for insert_watchpoint,
13547 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
13548 * win32-low.h (win32_target_ops): New members insert_point,
13549 remove_point, stopped_by_watchpoint, stopped_data_address.
13550
13551 2009-06-25 Pedro Alves <pedro@codesourcery.com>
13552
13553 * server.c (process_serial_event): Re-return unsupported, not
13554 error, if the type isn't recognized. Re-allow supporting only
13555 insert or remove packets. Also call require_running for
13556 breakpoints. Add missing break statement to default case. Tidy.
13557 * target.h (struct target_ops): Rename insert_watchpoint to
13558 insert_point, and remove_watchpoint to remove_point.
13559
13560 * linux-low.h (struct linux_target_ops): Likewise.
13561 * linux-low.c (linux_insert_watchpoint): Rename to ...
13562 (linux_insert_point): ... this. Adjust.
13563 (linux_remove_watchpoint): Rename to ...
13564 (linux_remove_point): ... this. Adjust.
13565 (linux_target_ops): Adjust.
13566 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
13567 (cris_insert_point): ... this.
13568 (cris_remove_watchpoint): Rename to ...
13569 (cris_remove_point): ... this.
13570 (the_low_target): Adjust.
13571
13572 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
13573
13574 * server.c (handle_v_kill): Pass signal_pid to
13575 kill_inferior if multi_process is zero.
13576
13577 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
13578
13579 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
13580 * target.h (target_ops): Comment for *_watchpoint to make it clear
13581 the functions can get types '0' and '1'.
13582
13583 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
13584
13585 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
13586 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
13587 * regcache.c (get_regcache): Likewise.
13588 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
13589 * win32-low.c (child_fetch_inferior_registers): Remove check for
13590 regno 0.
13591
13592 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
13593 Pedro Alves <pedro@codesourcery.com>
13594
13595 * target.h (struct target_ops) <supports_multi_process>: New
13596 callback.
13597 (target_supports_multi_process): New.
13598 * server.c (handle_query): Even if GDB reports support, only
13599 enable multi-process if the target also supports it. Report
13600 multi-process support only if the target backend supports it.
13601 * linux-low.c (linux_supports_multi_process): New function.
13602 (linux_target_ops): Install it as target_supports_multi_process
13603 callback.
13604
13605 2009-05-24 Doug Evans <dje@google.com>
13606
13607 Global renaming of find_thread_pid to find_thread_ptid.
13608 * server.h (find_thread_ptid): Renamed from find_thread_pid.
13609 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
13610 All callers updated.
13611
13612 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
13613 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
13614 directly.
13615
13616 * linux-low.c (get_stop_pc): Print pc if debug_threads.
13617 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
13618 (linux_resume_one_lwp): Ditto.
13619
13620 2009-05-23 Doug Evans <dje@google.com>
13621
13622 * linux-low.c (linux_resume_one_lwp): Change type of first arg
13623 from struct inferior_list_entry * to struct lwp_info *.
13624 All callers updated.
13625
13626 2009-05-13 Doug Evans <dje@google.com>
13627
13628 * linux-x86-low.c: Don't include assert.h.
13629 (x86_siginfo_fixup): Use fatal, not assert.
13630 (x86_arch_setup): Fix comment.
13631
13632 2009-05-12 Doug Evans <dje@google.com>
13633
13634 Biarch support for i386/amd64 gdbserver.
13635 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
13636 Add linux-x86-low.c.
13637 (linux-i386-low.o, linux-x86-64-low.o): Delete.
13638 (linux-x86-low.o): Add.
13639 * linux-x86-64-low.c: Delete.
13640 * linux-i386-low.c: Delete.
13641 * linux-x86-low.c: New file.
13642 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
13643 linux-x86-low.o.
13644 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
13645 linux-x86-low.o.
13646 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
13647 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
13648 (linux_child_pid_to_exec_file): New function.
13649 (elf_64_header_p, elf_64_file_p): New functions.
13650 (siginfo_fixup): New function.
13651 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
13652 give target a chance to convert layout.
13653 * linux-low.h (linux_target_ops): New member siginfo_fixup.
13654 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
13655
13656 2009-05-07 Doug Evans <dje@google.com>
13657
13658 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
13659 (regsets_store_inferior_registers): Ditto.
13660
13661 2009-05-06 Pedro Alves <pedro@codesourcery.com>
13662
13663 PR server/10048
13664
13665 * linux-low.c (must_set_ptrace_flags): Delete.
13666 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
13667 of the global.
13668 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
13669 `lwp->must_set_ptrace_flags' instead.
13670 (linux_wait_for_event_1): Set ptrace options here.
13671 (linux_wait_1): ... not here.
13672
13673 2009-04-30 Doug Evans <dje@google.com>
13674
13675 * inferiors.c (started_inferior_callback): New function.
13676 (attached_inferior_callback): New function.
13677 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
13678 * server.c (print_started_pid, print_attached_pid): New functions.
13679 (detach_or_kill_for_exit): New function.
13680 (main): Call it instead of for_each_inferior (kill_inferior_callback).
13681 * server.h (have_started_inferiors_p): Declare.
13682 (have_attached_inferiors_p): Declare.
13683
13684 * inferiors.c (remove_process): Fix memory leak, free process.
13685 * linux-low.c (linux_remove_process): New function.
13686 (linux_kill): Call it instead of remove_process.
13687 (linux_detach, linux_wait_1): Ditto.
13688
13689 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
13690
13691 * configure.srv: Add x86 Windows CE target.
13692
13693 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
13694
13695 * inferiors.c (get_thread_process): Make global.
13696 * server.h (get_thread_process): Add prototype.
13697 * thread-db.c (find_one_thread): Use get_thread_process
13698 instead of current_process.
13699 (thread_db_get_tls_address): Do not crash if called when
13700 thread layer is not yet initialized.
13701
13702 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
13703
13704 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
13705 * spu-low.c (current_tid): Rename to ...
13706 (current_ptid): ... this.
13707 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
13708 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
13709 ptid_get_lwp (current_ptid) instead of current_tid.
13710 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
13711 instead of current_tid. Use find_process_pid to verify pid
13712 argument is valid. Pass proper argument to remove_process.
13713 (spu_thread_alive): Compare current_ptid instead of current_tid.
13714 (spu_resume): Likewise.
13715
13716 2009-04-02 Pedro Alves <pedro@codesourcery.com>
13717
13718 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
13719 variable.
13720
13721 2009-04-01 Pedro Alves <pedro@codesourcery.com>
13722
13723 Implement the multiprocess extensions, and add linux multiprocess
13724 support.
13725
13726 * server.h (ULONGEST): Declare.
13727 (struct ptid, ptid_t): New.
13728 (minus_one_ptid, null_ptid): Declare.
13729 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
13730 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
13731 (struct inferior_list_entry): Change `id' type from unsigned from
13732 to ptid_t.
13733 (struct sym_cache, struct breakpoint, struct
13734 process_info_private): Forward declare.
13735 (struct process_info): Declare.
13736 (current_process): Declare.
13737 (all_processes): Declare.
13738 (initialize_inferiors): Declare.
13739 (add_thread): Adjust to use ptid_t.
13740 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
13741 (add_process, remove_process, find_thread_pid): Declare.
13742 (find_inferior_id): Adjust to use ptid_t.
13743 (cont_thread, general_thread, step_thread): Change type to ptid_t.
13744 (multi_process): Declare.
13745 (push_event): Adjust to use ptid_t.
13746 (read_ptid, write_ptid): Declare.
13747 (prepare_resume_reply): Adjust to use ptid_t.
13748 (clear_symbol_cache): Declare.
13749 * inferiors.c (all_processes): New.
13750 (null_ptid, minus_one_ptid): New.
13751 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
13752 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
13753 (add_thread): Change unsigned long to ptid. Remove gdb_id
13754 parameter. Adjust.
13755 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
13756 (gdb_id_to_thread): Rename to ...
13757 (find_thread_pid): ... this. Change unsigned long to ptid.
13758 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
13759 (loaded_dll, pull_pid_from_list): Adjust.
13760 (add_process, remove_process, find_process_pid)
13761 (get_thread_process, current_process, initialize_inferiors): New.
13762 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
13763 (struct target_waitstatus) <related_pid>: Ditto.
13764 (struct target_ops) <kill, detach>: Add `pid' argument. Change
13765 return type to int.
13766 (struct target_ops) <join>: Add `pid' argument.
13767 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
13768 (struct target_ops) <wait>: Add `ptid' field. Change return type
13769 to ptid.
13770 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
13771 (mywait): Add `ptid' argument. Change return type to ptid_t.
13772 (target_pid_to_str): Declare.
13773 * target.c (set_desired_inferior): Adjust to use ptids.
13774 (mywait): Add new `ptid' argument. Adjust.
13775 (target_pid_to_str): New.
13776 * mem-break.h (free_all_breakpoints): Declare.
13777 * mem-break.c (breakpoints): Delelete.
13778 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
13779 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
13780 to use per-process breakpoint list.
13781 (free_all_breakpoints): New.
13782 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
13783 (symbol_cache, all_symbols_looked_up): Delete.
13784 (hexchars): New.
13785 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
13786 read_ptid): New.
13787 (prepare_resume_reply): Change ptid argument's type from unsigned
13788 long to ptid_t. Adjust. Implement W;process and X;process.
13789 (free_sym_cache, clear_symbol_cache): New.
13790 (look_up_one_symbol): Adjust to per-process symbol cache. *
13791 * server.c (cont_thread, general_thread, step_thread): Change type
13792 to ptid_t.
13793 (attached): Delete.
13794 (multi_process): New.
13795 (last_ptid): Change type to ptid_t.
13796 (struct vstop_notif) <ptid>: Change type to ptid_t.
13797 (queue_stop_reply, push_event): Change `ptid' argument's type to
13798 ptid_t.
13799 (discard_queued_stop_replies): Add `pid' argument.
13800 (start_inferior): Adjust to use ptids. Adjust to mywait interface
13801 changes. Don't reference the `attached' global.
13802 (attach_inferior): Adjust to mywait interface changes.
13803 (handle_query): Adjust to use ptids. Parse GDB's qSupported
13804 features. Handle and report "multiprocess+". Handle
13805 "qAttached:PID".
13806 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
13807 changes.
13808 (handle_v_kill): New.
13809 (handle_v_stopped): Adjust to use target_pid_to_str.
13810 (handle_v_requests): Allow multiple attaches and runs when
13811 multiprocess extensions are in effect. Handle "vKill".
13812 (myresume): Adjust to use ptids.
13813 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
13814 (handle_status): Adjust to discard_queued_stop_replies interface
13815 change.
13816 (first_thread_of, kill_inferior_callback)
13817 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
13818 (main): Call initialize_inferiors. Adjust to use ptids, killing
13819 and detaching from all inferiors. Handle multiprocess packet
13820 variants.
13821 * linux-low.h: Include gdb_proc_service.h.
13822 (struct process_info_private): New.
13823 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
13824 <lwpid_of>: Use ptid_get_lwp.
13825 (get_lwp_thread): Adjust.
13826 (struct lwp_info): Add `dead' member.
13827 (find_lwp_pid): Declare.
13828 * linux-low.c (thread_db_active): Delete.
13829 (new_inferior): Adjust comment.
13830 (inferior_pid): Delete.
13831 (linux_add_process): New.
13832 (handle_extended_wait): Adjust.
13833 (add_lwp): Change unsigned long to ptid.
13834 (linux_create_inferior): Add process to processes table. Adjust
13835 to use ptids. Don't set new_inferior here.
13836 (linux_attach_lwp): Rename to ...
13837 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
13838 it. Adjust to use ptids.
13839 (linux_attach_lwp): New.
13840 (linux_attach): Add process to processes table. Don't set
13841 new_inferior here.
13842 (struct counter): New.
13843 (second_thread_of_pid_p, last_thread_of_process_p): New.
13844 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
13845 multiple processes.
13846 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
13847 processes. Remove process from process table.
13848 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
13849 to multiple processes.
13850 (any_thread_of): New.
13851 (linux_detach): Add `pid' argument, and handle it. Remove process
13852 from processes table.
13853 (linux_join): Add `pid' argument. Handle it.
13854 (linux_thread_alive): Change unsighed long argument to ptid_t.
13855 Consider dead lwps as not being alive.
13856 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
13857 threads we're not interested in.
13858 (same_lwp, find_lwp_pid): New.
13859 (linux_wait_for_lwp): Change `pid' argument's type from int to
13860 ptid_t. Adjust.
13861 (linux_wait_for_event): Rename to ...
13862 (linux_wait_for_event_1): ... this. Change `pid' argument's type
13863 from int to ptid_t. Adjust.
13864 (linux_wait_for_event): New.
13865 (linux_wait_1): Add `ptid' argument. Change return type to
13866 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
13867 that exit from the process table.
13868 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
13869 Adjust.
13870 (mark_lwp_dead): New.
13871 (wait_for_sigstop): Adjust to use ptids. If a process exits while
13872 stopping all threads, mark its main lwp as dead.
13873 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
13874 ptids.
13875 (fetch_register, usr_store_inferior_registers)
13876 (regsets_fetch_inferior_registers)
13877 (regsets_store_inferior_registers, linux_read_memory)
13878 (linux_write_memory): Inline `inferior_pid'.
13879 (linux_look_up_symbols): Adjust to use per-process
13880 `thread_db_active'.
13881 (linux_request_interrupt): Adjust to use ptids.
13882 (linux_read_auxv): Inline `inferior_pid'.
13883 (initialize_low): Don't reference thread_db_active.
13884 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
13885 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
13886 (ps_getpid): Return the pid of the current inferior.
13887 * thread-db.c (proc_handle, thread_agent): Delete.
13888 (thread_db_create_event, thread_db_enable_reporting): Adjust to
13889 per-process data.
13890 (find_one_thread): Change argument type to ptid_t. Adjust to
13891 per-process data.
13892 (maybe_attach_thread): Adjust to per-process data and ptids.
13893 (thread_db_find_new_threads): Ditto.
13894 (thread_db_init): Ditto.
13895 * spu-low.c (spu_create_inferior, spu_attach): Add process to
13896 processes table. Adjust to use ptids.
13897 (spu_kill, spu_detach): Adjust interface. Remove process from
13898 processes table.
13899 (spu_join, spu_thread_alive): Adjust interface.
13900 (spu_wait): Adjust interface. Remove process from processes
13901 table. Adjust to use ptids.
13902 * win32-low.c (current_inferior_tid): Delete.
13903 (current_inferior_ptid): New.
13904 (debug_event_ptid): New.
13905 (thread_rec): Take a ptid. Adjust.
13906 (child_add_thread): Add `pid' argument. Adjust to use ptids.
13907 (child_delete_thread): Ditto.
13908 (do_initial_child_stuff): Add `attached' argument. Add process to
13909 processes table.
13910 (child_fetch_inferior_registers, child_store_inferior_registers):
13911 Adjust.
13912 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
13913 (win32_attach): Pass 1 to do_initial_child_stuff.
13914 (win32_kill): Adjust interface. Remove process from processes
13915 table.
13916 (win32_detach): Ditto.
13917 (win32_join): Adjust interface.
13918 (win32_thread_alive): Take a ptid.
13919 (win32_resume): Adjust to use ptids.
13920 (get_child_debug_event): Ditto.
13921 (win32_wait): Adjust interface. Remove exiting process from
13922 processes table.
13923
13924 2009-04-01 Pedro Alves <pedro@codesourcery.com>
13925
13926 Non-stop mode support.
13927
13928 * server.h (non_stop): Declare.
13929 (gdb_client_data, handler_func): Declare.
13930 (delete_file_handler, add_file_handler, start_event_loop):
13931 Declare.
13932 (handle_serial_event, handle_target_event, push_event)
13933 (putpkt_notif): Declare.
13934 * target.h (enum resume_kind): New.
13935 (struct thread_resume): Replace `step' field by `kind' field.
13936 (TARGET_WNOHANG): Define.
13937 (struct target_ops) <wait>: Add `options' argument.
13938 <supports_non_stop, async, start_non_stop>: New fields.
13939 (target_supports_non_stop, target_async): New.
13940 (start_non_stop): Declare.
13941 (mywait): Add `options' argument.
13942 * target.c (mywait): Add `options' argument. Print child exit
13943 notifications here.
13944 (start_non_stop): New.
13945 * server.c (non_stop, own_buf, mem_buf): New globals.
13946 (struct vstop_notif): New.
13947 (notif_queue): New global.
13948 (queue_stop_reply, push_event, discard_queued_stop_replies)
13949 (send_next_stop_reply): New.
13950 (start_inferior): Adjust to use resume_kind. Adjust to mywait
13951 interface changes.
13952 (attach_inferior): In non-stop mode, don't wait for the target
13953 here.
13954 (handle_general_set): Handle QNonStop.
13955 (handle_query): When handling qC, return the current general
13956 thread, instead of the first thread of the list.
13957 (handle_query): If the backend supports non-stop mode, include
13958 QNonStop+ in the qSupported query response.
13959 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
13960 and non-stop mode.
13961 (handle_v_attach, handle_v_run): Handle non-stop mode.
13962 (handle_v_stopped): New.
13963 (handle_v_requests): Report support for vCont;t. Handle vStopped.
13964 (myresume): Adjust to use resume_kind. Handle non-stop.
13965 (queue_stop_reply_callback): New.
13966 (handle_status): Handle non-stop mode.
13967 (main): Clear non_stop flag on reconnection. Use the event-loop.
13968 Refactor serial protocol handling from here ...
13969 (process_serial_event): ... to this new function. When GDB
13970 selects any thread, select one here. In non-stop mode, wait until
13971 GDB acks all pending events before exiting.
13972 (handle_serial_event, handle_target_event): New.
13973 * remote-utils.c (remote_open): Install remote_desc in the event
13974 loop.
13975 (remote_close): Remove remote_desc from the event loop.
13976 (putpkt_binary): Rename to...
13977 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
13978 (putpkt_binary): New as wrapper around putpkt_binary_1.
13979 (putpkt_notif): New.
13980 (prepare_resume_reply): In non-stop mode, don't change the
13981 general_thread.
13982 * event-loop.c: New.
13983 * Makefile.in (OBJ): Add event-loop.o.
13984 (event-loop.o): New rule.
13985
13986 * linux-low.h (pid_of): Moved here.
13987 (lwpid_of): New.
13988 (get_lwp_thread): Use lwpid_of.
13989 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
13990 * linux-low.c (pid_of): Delete.
13991 (inferior_pid): Use lwpid_of.
13992 (linux_event_pipe): New.
13993 (target_is_async_p): New.
13994 (delete_lwp): New.
13995 (handle_extended_wait): Use lwpid_of.
13996 (add_lwp): Don't set lwpid field.
13997 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
13998 (linux_kill_one_lwp): If killing a running lwp, stop it first.
13999 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
14000 (linux_detach_one_lwp): If detaching from a running lwp, stop it
14001 first. Adjust to linux_wait_for_event interface changes. Use
14002 lwpid_of.
14003 (linux_detach): Don't delete the main lwp here.
14004 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
14005 (status_pending_p): Don't consider explicitly suspended lwps.
14006 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
14007 pointer. Add OPTIONS argument. Change return type to int. Use
14008 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
14009 (linux_wait_for_event): Take an integer pid instead of a lwp_info
14010 pointer. Add status pointer argument. Return a pid instead of a
14011 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
14012 changes. In non-stop mode, don't switch to a random thread.
14013 (linux_wait): Rename to...
14014 (linux_wait_1): ... this. Add target_options argument, and handle
14015 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
14016 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
14017 clean exit and signal exit code. Don't stop all threads in
14018 non-stop mode. In all-stop mode, only stop all threads when
14019 reporting a stop to GDB. Handle explicit thread stop requests.
14020 (async_file_flush, async_file_mark): New.
14021 (linux_wait): New.
14022 (send_sigstop): Use lwpid_of.
14023 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
14024 interface changes. In non-stop mode, don't switch to a random
14025 thread.
14026 (linux_resume_one_lwp): Use lwpid_of.
14027 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
14028 (linux_resume_one_thread): ... this. Handle resume_stop. In
14029 non-stop mode, don't look for pending flag in all threads.
14030 (resume_status_pending_p): Don't consider explicitly suspended
14031 threads.
14032 (my_waitpid): Reimplement. Emulate __WALL.
14033 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
14034 Use lwpid_of.
14035 (sigchld_handler, linux_supports_non_stop, linux_async)
14036 (linux_start_non_stop): New.
14037 (linux_target_ops): Register linux_supports_non_stop, linux_async
14038 and linux_start_non_stop.
14039 (initialize_low): Install SIGCHLD handler.
14040 * thread-db.c (thread_db_create_event, find_one_thread)
14041 (thread_db_get_tls_address): Use lwpid_of.
14042 * win32-low.c (win32_detach): Adjust to use resume_kind.
14043 (win32_wait): Add `options' argument.
14044 * spu-low.c (spu_resume): Adjust to use resume_kind.
14045 (spu_wait): Add `options' argument.
14046
14047 2009-04-01 Pedro Alves <pedro@codesourcery.com>
14048
14049 Decouple target code from remote protocol.
14050
14051 * target.h (enum target_waitkind): New.
14052 (struct target_waitstatus): New.
14053 (struct target_ops) <wait>: Return an unsigned long. Take a
14054 target_waitstatus pointer instead of a char pointer.
14055 (mywait): Likewise.
14056 * target.c (mywait): Change prototype to return an unsigned long.
14057 Take a target_waitstatus pointer instead of a char pointer. Adjust.
14058 * server.h (thread_from_wait, old_thread_from_wait): Delete
14059 declarations.
14060 (prepare_resume_reply): Change prototype to take a
14061 target_waitstatus.
14062 * server.c (thread_from_wait, old_thread_from_wait): Delete.
14063 (last_status, last_ptid): New.
14064 (start_inferior): Remove "statusptr" argument. Adjust. Return a
14065 pid instead of a signal.
14066 (attach_inferior): Remove "status" and "signal" parameters.
14067 Adjust.
14068 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
14069 not as an address.
14070 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
14071 (handle_v_requests, myresume): Remove "status" and "signal"
14072 parameters. Adjust.
14073 (handle_status): New.
14074 (main): Delete local `status'. Adjust.
14075 * remote-utils.c: Include target.h.
14076 (prepare_resume_reply): Change prototype to take a
14077 target_waitstatus. Adjust.
14078
14079 * linux-low.c (linux_wait): Adjust to new target_ops->wait
14080 interface.
14081 * spu-low.c (spu_wait): Adjust.
14082 * win32-low.c (enum target_waitkind, struct target_waitstatus):
14083 Delete.
14084 (win32_wait): Adjust.
14085
14086 2009-04-01 Pedro Alves <pedro@codesourcery.com>
14087
14088 * target.h (struct thread_resume): Delete leave_stopped member.
14089 (struct target_ops): Add a `n' argument to the `resume' callback.
14090 * server.c (start_inferior): Adjust.
14091 (handle_v_cont, myresume): Adjust.
14092 * linux-low.c (check_removed_breakpoint): Adjust to resume
14093 interface change, and to removed leave_stopped field.
14094 (resume_ptr): Delete.
14095 (struct thread_resume_array): New.
14096 (linux_set_resume_request): Add new `arg' parameter. Adjust to
14097 resume interface change.
14098 (linux_continue_one_thread, linux_queue_one_thread)
14099 (resume_status_pending_p): Check if the resume field is NULL
14100 instead of checking the leave_stopped member.
14101 (linux_resume): Adjust to the target resume interface change.
14102 * spu-low.c (spu_resume): Adjust to the target resume interface
14103 change.
14104 * win32-low.c (win32_detach, win32_resume): Ditto.
14105
14106 2009-04-01 Pedro Alves <pedro@codesourcery.com>
14107
14108 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
14109 flag.
14110 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
14111 pending.
14112 (linux_continue_one_thread): Only preserve the stepping flag if
14113 there's a pending breakpoint.
14114
14115 2009-03-31 Pedro Alves <pedro@codesourcery.com>
14116
14117 * server.c (main): After the inferior having exited, call
14118 remote_close before exiting gdbserver.
14119
14120 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
14121
14122 Fix size of FPSCR in Power 7 processors.
14123 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
14124 (PPC_FEATURE_HAS_DFP): New #define.
14125 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
14126 size of the FPSCR.
14127
14128 2009-03-23 Pedro Alves <pedro@codesourcery.com>
14129
14130 * server.c (handle_query) Whitespace and formatting.
14131
14132 2009-03-22 Pedro Alves <pedro@codesourcery.com>
14133
14134 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
14135 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
14136 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
14137 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
14138 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
14139 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
14140 Makefile.in, configure.ac: Fix whitespace throughout.
14141 * configure: Regenerate.
14142
14143 2009-03-22 Pedro Alves <pedro@codesourcery.com>
14144
14145 * inferiors.c (find_inferior): Make it safe for the callback
14146 function to delete the currently iterated inferior.
14147
14148 2009-03-22 Pedro Alves <pedro@codesourcery.com>
14149
14150 * Makefile.in (linuw_low_h): Move higher.
14151 (thread-db.o): Depend on $(linux_low_h).
14152
14153 2009-03-17 Pedro Alves <pedro@codesourcery.com>
14154
14155 Rename "process" to "lwp" throughout.
14156
14157 * linux-low.c (all_processes): Rename to...
14158 (all_lwps): ... this.
14159 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
14160 (add_process): Rename to ...
14161 (add_lwp): ... this. Adjust.
14162 (linux_create_inferior): Adjust.
14163 (linux_attach_lwp): Adjust.
14164 (linux_attach): Adjust.
14165 (linux_kill_one_process): Rename to ...
14166 (linux_kill_one_lwp): ... this. Adjust.
14167 (linux_kill): Adjust.
14168 (linux_detach_one_process): Rename to ...
14169 (linux_detach_one_lwp): ... this. Adjust.
14170 (linux_detach): Adjust.
14171 (check_removed_breakpoint): Adjust.
14172 (status_pending_p): Adjust.
14173 (linux_wait_for_process): Rename to ...
14174 (linux_wait_for_lwp): ... this. Adjust.
14175 (linux_wait_for_event): Adjust.
14176 (send_sigstop): Adjust.
14177 (wait_for_sigstop): Adjust.
14178 (stop_all_processes): Rename to ...
14179 (stop_all_lwps): ... this.
14180 (linux_resume_one_process): Rename to ...
14181 (linux_resume_one_lwp): ... this. Adjust.
14182 (linux_set_resume_request, linux_continue_one_thread)
14183 (linux_queue_one_thread, resume_status_pending_p)
14184 (usr_store_inferior_registers, regsets_store_inferior_registers)
14185 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
14186 Adjust.
14187 * linux-low.h (get_process): Rename to ...
14188 (get_lwp): ... this. Adjust.
14189 (get_thread_process): Rename to ...
14190 (get_thread_lwp): ... this. Adjust.
14191 (get_process_thread): Rename to ...
14192 (get_lwp_thread): ... this. Adjust.
14193 (struct process_info): Rename to ...
14194 (struct lwp_info): ... this.
14195 (all_processes): Rename to ...
14196 (all_lwps): ... this.
14197 * proc-service.c (ps_lgetregs): Adjust.
14198 * thread-db.c (thread_db_create_event, find_one_thread)
14199 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
14200
14201 2009-03-14 Pedro Alves <pedro@codesourcery.com>
14202
14203 * server.c (handle_query): Handle "qAttached".
14204
14205 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
14206
14207 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
14208 GPLv3, update license URL.
14209
14210 2009-03-01 Doug Evans <dje@google.com>
14211
14212 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
14213 (server_h): Add gdb_signals.h.
14214 (signals.o): Update.
14215 * server.h (target_signal_from_host,target_signal_to_host_p)
14216 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
14217
14218 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
14219
14220 * remote-utils.c (getpkt): Also generate remote-debug
14221 information if noack_mode is set.
14222
14223 2009-02-06 Pedro Alves <pedro@codesourcery.com>
14224
14225 * server.c (handle_query): Report qXfer:siginfo:read and
14226 qXfer:siginfo:write as supported and handle them.
14227 * target.h (struct target_ops) <qxfer_siginfo>: New field.
14228 * linux-low.c (linux_xfer_siginfo): New.
14229 (linux_target_ops): Set it.
14230
14231 2009-01-26 Pedro Alves <pedro@codesourcery.com>
14232
14233 * server.c (gdbserver_usage): Mention --remote-debug.
14234 (main): Accept '--remote-debug' switch.
14235
14236 2009-01-18 Doug Evans <dje@google.com>
14237
14238 * regcache.c (new_register_cache): No need to check result of xcalloc.
14239 * server.c (handle_search_memory): Back out calls to xmalloc,
14240 result is checked and error is returned to user upon failure.
14241 (handle_query): Ditto. Add more checks for result of malloc.
14242 (handle_v_cont): Check result of malloc, report error back to
14243 user upon failure.
14244 (handle_v_run): Ditto. Call freeargv.
14245 * server.h (freeargv): Declare.
14246 * utils.c (freeargv): New fn.
14247
14248 2009-01-15 Doug Evans <dje@google.com>
14249
14250 * gdbreplay.c (perror_with_name): Make arg const char *.
14251 * server.h (target_signal_to_name): Make return type const char *.
14252 * thread-db.c (thread_db_err_str): Make return type const char *.
14253 * utils.c (perror_with_name): Make arg const char *.
14254
14255 2009-01-14 Pedro Alves <pedro@codesourcery.com>
14256
14257 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
14258 when handling a EXIT_PROCESS_DEBUG_EVENT.
14259
14260 2009-01-06 Joel Brobecker <brobecker@adacore.com>
14261
14262 * gdbreplay.c (gdbreplay_version): Update copyright year.
14263 * server.c (gdbserver_version): Likewise.
14264
14265 2009-01-05 Doug Evans <dje@google.com>
14266
14267 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
14268 (handle_extended_wait): Improve comment.
14269
14270 2008-12-13 Doug Evans <dje@google.com>
14271
14272 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
14273 * server.h (ATTR_MALLOC): New macro.
14274 (xmalloc,xcalloc,xstrdup): Declare.
14275 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
14276 * inferiors.c: Ditto.
14277 * linux-low.c: Ditto.
14278 * mem-break.c: Ditto.
14279 * regcache.c: Ditto.
14280 * remote-utils.c: Ditto.
14281 * server.c: Ditto.
14282 * target.c: Ditto.
14283 * win32-low.c: Ditto.
14284
14285 2008-12-12 Doug Evans <dje@google.com>
14286
14287 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
14288 in debugging printf.
14289
14290 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
14291
14292 2008-12-09 Doug Evans <dje@google.com>
14293
14294 * linux-low.h (struct process_info): Delete member tid, unused.
14295 * thread-db.c (find_one_thread): Update.
14296 (maybe_attach_thread): Update.
14297
14298 2008-12-02 Pedro Alves <pedro@codesourcery.com>
14299
14300 * target.h (struct target_ops): Add qxfer_osdata member.
14301 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
14302 and dirent.h.
14303 (linux_qxfer_osdata): New functions.
14304 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
14305 callback.
14306 * server.c (handle_query): Handle "qXfer:osdata:read:".
14307 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
14308 (buffer_xml_printf): New functions.
14309 * server.h (struct buffer): New.
14310 (buffer_grow_str, buffer_grow_str0): New macros.
14311 (buffer_grow, buffer_free, buffer_init, buffer_finish)
14312 (buffer_xml_printf): Declare.
14313
14314 2008-11-24 Doug Evans <dje@google.com>
14315
14316 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
14317
14318 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
14319
14320 * server.c (handle_v_run): Always use the supplied argument list.
14321
14322 2008-11-19 Bob Wilson <bob.wilson@acm.org>
14323
14324 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
14325 (xtensa_regmap_table): Add entry for scompare1.
14326
14327 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
14328
14329 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
14330 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
14331 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
14332 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
14333 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
14334 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
14335 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
14336 XML target descriptions.
14337 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
14338 when inferior is running on an ISA 2.05 or later processor. Add
14339 special case to return offset for full 64-bit slot of FPSCR when
14340 in 32-bits.
14341
14342 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
14343
14344 * Makefile.in (SFILES, clean): Added sparc64 files.
14345 (reg-sparc64.o, reg-sparc64.c): New.
14346 * configure.srv (sparc*-*-linux*): New configuration.
14347 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
14348 syscall arguments for SPARC.
14349 (regsets_store_inferior_registers): Likewise.
14350 * linux-sparc-low.c: New file.
14351
14352 2008-10-21 Doug Evans <dje@google.com>
14353
14354 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
14355 (READLINE_DIR,READLINE_DEP): Delete.
14356 (INTERNAL_CFLAGS): Update.
14357 (LINTFLAGS): Update.
14358
14359 2008-10-10 Pedro Alves <pedro@codesourcery.com>
14360
14361 * server.c (handle_v_run): If GDB didn't specify an argv, use the
14362 whole argv from the last run, not just argv[0].
14363
14364 2008-09-08 Pedro Alves <pedro@codesourcery.com>
14365
14366 * regcache.c (new_register_cache): Return NULL if the register
14367 cache size isn't known yet.
14368 (free_register_cache): Avoid dereferencing a NULL regcache.
14369
14370 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
14371
14372 * configure.srv: Merge MIPS and MIPS64.
14373
14374 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
14375
14376 * Makefile.in (uninstall): Apply $(EXEEXT) too.
14377
14378 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
14379
14380 * Makefile.in: Add required vsx dependencies.
14381
14382 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
14383 Declare init_registers_powerpc_vsx32l.
14384 Declare init_registers_powerpc_vsx64l.
14385 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
14386 (ppc_arch_setup): Check for VSX in hwcap.
14387 (ppc_fill_vsxregset): New function.
14388 (ppc_store_vsxregset): New function.
14389 Add new VSX entry in regset_info target_regsets.
14390
14391 * configure.srv: Add new VSX dependencies.
14392
14393 2008-08-12 Pedro Alves <pedro@codesourcery.com>
14394
14395 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
14396 (remote_open): Set or clear transport_is_reliable.
14397 (putpkt_binary): Don't expect acks in noack mode.
14398 (getpkt): Don't send ack/nac in noack mode.
14399 * server.c (handle_general_set): Handle QStartNoAckMode.
14400 (handle_query): If connected by tcp pass QStartNoAckMode+ in
14401 qSupported.
14402 (main): Reset noack_mode on every connection.
14403 * server.h (noack_mode): Declare.
14404
14405 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
14406
14407 * Makefile.in (GDBREPLAY_OBS): New variable.
14408 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
14409
14410 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
14411 Daniel Jacobowitz <dan@codesourcery.com>
14412
14413 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
14414 (usr_store_inferior_registers): Likewise.
14415 (regsets_store_inferior_registers): Likewise.
14416
14417 2008-07-31 Rolf Jansen <rj@surtec.com>
14418 Pedro Alves <pedro@codesourcery.com>
14419
14420 * configure.ac: Check for memmem declaration.
14421 * server.c [HAVE_MALLOC_H]: Include malloc.h.
14422 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
14423 (disable_packet_qfThreadInfo): Unconditionally compile.
14424 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
14425 * configure, config.in: Regenerate.
14426
14427 2008-07-28 Doug Kwan <dougkwan@google.com>
14428
14429 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
14430 (linux_write_memory): Remove declaration of errno.
14431
14432 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
14433
14434 * linux-low.c (handle_extended_wait): Do not use "status"
14435 variable uninitialized.
14436
14437 2008-07-07 Pedro Alves <pedro@codesourcery.com>
14438
14439 * server.c (handle_v_attach): Inhibit reporting dll changes.
14440
14441 2008-06-27 Pedro Alves <pedro@codesourcery.com>
14442
14443 * remote-utils.c (prepare_resume_reply): If requested, don't
14444 output "thread:TID" in the T stop reply.
14445
14446 * server.c (disable_packet_vCont, disable_packet_Tthread)
14447 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
14448 (handle_query): If requested, disable support for qC, qfThreadInfo
14449 and qsThreadInfo.
14450 (handle_v_requests): If requested, disable support for vCont.
14451 (gdbserver_show_disableable): New.
14452 (main): Handle --disable-packet and --disable-packet=LIST.
14453
14454 * server.h (disable_packet_vCont, disable_packet_Tthread)
14455 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
14456
14457 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
14458
14459 * server.c (gdbserver_usage): Mention --version.
14460
14461 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
14462
14463 * Makefile.in (gdbreplay.o): New rule.
14464
14465 2008-06-06 Joseph Myers <joseph@codesourcery.com>
14466
14467 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
14468 message, not gdbserver.
14469
14470 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
14471 Nathan Sidwell <nathan@codesourcery.com>
14472 Joseph Myers <joseph@codesourcery.com>
14473
14474 * acinclude.m4: Include ../../config/acx.m4.
14475 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
14476 * configure, config.in: Regenerate.
14477 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
14478 * server.c (gdbserver_version): Print PKGVERSION.
14479 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
14480 (main): Adjust gdbserver_usage calls.
14481 * gdbreplay.c (version, host_name): Add declarations.
14482 (gdbreplay_version, gdbreplay_usage): New.
14483 (main): Accept --version and --help options.
14484
14485 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
14486
14487 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
14488 (arm_breakpoint_at): Handle Thumb.
14489 (the_low_target): Add comment.
14490
14491 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
14492
14493 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
14494
14495 2008-05-09 Doug Evans <dje@google.com>
14496
14497 * server.h (decode_search_memory_packet): Declare.
14498 * remote-utils.c (decode_search_memory_packet): New fn.
14499 * server.c (handle_search_memory_1): New fn.
14500 (handle_search_memory): New fn.
14501 (handle_query): Process qSearch:memory packets.
14502
14503 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
14504
14505 * regcache.c (registers_length): Remove.
14506 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
14507 full register packet.
14508 * regcache.h (registers_length): Remove prototype.
14509 * server.h (PBUFSIZ): Define to 16384.
14510
14511 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
14512
14513 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
14514 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
14515 powerpc-64l.o, and powerpc-altivec64l.o.
14516 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
14517 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
14518 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
14519 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
14520 rs6000/power-linux.xml, and rs6000/power64-linux.xml
14521 to srv_xmlfiles.
14522
14523 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
14524 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
14525 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
14526 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
14527 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
14528 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
14529 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
14530 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
14531 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
14532 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
14533 (clean): Update.
14534
14535 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
14536 (init_registers_powerpc_32l): ... this new prototype.
14537 (init_registers_powerpc_32): Remove, replace by ...
14538 (init_registers_powerpc_altivec32l): ... this new prototype.
14539 (init_registers_powerpc_e500): Remove, replace by ...
14540 (init_registers_powerpc_e500l): ... this new prototype.
14541 (init_registers_ppc64): Remove, replace by ...
14542 (init_registers_powerpc_64l): ... this new prototype.
14543 (init_registers_powerpc_64): Remove, replace by ...
14544 (init_registers_powerpc_altivec64l): ... this new prototype.
14545 (ppc_num_regs): Set to 73.
14546 (PT_ORIG_R3, PT_TRAP): Define if necessary.
14547 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
14548 (ppc_cannot_store_register): Handle orig_r3 and trap.
14549 (ppc_arch_setup): Update init_registers_... calls.
14550 (ppc_fill_gregset): Handle orig_r3 and trap.
14551
14552 * inferiors.c (clear_inferiors): Reset current_inferior.
14553
14554 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
14555
14556 * acinclude.m4: Add override.m4.
14557 * configure: Regenerate.
14558
14559 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
14560
14561 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
14562 initial call to init_register_ppc64.
14563
14564 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
14565
14566 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
14567 single powerpc*-*-linux* case.
14568 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
14569
14570 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
14571
14572 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
14573 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
14574 from reg_xmlfiles.
14575 * linux-ppc-low.c: Include <elf.h>.
14576 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
14577 (ppc_hwcap): New global variable.
14578 (ppc_regmap): Remove __SPE__ #ifdef sections.
14579 (ppc_regmap_e500): New global variable.
14580 (ppc_cannot_store_register): Update __SPE__ special case.
14581 (ppc_get_hwcap): New function.
14582 (ppc_arch_setup): Use it to determine whether inferior supports
14583 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
14584 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
14585 Do not access registers if target does not support AltiVec.
14586 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
14587 Do not access registers if target does not support SPE.
14588 (target_regsets): Unconditionally include AltiVec and SPE regsets.
14589
14590 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
14591
14592 * linux-low.c (disabled_regsets, num_regsets): New.
14593 (use_regsets_p): Delete.
14594 (linux_wait_for_process): Clear disabled_regsets.
14595 (regsets_fetch_inferior_registers): Check and set it.
14596 (regsets_store_inferior_registers): Likewise.
14597 (linux_fetch_registers, linux_store_registers): Do not use
14598 use_regsets_p.
14599 (initialize_low): Allocate disabled_regsets.
14600
14601 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
14602
14603 * Makefile.in (LIBOBJS): New.
14604 (OBS): Use LIBOBJS.
14605 (memmem.o): New rule.
14606 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
14607 * configure: Regenerated.
14608
14609 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
14610
14611 * server.c (handle_query): Never return "unsupported" for
14612 qXfer:features:read queries.
14613
14614 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
14615
14616 * server.c (get_features_xml): Fix inverted condition.
14617 (handle_query): Always support qXfer:feature:read.
14618
14619 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
14620
14621 * server.c (wrapper_argv): New.
14622 (start_inferior): Handle wrapper_argv. If set, expect an extra
14623 trap.
14624 (gdbserver_usage): Document --wrapper.
14625 (main): Parse --wrapper.
14626
14627 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
14628
14629 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
14630 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
14631 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
14632 (ppc_set_pc): Likewise.
14633 (ppc_arch_setup): New function.
14634 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
14635 of collect_register.
14636 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
14637
14638 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
14639
14640 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
14641 instead of linux-ppc64-low.o.
14642 * linux-ppc64-low.c: Remove file.
14643 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
14644 (linux-ppc64-low.o): Remove rule.
14645
14646 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
14647 (init_registers_powerpc_64): Likewise.
14648 (ppc_regmap): Conditionally define depending on __powerpc64__.
14649 (ppc_cannot_store_register): Do not special-case "fpscr" when
14650 compiled on __powerpc64__.
14651 (ppc_collect_ptrace_register): New function.
14652 (ppc_supply_ptrace_register): New function.
14653 (ppc_breakpoint): Change type to "unsigned int".
14654 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
14655 (the_low_target): Conditionally provide initializers for the
14656 arch_setup member depending on __powerpc64__. Install
14657 collect_ptrace_register and supply_ptrace_register members.
14658
14659 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
14660
14661 * regcache.h (gdbserver_xmltarget): Add extern declaration.
14662 * server.c (gdbserver_xmltarget): Define.
14663 (get_features_xml): Use it to replace "target.xml" and arch_string.
14664
14665 * configure.srv: Remove srv_xmltarget. Add XML files that were
14666 mentioned there to srv_xmlfiles instead. Remove conditional tests
14667 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
14668 srv_xmlfiles and srv_regobj to include all possible choices.
14669 * configure.ac (srv_xmltarget): Remove.
14670 (srv_xmlfiles): Do not add "target.xml".
14671 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
14672 checks for supplementary target information.
14673 * configure: Regenerate.
14674 * Makefile.in (XML_TARGET): Remove.
14675 (target.xml): Remove rule.
14676 (clean): Do not clean up target.xml.
14677 (.PRECIOUS): Do not mention target.xml.
14678
14679 * target.h (struct target_ops): Remove arch_string member.
14680 * linux-low.c (linux_arch_string): Remove.
14681 (linux_target_ops): Remove arch_string initializer.
14682 * linux-low.h (struct linux_target_ops): Remove arch_string member.
14683 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
14684 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
14685 * spu-low.c (spu_arch_string): Remove.
14686 (spu_target_ops): Remove arch_string initializer.
14687 * win32-low.c (win32_arch_string): Remove.
14688 (win32_target_ops): Remove arch_string initializer.
14689 * win32-low.h (struct win32_target_ops): Remove arch_string member.
14690 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
14691 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
14692
14693 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
14694
14695 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
14696 by collect_ptrace_register and supply_ptrace_register hooks.
14697 * linux-low.c (fetch_register): Use supply_ptrace_register callback
14698 instead of checking for the_low_target.left_pad_xfer.
14699 (usr_store_inferior_registers): Use collect_ptrace_register callback
14700 instead of checking for the_low_target.left_pad_xfer.
14701
14702 * linux-s390-low.c (s390_collect_ptrace_register): New function.
14703 (s390_supply_ptrace_register): Likewise.
14704 (s390_fill_gregset): Call s390_collect_ptrace_register.
14705 (the_low_target): Update.
14706
14707 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
14708 (ppc_supply_ptrace_register): Likewise.
14709 (the_low_target): Update.
14710
14711 * linux-i386-low.c (the_low_target): Update.
14712 * linux-x86-64-low.c (the_low_target): Update.
14713
14714 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
14715
14716 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
14717 reg-s390.o and reg-s390x.o.
14718
14719 * linux-low.c (new_inferior): New global variable.
14720 (linux_create_inferior, linux_attach): Set it.
14721 (linux_wait_for_process): Call the_low_target.arch_setup after the
14722 target has stopped for the first time.
14723 (initialize_low): Do not call the_low_target.arch_setup.
14724
14725 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
14726 (s390_set_pc): Likewise.
14727 (s390_arch_setup): New function.
14728 (the_low_target): Use s390_arch_setup as arch_setup routine.
14729
14730 * regcache.c (realloc_register_cache): New function.
14731 (set_register_cache): Call it for each existing regcache.
14732
14733 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
14734
14735 * server.h (init_registers): Remove prototype.
14736
14737 * linux-low.h (struct linux_target_ops): Add arch_setup field.
14738 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
14739 instead of init_registers ().
14740 * linux-arm-low.c (init_registers_arm): Add prototype.
14741 (init_registers_arm_with_iwmmxt): Likewise.
14742 (the_low_target): Add initializer for arch_setup field.
14743 * linux-cris-low.c (init_registers_cris): Add prototype.
14744 (the_low_target): Add initializer for arch_setup field.
14745 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
14746 (the_low_target): Add initializer for arch_setup field.
14747 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
14748 (the_low_target): Add initializer for arch_setup field.
14749 * linux-ia64-low.c (init_registers_ia64): Add prototype.
14750 (the_low_target): Add initializer for arch_setup field.
14751 * linux-m32r-low.c (init_registers_m32r): Add prototype.
14752 (the_low_target): Add initializer for arch_setup field.
14753 * linux-m68k-low.c (init_registers_m68k): Add prototype.
14754 (the_low_target): Add initializer for arch_setup field.
14755 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
14756 (init_registers_mips64_linux): Likewise.
14757 (the_low_target): Add initializer for arch_setup field.
14758 * linux-ppc-low.c (init_registers_ppc): Add prototype.
14759 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
14760 (the_low_target): Add initializer for arch_setup field.
14761 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
14762 (init_registers_powerpc_64): Likewise.
14763 (the_low_target): Add initializer for arch_setup field.
14764 * linux-s390-low.c (init_registers_s390): Add prototype.
14765 (init_registers_s390x): Likewise.
14766 (the_low_target): Add initializer for arch_setup field.
14767 * linux-sh-low.c (init_registers_sh): Add prototype.
14768 (the_low_target): Add initializer for arch_setup field.
14769 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
14770 (the_low_target): Add initializer for arch_setup field.
14771 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
14772 (the_low_target): Add initializer for arch_setup field.
14773
14774 * win32-low.h (struct win32_target_ops): Add arch_setup field.
14775 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
14776 instead of init_registers ().
14777 * win32-arm-low.c (init_registers_arm): Add prototype.
14778 (the_low_target): Add initializer for arch_setup field.
14779 * win32-i386-low.c (init_registers_i386): Add prototype.
14780 (the_low_target): Add initializer for arch_setup field.
14781
14782 * spu-low.c (init_registers_spu): Add prototype.
14783 (initialize_low): Call initialie_registers_spu () instead of
14784 initialize_registers ().
14785
14786 2008-02-19 Pedro Alves <pedro@codesourcery.com>
14787
14788 * server.c (handle_v_requests): When handling the vRun and vAttach
14789 packets, if already debugging a process, don't kill it. Return an
14790 error instead.
14791
14792 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
14793
14794 * server.c (handle_query): Correct length check.
14795
14796 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
14797
14798 * win32-low.c (do_initial_child_stuff): Add process handle
14799 parameter. Set current_process_handle and current_process_id from the
14800 parameters. Clear globals.
14801 (win32_create_inferior): Don't set current_process_handle and
14802 current_process_id here. Instead pass them on the call to
14803 do_initial_child_stuff.
14804 (win32_attach): Likewise.
14805 (win32_clear_inferiors): New.
14806 (win32_kill): Don't close the current process handle or the
14807 current thread handle here. Instead call win32_clear_inferiors.
14808 (win32_detach): Don't open a new handle to the process. Call
14809 win32_clear_inferiors.
14810 (win32_join): Don't rely on current_process_handle; open a new
14811 handle using the process id.
14812 (win32_wait): Call win32_clear_inferiors when the inferior process
14813 has exited.
14814
14815 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
14816
14817 * server.c (monitor_show_help): Add "exit".
14818
14819 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
14820
14821 * Makefile.in (SFILES): Add linux-xtensa-low.c.
14822 (clean): Add reg-xtensa.c.
14823 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
14824 * configure.srv (xtensa*-*-linux*) New target.
14825 * linux-xtensa-low.c: New.
14826 * xtensa-xtregs.c: New.
14827
14828 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
14829
14830 * hostio.c: Don't include errno.h.
14831 (errno_to_fileio_errno): Move to hostio-errno.
14832 * hostio.c: (hostio_error): Remove the error parameter. Defer the
14833 error number outputting to the target->hostio_last_error callback.
14834 (hostio_packet_error): Use FILEIO_EINVAL directly.
14835 (handle_open, handle_pread, hostio_error, handle_unlink): Update
14836 calls to hostio_error.
14837 * hostio-errno.c: New.
14838 * server.h (hostio_last_error_from_errno): Declare.
14839 * target.h (target_ops): Add hostio_last_error member.
14840 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
14841 as hostio_last_error handler.
14842 * spu-low.c (spu_target_ops): Likewise.
14843 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
14844 (wince_hostio_last_error): New functions.
14845 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
14846 as hostio_last_error handler.
14847 (win32_target_ops) [!_WIN32_WCE]: Register
14848 hostio_last_error_from_errno as hostio_last_error handler.
14849 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
14850 (hostio-errno.o): New rule.
14851 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
14852 * configure.srv (srv_hostio_err_objs): New variable. Default to
14853 hostio-errno.o.
14854 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
14855 * configure: Regenerate.
14856
14857 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
14858
14859 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
14860 (linux_kill, linux_detach): Clean up the process list.
14861 * remote-utils.c (remote_open): Improve port number parsing.
14862 (putpkt_binary, input_interrupt): Only send interrupts if the target
14863 is running.
14864 * server.c (extended_protocol): Make static.
14865 (attached): Define earlier.
14866 (exit_requested, response_needed, program_argv): New variables.
14867 (target_running): New.
14868 (start_inferior): Clear attached here.
14869 (attach_inferior): Set attached here.
14870 (require_running): Define.
14871 (handle_query): Use require_running and target_running. Implement
14872 "monitor exit".
14873 (handle_v_attach, handle_v_run): New.
14874 (handle_v_requests): Use require_running. Handle vAttach and vRun.
14875 (gdbserver_usage): Update.
14876 (main): Redo argument parsing. Handle --debug and --multi. Handle
14877 --attach along with other options or after the port. Save
14878 program_argv. Support no initial program. Resynchronize
14879 communication with GDB after an error. Handle "monitor exit".
14880 Use require_running and target_running. Always allow the extended
14881 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
14882 restart in extended mode.
14883 * README: Refer to the GDB manual. Update --attach usage.
14884
14885 2007-12-20 Andreas Schwab <schwab@suse.de>
14886
14887 * linux-low.c (STACK_SIZE): Define.
14888 (linux_tracefork_child): Use it. Use __clone2 on ia64.
14889 (linux_test_for_tracefork): Likewise.
14890
14891 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
14892
14893 * linux-low.c (linux_wait_for_event): Update messages. Do not
14894 reinsert auto-delete breakpoints.
14895 * mem-break.c (struct breakpoint): Change return type of handler to
14896 int.
14897 (set_breakpoint_at): Update handler type.
14898 (reinsert_breakpoint_handler): Return 1 instead of calling
14899 delete_breakpoint.
14900 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
14901 setting a new one.
14902 (check_breakpoints): Delete auto-delete breakpoints and return 2.
14903 * mem-break.h (set_breakpoint_at): Update handler type.
14904 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
14905 * win32-low.c (auto_delete_breakpoint): New.
14906 (get_child_debug_event): Use it.
14907
14908 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
14909
14910 * configure.ac: Check for pread and pwrite.
14911 * hostio.c (handle_pread): Fall back to lseek and read.
14912 (handle_pwrite): Fall back to lseek and write.
14913 * config.in, configure: Regenerated.
14914
14915 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
14916
14917 * server.c (myresume): Add own_buf argument.
14918 (main): Update calls.
14919
14920 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
14921
14922 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
14923 * remote-utils.c (remote_open): Do not call disable_async_io.
14924 (block_async_io): Delete.
14925 (unblock_async_io): Make static.
14926 (initialize_async_io): New.
14927 * server.c (handle_v_cont): Handle async I/O here.
14928 (myresume): Likewise. Move other common resume tasks here...
14929 (main): ... from here. Call initialize_async_io. Disable async
14930 I/O before the main loop.
14931 * server.h (initialize_async_io): Declare.
14932 (block_async_io, unblock_async_io): Delete prototypes.
14933 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
14934
14935 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
14936
14937 * remote-utils.c (readchar): Allow binary data in received messages.
14938
14939 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14940
14941 * win32-low.c (attaching): New global.
14942 (win32_create_inferior): Clear the `attaching' global.
14943 (win32_attach): Set the `attaching' global.
14944 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
14945 attaching. Only set a breakpoint at the entry point if not
14946 attaching.
14947
14948 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14949
14950 * server.c (main): Don't report dll events on the initial
14951 connection on attaches.
14952
14953 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14954
14955 * server.c (main): Relax numerical bases supported for the pid of
14956 the --attach command line argument.
14957
14958 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14959
14960 * win32-low.c (win32_attach): Call OpenProcess before
14961 DebugActiveProcess, not after. Add last error output to error
14962 call.
14963
14964 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14965
14966 * win32-low.c (win32_get_thread_context)
14967 (win32_set_thread_context): New functions.
14968 (thread_rec): Use win32_get_thread_context.
14969 (continue_one_thread, win32_resume): Use win32_set_thread_context.
14970 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
14971 field.
14972
14973 2007-12-03 Leo Zayas
14974 Pedro Alves <pedro_alves@portugalmail.pt>
14975
14976 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
14977 global variables.
14978 (child_add_thread): Minor cleanup.
14979 (child_continue): Resume artificially suspended threads before
14980 calling ContinueDebugEvent.
14981 (suspend_one_thread): New.
14982 (fake_breakpoint_event): New.
14983 (get_child_debug_event): Change return type to int. Check here if
14984 gdb sent an interrupt request. If a soft interrupt was requested,
14985 fake a breakpoint event. Return 0 if there is no event to handle,
14986 and 1 otherwise.
14987 (win32_wait): Don't check here if gdb sent an interrupt request.
14988 Ensure there is a valid event to handle.
14989 (win32_request_interrupt): Add soft interruption method as last
14990 resort.
14991
14992 2007-12-03 Leo Zayas
14993 Pedro Alves <pedro_alves@portugalmail.pt>
14994
14995 * win32-low.h (win32_thread_info): Add descriptions to the
14996 structure members. Replace `suspend_count' counter by a
14997 `suspended' flag.
14998 * win32-low.c (thread_rec): Update condition of when to get the
14999 context from the inferior. Rely on ContextFlags being set if it
15000 has already been retrieved. Only suspend the inferior thread if
15001 we haven't already. Warn if that fails.
15002 (continue_one_thread): s/suspend_count/suspended/. Only call
15003 ResumeThread once. Warn if that fails.
15004
15005 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
15006
15007 * win32-low.c (win32_wait): Don't read from the inferior when it
15008 has already exited.
15009
15010 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
15011
15012 * Makefile.in (win32_low_h): New variable.
15013 (win32-low.o): Add dependency on $(win32_low_h).
15014 (win32-arm-low.o, win32-i386-low.o): New rules.
15015
15016 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
15017
15018 * hostio.c: Correct copyright year.
15019
15020 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
15021
15022 * Makefile.in (OBS): Add hostio.o.
15023 (hostio.o): New rule.
15024 * server.h (handle_vFile): Declare.
15025 * hostio.c: New file.
15026 * server.c (handle_v_requests): Take packet_len and new_packet_len
15027 for binary packets. Call handle_vFile.
15028 (main): Update call to handle_v_requests.
15029
15030 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
15031
15032 * linux-low.c: Include <sched.h>.
15033
15034 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
15035
15036 * linux-low.c (linux_tracefork_grandchild): New.
15037 (linux_tracefork_child): Use clone.
15038 (linux_test_for_tracefork): Use clone; allocate and free a stack.
15039
15040 2007-10-31 Joel Brobecker <brobecker@adacore.com>
15041
15042 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
15043
15044 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
15045
15046 * linux-low.c (handle_extended_wait): Handle unexpected signals.
15047
15048 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
15049
15050 * inferiors.c (change_inferior_id): Delete.
15051 (add_pid_to_list, pull_pid_from_list): New.
15052 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
15053 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
15054 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
15055 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
15056 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
15057 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
15058 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
15059 (using_threads): Always set to 1.
15060 (handle_extended_wait): New.
15061 (add_process): Do not set TID.
15062 (linux_create_inferior): Set must_set_ptrace_flags.
15063 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
15064 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
15065 (linux_thread_alive): Rename TID argument to LWPID.
15066 (linux_wait_for_process): Handle unknown processes. Do not use TID.
15067 (linux_wait_for_event): Do not use TID or check using_threads. Update
15068 call to dead_thread_notify. Call handle_extended_wait.
15069 (linux_create_inferior): Use PTRACE_SETOPTIONS.
15070 (send_sigstop): Delete sigstop_sent.
15071 (wait_for_sigstop): Avoid TID.
15072 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
15073 (linux_test_for_tracefork): New.
15074 (linux_lookup_signals): Use thread_db_active and
15075 linux_supports_tracefork_flag.
15076 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
15077 * linux-low.h (get_process_thread): Avoid TID.
15078 (struct process_ifo): Move thread_known and tid to the end. Remove
15079 sigstop_sent.
15080 (linux_attach_lwp, thread_db_init): Update prototypes.
15081 * server.h (change_inferior_id): Delete prototype.
15082 (add_pid_to_list, pull_pid_from_list): New prototypes.
15083 * thread-db.c (thread_db_use_events): New.
15084 (find_first_thread): Rename to...
15085 (find_one_thread): ...this. Update callers and messages. Do not
15086 call fatal. Check thread_db_use_events. Do not call
15087 change_inferior_id or new_thread_notify.
15088 (maybe_attach_thread): Update. Do not call new_thread_notify.
15089 (thread_db_init): Set thread_db_use_events. Check use_events.
15090 * utils.c (fatal, warning): Correct message prefix.
15091
15092 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
15093
15094 * Makefile.in (clean): Remove new files.
15095 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
15096 (powerpc-64.o, powerpc-64.c): New rules.
15097 * configure.srv: Use alternate register sets for powerpc64-*-linux*
15098 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
15099 with SPE.
15100 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
15101 SPE targets.
15102 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
15103 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
15104 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
15105 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
15106 (target_regsets): Add AltiVec and SPE register sets.
15107 * configure.ac: Check for AltiVec and SPE.
15108 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
15109 (ppc_fill_vrregset, ppc_store_vrregset): New.
15110 (target_regsets): Add AltiVec register set.
15111 * configure: Regenerated.
15112
15113 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
15114
15115 * linux-low.c (O_LARGEFILE): Define.
15116 (linux_read_memory): Use /proc/PID/mem.
15117 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
15118 * configure, config.in: Regenerated.
15119
15120 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
15121
15122 * linux-low.c (linux_wait_for_event): Do not pass signals while
15123 single-stepping.
15124
15125 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
15126
15127 * win32-low.c (create_process): New.
15128 (win32_create_inferior): Use create_process instead of
15129 CreateProcess. If create_process failed retry appending an ".exe"
15130 suffix. Store the GetLastError result immediatelly after
15131 create_process calls and use it on the call to error.
15132
15133 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
15134
15135 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
15136
15137 2007-08-23 Joel Brobecker <brobecker@adacore.com>
15138
15139 * configure.ac: Switch license to GPLv3.
15140
15141 2007-08-01 Michael Snyder <msnyder@access-company.com>
15142
15143 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
15144
15145 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
15146
15147 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
15148 typedef.
15149 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
15150 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
15151 CloseToolhelp32Snapshot.
15152 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
15153 CloseToolhelp32Snapshot.
15154
15155 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
15156
15157 * server.c (main): Check for inferior exit before main loop.
15158
15159 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
15160
15161 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
15162 instead of on tmp_desc.
15163
15164 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
15165 Daniel Jacobowitz <dan@codesourcery.com>
15166
15167 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
15168 (add_thread): Minor cleanups.
15169 (clear_inferiors): Move lower in the file. Clear the DLL
15170 list.
15171 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
15172 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
15173 (xml_escape_text): New.
15174 * server.c (handle_query): Handle qXfer:libraries:read. Report it
15175 for qSupported.
15176 (handle_v_cont): Report errors.
15177 (gdbserver_version): Update.
15178 (main): Correct size of own_buf. Do not report initial DLL events.
15179 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
15180 (unloaded_dll, xml_escape_text): New.
15181 * win32-low.c (enum target_waitkind): Update comments.
15182 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
15183 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
15184 (win32_EnumProcessModules, win32_GetModuleInformation)
15185 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
15186 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
15187 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
15188 (win32_Module32First, win32_Module32Next, load_toolhelp)
15189 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
15190 (get_child_debug_event): Handle DLL events.
15191 (win32_wait): Likewise.
15192
15193 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
15194
15195 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
15196 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
15197
15198 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
15199
15200 * win32-low.c (handle_output_debug_string): Ignore event if not
15201 waiting.
15202
15203 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
15204
15205 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
15206
15207 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
15208
15209 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
15210
15211 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
15212
15213 * inferiors.c (change_inferior_id): Add comment.
15214 * linux-low.c (check_removed_breakpoint): Add an early
15215 prototype. Improve debug output.
15216 (linux_attach): Doc update.
15217 (linux_detach_one_process, linux_detach): Clean up before releasing
15218 each process.
15219 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
15220 * linux-low.h (struct process_info): Doc improvement.
15221 * mem-break.c (delete_all_breakpoints): New.
15222 * mem-break.h (delete_all_breakpoints): New prototype.
15223 * thread-db.c (find_first_thread): New.
15224 (thread_db_create_event): Call it instead of
15225 thread_db_find_new_threads. Clean up unused variables.
15226 (maybe_attach_thread): Remove first thread handling.
15227 (thread_db_find_new_threads): Use find_first_thread.
15228 (thread_db_get_tls_address): Likewise.
15229
15230 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
15231
15232 * thread-db.c (thread_db_find_new_threads): Add prototype.
15233 (thread_db_create_event): Check for the main thread before adding
15234 a new thread.
15235 (maybe_attach_thread): Only enable event reporting if TID == 0.
15236 (thread_db_get_tls_address): Check for new threads.
15237
15238 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
15239
15240 * linux-low.c (linux_create_inferior): Try execv before execvp.
15241 * spu-low.c (spu_create_inferior): Likewise.
15242
15243 2007-06-13 Mike Frysinger <vapier@gentoo.org>
15244
15245 * linux-low.c (linux_create_inferior): Change execv to execvp.
15246 * spu-low.c (spu_create_inferior): Likewies.
15247
15248 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
15249
15250 * Makefile.in (clean): Clean new files instead of deleted ones.
15251 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
15252 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
15253 rules.
15254 * configure.srv: Specify XML files and new regformats for MIPS and
15255 MIPS64 GNU/Linux.
15256 * linux-mips-low.c (mips_num_regs): Set to only used registers.
15257 (mips_regmap): Do not fetch $0. Remove unused registers. Add
15258 an entry for the restart register.
15259 (mips_cannot_fetch_register, mips_cannot_store_register)
15260 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
15261 register names to match the XML descriptions.
15262 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
15263 restart register instead of $0.
15264
15265 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
15266 Markus Deuling <deuling@de.ibm.com>
15267
15268 * remote-utils.c (decode_xfer_write): New function.
15269 * server.h (decode_xfer_write): Add prototype.
15270 * server.c (handle_query): Add PACKET_LEN argument. Support
15271 qXfer:spu:read and qXfer:spu:write packets.
15272 (main): Pass packet_len to handle_query.
15273 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
15274 * target.h (target_ops): Add qxfer_spu.
15275
15276 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
15277
15278 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
15279 accessing non-seekable spufs files.
15280
15281 2007-05-16 Markus Deuling <deuling@de.ibm.com>
15282
15283 * server.c (handle_query): Add reply for qC packet.
15284
15285 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15286 Leo Zayas <lerele@champenstudios@com>
15287
15288 * server.h (check_remote_input_interrupt_request): New function.
15289 * remote_utils.c (INVALID_DESCRIPTOR): New define.
15290 (remote_desc): Initialize with INVALID_DESCRIPTOR.
15291 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
15292 (check_remote_input_interrupt_request): New function.
15293 * server.h (check_remote_input_interrupt_request): Declare.
15294 * win32-low.c (winapi_DebugBreakProcess,
15295 winapi_GenerateConsoleCtrlEvent): New typedefs.
15296 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
15297 to 250 ms.
15298 (win32_wait): Check for remote interrupt request
15299 with check_remote_input_interrupt_request.
15300 (win32_request_interrupt): New function.
15301 (win32_target_op): Set request_interrupt to win32_request_interrupt.
15302
15303 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15304
15305 * win32-low.c (debug_registers_changed,
15306 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
15307 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
15308 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
15309 (thread_rec): Get context using the low target.
15310 (child_add_thread): Call thread_added on the low target,
15311 which does the same thing.
15312 (regptr): Delete.
15313 (do_initial_child_stuff): Remove debug registers references.
15314 Set context using the low target. Resume threads after
15315 setting the contexts.
15316 (child_continue): Remove dead variable. Remove debug
15317 registers references.
15318 (child_fetch_inferior_registers): Go through the low target.
15319 (do_child_store_inferior_registers): Remove.
15320 (child_store_inferior_registers): Go through the low target.
15321 (win32_resume): Remove debug registers references.
15322 Set context using the low target.
15323 (handle_exception): Change return type to void. Don't record
15324 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
15325 first chance exception.
15326 (get_child_debug_event): Change return type to void. Remove
15327 goto loop. Always return after waiting for debug event.
15328 (win32_wait): Convert to switch statement. Handle spurious
15329 events.
15330
15331 * win32-i386-low.c (debug_registers_changed,
15332 debug_registers_used): New.
15333 (initial_stuff): Rename to ...
15334 (i386_initial_stuff): ... this. Clear debug registers
15335 state variables.
15336 (store_debug_registers): Delete.
15337 (i386_get_thread_context): New.
15338 (load_debug_registers): Delete.
15339 (i386_set_thread_context): New.
15340 (i386_thread_added): New.
15341 (single_step): Rename to ...
15342 (i386_single_step): ... this.
15343 (do_fetch_inferior_registers): Rename to ...
15344 (i386_fetch_inferior_register): ... this.
15345 (i386_store_inferior_register): New.
15346 (the_low_target): Adapt to new interface.
15347
15348 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
15349 (arm_get_thread_context): New.
15350 (arm_set_thread_context): New.
15351 (regptr): New.
15352 (do_fetch_inferior_registers): Rename to ...
15353 (arm_fetch_inferior_register): ... this.
15354 (arm_store_inferior_register): New.
15355 (arm_wince_breakpoint): Reimplement as unsigned long.
15356 (arm_wince_breakpoint_len): Define.
15357 (the_low_target): Adapt to new interface.
15358
15359 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
15360 load_debug_registers. Add get_thread_context, set_thread_context,
15361 thread_added and store_inferior_register. Rename
15362 fetch_inferior_registers to fetch_inferior_register.
15363 (regptr): Remove declaration.
15364
15365 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15366
15367 * linux-low.c (linux_detach): Change return type to int. Return 0.
15368 * spu-low.c (spu_detach): Likewise.
15369
15370 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15371
15372 * target.h (target_ops): Change return type of detach to int.
15373 Add join.
15374 (join_inferior): New.
15375 * server.c (main): Don't skip detach support on mingw32.
15376 If the inferior doesn't support detaching return error.
15377 Call join_inferior instead of using waitpid.
15378 * linux-low.c (linux_join): New.
15379 (linux_target_op): Add linux_join.
15380 * spu-low.c (spu_join): New.
15381 (spu_target_ops): Add spu_join.
15382 * win32-low.c (win32_detach): Adapt to new interface.
15383 Reopen current_process_handle before detaching. Issue a child
15384 resume before detaching.
15385 (win32_join): New.
15386 (win32_target_op): Add win32_join.
15387
15388 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15389
15390 * win32-low.c (win32-attach): Fix return value.
15391 * target.h (target_ops): Describe ATTACH return values.
15392
15393 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15394
15395 * win32-low.c (GETPROCADDRESS): Define.
15396 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
15397 (winapi_DebugSetProcessKillOnExit): Likewise.
15398 (win32_create_inferior): Force usage of ansi CreateProcessA.
15399 (win32_attach): Use GETPROCADDRESS.
15400 (win32_detach): Likewise.
15401
15402 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15403
15404 * win32-low.c (win32_wait): Don't use WSTOPSIG.
15405
15406 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
15407
15408 * win32-low.c: Commit leftover changes from 2007-03-29.
15409
15410 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
15411
15412 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
15413 fields short instead of int. Add explicit padding.
15414 (i387_cache_to_fsave): Remove unnecessary casts.
15415 (i387_fsave_to_cache): Doc fix.
15416 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
15417
15418 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
15419
15420 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
15421 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
15422
15423 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
15424
15425 * configure.srv (arm*-*-mingw32ce*): Move near the other
15426 arm targets.
15427
15428 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
15429
15430 * configure.ac: Add errno checking.
15431 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
15432 sys/file.h and malloc.h.
15433 (AC_CHECK_DECLS): Add perror.
15434 (srv_mingwce): Handle.
15435 * configure.srv (i[34567]86-*-cygwin*): Add
15436 win32-i386-low.o to srv_tgtobj.
15437 (i[34567]86-*-mingw*): Likewise.
15438 (arm*-*-mingw32ce*): Add case.
15439 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
15440 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
15441 [__MINGW32CE__] (strerror): New function.
15442 [__MINGW32CE__] (errno): Define to GetLastError.
15443 [__MINGW32CE__] (COUNTOF): New macro.
15444 (remote_open): Remove extra close call.
15445 * mem-break.c (delete_breakpoint_at): New function.
15446 * mem-break.h (delete_breakpoint_at): Declare.
15447 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
15448 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
15449 [USE_WIN32API] (read, write): Add char* casts.
15450 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
15451 * server.h: Include wincecompat.h on Windows CE.
15452 [HAVE_ERRNO_H]: Check.
15453 (perror): Declare if not declared.
15454 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
15455 (perror_with_name): Remove errno declaration.
15456 * wincecompat.h: New.
15457 * wincecompat.c: New.
15458 * win32-low.h: New.
15459 * win32-arm-low.c: New.
15460 * win32-i386-low.c: New.
15461 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
15462 (OUTMSG2): Make it safe.
15463 (_T): New macro.
15464 (COUNTOF): New macro.
15465 (NUM_REGS): Get it from the low target.
15466 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
15467 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
15468 (thread_rec): Let low target handle debug registers.
15469 (child_add_thread): Likewise.
15470 (child_init_thread_list): Likewise.
15471 (continue_one_thread): Likewise.
15472 (regptr): New.
15473 (do_child_fetch_inferior_registers): Move to ...
15474 * win32-i386-low.c: ... here, and rename to ...
15475 (do_fetch_inferior_registers): ... this.
15476 * win32-low.c (child_fetch_inferior_registers):
15477 Go through the low target.
15478 (do_child_store_inferior_registers): Use regptr.
15479 (strwinerror): New function.
15480 (win32_create_inferior): Handle Windows CE.
15481 Use strwinerror instead of strerror on Windows error
15482 codes. Add program to the error output.
15483 Don't close the main thread handle on Windows CE.
15484 (win32_attach): Use coredll.dll on Windows CE.
15485 (win32_kill): Close current process and current
15486 thread handles.
15487 (win32_detach): Use coredll.dll on Windows CE.
15488 (win32_resume): Let low target handle debug registers, and
15489 step request.
15490 (handle_exception): Add/Remove initial breakpoint. Avoid
15491 non-existant WSTOPSIG on Windows CE.
15492 (win32_read_inferior_memory): Cast to remove warning.
15493 (win32_arch_string): Go through the low target.
15494 (initialize_low): Call set_breakpoint_data with the low
15495 target's breakpoint.
15496 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
15497 FOP_REGNUM, mappings): Move to ...
15498 * win32-i386-low.c: ... here.
15499 * win32-low.c (win32_thread_info): Move to ...
15500 * win32-low.h: ... here.
15501 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
15502 win32-arm-low.c and wincecompat.c.
15503 (all:): Add $EXEEXT.
15504 (install-only:): Likewise.
15505 (gdbserver:): Likewise.
15506 (gdbreplay:): Likewise.
15507 * config.in: Regenerate.
15508 * configure: Regenerate.
15509
15510 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
15511
15512 * win32-low.c: Rename typedef thread_info to
15513 win32_thread_info throughout.
15514
15515 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
15516
15517 * win32-i386-low.c: Rename to ...
15518 * win32-low.c: ... this.
15519 * configure.srv: Replace win32-i386-low.o with win32-low.o.
15520 * Makefile.in: Likewise.
15521
15522 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
15523
15524 * remote-utils.c (monitor_output): Constify msg parameter.
15525 * server.h (monitor_output): Likewise.
15526 * win32-i386-low.c (handle_output_debug_string): New.
15527 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
15528 handle_output_debug_string.
15529 (get_child_debug_event): Likewise.
15530
15531 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
15532
15533 * server.c (main): Correct strtoul check.
15534
15535 2007-03-27 Jon Ringle <jon@ringle.org>
15536
15537 * linux-low.c: Check __ARCH_HAS_MMU__ also.
15538
15539 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
15540
15541 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
15542
15543 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
15544
15545 * terminal.h: Check HAVE_SGTTY_H.
15546
15547 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
15548
15549 * remote-utils.c (remote_open): Print out the assigned port number.
15550
15551 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
15552
15553 * remote-utils.c (monitor_output): New function.
15554 * server.c (debug_threads): Define here.
15555 (monitor_show_help): New function.
15556 (handle_query): Handle qRcmd.
15557 (main): Do not handle 'd' packet.
15558 * server.h (debug_threads, remote_debug, monitor_output): Declare.
15559 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
15560 of debug_threads.
15561
15562 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
15563
15564 * Makefile.in (EXEEXT): New.
15565 (clean): Use $(EXEEXT).
15566
15567 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
15568
15569 * target.h (target_ops): Rename send_signal to request_interrupt,
15570 and remove enum target_signal parameter.
15571 * linux-low.c (linux_request_interrupt): Rename from
15572 linux_send_signal, and always send SIGINT.
15573 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
15574 and always send SIGINT.
15575 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
15576 of send_signal.
15577 (input_interrupt): Likewise.
15578
15579 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
15580
15581 * server.c (get_features_xml): Check if target implemented
15582 arch_string.
15583 * win32-i386-low.c (win32_arch_string): New.
15584 (win32_target_ops): Add win32_arch_string as arch_string member.
15585
15586 2007-02-22 Markus Deuling <deuling@de.ibm.com>
15587
15588 * spu-low.c (spu_arch_string): New.
15589 (spu_target_ops): Add spu_arch_string.
15590
15591 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
15592
15593 * remote-utils.c: Remove HAVE_TERMINAL_H check.
15594 * configure.ac: Do not check for terminal.h.
15595 * configure, config.in: Regenerated.
15596
15597 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
15598
15599 * Makefile.in (OBS): Add $(XML_BUILTIN).
15600 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
15601 (clean): Update.
15602 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
15603 (arm-with-iwmmxt.c): New.
15604 * config.in, configure: Regenerate.
15605 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
15606 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
15607 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
15608 (arm*-*-linux*): Add iWMMXt and regset support.
15609 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
15610 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
15611 (arm_store_wmmxregset, target_regsets): New.
15612 * server.c (get_features_xml): Take annex argument. Check builtin
15613 XML documents.
15614 (handle_query): Handle multiple annexes.
15615
15616 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
15617
15618 * remote-utils.c [USE_WIN32API] (read, write): Define.
15619 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
15620 write.
15621
15622 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
15623
15624 * linux-i386-low.c (the_low_target): Set arch_string.
15625 * linux-x86-64-low.c (the_low_target): Likewise.
15626 * linux-low.c (linux_arch_string): New.
15627 (linux_target_ops): Add it.
15628 * linux-low.h (struct linux_target_ops): Add arch_string.
15629 * server.c (write_qxfer_response): Use const void * for DATA.
15630 (get_features_xml): New.
15631 (handle_query): Handle qXfer:features:read. Report it for qSupported.
15632 * target.h (struct target_ops): Add arch_string method.
15633
15634 2007-01-03 Denis Pilat <denis.pilat@st.com>
15635 Daniel Jacobowitz <dan@codesourcery.com>
15636
15637 * linux-low.c (linux_kill): Handle being called with no threads.
15638 * win32-i386-low.c (win32_kill): Likewise.
15639 (get_child_debug_event): Clear current_process_handle.
15640
15641 2006-12-30 Denis PILAT <denis.pilat@st.com>
15642 Daniel Jacobowitz <dan@codesourcery.com>
15643
15644 * remote-utils.c (remote_open): Check the type of specified
15645 serial port devices before opening them.
15646 * server.c (main): Kill the inferior if an error occurs during
15647 the first remote_open.
15648
15649 2006-12-05 Markus Deuling <deuling@de.ibm.com>
15650
15651 * README: Update supported targets.
15652
15653 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
15654
15655 * Makefile.in (clean): Remove reg-mips64.c.
15656 (reg-mips64.c, reg-mips64.o): New rules.
15657 * configure.srv: Handle mips64. Include regset support for mips.
15658 * linux-mips-low.c (union mips_register): New.
15659 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
15660 (mips_breakpoint, mips_breakpoint_at): Use int.
15661 (mips_collect_register, mips_supply_register)
15662 (mips_collect_register_32bit, mips_supply_register_32bit)
15663 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
15664 (mips_store_fpregset, target_regsets): New.
15665 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
15666
15667 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
15668
15669 * configure.srv: Add target "spu*-*-*".
15670 * Makefile.in (clean): Remove reg-spu.c.
15671 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
15672 * spu-low.c: New file.
15673
15674 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
15675
15676 * configure.ac: Correct td_thr_tls_get_addr test.
15677 * configure: Regenerated.
15678
15679 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
15680
15681 * linux-low.c (linux_wait_for_event): Reformat. Use the
15682 pass_signals array.
15683 * remote-utils.c (decode_address_to_semicolon): New.
15684 * server.c (pass_signals, handle_general_set): New.
15685 (handle_query): Mention QPassSignals for qSupported.
15686 (main): Call handle_general_set.
15687 * server.h (pass_signals, decode_address_to_semicolon): New.
15688
15689 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
15690
15691 * server.c (handle_query): Correct error handling for read_auxv.
15692
15693 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
15694
15695 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
15696 and srv_linux_thread_db to yes.
15697 * linux-s390-low.c (s390_fill_gregset): New function.
15698 (target_regsets): Define data structure.
15699
15700 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
15701
15702 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
15703 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
15704 * config.in, configure: Regenerated.
15705 * inferiors.c (gdb_id_to_thread): New function.
15706 (gdb_id_to_thread_id): Use it.
15707 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
15708 * linux-low.h (struct process_info): Add th member.
15709 (thread_db_get_tls_address): New prototype.
15710 * remote-utils.c (decode_address): Make non-static.
15711 * server.c (handle_query): Handle qGetTLSAddr.
15712 * server.h (gdb_id_to_thread, decode_address): New prototypes.
15713 * target.h (struct target_ops): Add get_tls_address.
15714 * thread-db.c (maybe_attach_thread): Save the thread handle.
15715 (thread_db_get_tls_address): New.
15716
15717 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
15718
15719 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
15720 (linux_resume_one_process): Take a siginfo_t *. Update all
15721 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
15722 (struct pending_signals): Add a siginfo_t.
15723 (linux_wait_for_process): Always set last_status.
15724 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
15725 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
15726 * linux-low.h (struct process_info): Add last_status.
15727
15728 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
15729
15730 * remote-utils.c (try_rle): New function.
15731 (putpkt_binary): Use it.
15732
15733 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
15734
15735 * Makefile.in (clean): Clean reg-x86-64-linux.c.
15736 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
15737 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
15738 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
15739 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
15740 point registers.
15741
15742 2006-08-08 Richard Sandiford <richard@codesourcery.com>
15743
15744 * server.c (terminal_fd): New variable.
15745 (old_foreground_pgrp): Likewise.
15746 (restore_old_foreground_pgrp): New function.
15747 (start_inferior): Record the terminal file descriptor in terminal_fd
15748 and its original foreground group in old_foreground_pgrp. Register
15749 restore_old_foreground_pgrp with atexit().
15750
15751 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
15752
15753 * server.c (handle_query): Correct qPart to qXfer.
15754
15755 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
15756
15757 * configure.ac: Check for more headers which are missing on
15758 Windows. Automatically supply -lwsock32 and USE_WIN32API.
15759 * configure.srv: Add Cygwin and mingw32.
15760 * remote-utils.c: Don't include headers unconditionally which
15761 are missing on mingw32. Include <winsock.h> for mingw32.
15762 (remote_open): Adjust for mingw32 support. Flush
15763 standard error after writing to it.
15764 (remote_close, putpkt_binary, input_interrupt, block_async_io)
15765 (unblock_async_io, enable_async_io, disable_async_io)
15766 (readchar, getpkt): Update for Winsock support.
15767 (prepare_resume_reply): Expect a protocol signal number.
15768 * server.c: Disable <sys/wait.h> on mingw32.
15769 (start_inferior): Adjust for mingw32 support. Flush
15770 standard error after writing to it.
15771 (attach_inferior): Likewise. Use protocol signal
15772 numbers.
15773 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
15774 and names.
15775 * win32-i386-low.c: New file.
15776 * Makefile.in (XM_CLIBS): Set.
15777 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
15778 (win32-i386-low.o): New dependency rule.
15779 * linux-low.c (linux_wait): Use target signal numbers.
15780 * target.h (struct target_ops): Doc fix.
15781 * server.h (target_signal_to_name): New prototype.
15782 * gdbreplay.c: Don't include headers unconditionally which
15783 are missing on mingw32. Include <winsock.h> for mingw32.
15784 (remote_close, remote_open): Adjust for Winsock support.
15785 * configure, config.in: Regenerated.
15786
15787 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
15788
15789 * server.c (decode_xfer_read, write_qxfer_response): New.
15790 (handle_query): Take a packet length argument. Handle
15791 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
15792 the qSupported response.
15793 (main): Update call to handle_query.
15794
15795 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
15796
15797 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
15798 (putpkt_binary): Renamed from putpkt and adjusted for binary
15799 data.
15800 (putpkt): New wrapper for putpkt_binary.
15801 (readchar): Don't mask off the high bit.
15802 (decode_X_packet): New function.
15803 * server.c (main): Call putpkt_binary if a handler sets the packet
15804 length. Save the length of the incoming packet. Handle 'X'.
15805 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
15806
15807 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
15808
15809 * server.c (handle_query): Handle qSupported.
15810
15811 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
15812
15813 * remote-utils.c (all_symbols_looked_up): New variable.
15814 (look_up_one_symbol): Check it.
15815 * server.h (look_up_one_symbol): New declaration.
15816 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
15817
15818 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
15819
15820 * Makefile.in (linux-arm-low.o): Update dependencies.
15821 * linux-arm-low.c: Include "gdb_proc_service.h".
15822 (PTRACE_GET_THREAD_AREA): Define.
15823 (ps_get_thread_area): New function.
15824
15825 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
15826
15827 * configure.srv (m68k*-*-uclinux*): New target.
15828 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
15829 (linux_resume_one_process): Remove extraneous cast.
15830 (linux_read_offsets): New.
15831 (linux_target_op): Add linux_read_offsets on mmuless systems.
15832 * server.c (handle_query): Add qOffsets logic.
15833 * target.h (struct target_ops): Add read_offsets.
15834
15835 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
15836
15837 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
15838 (PTRACE_GET_THREAD_AREA): Define.
15839 (ps_get_thread_area): New function.
15840 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
15841 (linux-x86-64-low.o): Update.
15842
15843 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
15844
15845 * configure.ac: Remove checks for prfpregset_t.
15846 * gdb_proc_service.h: New file.
15847 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
15848 new "gdb_proc_service.h".
15849 * proc-service.c: Likewise.
15850 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
15851 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
15852 * Makefile.in (gdb_proc_service_h): Updated.
15853 * configure, config.in: Regenerated.
15854
15855 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
15856
15857 * remote-utils.c (prepare_resume_reply): Move declaration
15858 of gdb_id_from_wait to the top of the block.
15859
15860 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
15861
15862 * linux-low.c (regsets_store_inferior_registers): Read the regset
15863 from the target before filling it.
15864
15865 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
15866
15867 * server.c (attach_inferior): Return SIGTRAP for a successful
15868 attach.
15869
15870 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
15871
15872 * Makefile.in (OBS): Add version.o.
15873 (STAGESTUFF): Delete.
15874 (version.o): Add dependencies.
15875 (version.c): Replace rule.
15876 (clean): Remove version.c.
15877 * server.c (gdbserver_version): New.
15878 (gdbserver_usage): Use printf.
15879 (main): Handle --version and --help.
15880 * server.h (version, host_name): Add declarations.
15881
15882 2005-12-23 Eli Zaretskii <eliz@gnu.org>
15883
15884 * linux-arm-low.c:
15885 * linux-arm-low.c:
15886 * inferiors.c:
15887 * i387-fp.h:
15888 * i387-fp.c:
15889 * gdbreplay.c:
15890 * regcache.c:
15891 * proc-service.c:
15892 * mem-break.h:
15893 * mem-break.c:
15894 * linux-x86-64-low.c:
15895 * linux-sh-low.c:
15896 * linux-s390-low.c:
15897 * linux-ppc64-low.c:
15898 * linux-ppc-low.c:
15899 * linux-mips-low.c:
15900 * linux-m68k-low.c:
15901 * linux-m32r-low.c:
15902 * linux-low.h:
15903 * linux-low.c:
15904 * linux-ia64-low.c:
15905 * linux-i386-low.c:
15906 * linux-crisv32-low.c:
15907 * thread-db.c:
15908 * terminal.h:
15909 * target.h:
15910 * target.c:
15911 * server.h:
15912 * server.c:
15913 * remote-utils.c:
15914 * regcache.h:
15915 * utils.c:
15916 * Makefile.in:
15917 * configure.ac:
15918 * gdbserver.1: Add (C) after Copyright. Update the FSF
15919 address.
15920
15921 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
15922
15923 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
15924 (arm_breakpoint_at): Recognize both breakpoints.
15925 (the_low_target): Use the correct breakpoint instruction.
15926
15927 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
15928
15929 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
15930 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
15931 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
15932 (the_low_target): Update.
15933
15934 2005-10-25 Andreas Schwab <schwab@suse.de>
15935
15936 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
15937
15938 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
15939 (ia64_num_regs): Reduce to 462.
15940
15941 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
15942
15943 * acinclude.m4: Correct quoting.
15944 * aclocal.m4: Regenerated.
15945
15946 Suggested by SZOKOVACS Robert <szo@ies.hu>:
15947 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
15948 (thread_db_init): Call thread_db_err_str.
15949 * configure.ac: Check for TD_VERSION.
15950 * config.in, configure: Regenerated.
15951
15952 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15953
15954 * server.h (error, fatal, warning): Add ATTR_FORMAT.
15955
15956 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
15957
15958 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
15959 is not available. Define HAVE_PTRACE_GETREGS if it is.
15960 * config.in, configure: Regenerated.
15961 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
15962 * linux-i386-low.c, linux-m68k-low.c: Update to use
15963 HAVE_PTRACE_GETREGS.
15964 * linux-low.c (regsets_fetch_inferior_registers)
15965 (regsets_store_inferior_registers): Only return 0 if we processed
15966 GENERAL_REGS.
15967 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
15968 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
15969
15970 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
15971
15972 * inferiors.c (struct thread_info): Add gdb_id.
15973 (add_thread): Add gdb_id argument.
15974 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
15975 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
15976 calls to add_thread.
15977 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
15978 * server.c (handle_query): Use thread_to_gdb_id.
15979 (handle_v_cont, main): Use gdb_id_to_thread_id.
15980 * server.h (add_thread): Update prototype.
15981 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
15982 prototypes.
15983
15984 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
15985
15986 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
15987 left-padded registers.
15988 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
15989 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
15990
15991 2005-07-01 Steve Ellcey <sje@cup.hp.com>
15992
15993 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
15994 * configure: Regenerate.
15995 * config.in: Regenerate.
15996 * server.h (NEED_DECLARATION_STRERROR):
15997 Replace with !HAVE_DECL_STRERROR.
15998
15999 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
16000
16001 * linux-low.c (linux_wait, linux_send_signal): Don't test
16002 an unsigned long variable for > 0 if it could be MAX_ULONG.
16003 * server.c (myresume): Likewise.
16004 * target.c (set_desired_inferior): Likewise.
16005
16006 2005-06-13 Mark Kettenis <kettenis@gnu.org>
16007
16008 * configure.ac: Simplify and improve check for socklen_t.
16009 * configure, config.in: Regenerate.
16010
16011 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
16012
16013 * acconfig.h: Remove.
16014 * configure.ac: Add a test for socklen_t. Use three-argument
16015 AC_DEFINE throughout.
16016 * config.in: Regenerated using autoheader 2.59.
16017 * configure: Regenerated.
16018
16019 * gdbreplay.c (socklen_t): Provide a default.
16020 (remote_open): Use socklen_t.
16021 * remote-utils.c (socklen_t): Provide a default.
16022 (remote_open): Use socklen_t.
16023 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
16024 unsigned char.
16025
16026 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
16027 char for buffers.
16028 * linux-low.c (linux_read_memory, linux_write_memory)
16029 (linux_read_auxv): Likewise.
16030 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
16031 (check_mem_write): Likewise.
16032 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
16033 Likewise.
16034 * regcache.c (struct inferior_rgcache_data, registers_to_string)
16035 (registers_from_string, register_data): Likewise.
16036 * server.c (handle_query, main): Likewise.
16037 * server.h (convert_ascii_to_int, convert_int_to_ascii)
16038 (decode_M_packet): Likewise.
16039 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
16040 * target.h (struct target_ops): Update read_memory, write_memory,
16041 and read_auxv.
16042 (read_inferior_memory, write_inferior_memory): Update.
16043 * linux-low.h (struct linux_target_ops): Change type of breakpoint
16044 to unsigned char *.
16045 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
16046 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
16047 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
16048 linux-s390-low.c, linux-sh-low.c: Update for changes in
16049 read_inferior_memory and the_low_target->breakpoint.
16050
16051 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
16052
16053 * Makefile.in (SFILES): Add linux-ppc64-low.c.
16054 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
16055 * configure.srv: Add powerpc64-*-linux*.
16056 * linux-ppc64-low.c: New file.
16057
16058 2005-05-23 Orjan Friberg <orjanf@axis.com>
16059
16060 * linux-cris-low.c: New file with support for CRIS.
16061 * linux-crisv32-low.c: Ditto for CRISv32.
16062 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
16063 (clean): Add reg-cris.c and reg-crisv32.c.
16064 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
16065 reg-crisv32.o, and reg-crisv32.c to make rules.
16066 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
16067 recognized targets.
16068
16069 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
16070
16071 * linux-low.c (fetch_register): Ensure buffer size is a multiple
16072 of sizeof (PTRACE_XFER_TYPE).
16073 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
16074
16075 2005-05-12 Orjan Friberg <orjanf@axis.com>
16076
16077 * target.h (struct target_ops): Add insert_watchpoint,
16078 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
16079 pointers for hardware watchpoint support.
16080 * linux-low.h (struct linux_target_ops): Ditto.
16081 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
16082 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
16083 to linux_target_ops.
16084 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
16085 reply packet.
16086 * server.c (main): Recognize 'Z' and 'z' packets.
16087
16088 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
16089
16090 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
16091 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
16092 (the_low_target): Add new members.
16093
16094 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
16095
16096 * proc-service.c (ps_lgetregs): Search all_processes instead of
16097 all_threads.
16098
16099 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
16100
16101 * server.c (start_inferior): Change return type to int.
16102 (attach_inferior): Change sigptr to int *.
16103 (handle_v_cont, handle_v_requests): Change signal to int *.
16104 (main): Change signal to int.
16105
16106 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
16107
16108 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
16109 * configure.srv: Add m32r*-*-linux*.
16110 * linux-m32r-low.c: New file.
16111
16112 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
16113
16114 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
16115
16116 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
16117
16118 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
16119 Take unsigned long arguments for PIDs.
16120 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
16121 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
16122 (wait_for_sigstop, linux_resume_one_process)
16123 (regsets_fetch_inferior_registers, linux_send_signal)
16124 (linux_read_auxv): Likewise. Update the types of variables holding
16125 PIDs. Update format string specifiers.
16126 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
16127 * remote-utils.c (prepare_resume_reply): Likewise.
16128 * server.c (cont_thread, general_thread, step_thread)
16129 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
16130 unsigned long.
16131 (handle_query): Update format specifiers.
16132 (handle_v_cont, main): Use strtoul for thread IDs.
16133 * server.h (struct inferior_list_entry): Use unsigned long for ID.
16134 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
16135 (general_thread, step_thread, thread_from_wait)
16136 (old_thread_from_wait): Update.
16137 * target.h (struct thread_resume): Use unsigned long for THREAD.
16138 (struct target_ops): Use unsigned long for arguments to attach and
16139 thread_alive.
16140
16141 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
16142
16143 * acinclude.m4: Include bfd/bfd.m4 directly.
16144 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
16145 <agriffis@toolchain.org>.
16146 * aclocal.m4, configure: Regenerated.
16147
16148 2005-01-07 Andrew Cagney <cagney@gnu.org>
16149
16150 * configure.ac: Rename configure.in, require autoconf 2.59.
16151 * configure: Re-generate.
16152
16153 2004-12-08 Daniel Jacobowitz <dan@debian.org>
16154
16155 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
16156 LIBS when finished.
16157 * aclocal.m4: Regenerated.
16158 * configure: Regenerated.
16159
16160 2004-11-21 Andreas Schwab <schwab@suse.de>
16161
16162 * linux-m68k-low.c (m68k_num_gregs): Define.
16163 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
16164 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
16165 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
16166 (m68k_breakpoint_at): New. Add to the_low_target.
16167
16168 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
16169 srv_linux_thread_db to yes.
16170
16171 2004-10-20 Joel Brobecker <brobecker@gnat.com>
16172
16173 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
16174 (ARCH_SET_FS): Likewise.
16175 (ARCH_GET_FS): Likewise.
16176 (ARCH_GET_GS): Likewise.
16177
16178 2004-10-16 Daniel Jacobowitz <dan@debian.org>
16179
16180 * linux-i386-low.c (ps_get_thread_area): New.
16181 * linux-x86-64-low.c (ps_get_thread_area): New.
16182 * linux-low.c: Include <sys/syscall.h>.
16183 (linux_kill_one_process): Don't kill the first thread here.
16184 (linux_kill): Kill the first thread here.
16185 (kill_lwp): New function.
16186 (send_sigstop, linux_send_signal): Use it.
16187 * proc-service.c: Clean up #ifdefs.
16188 (fpregset_info): Delete.
16189 (ps_lgetregs): Update and enable implementation.
16190 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
16191 implementations.
16192 * remote-utils.c (struct sym_cache, symbol_cache): New.
16193 (input_interrupt): Print a clearer message.
16194 (async_io_enabled): New variable.
16195 (enable_async_io, disable_async_io): Use it. Update comments.
16196 (look_up_one_symbol): Use the symbol cache.
16197 * thread-db.c (thread_db_look_up_symbols): New function.
16198 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
16199
16200 2004-10-16 Daniel Jacobowitz <dan@debian.org>
16201
16202 * configure.in: Test for -rdynamic.
16203 * configure: Regenerated.
16204 * Makefile (INTERNAL_LDFLAGS): New.
16205 (gdbserver, gdbreplay): Use it.
16206
16207 2004-09-02 Andrew Cagney <cagney@gnu.org>
16208
16209 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
16210
16211 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
16212
16213 * linux-low.c (linux_wait): Clear all_processes list also.
16214
16215 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
16216
16217 * linux-low.c: Include <errno.h>. Remove extern declaration of
16218 errno.
16219
16220 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
16221
16222 * gdbreplay.c, server.h, utils.c: Update copyright years.
16223
16224 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
16225
16226 * server.c (main): Print child status or termination signal from
16227 variable 'signal', not 'sig'.
16228
16229 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
16230
16231 * linux-low.c (linux_read_memory): Change return type to
16232 int. Check for and return error from ptrace().
16233 * target.c (read_inferior_memory): Change return type to int. Pass
16234 back return status from the_target->read_memory().
16235 * target.h (struct target_ops): Adapt *read_memory() prototype.
16236 Update comment.
16237 (read_inferior_memory): Adapt prototype.
16238 * server.c (main): Return an error packet if
16239 read_inferior_memory() returns an error.
16240
16241 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
16242
16243 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
16244 Unify with other clean targets.
16245
16246 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
16247
16248 * server.c (handle_v_cont): Call set_desired_inferior.
16249
16250 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
16251
16252 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
16253
16254 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
16255
16256 * linux-low.c (linux_wait): Unblock async I/O.
16257 (linux_resume): Block and enable async I/O.
16258 * remote-utils.c (block_async_io, unblock_async_io): New functions.
16259 * server.h (block_async_io, unblock_async_io): Add prototypes.
16260
16261 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
16262
16263 * remote-utils.c (remote_open): Print a status notice after
16264 opening a TCP port.
16265 * server.c (attach_inferior): Print a status notice after
16266 attaching.
16267
16268 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
16269
16270 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
16271
16272 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
16273
16274 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
16275 error packet.
16276 * server.c, target.h: Update copyright years.
16277
16278 2004-02-25 Roland McGrath <roland@redhat.com>
16279
16280 * target.h (struct target_ops): New member `read_auxv'.
16281 * server.c (handle_query): Handle qPart:auxv:read: query using that.
16282 * linux-low.c (linux_read_auxv): New function.
16283 (linux_target_ops): Initialize `read_auxv' member to that.
16284
16285 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
16286
16287 Committed by Jim Blandy <jimb@redhat.com>.
16288
16289 * linux-s390-low.c (s390_num_regs): Update.
16290 (s390_regmap): Remove control registers. Use __s390x__ predefine
16291 instead of GPR_SIZE to distiguish s390 and s390x targets.
16292
16293 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
16294
16295 * linux-low.c: Update copyright year.
16296 (check_removed_breakpoint): Clear pending_is_breakpoint.
16297 (linux_set_resume_request, linux_queue_one_thread)
16298 (resume_status_pending_p): New functions.
16299 (linux_continue_one_thread): Use process->resume.
16300 (linux_resume): Only resume threads if there are no pending events.
16301 * linux-low.h (struct process_info): Add resume request
16302 pointer.
16303
16304 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
16305
16306 * regcache.c (new_register_cache): Clear the allocated register
16307 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
16308
16309 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
16310
16311 * linux-low.c (linux_resume): Take a struct thread_resume *
16312 argument.
16313 (linux_wait): Update call.
16314 (resume_ptr): New static variable.
16315 (linux_continue_one_thread): Renamed from
16316 linux_continue_one_process. Use resume_ptr.
16317 (linux_resume): Use linux_continue_one_thread.
16318 * server.c (handle_v_cont, handle_v_requests): New functions.
16319 (myresume): New function.
16320 (main): Handle 'v' case.
16321 * target.h (struct thread_resume): New type.
16322 (struct target_ops): Change argument of "resume" to struct
16323 thread_resume *.
16324 (myresume): Delete macro.
16325
16326 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
16327
16328 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
16329 (uninstall): Support DESTDIR.
16330
16331 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
16332
16333 * configure.srv: Add xscale*linux copy of arm*linux entry.
16334
16335 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
16336
16337 * linux-arm-low.c (arm_reinsert_addr): New function.
16338 (the_low_target): Add arm_reinsert_addr.
16339
16340 2003-07-08 Mark Kettenis <kettenis@gnu.org>
16341
16342 * mem-break.c: Remove whitespace at end of file.
16343
16344 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
16345
16346 * configure.in: Check whether we need to prototype strerror.
16347 * server.h: Optionally prototype strerror.
16348 * gdbreplay.c (perror_with_name): Use strerror.
16349 * linux-low.c (linux_attach_lwp): Use strerror.
16350 * utils.c (perror_with_name): Use strerror.
16351 * config.in, configure: Regenerated.
16352
16353 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
16354
16355 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
16356 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
16357
16358 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
16359
16360 * Makefile.in (SFILES): Update.
16361 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
16362 low-sun3.c: Remove files.
16363
16364 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
16365
16366 * linux-low.c: Move comment to linux_thread_alive where it belonged.
16367 (linux_detach_one_process, linux_detach): New functions.
16368 (linux_target_ops): Add linux_detach.
16369 * server.c (main): Handle 'D' packet.
16370 * target.h (struct target_ops): Add "detach" member.
16371 (detach_inferior): Define.
16372
16373 2003-06-13 Mark Kettenis <kettenis@gnu.org>
16374
16375 From Kelley Cook <kelleycook@wideopenwest.com>:
16376 * configure.srv: Accept i[34567]86 variants.
16377
16378 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
16379
16380 * linux-low.c (linux_wait_for_event): Correct comment typos.
16381 (linux_resume_one_process): Call check_removed_breakpoint.
16382 (linux_send_signal): New function.
16383 (linux_target_ops): Add linux_send_signal.
16384 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
16385 of kill.
16386 * target.h (struct target_ops): Add send_signal.
16387
16388 2003-05-29 Jim Blandy <jimb@redhat.com>
16389
16390 * linux-low.c (usr_store_inferior_registers): Transfer buf in
16391 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
16392 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
16393 away part of the register's value.
16394
16395 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
16396
16397 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
16398 (linux_wait_for_event, linux_init_signals): Likewise.
16399
16400 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
16401
16402 * configure.in: Check for stdlib.h.
16403 * configure: Regenerated.
16404 * config.in: Regenerated.
16405
16406 2003-01-04 Andreas Schwab <schwab@suse.de>
16407
16408 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
16409
16410 2003-01-02 Andrew Cagney <ac131313@redhat.com>
16411
16412 * Makefile.in: Remove obsolete code.
16413
16414 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
16415
16416 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
16417 defined(PT_FPR0_HI).
16418
16419 2002-11-17 Stuart Hughes <seh@zee2.com>
16420
16421 * linux-arm-low.c (arm_num_regs): Increase.
16422 (arm_regmap): Include status register.
16423
16424 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
16425
16426 * linux-low.c (register_addr): Remove incorrect -1 check.
16427
16428 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
16429
16430 * linux-low.c (linux_create_inferior): Call setpgid. Return
16431 the new PID.
16432 (unstopped_p, linux_signal_pid): Remove.
16433 (linux_target_ops): Remove linux_signal_pid.
16434 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
16435 global instead of target method.
16436 * target.h (struct target_ops): Remove signal_pid. Update comment
16437 for create_inferior.
16438 * server.c (signal_pid): New variable.
16439 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
16440 gdbserver. Set the child to be the foreground process group.
16441 (attach_inferior): Set signal_pid.
16442
16443 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
16444
16445 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
16446
16447 2002-08-20 Jim Blandy <jimb@redhat.com>
16448
16449 * Makefile.in (LDFLAGS): Allow the configure script to establish a
16450 default for this.
16451
16452 2002-08-01 Andrew Cagney <cagney@redhat.com>
16453
16454 * Makefile.in: Make chill references obsolete.
16455
16456 2002-07-24 Kevin Buettner <kevinb@redhat.com>
16457
16458 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
16459 * configure: Regenerate.
16460 * config.in: Regenerate.
16461
16462 2002-07-09 David O'Brien <obrien@FreeBSD.org>
16463
16464 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
16465 (perror_with_name, remote_close, remote_open, expect, play): Static.
16466
16467 2002-07-04 Michal Ludvig <mludvig@suse.cz>
16468
16469 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
16470 byte offsets instead of an array of indexes.
16471 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
16472
16473 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
16474
16475 * regcache.c: Add comment.
16476
16477 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
16478
16479 * thread-db.c: New file.
16480 * proc-service.c: New file.
16481 * acinclude.m4: New file.
16482 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
16483 proc-service.o, and thread-db.o.
16484 (linux-low.o): Add USE_THREAD_DB.
16485 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
16486 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
16487 * aclocal.m4: Regenerated.
16488 * config.in: Regenerated.
16489 * configure: Regenerated.
16490 * configure.in: Check for proc_service.h, sys/procfs.h,
16491 thread_db.h, and linux/elf.h headrs.
16492 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
16493 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
16494 Check for -lthread_db and thread support.
16495 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
16496 PowerPC, and SuperH.
16497 * i387-fp.c: Constify arguments.
16498 * i387-fp.h: Likewise.
16499 * inferiors.c: (struct thread_info): Renamed from
16500 `struct inferior_info'. Remove PID member. Use generic inferior
16501 list header. All uses updated.
16502 (inferiors, signal_pid): Removed.
16503 (all_threads): New variable.
16504 (get_thread): Define.
16505 (add_inferior_to_list): New function.
16506 (for_each_inferior): New function.
16507 (change_inferior_id): New function.
16508 (add_inferior): Removed.
16509 (remove_inferior): New function.
16510 (add_thread): New function.
16511 (free_one_thread): New function.
16512 (remove_thread): New function.
16513 (clear_inferiors): Use for_each_inferior and free_one_thread.
16514 (find_inferior): New function.
16515 (find_inferior_id): New function.
16516 (inferior_target_data): Update argument type.
16517 (set_inferior_target_data): Likewise.
16518 (inferior_regcache_data): Likewise.
16519 (set_inferior_regcache_data): Likewise.
16520 * linux-low.c (linux_bp_reinsert): Remove.
16521 (all_processes, stopping_threads, using_thrads)
16522 (struct pending_signals, debug_threads, pid_of): New.
16523 (inferior_pid): Replace with macro.
16524 (struct inferior_linux_data): Remove.
16525 (get_stop_pc, add_process): New functions.
16526 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
16527 Use add_process and add_thread.
16528 (linux_attach_lwp): New function, based on old linux_attach. Use
16529 add_process and add_thread. Set stop_expected for new threads.
16530 (linux_attach): New function.
16531 (linux_kill_one_process): New function.
16532 (linux_kill): Kill all LWPs.
16533 (linux_thread_alive): Use find_inferior_id.
16534 (check_removed_breakpoints, status_pending_p): New functions.
16535 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
16536 Update. Use WNOHANG. Wait for cloned processes also. Update process
16537 struct for the found process.
16538 (linux_wait_for_event): New function.
16539 (linux_wait): Use it. Support LWPs.
16540 (send_sigstop, wait_for_sigstop, stop_all_processes)
16541 (linux_resume_one_process, linux_continue_one_process): New functions.
16542 (linux_resume): Support LWPs.
16543 (REGISTER_RAW_SIZE): Remove.
16544 (fetch_register): Use register_size instead. Call supply_register.
16545 (usr_store_inferior_registers): Likewise. Call collect_register.
16546 Fix recursive case.
16547 (regsets_fetch_inferior_registers): Improve error message.
16548 (regsets_store_inferior_registers): Add debugging.
16549 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
16550 (unstopped_p, linux_signal_pid): New functions.
16551 (linux_target_ops): Add linux_signal_pid.
16552 (linux_init_signals): New function.
16553 (initialize_low): Call it. Initialize using_threads.
16554 * regcache.c (inferior_regcache_data): Add valid
16555 flag.
16556 (get_regcache): Fetch registers lazily. Add fetch argument
16557 and update all callers.
16558 (regcache_invalidate_one, regcache_invalidate): New
16559 functions.
16560 (new_register_cache): Renamed from create_register_cache.
16561 Return the new regcache.
16562 (free_register_cache): Change argument to a void *.
16563 (registers_to_string, registers_from_string): Call get_regcache
16564 with fetch flag set.
16565 (register_data): Make static. Pass fetch flag to get_regcache.
16566 (supply_register): Call get_regcache with fetch flag clear.
16567 (collect_register): Call get_regcache with fetch flag set.
16568 (collect_register_as_string): New function.
16569 * regcache.h: Update.
16570 * remote-utils.c (putpkt): Flush after debug output and use
16571 stderr.
16572 Handle input interrupts while waiting for an ACK.
16573 (input_interrupt): Use signal_pid method.
16574 (getpkt): Flush after debug output and use stderr.
16575 (outreg): Use collect_register_as_string.
16576 (new_thread_notify, dead_thread_notify): New functions.
16577 (prepare_resume_reply): Check using_threads. Set thread_from_wait
16578 and general_thread.
16579 (look_up_one_symbol): Flush after debug output.
16580 * server.c (step_thread, server_waiting): New variables.
16581 (start_inferior): Don't use signal_pid. Update call to mywait.
16582 (attach_inferior): Update call to mywait.
16583 (handle_query): Handle qfThreadInfo and qsThreadInfo.
16584 (main): Don't fetch/store registers explicitly. Use
16585 set_desired_inferior. Support proposed ``Hs'' packet. Update
16586 calls to mywait.
16587 * server.h: Update.
16588 (struct inferior_list, struct_inferior_list_entry): New.
16589 * target.c (set_desired_inferior): New.
16590 (write_inferior_memory): Constify.
16591 (mywait): New function.
16592 * target.h: Update.
16593 (struct target_ops): New signal_pid method.
16594 (mywait): Removed macro, added prototype.
16595
16596 * linux-low.h (regset_func): Removed.
16597 (regset_fill_func, regset_store_func): New.
16598 (enum regset_type): New.
16599 (struct regset_info): Add type field. Use new operation types.
16600 (struct linux_target_ops): stop_pc renamed to get_pc.
16601 Add decr_pc_after_break and breakpoint_at.
16602 (get_process, get_thread_proess, get_process_thread)
16603 (strut process_info, all_processes, linux_attach_lwp)
16604 (thread_db_init): New.
16605
16606 * linux-arm-low.c (arm_get_pc, arm_set_pc,
16607 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
16608 (the_low_target): Add new members.
16609 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
16610 (i386_store_fpxregset): Constify.
16611 (target_regsets): Add new kind identifier.
16612 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
16613 (i386_set_pc): Add debugging.
16614 (i386_breakpoint_at): New function.
16615 (the_low_target): Add new members.
16616 * linux-mips-low.c (mips_get_pc, mips_set_pc)
16617 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
16618 (mips_breakpoint_at): New.
16619 (the_low_target): Add new members.
16620 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
16621 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
16622 (the_low_target): Add new members.
16623 * linux-sh-low.c (sh_get_pc, sh_set_pc)
16624 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
16625 (the_low_target): Add new members.
16626 * linux-x86-64-low.c (target_regsets): Add new kind
16627 identifier.
16628
16629 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
16630
16631 From Martin Pool <mbp@samba.org>:
16632 * server.c (gdbserver_usage): New function.
16633 (main): Call it.
16634
16635 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
16636
16637 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
16638 stop_at -> stop_pc.
16639
16640 2002-05-04 Andrew Cagney <ac131313@redhat.com>
16641
16642 * Makefile.in: Remove obsolete code.
16643
16644 2002-04-24 Michal Ludvig <mludvig@suse.cz>
16645
16646 * linux-low.c (regsets_fetch_inferior_registers),
16647 (regsets_store_inferior_registers): Removed cast to int from
16648 ptrace() calls.
16649 * regcache.h: Added declaration of struct inferior_info.
16650
16651 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
16652
16653 * inferiors.c (struct inferior_info): Add regcache_data.
16654 (add_inferior): Call create_register_cache.
16655 (clear_inferiors): Call free_register_cache.
16656 (inferior_regcache_data, set_inferior_regcache_data): New functions.
16657 * regcache.c (struct inferior_regcache_data): New.
16658 (registers): Remove.
16659 (get_regcache): New function.
16660 (create_register_cache, free_register_cache): New functions.
16661 (set_register_cache): Don't initialize the register cache here.
16662 (registers_to_string, registers_from_string, register_data): Call
16663 get_regcache.
16664 * regcache.h: Add prototypes.
16665 * server.h: Likewise.
16666
16667 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
16668
16669 * mem-break.c: New file.
16670 * mem-break.h: New file.
16671 * Makefile.in: Add mem-break.o rule; update server.h
16672 dependencies.
16673 * inferiors.c (struct inferior_info): Add target_data
16674 member.
16675 (clear_inferiors): Free target_data member if set.
16676 (inferior_target_data, set_inferior_target_data): New functions.
16677 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
16678 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
16679 * linux-low.c (linux_bp_reinsert): New variable.
16680 (struct inferior_linux_data): New.
16681 (linux_create_inferior): Use set_inferior_target_data.
16682 (linux_attach): Likewise. Call add_inferior.
16683 (linux_wait_for_one_inferior): New function.
16684 (linux_wait): Call it.
16685 (linux_write_memory): Add const.
16686 (initialize_low): Call set_breakpoint_data.
16687 * linux-low.h (struct linux_target_ops): Add breakpoint
16688 handling members.
16689 * server.c (attach_inferior): Remove extra add_inferior
16690 call.
16691 * server.h: Include mem-break.h. Update inferior.c
16692 prototypes.
16693 * target.c (read_inferior_memory)
16694 (write_inferior_memory): New functions.
16695 * target.h (read_inferior_memory)
16696 (write_inferior_memory): Change macros to prototypes.
16697 (struct target_ops): Update comments. Add const to write_memory
16698 definition.
16699
16700 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
16701
16702 * linux-low.c (usr_store_inferior_registers): Support
16703 registers which are allowed to fail to store.
16704 * linux-low.h (linux_target_ops): Likewise.
16705 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
16706 (ppc_cannot_store_register): FPSCR may not be storable.
16707
16708 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
16709
16710 * server.h: Include <string.h> if HAVE_STRING_H.
16711 * ChangeLog: Correct paths in last ChangeLog entry.
16712
16713 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
16714
16715 * linux-low.h: Remove obsolete prototypes.
16716 (struct linux_target_ops): New.
16717 (extern the_low_target): New.
16718 * linux-low.c (num_regs, regmap): Remove declarations.
16719 (register_addr): Use the_low_target explicitly.
16720 (fetch_register): Likewise.
16721 (usr_fetch_inferior_registers): Likewise.
16722 (usr_store_inferior_registers): Likewise.
16723 * linux-arm-low.c (num_regs): Remove.
16724 (arm_num_regs): Define.
16725 (arm_regmap): Renamed from regmap, made static.
16726 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
16727 made static.
16728 (arm_cannot_store_register): Renamed from cannot_store_register,
16729 made static.
16730 (the_low_target): New.
16731 * linux-i386-low.c (num_regs): Remove.
16732 (i386_num_regs): Define.
16733 (i386_regmap): Renamed from regmap, made static.
16734 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
16735 made static.
16736 (i386_cannot_store_register): Renamed from cannot_store_register,
16737 made static.
16738 (the_low_target): New.
16739 * linux-ia64-low.c (num_regs): Remove.
16740 (ia64_num_regs): Define.
16741 (ia64_regmap): Renamed from regmap, made static.
16742 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
16743 made static.
16744 (ia64_cannot_store_register): Renamed from cannot_store_register,
16745 made static.
16746 (the_low_target): New.
16747 * linux-m68k-low.c (num_regs): Remove.
16748 (m68k_num_regs): Define.
16749 (m68k_regmap): Renamed from regmap, made static.
16750 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
16751 made static.
16752 (m68k_cannot_store_register): Renamed from cannot_store_register,
16753 made static.
16754 (the_low_target): New.
16755 * linux-mips-low.c (num_regs): Remove.
16756 (mips_num_regs): Define.
16757 (mips_regmap): Renamed from regmap, made static.
16758 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
16759 made static.
16760 (mips_cannot_store_register): Renamed from cannot_store_register,
16761 made static.
16762 (the_low_target): New.
16763 * linux-ppc-low.c (num_regs): Remove.
16764 (ppc_num_regs): Define.
16765 (ppc_regmap): Renamed from regmap, made static.
16766 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
16767 made static.
16768 (ppc_cannot_store_register): Renamed from cannot_store_register,
16769 made static.
16770 (the_low_target): New.
16771 * linux-s390-low.c (num_regs): Remove.
16772 (s390_num_regs): Define.
16773 (s390_regmap): Renamed from regmap, made static.
16774 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
16775 made static.
16776 (s390_cannot_store_register): Renamed from cannot_store_register,
16777 made static.
16778 (the_low_target): New.
16779 * linux-sh-low.c (num_regs): Remove.
16780 (sh_num_regs): Define.
16781 (sh_regmap): Renamed from regmap, made static.
16782 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
16783 made static.
16784 (sh_cannot_store_register): Renamed from cannot_store_register,
16785 made static.
16786 (the_low_target): New.
16787 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
16788 (the_low_target): New.
16789
16790 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
16791
16792 * Makefile.in: Add stamp-h target.
16793 * configure.in: Create stamp-h.
16794 * configure: Regenerated.
16795
16796 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
16797
16798 * inferiors.c: New file.
16799 * target.c: New file.
16800 * target.h: New file.
16801 * Makefile.in: Add target.o and inferiors.o. Update
16802 dependencies.
16803 * linux-low.c (inferior_pid): New static variable,
16804 moved from server.c.
16805 (linux_create_inferior): Renamed from create_inferior.
16806 Call add_inferior. Return 0 on success instead of a PID.
16807 (linux_attach): Renamed from myattach.
16808 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
16809 (linux_thread_alive): Renamed from mythread_alive.
16810 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
16811 child dies.
16812 (linux_resume): Renamed from myresume. Add missing ``return 0''.
16813 (regsets_store_inferior_registers): Correct error message.
16814 Add missing ``return 0''.
16815 (linux_fetch_registers): Renamed from fetch_inferior_registers.
16816 (linux_store_registers): Renamed from store_inferior_registers.
16817 (linux_read_memory): Renamed from read_inferior_memory.
16818 (linux_write_memory): Renamed from write_inferior_memory.
16819 (linux_target_ops): New structure.
16820 (initialize_low): Call set_target_ops ().
16821 * remote-utils.c (unhexify): New function.
16822 (hexify): New function.
16823 (input_interrupt): Send signals to ``signal_pid''.
16824 * server.c (inferior_pid): Remove.
16825 (start_inferior): Update create_inferior call.
16826 (attach_inferior): Call add_inferior.
16827 (handle_query): New function.
16828 (main): Call handle_query for `q' packets.
16829 * server.h: Include "target.h". Remove obsolete prototypes.
16830 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
16831
16832 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
16833
16834 * Makefile.in: Add WARN_CFLAGS. Update configury
16835 dependencies.
16836 * configure.in: Check for <string.h>
16837 * configure: Regenerate.
16838 * config.in: Regenerate.
16839 * gdbreplay.c: Include needed system headers.
16840 (remote_open): Remove strchr prototype.
16841 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
16842 * regcache.c (supply_register): Change buf argument to const void *.
16843 (supply_register_by_name): Likewise.
16844 (collect_register): Change buf argument to void *.
16845 (collect_register_by_name): Likewise.
16846 * regcache.h: Add missing prototypes.
16847 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
16848 * server.c (handle_query): New function.
16849 (attached): New static variable, moved out of main.
16850 (main): Quiet longjmp clobber warnings.
16851 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
16852 * utils.c (error): Remove NORETURN.
16853 (fatal): Likewise.
This page took 1.632379 seconds and 5 git commands to generate.