]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blob - gdbserver/ChangeLog
gdbserver: turn target op 'resume' into a method
[thirdparty/binutils-gdb.git] / gdbserver / ChangeLog
1 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2
3 Turn process_stratum_target's resume op into a method of
4 process_target.
5
6 * target.h (struct process_stratum_target): Remove the target op.
7 (class process_target): Add the target op.
8
9 Update the derived classes and callers below.
10
11 * server.cc (resume): Update.
12 * target.cc (target_stop_and_wait): Update.
13 (target_continue_no_signal): Update.
14 (target_continue): Update.
15 * linux-low.cc (linux_target_ops): Update.
16 (linux_resume): Turn into ...
17 (linux_process_target::resume): ... this.
18 * linux-low.h (class linux_process_target): Update.
19 * lynx-low.cc (lynx_target_ops): Update.
20 (lynx_resume): Turn into ...
21 (lynx_process_target::resume): ... this.
22 * lynx-low.h (class lynx_process_target): Update.
23 * nto-low.cc (nto_target_ops): Update.
24 (nto_resume): Turn into ...
25 (nto_process_target::resume): ... this.
26 * nto-low.h (class nto_process_target): Update.
27 * win32-low.cc (win32_target_ops): Update.
28 (win32_resume): Turn into ...
29 (win32_process_target::resume): ... this.
30 (win32_process_target::detach): Update.
31 (do_initial_child_stuff): Update.
32 * win32-low.h (class win32_process_target): Update.
33
34 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
35
36 Turn process_stratum_target's thread_alive op into a method of
37 process_target.
38
39 * target.h (struct process_stratum_target): Remove the target op.
40 (class process_target): Add the target op.
41 (mythread_alive): Update the macro.
42
43 Update the derived classes and callers below.
44
45 * linux-low.cc (linux_target_ops): Update.
46 (linux_thread_alive): Turn into ...
47 (linux_process_target::thread_alive): ... this.
48 (wait_for_sigstop): Update.
49 * linux-low.h (class linux_process_target): Update.
50 * lynx-low.cc (lynx_target_ops): Update.
51 (lynx_thread_alive): Turn into ...
52 (lynx_process_target::thread_alive): ... this.
53 * lynx-low.h (class lynx_process_target): Update.
54 * nto-low.cc (nto_target_ops): Update.
55 (nto_thread_alive): Turn into ...
56 (nto_process_target::thread_alive): ... this.
57 * nto-low.h (class nto_process_target): Update.
58 * win32-low.cc (win32_target_ops): Update.
59 (win32_thread_alive): Turn into ...
60 (win32_process_target::thread_alive): ... this.
61 * win32-low.h (class win32_process_target): Update.
62
63 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
64
65 Turn process_stratum_target's join op into a method of
66 process_target.
67
68 * target.h (struct process_stratum_target): Remove the target op.
69 (class process_target): Add the target op.
70 (join_inferior): Update the macro.
71
72 Update the derived classes and callers below.
73
74 * linux-low.cc (linux_target_ops): Update.
75 (linux_join): Turn into ...
76 (linux_process_target::join): ... this.
77 * linux-low.h (class linux_process_target): Update.
78 * lynx-low.cc (lynx_target_ops): Update.
79 (lynx_join): Turn into ...
80 (lynx_process_target::join): ... this.
81 * lynx-low.h (class lynx_process_target): Update.
82 * nto-low.cc (nto_target_ops): Update.
83 (nto_process_target::join): Define.
84 * nto-low.h (class nto_process_target): Update.
85 * win32-low.cc (win32_target_ops): Update.
86 (win32_join): Turn into ...
87 (win32_process_target::join): ... this.
88 * win32-low.h (class win32_process_target): Update.
89
90 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
91
92 Turn process_stratum_target's mourn op into a method of
93 process_target.
94
95 * target.h (struct process_stratum_target): Remove the target op.
96 (class process_target): Add the target op.
97
98 Update the derived classes and callers below.
99
100 * target.cc (target_mourn_inferior): Update.
101 * linux-low.cc (linux_target_ops): Update.
102 (linux_mourn): Turn into ...
103 (linux_process_target::mourn): ... this.
104 (handle_extended_wait): Update.
105 (linux_process_target::kill): Update.
106 (linux_process_target::detach): Update.
107 * linux-low.h (class linux_process_target): Update.
108 * lynx-low.cc (lynx_target_ops): Update.
109 (lynx_mourn): Turn into ...
110 (lynx_process_target::mourn): ... this.
111 * lynx-low.h (class lynx_process_target): Update.
112 * nto-low.cc (nto_target_ops): Update.
113 (nto_mourn): Turn into ...
114 (nto_process_target::mourn): ... this.
115 * nto-low.h (class nto_process_target): Update.
116 * win32-low.cc (win32_target_ops): Update.
117 (win32_mourn): Turn into ...
118 (win32_process_target::mourn): ... this.
119 * win32-low.h (class win32_process_target): Update.
120
121 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
122
123 Turn process_stratum_target's detach op into a method of
124 process_target.
125
126 * target.h (struct process_stratum_target): Remove the target op.
127 (class process_target): Add the target op.
128 (detach_inferior): Update the macro.
129
130 Update the derived classes and callers below.
131
132 * linux-low.cc (linux_target_ops): Update.
133 (linux_detach): Turn into ...
134 (linux_process_target::detach): ... this.
135 * linux-low.h (class linux_process_target): Update.
136 * lynx-low.cc (lynx_target_ops): Update.
137 (lynx_detach): Turn into ...
138 (lynx_process_target::detach): ... this.
139 * lynx-low.h (class lynx_process_target): Update.
140 * nto-low.cc (nto_target_ops): Update.
141 (nto_detach): Turn into ...
142 (nto_process_target::detach): ... this.
143 * nto-low.h (class nto_process_target): Update.
144 * win32-low.cc (win32_target_ops): Update.
145 (win32_detach): Turn into ...
146 (win32_process_target::detach): ... this.
147 * win32-low.h (class win32_process_target): Update.
148
149 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
150
151 Turn process_stratum_target's kill op into a method of
152 process_target.
153
154 * target.h (struct process_stratum_target): Remove the target op.
155 (class process_target): Add the target op.
156
157 Update the derived classes and callers below.
158
159 * target.cc (kill_inferior): Update.
160 * linux-low.cc (linux_target_ops): Update.
161 (linux_kill): Turn into ...
162 (linux_process_target::kill): ... this.
163 * linux-low.h (class linux_process_target): Update.
164 * lynx-low.cc (lynx_target_ops): Update.
165 (lynx_kill): Turn into ...
166 (lynx_process_target::kill): ... this.
167 * lynx-low.h (class lynx_process_target): Update.
168 * nto-low.cc (nto_target_ops): Update.
169 (nto_kill): Turn into ...
170 (nto_process_target::kill): ... this.
171 * nto-low.h (class nto_process_target): Update.
172 * win32-low.cc (win32_target_ops): Update.
173 (win32_kill): Turn into ...
174 (win32_process_target::kill): ... this.
175 * win32-low.h (class win32_process_target): Update.
176
177 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
178
179 Turn process_stratum_target's attach op into a method of
180 process_target.
181
182 * target.h (struct process_stratum_target): Remove the target op.
183 (class process_target): Add the target op.
184 (myattach): Update the macro.
185
186 Update the derived classes and callers below.
187
188 * linux-low.cc (linux_target_ops): Update.
189 (linux_attach): Turn into ...
190 (linux_process_target::attach): ... this.
191 * linux-low.h (class linux_process_target): Update.
192 * lynx-low.cc (lynx_target_ops): Update.
193 (lynx_attach): Turn into ...
194 (lynx_process_target::attach): ... this.
195 * lynx-low.h (class lynx_process_target): Update.
196 * nto-low.cc (nto_target_ops): Update.
197 (nto_attach): Turn into ...
198 (nto_process_target::attach): ... this.
199 * nto-low.h (class nto_process_target): Update.
200 * win32-low.cc (win32_target_ops): Update.
201 (win32_attach): Turn into ...
202 (win32_process_target::attach): ... this.
203 * win32-low.h (class win32_process_target): Update.
204
205 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
206
207 Turn process_stratum_target's post_create_inferior op into a method
208 of process_target.
209
210 * target.h (struct process_stratum_target): Remove the target op.
211 (class process_target): Add the target op.
212 (target_post_create_inferior): Update the macro.
213 * target.cc (process_target::post_create_inferior): Define.
214
215 Update the derived classes and callers below.
216
217 * linux-low.cc (linux_target_ops): Update.
218 (linux_post_create_inferior): Turn into ...
219 (linux_process_target::post_create_inferior): ... this.
220 * linux-low.h (class linux_process_target): Update.
221 * lynx-low.cc (lynx_target_ops): Update.
222 * nto-low.cc (nto_target_ops): Update.
223 * win32-low.cc (win32_target_ops): Update.
224
225 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
226
227 Turn process_stratum_target's create_inferior op into a method of
228 process_target.
229
230 * target.h (struct process_stratum_target): Remove the target op.
231 (class process_target): Add the target op.
232 (create_inferior): Rename the macro to ...
233 (target_create_inferior): ... this.
234
235 Update the derived classes and callers below.
236
237 * server.cc (handle_v_run): Update.
238 (captured_main): Update.
239 (process_serial_event): Update.
240 * linux-low.cc (linux_target_ops): Update.
241 (linux_create_inferior): Turn into ...
242 (linux_process_target::create_inferior): ... this.
243 * linux-low.h (class linux_process_target): Update.
244 * lynx-low.cc (lynx_target_ops): Update.
245 (lynx_create_inferior): Turn into ...
246 (lynx_process_target::create_inferior): ... this.
247 * lynx-low.h (class lynx_process_target): Update.
248 * nto-low.cc (nto_target_ops): Update.
249 (nto_create_inferior): Turn into ...
250 (nto_process_target::create_inferior): ... this.
251 * nto-low.h (class nto_process_target): Update.
252 * win32-low.cc (win32_target_ops): Update.
253 (win32_create_inferior): Turn into ...
254 (win32_process_target::create_inferior): ... this.
255 * win32-low.h (class win32_process_target): Update.
256
257 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
258
259 * target.h (class process_target): New class definition.
260 (struct process_stratum_target) <pt>: New field with type
261 'process_target*'.
262 * linux-low.h (class linux_process_target): Define as a derived
263 class of 'process_target'.
264 * linux-low.cc (linux_target_ops): Add a linux_process_target*
265 as the 'pt' field.
266 * lynx-low.h (class lynx_process_target): Define as a derived
267 class of 'process_target'.
268 * lynx-low.cc (lynx_target_ops): Add a lynx_process_target*
269 as the 'pt' field.
270 * nto-low.h (class nto_process_target): Define as a derived
271 class of 'process_target'.
272 * nto-low.cc (nto_target_ops): Add an nto_process_target*
273 as the 'pt' field.
274 * win32-low.h (class win32_process_target): Define as a derived
275 class of 'process_target'.
276 * win32-low.cc (win32_target_ops): Add a win32_process_target*
277 as the 'pt' field.
278
279 2020-02-19 Andrew Burgess <andrew.burgess@embecosm.com>
280
281 * configure: Regenerate.
282
283 2020-02-19 Maciej W. Rozycki <macro@wdc.com>
284 Andrew Burgess <andrew.burgess@embecosm.com>
285
286 * linux-riscv-low.cc: New file.
287 * Makefile.in (SFILES): Add linux-riscv-low.cc, arch/riscv.c,
288 and nat/riscv-linux-tdesc.c.
289 * configure.srv <riscv*-*-linux*> (srv_tgtobj)
290 (srv_linux_regsets, srv_linux_usrregs, srv_linux_thread_db):
291 Define.
292
293 2020-02-14 Tom Tromey <tom@tromey.com>
294
295 * acinclude.m4: Don't include acx_configure_dir.m4.
296 * Makefile.in (LIBIBERTY_BUILDDIR, GNULIB_BUILDDIR): Update.
297 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): Remove.
298 (all, install-only, uninstall, clean-info, clean)
299 (maintainer-clean): Don't recurse.
300 (subdir_do, all-lib): Remove.
301 ($(LIBGNU) $(LIBIBERTY) $(GNULIB_H)): Remove rule.
302 (GNULIB_H): Remove.
303 (generated_files): Update.
304 ($(GNULIB_BUILDDIR)/Makefile): Remove rule.
305 * configure: Rebuild.
306 * configure.ac: Don't configure gnulib or libiberty.
307 (GNULIB): Update.
308
309 2020-02-14 Eli Zaretskii <eliz@gnu.org>
310
311 * win32-low.c (create_process): Prepend PROGRAM to ARGS when
312 preparing the command line for CreateProcess.
313 (win32_create_inferior): Reflect the program name in debugging
314 output that shows the process and its command line.
315
316 2020-02-13 Simon Marchi <simon.marchi@efficios.com>
317
318 * Makefile.in: Rename source files from .c to .cc.
319 * %.c: Rename to %.cc.
320 * configure.ac: Rename server.c to server.cc.
321 * configure: Re-generate.
322
323 2020-02-13 Simon Marchi <simon.marchi@efficios.com>
324
325 * Makefile.in: Rename gdbsupport source files from .c to .cc.
326
327 2020-02-12 Hannes Domani <ssbssa@yahoo.de>
328
329 * win32-low.c (win32_create_inferior): Set signal_pid.
330
331 2020-02-12 Maciej W. Rozycki <macro@wdc.com>
332 Pedro Alves <palves@redhat.com>
333
334 Skip building gdbserver in a cross-configuration.
335 * configure.srv: Set $gdbserver_host depending on whether $target
336 is $host. Use $gdbserver_host instead of $host.
337
338 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
339
340 * configure: Re-generate.
341
342 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
343
344 * configure: Re-generate.
345
346 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
347
348 * acinclude.m4: Update warning.m4 path.
349
350 2020-02-09 Hannes Domani <ssbssa@yahoo.de>
351
352 * win32-low.c (win32_clear_inferiors): Reset siginfo_er.
353 (handle_exception): Set siginfo_er.
354 (win32_xfer_siginfo): New function.
355
356 2020-02-07 Tom Tromey <tom@tromey.com>
357 Pedro Alves <palves@redhat.com>
358
359 * README: Update build documentation.
360 * configure.srv: Set UNSUPPORTED if host is unsupported. Check
361 host, not target.
362 * configure.ac: Update paths.
363 * configure: Rebuild.
364 * acinclude.m4: Update paths.
365 * Makefile.in: Update include paths.
366 (depcomp, INCLUDE_DIR, INCGNU, INCSUPPORT, INCLUDE_CFLAGS)
367 (SFILES, XML_DIR, n, $(GNULIB_BUILDDIR)/Makefile, config.status)
368 (version-generated.c, stamp-xml, regdat_sh, arch/%-ipa.o)
369 (gdbsupport/%-ipa.o, %-ipa.o, arch/%.o, gdbsupport/%.o, %.o)
370 (%-generated.c): Update paths.
371 * Move entire directory from ../gdb/gdbserver.
372
373 2020-01-29 Maciej W. Rozycki <macro@wdc.com>
374
375 * configure.srv <i[34567]86-*-mingw*>: Fix whitespace damage.
376
377 2020-01-29 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
378
379 * configure.srv (powerpc*-*-linux*): Use srv_tgtobj in second
380 assignment instead of srv_linux_obj.
381
382 2020-01-28 Hannes Domani <ssbssa@yahoo.de>
383
384 * server.c (handle_qxfer_libraries): Write segment-address with
385 paddress.
386
387 2020-01-24 Hannes Domani <ssbssa@yahoo.de>
388
389 * Makefile.in (install-strip): New target.
390 (install_sh, INSTALL_STRIP_PROGRAM, STRIP): New variables.
391 * aclocal.m4: Regenerate.
392 * configure: Regenerate.
393 * configure.ac: Add AM_PROG_INSTALL_STRIP.
394
395 2020-01-24 Maciej W. Rozycki <macro@wdc.com>
396
397 * Makefile.in (SFILES): Adjust paths to point to real files.
398 (OBS): Move waitstatus.o to target/waitstatus.o.
399 (TAGS): Transform paths appropriately.
400 (%.o): Rename to...
401 (nat/%.o): ... this pattern rule.
402 (%.o): Rename to...
403 (target/%.o): ... this pattern rule.
404 * configure.srv: Adjust paths throughout to include nat/ prefix
405 with the revant files.
406 * configure.ac: Add `nat' and `target' to CONFIG_SRC_SUBDIR.
407 * configure: Regenerate.
408
409 2020-01-24 Maciej W. Rozycki <macro@wdc.com>
410
411 * Makefile.in (TAGS): Remove config files from the recipe.
412
413 2020-01-14 Tom Tromey <tom@tromey.com>
414
415 * configure: Rebuild.
416 * configure.ac: Remove any checks that were added to common.m4.
417 * acinclude.m4: Include lib-ld.m4, lib-prefix.m4, and
418 lib-link.m4.
419
420 2020-01-14 Tom Tromey <tom@tromey.com>
421
422 * server.h: Include config.h.
423 * gdbreplay.c: Include config.h.
424 * configure: Rebuild.
425 * configure.ac: Don't source common.host.
426 * acinclude.m4: Update path.
427 * Makefile.in (INCSUPPORT): New variable.
428 (INCLUDE_CFLAGS): Add INCSUPPORT.
429 (SFILES): Update paths.
430 (version-generated.c): Update path to create-version.sh.
431 (gdbsupport/%-ipa.o, gdbsupport/%.o): Update paths.
432
433 2020-01-14 Tom Tromey <tom@tromey.com>
434
435 * configure.ac (LIBS): Use WIN32APILIBS.
436 (USE_WIN32API): Don't define.
437 * configure: Rebuild.
438
439 2020-01-14 Tom Tromey <tom@tromey.com>
440
441 * configure: Rebuild.
442
443 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
444
445 * Makefile.in (%-generated.c): Remove rule for files from
446 regformats/i386.
447
448 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
449
450 * configure: Re-generate.
451
452 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
453
454 * tracepoint.h (IP_AGENT_EXPORT_FUNC) [!IN_PROCESS_AGENT]:
455 Define to static.
456 * tracepoint.c (stop_tracing, flush_trace_buffer,
457 about_to_request_buffer_space, get_trace_state_variable_value,
458 set_trace_state_variable_value, gdb_collect): Add declaration.
459
460 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
461
462 * linux-x86-low.c (x86_linux_regs_info, amd64_emit_eq_goto,
463 amd64_emit_ne_goto, amd64_emit_lt_goto, amd64_emit_le_goto,
464 amd64_emit_gt_goto, amd64_emit_ge_goto, amd64_emit_ge_goto,
465 i386_emit_eq_goto, i386_emit_ne_goto, i386_emit_lt_goto,
466 i386_emit_le_goto, i386_emit_gt_goto, i386_emit_ge_goto): Make
467 static.
468
469 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
470
471 * inferiors.c: Include gdbsupport/common-inferior.h.
472
473 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
474
475 * hostio-errno.c: Include hostio.h.
476
477 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
478
479 * Makefile.in (%-generated.c): Make $(regdat_sh) a regular
480 prerequisite.
481
482 2020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
483
484 * linux-arm-tdesc.c: Include linux-arm-tdesc.h.
485 * linux-arm-tdesc.h: Include arch/arm.h.
486
487 2020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
488
489 * linux-aarch64-low.c (aarch64_write_goto_address): Make static.
490
491 2020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
492
493 * linux-aarch32-tdesc.c: Include linux-aarch32-tdesc.h.
494 * linux-aarch64-tdesc.c: Include linux-aarch64-tdesc.h.
495
496 2020-01-10 Pedro Alves <palves@redhat.com>
497
498 * fork-child.c (post_fork_inferior): Pass target down to
499 startup_inferior.
500 * inferiors.c (switch_to_thread): Add process_stratum_target
501 parameter.
502 * lynx-low.c (lynx_target_ops): Now a process_stratum_target.
503 * nto-low.c (nto_target_ops): Now a process_stratum_target.
504 * linux-low.c (linux_target_ops): Now a process_stratum_target.
505 * remote-utils.c (prepare_resume_reply): Pass the target to
506 switch_to_thread.
507 * target.c (the_target): Now a process_stratum_target.
508 (done_accessing_memory): Pass the target to switch_to_thread.
509 (set_target_ops): Ajust to use process_stratum_target.
510 * target.h (struct target_ops): Rename to ...
511 (struct process_stratum_target): ... this.
512 (the_target, set_target_ops): Adjust.
513 (prepare_to_access_memory): Adjust comment.
514 * win32-low.c (child_xfer_memory): Adjust to use
515 process_stratum_target.
516 (win32_target_ops): Now a process_stratum_target.
517
518 2020-01-06 Eli Zaretskii <eliz@gnu.org>
519 Pedro Alves <palves@redhat.com>
520
521 * win32-low.c (get_child_debug_event): Extract the fatal exception
522 from the exit status and convert to the equivalent Posix signal
523 number.
524 (win32_wait): Allow TARGET_WAITKIND_SIGNALLED status as well.
525 * Makefile.in (OBS, SFILES): Add gdb_wait.[co].
526
527 2020-01-01 Hannes Domani <ssbssa@yahoo.de>
528
529 * Makefile.in: Use INSTALL_PROGRAM_ENV.
530
531 2020-01-01 Joel Brobecker <brobecker@adacore.com>
532
533 * server.c (gdbserver_version): Change copyright year to 2020.
534 * gdbreplay.c (gdbreplay_version): Likewise.
535
536 2019-12-19 Christian Biesinger <cbiesinger@google.com>
537
538 * configure: Regenerate.
539 * configure.ac: Quote variable arguments of test.
540
541 2019-12-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
542
543 * Makefile.in: Fix build with GNU Make 3.81
544
545 2019-12-16 Tom Tromey <tromey@adacore.com>
546
547 * server.c (get_exec_file): Constify result.
548
549 2019-12-10 Christian Biesinger <cbiesinger@google.com>
550
551 * Makefile.in: Add safe-strerror.c to gdbreplay and IPA, and change
552 UNDO_GNULIB_CFLAGS to undo strerror_r instead of strerror.
553 * config.in: Regenerate.
554 * configure: Regenerate.
555 * configure.ac: Don't check for strerror.
556 * linux-i386-ipa.c (initialize_fast_tracepoint_trampoline_buffer):
557 Call safe_strerror instead of strerror.
558 * server.h (strerror): Remove this now-unnecessary declaration.
559 * tracepoint.c (init_named_socket): Call safe_strerror instead of
560 strerror.
561 (gdb_agent_helper_thread): Likewise.
562 * utils.c (perror_with_name): Likewise.
563
564 2019-11-26 Tom Tromey <tom@tromey.com>
565
566 * configure, config.in: Rebuild.
567
568 2019-11-26 Tom Tromey <tom@tromey.com>
569
570 * remote-utils.c (block_unblock_async_io): Use gdb_sigmask.
571 * linux-low.c (linux_wait_for_event_filtered, linux_async): Use
572 gdb_sigmask.
573 * configure, config.in: Rebuild.
574
575 2019-11-26 Tom Tromey <tom@tromey.com>
576
577 * Makefile.in (PTHREAD_CFLAGS, PTHREAD_LIBS): New variables.
578 (INTERNAL_CFLAGS_BASE): Use PTHREAD_CFLAGS.
579 (GDBSERVER_LIBS): Use PTHREAD_LIBS.
580 * acinclude.m4: Include ax_pthread.m4.
581 * config.in, configure: Rebuild.
582
583 2019-11-26 Christian Biesinger <cbiesinger@google.com>
584
585 * debug.c (debug_set_output): Call safe_strerror instead of
586 strerror.
587 * linux-low.c (attach_proc_task_lwp_callback): Likewise.
588 (linux_kill_one_lwp): Likewise.
589 (linux_detach_one_lwp): Likewise.
590 (linux_wait_for_event_filtered): Likewise.
591 (store_register): Likewise.
592 * lynx-low.c (lynx_attach): Likewise.
593 * mem-break.c (insert_memory_breakpoint): Likewise.
594 (remove_memory_breakpoint): Likewise.
595 (delete_fast_tracepoint_jump): Likewise.
596 (set_fast_tracepoint_jump): Likewise.
597 (uninsert_fast_tracepoint_jumps_at): Likewise.
598 (reinsert_fast_tracepoint_jumps_at): Likewise.
599 * nto-low.c (nto_xfer_memory): Likewise.
600 (nto_resume): Likewise.
601
602 2019-11-20 Luis Machado <luis.machado@linaro.org>
603
604 * linux-aarch64-low.c (is_sve_tdesc): Check against target feature
605 instead of register count.
606 * tdesc.c (tdesc_contains_feature): New function.
607 * tdesc.h (tdesc_contains_feature): New prototype.
608
609 2019-11-15 Christian Biesinger <cbiesinger@google.com>
610
611 * Makefile.in: Add safe-strerror.c.
612 * configure: Regenerate.
613 * configure.ac: Don't source common.host.
614
615 2019-11-15 Christian Biesinger <cbiesinger@google.com>
616
617 * config.in: Regenerate.
618 * configure: Regenerate.
619
620 2019-11-12 Andrew Burgess <andrew.burgess@embecosm.com>
621
622 * ax.c (ax_printf): Handle size_t_arg.
623
624 2019-11-06 Christian Biesinger <cbiesinger@google.com>
625
626 * linux-tdep.c (linux_info_proc): Use strtok_r instead of strtok.
627 * mi/mi-main.c (output_cores): Likewise.
628 * nat/linux-osdata.c (linux_xfer_osdata_cpus): Likewise.
629 (linux_xfer_osdata_modules): Likewise.
630 * remote.c (register_remote_support_xml): Likewise.
631 * sparc64-tdep.c (adi_is_addr_mapped): Likewise.
632 * xml-syscall.c (syscall_create_syscall_desc): Likewise.
633
634 2019-11-01 Christian Biesinger <cbiesinger@google.com>
635
636 * configure: Regenerate.
637 * configure.ac: Remove check for strerror_r.
638
639 2019-10-31 Christian Biesinger <cbiesinger@google.com>
640
641 * config.in: Regenerate.
642 * configure: Regenerate.
643 * configure.ac: Also check for strerror_r.
644
645 2019-10-31 Christian Biesinger <cbiesinger@google.com>
646
647 * ax.h (debug_agent): Remove duplicate declaration.
648
649 2019-10-26 Tom de Vries <tdevries@suse.de>
650
651 * linux-aarch64-low.c: Fix typos in comments.
652 * linux-arm-low.c: Same.
653 * linux-low.c: Same.
654 * linux-ppc-low.c: Same.
655 * proc-service.c: Same.
656 * regcache.h: Same.
657 * server.c: Same.
658 * tracepoint.c: Same.
659 * win32-low.c: Same.
660
661 2019-10-25 Tom Tromey <tromey@adacore.com>
662
663 * utils.c (xstrdup): Remove.
664
665 2019-10-23 Tom Tromey <tom@tromey.com>
666
667 * configure, config.in: Rebuild.
668
669 2019-10-23 Tom Tromey <tom@tromey.com>
670
671 * configure: Rebuild.
672 * acinclude.m4: Use m4_include, not sinclude.
673
674 2019-10-17 Tom Tromey <tromey@adacore.com>
675
676 * configure: Rebuild.
677 * configure.ac: Use AC_CONFIG_HEADERS. Create stamp-h there, not
678 in AC_CONFIG_FILES invocation.
679 * Makefile.in (stamp-h, Makefile): Use new-style config.status
680 invocation.
681
682 2019-10-16 Christian Biesinger <cbiesinger@google.com>
683
684 * server.c: Include xml-builtin.h.
685 (get_xml_features): Don't declare xml_builtins here.
686
687 2019-10-15 Andrew Burgess <andrew.burgess@embecosm.com>
688
689 * Makefile.in: Remove references to vec-ipa.o.
690
691 2019-10-15 Andrew Burgess <andrew.burgess@embecosm.com>
692
693 * Makefile.in: Remove references to vec.c.
694
695 2019-10-02 Christian Biesinger <cbiesinger@google.com>
696
697 * server.c (server_waiting): Change to bool.
698 (extended_protocol): Likewise.
699 (response_needed): Likewise.
700 (exit_requested): Likewise.
701 (run_once): Likewise.
702 (report_no_resumed): Likewise.
703 (non_stop): Likewise.
704 (disable_packet_vCont): Likewise.
705 (disable_packet_Tthread): Likewise.
706 (disable_packet_qC): Likewise.
707 (disable_packet_qfThreadInfo): Likewise.
708 (handle_general_set): Update.
709 (handle_detach): Update.
710 (handle_monitor_command): Update.
711 (handle_query): Update.
712 (captured_main): Update.
713 (process_serial_event): Update.
714 * server.h (server_waiting): Change to bool.
715 (disable_packet_vCont): Likewise.
716 (disable_packet_Tthread): Likewise.
717 (disable_packet_qC): Likewise.
718 (disable_packet_qfThreadInfo): Likewise.
719 (run_once): Likewise.
720 (non_stop): Likewise.
721 * target.c (target_stop_and_wait): Update.
722
723 2019-10-02 Tom Tromey <tromey@adacore.com>
724
725 * Makefile.in (SFILES): Add common-inferior.c.
726 (OBS): Add common-inferior.o.
727 * server.c (startup_with_shell): Don't define.
728
729 2019-10-02 Andrew Burgess <andrew.burgess@embecosm.com>
730
731 * linux-low.c (linux_low_read_btrace): Update for change to
732 std::vector.
733
734 2019-09-20 Christian Biesinger <cbiesinger@google.com>
735
736 * debug.c (debug_threads): Remove comment in favor of the header.
737 * debug.h (using_threads): Add declaration.
738 (debug_threads): Add comment.
739 * linux-aarch64-low.c: Include debug.h and remove declaration of
740 debug_threads.
741 * nto-low.c: Likewise.
742 * remote-utils.c: Likewise.
743 * thread-db.c: Likewise.
744
745 2019-09-20 Ulrich Weigand <uweigand@de.ibm.com>
746
747 * configure.srv (ipa_ppc_linux_regobj): Remove powerpc-cell32l-ipa.o
748 and powerpc-cell64l-ipa.o.
749 (powerpc*-*-linux*): Remove powerpc-cell32l.o and powerpc-cell64l.o
750 from srv_regobj. Remove rs6000/powerpc-cell32l.xml and
751 rs6000/powerpc-cell64l.xml from srv_xmlfiles.
752 (spu*-*-*): Remove.
753
754 * spu-low.c: Remove file.
755
756 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Remove.
757 (parse_spufs_run): Remove.
758 (ppc_get_pc): Remove Cell/B.E. support.
759 (ppc_set_pc): Likewise.
760 (ppc_breakpoint_at): Likewise.
761 (ppc_arch_setup): Likewise.
762 (ppc_get_ipa_tdesc_idx): Do not handle tdesc_powerpc_cell64l or
763 tdesc_powerpc_cell32l.
764 (initialize_low_arch): Do not call init_registers_powerpc_cell64l
765 or init_registers_powerpc_cell32l.
766 * linux-ppc-ipa.c (get_ipa_tdesc): Do not handle PPC_TDESC_CELL.
767 (initialize_low_tracepoint): Do not call init_registers_powerpc_cell64l
768 or init_registers_powerpc_cell32l.
769 * linux-ppc-tdesc-init.h (PPC_TDESC_CELL): Mark as unused.
770 (init_registers_powerpc_cell32l): Remove prototype.
771 (init_registers_powerpc_cell64l): Likewise.
772
773 * target.h (struct target_ops): Remove qxfer_spu member.
774 * server.c (handle_qxfer_spu): Remove.
775 (qxfer_packets): Remove entry for "spu".
776 (handle_query): No longer support qXfer:spu:read or qXfer:spu:write.
777 * linux-low.c (SPUFS_MAGIC): Remove.
778 (spu_enumerate_spu_ids): Remove.
779 (linux_qxfer_spu): Remove.
780 (linux_target_ops): Remove qxfer_spu member.
781 * lynx-low.c (lynx_target_ops): Remove qxfer_spu member.
782 * nto-low.c (nto_target_ops): Remove qxfer_spu member.
783 * win32-low.c (win32_target_ops): Remove qxfer_spu member.
784
785 2019-08-23 Sergio Durigan Junior <sergiodj@redhat.com>
786
787 * Makefile.in (SFILES): Add 'gdbsupport/gdb-dlfcn.c'.
788 (OBS): Add 'gdbsupport/gdb-dlfcn.o'.
789 * config.in: Regenerate.
790 * configure: Regenerate.
791
792 2019-08-15 Tom Tromey <tromey@adacore.com>
793
794 * target.c (target_write_memory): Use gdb::byte_vector.
795
796 2019-08-15 Tom Tromey <tromey@adacore.com>
797
798 * tracepoint.c (write_inferior_data_pointer)
799 (write_inferior_integer, write_inferior_int8)
800 (write_inferior_uinteger, m_tracepoint_action_download)
801 (r_tracepoint_action_download, x_tracepoint_action_download)
802 (l_tracepoint_action_download, clear_inferior_trace_buffer)
803 (download_agent_expr, download_tracepoint_1)
804 (download_trace_state_variables, upload_fast_traceframes): Update.
805 * server.c (gdb_write_memory): Update.
806 * remote-utils.c (relocate_instruction): Update.
807 * proc-service.c (ps_pdwrite): Update.
808 * mem-break.c (remove_memory_breakpoint)
809 (delete_fast_tracepoint_jump, set_fast_tracepoint_jump)
810 (uninsert_fast_tracepoint_jumps_at)
811 (reinsert_fast_tracepoint_jumps_at): Update.
812 * linux-x86-low.c (append_insns)
813 (i386_install_fast_tracepoint_jump_pad)
814 (amd64_write_goto_address, i386_write_goto_address): Update.
815 * linux-s390-low.c (append_insns, s390_write_goto_address):
816 Update.
817 * linux-ppc-low.c (ppc_relocate_instruction)
818 (ppc_install_fast_tracepoint_jump_pad, emit_insns)
819 (ppc_write_goto_address): Update.
820 * linux-aarch64-low.c (append_insns): Update.
821 * target.h (struct target_ops): Update.
822 (write_inferior_memory): Don't declare.
823 * target.c (target_write_memory): Rename from
824 write_inferior_memory. Remove old target_write_memory.
825
826 2019-08-15 Tom Tromey <tromey@adacore.com>
827
828 * target.c (write_inferior_memory): Use std::vector.
829
830 2019-08-06 Frank Ch. Eigler <fche@redhat.com>
831
832 PR build/24886
833 * configure.ac: Drop enable-libmcheck support.
834 * configure, config.in: Rebuild.
835 * acinclude.m4: Don't include it.
836
837 2019-07-19 Alan Hayward <alan.hayward@arm.com>
838
839 * configure.srv: Remove Arm xml files.
840
841 2019-07-19 Alan Hayward <alan.hayward@arm.com>
842
843 * configure.srv: Add new files. Remove xml generated files.
844 * linux-aarch32-low.c (initialize_low_arch_aarch32): Don't init
845 registers.
846 * linux-aarch32-low.h (tdesc_arm_with_neon): Remove.
847 * linux-aarch32-tdesc.c: New file.
848 * linux-aarch32-tdesc.h: New file.
849 * linux-aarch64-low.c (aarch64_arch_setup): Call aarch32_linux_read_description.
850 * linux-arm-low.c (init_registers_arm, tdesc_arm)
851 (init_registers_arm_with_iwmmxt, tdesc_arm_with_iwmmxt)
852 (init_registers_arm_with_vfpv2, tdesc_arm_with_vfpv2)
853 (init_registers_arm_with_vfpv3, tdesc_arm_with_vfpv3): Remove.
854 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
855 (arm_store_vfpregset): Call arm_linux_get_tdesc_fp_type.
856 (arm_read_description): Call arm_linux_read_description.
857 (initialize_low_arch): Don't init registers.
858 * linux-arm-tdesc.c: New file.
859 * linux-arm-tdesc.h: New file.
860
861 2019-07-10 Alan Hayward <alan.hayward@arm.com>
862
863 * linux-arm-low.c (arm_fill_wmmxregset, arm_store_wmmxregset):
864 Move counter inside for.
865 (arm_read_description): Check ptrace earlier.
866 (arm_arch_setup): Call arm_linux_init_hwbp_cap here.
867
868 2019-07-09 Tom Tromey <tom@tromey.com>
869
870 * configure: Rebuild.
871 * configure.ac: Change common to gdbsupport.
872 * acinclude.m4: Change common to gdbsupport.
873 * Makefile.in (SFILES, OBS, GDBREPLAY_OBS, IPA_OBJS)
874 (version-generated.c, gdbsupport/%-ipa.o, gdbsupport/%.o): Change
875 common to gdbsupport.
876 * ax.c, event-loop.c, fork-child.c, gdb_proc_service.h,
877 gdbreplay.c, gdbthread.h, hostio-errno.c, hostio.c, i387-fp.c,
878 inferiors.c, inferiors.h, linux-aarch64-tdesc-selftest.c,
879 linux-amd64-ipa.c, linux-i386-ipa.c, linux-low.c,
880 linux-tic6x-low.c, linux-x86-low.c, linux-x86-tdesc-selftest.c,
881 linux-x86-tdesc.c, lynx-i386-low.c, lynx-low.c, mem-break.h,
882 nto-x86-low.c, regcache.c, regcache.h, remote-utils.c, server.c,
883 server.h, spu-low.c, symbol.c, target.h, tdesc.c, tdesc.h,
884 thread-db.c, tracepoint.c, win32-i386-low.c, win32-low.c: Change
885 common to gdbsupport.
886
887 2019-07-04 Alan Hayward <alan.hayward@arm.com>
888
889 * linux-aarch32-low.c (arm_read_description, arm_regsets): Use new
890 defines.
891 * linux-arm-low.c (arm_read_description, arm_regsets): Likewise.
892
893 2019-07-04 Alan Hayward <alan.hayward@arm.com>
894
895 * configure.srv: Remove legacy xml.
896 * linux-aarch64-low.c (initialize_low_arch): Remove
897 initialize_low_tdesc call.
898 * linux-aarch64-tdesc-selftest.c: Remove file.
899 * linux-aarch64-tdesc.h (initialize_low_tdesc): Remove.
900 * linux-x86-low.c (initialize_low_arch): Remove
901 initialize_low_tdesc call.
902 * linux-x86-tdesc-selftest.c: Remove file.
903 * linux-x86-tdesc.h (initialize_low_tdesc): Remove.
904
905 2019-06-20 Tom de Vries <tdevries@suse.de>
906
907 * linux-s390-ipa.c (get_ipa_tdesc)[!__s390x__]: Use
908 s390_te_linux64_ft_collect_regmap for S390_TDESC_GS.
909
910 2019-06-19 Tom de Vries <tdevries@suse.de>
911
912 * debug.h (debug_write): Change return type to ssize_t.
913 * debug.c (debug_write): Same.
914
915 2019-06-14 Tom Tromey <tom@tromey.com>
916
917 * configure.ac: Use new path to gnulib.
918 * configure: Rebuild.
919 * Makefile.in (INCGNU, $(GNULIB_BUILDDIR)/Makefile): Use new path
920 to gnulib.
921
922 2019-06-11 Tom Tromey <tom@tromey.com>
923
924 * Makefile.in (SFILES): Add alloc.c.
925 (OBS): Add alloc.o.
926 (IPA_OBJS): Add alloc-ipa.o.
927 (alloc-ipa.o): New target.
928 (%.o: ../%.c): New pattern rule.
929
930 2019-06-10 Tom Tromey <tromey@adacore.com>
931
932 * remote-utils.c (look_up_one_symbol, relocate_instruction): Don't
933 end warning with a newline.
934 * linux-s390-low.c (s390_get_wordsize): Don't end warning with a
935 newline.
936 * thread-db.c (attach_thread): Don't end warning with a newline.
937 (thread_db_notice_clone): Likewise.
938 * tracepoint.c (gdb_agent_helper_thread): Don't end warning with a
939 newline.
940 * linux-x86-low.c (x86_get_min_fast_tracepoint_insn_len): Don't
941 end warning with a newline.
942
943 2019-06-04 Pedro Alves <palves@redhat.com>
944
945 * server.c (captured_main): Use make_unique_xstrdup.
946
947 2019-06-02 Tom Tromey <tom@tromey.com>
948
949 * gdbreplay.c (fromhex): Remove.
950 * Makefile.in (GDBREPLAY_OBS): Add rsp-low.o.
951
952 2019-05-29 Tom Tromey <tromey@adacore.com>
953
954 * configure: Rebuild.
955
956 2019-05-06 Kevin Buettner <kevinb@redhat.com>
957
958 * linux-x86-low.c (x86_fill_gregset): Don't compile 64-bit
959 sign extension code on 32-bit builds.
960
961 2019-05-03 Eli Zaretskii <eliz@gnu.org>
962
963 * remote-utils.c:
964 * gdbreplay.c [USE_WIN32API]: Remove the _WIN32_WINNT override.
965
966 2019-04-19 Tom Tromey <tom@tromey.com>
967
968 * server.c (struct vstop_notif): Derive from notif_event.
969 <base>: Remove.
970 (queue_stop_reply): Update.
971 (remove_all_on_match_ptid): Change type. Rewrite.
972 (discard_queued_stop_replies): Rewrite.
973 (in_queued_stop_replies_ptid): Change type.
974 (in_queued_stop_replies): Rewrite.
975 (notif_stop): Update.
976 (queue_stop_reply_callback): Update.
977 (captured_main): Don't call initialize_notif.
978 (push_stop_notification): Update.
979 * notif.c (notif_write_event, handle_notif_ack)
980 (notif_event_enque, notif_push): Update.
981 (notif_event_xfree, initialize_notif): Remove.
982 * notif.h (struct notif_event): Include <list>, not
983 "common/queue.h".
984 (struct notif_server) <queue>: Now a std::list.
985 (notif_event_p): Remove typedef.
986 (initialize_notif): Don't declare.
987 (struct notif_event): Add virtual destructor.
988
989 2019-04-17 Alan Hayward <alan.hayward@arm.com>
990
991 * ax.c (ax_vdebug): Call debug_printf.
992 * debug.c (debug_write): New function.
993 * debug.h (debug_write): New declaration.
994 * linux-low.c (sigchld_handler): Call debug_write.
995
996 2019-04-17 Alan Hayward <alan.hayward@arm.com>
997
998 * debug.c (debug_set_output): New function.
999 (debug_vprintf): Send output to debug_file.
1000 (debug_flush): Likewise.
1001 * debug.h (debug_set_output): New declaration.
1002 * server.c (handle_monitor_command): Add debug-file option.
1003 (captured_main): Likewise.
1004
1005 2019-04-17 Alan Hayward <alan.hayward@arm.com>
1006
1007 * debug.c (remote_debug): Add definition.
1008 * debug.h (remote_debug): Add declaration.
1009 * hostio.c (remote_debug): Remove declaration.
1010 * remote-utils.c (struct ui_file): Likewise.
1011 (remote_debug): Likewise.
1012 * remote-utils.h (remote_debug): Likewise,
1013 * server.c (remote_debug): Remove definition.
1014
1015 2019-04-10 Kevin Buettner <kevinb@redhat.com>
1016
1017 * linux-x86-low.c (x86_fill_gregset): Sign extend EAX value
1018 when using a 64-bit gdbserver.
1019
1020 2019-04-09 Tom Tromey <tromey@adacore.com>
1021
1022 * linux-low.c (select_event_lwp): Use find_thread_in_random.
1023
1024 2019-04-08 Tom Tromey <tom@tromey.com>
1025
1026 * linux-low.c (linux_detach_one_lwp): Replace throw_exception with
1027 throw.
1028 (linux_resume_one_lwp): Likewise.
1029
1030 2019-04-08 Tom Tromey <tom@tromey.com>
1031
1032 * gdbreplay.c: Update.
1033 * linux-low.c: Update.
1034 * server.c: Update.
1035
1036 2019-04-08 Tom Tromey <tom@tromey.com>
1037
1038 * server.c: Use C++ exception handling.
1039 * linux-low.c: Use C++ exception handling.
1040 * gdbreplay.c: Use C++ exception handling.
1041
1042 2019-04-08 Tom Tromey <tom@tromey.com>
1043
1044 * server.c (handle_btrace_general_set, handle_qxfer_btrace)
1045 (handle_qxfer_btrace_conf, detach_or_kill_for_exit_cleanup)
1046 (captured_main, main): Update.
1047 * gdbreplay.c (main): Update.
1048
1049 2019-04-05 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1050
1051 * linux-low.c (linux_get_auxv): Remove static. Return auxv entry
1052 value in argument pointer, return 1 if the entry is found and 0
1053 otherwise. Move comment.
1054 (linux_get_hwcap, linux_get_hwcap2): Use modified linux_get_auxv.
1055 * linux-low.h (linux_get_auxv): Declare.
1056 * linux-ppc-low.c (is_elfv2_inferior): Use linux_get_auxv.
1057
1058 2019-04-05 Tom Tromey <tromey@adacore.com>
1059
1060 * server.c (gdbserver_usage): Use upper-case for metasyntactic
1061 variables.
1062
1063 2019-03-28 Alan Hayward <alan.hayward@arm.com>
1064
1065 * linux-low.c (AT_HWCAP2): Add define if not already included.
1066
1067 2019-03-26 Alan Hayward <alan.hayward@arm.com>
1068
1069 * linux-aarch64-low.c (aarch64_get_hwcap): Remove function.
1070 (aarch64_arch_setup): Call linux_get_hwcap.
1071 * linux-arm-low.c (arm_get_hwcap): Remove function.
1072 (arm_read_description): Call linux_get_hwcap.
1073 * linux-low.c (linux_get_auxv): New function.
1074 (linux_get_hwcap): Likewise.
1075 (linux_get_hwcap2): Likewise.
1076 * linux-low.h (linux_get_hwcap): New declaration.
1077 (linux_get_hwcap2): Likewise.
1078 * linux-ppc-low.c (ppc_get_auxv): Remove function.
1079 (ppc_arch_setup): Call linux_get_hwcap.
1080 * linux-s390-low.c (s390_get_hwcap): Remove function.
1081 (s390_arch_setup): Call linux_get_hwcap.
1082
1083 2019-03-22 Alan Hayward <alan.hayward@arm.com>
1084 Jiong Wang <jiong.wang@arm.com>
1085
1086 * linux-aarch64-low.c (aarch64_store_pauthregset): New function.
1087 * linux-low.c (regsets_store_inferior_registers): Allow optional reads
1088 to fail.
1089 * linux-low.h (enum regset_type): Add OPTIONAL_REGS.
1090
1091 2019-03-22 Alan Hayward <alan.hayward@arm.com>
1092 Jiong Wang <jiong.wang@arm.com>
1093
1094 * linux-aarch64-low.c (AARCH64_HWCAP_PACA): New define.
1095 (aarch64_get_hwcap): New function.
1096 (aarch64_arch_setup): Read APIA hwcap.
1097
1098 2019-03-22 Alan Hayward <alan.hayward@arm.com>
1099 Jiong Wang <jiong.wang@arm.com>
1100
1101 * linux-aarch64-ipa.c (get_ipa_tdesc): Add pauth param.
1102 (initialize_low_tracepoint): Likewise.
1103 * linux-aarch64-low.c (aarch64_arch_setup): Likewise.
1104 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Likewise.
1105 * linux-aarch64-tdesc.c (struct target_desc): Likewise.
1106 (aarch64_linux_read_description): Likewise.
1107 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Likewise.
1108
1109 2019-03-12 John Baldwin <jhb@FreeBSD.org>
1110
1111 * linux-x86-tdesc.c (i386_linux_read_description): Update call to
1112 i386_create_target_description for 'segments' parameter.
1113 * lynx-i386-low.c (lynx_i386_arch_setup): Likewise.
1114 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
1115 * win32-i386-low.c (i386_arch_setup): Likewise.
1116
1117 2019-03-12 Tom Tromey <tromey@adacore.com>
1118
1119 * linux-low.c (iterate_over_lwps): Update.
1120
1121 2019-03-06 Tom Tromey <tom@tromey.com>
1122
1123 * server.c (detach_or_kill_for_exit_cleanup): Remove parameter.
1124 (captured_main): Use SCOPE_EXIT.
1125
1126 2019-03-04 Sergio Durigan Junior <sergiodj@redhat.com>
1127
1128 * configure.srv: Use '$enable_unittest' instead of '$development'
1129 when checking whether to fill 'srv_regobj' on 'aarch64*-*-linux*'
1130 case.
1131
1132 2019-02-27 Tom Tromey <tromey@adacore.com>
1133
1134 * gdbreplay.c (logchar): Handle \r\n.
1135
1136 2019-02-07 Alan Hayward <alan.hayward@arm.com>
1137
1138 * linux-low.c (linux_attach): Add process before lwp.
1139 * server.c (attach_inferior): Check if already attached.
1140
1141 2019-02-07 Tom Tromey <tom@tromey.com>
1142
1143 * x86-tdesc.h: Rename include guard.
1144 * x86-low.h: Add include guard.
1145 * wincecompat.h: Rename include guard.
1146 * win32-low.h: Add include guard.
1147 * utils.h: Rename include guard.
1148 * tracepoint.h: Rename include guard.
1149 * tdesc.h: Rename include guard.
1150 * target.h: Rename include guard.
1151 * server.h: Rename include guard.
1152 * remote-utils.h: Rename include guard.
1153 * regcache.h: Rename include guard.
1154 * nto-low.h: Rename include guard.
1155 * notif.h: Add include guard.
1156 * mem-break.h: Rename include guard.
1157 * lynx-low.h: Add include guard.
1158 * linux-x86-tdesc.h: Add include guard.
1159 * linux-s390-tdesc.h: Add include guard.
1160 * linux-ppc-tdesc-init.h: Add include guard.
1161 * linux-low.h: Add include guard.
1162 * linux-aarch64-tdesc.h: Add include guard.
1163 * linux-aarch32-low.h: Add include guard.
1164 * inferiors.h: Rename include guard.
1165 * i387-fp.h: Rename include guard.
1166 * hostio.h: Rename include guard.
1167 * gdbthread.h: Rename include guard.
1168 * gdb_proc_service.h: Rename include guard.
1169 * event-loop.h: Rename include guard.
1170 * dll.h: Rename include guard.
1171 * debug.h: Rename include guard.
1172 * ax.h: Rename include guard.
1173
1174 2018-01-30 Szabolcs Nagy <szabolcs.nagy@arm.com>
1175
1176 PR gdb/23985
1177 * Makefile.in (IPAGENT_CFLAGS): Add UNDO_GNULIB_CFLAGS.
1178 (UNDO_GNULIB_CFLAGS): Undo gnulib replacements.
1179
1180 2019-01-25 Tom Tromey <tom@tromey.com>
1181
1182 * Makefile.in (INCLUDE_CFLAGS): Don't add -I for common.
1183
1184 2019-01-25 Tom Tromey <tom@tromey.com>
1185
1186 * win32-low.c: Fix common/ includes.
1187 * win32-i386-low.c: Fix common/ includes.
1188 * tracepoint.c: Fix common/ includes.
1189 * thread-db.c: Fix common/ includes.
1190 * target.h: Fix common/ includes.
1191 * symbol.c: Fix common/ includes.
1192 * spu-low.c: Fix common/ includes.
1193 * server.h: Fix common/ includes.
1194 * server.c: Fix common/ includes.
1195 * remote-utils.c: Fix common/ includes.
1196 * regcache.h: Fix common/ includes.
1197 * regcache.c: Fix common/ includes.
1198 * nto-x86-low.c: Fix common/ includes.
1199 * notif.h: Fix common/ includes.
1200 * mem-break.h: Fix common/ includes.
1201 * lynx-low.c: Fix common/ includes.
1202 * lynx-i386-low.c: Fix common/ includes.
1203 * linux-x86-tdesc-selftest.c: Fix common/ includes.
1204 * linux-x86-low.c: Fix common/ includes.
1205 * linux-low.c: Fix common/ includes.
1206 * inferiors.h: Fix common/ includes.
1207 * i387-fp.c: Fix common/ includes.
1208 * hostio.c: Fix common/ includes.
1209 * hostio-errno.c: Fix common/ includes.
1210 * gdbthread.h: Fix common/ includes.
1211 * gdbreplay.c: Fix common/ includes.
1212 * fork-child.c: Fix common/ includes.
1213 * event-loop.c: Fix common/ includes.
1214 * ax.c:
1215 (enum gdb_agent_op): Fix common/ includes.
1216
1217 2019-01-21 Tom Tromey <tom@tromey.com>
1218
1219 * tracepoint.c: Fix includes.
1220 * remote-utils.c: Fix includes.
1221 * linux-x86-low.c: Fix includes.
1222
1223 2019-01-01 Joel Brobecker <brobecker@adacore.com>
1224
1225 * gdbreplay.c (gdbreplay_version): Update copyright year in
1226 version message.
1227 * server.c (gdbserver_version): Likewise.
1228
1229 2018-12-05 Alan Hayward <alan.hayward@arm.com>
1230
1231 * linux-low.c (add_lwp): Switch ordering.
1232
1233 2018-11-29 Tom Tromey <tom@tromey.com>
1234
1235 * win32-low.c (win32_join): Take pid, not process.
1236 * target.h (struct target_ops) <join>: Change argument type.
1237 (join_inferior): Change argument name.
1238 * spu-low.c (spu_join): Take pid, not process.
1239 * server.c (handle_detach): Preserve pid before destroying
1240 process.
1241 * lynx-low.c (lynx_join): Take pid, not process.
1242 * linux-low.c (linux_join): Take pid, not process.
1243
1244 2018-11-23 Alan Hayward <alan.hayward@arm.com>
1245
1246 * linux-aarch64-low.c (aarch64_cannot_store_register): Remove.
1247 (aarch64_cannot_fetch_register): Likewise.
1248 (struct linux_target_ops): Update references.
1249
1250 2018-10-31 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1251
1252 * linux-ppc-low.c: Include nat/linux-ptrace.h.
1253
1254 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1255
1256 * configure.srv (ipa_ppc_linux_regobj): Add
1257 powerpc-isa207-htm-vsx32l-ipa.o and
1258 powerpc-isa207-htm-vsx64l-ipa.o.
1259 (powerpc*-*-linux*): Add powerpc-isa207-htm-vsx32l.o and
1260 powerpc-isa207-htm-vsx64l.o to srv_regobj. Add
1261 rs6000/power-htm-spr.xml, rs6000/power-htm-core.xml,
1262 rs6000/power64-htm-core.xml, rs6000/power-htm-fpu.xml,
1263 rs6000/power-htm-altivec.xml, rs6000/power-htm-vsx.xml,
1264 rs6000/power-htm-ppr.xml, rs6000/power-htm-dscr.xml,
1265 rs6000/power-htm-tar.xml, rs6000/powerpc-isa207-htm-vsx32l.xml,
1266 and rs6000/powerpc-isa207-htm-vsx64l.xml to srv_xmlfiles.
1267 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
1268 <PPC_TDESC_ISA207_HTM_VSX>: New enum value.
1269 (init_registers_powerpc_isa207_htm_vsx32l)
1270 (init_registers_powerpc_isa207_htm_vsx64l): Declare.
1271 * linux-ppc-low.c (ppc_fill_tm_sprregset, ppc_store_tm_sprregset)
1272 (ppc_store_tm_cgprregset, ppc_store_tm_cfprregset)
1273 (ppc_store_tm_cvrregset, ppc_store_tm_cvsxregset)
1274 (ppc_store_tm_cpprregset, ppc_store_tm_cdscrregset)
1275 (ppc_store_tm_ctarregset): New functions.
1276 (ppc_regsets): Add entries for HTM regsets.
1277 (ppc_arch_setup): Set htm in features struct when needed. Set
1278 sizes for the HTM regsets.
1279 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_HTM_VSX.
1280 (initialize_low_arch): Call
1281 init_registers_powerpc_isa207_htm_vsx32l and
1282 init_registers_powerpc_isa207_htm_vsx64l.
1283 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
1284 PPC_TDESC_ISA207_HTM_VSX.
1285 (initialize_low_tracepoint): Call
1286 init_registers_powerpc_isa207_htm_vsx32l and
1287 init_registers_powerpc_isa207_htm_vsx64l.
1288
1289 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1290
1291 * configure.srv (powerpc*-*-linux*): Add rs6000/power-ebb.xml and
1292 rs6000/power-linux-pmu.xml to srv_xmlfiles.
1293 * linux-ppc-low.c (ppc_store_ebbregset, ppc_fill_pmuregset)
1294 (ppc_store_pmuregset): New functions.
1295 (ppc_regsets): Add entries for ebb and pmu regsets.
1296 (ppc_arch_setup): Set isa207 in features struct if the ebb and
1297 pmu regsets are available. Set sizes for these regsets.
1298
1299 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1300
1301 * configure.srv (ipa_ppc_linux_regobj): Add
1302 powerpc-isa207-vsx64l-ipa.o and powerpc-isa207-vsx32l-ipa.o.
1303 (powerpc*-*-linux*): Add powerpc-isa207-vsx32l.o and
1304 powerpc-isa207-vsx64l.o to srv_regobj, add rs6000/power-tar.xml,
1305 rs6000/powerpc-isa207-vsx32l.xml, and
1306 rs6000/powerpc-isa207-vsx64l.xml to srv_xmlfiles.
1307 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
1308 <PPC_TDESC_ISA207_VSX>: New enum value.
1309 (init_registers_powerpc_isa207_vsx32l): Declare.
1310 (init_registers_powerpc_isa207_vsx64l): Declare.
1311 * linux-ppc-low.c (ppc_fill_tarregset): New function.
1312 (ppc_store_tarregset): New function.
1313 (ppc_regsets): Add entry for the TAR regset.
1314 (ppc_arch_setup): Set isa207 in features struct when needed. Set
1315 size for the TAR regsets.
1316 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_VSX.
1317 (initialize_low_arch): Call init_registers_powerpc_isa207_vsx32l
1318 and init_registers_powerpc_isa207_vsx64l.
1319 * linux-ppc-ipa.c (get_ipa_tdesc): Handle PPC_TDESC_ISA207_VSX.
1320 (initialize_low_tracepoint): Call
1321 init_registers_powerpc_isa207_vsx32l and
1322 init_registers_powerpc_isa207_vsx64l.
1323
1324 2018-10-26 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
1325 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1326
1327 * configure.srv (ipa_ppc_linux_regobj): Add
1328 powerpc-isa205-ppr-dscr-vsx32l-ipa.o and
1329 powerpc-isa205-ppr-dscr-vsx64l-ipa.o.
1330 (powerpc*-*-linux*): Add powerpc-isa205-ppr-dscr-vsx32l.o and
1331 powerpc-isa205-ppr-dscr-vsx64l.o to srv_regobj, add
1332 rs6000/power-dscr.xml, rs6000/power-ppr.xml,
1333 rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml and
1334 rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml to srv_xmlfiles.
1335 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
1336 <PPC_TDESC_ISA205_PPR_DSCR_VSX>: New enum value.
1337 (init_registers_powerpc_isa205_ppr_dscr_vsx32l)
1338 (init_registers_powerpc_isa205_ppr_dscr_vsx64l): Declare.
1339 * linux-ppc-low.c: Include "elf/common.h" and <sys/uio.h>.
1340 (ppc_hwcap): Add comment.
1341 (ppc_hwcap2): New global.
1342 (ppc_check_regset, ppc_fill_pprregset, ppc_store_pprregset)
1343 (ppc_fill_dscrregset, ppc_store_dscrregset): New functions.
1344 (ppc_regsets): Add entries for the DSCR and PPR regsets.
1345 (ppc_arch_setup): Get AT_HWCAP2. Set ppr_dscr in features struct
1346 when needed. Set sizes for the the DSCR and PPR regsets.
1347 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA205_PPR_DSCR_VSX.
1348 (initialize_low_arch): Call
1349 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
1350 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
1351 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
1352 PPC_TDESC_ISA205_PPR_DSCR_VSX.
1353 (initialize_low_tracepoint): Call
1354 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
1355 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
1356
1357 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1358
1359 * linux-ppc-low.c (ppc_fill_vrregset): Remove memset calls.
1360
1361 2018-10-10 Sergio Durigan Junior <sergiodj@redhat.com>
1362 Simon Marchi <simark@simark.ca>
1363
1364 * acinclude.m4: Include "../selftest.m4".
1365 * configure: Regenerate.
1366 * configure.ac: Use "GDB_AC_SELFTEST".
1367 * configure.srv: Use "$enable_unittests" instead of
1368 "$development" when checking whether unit tests have been
1369 enabled.
1370 * server.c (captured_main): Update message informing that
1371 selftests have been disabled.
1372
1373 2018-10-04 Tom Tromey <tom@tromey.com>
1374
1375 * configure: Rebuild.
1376
1377 2018-10-04 Tom Tromey <tom@tromey.com>
1378
1379 * server.c (handle_status): Rename inner "thread".
1380 (process_serial_event): Declare "res" in 'm' case.
1381 * linux-low.c (last_thread_of_process_p, find_lwp_pid)
1382 (iterate_over_lwps): Rename inner "thread".
1383 (linux_qxfer_libraries_svr4): Rename inner "len".
1384 * gdbthread.h (find_thread_in_random): Rename inner "thread".
1385
1386 2018-10-01 Gary Benson <gbenson@redhat.com>
1387
1388 * gdb_proc_service.h: Moved common code to
1389 common/gdb_proc_service.h.
1390
1391 2018-10-01 Gary Benson <gbenson@redhat.com>
1392
1393 * gdb_proc_service.h: Synchronize comments and whitespace with
1394 GDB's version of this file.
1395
1396 2018-09-25 Tom Tromey <tom@tromey.com>
1397
1398 * configure: Rebuild.
1399 * configure.ac (WARN_CFLAGS): Don't remove -Wmissing-prototypes.
1400
1401 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
1402
1403 * Makefile.in (gdbserver$(EXEEXT)): Sort OBS.
1404 (gdbreplay$(EXEEXT)): Sort GDBREPLAY_OBS.
1405 ($(IPA_LIB)): Sort IPA_OBJS.
1406
1407 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
1408
1409 * Makefile.in: Remove references to $(ADD_DEPS).
1410
1411 2018-09-16 Tom Tromey <tom@tromey.com>
1412
1413 * remote-utils.c (remote_open): Use GNU style for metasyntactic
1414 variables.
1415 * gdbreplay.c (gdbreplay_usage): Use GNU style for metasyntactic
1416 variables.
1417
1418 2018-09-05 Tom Tromey <tom@tromey.com>
1419
1420 * configure: Rebuild.
1421
1422 2018-08-28 Simon Marchi <simon.marchi@polymtl.ca>
1423
1424 PR build/23399
1425 * tracepoint.c (IPA_SYM_STRUCT_NAME): Define.
1426
1427 2018-08-27 Tom Tromey <tom@tromey.com>
1428
1429 PR build/23087:
1430 * configure: Rebuild.
1431
1432 2018-08-27 Tom Tromey <tom@tromey.com>
1433
1434 * linux-s390-low.c (s390_emit_ext, s390_emit_litpool)
1435 (s390_emit_const, s390_emit_reg, s390_emit_zero_ext)
1436 (s390_emit_stack_adjust, s390_emit_set_r2, s390x_emit_ext)
1437 (s390x_emit_const, s390x_emit_reg, s390x_emit_zero_ext)
1438 (s390x_emit_stack_adjust): Add casts to unsigned char.
1439
1440 2018-08-22 Simon Marchi <simon.marchi@ericsson.com>
1441
1442 PR gdb/23374
1443 PR gdb/23375
1444 * server.h (struct client_state) <disable_randomization>:
1445 Initialize to 1.
1446
1447 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
1448
1449 * linux-mips-low.c (mips_collect_ptrace_register): Remove unused
1450 variable.
1451 (mips_supply_ptrace_register): Likewise.
1452
1453 2018-07-22 Tom Tromey <tom@tromey.com>
1454
1455 * configure: Rebuild.
1456
1457 2018-07-22 Tom Tromey <tom@tromey.com>
1458
1459 * win32-low.c (win32_create_inferior): Remove unused variables.
1460 * gdbreplay.c (remote_open): Remove unused variable.
1461 * remote-utils.c (remote_prepare): Remove unused variable.
1462 * x86-tdesc.h (X86_TDESC_H): Define.
1463 (amd64_expedite_regs): Define conditionally.
1464 (i386_expedite_regs): Mark ATTRIBUTE_UNUSED.
1465 * linux-x86-tdesc.c (i386_tdescs): Move inside #if.
1466 * remote-utils.c (readchar): Remove unused variable.
1467
1468 2018-07-13 Pedro Alves <palves@redhat.com>
1469
1470 * linux-low.c (linux_kill): Change parameter to process_info
1471 pointer instead of pid. Adjust.
1472 * lynx-low.c (lynx_kill): Likewise.
1473 * nto-low.c (nto_kill): Likewise.
1474 * spu-low.c (spu_kill): Likewise.
1475 * win32-low.c (win32_kill): Likewise.
1476 * server.c (handle_v_kill, kill_inferior_callback)
1477 (detach_or_kill_for_exit): Adjust.
1478 * target.c (kill_inferior): Change parameter to process_info
1479 pointer instead of pid. Adjust.
1480 * target.h (struct target_ops) <kill>: Change parameter to
1481 process_info pointer instead of pid. Adjust all implementations
1482 and callers.
1483 (kill_inferior): Likewise.
1484
1485 2018-07-13 Pedro Alves <palves@redhat.com>
1486
1487 * linux-low.c (linux_detach, linux_join): Change parameter to
1488 process_info pointer instead of pid. Adjust.
1489 * lynx-low.c (lynx_detach, lynx_join): Likewise.
1490 * nto-low.c (nto_detach): Likewise.
1491 * spu-low.c (spu_detach, spu_join): Likewise.
1492 * win32-low.c (win32_detach, win32_join): Likewise.
1493 * server.c (handle_detach, detach_or_kill_for_exit): Adjust.
1494 * target.h (struct target_ops) <detach, join>: Change parameter to
1495 process_info pointer instead of pid. Adjust all implementations
1496 and callers.
1497 (detach_inferior, join_inferior): Rename 'pid' parameter to
1498 'proc'.
1499
1500 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
1501 Jan Kratochvil <jan.kratochvil@redhat.com>
1502 Paul Fertser <fercerpav@gmail.com>
1503 Tsutomu Seki <sekiriki@gmail.com>
1504
1505 * Makefile.in (SFILES): Add '$(srcdir)/common/netstuff.c'.
1506 (OBS): Add 'common/netstuff.o'.
1507 (GDBREPLAY_OBS): Likewise.
1508 * gdbreplay.c: Include 'wspiapi.h' and 'netstuff.h'.
1509 (remote_open): Implement support for IPv6
1510 connections.
1511 * remote-utils.c: Include 'netstuff.h', 'filestuff.h'
1512 and 'wspiapi.h'.
1513 (handle_accept_event): Accept connections from IPv6 sources.
1514 (remote_prepare): Handle IPv6-style hostnames; implement
1515 support for IPv6 connections.
1516 (remote_open): Implement support for printing connections from
1517 IPv6 sources.
1518
1519 2018-07-11 Pedro Alves <palves@redhat.com>
1520
1521 PR gdb/23377
1522 * mem-break.c (any_persistent_commands): Add process_info
1523 parameter and use it instead of relying on the current process.
1524 Change return type to bool.
1525 * mem-break.h (any_persistent_commands): Add process_info
1526 parameter and change return type to bool.
1527 * server.c (handle_detach): Remove require_running_or_return call.
1528 Look up the process_info for the process we're about to detach.
1529 If not found, return back error to GDB. Adjust
1530 any_persistent_commands call to pass down a process pointer.
1531
1532 2018-07-11 Pedro Alves <palves@redhat.com>
1533
1534 * i387-fp.c (i387_cache_to_fsave, cache_to_fxsave)
1535 (i387_cache_to_xsave): Use regcache_raw_get_unsigned_by_name
1536 instead of collect_register_by_name.
1537 * regcache.c (regcache_raw_get_unsigned_by_name): New.
1538 * regcache.h (regcache_raw_get_unsigned_by_name): New.
1539
1540 2018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
1541 Pedro Alves <palves@redhat.com>
1542
1543 * linux-low.c (initialize_low): Call linux_proc_init_warnings.
1544
1545 2018-07-03 Tom Tromey <tom@tromey.com>
1546
1547 * linux-low.c: Update.
1548 * lynx-low.c: Update.
1549 * mem-break.c: Update.
1550 * nto-low.c: Update.
1551 * remote-utils.c: Update.
1552 * server.c: Update.
1553 * spu-low.c: Update.
1554 * target.c: Update.
1555 * win32-low.c: Update.
1556
1557 2018-07-03 Tom Tromey <tom@tromey.com>
1558
1559 * server.c: Update.
1560
1561 2018-07-03 Tom Tromey <tom@tromey.com>
1562
1563 * linux-low.c: Update.
1564
1565 2018-07-03 Tom Tromey <tom@tromey.com>
1566
1567 * target.c: Update.
1568
1569 2018-07-03 Tom Tromey <tom@tromey.com>
1570
1571 * linux-low.c: Update.
1572 * linux-mips-low.c: Update.
1573 * lynx-low.c: Update.
1574 * nto-low.c: Update.
1575 * remote-utils.c: Update.
1576 * server.c: Update.
1577 * spu-low.c: Update.
1578 * target.c: Update.
1579 * thread-db.c: Update.
1580
1581 2018-07-03 Tom Tromey <tom@tromey.com>
1582
1583 * linux-low.c: Update.
1584 * linux-mips-low.c: Update.
1585 * lynx-low.c: Update.
1586 * mem-break.c: Update.
1587 * nto-low.c: Update.
1588 * remote-utils.c: Update.
1589 * server.c: Update.
1590 * spu-low.c: Update.
1591 * target.c: Update.
1592 * tracepoint.c: Update.
1593
1594 2018-07-03 Tom Tromey <tom@tromey.com>
1595
1596 * linux-low.c: Update.
1597 * linux-ppc-low.c: Update.
1598 * linux-x86-low.c: Update.
1599 * proc-service.c: Update.
1600 * server.c: Update.
1601 * spu-low.c: Update.
1602 * thread-db.c: Update.
1603 * win32-low.c: Update.
1604
1605 2018-07-03 Tom Tromey <tom@tromey.com>
1606
1607 * linux-low.c: Update.
1608 * lynx-low.c: Update.
1609 * nto-low.c: Update.
1610 * remote-utils.c: Update.
1611 * spu-low.c: Update.
1612 * thread-db.c: Update.
1613 * win32-low.c: Update.
1614
1615 2018-06-29 Joel Brobecker <brobecker@adacore.com>
1616
1617 * linux-x86-tdesc.c (amd64_linux_read_description): Add missing
1618 parameter in call to 'amd64_create_target_description'.
1619
1620 2018-06-28 Jan Kratochvil <jan.kratochvil@redhat.com>
1621
1622 * x86-tdesc.h: Remove executable permission flag.
1623
1624 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
1625
1626 * configure.ac: Remove AC_PREREQ, add missing quoting.
1627 * configure: Re-generate.
1628 * config.in: Re-generate.
1629 * aclocal.m4: Re-generate.
1630
1631 2018-06-18 Simon Marchi <simon.marchi@ericsson.com>
1632
1633 * tracepoint.h (current_traceframe): Remove declaration.
1634
1635 2018-06-18 Alan Hayward <alan.hayward@arm.com>
1636
1637 * linux-aarch64-low.c (is_sve_tdesc): New function.
1638 (aarch64_sve_regs_copy_to_regcache): Likewise.
1639 (aarch64_sve_regs_copy_from_regcache): Likewise.
1640 (aarch64_regs_info): Add SVE checks.
1641 (initialize_low_arch): Initialize SVE.
1642
1643 2018-06-18 Alan Hayward <alan.hayward@arm.com>
1644
1645 * Makefile.in: Add aarch64-sve-linux-ptrace.c.
1646
1647 2018-06-11 Alan Hayward <alan.hayward@arm.com>
1648
1649 * linux-aarch64-ipa.c (get_ipa_tdesc): Add null VQ param.
1650 (initialize_low_tracepoint): Likewise
1651 * linux-aarch64-low.c (aarch64_arch_setup): Get VQ.
1652 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Add null VQ
1653 param.
1654 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add VQ
1655 checks.
1656 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Add VQ.
1657
1658 2018-06-11 Alan Hayward <alan.hayward@arm.com>
1659
1660 * server.h (PBUFSIZ): Increase size
1661
1662 2018-06-11 Alan Hayward <alan.hayward@arm.com>
1663
1664 * regcache.c (regcache::raw_compare): New function.
1665 * regcache.h (regcache::raw_compare): New declaration.
1666
1667 2018-06-11 Alan Hayward <alan.hayward@arm.com>
1668
1669 * regcache.c (new_register_cache): Use new.
1670 (free_register_cache): Use delete.
1671 (register_data): Use const.
1672 (supply_register): Move body inside regcache.
1673 (regcache::raw_supply): New override function.
1674 (collect_register): Move body inside regcache.
1675 (regcache::raw_collect): New override function.
1676 (regcache::get_register_status): New override function.
1677 * regcache.h (struct regcache): Inherit from reg_buffer_common.
1678
1679 2018-06-09 Tom Tromey <tom@tromey.com>
1680
1681 * event-loop.c (gdb_event, gdb_event_p): Remove typedefs. Don't
1682 declare queue.
1683 (event_queue): Use std::queue.
1684 (gdb_event_xfree): Remove.
1685 (initialize_event_loop, process_event, wait_for_event): Update.
1686
1687 2018-06-08 Stan Cox <scox@redhat.com>
1688
1689 * win32-low.c (win32_create_inferior): last_ptid and last_status
1690 moved to client_state.
1691
1692 2018-06-08 Pedro Alves <palves@redhat.com>
1693
1694 * Makefile.in (GDBREPLAY_OBS): Add common/cleanups.o,
1695 common/common-exceptions.o, common/common-utils.o,
1696 common/errors.o, common/print-utils.o and utils.o.
1697 * gdbreplay.c: Include "common-defs.h" instead of the two
1698 'config.h's here. Don't include stdio.h, errno.h, stdlib.h,
1699 string.h or alloca.h.
1700 (perror_with_name): Delete.
1701 (remote_open): Use xstrdup instead of strdup.
1702 (main): Rename to ...
1703 (captured_main): ... this.
1704 (main): New.
1705
1706 2018-06-08 Tom Tromey <tom@tromey.com>
1707
1708 * linux-low.c (linux_low_read_btrace): Update.
1709
1710 2018-06-04 Stan Cox <scox@redhat.com>
1711
1712 * server.h (struct client_state): New.
1713 * server.c (cont_thread, general_thread, multi_process)
1714 (report_fork_events, report_vfork_events, report_exec_events)
1715 (report_thread_events, swbreak_feature, hwbreak_feature)
1716 (vCont_supported, disable_randomization, pass_signals)
1717 (program_signals, program_signals_p, last_status, last_ptid, own_buf):
1718 Moved to client_state.
1719 * remote-utils.c (remote_debug, noack_mode)
1720 (transport_is_reliable): Moved to client_state.
1721 * tracepoint.c (current_traceframe): Moved to client_state.
1722
1723 Update all callers.
1724 * server.c, remote-utils.c, tracepoint.c, fork-child.c,
1725 linux-low.c, remote-utils.h, target.c: Use client_state.
1726
1727 2018-05-31 Alan Hayward <alan.hayward@arm.com>
1728
1729 * configure.srv: Add new c/h file.
1730
1731 2018-05-31 Alan Hayward <alan.hayward@arm.com>
1732
1733 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add
1734 null VQ.
1735
1736 2018-05-25 Maciej W. Rozycki <macro@mips.com>
1737
1738 * gdb.arch/mips-fpregset-core.exp: New test.
1739 * gdb.arch/mips-fpregset-core.c: New test source.
1740
1741 2018-05-23 Erik Kurzinger <ekurzinger@nvidia.com>
1742
1743 PR server/23198
1744 * hostio.c (require_int): Do not report overflow for integers
1745 between 0xfffffff and 0x7fffffff.
1746
1747 2018-05-22 Maciej W. Rozycki <macro@mips.com>
1748
1749 * linux-mips-low.c [HAVE_PTRACE_GETREGS] (mips_collect_register)
1750 (mips_supply_register): Move outside HAVE_PTRACE_GETREGS.
1751 (mips_collect_ptrace_register, mips_supply_ptrace_register): New
1752 functions.
1753 (the_low_target): Wire them.
1754
1755 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1756
1757 * linux-ppc-low.c (ppc_fill_vrregset): Add vscr_offset variable.
1758 Set vscr_offset to 0 in little-endian mode and 12 in big-endian
1759 mode. Call collect_register_by_name with vscr using
1760 vscr_offset. Zero-pad vscr and vrsave fields in collector buffer.
1761 (ppc_store_vrregset): Add and set vscr_offset variable as in
1762 ppc_fill_vrregset. Call supply_register_by_name with vscr using
1763 vscr_offset.
1764
1765 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1766
1767 * linux-ppc-low.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
1768 (ppc_arch_setup): Change SIZEOF_VRREGS and SIZEOF_VSXREGS to
1769 PPC_LINUX_SIZEOF_VRREGSET and PPC_LINUX_SIZEOF_VSXREGSET.
1770
1771 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1772
1773 * linux-ppc-low.c (ppc_fill_vsxregset): Remove ppc_hwcap check.
1774 (ppc_store_vsxregset): Likewise.
1775 (ppc_fill_vrregset): Likewise.
1776 (ppc_store_vrregset): Likewise.
1777 (ppc_fill_evrregset): Likewise.
1778 (ppc_store_evrregset): Likewise.
1779 (ppc_regsets): Set VSX/VR/EVR regset sizes to 0.
1780 (ppc_arch_setup): Iterate through ppc_regsets and set sizes when
1781 needed.
1782
1783 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1784
1785 * linux-ppc-low.c (ppc_arch_setup): Remove code for getting the
1786 wordsize of the inferior. Call ppc_linux_target_wordsize.
1787
1788 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1789
1790 * configure.srv (srv_tgtobj): Add arch/ppc-linux-common.o.
1791 * Makefile.in (SFILES): Add arch/ppc-linux-common.c.
1792 * linux-ppc-tdesc.h: Rename to linux-ppc-tdesc-init.h.
1793 * linux-ppc-tdesc-init.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
1794 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
1795 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
1796 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
1797 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
1798 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
1799 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
1800 (tdesc_powerpc_e500l): Remove.
1801 * linux-ppc-ipa.c: Include arch/ppc-linux-tdesc.h and
1802 linux-ppc-tdesc-init.h. Don't include linux-ppc-tdesc.h.
1803 * linux-ppc-low.c: Include arch/ppc-linux-common.h,
1804 arch/ppc-linux-tdesc.h, and linux-ppc-tdesc-init.h. Don't include
1805 linux-ppc-tdesc.h.
1806 (ppc_arch_setup): Remove target description matching code. Fill a
1807 ppc_linux_features struct and call ppc_linux_match_description
1808 with it.
1809
1810 2018-05-22 Maciej W. Rozycki <macro@mips.com>
1811
1812 * linux-mips-low.c (mips_cannot_fetch_register): Return 1 if the
1813 width of the requested register exceeds the width of the
1814 `ptrace' data type.
1815 (mips_cannot_store_register): Likewise.
1816
1817 2018-05-21 Maciej W. Rozycki <macro@mips.com>
1818
1819 * linux-mips-low.c (mips_fetch_register): New function. Update
1820 preceding comment.
1821 (mips_store_gregset): Supply 0 rather than $restart for $zero.
1822 (the_low_target): Wire `mips_fetch_register'.
1823
1824 2018-05-10 Joel Brobecker <brobecker@adacore.com>
1825
1826 * lynx-i386-low.c (LYNXOS_178): New macro.
1827 [LYNXOS_178] (usr_fcontext_t): Provide a definition that matches
1828 the layout on LynxOS-178.
1829 (lynx_i386_fill_fpregset, lynx_i386_store_fpregset): Do not
1830 handle floating point registers that are not supported by
1831 LynxOS-178.
1832
1833 2018-05-10 Tom Tromey <tom@tromey.com>
1834
1835 * configure: Rebuild.
1836
1837 2018-05-10 Joel Brobecker <brobecker@adacore.com>
1838
1839 PR server/23158:
1840 * tdesc.h (init_target_desc) <expedite_regs>: New parameter.
1841 * tdesc.c (init_target_desc) <expedite_regs>: New parameter.
1842 Use it to set the expedite_regs field in the given tdesc.
1843 * x86-tdesc.h: New file.
1844 * linux-aarch64-tdesc.c (aarch64_linux_read_description):
1845 Adjust following the addition of the new expedite_regs parameter
1846 to init_target_desc.
1847 * linux-tic6x-low.c (tic6x_read_description): Likewise.
1848 * linux-x86-tdesc.c: #include "x86-tdesc.h".
1849 (i386_linux_read_description, amd64_linux_read_description):
1850 Adjust following the addition of the new expedite_regs parameter
1851 to init_target_desc.
1852 * lynx-i386-low.c: #include "x86-tdesc.h".
1853 (lynx_i386_arch_setup): Adjust following the addition of the new
1854 expedite_regs parameter to init_target_desc.
1855 * nto-x86-low.c: #include "x86-tdesc.h".
1856 (nto_x86_arch_setup): Adjust following the addition of the new
1857 expedite_regs parameter to init_target_desc.
1858 * win32-i386-low.c: #include "x86-tdesc.h".
1859 (i386_arch_setup): Adjust following the addition of the new
1860 expedite_regs parameter to init_target_desc.
1861
1862 2018-05-10 Joel Brobecker <brobecker@adacore.com>
1863
1864 PR server/23158:
1865 * win32-low.c (win32_create_inferior): Add call to my_wait
1866 setting last_status global.
1867
1868 2018-05-10 Joel Brobecker <brobecker@adacore.com>
1869
1870 PR server/23158:
1871 * win32-low.c (create_process): Only call gdb_tilde_expand if
1872 inferior_cwd is not NULL.
1873
1874 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
1875
1876 * i387-fp.c (i387_cache_to_xsave): Only write x87 control
1877 registers to the cache if their values have changed.
1878 (i387_xsave_to_cache): Provide default values for x87 control
1879 registers when these features are available, but disabled.
1880 * regcache.c (supply_register_by_name_zeroed): New function.
1881 * regcache.h (supply_register_by_name_zeroed): Declare new
1882 function.
1883
1884 2018-05-07 Tom Tromey <tom@tromey.com>
1885
1886 * configure: Rebuild.
1887
1888 2018-05-04 Tom Tromey <tom@tromey.com>
1889
1890 * configure: Rebuild.
1891
1892 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
1893 Pedro Alves <palves@redhat.com>
1894
1895 * linux-aarch64-low.c (aarch64_stopped_data_address):
1896 Likewise.
1897
1898 2018-04-27 Tom Tromey <tom@tromey.com>
1899
1900 * configure: Rebuild.
1901
1902 2018-04-23 Tom Tromey <tom@tromey.com>
1903
1904 * configure: Rebuild.
1905
1906 2018-04-19 Simon Marchi <simon.marchi@ericsson.com>
1907
1908 * Makefile.in (depcomp): Add "..".
1909 (all_deps_files): New and use it.
1910
1911 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1912
1913 * configure.srv (aarch64*-*-linux*): Don't include xml.
1914 (i[34567]86-*-cygwin*): Likewise.
1915 (i[34567]86-*-linux*): Likewise.
1916 (i[34567]86-*-lynxos*): Likewise.
1917 (i[34567]86-*-mingw32ce*): Likewise.
1918 (i[34567]86-*-mingw*): Likewise.
1919 (i[34567]86-*-nto*): Likewise.
1920 (tic6x-*-uclinux): Likewise.
1921 (x86_64-*-linux*): Likewise.
1922 (x86_64-*-mingw*): Likewise.
1923 (x86_64-*-cygwin*): Likewise.
1924
1925 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1926
1927 * tdesc.c: Remove xml parameter.
1928
1929 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1930
1931 * server.c (get_features_xml): Remove cast.
1932 * tdesc.c (void target_desc::accept): Fill in function.
1933 (tdesc_get_features_xml): Remove old xml creation.
1934 (print_xml_feature::visit_pre): Add xml vistor.
1935 * tdesc.h (struct target_desc): Make xmltarget mutable.
1936 (tdesc_get_features_xml): Remove declaration.
1937
1938 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1939
1940 * tdesc.c (tdesc_architecture_name): Add new function.
1941 (tdesc_osabi_name): Likewise.
1942 (tdesc_get_features_xml): Use new functions.
1943
1944 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1945
1946 * tdesc.c (tdesc_create_flags): Remove.
1947 (tdesc_add_flag): Likewise.
1948 (tdesc_named_type): Likewise.
1949 (tdesc_create_union): Likewise.
1950 (tdesc_create_struct): Likewise.
1951 (tdesc_create_vector): Likewise.
1952 (tdesc_add_bitfield): Likewise.
1953 (tdesc_add_field): Likewise.
1954 (tdesc_set_struct_size): Likewise.
1955
1956 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1957
1958 * tdesc.c (~target_desc): Remove implictly deleted items.
1959 (init_target_desc): Iterate all features.
1960 (tdesc_get_features_xml): Use vector.
1961 (tdesc_create_feature): Create feature.
1962 * tdesc.h (tdesc_feature) Remove
1963 (target_desc): Add features.
1964
1965 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1966
1967 * Makefile.in: Add common/tdesc.c
1968 * tdesc.c (init_target_desc): init all reg_defs from register
1969 vector.
1970 (tdesc_create_reg): Create tdesc_reg.
1971 * tdesc.h (tdesc_feature): Add register vector.
1972
1973 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
1974
1975 * tdesc.h (struct target_desc) <features>: Change type to
1976 std::vector<std::string>.
1977 * tdesc.c (target_desc::~target_desc): Adjust to std::vector
1978 changes.
1979 (tdesc_get_features_xml): Likewise.
1980 (tdesc_create_feature): Likewise.
1981
1982 2018-03-26 Alan Hayward <alan.hayward@arm.com>
1983
1984 * regcache.c (find_register_by_number): Return a ref.
1985 (find_regno): Use references.
1986 (register_size): Likewise.
1987 (register_data): Likewise.
1988 * tdesc.c (target_desc::~target_desc): Remove free calls.
1989 (target_desc::operator==): Use std::vector compare.
1990 (init_target_desc): Use reference.
1991 (tdesc_create_reg): Use reg constructors.
1992 * tdesc.h (struct target_desc): Replace pointer with object.
1993
1994 2018-03-23 Alan Hayward <alan.hayward@arm.com>
1995
1996 * regcache.c (find_register_by_number): Make static.
1997 (find_regno): Use find_register_by_number
1998 * regcache.h (struct reg): Remove declaration.
1999
2000 2018-03-23 Alan Hayward <alan.hayward@arm.com>
2001
2002 * tdesc.c (target_desc::~target_desc): Move to here.
2003 (target_desc::operator==): Likewise.
2004 * tdesc.h (target_desc::~target_desc): Move from here.
2005 (target_desc::operator==): Likewise.
2006
2007 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
2008
2009 * linux-s390-low.c (s390_get_wordsize): Correct brace style.
2010
2011 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
2012
2013 * linux-s390-ipa.c (get_ipa_tdesc): Add handling for
2014 S390_TDESC_GS.
2015 * linux-s390-low.c (s390_get_ipa_tdesc_idx): Likewise.
2016 (initialize_low_tracepoint): Call init_registers_s390x_gs_linux64
2017 and init_registers_s390_gs_linux64.
2018
2019 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
2020
2021 * linux-s390-low.c (s390_fill_gs): Remove function.
2022 (s390_fill_gsbc): Remove function.
2023 (s390_regsets): Set fill functions for the guarded storage regsets
2024 to NULL.
2025
2026 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
2027
2028 * linux-s390-low.c (s390_get_hwcap): Replace tdesc parameter by
2029 the word size. Add comment.
2030 (s390_get_wordsize): New function.
2031 (s390_arch_setup): No longer select a temporary tdesc to fetch the
2032 pswm with it. Instead, use s390_get_wordsize to determine the
2033 word size first and derive the correct tdesc from that directly.
2034
2035 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
2036
2037 * Makefile.in: Include silent-rules.mk.
2038 (srcdir, abs_top_srcdir, abs_srcdir, VPATH): Move up.
2039 (COMPILE): Add ECHO_CXX.
2040 (gdbserver$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
2041 (gdbreplay$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
2042 ($(IPA_LIB)): Add SILENCE and ECHO_CXXLD.
2043 (version-generated.c): Add ECHO_GEN.
2044 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN_GENERATED.
2045 (IPAGENT_COMPILE): Add ECHO_CXX.
2046 (%-generated.c): Add ECHO_REGDAT.
2047
2048 2018-03-14 Tom Tromey <tom@tromey.com>
2049
2050 PR cli/14977:
2051 * ax.c (ax_printf): Special case for NULL.
2052
2053 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
2054
2055 * linux-low.c (linux_qxfer_libraries_svr4): Use
2056 xml_escape_text_append.
2057
2058 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
2059
2060 * linux-low.c (linux_qxfer_libraries_svr4): Use std::string.
2061
2062 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
2063
2064 * server.c (handle_general_set): Remove unnecessary xstrdup.
2065
2066 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
2067
2068 * server.c (parse_debug_format_options): Adjust to
2069 delim_string_to_char_ptr_vec changes.
2070 * thread-db.c (thread_db_load_search): Adjust to
2071 dirnames_to_char_ptr_vec changes.
2072
2073 2018-03-01 Markus Metzger <markus.t.metzger@intel.com>
2074
2075 * target.h (target_enable_btrace, target_disable_btrace)
2076 (target_read_btrace, target_read_btrace_conf): Turn macro into
2077 inline function. Throw error if target method is not defined.
2078 * server.c (handle_qxfer_btrace handle_qxfer_btrace_conf): Remove
2079 check for btrace target method. Be prepared to handle exceptions
2080 from btrace target methods.
2081
2082 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
2083
2084 * server.c (captured_main): Change order of error message printed
2085 when the current working directory cannot be found.
2086
2087 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
2088
2089 * server.c: Include "filenames.h" and "pathstuff.h".
2090 (program_name): Delete variable.
2091 (program_path): New anonymous class.
2092 (get_exec_wrapper): Use "program_path" instead of
2093 "program_name".
2094 (handle_v_run): Likewise.
2095 (captured_main): Likewise.
2096 (process_serial_event): Likewise.
2097
2098 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
2099
2100 * Makefile.in (SFILES): Add "$(srcdir)/common/pathstuff.c".
2101 (OBJS): Add "pathstuff.o".
2102 * server.c (current_directory): New global variable.
2103 (captured_main): Initialize "current_directory".
2104
2105 2018-02-26 Alan Hayward <alan.hayward@arm.com>
2106
2107 * tdesc.c: Use common/tdesc.h.
2108 * tdesc.h: Likewise.
2109
2110 2018-02-20 Alan Hayward <alan.hayward@arm.com>
2111 Simon Marchi <simon.marchi@ericsson.com>
2112
2113 * Makefile.in: Switch order of make rules.
2114
2115 2018-02-19 Alan Hayward <alan.hayward@arm.com>
2116
2117 * Makefile.in: Add common directory in build.
2118 * configure.ac: Add common reference.
2119 * configure: Regenerate.
2120
2121 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
2122
2123 * linux-low.c (linux_target_ops): Remove linux_supports_btrace.
2124 * nto-low.c (nto_target_ops): Remove NULL for supports_btrace.
2125 * spu-low.c (spu_target_ops): Likewise.
2126 * win32-low.c (win32_target_ops): Likewise.
2127 * server.c (supported_btrace_packets): Report packets unconditionally.
2128 * target.h (target_ops) <supports_btrace>: Remove.
2129 (target_supports_btrace): Remove.
2130
2131 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
2132
2133 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt)
2134 (handle_btrace_disable): Change return type to void. Use exceptions
2135 to report errors.
2136 (handle_btrace_general_set): Catch exception and copy message to
2137 return message.
2138
2139 2018-02-08 Tom Tromey <tom@tromey.com>
2140
2141 * linux-low.c (install_software_single_step_breakpoints): Use
2142 make_scoped_restore.
2143 * inferiors.c (make_cleanup_restore_current_thread): Remove.
2144 (do_restore_current_thread_cleanup): Remove.
2145 * gdbthread.h (make_cleanup_restore_current_thread): Don't
2146 declare.
2147
2148 2018-02-08 Tom Tromey <tom@tromey.com>
2149
2150 * mem-break.c (set_raw_breakpoint_at): Use
2151 gdb::unique_xmalloc_ptr.
2152
2153 2018-01-30 Pedro Alves <palves@redhat.com>
2154
2155 PR gdb/13211
2156 * target.c (target_terminal::terminal_state): Rename to ...
2157 (target_terminal::m_terminal_state): ... this.
2158
2159 2018-01-19 James Clarke <jrtc27@jrtc27.com>
2160
2161 * linux-low.c (handle_extended_wait): Surround call to
2162 thread_db_notice_clone with #ifdef USE_THREAD_DB.
2163
2164 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
2165
2166 * linux-low.c (attach_proc_task_lwp_callback): Adjust to
2167 linux_ptrace_attach_fail_reason_string now returning an
2168 std::string.
2169 (linux_attach): Likewise.
2170 * thread-db.c (attach_thread): Likewise.
2171
2172 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
2173
2174 PR gdb/21559
2175 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
2176 checking for fs_base/gs_base fields in struct user_regs_struct.
2177 * configure: Regenerate.
2178
2179 2018-01-16 Yao Qi <yao.qi@linaro.org>
2180
2181 PR gdb/18749
2182 * linux-low.c (fetch_register): Call supply_register instead of
2183 error.
2184
2185 2018-01-08 Yao Qi <yao.qi@linaro.org>
2186 Simon Marchi <simon.marchi@ericsson.com>
2187
2188 * Makefile.in (OBS): Remove selftest.o.
2189 * configure.ac: Set srv_selftest_objs if $development is true.
2190 (GDBSERVER_DEPFILES): Append $srv_selftest_objs.
2191 * configure: Re-generated.
2192 * server.c (captured_main): Wrap variable selftest_filter with
2193 GDB_SELF_TEST.
2194
2195 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
2196
2197 * server.c (parse_debug_format_options): Return std::string.
2198 (handle_monitor_command, captured_main): Adjust.
2199
2200 2018-01-05 Pedro Alves <palves@redhat.com>
2201
2202 PR gdb/18653
2203 * server.c (captured_main): Pass quiet=false to
2204 save_original_signals_state.
2205
2206 2018-01-01 Joel Brobecker <brobecker@adacore.com>
2207
2208 * gdbreplay.c (gdbreplay_version): Update copyright year in
2209 version message.
2210 * server.c (gdbserver_version): Likewise.
2211
2212 2017-12-08 Tom Tromey <tom@tromey.com>
2213
2214 * ax.c (ax_printf): Update.
2215
2216 2017-12-07 Yao Qi <yao.qi@linaro.org>
2217
2218 * linux-aarch64-ipa.c (initialize_low_tracepoint): Call
2219 aarch64_linux_read_description.
2220 * linux-amd64-ipa.c (idx2mask): New array.
2221 (get_ipa_tdesc): Move idx2mask out.
2222 (initialize_low_tracepoint): Initialize target descriptions.
2223 * linux-i386-ipa.c (idx2mask): New array.
2224 (get_ipa_tdesc): Move idx2mask out.
2225 (initialize_low_tracepoint): Initialize target descriptions.
2226
2227 2017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
2228
2229 * tdesc.c (struct tdesc_type): Change return type.
2230 (tdesc_add_flag): Change parameter type.
2231 (tdesc_add_bitfield): Likewise.
2232 (tdesc_add_field): Likewise.
2233 (tdesc_set_struct_size): Likewise.
2234
2235 2017-12-05 Simon Marchi <simon.marchi@ericsson.com>
2236
2237 * regcache.c (registers_to_string): Remove unused variable.
2238
2239 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2240
2241 * inferiors.c (for_each_inferior_with_data): Remove.
2242 * inferiors.h (for_each_inferior_with_data): Remove.
2243 * server.c (handle_qxfer_threads_worker): Change parameter type.
2244 (handle_qxfer_threads_proper): Use for_each_thread.
2245
2246 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2247
2248 * inferiors.c (for_each_inferior): Remove.
2249 (clear_inferiors): Use for_each_thread.
2250 * inferiors.h (for_each_inferior): Remove.
2251 * linux-low.c (linux_wait_for_event_filtered): Use
2252 for_each_thread.
2253 (linux_stabilize_threads): Likewise.
2254 * regcache.c (regcache_release): Likewise.
2255 * server.c (gdb_wants_all_threads_stopped): Likewise.
2256 (clear_pending_status_callback): Remove.
2257 (handle_status): Use for_each_thread.
2258 (captured_main): Likewise.
2259 * win32-low.c (child_init_thread_list): Likewise.
2260 (win32_clear_inferiors): Likewise.
2261 (fake_breakpoint_event): Likewise.
2262
2263 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2264
2265 * inferiors.h (find_inferior): Remove.
2266 * inferiors.c (find_inferior): Remove.
2267
2268 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2269
2270 * linux-low.c (resume_status_pending_p): Update comment.
2271 (need_step_over_p): Update comment.
2272
2273 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2274
2275 * linux-low.c (proceed_one_lwp): Return void, change parameter
2276 type.
2277 (unsuspend_and_proceed_one_lwp): Likewise.
2278 (proceed_all_lwps): Use for_each_thread.
2279 (unstop_all_lwps): Likewise.
2280
2281 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2282
2283 * linux-low.c (linux_resume_one_thread): Return void, take
2284 parameter directly.
2285 (linux_resume): Use for_each_thread.
2286
2287 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2288
2289 * linux-low.c (send_sigstop_callback): Return void, change
2290 parameter type. Rename to...
2291 (send_sigstop): ... this.
2292 (suspend_and_send_sigstop_callback): Return void, change parameter
2293 type. Rename to...
2294 (suspend_and_send_sigstop): ... this.
2295 (stop_all_lwps): Use for_each_thread.
2296
2297 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2298
2299 * linux-low.c (lwp_running): Return bool, remove unused
2300 argument.
2301 (linux_stabilize_threads): Use find_thread.
2302
2303 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2304
2305 * linux-low.c (select_singlestep_lwp_callback): Remove.
2306 (count_events_callback): Remove.
2307 (select_event_lwp_callback): Remove.
2308 (select_event_lwp): Use find_thread/for_each_thread.
2309
2310 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2311
2312 * linux-low.c (not_stopped_callback): Return bool, take filter
2313 argument directly.
2314 (linux_wait_for_event_filtered): Use find_thread.
2315 (linux_wait_1): Likewise.
2316
2317 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2318
2319 * linux-low.c (same_lwp): Remove.
2320 (find_lwp_pid): Use find_thread.
2321
2322 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2323
2324 * linux-low.c (delete_lwp_callback): Remove.
2325 (linux_mourn): Use for_each_thread.
2326
2327 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2328
2329 * linux-low.c (linux_detach_lwp_callback): Return void, remove
2330 args parameter, don't check for pid.
2331 (linux_detach): Use for_each_thread.
2332
2333 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2334
2335 * linux-low.c (struct counter): Remove.
2336 (second_thread_of_pid_p): Remove.
2337 (last_thread_of_process_p): Use find_thread.
2338
2339 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2340
2341 * inferiors.c (find_inferior_in_random): Remove.
2342 * inferiors.h (find_inferior_in_random): Remove.
2343 * linux-low.c (status_pending_p_callback): Return bool, accept
2344 parameter ptid directly.
2345 (linux_wait_for_event_filtered): Use find_thread_in_random.
2346 (linux_wait_1): Likewise.
2347
2348 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2349
2350 * inferiors.c (find_inferior_id): Remove.
2351 (find_thread_ptid): Move implemention from find_inferior_id to
2352 here.
2353 * inferiors.h (find_inferior_id): Remove.
2354 * server.c (handle_status): Use find_thread_ptid.
2355 (process_serial_event): Likewise.
2356 * thread-db.c (find_one_thread): Likewise.
2357 (thread_db_thread_handle): Likewise.
2358 * win32-low.c (thread_rec): Likewise.
2359 (child_delete_thread): Likewise.
2360 (win32_thread_alive): Likewise.
2361 (get_child_debug_event): Likewise.
2362
2363 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2364
2365 * linux-mips-low.c (update_watch_registers_callback): Return
2366 void, remove pid_p parameter, don't check for pid.
2367 (mips_insert_point, mips_remove_point): Use for_each_thread.
2368
2369 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2370
2371 * lynx.low (lynx_delete_thread_callback): Remove.
2372 (lynx_mourn): Use for_each_thread.
2373
2374 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2375
2376 * regcache.c (regcache_invalidate_one): Remove.
2377 (regcache_invalidate_pid): use for_each_thread.
2378
2379 2017-11-26 Tom Tromey <tom@tromey.com>
2380
2381 * linux-low.c (linux_create_inferior): Update.
2382
2383 2017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
2384
2385 * spu-low.c (spu_create_inferior): Fix typo in argument name.
2386
2387 2017-11-24 Alan Hayward <alan.hayward@arm.com>
2388
2389 * configure.srv: Add linux-aarch64-tdesc-selftest.o.
2390 * linux-aarch64-low.c (initialize_low_arch): Call init func.
2391 * linux-aarch64-tdesc-selftest.c: New file.
2392 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
2393
2394 2017-11-24 Alan Hayward <alan.hayward@arm.com>
2395
2396 * configure.srv: Add new file.
2397 * linux-aarch64-low.c (initialize_low_arch): Call init func.
2398 * linux-aarch64-tdesc-selftest.c: New file.
2399 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
2400
2401 2017-11-24 Alan Hayward <alan.hayward@arm.com>
2402
2403 * linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init.
2404 * linux-aarch64-low.c (initialize_low_arch): Remove init.
2405 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
2406
2407 2017-11-24 Alan Hayward <alan.hayward@arm.com>
2408
2409 * configure.srv: Add new files.
2410 * linux-aarch64-ipa.c (get_ipa_tdesc): Call
2411 aarch64_linux_read_description.
2412 * linux-aarch64-low.c (aarch64_linux_read_description):
2413 Merge with aarch64_arch_setup.
2414 (aarch64_arch_setup): Call aarch64_linux_read_description.
2415 * linux-aarch64-tdesc.c: New file.
2416 * linux-aarch64-tdesc.h: New file.
2417
2418 2017-11-24 Yao Qi <yao.qi@linaro.org>
2419
2420 * configure.srv: Set $srv_regobj for tic6x-linux.
2421 * linux-tic6x-low.c: Include "arch/tic6x.h" and "tdesc.h".
2422 (tic6x_read_description): Move some code to tic6x_arch_setup.
2423 (tic6x_tdesc_test): New function.
2424 (initialize_low_arch): Call selftests::register_test.
2425
2426 2017-11-22 Yao Qi <yao.qi@linaro.org>
2427
2428 * remote-utils.c (prepare_resume_reply): Use memcpy.
2429
2430 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2431
2432 * linux-low.c (kill_one_lwp_callback): Return void, take
2433 argument directly, don't filter on pid.
2434 (linux_kill): Use for_each_thread.
2435
2436 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2437
2438 * linux-low.c (need_step_over_p): Return bool, remove dummy
2439 argument.
2440 (linux_resume, proceed_all_lwps): Use find_thread.
2441
2442 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2443
2444 * linux-low.c (resume_status_pending_p): Return bool, remove
2445 flag_p argument.
2446 (linux_resume): Use find_thread.
2447
2448 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2449
2450 * linux-low.c (struct thread_resume_array): Remove.
2451 (linux_set_resume_request): Return void, take arguments
2452 directly.
2453 (linux_resume): Use for_each_thread.
2454
2455 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2456
2457 * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
2458 return bool, remove data argument.
2459 (linux_stabilize_threads): Use find_thread.
2460
2461 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2462
2463 * linux-low.c (unsuspend_one_lwp): Remove.
2464 (unsuspend_all_lwps): Use for_each_thread, inline code from
2465 unsuspend_one_lwp.
2466
2467 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2468
2469 * gdbthread.h (find_thread): Add overload with ptid_t filter.
2470 * linux-low.c (struct iterate_over_lwps_args): Remove.
2471 (iterate_over_lwps_filter): Remove.
2472 (iterate_over_lwps): Use find_thread.
2473
2474 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2475
2476 * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
2477 (linux_handle_new_gdb_connection): Use for_each_thread, inline
2478 code from reset_lwp_ptrace_options_callback.
2479
2480 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2481
2482 * linux-arm-low.c (struct update_registers_data): Remove.
2483 (update_registers_callback): Return void, take arguments
2484 directly, don't check thread's pid.
2485 (arm_insert_point, arm_remove_point): Use for_each_thread.
2486
2487 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2488
2489 * win32-low.c (continue_one_thread): Return void, take argument
2490 directly.
2491 (child_continue): Use for_each_thread.
2492
2493 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2494
2495 * win32-i386-low.c (update_debug_registers_callback): Rename
2496 to ...
2497 (update_debug_registers): ... this, return void, remove pid_p arg.
2498 (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
2499
2500 2017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
2501
2502 * inferiors.h (struct process_info): Add constructor, initialize
2503 fields..
2504 <syscalls_to_catch>: Change type to std::vector<int>.
2505 * inferiors.c (add_process): Allocate process_info with new.
2506 (remove_process): Free process_info with delete.
2507 * linux-low.c (handle_extended_wait): Adjust.
2508 (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
2509 * server.c (handle_general_set): Adjust.
2510
2511 2017-11-16 Pedro Alves <palves@redhat.com>
2512
2513 * remote-utils.c (remote_close): Block SIGIO signals instead of
2514 uninstalling the SIGIO handler.
2515
2516 2017-11-16 Alan Hayward <alan.hayward@arm.com>
2517
2518 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
2519
2520 2017-11-16 Yao Qi <yao.qi@linaro.org>
2521
2522 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
2523 (tic6x_store_gregset): Likewise.
2524 (tic6x_usrregs_info): Move it up.
2525
2526 2017-11-15 Alan Hayward <alan.hayward@arm.com>
2527
2528 * Makefile.in: Update arch rules.
2529 * configure.srv: Explicitly mark arch/ files.
2530
2531 2017-11-13 Andreas Schwab <schwab@suse.de>
2532
2533 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
2534 function.
2535 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2536
2537 2017-11-06 Pedro Alves <palves@redhat.com>
2538
2539 * config.in, configure: Regenerate.
2540
2541 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
2542
2543 * target.c (struct thread_search): Remove.
2544 (thread_search_callback): Remove.
2545 (prepare_to_access_memory): Use for_each_thread instead of
2546 find_inferior. Inline code from thread_search_callback.
2547
2548 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
2549
2550 * server.c (struct visit_actioned_threads_data): Remove.
2551 (visit_actioned_threads): Change prototype to take arguments
2552 directly.
2553 (resume): Use find_thread instead of find_inferior.
2554
2555 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
2556
2557 * server.c (queue_stop_reply_callback): Change prototype, return
2558 void.
2559 (find_status_pending_thread_callback): Remove.
2560 (handle_status): Replace find_inferior with find_thread and
2561 for_each_thread.
2562
2563 2017-10-25 Alan Hayward <alan.hayward@arm.com>
2564
2565 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
2566 with REGNO.
2567 (aarch64_store_gregset): Likewise.
2568 (aarch64_fill_fpregset): Likewise.
2569 (aarch64_store_fpregset): Likewise.
2570
2571 2017-10-21 Simon Marchi <simon.marchi@ericsson.com>
2572
2573 * gdbthread.h (find_thread, for_each_thread): New functions.
2574 * inferiors.c (thread_of_pid): Remove.
2575 (find_any_thread_of_pid): Use find_thread.
2576 * linux-low.c (num_lwps): Use for_each_thread.
2577
2578 2017-10-17 Yao Qi <yao.qi@linaro.org>
2579
2580 * Makefile.in: Remove one rule.
2581 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
2582
2583 2017-10-17 Yao Qi <yao.qi@linaro.org>
2584
2585 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
2586 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
2587
2588 2017-10-17 Yao Qi <yao.qi@linaro.org>
2589
2590 * configure.srv: Rename arm.o with arch/arm.o.
2591
2592 2017-10-17 Yao Qi <yao.qi@linaro.org>
2593
2594 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
2595 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
2596 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
2597 (arch-i386.o, arch-amd64.o): Remove rules.
2598 (arch/%.o): New rule.
2599 Update POSTCOMPILE and COMPILE.pre.
2600 * configure.ac: Invoke AC_CONFIG_COMMANDS.
2601 * configure: Re-generated.
2602 * configure.srv: Replace arch-i386.o with arch/i386.o.
2603 Replace arch-amd64.o with arch/amd64.o.
2604
2605 2017-10-16 Yao Qi <yao.qi@linaro.org>
2606
2607 * configure: Regenerated.
2608
2609 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
2610
2611 * inferiors.h: (struct inferior_list): Remove.
2612 (struct inferior_list_entry); Remove.
2613 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
2614 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
2615 get_first_inferior): Remove.
2616 (for_each_inferior, for_each_inferior_with_data, find_inferior,
2617 find_inferior_id, find_inferior_in_random): Change signature.
2618 * inferiors.c (all_threads): Change type to
2619 std::list<thread_info *>.
2620 (get_thread): Remove macro.
2621 (find_inferior, find_inferior_id): Change signature, implement
2622 using find_thread.
2623 (find_inferior_in_random): Change signature, implement using
2624 find_thread_in_random.
2625 (for_each_inferior, for_each_inferior_with_data): Change
2626 signature, implement using for_each_thread.
2627 (add_inferior_to_list, remove_inferior): Remove.
2628 (add_thread, get_first_thread, thread_of_pid,
2629 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
2630 (get_first_inferior, one_inferior_p, clear_inferior_list):
2631 Remove.
2632 (clear_inferiors, get_thread_process): Update.
2633 * gdbthread.h: Include <list>.
2634 (struct thread_info) <entry>: Remove field.
2635 <id>: New field.
2636 (all_threads): Change type to std::list<thread_info *>.
2637 (get_first_inferior): Add doc.
2638 (find_thread, for_each_thread, find_thread_in_random): New
2639 functions.
2640 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
2641 * linux-arm-low.c (update_registers_callback): Update.
2642 * linux-low.c (second_thread_of_pid_p): Update.
2643 (kill_one_lwp_callback, linux_detach_lwp_callback,
2644 delete_lwp_callback, status_pending_p_callback, same_lwp,
2645 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
2646 iterate_over_lwps, not_stopped_callback,
2647 resume_stopped_resumed_lwps, count_events_callback,
2648 select_singlestep_lwp_callback, select_event_lwp_callback,
2649 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
2650 suspend_and_send_sigstop_callback, wait_for_sigstop,
2651 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
2652 lwp_running, linux_set_resume_request, resume_status_pending_p,
2653 need_step_over_p, start_step_over, linux_resume_one_thread,
2654 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
2655 reset_lwp_ptrace_options_callback): Update.
2656 * linux-mips-low.c (update_watch_registers_callback): Update.
2657 * regcache.c (regcache_invalidate_one, regcache_invalidate):
2658 Update.
2659 (free_register_cache_thread_one): Remove.
2660 (regcache_release): Update.
2661 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
2662 handle_qxfer_threads_worker): Update.
2663 (handle_query): Update, use list iterator.
2664 (visit_actioned_threads, handle_pending_status,
2665 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
2666 clear_pending_status_callback, set_pending_status_callback,
2667 find_status_pending_thread_callback, handle_status,
2668 process_serial_event): Update.
2669 * target.c (thread_search_callback): Update.
2670 * thread-db.c (thread_db_get_tls_address): Update.
2671 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
2672 Update.
2673 * win32-i386-low.c (update_debug_registers_callback): Update.
2674 * win32-low.c (delete_thread_info, child_delete_thread,
2675 continue_one_thread, suspend_one_thread,
2676 get_child_debug_event): Adjust.
2677
2678 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
2679
2680 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
2681 * inferiors.h: Include <list>.
2682 (struct process_info) <entry>: Remove field.
2683 <pid>: New field.
2684 (pid_of): Change macro to function.
2685 (ptid_of, lwpid_of): Remove macro.
2686 (all_processes): Change type to std::list<process_info *>.
2687 (ALL_PROCESSES): Remove macro.
2688 (for_each_process, find_process): New function.
2689 * inferiors.c (all_processes): Change type to
2690 std::list<process_info *>.
2691 (find_thread_process): Adjust.
2692 (add_process): Likewise.
2693 (remove_process): Likewise.
2694 (find_process_pid): Likewise.
2695 (get_first_process): Likewise.
2696 (started_inferior_callback): Remove.
2697 (have_started_inferiors_p): Adjust.
2698 (attached_inferior_callback): Remove.
2699 (have_attached_inferiors_p): Adjust.
2700 * linux-low.c (check_zombie_leaders): Likewise.
2701 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
2702 (x86_linux_update_xmltarget): Adjust.
2703 * server.c (handle_query): Likewise.
2704 (gdb_reattached_process): Remove.
2705 (handle_status): Adjust.
2706 (kill_inferior_callback): Likewise.
2707 (detach_or_kill_inferior): Remove.
2708 (print_started_pid): Likewise.
2709 (print_attached_pid): Likewise.
2710 (detach_or_kill_for_exit): Update.
2711 (process_serial_event): Likewise.
2712 * linux-arm-low.c (arm_new_fork): Likewise.
2713
2714 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
2715
2716 * dll.h: Include <list>.
2717 (struct dll_info): Add constructor.
2718 <entry>: Remove field.
2719 (all_dlls): Change type to std::list<dll_info>.
2720 * dll.c: Include <algorithm>.
2721 (get_dll): Remove macro.
2722 (all_dlls): Change type to std::list<dll_info *>.
2723 (free_one_dll): Remove.
2724 (match_dll): Likewise.
2725 (loaded_dll): Adjust.
2726 (unloaded_dll): Adjust to all_dlls type change, use
2727 std::find_if. Inline code from match_dll.
2728 (clear_dlls): Adjust to all_dlls type change.
2729 * server.c (emit_dll_description): Remove.
2730 (handle_qxfer_libraries): Adjust to all_dlls type change,
2731 integrate emit_dll_description's functionality.
2732
2733 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
2734
2735 * linux-low.h (struct linux_target_ops) <delete_process>: New
2736 field.
2737 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
2738 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
2739 (struct linux_target_ops): Add delete_process callback.
2740 * linux-arm-low.c (arm_delete_process): New.
2741 (struct linux_target_ops): Add delete_process callback.
2742 * linux-bfin-low.c (struct linux_target_ops): Likewise.
2743 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
2744 * linux-m32r-low.c (struct linux_target_ops): Likewise.
2745 * linux-mips-low.c (mips_linux_delete_process): New.
2746 (struct linux_target_ops): Add delete_process callback.
2747 * linux-ppc-low.c (struct linux_target_ops): Likewise.
2748 * linux-s390-low.c (struct linux_target_ops): Likewise.
2749 * linux-sh-low.c (struct linux_target_ops): Likewise.
2750 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
2751 * linux-tile-low.c (struct linux_target_ops): Likewise.
2752 * linux-x86-low.c (x86_linux_delete_process): New.
2753 (struct linux_target_ops): Add delete_process callback.
2754 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
2755
2756 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
2757
2758 * linux-aarch64-low.c (the_low_target): Add thread delete
2759 callback.
2760 * linux-arm-low.c (arm_delete_thread): New function.
2761 (the_low_target): Add thread delete callback.
2762 * linux-bfin-low.c (the_low_target): Likewise.
2763 * linux-crisv32-low.c (the_low_target): Likewise.
2764 * linux-low.c (delete_lwp): Invoke delete_thread callback if
2765 set.
2766 * linux-low.h (struct linux_target_ops) <delete_thread>: New
2767 field.
2768 * linux-m32r-low.c (the_low_target): Add thread delete callback.
2769 * linux-mips-low.c (mips_linux_delete_thread): New function.
2770 (the_low_target): Add thread delete callback.
2771 * linux-ppc-low.c (the_low_target): Likewise.
2772 * linux-s390-low.c (the_low_target): Likewise.
2773 * linux-sh-low.c (the_low_target): Likewise.
2774 * linux-tic6x-low.c (the_low_target): Likewise.
2775 * linux-tile-low.c (the_low_target): Likewise.
2776 * linux-x86-low.c (the_low_target): Likewise.
2777 * linux-xtensa-low.c (the_low_target): Likewise.
2778
2779 2017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
2780
2781 * win32-low.c: Include "common-inferior.h".
2782
2783 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
2784
2785 * inferiors.c (set_inferior_cwd): New function.
2786 * server.c (handle_general_set): Handle QSetWorkingDir packet.
2787 (handle_query): Inform that QSetWorkingDir is supported.
2788 * win32-low.c (create_process): Pass the inferior's cwd to
2789 CreateProcess.
2790
2791 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
2792
2793 * inferiors.c (current_inferior_cwd): New global variable.
2794 (get_inferior_cwd): New function.
2795 * inferiors.h (struct process_info) <cwd>: New field.
2796
2797 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
2798
2799 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
2800 (OBS): Add gdb_tilde_expand.o.
2801
2802 2017-10-02 Simon Marchi <simon.marchi@ericsson.com>
2803
2804 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
2805 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
2806
2807 2017-09-29 Pedro Alves <palves@redhat.com>
2808
2809 * ax.c (gdb_parse_agent_expr): Constify.
2810 * ax.h (gdb_parse_agent_expr): Constify.
2811 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
2812 Constify.
2813 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
2814 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
2815 * remote-utils.h (read_ptid): Constify.
2816 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
2817 (process_point_options, process_serial_event): Constify.
2818 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
2819 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
2820 (cmd_qtbuffer): Constify.
2821
2822 2017-09-29 Pedro Alves <palves@redhat.com>
2823
2824 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
2825 fails.
2826
2827 2017-09-29 Pedro Alves <palves@redhat.com>
2828
2829 * linux-low.c (handle_extended_wait): Pass parent thread instead
2830 of process to thread_db_notice_clone.
2831 * linux-low.h (thread_db_notice_clone): Replace parent process
2832 parameter with parent thread parameter.
2833 * thread-db.c (find_one_thread): Add comment.
2834 (thread_db_notice_clone): Replace parent process parameter with
2835 parent thread parameter. Temporarily switch to the parent thread.
2836
2837 2017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
2838
2839 * gdbthread.h: Include "common-gdbthread.h".
2840 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
2841 "if" when validating the ptid.
2842 * remote-utils.c: Include "gdbthread.h".
2843 (prepare_resume_reply): Use "switch_to_thread".
2844 * target.c (done_accessing_memory): Likewise.
2845
2846 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
2847
2848 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
2849 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
2850 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
2851 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
2852 s390x-gs-linux64-ipa.o to ipa_obj.
2853 * linux-s390-low.c (HWCAP_S390_GS): New define.
2854 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
2855 New functions.
2856 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
2857 (s390_arch_setup): Check for guarded-storage support and choose
2858 appropriate tdesc.
2859 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
2860 init_registers_s390x_gs_linux64.
2861 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
2862 enum value.
2863 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
2864 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
2865
2866 2017-09-22 Simon Marchi <simon.marchi@ericsson.com>
2867
2868 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
2869
2870 2017-09-21 Kevin Buettner <kevinb@redhat.com>
2871
2872 * linux-low.h (struct lwp_info): Add new field, thread_handle.
2873 (thread_db_thread_handle): Declare.
2874 * linux-low.c (linux_target_ops): Initialize thread_handle.
2875 * server.c (handle_qxfer_threads_worker): Add support for
2876 "handle" attribute.
2877 * target.h (struct target_ops): Add new function pointer,
2878 thread_handle.
2879 (target_thread_handle): Define.
2880 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
2881 field in lwp.
2882 (thread_db_thread_handle): New function.
2883
2884 2017-09-21 Kevin Buettner <kevinb@redhat.com>
2885
2886 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
2887 * linux-low.h (thread_db_notice_clone): Declare.
2888 * thread-db.c (thread_db_notice_clone): New function.
2889
2890 2017-09-21 Pedro Alves <palves@redhat.com>
2891
2892 * server.c (gdb_read_memory, handle_status, process_serial_event)
2893 (handle_serial_event, handle_target_event): Adjust to
2894 set_desired_thread prototype change.
2895 * target.c (set_desired_thread): Remove 'use_general' parameter
2896 and adjust.
2897 * target.h (set_desired_thread): Remove 'use_general' parameter.
2898
2899 2017-09-20 Tom Tromey <tom@tromey.com>
2900
2901 * target.c (target_terminal::terminal_state): Define.
2902 (target_terminal::init): Rename from target_terminal_init.
2903 (target_terminal::inferior): Rename from
2904 target_terminal_inferior.
2905 (target_terminal::ours): Rename from target_terminal_ours.
2906 (target_terminal::ours_for_output, target_terminal::info): New.
2907
2908 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
2909
2910 * server.c (accumulate_file_name_length): Remove.
2911 (emit_dll_description): Adjust to std::string change.
2912 (handle_qxfer_libraries): Use std::string to hold document.
2913
2914 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
2915
2916 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
2917 return type of xml_escape_text.
2918 * server.c (emit_dll_description): Likewise.
2919
2920 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
2921
2922 * server.c (captured_main): Accept argument for --selftest.
2923 Update run_tests call.
2924 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
2925 when registering selftests.
2926
2927 2017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
2928
2929 * regcache.c (get_thread_regcache): Update code to use "std::vector"
2930 instead of "VEC" for "target_desc.reg_defs".
2931 (regcache_cpy): Likewise.
2932 (registers_to_string): Likewise.
2933 (registers_from_string): Likewise.
2934 (find_regno): Likewise.
2935 (supply_regblock): Likewise.
2936 (regcache_raw_read_unsigned): Likewise.
2937 * tdesc.c (init_target_desc): Likewise.
2938 (tdesc_create_reg): Likewise.
2939 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
2940 (struct target_desc) <reg_defs>: Convert to "std::vector".
2941 (target_desc): Do not initialize "reg_defs".
2942 (~target_desc): Update code to use "std::vector" instead of "VEC"
2943 for "target_desc.reg_defs".
2944 (operator==): Likewise.
2945
2946 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2947
2948 * inferiors.h (thread_to_gdb_id): Remove.
2949 * inferiors.c (thread_to_gdb_id): Remove.
2950 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
2951 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
2952 lynx_store_registers, lynx_read_memory, lynx_write_memory):
2953 Likewise.
2954 * nto-low.c (nto_fetch_registers, nto_store_registers,
2955 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
2956
2957 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2958
2959 * inferiors.h (gdb_id_to_thread_id): Remove.
2960 * inferiors.c (gdb_id_to_thread_id): Remove.
2961 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
2962 removal. Move pid declaration closer to where it's used.
2963
2964 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2965
2966 * server.c (handle_detach): New function.
2967 (process_serial_event): Move code out, call handle_detach.
2968
2969 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2970
2971 * server.c (require_running): Rename to ...
2972 (require_running_or_return): ... this ...
2973 (require_running_or_break): ... and this.
2974 (handle_query, process_serial_event): Adjust.
2975
2976 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2977
2978 * linux-low.c (linux_set_resume_request): Remove unused
2979 variables.
2980
2981 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2982
2983 * server.c (first_thread_of): Remove.
2984 (process_serial_event): Replace usage of first_thread_of with
2985 find_any_thread_of_pid.
2986 * tracepoint.c (same_process_p): Remove.
2987 (gdb_agent_about_to_close): Replace usage of same_process_p with
2988 find_any_thread_of_pid.
2989 * linux-x86-low.c (same_process_callback): Remove.
2990 (x86_arch_setup_process_callback): Replace usage of
2991 same_process_callback with find_any_thread_of_pid.
2992 * thread-db.c (any_thread_of): Remove.
2993 (switch_to_process): Replace usage of any_thread_of with
2994 find_any_thread_of_pid.
2995 * inferiors.c (thread_pid_matches_callback): Remove.
2996 (find_thread_process): Adjust to use find_any_thread_of_pid.
2997
2998 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
2999
3000 * regcache.c (get_thread_regcache): Guard calls to "memset"
3001 with "!VEC_empty".
3002
3003 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
3004
3005 * linux-low.c (handle_extended_wait): Use
3006 "allocate_target_description" instead of "XNEW".
3007 * linux-x86-low.c (initialize_low_arch): Likewise.
3008
3009 2017-09-05 Yao Qi <yao.qi@linaro.org>
3010
3011 * configure.srv (srv_i386_regobj): Remove.
3012 (srv_amd64_regobj): Remove.
3013 (srv_regobj): Set it to "" for x86 non-linux targets.
3014 * linux-x86-tdesc.c (i386_linux_read_description):
3015 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
3016 (init_registers_i386): Remove the declaration.
3017 (tdesc_i386): Remove the declaration.
3018 (lynx_i386_arch_setup): Call i386_create_target_description.
3019 * nto-x86-low.c: Likewise.
3020 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
3021 [!__x86_64__]: include arch/i386.h.
3022 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
3023
3024 2017-09-05 Yao Qi <yao.qi@linaro.org>
3025
3026 * configure.srv (srv_amd64_linux_xmlfiles): Remove
3027 i386/amd64-XXX-linux from it.
3028
3029 2017-09-05 Yao Qi <yao.qi@linaro.org>
3030
3031 * configure.srv: Empty srv_amd64_linux_regobj if $development is
3032 false.
3033 (ipa_amd64_linux_regobj): Remove.
3034 (ipa_x32_linux_regobj): Remove.
3035
3036 2017-09-05 Yao Qi <yao.qi@linaro.org>
3037
3038 * Makefile.in (arch-amd64.o): New rule.
3039 * configure.srv: Append arch-amd64.o.
3040 * linux-amd64-ipa.c: Include common/x86-xstate.h.
3041 (get_ipa_tdesc): Call amd64_linux_read_description.
3042 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
3043 and init_registers_amd64_XXX.
3044 * linux-x86-low.c (x86_linux_read_description): Call
3045 amd64_linux_read_description.
3046 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
3047 (initialize_low_arch): Don't call init_registers_x32_XXX and
3048 init_registers_amd64_XXX.
3049 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
3050 and tdesc_amd64_XXX.
3051 [__x86_64__] (amd64_tdesc_test): New function.
3052 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
3053 and init_registers_amd64_XXX.
3054 * linux-x86-tdesc.c: Include arch/amd64.h.
3055 (xcr0_to_tdesc_idx): New function.
3056 (i386_linux_read_description): New function.
3057 (amd64_get_ipa_tdesc_idx): New function.
3058 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
3059 (amd64_get_ipa_tdesc): Declare.
3060
3061 2017-09-05 Yao Qi <yao.qi@linaro.org>
3062
3063 * configure.srv (srv_i386_linux_xmlfiles): Remove
3064 i386/i386-XXX-linux.xml from it.
3065
3066 2017-09-05 Yao Qi <yao.qi@linaro.org>
3067
3068 * configure.srv: Set srv_i386_linux_regobj empty if $development
3069 is false.
3070 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
3071 initialize_low_tdesc.
3072 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
3073 with #if initialize_low_tdesc.
3074 * linux-x86-tdesc-selftest.c: New file.
3075 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
3076
3077 2017-09-05 Yao Qi <yao.qi@linaro.org>
3078
3079 * Makefile.in (arch-i386.o): New rule.
3080 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
3081 (x86_64-*-linux*): Likewise.
3082 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
3083 include arch/i386.h.
3084 (i386_linux_read_description): Remove code and call
3085 i386_create_target_description.
3086 * tdesc.c (allocate_target_description): New function.
3087 * tdesc.h (set_tdesc_architecture): Remove declaration.
3088 (set_tdesc_osabi): Likewise.
3089
3090 2017-09-05 Yao Qi <yao.qi@linaro.org>
3091
3092 * linux-x86-tdesc.c: Don't include <inttypes.h>.
3093 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
3094 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
3095 .xmltarget.
3096 * server.c (get_features_xml): Call tdesc_get_features_xml.
3097 * tdesc.c (set_tdesc_architecture): New function.
3098 (set_tdesc_osabi): New function.
3099 (tdesc_get_features_xml): New function.
3100 (tdesc_create_feature): Add an argument.
3101 * tdesc.h (struct target_desc) <features>: New field.
3102 <arch, osabi>: New field.
3103 (~target_desc): xfree features, arch, and osabi.
3104 (target_desc::oerator==): Don't compare .xmltarget.
3105 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
3106 (set_tdesc_osabi): Likewise.
3107 (tdesc_get_features_xml): Likewise.
3108
3109 2017-09-05 Yao Qi <yao.qi@linaro.org>
3110
3111 * linux-x86-tdesc.c: Include selftest.h.
3112 (i386_tdesc_test): New function.
3113 (initialize_low_tdesc): Call selftests::register_test.
3114 * tdesc.h: Include regdef.h.
3115 (target_desc): Override operator == and !=.
3116
3117 2017-09-05 Yao Qi <yao.qi@linaro.org>
3118
3119 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
3120 (ipa_obj): Likewise.
3121 * linux-i386-ipa.c: Include common/x86-xstate.h
3122 (get_ipa_tdesc): Call i386_linux_read_description.
3123 (initialize_low_tracepoint): Don't call init_registers_XXX
3124 functions, call initialize_low_tdesc instead.
3125 * linux-x86-low.c (x86_linux_read_description): Call
3126 i386_linux_read_description.
3127 (initialize_low_arch): Don't call init_registers_i386_XXX
3128 functions, call initialize_low_tdesc.
3129 * linux-x86-tdesc.c: New file.
3130 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
3131 (i386_get_ipa_tdesc_idx): Declare.
3132 (i386_get_ipa_tdesc): Declare.
3133 (initialize_low_tdesc): Declare.
3134
3135 2017-09-05 Yao Qi <yao.qi@linaro.org>
3136
3137 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
3138 instead of 0.
3139
3140 2017-09-05 Yao Qi <yao.qi@linaro.org>
3141
3142 * Makefile.in (IPA_OBJS): Add vec-ipa.o
3143 * regcache.c (get_thread_regcache): Use VEC_length.
3144 (init_register_cache): Likewise.
3145 (regcache_cpy): Likewise.
3146 (registers_to_string): Iterate reg_defs via VEC_iterate.
3147 (find_regno): Likewise.
3148 (find_register_by_number): Use VEC_index.
3149 (register_size): Call find_register_by_number.
3150 (register_data): Call find_register_by_number.
3151 (supply_regblock): Use VEC_length.
3152 (regcache_raw_read_unsigned): Likewise.
3153 * tdesc.c (init_target_desc): Iterate reg_defs via
3154 VEC_iterate.
3155 (default_description): Update initializer.
3156 (copy_target_description): Don't update field num_registers.
3157 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
3158 <num_registers>: Remove.
3159
3160 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
3161
3162 * Makefile.in (.SECONDARY): Define target.
3163
3164 2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
3165
3166 * linux-low.c (linux_wait_1): Adjust.
3167 * server.c (queue_stop_reply_callback): Adjust.
3168
3169 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
3170
3171 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
3172 QEnvironmentUnset and QEnvironmentReset packets.
3173 (handle_query): Inform remote that QEnvironmentHexEncoded,
3174 QEnvironmentUnset and QEnvironmentReset are supported.
3175
3176 2017-08-25 Simon Marchi <simon.marchi@ericsson.com>
3177
3178 * inferiors.h (inferior_target_data): Rename to ...
3179 (thread_target_data): ... this.
3180 (inferior_regcache_data): Rename to ...
3181 (thread_regcache_data): ... this.
3182 (set_inferior_regcache_data): Rename to ...
3183 (set_thread_regcache_data): ... this.
3184 * inferiors.c (inferior_target_data): Rename to ...
3185 (thread_target_data): ... this.
3186 (inferior_regcache_data): Rename to ...
3187 (thread_regcache_data): ... this.
3188 (set_inferior_regcache_data): Rename to ...
3189 (set_thread_regcache_data): ... this.
3190 (free_one_thread): Update.
3191 * linux-low.h (get_thread_lwp): Update.
3192 * regcache.c (get_thread_regcache): Update.
3193 (regcache_invalidate_thread): Update.
3194 (free_register_cache_thread): Update.
3195 * win32-i386-low.c (update_debug_registers_callback): Update.
3196 (win32_get_current_dr): Update.
3197 * win32-low.c (thread_rec): Update.
3198 (delete_thread_info): Update.
3199 (continue_one_thread): Update.
3200 (suspend_one_thread): Update.
3201
3202 2017-08-24 Simon Marchi <simon.marchi@ericsson.com>
3203
3204 * inferiors.c (set_inferior_target_data): Remove.
3205 * inferiors.h (set_inferior_target_data): Remove.
3206
3207 2017-08-18 Yao Qi <yao.qi@linaro.org>
3208
3209 * Makefile.in (OBS): Add selftest.o.
3210 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
3211 * configure, config.in: Re-generated.
3212 * server.c: Include common/sefltest.h.
3213 (captured_main): Handle option --selftest.
3214
3215 2017-08-09 Yao Qi <yao.qi@linaro.org>
3216
3217 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
3218 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
3219 i386-avx-mpx.o and i386-mmx.o.
3220 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
3221 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
3222 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
3223 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
3224 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
3225 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
3226 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
3227 i386/amd64-avx-mpx.xml.
3228
3229 2017-08-09 Yao Qi <yao.qi@linaro.org>
3230
3231 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
3232 and x32-avx-avx512.o.
3233 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
3234 i386/x32-avx-avx512.xml.
3235
3236 2017-07-26 Simon Marchi <simon.marchi@ericsson.com>
3237
3238 * tracepoint.h (enum class fast_tpoint_collect_result): New
3239 enumeration.
3240 (fast_tracepoint_collecting): Change return type to
3241 fast_tpoint_collect_result.
3242 * tracepoint.c (fast_tracepoint_collecting): Likewise.
3243 * linux-low.h: Include tracepoint.h.
3244 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
3245 fast_tpoint_collect_result.
3246 * linux-low.c (handle_tracepoints): Adjust.
3247 (linux_fast_tracepoint_collecting): Change return type to
3248 fast_tpoint_collect_result.
3249 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
3250 linux_wait_1, stuck_in_jump_pad_callback,
3251 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
3252 proceed_one_lwp): Adjust to type change.
3253
3254 2017-07-10 Yao Qi <yao.qi@linaro.org>
3255
3256 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
3257
3258 2017-06-29 Yao Qi <yao.qi@linaro.org>
3259
3260 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
3261 Remove.
3262 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
3263
3264 2017-06-20 Simon Marchi <simon.marchi@ericsson.com>
3265
3266 * Makefile.in (IPA_OBJS): Sort and format one item per line.
3267
3268 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
3269
3270 * linux-low.c (linux_create_inferior): Adjust code to access the
3271 environment information via 'gdb_environ' class.
3272 * lynx-low.c (lynx_create_inferior): Likewise.
3273 * server.c (our_environ): Make it an instance of 'gdb_environ'.
3274 (get_environ): Return a pointer to 'our_environ'.
3275 (captured_main): Initialize 'our_environ'.
3276 * server.h (get_environ): Adjust prototype.
3277 * spu-low.c (spu_create_inferior): Adjust code to access the
3278 environment information via 'gdb_environ' class.
3279
3280 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
3281
3282 * linux-low.c (linux_read_memory, linux_write_memory): Remove
3283 usage of "register" keyword.
3284
3285 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
3286
3287 * configure: Re-generate.
3288
3289 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
3290
3291 * configure: Re-generate.
3292
3293 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
3294
3295 * Makefile.in (COMPILE.pre): Add "-x c++".
3296
3297 2017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
3298
3299 * fork-child.c: Conditionally include <signal.h>.
3300
3301 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
3302
3303 * server.c (handle_general_set): Handle new packet
3304 "QStartupWithShell".
3305 (handle_query): Add "QStartupWithShell" to the list of supported
3306 packets.
3307 (gdbserver_usage): Add help text explaining the
3308 new "--startup-with-shell" and "--no-startup-with-shell" CLI
3309 options.
3310 (captured_main): Recognize and act upon the presence of the new
3311 CLI options.
3312
3313 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
3314 Pedro Alves <palves@redhat.com>
3315
3316 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
3317 * configure: Regenerate.
3318 * configure.srv (srv_linux_obj): Add "fork-child.o" and
3319 "fork-inferior.o".
3320 (i[34567]86-*-lynxos*): Likewise.
3321 (spu*-*-*): Likewise.
3322 * fork-child.c: New file.
3323 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
3324 and "environ.h".
3325 (linux_ptrace_fun): New function.
3326 (linux_create_inferior): Adjust function prototype to reflect
3327 change on "target.h". Adjust function code to use
3328 "fork_inferior".
3329 (linux_request_interrupt): Delete "signal_pid".
3330 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
3331 (lynx_ptrace_fun): New function.
3332 (lynx_create_inferior): Adjust function prototype to reflect
3333 change on "target.h". Adjust function code to use
3334 "fork_inferior".
3335 * nto-low.c (nto_create_inferior): Adjust function prototype and
3336 code to reflect change on "target.h". Update comments.
3337 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
3338 "common-terminal.h" and "environ.h".
3339 (terminal_fd): Moved to fork-child.c.
3340 (old_foreground_pgrp): Likewise.
3341 (restore_old_foreground_pgrp): Likewise.
3342 (last_status): Make it global.
3343 (last_ptid): Likewise.
3344 (our_environ): New variable.
3345 (startup_with_shell): Likewise.
3346 (program_name): Likewise.
3347 (program_argv): Rename to...
3348 (program_args): ...this.
3349 (wrapper_argv): New variable.
3350 (start_inferior): Delete function.
3351 (get_exec_wrapper): New function.
3352 (get_exec_file): Likewise.
3353 (get_environ): Likewise.
3354 (prefork_hook): Likewise.
3355 (post_fork_inferior): Likewise.
3356 (postfork_hook): Likewise.
3357 (postfork_child_hook): Likewise.
3358 (handle_v_run): Update code to deal with arguments coming from the
3359 remote host. Update calls from "start_inferior" to
3360 "create_inferior".
3361 (captured_main): Likewise. Initialize environment variable. Call
3362 "have_job_control".
3363 * server.h (post_fork_inferior): New prototype.
3364 (get_environ): Likewise.
3365 (last_status): Declare.
3366 (last_ptid): Likewise.
3367 (signal_pid): Likewise.
3368 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
3369 (spu_ptrace_fun): New function.
3370 (spu_create_inferior): Adjust function prototype to reflect change
3371 on "target.h". Adjust function code to use "fork_inferior".
3372 * target.c (target_terminal_init): New function.
3373 (target_terminal_inferior): Likewise.
3374 (target_terminal_ours): Likewise.
3375 * target.h: Include <vector>.
3376 (struct target_ops) <create_inferior>: Update prototype.
3377 (create_inferior): Update macro.
3378 * utils.c (gdb_flush_out_err): New function.
3379 * win32-low.c (win32_create_inferior): Adjust function prototype
3380 and code to reflect change on "target.h".
3381
3382 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
3383
3384 * inferiors.c (switch_to_thread): New function.
3385
3386 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
3387
3388 * Makefile.in (SFILE): Add "common/job-control.c".
3389 (OBS): Add "job-control.o".
3390
3391 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
3392
3393 * Makefile: Remove "@host_makefile_frag@".
3394
3395 2017-05-05 Pedro Alves <palves@redhat.com>
3396
3397 * configure: Regenerate.
3398
3399 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
3400
3401 * configure: Regenerate.
3402
3403 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
3404
3405 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
3406 software_single_step change of return type to
3407 std::vector<CORE_ADDR>.
3408 * linux-low.c (install_software_single_step_breakpoints):
3409 Likewise.
3410 * linux-low.h (install_software_single_step_breakpoints):
3411 Likewise.
3412
3413 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
3414
3415 * remote-utils.c: Include "gdb_termios.h" instead of
3416 "terminal.h".
3417 * terminal.h: Delete file.
3418
3419 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
3420
3421 * server.c: Include <vector>.
3422 <program_argv, wrapper_argv>: Convert to std::vector.
3423 (start_inferior): Rewrite function to use C++.
3424 (handle_v_run): Likewise. Update code that calculates the argv
3425 based on the vRun packet; use C++.
3426 (captured_main): Likewise.
3427
3428 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
3429
3430 * server.c (handle_v_cont): Initialize thread_resume::thread
3431 with null_ptid.
3432
3433 2017-04-05 Pedro Alves <palves@redhat.com>
3434
3435 * configure: Regenerate.
3436
3437 2017-04-05 Pedro Alves <palves@redhat.com>
3438
3439 * gdbreplay.c (sync_error): Constify.
3440 * linux-x86-low.c (push_opcode): Constify.
3441
3442 2017-04-05 Pedro Alves <palves@redhat.com>
3443
3444 * win32-low.c (get_child_debug_event)
3445 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
3446 Report TARGET_WAITKIND_SPURIOUS instead.
3447
3448 2017-04-05 Pedro Alves <palves@redhat.com>
3449
3450 * remote-utils.c (remote_prepare, remote_open): Constify.
3451 * remote-utils.h (remote_prepare, remote_open): Constify.
3452 * server.c (captured_main): Constify 'port' handling.
3453
3454 2017-04-04 Simon Marchi <simon.marchi@ericsson.com>
3455
3456 * Makefile.in (clean): Clear .deps.
3457
3458 2017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
3459
3460 * .gitignore: Remove generated files, replace with wildcard.
3461 * (clean): Replace removal of generated files with wildcard.
3462 (version.c): Replace with...
3463 (version-generated.c): ...this.
3464 (xml-builtin.c): Replace with...
3465 (xml-builtin-generated.c): ...this.
3466 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
3467 (%.c: *regformats*): Replace with...
3468 (%-generated.c: *regformats*): ...this.
3469
3470 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
3471
3472 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
3473 (xtensa_fill_gregset): Call collect_register_by_name for
3474 threadptr register.
3475 (xtensa_store_gregset): Call supply_register_by_name for
3476 threadptr register.
3477
3478 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
3479
3480 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
3481 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
3482 (xtensa_store_gregset): Call supply_register for all registers in
3483 a0_regnum..a0_regnum + C0_NREGS range.
3484
3485 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3486
3487 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
3488 (ax-ipa.o: ax.c): Remove.
3489 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
3490 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
3491 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
3492 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
3493 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
3494
3495 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3496
3497 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
3498 (print-utils-ipa.o: ../common/print-utils.c): Remove.
3499 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
3500 (errors-ipa.o: ../common/errors.c): Remove.
3501 (format-ipa.o: ../common/format.c): Remove.
3502 (common-utils-ipa.o: ../common/common-utils.c): Remove.
3503
3504 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3505
3506 * Makefile.in (%-ipa.o: %.c): New rule.
3507 (tracepoint-ipa.o: tracepoint.c): Remove.
3508 (utils-ipa.o: utils.c): Remove.
3509 (remote-utils-ipa.o: remote-utils.c): Remove.
3510 (regcache-ipa.o: regcache.c): Remove.
3511 (i386-linux-ipa.o: i386-linux.c): Remove.
3512 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
3513 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
3514 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
3515 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
3516 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
3517 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
3518 (amd64-linux-ipa.o: amd64-linux.c): Remove.
3519 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
3520 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
3521 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
3522 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
3523 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
3524 (aarch64-ipa.o: aarch64.c): Remove.
3525 (s390-linux32-ipa.o: s390-linux32.c): Remove.
3526 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
3527 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
3528 (s390-linux64-ipa.o: s390-linux64.c): Remove.
3529 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
3530 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
3531 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
3532 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
3533 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
3534 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
3535 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
3536 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
3537 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
3538 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
3539 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
3540 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
3541 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
3542 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
3543 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
3544 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
3545 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
3546 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
3547 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
3548 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
3549 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
3550 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
3551 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
3552 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
3553 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
3554 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
3555 (tdesc-ipa.o: tdesc.c): Remove.
3556 (x32-linux-ipa.o: x32-linux.c): Remove.
3557 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
3558 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
3559
3560 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3561
3562 * Makefile.in (%.o: ../arch/%.c): New rule.
3563 (arm.o: ../arch/arm.c): Remove.
3564 (arm-linux.o: ../arch/arm-linux.c): Remove.
3565 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
3566 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
3567
3568 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3569
3570 * Makefile.in (%.o: ../nat/%.c): New rule.
3571 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
3572 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
3573 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
3574 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
3575 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
3576 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
3577 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
3578 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
3579 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
3580 (linux-personality.o: ../nat/linux-personality.c): Remove.
3581 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
3582 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
3583 (x86-linux.o: ../nat/x86-linux.c): Remove.
3584 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
3585 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
3586
3587 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3588
3589 * Makefile.in (%.o: ../common/%.c): New rule.
3590 (signals.o: ../common/signals.c): Remove.
3591 (print-utils.o: ../common/print-utils.c): Remove.
3592 (rsp-low.o: ../common/rsp-low.c): Remove.
3593 (common-utils.o: ../common/common-utils.c): Remove.
3594 (posix-strerror.o: ../common/posix-strerror.c): Remove.
3595 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
3596 (vec.o: ../common/vec.c): Remove.
3597 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
3598 (xml-utils.o: ../common/xml-utils.c): Remove.
3599 (ptid.o: ../common/ptid.c): Remove.
3600 (buffer.o: ../common/buffer.c): Remove.
3601 (format.o: ../common/format.c): Remove.
3602 (filestuff.o: ../common/filestuff.c): Remove.
3603 (agent.o: ../common/agent.c): Remove.
3604 (errors.o: ../common/errors.c): Remove.
3605 (environ.o: ../common/environ.c): Remove.
3606 (common-debug.o: ../common/common-debug.c): Remove.
3607 (cleanups.o: ../common/cleanups.c): Remove.
3608 (common-exceptions.o: ../common/common-exceptions.c): Remove.
3609 (fileio.o: ../common/fileio.c): Remove.
3610 (common-regcache.o: ../common/common-regcache.c): Remove.
3611 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
3612 (new-op.o: ../common/new-op.c): Remove.
3613 (btrace-common.o: ../common/btrace-common.c): Remove.
3614
3615 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3616
3617 * Makefile.in (%.o: ../target/%.c): New rule.
3618 (waitstatus.o: ../target/waitstatus.c): Remove.
3619
3620 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3621
3622 * Makefile.in
3623 (%.c: ../regformats/%.dat,
3624 (%.c: ../regformats/arm/%.dat,
3625 (%.c: ../regformats/i386/%.dat,
3626 (%.c: ../regformats/rs6000/%.dat): New rules.
3627 (aarch64.c): Remove.
3628 (reg-arm.c): Remove.
3629 (arm-with-iwmmxt.c): Remove.
3630 (arm-with-vfpv2.c): Remove.
3631 (arm-with-vfpv3.c): Remove.
3632 (arm-with-neon.c): Remove.
3633 (reg-bfin.c): Remove.
3634 (reg-cris.c): Remove.
3635 (reg-crisv32.c): Remove.
3636 (i386.c): Remove.
3637 (i386-linux.c): Remove.
3638 (i386-avx.c): Remove.
3639 (i386-avx-linux.c): Remove.
3640 (i386-avx-avx512.c): Remove.
3641 (i386-avx-avx512-linux.c): Remove.
3642 (i386-mpx.c): Remove.
3643 (i386-mpx-linux.c): Remove.
3644 (i386-avx-mpx-avx512-pku.c): Remove.
3645 (i386-avx-mpx-avx512-pku-linux.c): Remove.
3646 (i386-avx-mpx.c): Remove.
3647 (i386-avx-mpx-linux.c): Remove.
3648 (i386-mmx.c): Remove.
3649 (i386-mmx-linux.c): Remove.
3650 (reg-ia64.c): Remove.
3651 (reg-m32r.c): Remove.
3652 (reg-m68k.c): Remove.
3653 (reg-cf.c): Remove.
3654 (mips-linux.c): Remove.
3655 (mips-dsp-linux.c): Remove.
3656 (mips64-linux.c): Remove.
3657 (mips64-dsp-linux.c): Remove.
3658 (nios2-linux.c): Remove.
3659 (powerpc-32.c): Remove.
3660 (powerpc-32l.c): Remove.
3661 (powerpc-altivec32l.c): Remove.
3662 (powerpc-cell32l.c): Remove.
3663 (powerpc-vsx32l.c): Remove.
3664 (powerpc-isa205-32l.c): Remove.
3665 (powerpc-isa205-altivec32l.c): Remove.
3666 (powerpc-isa205-vsx32l.c): Remove.
3667 (powerpc-e500l.c): Remove.
3668 (powerpc-64l.c): Remove.
3669 (powerpc-altivec64l.c): Remove.
3670 (powerpc-cell64l.c): Remove.
3671 (powerpc-vsx64l.c): Remove.
3672 (powerpc-isa205-64l.c): Remove.
3673 (powerpc-isa205-altivec64l.c): Remove.
3674 (powerpc-isa205-vsx64l.c): Remove.
3675 (s390-linux32.c): Remove.
3676 (s390-linux32v1.c): Remove.
3677 (s390-linux32v2.c): Remove.
3678 (s390-linux64.c): Remove.
3679 (s390-linux64v1.c): Remove.
3680 (s390-linux64v2.c): Remove.
3681 (s390-te-linux64.c): Remove.
3682 (s390-vx-linux64.c): Remove.
3683 (s390-tevx-linux64.c): Remove.
3684 (s390x-linux64.c): Remove.
3685 (s390x-linux64v1.c): Remove.
3686 (s390x-linux64v2.c): Remove.
3687 (s390x-te-linux64.c): Remove.
3688 (s390x-vx-linux64.c): Remove.
3689 (s390x-tevx-linux64.c): Remove.
3690 (tic6x-c64xp-linux.c): Remove.
3691 (tic6x-c64x-linux.c): Remove.
3692 (tic6x-c62x-linux.c): Remove.
3693 (reg-sh.c): Remove.
3694 (reg-sparc64.c): Remove.
3695 (reg-spu.c): Remove.
3696 (amd64.c): Remove.
3697 (amd64-linux.c): Remove.
3698 (amd64-avx.c): Remove.
3699 (amd64-avx-linux.c): Remove.
3700 (amd64-avx-avx512.c): Remove.
3701 (amd64-avx-avx512-linux.c): Remove.
3702 (amd64-mpx.c): Remove.
3703 (amd64-mpx-linux.c): Remove.
3704 (amd64-avx-mpx-avx512-pku.c): Remove.
3705 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
3706 (amd64-avx-mpx.c): Remove.
3707 (amd64-avx-mpx-linux.c): Remove.
3708 (x32.c): Remove.
3709 (x32-linux.c): Remove.
3710 (x32-avx.c): Remove.
3711 (x32-avx-linux.c): Remove.
3712 (x32-avx-avx512.c): Remove.
3713 (x32-avx-avx512-linux.c): Remove.
3714 (reg-xtensa.c): Remove.
3715 (reg-tilegx.c): Remove.
3716 (reg-tilegx32.c): Remove.
3717
3718 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
3719
3720 * Makefile.in (SFILES): Add "common/environ.c".
3721 (OBJS): Add "common/environ.h".
3722
3723 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
3724
3725 * configure.ac: Check if the fs_base and gs_base members of
3726 `struct user_regs_struct' exist.
3727 * config.in: Regenerated.
3728 * configure: Likewise.
3729
3730 2017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
3731
3732 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
3733 target_read_memory.
3734 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
3735 (get_next_pcs_syscall_next_pc): Likewise.
3736
3737 2016-12-23 Luis Machado <lgustavo@codesourcery.com>
3738
3739 * win32-i386-low.c: Fix incorrect reference to a couple source files.
3740 * nto-x86-low.c: Likewise.
3741
3742 2016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
3743
3744 * Makefile.in: Include disable-implicit-rules.mk.
3745
3746 2016-11-23 Pedro Alves <palves@redhat.com>
3747
3748 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
3749 (debug_vprintf): Use std::chrono::steady_clock instead of
3750 gettimeofday. Use '.' instead of ':'.
3751 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
3752 (get_timestamp): Use std::chrono::steady_clock instead of
3753 gettimeofday.
3754
3755 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
3756
3757 * Makefile.in: Fix whitespace formatting.
3758
3759 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
3760
3761 * Makefile.in (SFILES, OBS): Flatten list and order
3762 alphabetically.
3763
3764 2016-11-23 Pedro Alves <palves@redhat.com>
3765
3766 * event-loop.c (handle_file_event): Use warning.
3767 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
3768 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
3769 Use warning.
3770
3771 2016-11-23 Pedro Alves <palves@redhat.com>
3772
3773 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
3774 output.
3775 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
3776 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
3777 debug_printf and debug_flush for debug output.
3778 * server.c (handle_general_set): Likewise.
3779 * thread-db.c (try_thread_db_load): Use debug_printf for debug
3780 output.
3781
3782 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
3783
3784 * Makefile.in (.c.o): Replace rule with ...
3785 (%.o: %.c): ... this one.
3786
3787 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
3788
3789 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
3790 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
3791 make.
3792 * configure.ac: Remove checks for the make program.
3793 * configure: Re-generate.
3794
3795 2016-10-28 Pedro Alves <palves@redhat.com>
3796
3797 * Makefile.in (CXX_DIALECT): Get from configure.
3798 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
3799 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
3800 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
3801 * config.in: Regenerate.
3802 * configure: Regenerate.
3803
3804 2016-10-27 Yao Qi <yao.qi@linaro.org>
3805
3806 * linux-low.c (linux_supports_range_stepping): Return true if
3807 can_software_single_step return true.
3808
3809 2016-10-27 Yao Qi <yao.qi@linaro.org>
3810
3811 * inferiors.c (find_inferior_in_random): New function.
3812 * inferiors.h (find_inferior_in_random): Declare.
3813 * linux-low.c (linux_wait_for_event_filtered): Call
3814 find_inferior_in_random instead of find_inferior.
3815
3816 2016-10-27 Yao Qi <yao.qi@linaro.org>
3817
3818 * linux-low.c (linux_wait_1): If single-step breakpoints are
3819 inserted, remove them.
3820
3821 2016-10-26 Pedro Alves <palves@redhat.com>
3822
3823 * linux-low.c (handle_extended_wait): Link parent/child fork
3824 threads.
3825 (linux_wait_1): Unlink them.
3826 (linux_set_resume_request): Ignore resume requests for
3827 already-resumed and unhandled fork child threads.
3828 * linux-low.h (struct lwp_info) <fork_relative>: New field.
3829 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
3830 New functions.
3831 (handle_v_requests) <vCont>: Don't call require_running.
3832 * server.h (in_queued_stop_replies): New declaration.
3833
3834 2016-10-24 Yao Qi <yao.qi@linaro.org>
3835
3836 PR server/20733
3837 * linux-aarch64-low.c (append_insns): Cast the return value to
3838 'uint32_t *'.
3839
3840 2016-10-10 Yao Qi <yao.qi@linaro.org>
3841
3842 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
3843
3844 2016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
3845
3846 * target.c (target_supports_multi_process): New function, moved
3847 from...
3848 * target.h (target_supports_multi_process): ... here. Remove
3849 macro.
3850
3851 2016-10-05 Tom Tromey <tom@tromey.com>
3852
3853 PR remote/20655:
3854 * tracepoint.c (handle_tracepoint_bkpts): Check
3855 ipa_error_tracepoint, not ipa_stopping_tracepoint.
3856
3857 2016-10-05 Yao Qi <yao.qi@linaro.org>
3858
3859 * configure.srv: Update the path of arm-*.xml files.
3860
3861 2016-10-05 Terry Guo <terry.guo@arm.com>
3862 Yao Qi <yao.qi@linaro.org>
3863
3864 * Makefile.in: Adjust the path of rules.
3865 * configure.srv: Update the path of xml files.
3866 * regformats/arm-with-iwmmxt.dat: Regenerated.
3867 * regformats/arm-with-neon.dat: Likewise.
3868 * regformats/arm-with-vfpv2.dat: Likewise.
3869 * regformats/arm-with-vfpv3.dat Likewise.
3870
3871 2016-09-30 Yao Qi <yao.qi@linaro.org>
3872
3873 PR gdbserver/20627
3874 * target.c (target_stop_and_wait): Don't call
3875 target_continue_no_signal, use resume_stop instead.
3876
3877 2016-09-26 Yao Qi <yao.qi@linaro.org>
3878
3879 * linux-low.c (linux_wait_1): Call debug_exit.
3880
3881 2016-09-23 Pedro Alves <palves@redhat.com>
3882
3883 * Makefile.in (SFILES): Add common/new-op.c.
3884 (OBS): Add common/new-op.o.
3885 (new-op.o): New rule.
3886
3887 2016-09-21 Simon Marchi <simon.marchi@ericsson.com>
3888
3889 * .gitinore: Ignore more files.
3890
3891 2016-09-21 Yao Qi <yao.qi@linaro.org>
3892
3893 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
3894 23.
3895
3896 2016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
3897
3898 * server.c (start_inferior): Call target_mourn_inferior instead of
3899 mourn_inferior; pass ptid_t argument to it.
3900 (resume): Likewise.
3901 (handle_target_event): Likewise.
3902 * target.c (target_mourn_inferior): New function.
3903 * target.h (mourn_inferior): Delete macro.
3904
3905 2016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
3906
3907 * linux-low.c (lwp_is_stepping): New function.
3908
3909 2016-09-06 Carl Love <cel@us.ibm.com>
3910
3911 * server.c (start_inferior): Fixed comment, requested comment change
3912 didn't get updated correctly. Removed reference to ptrace () call as
3913 it is only true on Linux systems.
3914
3915 2016-09-06 Carl Love <cel@us.ibm.com>
3916
3917 * server.c (start_inferior): Do not call
3918 function target_post_create_inferior () if the
3919 inferior process has already exited.
3920
3921 2016-09-05 Pedro Alves <palves@redhat.com>
3922
3923 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
3924 (COMPILE.pre, CC_LD): Use CXX directly.
3925 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
3926 * acinclude.m4: Don't include build-with-cxx.m4.
3927 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
3928 * configure: Regenerate.
3929
3930 2016-09-02 Akash Trehan <akash.trehan123@gmail.com>
3931
3932 PR gdb/19495
3933 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
3934 call writing data to own_buf.
3935
3936 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
3937
3938 * target.c (mywait): Call target_wait instead of
3939 the_target->wait.
3940 (target_wait): New function.
3941
3942 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
3943
3944 * server.c (start_inferior): New variable 'ptid'. Replace calls
3945 to the_target->resume by target_continue{,_no_signal}, depending
3946 on the case.
3947 * target.c (target_stop_and_wait): Call target_continue_no_signal
3948 instead of the_target->resume.
3949 (target_continue): New function.
3950
3951 2016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
3952
3953 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
3954
3955 2016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
3956
3957 PR server/20491
3958 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
3959 ps_prochandle.
3960 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
3961 * linux-arm-low.c (ps_get_thread_area): Likewise.
3962 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
3963 * linux-m68k-low.c (ps_get_thread_area): Likewise.
3964 * linux-mips-low.c (ps_get_thread_area): Likewise.
3965 * linux-nios2-low.c (ps_get_thread_area): Likewise.
3966 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
3967 * linux-x86-low.c (ps_get_thread_area): Likewise.
3968 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
3969
3970 2016-08-19 Pedro Alves <palves@redhat.com>
3971
3972 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
3973
3974 2016-08-19 Pedro Alves <palves@redhat.com>
3975
3976 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
3977 comment. Use memcpy instead of casting through unsigned long.
3978
3979 2016-08-19 Pedro Alves <palves@redhat.com>
3980
3981 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
3982 allocating around 0x80000000.
3983
3984 2016-08-19 Pedro Alves <palves@redhat.com>
3985
3986 PR gdb/20415
3987 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
3988 (x32-avx512-linux-ipa.o): New rules.
3989 * configure.ac (x86_64-*-linux*): New x32 check.
3990 * configure.srv (ipa_x32_linux_regobj): New.
3991 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
3992 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
3993 descriptions.
3994 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
3995 descriptions.
3996 * configure: Regenerate.
3997
3998 2016-08-09 Pedro Alves <palves@redhat.com>
3999
4000 PR gdb/18653
4001 * Makefile.in (OBS): Add signals-state-save-restore.o.
4002 (signals-state-save-restore.o): New rule.
4003 * config.in: Regenerate.
4004 * configure: Regenerate.
4005 * linux-low.c: Include "signals-state-save-restore.h".
4006 (linux_create_inferior): Call
4007 restore_original_signals_state.
4008 * server.c: Include "dispositions-save-restore.h".
4009 (captured_main): Call save_original_signals_state.
4010
4011 2016-08-05 Pedro Alves <palves@redhat.com>
4012
4013 * configure: Regenerate.
4014
4015 2016-08-04 Yao Qi <yao.qi@linaro.org>
4016
4017 * linux-low.c (regsets_fetch_inferior_registers): Check
4018 errno is ESRCH or not.
4019
4020 2016-08-02 Yao Qi <yao.qi@linaro.org>
4021
4022 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
4023 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
4024 (thread_db_load_search): Update.
4025 (try_thread_db_load_1): Don't look for td_ta_event_addr,
4026 td_ta_set_event and td_ta_event_getmsg.
4027
4028 2016-07-26 Pedro Alves <palves@redhat.com>
4029
4030 PR server/20414
4031 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
4032 of unsigned long for 64-bit registers and use uint32_t instead of
4033 unsigned int for 32-bit registers.
4034
4035 2016-07-26 Pedro Alves <palves@redhat.com>
4036
4037 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
4038 to 'ptrace'.
4039
4040 2016-07-21 Tom Tromey <tom@tromey.com>
4041
4042 * configure: Rebuild.
4043
4044 2016-07-21 Yao Qi <yao.qi@linaro.org>
4045
4046 * mem-break.c (find_gdb_breakpoint): Cast bp to
4047 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
4048
4049 2016-07-21 Yao Qi <yao.qi@linaro.org>
4050
4051 * server.c (handle_v_requests): Support s and S actions
4052 if target_supports_software_single_step return true.
4053
4054 2016-07-21 Yao Qi <yao.qi@linaro.org>
4055
4056 * linux-low.c (resume_stopped_resumed_lwps): If resume request
4057 is resume_step, call maybe_hw_step.
4058 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
4059 and unstop them.
4060 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
4061 breakpoints or not.
4062 (proceed_one_lwp): If resume request is resume_step, install
4063 reinsert breakpoints and call maybe_hw_step.
4064
4065 2016-07-21 Yao Qi <yao.qi@linaro.org>
4066
4067 * linux-low.c (proceed_one_lwp): Declare.
4068 (linux_resume_one_thread): Remove local variable 'step'.
4069 Lift code enqueue signal. Call proceed_one_lwp instead of
4070 linux_resume_one_lwp.
4071
4072 2016-07-21 Yao Qi <yao.qi@linaro.org>
4073
4074 * linux-low.c (linux_resume_one_thread): Call
4075 enqueue_pending_signal.
4076
4077 2016-07-21 Yao Qi <yao.qi@linaro.org>
4078
4079 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
4080 * inferiors.c (do_restore_current_thread_cleanup): New function.
4081 (make_cleanup_restore_current_thread): Likewise.
4082 * linux-low.c (install_software_single_step_breakpoints): Call
4083 make_cleanup_restore_current_thread. Switch current_thread to
4084 thread.
4085
4086 2016-07-21 Yao Qi <yao.qi@linaro.org>
4087
4088 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
4089 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
4090 (clone_one_breakpoint): Likewise.
4091 (delete_reinsert_breakpoints): Change parameter to thread.
4092 Callers updated.
4093 (has_reinsert_breakpoints): Likewise.
4094 (uninsert_reinsert_breakpoints): Likewise.
4095 (reinsert_reinsert_breakpoints): Likewise.
4096 * mem-break.h (set_reinsert_breakpoint): Update declaration.
4097 (delete_reinsert_breakpoints): Likewise.
4098 (reinsert_reinsert_breakpoints): Likewise.
4099 (uninsert_reinsert_breakpoints): Likewise.
4100 (has_reinsert_breakpoints): Likewise.
4101
4102 2016-07-21 Yao Qi <yao.qi@linaro.org>
4103
4104 * inferiors.c (get_thread_process): Make parameter const.
4105 * inferiors.h (get_thread_process): Update declaration.
4106 * mem-break.c (clone_all_breakpoints): Remove all parameters.
4107 Add new parameters child_thread and parent_thread. Callers
4108 updated.
4109 * mem-break.h (clone_all_breakpoints): Update declaration.
4110
4111 2016-07-21 Yao Qi <yao.qi@linaro.org>
4112
4113 * mem-break.c (struct breakpoint) <cond_list>: Remove.
4114 <command_list, handler>: Remove.
4115 (struct gdb_breakpoint): New.
4116 (struct other_breakpoint): New.
4117 (struct reinsert_breakpoint): New.
4118 (is_gdb_breakpoint): New function.
4119 (any_persistent_commands): Update command_list if
4120 is_gdb_breakpoint returns true.
4121 (set_breakpoint): Create breakpoints according to their types.
4122 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
4123 (set_gdb_breakpoint_1): Likewise.
4124 (set_gdb_breakpoint): Likewise.
4125 (clear_breakpoint_conditions): Change parameter type to
4126 'struct gdb_breakpoint *'.
4127 (clear_breakpoint_commands): Likewise.
4128 (clear_breakpoint_conditions_and_commands): Likewise.
4129 (add_condition_to_breakpoint): Likewise.
4130 (add_breakpoint_condition): Likewise.
4131 (add_commands_to_breakpoint): Likewise.
4132 (check_breakpoints): Check other_breakpoint.
4133 (clone_one_breakpoint): Clone breakpopint according to its type.
4134 * mem-break.h (struct gdb_breakpoint): Declare.
4135 (set_gdb_breakpoint): Update declaration.
4136 (clear_breakpoint_conditions_and_commands): Likewise.
4137 (add_breakpoint_condition): Likewise.
4138 (add_breakpoint_commands): Likewise.
4139 * server.c (process_point_options): Change parameter type to
4140 'struct gdb_breakpoint *'.
4141
4142 2016-07-21 Yao Qi <yao.qi@linaro.org>
4143
4144 * mem-break.c (set_breakpoint_at): Rename it to ...
4145 (set_breakpoint_type_at): ... it.
4146 (set_breakpoint_at): Call set_breakpoint_type_at.
4147 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
4148 * mem-break.h (set_breakpoint_at): Update comments.
4149
4150 2016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
4151
4152 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
4153 to buf parameter.
4154 (nios2_store_gregset): Likewise.
4155
4156 2016-07-01 Pedro Alves <palves@redhat.com>
4157 Antoine Tremblay <antoine.tremblay@ericsson.com>
4158
4159 * linux-low.c: Change interface to take the target lwp_info
4160 pointer directly and return void. Handle detaching from a zombie
4161 thread.
4162 (linux_detach_lwp_callback): New function.
4163 (linux_detach): Detach from the leader thread after detaching from
4164 the clone threads.
4165
4166 2016-06-28 Yao Qi <yao.qi@linaro.org>
4167
4168 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
4169 for variable new_offset.
4170 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
4171 (aarch64_ftrace_insn_reloc_cb): Likewise.
4172 (aarch64_ftrace_insn_reloc_tb): Likewise.
4173 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
4174 PRIx64 instead of PRIx32.
4175
4176 2016-06-28 Yao Qi <yao.qi@linaro.org>
4177
4178 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
4179 (the_low_target): Install arm_get_syscall_trapinfo.
4180
4181 2016-06-28 Yao Qi <yao.qi@linaro.org>
4182
4183 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
4184 function.
4185 (the_low_target): Install aarch64_get_syscall_trapinfo.
4186
4187 2016-06-28 Yao Qi <yao.qi@linaro.org>
4188
4189 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
4190 Callers updated.
4191 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
4192 Remove parameter sysno.
4193 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
4194 sysret.
4195
4196 2016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
4197
4198 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
4199 (s390_emit_ne_goto): Likewise.
4200 (s390_emit_lt_goto): Likewise.
4201 (s390_emit_le_goto): Likewise.
4202 (s390_emit_gt_goto): Likewise.
4203 (s390_emit_ge_goto): Likewise.
4204 (s390x_emit_eq_goto): Likewise.
4205 (s390x_emit_ne_goto): Likewise.
4206 (s390x_emit_lt_goto): Likewise.
4207 (s390x_emit_le_goto): Likewise.
4208 (s390x_emit_gt_goto): Likewise.
4209 (s390x_emit_ge_goto): Likewise.
4210 (s390_emit_ops_impl): Mark variable static.
4211 (s390x_emit_ops): Likewise.
4212
4213 2016-06-17 Yao Qi <yao.qi@linaro.org>
4214
4215 * linux-low.c (handle_extended_wait): Call
4216 uninsert_reinsert_breakpoints for the parent process. Remove
4217 reinsert breakpoints from the child process. Reinsert them to
4218 the parent process when vfork is done.
4219 * mem-break.c (uninsert_reinsert_breakpoints): New function.
4220 (reinsert_reinsert_breakpoints): New function.
4221 * mem-break.h (uninsert_reinsert_breakpoints): Declare
4222 (reinsert_reinsert_breakpoints): Declare.
4223
4224 2016-06-17 Yao Qi <yao.qi@linaro.org>
4225
4226 * linux-low.c (handle_extended_wait): If the parent is doing
4227 step-over, remove the reinsert breakpoints from the forked child.
4228
4229 2016-06-17 Yao Qi <yao.qi@linaro.org>
4230
4231 * linux-low.c (unsuspend_all_lwps): Declare.
4232 (linux_low_filter_event): If thread exited, call finish_step_over.
4233 If step-over is finished, unsuspend other threads.
4234
4235 2016-06-17 Yao Qi <yao.qi@linaro.org>
4236
4237 * linux-low.c (linux_resume_one_lwp_throw): Assert
4238 has_reinsert_breakpoints returns false.
4239 * mem-break.c (delete_disabled_breakpoints): Assert
4240 bp type isn't reinsert_breakpoint.
4241
4242 2016-06-17 Yao Qi <yao.qi@linaro.org>
4243
4244 * linux-low.c (maybe_hw_step): New function.
4245 (linux_resume_one_lwp_throw): Call maybe_hw_step.
4246 (finish_step_over): Switch current_thread to lwp temporarily,
4247 and assert has_reinsert_breakpoints returns true.
4248 (proceed_one_lwp): Call maybe_hw_step.
4249 * mem-break.c (has_reinsert_breakpoints): New function.
4250 * mem-break.h (has_reinsert_breakpoints): Declare.
4251
4252 2016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
4253
4254 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
4255
4256 2016-05-17 Yao Qi <yao.qi@linaro.org>
4257
4258 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
4259 instead of find_inferior.
4260
4261 2016-05-05 Yao Qi <yao.qi@linaro.org>
4262
4263 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
4264 Initialize res to zero.
4265
4266 2016-05-05 Yao Qi <yao.qi@linaro.org>
4267
4268 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
4269 to uint32_t.
4270
4271 2016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
4272
4273 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
4274 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
4275 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
4276
4277 2016-04-28 Par Olsson <par.olsson@windriver.com>
4278 Simon Marchi <simon.marchi@ericsson.com>
4279
4280 * tracepoint.c (write_inferior_int8): New function.
4281 (cmd_qtenable_disable): Write enable flag using
4282 write_inferior_int8.
4283
4284 2016-04-25 Yao Qi <yao.qi@linaro.org>
4285
4286 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
4287 (need_step_over_p): Return zero if the LWP has pending signals
4288 can be delivered on software single step target.
4289
4290 2016-04-25 Yao Qi <yao.qi@linaro.org>
4291
4292 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
4293 return instead of error.
4294
4295 2016-04-22 Yao Qi <yao.qi@linaro.org>
4296
4297 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
4298 to 23.
4299
4300 2016-04-22 Yao Qi <yao.qi@linaro.org>
4301
4302 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
4303 signal when stepping over breakpoint with software single
4304 step.
4305
4306 2016-04-21 Pedro Alves <palves@redhat.com>
4307
4308 * linux-s390-low.c (s390_collect_ptrace_register)
4309 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
4310 add casts.
4311 (s390_check_regset): Use void * instead of gdb_byte *.
4312
4313 2016-04-20 Pedro Alves <palves@redhat.com>
4314
4315 * configure: Renegerate.
4316
4317 2016-04-20 Yao Qi <yao.qi@linaro.org>
4318
4319 * linux-aarch32-low.c: Include "arch/arm-linux.h".
4320 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
4321 number 16.
4322 (arm_store_gregset): Likewise.
4323
4324 2016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
4325
4326 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
4327 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
4328 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
4329 (amd64-avx-mpx-linux.c): New rules.
4330 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
4331 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
4332 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
4333 (srv_amd64_regobj): Add amd64-avx-mpx.o.
4334 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
4335 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
4336 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
4337 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
4338 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
4339 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
4340 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
4341 * linux-x86-low.c (x86_linux_read_description): Add case for
4342 X86_XSTATE_AVX_MPX_MASK.
4343 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
4344 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
4345 init_registers_i386_avx_mpx_linux.
4346 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
4347 (initialize_low_tracepoint): Call
4348 init_registers_i386_avx_mpx_linux.
4349 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
4350 (initialize_low_tracepoint): Call
4351 init_registers_amd64_avx_mpx_linux.
4352 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
4353 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
4354 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
4355 declarations.
4356
4357 2016-04-18 Pedro Alves <palves@redhat.com>
4358
4359 * configure: Regenerate.
4360
4361 2016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
4362
4363 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
4364 (aarch64_emit_sub): Likewise.
4365
4366 2016-04-12 Pedro Alves <palves@redhat.com>
4367
4368 * utils.c (prepare_to_throw_exception): Delete.
4369
4370 2016-04-05 Simon Marchi <simon.marchi@ericsson.com>
4371
4372 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
4373
4374 2016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
4375
4376 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
4377
4378 2016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
4379
4380 * linux-aarch64-ipa.c: Add <elf.h> include.
4381 * linux-ppc-ipa.c: Add <elf.h> include.
4382 * linux-s390-ipa.c: Add <elf.h> include.
4383
4384 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
4385
4386 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
4387 (get_raw_reg_ptr): Likewise.
4388 (get_trace_state_variable_value_ptr): Likewise.
4389 (set_trace_state_variable_value_ptr): Likewise.
4390 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
4391 char *.
4392
4393 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
4394 Marcin Kościelnicki <koriakin@0x04.net>
4395
4396 PR/17221
4397 * linux-ppc-low.c (emit_insns): New function.
4398 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
4399 (ppc_emit_prologue): New function.
4400 (ppc_emit_epilogue): New function.
4401 (ppc_emit_add): New function.
4402 (ppc_emit_sub): New function.
4403 (ppc_emit_mul): New function.
4404 (ppc_emit_lsh): New function.
4405 (ppc_emit_rsh_signed): New function.
4406 (ppc_emit_rsh_unsigned): New function.
4407 (ppc_emit_ext): New function.
4408 (ppc_emit_zero_ext): New function.
4409 (ppc_emit_log_not): New function.
4410 (ppc_emit_bit_and): New function.
4411 (ppc_emit_bit_or): New function.
4412 (ppc_emit_bit_xor): New function.
4413 (ppc_emit_bit_not): New function.
4414 (ppc_emit_equal): New function.
4415 (ppc_emit_less_signed): New function.
4416 (ppc_emit_less_unsigned): New function.
4417 (ppc_emit_ref): New function.
4418 (ppc_emit_const): New function.
4419 (ppc_emit_reg): New function.
4420 (ppc_emit_pop): New function.
4421 (ppc_emit_stack_flush): New function.
4422 (ppc_emit_swap): New function.
4423 (ppc_emit_stack_adjust): New function.
4424 (ppc_emit_call): New function.
4425 (ppc_emit_int_call_1): New function.
4426 (ppc_emit_void_call_2): New function.
4427 (ppc_emit_if_goto): New function.
4428 (ppc_emit_goto): New function.
4429 (ppc_emit_eq_goto): New function.
4430 (ppc_emit_ne_goto): New function.
4431 (ppc_emit_lt_goto): New function.
4432 (ppc_emit_le_goto): New function.
4433 (ppc_emit_gt_goto): New function.
4434 (ppc_emit_ge_goto): New function.
4435 (ppc_write_goto_address): New function.
4436 (ppc_emit_ops_impl): New static variable.
4437 (ppc64v1_emit_prologue): New function.
4438 (ppc64v2_emit_prologue): New function.
4439 (ppc64_emit_epilogue): New function.
4440 (ppc64_emit_add): New function.
4441 (ppc64_emit_sub): New function.
4442 (ppc64_emit_mul): New function.
4443 (ppc64_emit_lsh): New function.
4444 (ppc64_emit_rsh_signed): New function.
4445 (ppc64_emit_rsh_unsigned): New function.
4446 (ppc64_emit_ext): New function.
4447 (ppc64_emit_zero_ext): New function.
4448 (ppc64_emit_log_not): New function.
4449 (ppc64_emit_bit_and): New function.
4450 (ppc64_emit_bit_or): New function.
4451 (ppc64_emit_bit_xor): New function.
4452 (ppc64_emit_bit_not): New function.
4453 (ppc64_emit_equal): New function.
4454 (ppc64_emit_less_signed): New function.
4455 (ppc64_emit_less_unsigned): New function.
4456 (ppc64_emit_ref): New function.
4457 (ppc64_emit_const): New function.
4458 (ppc64v1_emit_reg): New function.
4459 (ppc64v2_emit_reg): New function.
4460 (ppc64_emit_pop): New function.
4461 (ppc64_emit_stack_flush): New function.
4462 (ppc64_emit_swap): New function.
4463 (ppc64v1_emit_call): New function.
4464 (ppc64v2_emit_call): New function.
4465 (ppc64v1_emit_int_call_1): New function.
4466 (ppc64v2_emit_int_call_1): New function.
4467 (ppc64v1_emit_void_call_2): New function.
4468 (ppc64v2_emit_void_call_2): New function.
4469 (ppc64_emit_if_goto): New function.
4470 (ppc64_emit_eq_goto): New function.
4471 (ppc64_emit_ne_goto): New function.
4472 (ppc64_emit_lt_goto): New function.
4473 (ppc64_emit_le_goto): New function.
4474 (ppc64_emit_gt_goto): New function.
4475 (ppc64_emit_ge_goto): New function.
4476 (ppc64v1_emit_ops_impl): New static variable.
4477 (ppc64v2_emit_ops_impl): New static variable.
4478 (ppc_emit_ops): New function.
4479 (linux_low_target): Wire in ppc_emit_ops.
4480
4481 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
4482 Marcin Kościelnicki <koriakin@0x04.net>
4483
4484 PR/17221
4485 * Makefile.in: Add powerpc-*-ipa.o
4486 * configure.srv: Add ipa_obj for powerpc*-linux.
4487 * linux-ppc-ipa.c: New file.
4488 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
4489 includes.
4490 (PPC_FIELD): New macro.
4491 (PPC_SEXT): New macro.
4492 (PPC_OP6): New macro.
4493 (PPC_BO): New macro.
4494 (PPC_LI): New macro.
4495 (PPC_BD): New macro.
4496 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
4497 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
4498 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
4499 (ppc_get_thread_area): New function.
4500 (is_elfv2_inferior): New function.
4501 (gen_ds_form): New function.
4502 (GEN_STD): New macro.
4503 (GEN_STDU): New macro.
4504 (GEN_LD): New macro.
4505 (GEN_LDU): New macro.
4506 (gen_d_form): New function.
4507 (GEN_ADDI): New macro.
4508 (GEN_ADDIS): New macro.
4509 (GEN_LI): New macro.
4510 (GEN_LIS): New macro.
4511 (GEN_ORI): New macro.
4512 (GEN_ORIS): New macro.
4513 (GEN_LWZ): New macro.
4514 (GEN_STW): New macro.
4515 (GEN_STWU): New macro.
4516 (gen_xfx_form): New function.
4517 (GEN_MFSPR): New macro.
4518 (GEN_MTSPR): New macro.
4519 (GEN_MFCR): New macro.
4520 (GEN_MTCR): New macro.
4521 (GEN_SYNC): New macro.
4522 (GEN_LWSYNC): New macro.
4523 (gen_x_form): New function.
4524 (GEN_OR): New macro.
4525 (GEN_MR): New macro.
4526 (GEN_LWARX): New macro.
4527 (GEN_STWCX): New macro.
4528 (GEN_CMPW): New macro.
4529 (gen_md_form): New function.
4530 (GEN_RLDICL): New macro.
4531 (GEN_RLDICR): New macro.
4532 (gen_i_form): New function.
4533 (GEN_B): New macro.
4534 (GEN_BL): New macro.
4535 (gen_b_form): New function.
4536 (GEN_BNE): New macro.
4537 (GEN_LOAD): New macro.
4538 (GEN_STORE): New macro.
4539 (gen_limm): New function.
4540 (gen_atomic_xchg): New function.
4541 (gen_call): New function.
4542 (ppc_relocate_instruction): New function.
4543 (ppc_install_fast_tracepoint_jump_pad): New function.
4544 (ppc_get_min_fast_tracepoint_insn_len): New function.
4545 (ppc_get_ipa_tdesc_idx): New function.
4546 (the_low_target): Wire in the new functions.
4547 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
4548 tdescs.
4549 * linux-ppc-tdesc.h: New file.
4550
4551 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
4552
4553 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
4554 (alloc_jump_pad_buffer): New function.
4555 * linux-amd64-ipa.c: Add <sys/mman.h> include.
4556 (alloc_jump_pad_buffer): New function.
4557 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
4558 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
4559 (alloc_jump_pad_buffer): New function.
4560 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
4561 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
4562 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
4563 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
4564
4565 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
4566
4567 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
4568 * linux-amd64-ipa.c: Likewise.
4569 * linux-i386-ipa.c: Likewise.
4570 * linux-s390-ipa.c: Likewise.
4571 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
4572 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
4573 set_trace_state_variable_value_ptr.
4574 (struct ipa_sym_addresses): Likewise.
4575 (symbol_list): Likewise.
4576 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
4577 accessing gdb_collect directly.
4578 (gdb_collect_ptr_type): New typedef.
4579 (get_raw_reg_ptr_type): New typedef.
4580 (get_trace_state_variable_value_ptr_type): New typedef.
4581 (set_trace_state_variable_value_ptr_type): New typedef.
4582 (gdb_collect_ptr): New global.
4583 (get_raw_reg_ptr): New global.
4584 (get_trace_state_variable_value_ptr): New global.
4585 (set_trace_state_variable_value_ptr): New global.
4586 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
4587 accessing get_raw_reg directly.
4588 (get_get_tsv_func_addr): Likewise for
4589 get_trace_state_variable_value_ptr.
4590 (get_set_tsv_func_addr): Likewise for
4591 set_trace_state_variable_value_ptr.
4592 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
4593
4594 2016-03-30 Simon Marchi <simon.marchi@ericsson.com>
4595
4596 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
4597
4598 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
4599
4600 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
4601 packets.
4602 (relocate_instruction): Remove own_buf.
4603 * server.c (own_buf): Make global.
4604 (handle_v_requests): Make global.
4605 * server.h (own_buf): New declaration.
4606 (handle_v_requests): New prototype.
4607
4608 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
4609
4610 PR 18377
4611 * linux-s390-low.c (add_insns): New function.
4612 (s390_emit_prologue): New function.
4613 (s390_emit_epilogue): New function.
4614 (s390_emit_add): New function.
4615 (s390_emit_sub): New function.
4616 (s390_emit_mul): New function.
4617 (s390_emit_lsh): New function.
4618 (s390_emit_rsh_signed): New function.
4619 (s390_emit_rsh_unsigned): New function.
4620 (s390_emit_ext): New function.
4621 (s390_emit_log_not): New function.
4622 (s390_emit_bit_and): New function.
4623 (s390_emit_bit_or): New function.
4624 (s390_emit_bit_xor): New function.
4625 (s390_emit_bit_not): New function.
4626 (s390_emit_equal): New function.
4627 (s390_emit_less_signed): New function.
4628 (s390_emit_less_unsigned): New function.
4629 (s390_emit_ref): New function.
4630 (s390_emit_if_goto): New function.
4631 (s390_emit_goto): New function.
4632 (s390_write_goto_address): New function.
4633 (s390_emit_litpool): New function.
4634 (s390_emit_const): New function.
4635 (s390_emit_call): New function.
4636 (s390_emit_reg): New function.
4637 (s390_emit_pop): New function.
4638 (s390_emit_stack_flush): New function.
4639 (s390_emit_zero_ext): New function.
4640 (s390_emit_swap): New function.
4641 (s390_emit_stack_adjust): New function.
4642 (s390_emit_set_r2): New function.
4643 (s390_emit_int_call_1): New function.
4644 (s390_emit_void_call_2): New function.
4645 (s390_emit_eq_goto): New function.
4646 (s390_emit_ne_goto): New function.
4647 (s390_emit_lt_goto): New function.
4648 (s390_emit_le_goto): New function.
4649 (s390_emit_gt_goto): New function.
4650 (s390_emit_ge_goto): New function.
4651 (s390x_emit_prologue): New function.
4652 (s390x_emit_epilogue): New function.
4653 (s390x_emit_add): New function.
4654 (s390x_emit_sub): New function.
4655 (s390x_emit_mul): New function.
4656 (s390x_emit_lsh): New function.
4657 (s390x_emit_rsh_signed): New function.
4658 (s390x_emit_rsh_unsigned): New function.
4659 (s390x_emit_ext): New function.
4660 (s390x_emit_log_not): New function.
4661 (s390x_emit_bit_and): New function.
4662 (s390x_emit_bit_or): New function.
4663 (s390x_emit_bit_xor): New function.
4664 (s390x_emit_bit_not): New function.
4665 (s390x_emit_equal): New function.
4666 (s390x_emit_less_signed): New function.
4667 (s390x_emit_less_unsigned): New function.
4668 (s390x_emit_ref): New function.
4669 (s390x_emit_if_goto): New function.
4670 (s390x_emit_const): New function.
4671 (s390x_emit_call): New function.
4672 (s390x_emit_reg): New function.
4673 (s390x_emit_pop): New function.
4674 (s390x_emit_stack_flush): New function.
4675 (s390x_emit_zero_ext): New function.
4676 (s390x_emit_swap): New function.
4677 (s390x_emit_stack_adjust): New function.
4678 (s390x_emit_int_call_1): New function.
4679 (s390x_emit_void_call_2): New function.
4680 (s390x_emit_eq_goto): New function.
4681 (s390x_emit_ne_goto): New function.
4682 (s390x_emit_lt_goto): New function.
4683 (s390x_emit_le_goto): New function.
4684 (s390x_emit_gt_goto): New function.
4685 (s390x_emit_ge_goto): New function.
4686 (s390_emit_ops): New function.
4687 (struct linux_target_ops): Fill in emit_ops hook.
4688
4689 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
4690
4691 PR 18377
4692 * Makefile.in: Add s390 IPA files.
4693 * configure.srv: Build IPA for s390.
4694 * linux-s390-ipa.c: New file.
4695 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
4696 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
4697 (tdesc_s390_linux32): Likewise.
4698 (init_registers_s390_linux32v1): Likewise.
4699 (tdesc_s390_linux32v1): Likewise.
4700 (init_registers_s390_linux32v2): Likewise.
4701 (tdesc_s390_linux32v2): Likewise.
4702 (init_registers_s390_linux64): Likewise.
4703 (tdesc_s390_linux64): Likewise.
4704 (init_registers_s390_linux64v1): Likewise.
4705 (tdesc_s390_linux64v1): Likewise.
4706 (init_registers_s390_linux64v2): Likewise.
4707 (tdesc_s390_linux64v2): Likewise.
4708 (init_registers_s390_te_linux64): Likewise.
4709 (tdesc_s390_te_linux64): Likewise.
4710 (init_registers_s390_vx_linux64): Likewise.
4711 (tdesc_s390_vx_linux64): Likewise.
4712 (init_registers_s390_tevx_linux64): Likewise.
4713 (tdesc_s390_tevx_linux64): Likewise.
4714 (init_registers_s390x_linux64): Likewise.
4715 (tdesc_s390x_linux64): Likewise.
4716 (init_registers_s390x_linux64v1): Likewise.
4717 (tdesc_s390x_linux64v1): Likewise.
4718 (init_registers_s390x_linux64v2): Likewise.
4719 (tdesc_s390x_linux64v2): Likewise.
4720 (init_registers_s390x_te_linux64): Likewise.
4721 (tdesc_s390x_te_linux64): Likewise.
4722 (init_registers_s390x_vx_linux64): Likewise.
4723 (tdesc_s390x_vx_linux64): Likewise.
4724 (init_registers_s390x_tevx_linux64): Likewise.
4725 (tdesc_s390x_tevx_linux64): Likewise.
4726 (have_hwcap_s390_vx): New static variable.
4727 (s390_arch_setup): Fill have_hwcap_s390_vx.
4728 (s390_get_thread_area): New function.
4729 (s390_ft_entry_gpr_esa): New const.
4730 (s390_ft_entry_gpr_zarch): New const.
4731 (s390_ft_entry_misc): New const.
4732 (s390_ft_entry_fr): New const.
4733 (s390_ft_entry_vr): New const.
4734 (s390_ft_main_31): New const.
4735 (s390_ft_main_64): New const.
4736 (s390_ft_exit_fr): New const.
4737 (s390_ft_exit_vr): New const.
4738 (s390_ft_exit_misc): New const.
4739 (s390_ft_exit_gpr_esa): New const.
4740 (s390_ft_exit_gpr_zarch): New const.
4741 (append_insns): New function.
4742 (s390_relocate_instruction): New function.
4743 (s390_install_fast_tracepoint_jump_pad): New function.
4744 (s390_get_min_fast_tracepoint_insn_len): New function.
4745 (s390_get_ipa_tdesc_idx): New function.
4746 (struct linux_target_ops): Wire in the above functions.
4747 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
4748 * linux-s390-tdesc.h: New file.
4749
4750 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
4751
4752 * linux-s390-low.c (s390_supports_tracepoints): New function.
4753 (struct linux_target_ops): Fill supports_tracepoints hook.
4754
4755 2016-03-18 Yao Qi <yao.qi@linaro.org>
4756
4757 * linux-low.c (lwp_signal_can_be_delivered): New function.
4758 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
4759
4760 2016-03-18 Yao Qi <yao.qi@linaro.org>
4761
4762 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
4763 0 if signal is enqueued. Remove 'signal' from one debugging
4764 message. Move one debugging message to some lines below.
4765 Remove code setting 'signal' to 0.
4766
4767 2016-03-18 Yao Qi <yao.qi@linaro.org>
4768
4769 * linux-low.c (linux_low_filter_event): Remove redundant
4770 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
4771
4772 2016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
4773
4774 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
4775 (struct linux_target_ops): Wire in the above.
4776
4777 2016-03-03 Yao Qi <yao.qi@linaro.org>
4778
4779 * linux-low.c: Update comments to start_step_over.
4780
4781 2016-03-03 Yao Qi <yao.qi@linaro.org>
4782
4783 PR server/19736
4784 * linux-low.c (handle_extended_wait): Set child suspended
4785 if event_lwp->bp_reinsert isn't zero.
4786
4787 2016-03-02 Yao Qi <yao.qi@linaro.org>
4788
4789 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
4790 enqueue_pending_signal.
4791
4792 2016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
4793
4794 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
4795 is actually loaded.
4796
4797 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
4798
4799 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
4800 (s390_regmap_3264) [!__s390x__]: New global.
4801 (s390_collect_ptrace_register): Skip map entries containing -1.
4802 (s390_supply_ptrace_register): Ditto.
4803 (s390_fill_gprs_high): New function.
4804 (s390_store_gprs_high): New function.
4805 (s390_regsets): Add NT_S390_HIGH_GPRS.
4806 (s390_get_hwcap): Enable on 31-bit.
4807 (have_hwcap_s390_high_gprs): Enable on 31-bit.
4808 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
4809 Detect NT_S390_HIGH_GPRS.
4810 (s390_usrregs_info_3264): Enable on 31-bit.
4811 (s390_regs_info): Enable regs_info_3264 on 31-bit.
4812 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
4813
4814 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
4815
4816 PR gdb/13808
4817 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
4818 * configure.srv: Ditto.
4819 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
4820 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
4821 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
4822 (init_registers_amd64_linux): Remove prototype.
4823 (tdesc_amd64_linux): Remove declaration.
4824 (get_ipa_tdesc): New function.
4825 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
4826 initialize remaining tdescs.
4827 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
4828 (init_registers_i386_linux): Remove prototype.
4829 (tdesc_i386_linux): Remove declaration.
4830 (get_ipa_tdesc): New function.
4831 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
4832 initialize remaining tdescs.
4833 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
4834 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
4835 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
4836 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
4837 (x86_get_ipa_tdesc_idx): New function.
4838 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
4839 * linux-x86-tdesc.h: New file.
4840 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
4841 (target_get_ipa_tdesc_idx): New macro.
4842 * tracepoint.c (ipa_tdesc_idx): New macro.
4843 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
4844 (symbol_list): Add ipa_tdesc_idx.
4845 (cmd_qtstart): Write ipa_tdesc_idx in the target.
4846 (ipa_tdesc): Remove.
4847 (ipa_tdesc_idx): New variable.
4848 (get_context_regcache): Use get_ipa_tdesc.
4849 (gdb_collect): Ditto.
4850 (gdb_probe): Ditto.
4851 * tracepoint.h (get_ipa_tdesc): New prototype.
4852 (ipa_tdesc): Remove.
4853
4854 2016-02-24 Pedro Alves <palves@redhat.com>
4855
4856 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
4857 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
4858 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
4859 Factor out common code between the USE_SIGTRAP_SIGINFO and
4860 !USE_SIGTRAP_SIGINFO blocks.
4861 (linux_low_filter_event): Call save_stop_reason instead of
4862 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
4863 Update comments.
4864 (linux_wait_1): Update comments.
4865
4866 2016-02-24 Wei-cheng Wang <cole945@gmail.com>
4867
4868 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
4869 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
4870 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
4871 ppc_insert_point, ppc_remove_point.
4872
4873 2016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
4874
4875 * linux-s390-low.c (s390_supports_z_point_type): New function.
4876 (struct linux_target_ops): Wire s390_supports_z_point_type in.
4877
4878 2016-02-16 Yao Qi <yao.qi@linaro.org>
4879
4880 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
4881 PC. Get pc from regcache_read_pc.
4882
4883 2016-02-12 Yao Qi <yao.qi@linaro.org>
4884
4885 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
4886 or linux_get_pc_32bit.
4887 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
4888
4889 2016-02-12 Yao Qi <yao.qi@linaro.org>
4890
4891 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
4892 arm_linux_get_next_pcs_fixup.
4893
4894 2016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
4895
4896 * tracepoint.c (x_tracepoint_action_download): Change
4897 write_inferior_data_ptr to write_inferior_data_pointer.
4898 (cmd_qtstart): Likewise.
4899 (write_inferior_data_ptr): Remove.
4900 (download_agent_expr): Change write_inferior_data_ptr to
4901 write_inferior_data_pointer.
4902 (download_tracepoint_1): Likewise.
4903 (download_tracepoint): Likewise.
4904 (download_trace_state_variables): Likewise.
4905
4906 2016-02-11 Wei-cheng Wang <cole945@gmail.com>
4907 Marcin Kościelnicki <koriakin@0x04.net>
4908
4909 * tracepoint.c (struct tracepoint_action_ops): Remove.
4910 (struct tracepoint_action): Remove ops.
4911 (m_tracepoint_action_download, r_tracepoint_action_download)
4912 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
4913 size and offset accordingly.
4914 (m_tracepoint_action_ops, r_tracepoint_action_ops)
4915 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
4916 (tracepoint_action_send, tracepoint_action_download): New functions.
4917 Helpers for trace action handlers.
4918 (add_tracepoint_action): Remove setup actions ops.
4919 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
4920
4921 2016-02-10 Yao Qi <yao.qi@linaro.org>
4922
4923 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
4924
4925 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
4926
4927 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
4928 to AC_OUTPUT.
4929 * configure: Regenerate.
4930
4931 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
4932
4933 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
4934 void * to gdb_byte *.
4935 * linux-low.c (siginfo_fixup): Likewise.
4936 (linux_xfer_siginfo): Likewise.
4937 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
4938 Likewise.
4939 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
4940
4941 2016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
4942
4943 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
4944 to srv_tgtobj.
4945 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
4946 to srv_tgtobj.
4947 * linux-x86-low.c [__x86_64__]: Include
4948 "nat/amd64-linux-siginfo.h".
4949 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
4950 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
4951 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
4952 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
4953 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
4954 (cpt_si_fd, si_timerid, si_overrun): Move from
4955 nat/amd64-linux-siginfo.c.
4956 * Makefile.in (amd64-linux-siginfo.o:): New rule.
4957
4958 2016-01-28 Simon Marchi <simon.marchi@ericsson.com>
4959
4960 * server.c (skip_to_semicolon): Remove.
4961 (process_point_options): Use strchrnul instead of
4962 skip_to_semicolon.
4963
4964 2016-01-26 Yao Qi <yao.qi@linaro.org>
4965
4966 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
4967 * linux-low.c (install_software_single_step_breakpoints): Don't
4968 call regcache_read_pc.
4969 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
4970 argument pc.
4971
4972 2016-01-26 Yao Qi <yao.qi@linaro.org>
4973
4974 * linux-low.c (install_software_single_step_breakpoints): Call
4975 regcache_read_pc instead of get_pc.
4976
4977 2016-01-26 Yao Qi <yao.qi@linaro.org>
4978
4979 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
4980 (unblock_async_io): Rename to ...
4981 (block_unblock_async_io): ... it. New function.
4982 (enable_async_io): Don't install SIGIO handler. Unblock it
4983 instead.
4984 (disable_async_io): Don't ignore SIGIO. Block it instead.
4985 (initialize_async_io): Install SIGIO handler. Don't call
4986 unblock_async_io.
4987
4988 2016-01-26 Yao Qi <yao.qi@linaro.org>
4989
4990 * remote-utils.c (getpkt): If the buffer isn't empty, and the
4991 first character is '\003', call *the_target->request_interrupt.
4992
4993 2016-01-25 Yao Qi <yao.qi@linaro.org>
4994
4995 * remote-utils.c (new_thread_notify): Remove.
4996 (dead_thread_notify): Likewise.
4997 * remote-utils.h (new_thread_notify): Remove declaration.
4998 (dead_thread_notify): Likewise.
4999
5000 2016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
5001
5002 * gdb.trace/pending.exp: Fix expected message on continue.
5003
5004 2016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
5005
5006 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
5007 it works properly on big-endian machines where sizeof (CORE_ADDR)
5008 != sizeof (void *).
5009
5010 2016-01-21 Pedro Alves <palves@redhat.com>
5011
5012 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
5013 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
5014 * configure: Regenerate.
5015
5016 2016-01-21 Yao Qi <yao.qi@linaro.org>
5017
5018 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
5019 is_thumb and set it according to CPSR saved on the stack.
5020 (get_next_pcs_syscall_next_pc): Pass is_thumb to
5021 arm_sigreturn_next_pc.
5022
5023 2016-01-18 Yao Qi <yao.qi@linaro.org>
5024
5025 * linux-low.c (linux_set_pc_64bit): New function.
5026 (linux_get_pc_64bit): New function.
5027 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
5028 Declare.
5029 * linux-sparc-low.c (debug_threads): Remove declaration.
5030 (sparc_get_pc): Remove.
5031 (the_low_target): Use linux_get_pc_64bit instead of
5032 sparc_get_pc.
5033 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
5034 (the_low_target): Use linux_get_pc_64bit and
5035 linux_set_pc_64bit.
5036
5037 2016-01-18 Yao Qi <yao.qi@linaro.org>
5038
5039 * linux-arm-low.c (debug_threads): Remove declaration.
5040 (arm_get_pc, arm_set_pc): Remove.
5041 (the_low_target): Use linux_get_pc_32bit and
5042 linux_set_pc_32bit.
5043 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
5044 (the_low_target): Use linux_get_pc_32bit and
5045 linux_set_pc_32bit.
5046 * linux-cris-low.c (debug_threads): Remove declaration.
5047 (cris_get_pc, cris_set_pc,): Remove.
5048 (the_low_target): Use linux_get_pc_32bit and
5049 linux_set_pc_32bit.
5050 * linux-crisv32-low.c (debug_threads): Remove declaration.
5051 (cris_get_pc, cris_set_pc): Remove.
5052 (the_low_target): Use linux_get_pc_32bit and
5053 linux_set_pc_32bit.
5054 * linux-low.c: Include inttypes.h.
5055 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
5056 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
5057 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
5058 (the_low_target): Use linux_get_pc_32bit and
5059 linux_set_pc_32bit.
5060 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
5061 (the_low_target): Use linux_get_pc_32bit and
5062 linux_set_pc_32bit.
5063 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
5064 (the_low_target): Use linux_get_pc_32bit and
5065 linux_set_pc_32bit.
5066 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
5067 (the_low_target): Use linux_get_pc_32bit and
5068 linux_set_pc_32bit.
5069 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
5070 (the_low_target): Use linux_get_pc_32bit and
5071 linux_set_pc_32bit.
5072
5073 2016-01-18 Gary Benson <gbenson@redhat.com>
5074
5075 * configure.ac (AC_FUNC_FORK): New check.
5076 * config.in: Regenerate.
5077 * configure: Likewise.
5078
5079 2016-01-14 Yao Qi <yao.qi@linaro.org>
5080
5081 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
5082 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
5083 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
5084 arm_get_next_pcs_ctor.
5085
5086 2016-01-12 Josh Stone <jistone@redhat.com>
5087 Philippe Waroquiers <philippe.waroquiers@skynet.be>
5088
5089 * inferiors.h: Include "gdb_vecs.h".
5090 (struct process_info): Add syscalls_to_catch.
5091 * inferiors.c (remove_process): Free syscalls_to_catch.
5092 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
5093 syscall_return stops.
5094 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
5095 * server.c (handle_general_set): Handle QCatchSyscalls.
5096 (handle_query): Report support for QCatchSyscalls.
5097 * target.h (struct target_ops): Add supports_catch_syscall.
5098 (target_supports_catch_syscall): New macro.
5099 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
5100 (struct lwp_info): Add syscall_state.
5101 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
5102 Maintain syscall_state and syscalls_to_catch across exec.
5103 (get_syscall_trapinfo): New function, proxy to the_low_target.
5104 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
5105 (linux_low_filter_event): Toggle syscall_state entry/return for
5106 syscall traps, and set it ignored for all others.
5107 (gdb_catching_syscalls_p): New function.
5108 (gdb_catch_this_syscall_p): New function.
5109 (linux_wait_1): Handle SYSCALL_SIGTRAP.
5110 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
5111 (linux_supports_catch_syscall): New function.
5112 (linux_target_ops): Install it.
5113 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
5114 (the_low_target): Install it.
5115
5116 2016-01-12 Mike Frysinger <vapier@gentoo.org>
5117
5118 * acinclude.m4: Include new ../warning.m4 file.
5119 * configure: Regenerated.
5120 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
5121
5122 2016-01-12 Mike Frysinger <vapier@gentoo.org>
5123
5124 * ax.c (is_goto_target): Mark static.
5125 * linux-low.c (register_addr): Likewise.
5126 (linux_fetch_registers, linux_store_registers): Likewise.
5127 * mem-break.c (any_persistent_commands): Fix old prototype.
5128 (add_commands_to_breakpoint): Mark static.
5129 * regcache.c (find_register_by_name): Delete unused func.
5130 * remote-utils.c (hex_or_minus_one): Mark static.
5131 * server.c (monitor_show_help): Mark static.
5132 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
5133 handle_v_requests): Likewise.
5134
5135 2016-01-12 Pedro Alves <palves@redhat.com>
5136
5137 Remove use of the registered trademark symbol throughout.
5138
5139 2016-01-08 Yao Qi <yao.qi@linaro.org>
5140
5141 * remote-utils.c (getpkt): If c is '\003', call target hook
5142 request_interrupt.
5143
5144 2016-01-06 Yao Qi <yao.qi@linaro.org>
5145
5146 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
5147 linux-aarch32-low.c.
5148 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
5149 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
5150 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
5151 (thumb2_breakpoint): Declare.
5152 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
5153 linux-aarch32-low.h.
5154 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
5155 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
5156 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
5157
5158 2016-01-01 Joel Brobecker <brobecker@adacore.com>
5159
5160 * gdbreplay.c (gdbreplay_version): Change copyright year in
5161 version message.
5162 * server.c (gdbserver_version): Likewise.
5163
5164 2015-12-28 Patrick Palka <patrick@parcs.ath.cx>
5165
5166 * server.c (crc32_table): Delete.
5167 (crc32): Use libiberty's xcrc32 function.
5168
5169 2015-12-22 Joel Brobecker <brobecker@adacore.com>
5170
5171 * lynx-low.c (lynx_delete_thread_callback): New function.
5172 (lynx_mourn): Properly delete our process and all of its
5173 threads. Remove call to clear_inferiors.
5174
5175 2015-12-22 Joel Brobecker <brobecker@adacore.com>
5176
5177 * target.c (thread_search_callback): Add check that
5178 the thread_stopped target callback is not NULL before
5179 calling it.
5180
5181 2015-12-21 Yao Qi <yao.qi@linaro.org>
5182
5183 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
5184 arm breakpoint.
5185
5186 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
5187
5188 * server.c (handle_query): Call target_supports_software_single_step.
5189
5190 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
5191
5192 * linux-low.c (single_step): New function.
5193 (linux_resume_one_lwp_throw): Call single_step.
5194 (start_step_over): Likewise.
5195
5196 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
5197
5198 * Makefile.in (SFILES): Append arch/arm-linux.c,
5199 arch/arm-get-next-pcs.c.
5200 (arm-linux.o): New rule.
5201 (arm-get-next-pcs.o): New rule.
5202 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
5203 arm-linux.o.
5204 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
5205 to linux-aarch32-low.c.
5206 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
5207 (arm_breakpoint_len, thumb_breakpoint): Likewise.
5208 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
5209 (thumb2_breakpoint_len): Likewise.
5210 (arm_is_thumb_mode): Make non-static.
5211 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
5212 from linux-aarch32-low.c.
5213 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
5214 (arm_breakpoint_len, thumb_breakpoint): Likewise.
5215 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
5216 (thumb2_breakpoint_len): Likewise.
5217 (arm_is_thumb_mode): New declaration.
5218 * linux-arm-low.c: Include arch/arm-linux.h
5219 aarch/arm-get-next-pcs.h, sys/syscall.h.
5220 (get_next_pcs_ops): New struct.
5221 (get_next_pcs_addr_bits_remove): New function.
5222 (get_next_pcs_is_thumb): New function.
5223 (get_next_pcs_read_memory_unsigned_integer): Likewise.
5224 (arm_sigreturn_next_pc): Likewise.
5225 (get_next_pcs_syscall_next_pc): Likewise.
5226 (arm_gdbserver_get_next_pcs): Likewise.
5227 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
5228 Initialize.
5229 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
5230 * server.h: Include gdb_vecs.h.
5231
5232 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
5233
5234 * Makefile.in (SFILES): Append common/common-regcache.c.
5235 (OBS): Append common-regcache.o.
5236 (common-regcache.o): New rule.
5237 * regcache.c (init_register_cache): Initialize cache to
5238 REG_UNAVAILABLE.
5239 (regcache_raw_read_unsigned): New function.
5240 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
5241 register_status enum.
5242
5243 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
5244
5245 * linux-aarch64-low.c (the_low_targets): Rename
5246 breakpoint_reinsert_addr to get_next_pcs.
5247 * linux-arm-low.c (the_low_targets): Likewise.
5248 * linux-bfin-low.c (the_low_targets): Likewise.
5249 * linux-cris-low.c (the_low_targets): Likewise.
5250 * linux-crisv32-low.c (the_low_targets): Likewise.
5251 * linux-low.c (can_software_single_step): Likewise.
5252 (install_software_single_step_breakpoints): New function.
5253 (start_step_over): Use install_software_single_step_breakpoints.
5254 * linux-low.h: New CORE_ADDR vector.
5255 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
5256 get_next_pcs.
5257 * linux-mips-low.c (the_low_targets): Likewise.
5258 * linux-nios2-low.c (the_low_targets): Likewise.
5259 * linux-sparc-low.c (the_low_targets): Likewise.
5260
5261 2015-12-17 Pedro Alves <palves@redhat.com>
5262
5263 * linux-low.c (linux_kill_one_lwp): Remove references to
5264 LinuxThreads.
5265 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
5266 to 'kill'.
5267 (linux_init_signals): Delete.
5268 (initialize_low): Adjust.
5269 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
5270
5271 2015-12-16 Pedro Alves <palves@redhat.com>
5272
5273 * configure.ac (compiler warning flags): When testing a
5274 -Wno-foo option, check whether -Wfoo works instead.
5275 * configure: Regenerate.
5276
5277 2015-12-11 Don Breazeal <donb@codesourcery.com>
5278
5279 * server.c (process_serial_event): Don't exit from gdbserver
5280 in remote mode if there are still active inferiors.
5281
5282 2015-12-11 Yao Qi <yao.qi@linaro.org>
5283
5284 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
5285 arm_breakpoint_at if the process is 32-bit.
5286
5287 2015-12-11 Yao Qi <yao.qi@linaro.org>
5288
5289 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
5290 arm breakpoint.
5291
5292 2015-12-07 Yao Qi <yao.qi@linaro.org>
5293
5294 * configure.srv: Append arm.o to srv_tgtobj for
5295 aarch64*-*-linux* target.
5296 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
5297 from linux-arm-low.c.
5298 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
5299 (arm_breakpoint_len, thumb_breakpoint): Likewise.
5300 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
5301 (thumb2_breakpoint_len): Likewise.
5302 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
5303 (arm_breakpoint_kinds): Likewise.
5304 (arm_breakpoint_kind_from_pc): Likewise.
5305 (arm_sw_breakpoint_from_kind): Likewise.
5306 (arm_breakpoint_kind_from_current_state): Likewise.
5307 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
5308 (arm_sw_breakpoint_from_kind): Declare.
5309 (arm_breakpoint_kind_from_current_state): Declare.
5310 (arm_breakpoint_at): Declare.
5311 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
5312 arm_sw_breakpoint_from_kind if process is 32-bit.
5313 (aarch64_breakpoint_kind_from_pc): New function.
5314 (aarch64_breakpoint_kind_from_current_state): New function.
5315 (the_low_target): Initialize fields breakpoint_kind_from_pc
5316 and breakpoint_kind_from_current_state.
5317 * linux-arm-low.c (arm_breakpoint_kinds): Move to
5318 linux-aarch32-low.c.
5319 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
5320 (arm_breakpoint, arm_breakpoint_len): Likewise.
5321 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
5322 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
5323 (arm_is_thumb_mode): Likewise.
5324 (arm_breakpoint_at): Likewise.
5325 (arm_breakpoint_kind_from_pc): Likewise.
5326 (arm_sw_breakpoint_from_kind): Likewise.
5327 (arm_breakpoint_kind_from_current_state): Likewise.
5328
5329 Revert:
5330 2015-08-04 Yao Qi <yao.qi@linaro.org>
5331
5332 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
5333 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
5334 * server.c (extended_protocol): Remove "static".
5335 * server.h (extended_protocol): Declare it.
5336
5337 2015-12-04 Josh Stone <jistone@redhat.com>
5338
5339 * target.h (struct target_ops) <arch_setup>: Rename to ...
5340 (struct target_ops) <post_create_inferior>: ... this.
5341 (target_arch_setup): Rename to ...
5342 (target_post_create_inferior): ... this, calling post_create_inferior.
5343 * server.c (start_inferior): Update target_arch_setup calls to
5344 target_post_create_inferior.
5345 * linux-low.c (linux_low_ptrace_options): Forward declare.
5346 (linux_arch_setup): Update its comment for general use.
5347 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
5348 (struct linux_target_ops): Use linux_post_create_inferior.
5349 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
5350 to post_create_inferior.
5351 * nto-low.c (struct nto_target_ops): Likewise.
5352 * spu-low.c (struct spu_target_ops): Likewise.
5353 * win32-low.c (struct win32_target_ops): Likewise.
5354
5355 2015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
5356
5357 * linux-arm-low.c: Remove duplicate arch/arm.h include.
5358
5359 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
5360
5361 * linux-arm-low.c (arm_reinsert_addr): Remove function.
5362 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
5363 * linux-cris-low.c (cris_reinsert_addr> Remove function.
5364 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
5365 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
5366 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
5367 * linux-mips-low.c (mips_reinsert_addr): Remove function.
5368 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
5369 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
5370 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
5371 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
5372 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
5373
5374 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
5375
5376 * linux-low.c (linux_look_up_symbols): Don't call
5377 linux_supports_traceclone.
5378 * linux-low.h (thread_db_init): Remove use_events argument.
5379 * thread-db.c (thread_db_use_event): Remove global variable.
5380 (struct thread_db) <td_thr_event_enable_p>: Remove field.
5381 (struct thread_db) <td_create_bp>: Remove field.
5382 (thread_db_create_event): Remove function.
5383 (thread_db_enable_reporting): Likewise.
5384 (find_one_thread): Don't check for thread_db_use_events.
5385 (attach_thread): Likewise.
5386 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
5387 (try_thread_db_load_1): Don't check for thread_db_use_events.
5388 (thread_db_init): Remove use_events argument and thread events
5389 handling.
5390 (remove_thread_event_breakpoints): Remove function.
5391 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
5392
5393 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
5394
5395 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
5396 New function.
5397 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5398 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
5399 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5400 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
5401 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
5402 Initialize.
5403 * linux-crisv32-low.c (cris_supports_hardware_single_step):
5404 New function.
5405 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5406 * linux-low.c (can_hardware_single_step): Use
5407 supports_hardware_single_step.
5408 (can_software_single_step): New function.
5409 (start_step_over): Call can_software_single_step.
5410 (linux_supports_hardware_single_step): New function.
5411 (struct target_ops) <supports_software_single_step>: Initialize.
5412 * linux-low.h (struct linux_target_ops)
5413 <supports_hardware_single_step>: Initialize.
5414 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
5415 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5416 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
5417 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
5418 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
5419 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5420 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
5421 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5422 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
5423 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
5424 Initialize.
5425 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
5426 (struct linux_target_ops) <tile_supports_hardware_single_step>:
5427 Initialize.
5428 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
5429 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5430 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
5431 New function.
5432 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5433 * target.h (struct target_ops): <supports_software_single_step>:
5434 New field.
5435 (target_supports_software_single_step): New macro.
5436
5437 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
5438
5439 * linux-low.c (linux_wait_1): Fix pc advance condition.
5440 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
5441 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
5442
5443 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
5444
5445 * linux-arm-low.c (arm_is_thumb_mode): New function.
5446 (arm_breakpoint_at): Use arm_is_thumb_mode.
5447 (arm_breakpoint_kind_from_current_state): New function.
5448 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
5449 Initialize.
5450 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
5451 (linux_breakpoint_kind_from_current_state): New function.
5452 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
5453 * linux-low.h (struct linux_target_ops)
5454 <breakpoint_kind_from_current_state>: New field.
5455 * target.h (struct target_ops): Likewise.
5456 (target_breakpoint_kind_from_current_state): New macro.
5457
5458 2015-11-30 Pedro Alves <palves@redhat.com>
5459
5460 * linux-low.c (linux_resume): Wake up the event loop before
5461 returning.
5462
5463 2015-11-30 Pedro Alves <palves@redhat.com>
5464
5465 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
5466 check.
5467 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
5468 to -1.
5469 * target.c (struct thread_search): New structure.
5470 (thread_search_callback): New function.
5471 (prev_general_thread): New global.
5472 (prepare_to_access_memory, done_accessing_memory): New functions.
5473 * target.h (prepare_to_access_memory, done_accessing_memory):
5474 Replace macros with function declarations.
5475
5476 2015-11-30 Pedro Alves <palves@redhat.com>
5477
5478 PR 14618
5479 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
5480 report TARGET_WAITKIND_NO_RESUMED.
5481 * remote-utils.c (prepare_resume_reply): Handle
5482 TARGET_WAITKIND_NO_RESUMED.
5483 * server.c (report_no_resumed): New global.
5484 (handle_query) <qSupported>: Handle "no-resumed+". Report
5485 "no-resumed+" support.
5486 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
5487 return error if the client doesn't support no-resumed events.
5488 (push_stop_notification): New function.
5489 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
5490 events if the client supports them.
5491
5492 2015-11-30 Pedro Alves <palves@redhat.com>
5493
5494 * linux-low.c (thread_still_has_status_pending_p): Don't check
5495 vCont;t here.
5496 (lwp_resumed): New function.
5497 (status_pending_p_callback): Return early if the LWP is not
5498 supposed to be resumed.
5499
5500 2015-11-30 Pedro Alves <palves@redhat.com>
5501
5502 * linux-low.c (handle_extended_wait): Assert that the LWP's
5503 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
5504 thread create events, leave the new child's status pending.
5505 (linux_low_filter_event): If GDB wants to hear about thread exit
5506 events, leave the LWP marked dead and don't delete it.
5507 (linux_wait_for_event_filtered): Don't check for thread exit.
5508 (filter_exit_event): New function.
5509 (linux_wait_1): Use it, when returning an exit event.
5510 (linux_resume_one_lwp_throw): Assert that the LWP's
5511 waitstatus is TARGET_WAITKIND_IGNORE.
5512 * remote-utils.c (prepare_resume_reply): Handle
5513 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
5514 * server.c (report_thread_events): New global.
5515 (handle_general_set): Handle QThreadEvents.
5516 (handle_query) <qSupported>: Handle and report QThreadEvents+;
5517 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
5518 TARGET_WAITKIND_THREAD_EXITED.
5519 * server.h (report_thread_events): Declare.
5520
5521 2015-11-30 Pedro Alves <palves@redhat.com>
5522
5523 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
5524 the thread's last_resume_kind was resume_stop.
5525
5526 2015-11-30 Pedro Alves <palves@redhat.com>
5527
5528 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
5529 before returning.
5530
5531 2015-11-30 Pedro Alves <palves@redhat.com>
5532
5533 * server.c (handle_v_requests): Handle vCtrlC.
5534
5535 2015-11-30 Pedro Alves <palves@redhat.com>
5536
5537 * gdbthread.h (find_any_thread_of_pid): Declare.
5538 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
5539 functions.
5540 * server.c (handle_query): If current_thread is NULL, look for
5541 another thread of the selected process.
5542
5543 2015-11-26 Daniel Colascione <dancol@dancol.org>
5544 Simon Marchi <simon.marchi@ericsson.com>
5545
5546 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
5547 * server.c (handle_qxfer_threads_worker): Refactor to include thread
5548 name in reply.
5549 * target.h (struct target_ops) <thread_name>: New field.
5550 (target_thread_name): New macro.
5551
5552 2015-11-23 Joel Brobecker <brobecker@adacore.com>
5553
5554 * regcache.h (regcache_invalidate_pid): Add declaration.
5555 * regcache.c (regcache_invalidate_pid): New function, extracted
5556 from regcache_invalidate.
5557 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
5558 Add trivial documentation comment.
5559 * lynx-low.c: Use regcache_invalidate_pid instead of
5560 regcache_invalidate.
5561
5562 2015-11-23 Joel Brobecker <brobecker@adacore.com>
5563
5564 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
5565 and Elf64_auxv_t if the target is Android.
5566
5567 2015-11-22 Doug Evans <xdje42@gmail.com>
5568
5569 * target.h: #include <sys/types.h>.
5570
5571 2015-11-19 Pedro Alves <palves@redhat.com>
5572
5573 * linux-low.c (linux_process_qsupported): Change prototype.
5574 Adjust.
5575 * linux-low.h (struct linux_target_ops) <process_qsupported>:
5576 Change prototype.
5577 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
5578 and adjust to loop over all features.
5579 * server.c (handle_query) <qSupported>: Adjust to call
5580 target_process_qsupported once, passing it a vector of unprocessed
5581 features.
5582 * target.h (struct target_ops) <process_qsupported>: Change
5583 prototype.
5584 (target_process_qsupported): Adjust.
5585
5586 2015-11-19 Pedro Alves <palves@redhat.com>
5587
5588 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
5589 mode.
5590 * configure: Regenerate.
5591
5592 2015-11-19 Pedro Alves <palves@redhat.com>
5593
5594 * configure: Regenerate.
5595
5596 2015-11-19 Yao Qi <yao.qi@linaro.org>
5597
5598 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
5599 type to uint32_t.
5600
5601 2015-11-19 Yao Qi <yao.qi@linaro.org>
5602
5603 * linux-aarch64-low.c (enum aarch64_operand_type): New.
5604 (struct aarch64_operand): Move enum out.
5605
5606 2015-11-19 Yao Qi <yao.qi@linaro.org>
5607
5608 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
5609 struct user_fpsimd_state *.
5610 (aarch64_store_fpregset): Likewise.
5611
5612 2015-11-19 Yao Qi <yao.qi@linaro.org>
5613
5614 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
5615 struct user_pt_regs *.
5616 (aarch64_store_gregset): Likewise.
5617
5618 2015-11-18 Pedro Alves <palves@redhat.com>
5619
5620 * Makefile.in (all_object_files): Add $IPA_OBJS.
5621
5622 2015-11-17 Pedro Alves <palves@redhat.com>
5623
5624 * win32-low.c (win32_resume): Use gdb_signal_from_host,
5625 GDB_SIGNAL_0 and gdb_signal_to_string.
5626
5627 2015-11-17 Pedro Alves <palves@redhat.com>
5628
5629 * win32-low.c (handle_output_debug_string): Remove parameter.
5630 (win32_kill): Remove our_status local and adjust call to
5631 handle_output_debug_string.
5632 (get_child_debug_event): Adjust call to
5633 handle_output_debug_string.
5634
5635 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5636
5637 * linux-mips-low.c (mips_fill_gregset): Add cast.
5638 (mips_store_gregset): Likewise.
5639 (mips_fill_fpregset): Likewise.
5640 (mips_store_fpregset): Likewise.
5641
5642 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5643
5644 * linux-mips-low.c (mips_add_watchpoint): Rename private to
5645 priv.
5646
5647 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5648
5649 * linux-mips-low.c (mips_linux_new_thread): Change type of
5650 watch_type to enum target_hw_bp_type.
5651
5652 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5653
5654 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
5655 Change return type to arm_hwbp_type.
5656
5657 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5658
5659 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
5660 (arm_store_gregset): Likewise.
5661 * linux-arm-low.c (arm_get_hwcap): Likewise.
5662 (arm_read_description): Likewise.
5663
5664 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5665
5666 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
5667
5668 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5669
5670 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
5671 (ppc_fill_vsxregset): Likewise.
5672 (ppc_store_vsxregset): Likewise.
5673 (ppc_fill_vrregset): Likewise.
5674 (ppc_store_vrregset): Likewise.
5675 (ppc_fill_evrregset): Likewise.
5676 (ppc_store_evrregset): Likewise.
5677
5678 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5679
5680 * linux-ppc-low.c (ppc_usrregs_info): Remove
5681 forward-declaration.
5682 (ppc_arch_setup): Move lower in file.
5683
5684 2015-10-30 Simon Marchi <simon.marchi@ericsson.com>
5685
5686 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
5687 (ps_pdwrite): Likewise.
5688
5689 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
5690
5691 * linux-arm-low.c (arm_new_thread): Move pointer dereference
5692 to after assert checks.
5693
5694 2015-10-29 Simon Marchi <simon.marchi@ericsson.com>
5695
5696 * proc-service.c (ps_pdread): Add/adjust casts.
5697 (ps_pdwrite): Add/adjust casts.
5698
5699 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
5700
5701 * server.c (handle_search_memory_1): Cast return value of
5702 memmem.
5703
5704 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
5705
5706 * server.c (write_qxfer_response): Change type of data to
5707 gdb_byte *.
5708
5709 2015-10-29 Pedro Alves <palves@redhat.com>
5710
5711 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
5712
5713 2015-10-29 Pedro Alves <palves@redhat.com>
5714
5715 * tracepoint.c (clear_installed_tracepoints): Add casts.
5716
5717 2015-10-29 Pedro Alves <palves@redhat.com>
5718
5719 * server.c (handle_v_cont, process_serial_event): Add enum
5720 gdb_signal casts to signal parsing code.
5721
5722 2015-10-29 Pedro Alves <palves@redhat.com>
5723
5724 * linux-low.h (NULL_REGSET): Define.
5725 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
5726 * linux-arm-low.c (arm_regsets): Likewise.
5727 * linux-crisv32-low.c (cris_regsets): Likewise.
5728 * linux-m68k-low.c (m68k_regsets): Likewise.
5729 * linux-mips-low.c (mips_regsets): Likewise.
5730 * linux-nios2-low.c (nios2_regsets): Likewise.
5731 * linux-ppc-low.c (ppc_regsets): Likewise.
5732 * linux-s390-low.c (s390_regsets): Likewise.
5733 * linux-sh-low.c (sh_regsets): Likewise.
5734 * linux-sparc-low.c (sparc_regsets): Likewise.
5735 * linux-tic6x-low.c (tic6x_regsets): Likewise.
5736 * linux-tile-low.c (tile_regsets): Likewise.
5737 * linux-x86-low.c (x86_regsets): Likewise.
5738 * linux-xtensa-low.c (xtensa_regsets): Likewise.
5739
5740 2015-10-29 Pedro Alves <palves@redhat.com>
5741
5742 * linux-low.h (NULL_REGSET): Define.
5743 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
5744 * linux-arm-low.c (arm_regsets): Likewise.
5745 * linux-crisv32-low.c (cris_regsets): Likewise.
5746 * linux-m68k-low.c (m68k_regsets): Likewise.
5747 * linux-mips-low.c (mips_regsets): Likewise.
5748 * linux-nios2-low.c (nios2_regsets): Likewise.
5749 * linux-ppc-low.c (ppc_regsets): Likewise.
5750 * linux-s390-low.c (s390_regsets): Likewise.
5751 * linux-sh-low.c (sh_regsets): Likewise.
5752 * linux-sparc-low.c (sparc_regsets): Likewise.
5753 * linux-tic6x-low.c (tic6x_regsets): Likewise.
5754 * linux-tile-low.c (tile_regsets): Likewise.
5755 * linux-x86-low.c (x86_regsets): Likewise.
5756 * linux-xtensa-low.c (xtensa_regsets): Likewise.
5757
5758 2015-10-26 Doug Evans <dje@google.com>
5759
5760 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
5761
5762 2015-10-26 Doug Evans <dje@google.com>
5763
5764 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
5765
5766 2015-10-26 Doug Evans <dje@google.com>
5767
5768 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
5769 for debug_printf.
5770 (attach_thread, find_new_threads_callback): Ditto.
5771
5772 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
5773
5774 * mem-break.h (set_breakpoint_data): Remove.
5775
5776 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
5777
5778 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
5779 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
5780 (initialize_low): Remove set_breakpoint_data call.
5781 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
5782 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
5783 (initialize_low): Remove set_breakpoint_data call.
5784 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
5785 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
5786 (initialize_low): Remove set_breakpoint_data call.
5787
5788 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
5789
5790 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
5791 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
5792 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
5793 * target.h (target_breakpoint_kind_from_pc): New macro.
5794
5795 2015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
5796
5797 * linux-low.c (default_breakpoint_kind_from_pc): New function.
5798 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
5799 the default breakpoint kind.
5800
5801 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5802
5803 * linux-arm-low.c (arm_supports_z_point_type): Add software
5804 breakpoint support.
5805
5806 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5807
5808 * linux-arm-low.c: Refactor breakpoint definitions.
5809 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
5810 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
5811
5812 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5813
5814 * Makefile.in: Add arm.c/o.
5815 * configure.srv: Likewise.
5816 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
5817 (arm_breakpoint_kind_from_pc): New function.
5818 (arm_sw_breakpoint_from_kind): Return proper kind.
5819 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
5820
5821 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5822
5823 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
5824 removal.
5825 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
5826 (struct raw_breakpoint) <size>: Remove.
5827 (struct raw_breakpoint) <kind>: Add.
5828 (bp_size): New function.
5829 (bp_opcode): Likewise.
5830 (find_raw_breakpoint_at): Adjust for kind.
5831 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
5832 (remove_memory_breakpoint): Adjust for kind call bp_size.
5833 (set_raw_breakpoint_at): Adjust for kind.
5834 (set_breakpoint): Likewise.
5835 (set_breakpoint_at): Call breakpoint_kind_from_pc.
5836 (delete_raw_breakpoint): Adjust for kind.
5837 (delete_breakpoint): Likewise.
5838 (find_gdb_breakpoint): Likewise.
5839 (set_gdb_breakpoint_1): Likewise.
5840 (set_gdb_breakpoint): Likewise.
5841 (delete_gdb_breakpoint_1): Likewise.
5842 (delete_gdb_breakpoint): Likewise.
5843 (uninsert_raw_breakpoint): Likewise.
5844 (reinsert_raw_breakpoint): Likewise.
5845 (set_breakpoint_data): Remove.
5846 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
5847 (check_mem_read): Adjust for kind call bp_size.
5848 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
5849 (clone_one_breakpoint): Adjust for kind.
5850 * mem-break.h (set_gdb_breakpoint): Likewise.
5851 (delete_gdb_breakpoint): Likewise.
5852 * server.c (process_serial_event): Likewise.
5853
5854 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5855
5856 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
5857 (struct linux_target_ops) <breakpoint>: Remove.
5858 (struct linux_target_ops) <breakpoint_len>: Remove.
5859 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5860 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5861 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
5862 (arm_sw_breakpoint_from_kind): New function.
5863 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
5864 (struct linux_target_ops) <breakpoint>: Remove.
5865 (struct linux_target_ops) <breakpoint_len>: Remove.
5866 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5867 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5868 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
5869 (struct linux_target_ops) <breakpoint>: Remove.
5870 (struct linux_target_ops) <breakpoint_len>: Remove.
5871 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5872 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5873 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
5874 (struct linux_target_ops) <breakpoint>: Remove.
5875 (struct linux_target_ops) <breakpoint_len>: Remove.
5876 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5877 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5878 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
5879 and sw_breakpoint_from_kind to increment the pc.
5880 (linux_breakpoint_kind_from_pc): New function.
5881 (linux_sw_breakpoint_from_kind): New function.
5882 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
5883 (initialize_low): Call breakpoint_kind_from_pc and
5884 sw_breakpoint_from_kind to replace breakpoint_data/len.
5885 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
5886 New field.
5887 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
5888 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
5889 (struct linux_target_ops) <breakpoint>: Remove.
5890 (struct linux_target_ops) <breakpoint_len>: Remove.
5891 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5892 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5893 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
5894 (struct linux_target_ops) <breakpoint>: Remove.
5895 (struct linux_target_ops) <breakpoint_len>: Remove.
5896 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5897 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5898 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
5899 (struct linux_target_ops) <breakpoint>: Remove.
5900 (struct linux_target_ops) <breakpoint_len>: Remove.
5901 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5902 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5903 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
5904 (struct linux_target_ops) <breakpoint>: Remove.
5905 (struct linux_target_ops) <breakpoint_len>: Remove.
5906 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5907 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5908 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
5909 (struct linux_target_ops) <breakpoint>: Remove.
5910 (struct linux_target_ops) <breakpoint_len>: Remove.
5911 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5912 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5913 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
5914 (struct linux_target_ops) <breakpoint>: Remove.
5915 (struct linux_target_ops) <breakpoint_len>: Remove.
5916 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5917 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5918 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
5919 (struct linux_target_ops) <breakpoint>: Remove.
5920 (struct linux_target_ops) <breakpoint_len>: Remove.
5921 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5922 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5923 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
5924 (struct linux_target_ops) <breakpoint>: Remove.
5925 (struct linux_target_ops) <breakpoint_len>: Remove.
5926 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5927 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5928 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
5929 (struct linux_target_ops) <breakpoint>: Remove.
5930 (struct linux_target_ops) <breakpoint_len>: Remove.
5931 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5932 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5933 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
5934 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
5935 (struct linux_target_ops) <breakpoint>: Remove.
5936 (struct linux_target_ops) <breakpoint_len>: Remove.
5937 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5938 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5939 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
5940 (struct linux_target_ops) <breakpoint>: Remove.
5941 (struct linux_target_ops) <breakpoint_len>: Remove.
5942 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5943 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5944
5945 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5946
5947 * linux-cris-low.c (cris_get_pc): Remove void arg.
5948
5949 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
5950
5951 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
5952 variable name.
5953
5954 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
5955
5956 * inferiors.c (thread_pid_matches_callback): New function.
5957 (find_thread_process): New function.
5958 (remove_thread): Reset current_thread.
5959 (remove_process): Assert threads have been removed first.
5960
5961 2015-10-15 Yao Qi <yao.qi@linaro.org>
5962
5963 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
5964 if it is 3.
5965 (aarch64_remove_point): Likewise.
5966 * regcache.c (regcache_register_size): New function.
5967
5968 2015-10-12 Yao Qi <yao.qi@linaro.org>
5969
5970 * linux-aarch64-low.c: Update all callers as emit_load_store
5971 is renamed to aarch64_emit_load_store.
5972
5973 2015-10-12 Yao Qi <yao.qi@linaro.org>
5974
5975 * linux-aarch64-low.c: Update all callers of function renaming
5976 from emit_insn to aarch64_emit_insn.
5977
5978 2015-10-12 Yao Qi <yao.qi@linaro.org>
5979
5980 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
5981 arch/aarch64-insn.h.
5982 (struct aarch64_memory_operand): Likewise.
5983 (ENCODE): Likewise.
5984 (emit_insn): Move to arch/aarch64-insn.c.
5985 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
5986 (emit_load_store): Move to arch/aarch64-insn.c.
5987 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
5988 (can_encode_int32): Remove.
5989
5990 2015-10-12 Yao Qi <yao.qi@linaro.org>
5991
5992 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
5993 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
5994 (aarch64_relocate_instruction): Likewise.
5995 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
5996 (struct aarch64_insn_visitor): Likewise.
5997
5998 2015-10-12 Yao Qi <yao.qi@linaro.org>
5999
6000 * linux-aarch64-low.c (struct aarch64_insn_data): New.
6001 (struct aarch64_insn_visitor): New.
6002 (struct aarch64_insn_relocation_data): New.
6003 (aarch64_ftrace_insn_reloc_b): New function.
6004 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
6005 (aarch64_ftrace_insn_reloc_cb): Likewise.
6006 (aarch64_ftrace_insn_reloc_tb): Likewise.
6007 (aarch64_ftrace_insn_reloc_adr): Likewise.
6008 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
6009 (aarch64_ftrace_insn_reloc_others): Likewise.
6010 (visitor): New.
6011 (aarch64_relocate_instruction): Use visitor.
6012
6013 2015-10-12 Yao Qi <yao.qi@linaro.org>
6014
6015 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
6016 int. Add argument buf.
6017 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
6018 aarch64_relocate_instruction.
6019
6020 2015-10-12 Yao Qi <yao.qi@linaro.org>
6021
6022 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
6023 argument insn. Remove local variable insn. Don't call
6024 target_read_uint32.
6025 (aarch64_install_fast_tracepoint_jump_pad): Call
6026 target_read_uint32.
6027
6028 2015-09-30 Yao Qi <yao.qi@linaro.org>
6029
6030 * linux-aarch64-low.c (emit_movk): Shorten a long line.
6031 (emit_load_store_pair): Likewise.
6032
6033 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
6034
6035 * dll.c (match_dll): Add cast(s).
6036 (unloaded_dll): Likewise.
6037 * linux-low.c (second_thread_of_pid_p): Likewise.
6038 (delete_lwp_callback): Likewise.
6039 (count_events_callback): Likewise.
6040 (select_event_lwp_callback): Likewise.
6041 (linux_set_resume_request): Likewise.
6042 * server.c (accumulate_file_name_length): Likewise.
6043 (emit_dll_description): Likewise.
6044 (handle_qxfer_threads_worker): Likewise.
6045 (visit_actioned_threads): Likewise.
6046 * thread-db.c (any_thread_of): Likewise.
6047 * tracepoint.c (same_process_p): Likewise.
6048 (match_blocktype): Likewise.
6049 (build_traceframe_info_xml): Likewise.
6050
6051 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
6052
6053 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
6054 assignment.
6055 (gdb_unparse_agent_expr): Likewise.
6056 * hostio.c (require_data): Likewise.
6057 (handle_pread): Likewise.
6058 * linux-low.c (disable_regset): Likewise.
6059 (fetch_register): Likewise.
6060 (store_register): Likewise.
6061 (get_dynamic): Likewise.
6062 (linux_qxfer_libraries_svr4): Likewise.
6063 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
6064 (set_fast_tracepoint_jump): Likewise.
6065 (uninsert_fast_tracepoint_jumps_at): Likewise.
6066 (reinsert_fast_tracepoint_jumps_at): Likewise.
6067 (validate_inserted_breakpoint): Likewise.
6068 (clone_agent_expr): Likewise.
6069 * regcache.c (init_register_cache): Likewise.
6070 * remote-utils.c (putpkt_binary_1): Likewise.
6071 (decode_M_packet): Likewise.
6072 (decode_X_packet): Likewise.
6073 (look_up_one_symbol): Likewise.
6074 (relocate_instruction): Likewise.
6075 (monitor_output): Likewise.
6076 * server.c (handle_search_memory): Likewise.
6077 (handle_qxfer_exec_file): Likewise.
6078 (handle_qxfer_libraries): Likewise.
6079 (handle_qxfer): Likewise.
6080 (handle_query): Likewise.
6081 (handle_v_cont): Likewise.
6082 (handle_v_run): Likewise.
6083 (captured_main): Likewise.
6084 * target.c (write_inferior_memory): Likewise.
6085 * thread-db.c (try_thread_db_load_from_dir): Likewise.
6086 * tracepoint.c (init_trace_buffer): Likewise.
6087 (add_tracepoint_action): Likewise.
6088 (add_traceframe): Likewise.
6089 (add_traceframe_block): Likewise.
6090 (cmd_qtdpsrc): Likewise.
6091 (cmd_qtdv): Likewise.
6092 (cmd_qtstatus): Likewise.
6093 (response_source): Likewise.
6094 (response_tsv): Likewise.
6095 (cmd_qtnotes): Likewise.
6096 (gdb_collect): Likewise.
6097 (initialize_tracepoint): Likewise.
6098
6099 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
6100
6101 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
6102 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
6103 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
6104 <NOP>: New.
6105 (enum aarch64_condition_codes): New enum.
6106 (w0): New static global.
6107 (fp): Likewise.
6108 (lr): Likewise.
6109 (struct aarch64_memory_operand) <type>: New
6110 MEMORY_OPERAND_POSTINDEX type.
6111 (postindex_memory_operand): New helper function.
6112 (emit_ret): New function.
6113 (emit_load_store_pair): New function, factored out of emit_stp
6114 with support for MEMORY_OPERAND_POSTINDEX.
6115 (emit_stp): Rewrite using emit_load_store_pair.
6116 (emit_ldp): New function.
6117 (emit_load_store): Likewise.
6118 (emit_ldr): Mention post-index instruction in comment.
6119 (emit_ldrh): New function.
6120 (emit_ldrb): New function.
6121 (emit_ldrsw): Mention post-index instruction in comment.
6122 (emit_str): Likewise.
6123 (emit_subs): New function.
6124 (emit_cmp): Likewise.
6125 (emit_and): Likewise.
6126 (emit_orr): Likewise.
6127 (emit_orn): Likewise.
6128 (emit_eor): Likewise.
6129 (emit_mvn): Likewise.
6130 (emit_lslv): Likewise.
6131 (emit_lsrv): Likewise.
6132 (emit_asrv): Likewise.
6133 (emit_mul): Likewise.
6134 (emit_sbfm): Likewise.
6135 (emit_sbfx): Likewise.
6136 (emit_ubfm): Likewise.
6137 (emit_ubfx): Likewise.
6138 (emit_csinc): Likewise.
6139 (emit_cset): Likewise.
6140 (emit_nop): Likewise.
6141 (emit_ops_insns): New helper function.
6142 (emit_pop): Likewise.
6143 (emit_push): Likewise.
6144 (aarch64_emit_prologue): New function.
6145 (aarch64_emit_epilogue): Likewise.
6146 (aarch64_emit_add): Likewise.
6147 (aarch64_emit_sub): Likewise.
6148 (aarch64_emit_mul): Likewise.
6149 (aarch64_emit_lsh): Likewise.
6150 (aarch64_emit_rsh_signed): Likewise.
6151 (aarch64_emit_rsh_unsigned): Likewise.
6152 (aarch64_emit_ext): Likewise.
6153 (aarch64_emit_log_not): Likewise.
6154 (aarch64_emit_bit_and): Likewise.
6155 (aarch64_emit_bit_or): Likewise.
6156 (aarch64_emit_bit_xor): Likewise.
6157 (aarch64_emit_bit_not): Likewise.
6158 (aarch64_emit_equal): Likewise.
6159 (aarch64_emit_less_signed): Likewise.
6160 (aarch64_emit_less_unsigned): Likewise.
6161 (aarch64_emit_ref): Likewise.
6162 (aarch64_emit_if_goto): Likewise.
6163 (aarch64_emit_goto): Likewise.
6164 (aarch64_write_goto_address): Likewise.
6165 (aarch64_emit_const): Likewise.
6166 (aarch64_emit_call): Likewise.
6167 (aarch64_emit_reg): Likewise.
6168 (aarch64_emit_pop): Likewise.
6169 (aarch64_emit_stack_flush): Likewise.
6170 (aarch64_emit_zero_ext): Likewise.
6171 (aarch64_emit_swap): Likewise.
6172 (aarch64_emit_stack_adjust): Likewise.
6173 (aarch64_emit_int_call_1): Likewise.
6174 (aarch64_emit_void_call_2): Likewise.
6175 (aarch64_emit_eq_goto): Likewise.
6176 (aarch64_emit_ne_goto): Likewise.
6177 (aarch64_emit_lt_goto): Likewise.
6178 (aarch64_emit_le_goto): Likewise.
6179 (aarch64_emit_gt_goto): Likewise.
6180 (aarch64_emit_ge_got): Likewise.
6181 (aarch64_emit_ops_impl): New static global variable.
6182 (aarch64_emit_ops): New target function, return
6183 &aarch64_emit_ops_impl.
6184 (struct linux_target_ops): Install it.
6185
6186 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
6187
6188 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
6189 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
6190 aarch64-ipa.o.
6191 * linux-aarch64-ipa.c: New file.
6192 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
6193 and endian.h.
6194 (aarch64_get_thread_area): New target method.
6195 (extract_signed_bitfield): New helper function.
6196 (aarch64_decode_ldr_literal): New function.
6197 (enum aarch64_opcodes): New enum.
6198 (struct aarch64_register): New struct.
6199 (struct aarch64_operand): New struct.
6200 (x0): New static global.
6201 (x1): Likewise.
6202 (x2): Likewise.
6203 (x3): Likewise.
6204 (x4): Likewise.
6205 (w2): Likewise.
6206 (ip0): Likewise.
6207 (sp): Likewise.
6208 (xzr): Likewise.
6209 (aarch64_register): New helper function.
6210 (register_operand): Likewise.
6211 (immediate_operand): Likewise.
6212 (struct aarch64_memory_operand): New struct.
6213 (offset_memory_operand): New helper function.
6214 (preindex_memory_operand): Likewise.
6215 (enum aarch64_system_control_registers): New enum.
6216 (ENCODE): New macro.
6217 (emit_insn): New helper function.
6218 (emit_b): New function.
6219 (emit_bcond): Likewise.
6220 (emit_cb): Likewise.
6221 (emit_tb): Likewise.
6222 (emit_blr): Likewise.
6223 (emit_stp): Likewise.
6224 (emit_ldp_q_offset): Likewise.
6225 (emit_stp_q_offset): Likewise.
6226 (emit_load_store): Likewise.
6227 (emit_ldr): Likewise.
6228 (emit_ldrsw): Likewise.
6229 (emit_str): Likewise.
6230 (emit_ldaxr): Likewise.
6231 (emit_stxr): Likewise.
6232 (emit_stlr): Likewise.
6233 (emit_data_processing_reg): Likewise.
6234 (emit_data_processing): Likewise.
6235 (emit_add): Likewise.
6236 (emit_sub): Likewise.
6237 (emit_mov): Likewise.
6238 (emit_movk): Likewise.
6239 (emit_mov_addr): Likewise.
6240 (emit_mrs): Likewise.
6241 (emit_msr): Likewise.
6242 (emit_sevl): Likewise.
6243 (emit_wfe): Likewise.
6244 (append_insns): Likewise.
6245 (can_encode_int32_in): New helper function.
6246 (aarch64_relocate_instruction): New function.
6247 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
6248 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
6249 (struct linux_target_ops): Install aarch64_get_thread_area,
6250 aarch64_install_fast_tracepoint_jump_pad and
6251 aarch64_get_min_fast_tracepoint_insn_len.
6252
6253 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
6254
6255 * Makefile.in (aarch64-insn.o): New rule.
6256 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
6257
6258 2015-09-21 Yao Qi <yao.qi@linaro.org>
6259
6260 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
6261
6262 2015-09-21 Yao Qi <yao.qi@linaro.org>
6263
6264 * tracepoint.c (max_jump_pad_size): Remove.
6265
6266 2015-09-18 Yao Qi <yao.qi@linaro.org>
6267
6268 * linux-aarch64-low.c: Don't include sys/uio.h.
6269 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
6270
6271 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
6272
6273 * tracepoint.c (eval_result_type): Change prototype.
6274 (condition_true_at_tracepoint): Fix argument to compiled_cond.
6275
6276 2015-09-15 Pedro Alves <palves@redhat.com>
6277
6278 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
6279 Check whether to report exec events instead of checking whether
6280 multiprocess is enabled.
6281
6282 2015-09-15 Pedro Alves <palves@redhat.com>
6283
6284 PR remote/18965
6285 * remote-utils.c (prepare_resume_reply): Merge
6286 TARGET_WAITKIND_VFORK_DONE switch case with the
6287 TARGET_WAITKIND_FORKED case.
6288
6289 2015-09-15 Yao Qi <yao.qi@linaro.org>
6290
6291 * server.c (handle_query): Check string comparison using
6292 "else if" instead of "if".
6293
6294 2015-09-15 Yao Qi <yao.qi@linaro.org>
6295
6296 * server.c (vCont_supported): New global variable.
6297 (handle_query): Set vCont_supported to 1 if "vContSupported+"
6298 matches. Append ";vContSupported+" to own_buf.
6299 (handle_v_requests): Append ";s;S" to own_buf if target supports
6300 hardware single step or vCont_supported is false.
6301 (capture_main): Set vCont_supported to zero.
6302
6303 2015-09-15 Yao Qi <yao.qi@linaro.org>
6304
6305 * linux-low.c (linux_supports_conditional_breakpoints): Rename
6306 it to ...
6307 (linux_supports_hardware_single_step): ... New function.
6308 (linux_target_ops): Update.
6309 * lynx-low.c (lynx_target_ops): Set field
6310 supports_hardware_single_step to target_can_do_hardware_single_step.
6311 * nto-low.c (nto_target_ops): Likewise.
6312 * spu-low.c (spu_target_ops): Likewise.
6313 * win32-low.c (win32_target_ops): Likewise.
6314 * target.c (target_can_do_hardware_single_step): New function.
6315 * target.h (struct target_ops) <supports_conditional_breakpoints>:
6316 Remove. <supports_hardware_single_step>: New field.
6317 (target_supports_conditional_breakpoints): Remove.
6318 (target_supports_hardware_single_step): New macro.
6319 (target_can_do_hardware_single_step): Declare.
6320 * server.c (handle_query): Use target_supports_hardware_single_step
6321 instead of target_supports_conditional_breakpoints.
6322
6323 2015-09-15 Yao Qi <yao.qi@linaro.org>
6324
6325 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
6326 function.
6327 (struct linux_target_ops the_low_target): Install
6328 aarch64_linux_siginfo_fixup.
6329
6330 2015-09-11 Don Breazeal <donb@codesourcery.com>
6331 Luis Machado <lgustavo@codesourcery.com>
6332
6333 * linux-low.c (linux_mourn): Static declaration.
6334 (linux_arch_setup): Move in front of
6335 handle_extended_wait.
6336 (linux_arch_setup_thread): New function.
6337 (handle_extended_wait): Handle exec events. Call
6338 linux_arch_setup_thread. Make event_lwp argument a
6339 pointer-to-a-pointer.
6340 (check_zombie_leaders): Do not check stopped threads.
6341 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
6342 (linux_low_filter_event): Add lwp and thread for exec'ing
6343 non-leader thread if leader thread has been deleted.
6344 Refactor code into linux_arch_setup_thread and call it.
6345 Pass child lwp pointer by reference to handle_extended_wait.
6346 (linux_wait_for_event_filtered): Update comment.
6347 (linux_wait_1): Prevent clobbering exec event status.
6348 (linux_supports_exec_events): New function.
6349 (linux_target_ops) <supports_exec_events>: Initialize new member.
6350 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
6351 new member.
6352 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
6353 * server.c (report_exec_events): New global variable.
6354 (handle_query): Handle qSupported query for exec-events feature.
6355 (captured_main): Initialize report_exec_events.
6356 * server.h (report_exec_events): Declare new global variable.
6357 * target.h (struct target_ops) <supports_exec_events>: New
6358 member.
6359 (target_supports_exec_events): New macro.
6360 * win32-low.c (win32_target_ops) <supports_exec_events>:
6361 Initialize new member.
6362
6363 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
6364
6365 * linux-low.c (linux_low_enable_btrace): Remove.
6366 (linux_target_ops): Replace linux_low_enable_btrace with
6367 linux_enable_btrace.
6368
6369 2015-09-03 Yao Qi <yao.qi@linaro.org>
6370
6371 * linux-aarch64-low.c (aarch64_insert_point): Call
6372 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
6373 returns true.
6374
6375 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
6376
6377 * linux-low.c (check_stopped_by_breakpoint): Use
6378 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
6379
6380 2015-08-27 Pedro Alves <palves@redhat.com>
6381
6382 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
6383
6384 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
6385
6386 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
6387 the XNEW-family equivalent.
6388 (compile_bytecodes): Likewise.
6389 * dll.c (loaded_dll): Likewise.
6390 * event-loop.c (append_callback_event): Likewise.
6391 (create_file_handler): Likewise.
6392 (create_file_event): Likewise.
6393 * hostio.c (handle_open): Likewise.
6394 * inferiors.c (add_thread): Likewise.
6395 (add_process): Likewise.
6396 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
6397 * linux-arm-low.c (arm_new_process): Likewise.
6398 (arm_new_thread): Likewise.
6399 * linux-low.c (add_to_pid_list): Likewise.
6400 (linux_add_process): Likewise.
6401 (handle_extended_wait): Likewise.
6402 (add_lwp): Likewise.
6403 (enqueue_one_deferred_signal): Likewise.
6404 (enqueue_pending_signal): Likewise.
6405 (linux_resume_one_lwp_throw): Likewise.
6406 (linux_resume_one_thread): Likewise.
6407 (linux_read_memory): Likewise.
6408 (linux_write_memory): Likewise.
6409 * linux-mips-low.c (mips_linux_new_process): Likewise.
6410 (mips_linux_new_thread): Likewise.
6411 (mips_add_watchpoint): Likewise.
6412 * linux-x86-low.c (initialize_low_arch): Likewise.
6413 * lynx-low.c (lynx_add_process): Likewise.
6414 * mem-break.c (set_raw_breakpoint_at): Likewise.
6415 (set_breakpoint): Likewise.
6416 (add_condition_to_breakpoint): Likewise.
6417 (add_commands_to_breakpoint): Likewise.
6418 (clone_agent_expr): Likewise.
6419 (clone_one_breakpoint): Likewise.
6420 * regcache.c (new_register_cache): Likewise.
6421 * remote-utils.c (look_up_one_symbol): Likewise.
6422 * server.c (queue_stop_reply): Likewise.
6423 (start_inferior): Likewise.
6424 (queue_stop_reply_callback): Likewise.
6425 (handle_target_event): Likewise.
6426 * spu-low.c (fetch_ppc_memory): Likewise.
6427 (store_ppc_memory): Likewise.
6428 * target.c (set_target_ops): Likewise.
6429 * thread-db.c (thread_db_load_search): Likewise.
6430 (try_thread_db_load_1): Likewise.
6431 * tracepoint.c (add_tracepoint): Likewise.
6432 (add_tracepoint_action): Likewise.
6433 (create_trace_state_variable): Likewise.
6434 (cmd_qtdpsrc): Likewise.
6435 (cmd_qtro): Likewise.
6436 (add_while_stepping_state): Likewise.
6437 * win32-low.c (child_add_thread): Likewise.
6438 (get_image_name): Likewise.
6439
6440 2015-08-25 Yao Qi <yao.qi@linaro.org>
6441
6442 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
6443
6444 2015-08-25 Yao Qi <yao.qi@linaro.org>
6445
6446 * Makefile.in (aarch64-linux.o): New rule.
6447 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
6448 srv_tgtobj.
6449 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
6450 (aarch64_init_debug_reg_state): Make it extern.
6451 (aarch64_linux_prepare_to_resume): Remove.
6452
6453 2015-08-25 Yao Qi <yao.qi@linaro.org>
6454
6455 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
6456 lwp_arch_private_info and ptid_of_lwp.
6457
6458 2015-08-25 Yao Qi <yao.qi@linaro.org>
6459
6460 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
6461 Find proc_info by find_process_pid. All callers updated.
6462
6463 2015-08-25 Yao Qi <yao.qi@linaro.org>
6464
6465 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
6466 Remove.
6467 (debug_reg_change_callback): Remove.
6468 (aarch64_notify_debug_reg_change): Remove.
6469
6470 2015-08-25 Yao Qi <yao.qi@linaro.org>
6471
6472 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
6473 Call current_lwp_ptid.
6474
6475 2015-08-25 Yao Qi <yao.qi@linaro.org>
6476
6477 * linux-aarch64-low.c (debug_reg_change_callback): Use
6478 debug_printf.
6479
6480 2015-08-25 Yao Qi <yao.qi@linaro.org>
6481
6482 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
6483
6484 2015-08-25 Yao Qi <yao.qi@linaro.org>
6485
6486 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
6487
6488 2015-08-25 Yao Qi <yao.qi@linaro.org>
6489
6490 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
6491 the code.
6492
6493 2015-08-25 Yao Qi <yao.qi@linaro.org>
6494
6495 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
6496 Remove.
6497 (debug_reg_change_callback): Remove argument entry and add argument
6498 lwp. Remove local variable thread. Don't print thread id in the
6499 debugging output. Don't check whether pid of thread equals to pid.
6500 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
6501 iterate_over_lwps instead find_inferior.
6502
6503 2015-08-24 Pedro Alves <palves@redhat.com>
6504
6505 * inferiors.c (get_first_process): New function.
6506 * inferiors.h (get_first_process): New declaration.
6507 * remote-utils.c (read_ptid): Default to the first process in the
6508 list, instead of to the current thread's process.
6509
6510 2015-08-24 Pedro Alves <palves@redhat.com>
6511
6512 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
6513 * event-loop.c: Likewise.
6514 * remote-utils.c: Likewise.
6515 * tracepoint.c: Likewise.
6516
6517 2015-08-24 Pedro Alves <palves@redhat.com>
6518
6519 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
6520 ptid_get_lwp.
6521
6522 2015-08-21 Pedro Alves <palves@redhat.com>
6523
6524 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
6525 instead of literal 1.
6526
6527 2015-08-21 Pedro Alves <palves@redhat.com>
6528
6529 * tdesc.c (default_description): Explicitly zero-initialize.
6530
6531 2015-08-21 Pedro Alves <palves@redhat.com>
6532
6533 PR gdb/18749
6534 * inferiors.c (remove_thread): Discard any pending stop reply for
6535 this thread.
6536 * server.c (remove_all_on_match_pid): Rename to ...
6537 (remove_all_on_match_ptid): ... this. Work with a filter ptid
6538 instead of a pid.
6539 (discard_queued_stop_replies): Change parameter to a ptid. Now
6540 extern.
6541 (handle_v_kill, kill_inferior_callback, captured_main)
6542 (process_serial_event): Adjust.
6543 * server.h (discard_queued_stop_replies): Declare.
6544
6545 2015-08-21 Pedro Alves <palves@redhat.com>
6546
6547 * linux-low.c (wait_for_sigstop): Always switch to no thread
6548 selected if the previously current thread dies.
6549 * lynx-low.c (lynx_request_interrupt): Use the first thread's
6550 process instead of the current thread's.
6551 * remote-utils.c (input_interrupt): Don't check if there's no
6552 current thread.
6553 * server.c (gdb_read_memory, gdb_write_memory): If setting the
6554 current thread to the general thread fails, error out.
6555 (handle_qxfer_auxv, handle_qxfer_libraries)
6556 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
6557 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
6558 (handle_query): Check if there's a thread selected instead of
6559 checking whether there's any thread in the thread list.
6560 (handle_qxfer_threads, handle_qxfer_btrace)
6561 (handle_qxfer_btrace_conf): Don't error out early if there's no
6562 thread in the thread list.
6563 (handle_v_cont, myresume): Don't set the current thread to the
6564 continue thread.
6565 (process_serial_event) <Hg handling>: Also set thread_id if the
6566 previous general thread is still alive.
6567 (process_serial_event) <g/G handling>: If setting the current
6568 thread to the general thread fails, error out.
6569 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
6570 thread's lwp instead of the current thread's.
6571 * target.c (set_desired_thread): If the desired thread was not
6572 found, leave the current thread pointing to NULL. Return an int
6573 (boolean) indicating success.
6574 * target.h (set_desired_thread): Change return type to int.
6575
6576 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
6577
6578 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
6579 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
6580 #includes.
6581 (ps_get_thread_area): New function.
6582
6583 2015-08-19 Gary Benson <gbenson@redhat.com>
6584
6585 * hostio.c (handle_pread): Do not attempt to read more data
6586 than hostio_reply_with_data can fit in a packet.
6587
6588 2015-08-18 Joel Brobecker <brobecker@adacore.com>
6589
6590 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
6591
6592 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
6593
6594 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
6595
6596 2015-08-06 Pedro Alves <palves@redhat.com>
6597
6598 * tracepoint.c (expr_eval_result): Now an int.
6599
6600 2015-08-06 Pedro Alves <palves@redhat.com>
6601
6602 * gdbthread.h (struct regcache): Forward declare.
6603 (struct thread_info) <regcache_data>: Now a struct regcache
6604 pointer.
6605 * inferiors.c (inferior_regcache_data)
6606 (set_inferior_regcache_data): Now work with struct regcache
6607 pointers.
6608 * inferiors.h (struct regcache): Forward declare.
6609 (inferior_regcache_data, set_inferior_regcache_data): Now work
6610 with struct regcache pointers.
6611 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
6612 (free_register_cache_thread): Remove struct regcache pointer
6613 casts.
6614
6615 2015-08-06 Pedro Alves <palves@redhat.com>
6616
6617 * server.c (captured_main): On error, print the exception message
6618 to stderr, and if run_once is set, throw a quit.
6619
6620 2015-08-06 Pedro Alves <palves@redhat.com>
6621
6622 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
6623 the current thread.
6624
6625 2015-08-06 Pedro Alves <palves@redhat.com>
6626
6627 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
6628 reading beyond the passed in buffer length.
6629
6630 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
6631
6632 * tracepoint.c (symbol_list) <required>: Remove.
6633
6634 2015-08-06 Pedro Alves <palves@redhat.com>
6635
6636 * linux-low.c (handle_extended_wait): Set the fork child's suspend
6637 count if stopping and suspending threads.
6638 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
6639 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
6640 (linux_detach): Complete an ongoing step-over.
6641 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
6642 throughout.
6643 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
6644 (linux_wait_1): If passing a signal to the inferior after
6645 finishing a step-over, unsuspend and re-resume all lwps. If we
6646 see a single-step event but the thread should be continuing, don't
6647 pass the trap to gdb.
6648 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
6649 internal_error instead of gdb_assert.
6650 (enqueue_pending_signal): New function.
6651 (check_ptrace_stopped_lwp_gone): Add debug output.
6652 (start_step_over): Use internal_error instead of gdb_assert.
6653 (complete_ongoing_step_over): New function.
6654 (linux_resume_one_thread): Don't resume a suspended thread.
6655 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
6656 it stepping.
6657
6658 2015-08-06 Pedro Alves <palves@redhat.com>
6659
6660 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
6661 (linux_thread_alive): Use lwp_is_marked_dead.
6662 (extended_event_reported): Delete.
6663 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
6664 instead of extended_event_reported.
6665 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
6666 as well.
6667 (lwp_is_marked_dead): New function.
6668 (lwp_running): Use lwp_is_marked_dead.
6669 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
6670 comment.
6671
6672 2015-08-06 Pedro Alves <palves@redhat.com>
6673
6674 * linux-low.c (linux_wait_1): Move fork event output out of the
6675 !report_to_gdb check. Pass event_child->waitstatus to
6676 target_waitstatus_to_string instead of ourstatus.
6677
6678 2015-08-04 Yao Qi <yao.qi@linaro.org>
6679
6680 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
6681 if current_thread is 32 bit.
6682
6683 2015-08-04 Yao Qi <yao.qi@linaro.org>
6684
6685 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
6686 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
6687 * server.c (extended_protocol): Remove "static".
6688 * server.h (extended_protocol): Declare it.
6689
6690 2015-08-04 Yao Qi <yao.qi@linaro.org>
6691
6692 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
6693 both aarch64 and aarch32.
6694 (aarch64_set_pc): Likewise.
6695
6696 2015-08-04 Yao Qi <yao.qi@linaro.org>
6697
6698 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
6699 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
6700 arm-with-neon.xml to srv_xmlfiles.
6701 * linux-aarch64-low.c: Include linux-aarch32-low.h.
6702 (is_64bit_tdesc): New function.
6703 (aarch64_linux_read_description): New function.
6704 (aarch64_arch_setup): Call aarch64_linux_read_description.
6705 (regs_info): Rename to regs_info_aarch64.
6706 (aarch64_regs_info): Return right regs_info.
6707 (initialize_low_arch): Call initialize_low_arch_aarch32.
6708
6709 2015-08-04 Yao Qi <yao.qi@linaro.org>
6710
6711 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
6712 * linux-aarch32-low.c: New file.
6713 * linux-aarch32-low.h: New file.
6714 * linux-arm-low.c (arm_fill_gregset): Move it to
6715 linux-aarch32-low.c.
6716 (arm_store_gregset): Likewise.
6717 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
6718 (arm_store_vfpregset): Call arm_store_vfpregset_num.
6719 (arm_arch_setup): Check if PTRACE_GETREGSET works.
6720 (regs_info): Rename to regs_info_arm.
6721 (arm_regs_info): Return regs_info_aarch32 if
6722 have_ptrace_getregset is 1 and target description is
6723 arm_with_neon or arm_with_vfpv3.
6724 (initialize_low_arch): Don't call init_registers_arm_with_neon.
6725 Call initialize_low_arch_aarch32 instead.
6726
6727 2015-08-04 Yao Qi <yao.qi@linaro.org>
6728
6729 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
6730 * linux-low.c: ... here.
6731 * linux-low.h (have_ptrace_getregset): Declare it.
6732
6733 2015-08-04 Pedro Alves <palves@redhat.com>
6734
6735 * thread-db.c (struct thread_db): Use new typedefs.
6736 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
6737 CHK calls.
6738 (disable_thread_event_reporting): Cast result of dlsym to
6739 destination function pointer type.
6740 (thread_db_mourn): Use td_ta_delete_ftype.
6741
6742 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
6743
6744 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
6745 arch variant.
6746 (CDX_BREAKPOINT): Define for R2.
6747 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
6748 (the_low_target): Add comments.
6749
6750 2015-07-30 Yao Qi <yao.qi@linaro.org>
6751
6752 * linux-arm-low.c (arm_hwcap): Remove it.
6753 (arm_read_description): New local variable arm_hwcap. Don't
6754 set arm_hwcap to zero.
6755
6756 2015-07-30 Yao Qi <yao.qi@linaro.org>
6757
6758 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
6759 Use regcache->tdesc instead.
6760 (arm_store_wmmxregset): Likewise.
6761 (arm_fill_vfpregset): Likewise.
6762 (arm_store_vfpregset): Likewise.
6763
6764 2015-07-30 Yao Qi <yao.qi@linaro.org>
6765
6766 * linux-arm-low.c: Include arch/arm.h.
6767 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
6768 (arm_store_gregset): Likewise.
6769
6770 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
6771
6772 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
6773 ptrace's 4th parameter.
6774
6775 2015-07-27 Yao Qi <yao.qi@linaro.org>
6776
6777 * configure.srv (case aarch64*-*-linux*): Don't set
6778 srv_linux_usrregs.
6779
6780 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
6781
6782 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
6783 sys/ptrace.h.
6784 * linux-arm-low.c: Likewise.
6785 * linux-cris-low.c: Likewise.
6786 * linux-crisv32-low.c: Likewise.
6787 * linux-low.c: Likewise.
6788 * linux-m68k-low.c: Likewise.
6789 * linux-mips-low.c: Likewise.
6790 * linux-nios2-low.c: Likewise.
6791 * linux-s390-low.c: Likewise.
6792 * linux-sparc-low.c: Likewise.
6793 * linux-tic6x-low.c: Likewise.
6794 * linux-tile-low.c: Likewise.
6795 * linux-x86-low.c: Likewise.
6796
6797 2015-07-24 Pedro Alves <palves@redhat.com>
6798
6799 * config.in: Regenerate.
6800 * configure: Regenerate.
6801
6802 2015-07-24 Pedro Alves <palves@redhat.com>
6803
6804 * acinclude.m4: Include ../ptrace.m4.
6805 * configure.ac: Call GDB_AC_PTRACE.
6806 * config.in, configure: Regenerate.
6807
6808 2015-07-24 Yao Qi <yao.qi@linaro.org>
6809
6810 * linux-low.c (linux_create_inferior): Remove setting to
6811 proc->priv->new_inferior.
6812 (linux_attach): Likewise.
6813 (linux_low_filter_event): Likewise.
6814 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
6815
6816 2015-07-24 Yao Qi <yao.qi@linaro.org>
6817
6818 * linux-low.c (linux_arch_setup): New function.
6819 (linux_low_filter_event): If proc->tdesc is NULL and
6820 proc->attached is true, call the_low_target.arch_setup.
6821 Otherwise, keep status pending, and return.
6822 (linux_resume_one_lwp_throw): Don't call get_pc if
6823 thread->while_stepping isn't NULL. Don't call
6824 get_thread_regcache if proc->tdesc is NULL.
6825 (need_step_over_p): Return 0 if proc->tdesc is NULL.
6826 (linux_target_ops): Install arch_setup.
6827 * server.c (start_inferior): Call the_target->arch_setup.
6828 * target.h (struct target_ops) <arch_setup>: New field.
6829 (target_arch_setup): New marco.
6830 * lynx-low.c (lynx_target_ops): Update.
6831 * nto-low.c (nto_target_ops): Update.
6832 * spu-low.c (spu_target_ops): Update.
6833 * win32-low.c (win32_target_ops): Update.
6834
6835 2015-07-24 Yao Qi <yao.qi@linaro.org>
6836
6837 * linux-low.c (linux_add_process): Don't set
6838 proc->priv->new_inferior.
6839 (linux_create_inferior): Set proc->priv->new_inferior to 1.
6840 (linux_attach): Likewise.
6841
6842 2015-07-24 Yao Qi <yao.qi@linaro.org>
6843
6844 * server.c (start_inferior): Code refactor.
6845
6846 2015-07-24 Yao Qi <yao.qi@linaro.org>
6847
6848 * server.c (process_serial_event): Set general_thread.
6849
6850 2015-07-21 Yao Qi <yao.qi@linaro.org>
6851
6852 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
6853 aarch64_linux_get_debug_reg_capacity.
6854
6855 2015-07-17 Yao Qi <yao.qi@linaro.org>
6856
6857 * Makefile.in (aarch64-linux-hw-point.o): New rule.
6858 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
6859 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
6860 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
6861 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
6862 (AARCH64_HWP_ALIGNMENT): Likewise.
6863 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
6864 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
6865 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
6866 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
6867 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
6868 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
6869 (struct aarch64_debug_reg_state): Likewise.
6870 (struct arch_lwp_info): Likewise.
6871 (aarch64_align_watchpoint): Likewise.
6872 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
6873 (aarch64_watchpoint_length): Likewise.
6874 (aarch64_point_encode_ctrl_reg): Likewise
6875 (aarch64_point_is_aligned): Likewise.
6876 (aarch64_align_watchpoint): Likewise.
6877 (aarch64_linux_set_debug_regs):
6878 (aarch64_dr_state_insert_one_point): Likewise.
6879 (aarch64_dr_state_remove_one_point): Likewise.
6880 (aarch64_handle_breakpoint): Likewise.
6881 (aarch64_handle_aligned_watchpoint): Likewise.
6882 (aarch64_handle_unaligned_watchpoint): Likewise.
6883 (aarch64_handle_watchpoint): Likewise.
6884
6885 2015-07-17 Yao Qi <yao.qi@linaro.org>
6886
6887 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
6888 and don't aarch64_get_debug_reg_state. All callers update.
6889 (aarch64_handle_aligned_watchpoint): Likewise.
6890 (aarch64_handle_unaligned_watchpoint): Likewise.
6891 (aarch64_handle_watchpoint): Likewise.
6892 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
6893 (aarch64_remove_point): Likewise.
6894
6895 2015-07-17 Yao Qi <yao.qi@linaro.org>
6896
6897 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
6898 debug_printf.
6899 (aarch64_handle_unaligned_watchpoint): Likewise.
6900
6901 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
6902
6903 Revert the previous 3 commits:
6904 Move gdb_regex* to common/
6905 Move linux_find_memory_regions_full & co.
6906 gdbserver build-id attribute generator
6907
6908 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
6909 Jan Kratochvil <jan.kratochvil@redhat.com>
6910
6911 gdbserver build-id attribute generator.
6912 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
6913 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
6914 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
6915 (find_phdr): New.
6916 (get_dynamic): Use find_pdhr to traverse program headers.
6917 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
6918 (compare_mapping_entry_range, struct find_memory_region_callback_data)
6919 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
6920 (get_hex_build_id): New.
6921 (linux_qxfer_libraries_svr4): Add optional build-id attribute
6922 to reply XML document.
6923
6924 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
6925 Jan Kratochvil <jan.kratochvil@redhat.com>
6926
6927 * target.c: Include target/target-utils.h and fcntl.h.
6928 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
6929 (target_fileio_read_stralloc): New functions.
6930
6931 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
6932
6933 * Makefile.in (OBS): Add gdb_regex.o.
6934 (gdb_regex.o): New.
6935 * config.in: Rebuilt.
6936 * configure: Rebuilt.
6937
6938 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
6939 Jan Kratochvil <jan.kratochvil@redhat.com>
6940
6941 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
6942 * Makefile.in (OBS): Add target-utils.o.
6943 (linux-maps.o, target-utils.o): New.
6944 * configure.srv (srv_linux_obj): Add linux-maps.o.
6945
6946 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
6947
6948 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
6949 function, return 1.
6950 (the_low_target): Install it.
6951
6952 2015-07-14 Pedro Alves <palves@redhat.com>
6953
6954 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
6955 Instead, ignore ECHILD, and throw an error for other errnos.
6956
6957 2015-07-10 Pedro Alves <palves@redhat.com>
6958
6959 * event-loop.c (struct callback_event) <data>: Change type to
6960 gdb_client_data instance instead of gdb_client_data pointer.
6961 (append_callback_event): Adjust.
6962
6963 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
6964
6965 * linux-aarch64-low.c: Add comments for each linux_target_ops
6966 method. Remove comments already covered in target_ops and
6967 linux_target_ops definitions.
6968 (the_low_target): Add comments for each unimplemented method.
6969
6970 2015-07-09 Yao Qi <yao.qi@linaro.org>
6971
6972 * linux-aarch64-low.c (aarch64_regmap): Remove.
6973 (aarch64_usrregs_info): Remove.
6974 (regs_info): Set field usrregs to NULL.
6975
6976 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
6977
6978 * linux-low.c: Include "rsp-low.h"
6979 (linux_low_encode_pt_config, linux_low_encode_raw): New.
6980 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
6981 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
6982 (handle_btrace_enable_pt): New.
6983 (handle_btrace_general_set): Support "pt".
6984 (handle_btrace_conf_general_set): Support "pt:size".
6985
6986 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
6987
6988 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
6989 Z_PACKET_SW_BP.
6990
6991 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
6992
6993 * linux-aarch64-low.c: Remove comment about endianness.
6994 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
6995 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
6996 memcmp.
6997
6998 2015-06-24 Gary Benson <gbenson@redhat.com>
6999
7000 * linux-i386-ipa.c (stdint.h): Do not include.
7001 * lynx-i386-low.c (stdint.h): Likewise.
7002 * lynx-ppc-low.c (stdint.h): Likewise.
7003 * mem-break.c (stdint.h): Likewise.
7004 * thread-db.c (stdint.h): Likewise.
7005 * tracepoint.c (stdint.h): Likewise.
7006 * win32-low.c (stdint.h): Likewise.
7007
7008 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
7009
7010 * server.c (write_qxfer_response): Update call to
7011 remote_escape_output.
7012
7013 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
7014 Jan Kratochvil <jan.kratochvil@redhat.com>
7015
7016 Merge multiple hex conversions.
7017 * gdbreplay.c (tohex): Rename to 'fromhex'.
7018 (logchar): Use fromhex.
7019
7020 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
7021
7022 * server.c (handle_qxfer_libraries): Set `version' attribute for
7023 <library-list>.
7024
7025 2015-06-10 Gary Benson <gbenson@redhat.com>
7026
7027 * target.h (struct target_ops) <multifs_open>: New field.
7028 <multifs_unlink>: Likewise.
7029 <multifs_readlink>: Likewise.
7030 * linux-low.c (nat/linux-namespaces.h): New include.
7031 (linux_target_ops): Initialize the_target->multifs_open,
7032 the_target->multifs_unlink and the_target->multifs_readlink.
7033 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
7034 * hostio.c (hostio_fs_pid): New static variable.
7035 (hostio_handle_new_gdb_connection): New function.
7036 (handle_setfs): Likewise.
7037 (handle_open): Use the_target->multifs_open as appropriate.
7038 (handle_unlink): Use the_target->multifs_unlink as appropriate.
7039 (handle_readlink): Use the_target->multifs_readlink as
7040 appropriate.
7041 (handle_vFile): Handle vFile:setfs packets.
7042 * server.c (handle_query): Call hostio_handle_new_gdb_connection
7043 after target_handle_new_gdb_connection.
7044
7045 2015-06-10 Gary Benson <gbenson@redhat.com>
7046
7047 * configure.ac (AC_CHECK_FUNCS): Add setns.
7048 * config.in: Regenerate.
7049 * configure: Likewise.
7050 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
7051 (linux-namespaces.o): New rule.
7052 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
7053
7054 2015-06-09 Gary Benson <gbenson@redhat.com>
7055
7056 * hostio.c (handle_open): Process mode argument with
7057 fileio_to_host_mode.
7058
7059 2015-06-01 Yao Qi <yao.qi@linaro.org>
7060
7061 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
7062 * linux-x86-low.c: Likewise.
7063
7064 2015-05-28 Don Breazeal <donb@codesourcery.com>
7065
7066 * linux-low.c (handle_extended_wait): Initialize
7067 thread_info.last_resume_kind for new fork children.
7068
7069 2015-05-15 Pedro Alves <palves@redhat.com>
7070
7071 * target.h (target_handle_new_gdb_connection): Rewrite using if
7072 wrapped in do/while.
7073
7074 2015-05-14 Joel Brobecker <brobecker@adacore.com>
7075
7076 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
7077 * configure, config.in: Regenerate.
7078 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
7079 Declare typedef.
7080
7081 2015-05-12 Don Breazeal <donb@codesourcery.com>
7082
7083 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
7084 PTRACE_EVENT_VFORK_DONE.
7085 (linux_low_ptrace_options, extended_event_reported): Add vfork
7086 events.
7087 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
7088 and "vforkdone" for RSP 'T' Stop Reply Packet.
7089 * server.h (report_vfork_events): Declare
7090 global variable.
7091
7092 2015-05-12 Don Breazeal <donb@codesourcery.com>
7093
7094 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
7095 (the_low_target) <new_fork>: Initialize new member.
7096 * linux-arm-low.c (arm_new_fork): New function.
7097 (the_low_target) <new_fork>: Initialize new member.
7098 * linux-low.c (handle_extended_wait): Call new target function
7099 new_fork.
7100 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
7101 * linux-mips-low.c (mips_add_watchpoint): New function
7102 extracted from mips_insert_point.
7103 (the_low_target) <new_fork>: Initialize new member.
7104 (mips_linux_new_fork): New function.
7105 (mips_insert_point): Call mips_add_watchpoint.
7106 * linux-x86-low.c (x86_linux_new_fork): New function.
7107 (the_low_target) <new_fork>: Initialize new member.
7108
7109 2015-05-12 Don Breazeal <donb@codesourcery.com>
7110
7111 * linux-low.c (handle_extended_wait): Implement return value,
7112 rename argument 'event_child' to 'event_lwp', handle
7113 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
7114 (linux_low_ptrace_options): New function.
7115 (linux_low_filter_event): Call linux_low_ptrace_options,
7116 use different argument fo linux_enable_event_reporting,
7117 use return value from handle_extended_wait.
7118 (extended_event_reported): New function.
7119 (linux_wait_1): Call extended_event_reported and set
7120 status to report fork events.
7121 (linux_write_memory): Add pid to debug message.
7122 (reset_lwp_ptrace_options_callback): New function.
7123 (linux_handle_new_gdb_connection): New function.
7124 (linux_target_ops): Initialize new structure member.
7125 * linux-low.h (struct lwp_info) <waitstatus>: New member.
7126 * lynx-low.c: Initialize new structure member.
7127 * remote-utils.c (prepare_resume_reply): Implement stop reason
7128 "fork" for "T" stop message.
7129 * server.c (handle_query): Call handle_new_gdb_connection.
7130 * server.h (report_fork_events): Declare global flag.
7131 * target.h (struct target_ops) <handle_new_gdb_connection>:
7132 New member.
7133 (target_handle_new_gdb_connection): New macro.
7134 * win32-low.c: Initialize new structure member.
7135
7136 2015-05-12 Don Breazeal <donb@codesourcery.com>
7137
7138 * mem-break.c (APPEND_TO_LIST): Define macro.
7139 (clone_agent_expr): New function.
7140 (clone_one_breakpoint): New function.
7141 (clone_all_breakpoints): New function.
7142 * mem-break.h: Declare new functions.
7143
7144 2015-05-12 Don Breazeal <donb@codesourcery.com>
7145
7146 * linux-low.c (linux_supports_fork_events): New function.
7147 (linux_supports_vfork_events): New function.
7148 (linux_target_ops): Initialize new structure members.
7149 (initialize_low): Call linux_check_ptrace_features.
7150 * lynx-low.c (lynx_target_ops): Initialize new structure
7151 members.
7152 * server.c (report_fork_events, report_vfork_events):
7153 New global flags.
7154 (handle_query): Add new features to qSupported packet and
7155 response.
7156 (captured_main): Initialize new global variables.
7157 * target.h (struct target_ops) <supports_fork_events>:
7158 New member.
7159 <supports_vfork_events>: New member.
7160 (target_supports_fork_events): New macro.
7161 (target_supports_vfork_events): New macro.
7162 * win32-low.c (win32_target_ops): Initialize new structure
7163 members.
7164
7165 2015-05-12 Gary Benson <gbenson@redhat.com>
7166
7167 * server.c (handle_qxfer_exec_file): Use current process
7168 if annex is empty.
7169
7170 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
7171
7172 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
7173 Remove HAVE_PTRACE_GETREGS conditionals.
7174 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
7175 instead of PTRACE_GETREGS and PTRACE_SETREGS.
7176
7177 2015-05-08 Yao Qi <yao.qi@linaro.org>
7178
7179 * linux-low.c (linux_supports_conditional_breakpoints): New
7180 function.
7181 (linux_target_ops): Install new target method.
7182 * lynx-low.c (lynx_target_ops): Install NULL hook for
7183 supports_conditional_breakpoints.
7184 * nto-low.c (nto_target_ops): Likewise.
7185 * spu-low.c (spu_target_ops): Likewise.
7186 * win32-low.c (win32_target_ops): Likewise.
7187 * server.c (handle_query): Check
7188 target_supports_conditional_breakpoints.
7189 * target.h (struct target_ops) <supports_conditional_breakpoints>:
7190 New field.
7191 (target_supports_conditional_breakpoints): New macro.
7192
7193 2015-05-06 Pedro Alves <palves@redhat.com>
7194
7195 PR server/18081
7196 * server.c (start_inferior): If the process exits, mourn it.
7197
7198 2015-04-21 Gary Benson <gbenson@redhat.com>
7199
7200 * hostio.c (fileio_open_flags_to_host): Factored out to
7201 fileio_to_host_openflags in common/fileio.c. Single use
7202 updated.
7203
7204 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
7205
7206 * linux-xtensa-low.c (xtensa_fill_gregset)
7207 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
7208 XCHAL_HAVE_LOOP.
7209
7210 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
7211
7212 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
7213 (regs_info): Replace usrregs pointer with NULL.
7214
7215 2015-04-17 Gary Benson <gbenson@redhat.com>
7216
7217 * target.h (struct target_ops) <pid_to_exec_file>: New field.
7218 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
7219 * server.c (handle_qxfer_exec_file): New function.
7220 (qxfer_packets): Add exec-file entry.
7221 (handle_query): Report qXfer:exec-file:read as supported packet.
7222
7223 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
7224
7225 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
7226
7227 2015-04-09 Gary Benson <gbenson@redhat.com>
7228
7229 * hostio-errno.c (errno_to_fileio_error): Remove function.
7230 Update caller to use remote_fileio_to_fio_error.
7231
7232 2015-04-09 Yao Qi <yao.qi@linaro.org>
7233
7234 * linux-low.c (linux_insert_point): Call
7235 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
7236 (linux_remove_point): Call remove_memory_breakpoint if type is
7237 raw_bkpt_type_sw.
7238 * linux-x86-low.c (x86_insert_point): Don't call
7239 insert_memory_breakpoint.
7240 (x86_remove_point): Don't call remove_memory_breakpoint.
7241
7242 2015-04-01 Pedro Alves <palves@redhat.com>
7243 Cleber Rosa <crosa@redhat.com>
7244
7245 * server.c (gdbserver_usage): Reorganize and extend the usage
7246 message.
7247
7248 2015-03-24 Pedro Alves <palves@redhat.com>
7249
7250 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
7251 output. Also dump TRAP_TRACE.
7252 (linux_low_filter_event): In debug output, distinguish a
7253 resume_stop SIGSTOP from a delayed SIGSTOP.
7254
7255 2015-03-24 Gary Benson <gbenson@redhat.com>
7256
7257 * linux-x86-low.c (x86_linux_new_thread): Moved to
7258 nat/x86-linux.c.
7259 (x86_linux_prepare_to_resume): Likewise.
7260
7261 2015-03-24 Gary Benson <gbenson@redhat.com>
7262
7263 * Makefile.in (x86-linux-dregs.o): New rule.
7264 * configure.srv: Add x86-linux-dregs.o to relevant targets.
7265 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
7266 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
7267 (x86_linux_dr_get): Likewise.
7268 (x86_linux_dr_set): Likewise.
7269 (update_debug_registers_callback): Likewise.
7270 (x86_linux_dr_set_addr): Likewise.
7271 (x86_linux_dr_get_addr): Likewise.
7272 (x86_linux_dr_set_control): Likewise.
7273 (x86_linux_dr_get_control): Likewise.
7274 (x86_linux_dr_get_status): Likewise.
7275 (x86_linux_update_debug_registers): Likewise.
7276
7277 2015-03-24 Gary Benson <gbenson@redhat.com>
7278
7279 * linux-x86-low.c (x86_linux_update_debug_registers):
7280 New function, factored out from...
7281 (x86_linux_prepare_to_resume): ...this.
7282
7283 2015-03-24 Gary Benson <gbenson@redhat.com>
7284
7285 * linux-x86-low.c (x86_linux_dr_get): Update comments.
7286 (x86_linux_dr_set): Likewise.
7287 (update_debug_registers_callback): Likewise.
7288 (x86_linux_dr_set_addr): Likewise.
7289 (x86_linux_dr_get_addr): Likewise.
7290 (x86_linux_dr_set_control): Likewise.
7291 (x86_linux_dr_get_control): Likewise.
7292 (x86_linux_dr_get_status): Likewise.
7293 (x86_linux_prepare_to_resume): Likewise.
7294
7295 2015-03-24 Gary Benson <gbenson@redhat.com>
7296
7297 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
7298 Use perror_with_name. Pass string through gettext.
7299 (x86_linux_dr_set): Likewise.
7300
7301 2015-03-24 Gary Benson <gbenson@redhat.com>
7302
7303 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
7304 (x86_linux_dr_set_addr): ...this.
7305 (x86_dr_low_get_addr): Rename to...
7306 (x86_linux_dr_get_addr): ...this.
7307 (x86_dr_low_set_control): Rename to...
7308 (x86_linux_dr_set_control): ...this.
7309 (x86_dr_low_get_control): Rename to...
7310 (x86_linux_dr_get_control): ...this.
7311 (x86_dr_low_get_status): Rename to...
7312 (x86_linux_dr_get_status): ...this.
7313 (x86_dr_low): Update with new function names.
7314
7315 2015-03-24 Gary Benson <gbenson@redhat.com>
7316
7317 * Makefile.in (x86-linux.o): New rule.
7318 * configure.srv: Add x86-linux.o to relevant targets.
7319 * linux-low.c (lwp_set_arch_private_info): New function.
7320 (lwp_arch_private_info): Likewise.
7321 * linux-x86-low.c: Include nat/x86-linux.h.
7322 (arch_lwp_info): Removed structure.
7323 (update_debug_registers_callback):
7324 Use lwp_set_debug_registers_changed.
7325 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
7326 and lwp_set_debug_registers_changed.
7327 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
7328
7329 2015-03-24 Gary Benson <gbenson@redhat.com>
7330
7331 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
7332 * linux-arm-low.c (arm_new_thread): Likewise.
7333 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
7334 * linux-mips-low.c (mips_linux_new_thread): Likewise.
7335 * linux-x86-low.c (x86_linux_new_thread): Likewise.
7336 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
7337
7338 2015-03-24 Gary Benson <gbenson@redhat.com>
7339
7340 * linux-low.c (ptid_of_lwp): New function.
7341 (lwp_is_stopped): Likewise.
7342 (lwp_stop_reason): Likewise.
7343 * linux-x86-low.c (update_debug_registers_callback):
7344 Use lwp_is_stopped.
7345 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
7346 lwp_stop_reason.
7347
7348 2015-03-24 Gary Benson <gbenson@redhat.com>
7349
7350 * linux-low.h (linux_stop_lwp): Remove declaration.
7351
7352 2015-03-24 Gary Benson <gbenson@redhat.com>
7353
7354 * linux-low.h: Include nat/linux-nat.h.
7355 * linux-low.c (iterate_over_lwps_args): New structure.
7356 (iterate_over_lwps_filter): New function.
7357 (iterate_over_lwps): Likewise.
7358 * linux-x86-low.c (update_debug_registers_callback):
7359 Update signature to what iterate_over_lwps expects.
7360 Remove PID check that iterate_over_lwps now performs.
7361 (x86_dr_low_set_addr): Use iterate_over_lwps.
7362 (x86_dr_low_set_control): Likewise.
7363
7364 2015-03-24 Gary Benson <gbenson@redhat.com>
7365
7366 * linux-x86-low.c (x86_debug_reg_state): New function.
7367 (x86_linux_prepare_to_resume): Use the above.
7368
7369 2015-03-24 Gary Benson <gbenson@redhat.com>
7370
7371 * linux-low.c (current_lwp_ptid): New function.
7372 * linux-x86-low.c: Include nat/linux-nat.h.
7373 (x86_dr_low_get_addr): Use current_lwp_ptid.
7374 (x86_dr_low_get_control): Likewise.
7375 (x86_dr_low_get_status): Likewise.
7376
7377 2015-03-20 Pedro Alves <palves@redhat.com>
7378
7379 * tracepoint.c (cmd_qtstatus): Make "str" const.
7380
7381 2015-03-20 Pedro Alves <palves@redhat.com>
7382
7383 * server.c (handle_general_set): Make "req_str" const.
7384
7385 2015-03-19 Pedro Alves <palves@redhat.com>
7386
7387 * linux-low.c (linux_resume_one_lwp): Rename to ...
7388 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
7389 instead call perror_with_name.
7390 (check_ptrace_stopped_lwp_gone): New function.
7391 (linux_resume_one_lwp): Reimplement as wrapper around
7392 linux_resume_one_lwp_throw that swallows errors if the LWP is
7393 gone.
7394
7395 2015-03-19 Pedro Alves <palves@redhat.com>
7396
7397 * linux-low.c (count_events_callback, select_event_lwp_callback):
7398 No longer check whether the thread has resume_stop as last resume
7399 kind.
7400
7401 2015-03-19 Pedro Alves <palves@redhat.com>
7402
7403 * linux-low.c (count_events_callback, select_event_lwp_callback):
7404 Use the lwp's status_pending_p field, not the thread's.
7405
7406 2015-03-19 Pedro Alves <palves@redhat.com>
7407
7408 * linux-low.c (select_event_lwp_callback): Update comments to
7409 no longer mention SIGTRAP.
7410
7411 2015-03-18 Gary Benson <gbenson@redhat.com>
7412
7413 * server.c (handle_query): Do not report vFile:fstat as supported.
7414
7415 2015-03-11 Gary Benson <gbenson@redhat.com>
7416
7417 * hostio.c (sys/types.h): New include.
7418 (sys/stat.h): Likewise.
7419 (common-remote-fileio.h): Likewise.
7420 (handle_fstat): New function.
7421 (handle_vFile): Handle vFile:fstat packets.
7422
7423 2015-03-11 Gary Benson <gbenson@redhat.com>
7424
7425 * configure.ac (AC_CHECK_MEMBERS): Add checks for
7426 struct stat.st_blocks and struct stat.st_blksize.
7427 * configure: Regenerate.
7428 * config.in: Likewise.
7429 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
7430 (OBS): Add common-remote-fileio.o.
7431 (common-remote-fileio.o): New rule.
7432
7433 2015-03-09 Pedro Alves <palves@redhat.com>
7434
7435 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
7436 'struct sockaddr' pointer in 'accept' call.
7437
7438 2015-03-09 Pedro Alves <palves@redhat.com>
7439
7440 Revert:
7441 2015-03-07 Pedro Alves <palves@redhat.com>
7442 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
7443 or <winsock2.h> here. Instead include "gdb_socket.h".
7444 (remote_open): Use union gdb_sockaddr_u.
7445 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
7446 or <winsock2.h> here. Instead include "gdb_socket.h".
7447 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
7448 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
7449 or <sys/un.h>.
7450 (init_named_socket, gdb_agent_helper_thread): Use union
7451 gdb_sockaddr_u.
7452
7453 2015-03-07 Pedro Alves <palves@redhat.com>
7454
7455 * configure.ac (build_warnings): Move
7456 -Wdeclaration-after-statement to the C-specific set.
7457 * configure: Regenerate.
7458
7459 2015-03-07 Pedro Alves <palves@redhat.com>
7460
7461 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
7462 or <winsock2.h> here. Instead include "gdb_socket.h".
7463 (remote_open): Use union gdb_sockaddr_u.
7464 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
7465 or <winsock2.h> here. Instead include "gdb_socket.h".
7466 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
7467 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
7468 or <sys/un.h>.
7469 (init_named_socket, gdb_agent_helper_thread): Use union
7470 gdb_sockaddr_u.
7471
7472 2015-03-07 Pedro Alves <palves@redhat.com>
7473
7474 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
7475 instead.
7476
7477 2015-03-06 Yao Qi <yao.qi@linaro.org>
7478
7479 * linux-aarch64-low.c (aarch64_insert_point): Use
7480 show_debug_regs as a boolean.
7481 (aarch64_remove_point): Likewise.
7482
7483 2015-03-05 Pedro Alves <palves@redhat.com>
7484
7485 * lynx-low.c (lynx_target_ops): Install NULL hooks for
7486 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
7487 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
7488 * nto-low.c (nto_target_ops): Likewise.
7489 * spu-low.c (spu_target_ops): Likewise.
7490 * win32-low.c (win32_target_ops): Likewise.
7491
7492 2015-03-04 Pedro Alves <palves@redhat.com>
7493
7494 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
7495 Decide whether a breakpoint triggered based on the SIGTRAP's
7496 siginfo.si_code.
7497 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
7498 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
7499 (linux_low_filter_event): Check for breakpoints before checking
7500 watchpoints.
7501 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
7502 siginfo.si_code.
7503 (linux_stopped_by_sw_breakpoint)
7504 (linux_supports_stopped_by_sw_breakpoint)
7505 (linux_stopped_by_hw_breakpoint)
7506 (linux_supports_stopped_by_hw_breakpoint): New functions.
7507 (linux_target_ops): Install new target methods.
7508
7509 2015-03-04 Pedro Alves <palves@redhat.com>
7510
7511 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
7512 * server.c (swbreak_feature, hwbreak_feature): New globals.
7513 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
7514 (captured_main): Clear swbreak_feature and hwbreak_feature.
7515 * server.h (swbreak_feature, hwbreak_feature): Declare.
7516 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
7517 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
7518 supports_stopped_by_hw_breakpoint>: New fields.
7519 (target_supports_stopped_by_sw_breakpoint)
7520 (target_stopped_by_sw_breakpoint)
7521 (target_supports_stopped_by_hw_breakpoint)
7522 (target_stopped_by_hw_breakpoint): Declare.
7523
7524 2015-03-04 Pedro Alves <palves@redhat.com>
7525
7526 enum lwp_stop_reason -> enum target_stop_reason
7527 * linux-low.c (check_stopped_by_breakpoint): Adjust.
7528 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
7529 (linux_wait_1, stuck_in_jump_pad_callback)
7530 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
7531 (linux_stopped_by_watchpoint):
7532 * linux-low.h (enum lwp_stop_reason): Delete.
7533 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
7534 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
7535
7536 2015-03-04 Yao Qi <yao.qi@linaro.org>
7537
7538 * Makefile.in (SFILES): Add linux-aarch64-low.c.
7539
7540 2015-03-03 Gary Benson <gbenson@redhat.com>
7541
7542 * hostio.c (handle_vFile): Fix prefix lengths.
7543
7544 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
7545
7546 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
7547 ptr_bits.
7548
7549 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
7550
7551 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
7552 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
7553 (clean): Add "rm -f" for above C files.
7554 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
7555 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
7556 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
7557 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
7558 * linux-s390-low.c (HWCAP_S390_VX): New macro.
7559 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
7560 (init_registers_s390x_vx_linux64)
7561 (init_registers_s390x_tevx_linux64)
7562 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
7563 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
7564 declarations.
7565 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
7566 (s390_store_vxrs_high): New functions.
7567 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
7568 NT_S390_VXRS_HIGH.
7569 (s390_arch_setup): Add logic for selecting one of the new target
7570 descriptions. Activate the new vector regsets if applicable.
7571 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
7572 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
7573 and init_registers_s390x_tevx_linux64.
7574
7575 2015-03-01 Pedro Alves <palves@redhat.com>
7576
7577 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
7578 parameter.
7579
7580 2015-02-27 Pedro Alves <palves@redhat.com>
7581
7582 * linux-x86-low.c (u_debugreg_offset): New function.
7583 (x86_linux_dr_get, x86_linux_dr_set): Use it.
7584
7585 2015-02-27 Pedro Alves <palves@redhat.com>
7586
7587 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
7588 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
7589 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
7590 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
7591 (ps_lsetfpregs, ps_getpid)
7592 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
7593 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
7594 (ps_lsetxregs, ps_plog): Declare.
7595
7596 2015-02-27 Pedro Alves <palves@redhat.com>
7597
7598 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
7599 IP_AGENT_EXPORT_FUNC.
7600 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
7601 IP_AGENT_EXPORT_FUNC.
7602 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
7603 (IP_AGENT_EXPORT): Delete.
7604 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
7605 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
7606 (gdb_trampoline_buffer_error, collecting, gdb_collect)
7607 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
7608 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
7609 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
7610 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
7611 (traceframe_read_count, traceframe_write_count)
7612 (traceframes_created, trace_state_variables, get_raw_reg)
7613 (get_trace_state_variable_value, set_trace_state_variable_value)
7614 (ust_loaded, helper_thread_id, cmd_buf): Use
7615 IPA_SYM_EXPORTED_NAME.
7616 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
7617 (tracepoints) Use IP_AGENT_EXPORT_VAR.
7618 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
7619 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
7620 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
7621 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
7622 EXTERN_C_PUSH/EXTERN_C_POP.
7623 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
7624 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
7625 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
7626 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
7627 (traceframe_write_count, traceframe_read_count)
7628 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
7629 (about_to_request_buffer_space, get_trace_state_variable_value)
7630 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
7631 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
7632 EXTERN_C_PUSH/EXTERN_C_POP.
7633 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
7634 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
7635 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
7636 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
7637 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
7638 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
7639 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
7640 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
7641 Define.
7642 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
7643 (IP_AGENT_EXPORT_VAR_DECL): Define.
7644 (tracing): Declare.
7645 (gdb_agent_get_raw_reg): Declare.
7646
7647 2015-02-27 Tom Tromey <tromey@redhat.com>
7648 Pedro Alves <palves@redhat.com>
7649
7650 Rename symbols whose names are reserved C++ keywords throughout.
7651
7652 2015-02-27 Pedro Alves <palves@redhat.com>
7653
7654 * Makefile.in (COMPILER): New, get it from autoconf.
7655 (CXX): Get from autoconf instead.
7656 (COMPILE.pre): Use COMPILER.
7657 (CC-LD): Rename to ...
7658 (CC_LD): ... this. Use COMPILER.
7659 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
7660 (CXX_FOR_TARGET): Default to g++ instead of gcc.
7661 * acinclude.m4: Include build-with-cxx.m4.
7662 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
7663 Disable -Werror by default if building in C++ mode.
7664 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
7665 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
7666 the C++ compiler. Save/restore CXXFLAGS too.
7667 * configure: Regenerate.
7668
7669 2015-02-27 Pedro Alves <palves@redhat.com>
7670
7671 * acinclude.m4: Include libiberty.m4.
7672 * configure.ac: Call libiberty_INIT.
7673 * config.in, configure: Regenerate.
7674
7675 2015-02-26 Pedro Alves <palves@redhat.com>
7676
7677 * linux-low.c (linux_wait_1): When incrementing the PC past a
7678 program breakpoint always use the_low_target.breakpoint_len as
7679 increment, rather than the maximum between that and
7680 the_low_target.decr_pc_after_break.
7681
7682 2015-02-23 Pedro Alves <palves@redhat.com>
7683
7684 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
7685 thread was doing a step-over; always adjust the PC if
7686 we stepped over a permanent breakpoint.
7687 (linux_wait_1): If we stepped over breakpoint that was on top of a
7688 permanent breakpoint, manually advance the PC past it.
7689
7690 2015-02-23 Pedro Alves <palves@redhat.com>
7691
7692 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
7693 modes.
7694 (x86_fill_gregset, x86_store_gregset): Use it when handling
7695 $orig_eax.
7696
7697 2015-02-20 Pedro Alves <palves@redhat.com>
7698
7699 * thread-db.c: Include "nat/linux-procfs.h".
7700 (thread_db_init): Skip listing new threads if the kernel supports
7701 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
7702
7703 2015-02-20 Pedro Alves <palves@redhat.com>
7704
7705 * linux-low.c (status_pending_p_callback): Use ptid_match.
7706
7707 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
7708
7709 PR breakpoints/16812
7710 * linux-low.c (wstatus_maybe_breakpoint): Remove.
7711 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
7712 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
7713
7714 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
7715
7716 PR breakpoints/15956
7717 * tracepoint.c (cmd_qtinit): Add check for current_thread.
7718
7719 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
7720
7721 * linux-low.c (linux_low_btrace_conf): Print size.
7722 * server.c (handle_btrace_conf_general_set): New.
7723 (hanle_general_set): Call handle_btrace_conf_general_set.
7724 (handle_query): Report Qbtrace-conf:bts:size as supported.
7725
7726 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
7727
7728 * linux-low.c (linux_low_enable_btrace): Update parameters.
7729 (linux_low_btrace_conf): New.
7730 (linux_target_ops)<to_btrace_conf>: Initialize.
7731 * server.c (current_btrace_conf): New.
7732 (handle_btrace_enable): Rename to ...
7733 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
7734 to target_enable_btrace. Update comment. Update users.
7735 (handle_qxfer_btrace_conf): New.
7736 (qxfer_packets): Add btrace-conf entry.
7737 (handle_query): Report qXfer:btrace-conf:read as supported packet.
7738 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
7739 (target_ops)<read_btrace_conf>: New.
7740 (target_enable_btrace): Update parameters.
7741 (target_read_btrace_conf): New.
7742
7743 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
7744
7745 * server.c (handle_btrace_general_set): Remove call to
7746 target_supports_btrace.
7747 (supported_btrace_packets): New.
7748 (handle_query): Call supported_btrace_packets.
7749 * target.h: include btrace-common.h.
7750 (btrace_target_info): Removed.
7751 (supports_btrace, target_supports_btrace): Update parameters.
7752
7753 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
7754
7755 * Makefile.in (SFILES): Add common/btrace-common.c.
7756 (OBS): Add common/btrace-common.o.
7757 (btrace-common.o): Add build rules.
7758 * linux-low: Include btrace-common.h.
7759 (linux_low_read_btrace): Use struct btrace_data. Call
7760 btrace_data_init and btrace_data_fini.
7761
7762 2015-02-06 Pedro Alves <palves@redhat.com>
7763
7764 * thread-db.c (find_new_threads_callback): Add debug output.
7765
7766 2015-02-04 Pedro Alves <palves@redhat.com>
7767
7768 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
7769 (resume_stopped_resumed_lwps): New function.
7770 (linux_wait_for_event_filtered): Use it.
7771
7772 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
7773
7774 * Makefile.in (SFILES): Add linux-personality.c.
7775 (linux-personality.o): New rule.
7776 * configure.srv (srv_linux_obj): Add linux-personality.o to the
7777 list of objects to be built.
7778 * linux-low.c: Include nat/linux-personality.h.
7779 (linux_create_inferior): Remove code to disable address space
7780 randomization (moved to ../nat/linux-personality.c). Create
7781 cleanup to disable address space randomization.
7782
7783 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
7784
7785 * Makefile.in (posix-strerror.o): New rule.
7786 (mingw-strerror.o): Likewise.
7787 * configure: Regenerated.
7788 * configure.ac: Source file ../common/common.host. Initialize new
7789 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
7790
7791 2015-01-14 Yao Qi <yao@codesourcery.com>
7792
7793 * Makefile.in (SFILES): Add nat/ppc-linux.c.
7794 (ppc-linux.o): New rule.
7795 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
7796 * configure.ac: AC_CHECK_FUNCS(getauxval).
7797 * config.in: Re-generated.
7798 * configure: Re-generated.
7799 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
7800 ppc64_64bit_inferior_p
7801
7802 2015-01-14 Yao Qi <yao@codesourcery.com>
7803
7804 * linux-ppc-low.c: Include "nat/ppc-linux.h".
7805 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
7806 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
7807 (PT_ORIG_R3, PT_TRAP): Likewise.
7808 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
7809 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
7810 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
7811
7812 2015-01-10 Joel Brobecker <brobecker@adacore.com>
7813
7814 * i387-fp.c (i387_cache_to_xsave): In look over
7815 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
7816 zmmh_low_space field by use of zmmh_high_space.
7817
7818 2015-01-09 Pedro Alves <palves@redhat.com>
7819
7820 * linux-low.c (step_over_bkpt): Move higher up in the file.
7821 (handle_extended_wait): Don't store the stop_pc here.
7822 (get_stop_pc): Adjust comments and rename to ...
7823 (check_stopped_by_breakpoint): ... this. Record whether the LWP
7824 stopped for a software breakpoint or hardware breakpoint.
7825 (thread_still_has_status_pending_p): New function.
7826 (status_pending_p_callback): Use
7827 thread_still_has_status_pending_p. If the event is no longer
7828 interesting, resume the LWP.
7829 (handle_tracepoints): Add assert.
7830 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
7831 (wstatus_maybe_breakpoint): New function.
7832 (cancel_breakpoint): Delete function.
7833 (check_stopped_by_watchpoint): New function, factored out from
7834 linux_low_filter_event.
7835 (lp_status_maybe_breakpoint): Delete function.
7836 (linux_low_filter_event): Remove filter_ptid argument.
7837 Leave thread group exits pending here. Store the LWP's stop PC.
7838 Always leave events pending.
7839 (linux_wait_for_event_filtered): Pull all events out of the
7840 kernel, and leave them all pending.
7841 (count_events_callback, select_event_lwp_callback): Consider all
7842 events.
7843 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
7844 (select_event_lwp): Only give preference to the stepping LWP in
7845 all-stop mode. Adjust comments.
7846 (ignore_event): New function.
7847 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
7848 references to cancel_breakpoints. Adjust to renames. Also give
7849 equal priority to all LWPs that have had events in non-stop mode.
7850 If reporting a software breakpoint event, unadjust the LWP's PC.
7851 (linux_wait): If linux_wait_1 returned an ignored event, retry.
7852 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
7853 Adjust.
7854 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
7855 (resume_status_pending_p): Use thread_still_has_status_pending_p.
7856 (linux_stopped_by_watchpoint): Adjust.
7857 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
7858 * linux-low.h (enum lwp_stop_reason): New.
7859 (struct lwp_info) <stop_pc>: Adjust comment.
7860 <stopped_by_watchpoint>: Delete field.
7861 <stop_reason>: New field.
7862 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
7863 * mem-break.c (software_breakpoint_inserted_here)
7864 (hardware_breakpoint_inserted_here): New function.
7865 * mem-break.h (software_breakpoint_inserted_here)
7866 (hardware_breakpoint_inserted_here): Declare.
7867 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
7868 (cancel_breakpoints): Delete.
7869 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
7870 (upload_fast_traceframes): Remove references to
7871 cancel_breakpoints.
7872
7873 2015-01-09 Pedro Alves <palves@redhat.com>
7874
7875 * thread-db.c (find_new_threads_callback): Ignore thread if the
7876 kernel thread ID is -1.
7877
7878 2015-01-09 Pedro Alves <palves@redhat.com>
7879
7880 * linux-low.c (linux_attach_fail_reason_string): Move to
7881 nat/linux-ptrace.c, and rename.
7882 (linux_attach_lwp): Update comment.
7883 (attach_proc_task_lwp_callback): New function.
7884 (linux_attach): Adjust to rename and use
7885 linux_proc_attach_tgid_threads.
7886 (linux_attach_fail_reason_string): Delete declaration.
7887
7888 2015-01-01 Joel Brobecker <brobecker@adacore.com>
7889
7890 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
7891 * server.c (gdbserver_version): Likewise.
7892
7893 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
7894
7895 * remote-utils.c: Include ctype.h.
7896 (input_interrupt): Explicitly handle the case when the char
7897 received is the NUL byte. Improve the printing of non-ASCII
7898 characters.
7899
7900 2014-12-16 Joel Brobecker <brobecker@adacore.com>
7901
7902 * linux-low.c (linux_low_filter_event): Update call to
7903 linux_enable_event_reporting following the addition of
7904 a new parameter to that function.
7905
7906 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
7907
7908 PR server/17457
7909 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
7910 (AARCH64_FPCR_REGNO): Likewise.
7911 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
7912 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
7913 (aarch64_store_fpregset): Likewise.
7914
7915 2014-12-15 Joel Brobecker <brobecker@adacore.com>
7916
7917 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
7918 Remove FIXME comment about assumption about N.
7919
7920 2014-12-13 Joel Brobecker <brobecker@adacore.com>
7921
7922 * configure.ac: If large-file support is disabled in GDBserver,
7923 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
7924 * configure: Regenerate.
7925
7926 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7927
7928 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
7929 warning upon ENODATA from ptrace.
7930 * linux-s390-low.c (s390_store_tdb): New.
7931 (s390_regsets): Add regset for NT_S390_TDB.
7932
7933 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7934
7935 * linux-low.c (regsets_store_inferior_registers): Skip regsets
7936 without a fill_function.
7937 * linux-s390-low.c (s390_fill_last_break): Remove.
7938 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
7939 (s390_arch_setup): Use regset's size instead of fill_function for
7940 loop end condition.
7941
7942 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7943
7944 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
7945 the regset's store function when ptrace returned an error.
7946 * regcache.c (get_thread_regcache): Invalidate register cache
7947 before fetching inferior's registers.
7948
7949 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7950
7951 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
7952 while-loop as for-loop.
7953 (regsets_store_inferior_registers): Likewise.
7954
7955 2014-11-28 Yao Qi <yao@codesourcery.com>
7956
7957 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
7958 * config.in, configure: Re-generate.
7959 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
7960 is defined.
7961
7962 2014-11-21 Yao Qi <yao@codesourcery.com>
7963
7964 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
7965 (AC_CHECK_HEADERS): Remove malloc.h.
7966 * configure: Re-generated.
7967 * config.in: Re-generated.
7968 * server.h: Don't include alloca.h and malloc.h.
7969 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
7970 Don't include malloc.h.
7971
7972 2014-11-17 Joel Brobecker <brobecker@adacore.com>
7973
7974 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
7975 corresponding ERRNO check in same block.
7976
7977 2014-11-12 Pedro Alves <palves@redhat.com>
7978
7979 * server.c (cont_thread): Update comment.
7980 (start_inferior, attach_inferior): No longer clear cont_thread.
7981 (handle_v_cont): No longer set cont_thread.
7982 (captured_main): Clear cont_thread each time a GDB connects.
7983
7984 2014-11-12 Pedro Alves <palves@redhat.com>
7985
7986 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
7987 thread, and don't resume all threads if the Hc thread has exited.
7988
7989 2014-11-12 Pedro Alves <palves@redhat.com>
7990
7991 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
7992 the process group instead of to a specific LWP.
7993
7994 2014-10-15 Pedro Alves <palves@redhat.com>
7995
7996 PR server/17487
7997 * win32-arm-low.c (arm_set_thread_context): Remove current_event
7998 parameter.
7999 (arm_set_thread_context): Delete.
8000 (the_low_target): Adjust.
8001 * win32-i386-low.c (debug_registers_changed)
8002 (debug_registers_used): Delete.
8003 (update_debug_registers_callback): New function.
8004 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
8005 needing to update their debug registers.
8006 (win32_get_current_dr): New function.
8007 (x86_dr_low_get_addr, x86_dr_low_get_control)
8008 (x86_dr_low_get_status): Fetch the debug register from the thread
8009 record's context.
8010 (i386_initial_stuff): Adjust.
8011 (i386_get_thread_context): Remove current_event parameter. Don't
8012 clear debug_registers_changed nor copy DR values to
8013 debug_reg_state.
8014 (i386_set_thread_context): Delete.
8015 (i386_prepare_to_resume): New function.
8016 (i386_thread_added): Mark the thread as needing to update irs
8017 debug registers.
8018 (the_low_target): Remove i386_set_thread_context and install
8019 i386_prepare_to_resume.
8020 * win32-low.c (win32_get_thread_context): Adjust.
8021 (win32_set_thread_context): Use SetThreadContext
8022 directly.
8023 (win32_prepare_to_resume): New function.
8024 (win32_require_context): New function, factored out from ...
8025 (thread_rec): ... this.
8026 (continue_one_thread): Call win32_prepare_to_resume on each thread
8027 we're about to continue.
8028 (win32_resume): Call win32_prepare_to_resume on the event thread.
8029 * win32-low.h (struct win32_thread_info)
8030 <debug_registers_changed>: New field.
8031 (struct win32_target_ops): Change prototype of set_thread_context,
8032 delete set_thread_context and add prepare_to_resume.
8033 (win32_require_context): New declaration.
8034
8035 2014-10-08 Gary Benson <gbenson@redhat.com>
8036
8037 * server.h: Do not include common-exceptions.h.
8038
8039 2014-10-08 Gary Benson <gbenson@redhat.com>
8040
8041 * server.h: Do not include cleanups.h.
8042
8043 2014-09-30 James Hogan <james.hogan@imgtec.com>
8044
8045 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
8046 mips64-dsp-linux.c.
8047
8048 2014-09-23 Yao Qi <yao@codesourcery.com>
8049
8050 * linux-low.c (lp_status_maybe_breakpoint): New function.
8051 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
8052 (count_events_callback): Likewise.
8053 (select_event_lwp_callback): Likewise.
8054 (cancel_breakpoints_callback): Likewise.
8055
8056 2014-09-19 Don Breazeal <donb@codesourcery.com>
8057
8058 * linux-low.c (handle_extended_wait): Call
8059 linux_ptrace_get_extended_event.
8060 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
8061 linux_is_extended_waitstatus.
8062
8063 2014-09-16 Joel Brobecker <brobecker@adacore.com>
8064
8065 * Makefile.in (CPPFLAGS): Define.
8066 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
8067 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
8068
8069 2014-09-16 Gary Benson <gbenson@redhat.com>
8070
8071 * inferiors.h (current_inferior): Renamed as...
8072 (current_thread): New variable. All uses updated.
8073 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
8074 (maybe_move_out_of_jump_pad): Likewise.
8075 (cancel_breakpoint): Likewise.
8076 (linux_low_filter_event): Likewise.
8077 (wait_for_sigstop): Likewise.
8078 (linux_resume_one_lwp): Likewise.
8079 (need_step_over_p): Likewise.
8080 (start_step_over): Likewise.
8081 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
8082 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
8083 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
8084 and save_inferior as saved_thread.
8085 * regcache.c (get_thread_regcache): Renamed saved_inferior as
8086 saved_thread.
8087 (regcache_invalidate_thread): Likewise.
8088 * remote-utils.c (prepare_resume_reply): Likewise.
8089 * thread-db.c (thread_db_get_tls_address): Likewise.
8090 (disable_thread_event_reporting): Likewise.
8091 (remove_thread_event_breakpoints): Likewise.
8092 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
8093 as saved_thread.
8094 * target.h (set_desired_inferior): Renamed as...
8095 (set_desired_thread): New declaration. All uses updated.
8096 * server.c (myresume): Updated comment to reference thread instead
8097 of inferior.
8098 (handle_serial_event): Likewise.
8099 (handle_target_event): Likewise.
8100
8101 2014-09-12 Tom Tromey <tromey@redhat.com>
8102 Gary Benson <gbenson@redhat.com>
8103
8104 * regcache.h: Include common-regcache.h.
8105 (regcache_read_pc): Don't declare.
8106 * regcache.c (get_thread_regcache_for_ptid): New function.
8107
8108 2014-09-11 Tom Tromey <tromey@redhat.com>
8109 Gary Benson <gbenson@redhat.com>
8110
8111 * symbol.c: New file.
8112 * Makefile.in (SFILES): Add symbol.c.
8113 (OBS): Add symbol.o.
8114
8115 2014-09-11 Gary Benson <gbenson@redhat.com>
8116
8117 * target.c (target_stop_ptid, target_continue_ptid): New
8118 functions.
8119
8120 2014-09-11 Tom Tromey <tromey@redhat.com>
8121 Gary Benson <gbenson@redhat.com>
8122
8123 * target.h: Include target/target.h.
8124 * target.c (target_read_memory, target_read_uint32)
8125 (target_write_memory): New functions.
8126
8127 2014-09-11 Gary Benson <gbenson@redhat.com>
8128
8129 * server.h (debug_hw_points): Don't declare.
8130 * server.c (debug_hw_points): Don't define. Replace all uses
8131 with show_debug_regs.
8132 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
8133 all uses with show_debug_regs.
8134
8135 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
8136
8137 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
8138 endianness into account.
8139 (ppc_supply_ptrace_register): Likewise.
8140
8141 2014-09-03 James Hogan <james.hogan@imgtec.com>
8142
8143 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
8144 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
8145
8146 2014-09-03 Gary Benson <gbenson@redhat.com>
8147
8148 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
8149 ALL_DEBUG_ADDRESS_REGISTERS.
8150
8151 2014-09-02 Gary Benson <gbenson@redhat.com>
8152
8153 * i386-low.h: Renamed as...
8154 * x86-low.h: New file. All type, function and variable name
8155 prefixes changed from "i386_" to "x86_". All references updated.
8156 * i386-low.c: Renamed as...
8157 * x86-low.c: New file. All type, function and variable name
8158 prefixes changed from "i386_" to "x86_". All references updated.
8159
8160 2014-09-02 Gary Benson <gbenson@redhat.com>
8161
8162 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
8163 (x86_linux_new_thread): Likewise.
8164
8165 2014-08-29 Gary Benson <gbenson@redhat.com>
8166
8167 * server.h (setjmp.h): Do not include.
8168 (toplevel): Do not declare.
8169 (common-exceptions.h): Include.
8170 (cleanups.h): Likewise.
8171 * server.c (toplevel): Do not define.
8172 (exit_code): New static global.
8173 (detach_or_kill_for_exit_cleanup): New function.
8174 (main): New function. Original main renamed to...
8175 (captured_main): New function.
8176 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
8177
8178 2014-08-29 Gary Benson <gbenson@redhat.com>
8179
8180 * Makefile.in (SFILES): Add common/common-exceptions.c.
8181 (OBS): Add common-exceptions.o.
8182 (common-exceptions.o): New rule.
8183 * utils.c (prepare_to_throw_exception): New function.
8184
8185 2014-08-29 Gary Benson <gbenson@redhat.com>
8186
8187 * config.in: Regenerate.
8188 * configure: Likewise.
8189
8190 2014-08-29 Gary Benson <gbenson@redhat.com>
8191
8192 * Makefile.in (SFILES): Add common/cleanups.c.
8193 (OBS): cleanups.o.
8194 (cleanups.o): New rule.
8195
8196 2014-08-29 Gary Benson <gbenson@redhat.com>
8197
8198 * utils.c (internal_vwarning): New function.
8199
8200 2014-08-28 Gary Benson <gbenson@redhat.com>
8201
8202 * utils.h (fatal): Remove declaration.
8203 * utils.c (fatal): Remove function.
8204
8205 2014-08-28 Gary Benson <gbenson@redhat.com>
8206
8207 * tracepoint.c (gdb_agent_init): Replace fatal with
8208 perror_with_name.
8209 (initialize_tracepoint): Likewise.
8210
8211 2014-08-28 Gary Benson <gbenson@redhat.com>
8212
8213 * remote-utils.c (remote_prepare): Replace fatal with error.
8214
8215 2014-08-28 Gary Benson <gbenson@redhat.com>
8216
8217 * linux-low.c (linux_async): Replace fatal with warning.
8218 Tidy up and return.
8219 (linux_start_non_stop): Return -1 if linux_async failed.
8220
8221 2014-08-28 Gary Benson <gbenson@redhat.com>
8222
8223 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
8224 gdb_assert.
8225 (i386_dr_low_get_addr): Remove vague comment.
8226 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
8227 gdb_assert.
8228
8229 2014-08-28 Gary Benson <gbenson@redhat.com>
8230
8231 * inferiors.c (get_thread_process): Replace check with gdb_assert.
8232 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
8233 internal_error.
8234 (linux_resume_one_lwp): Likewise.
8235 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
8236 gdb_assert.
8237 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
8238 with internal_error.
8239 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
8240 (init_register_cache): Replace fatal with gdb_assert_not_reached.
8241 (find_register_by_name): Replace fatal with internal_error.
8242 (find_regno): Likewise.
8243 * tdesc.c (init_target_desc): Replace check with gdb_assert.
8244 * thread-db.c (thread_db_create_event): Likewise.
8245 (thread_db_load_search): Likewise.
8246 (try_thread_db_load_1): Likewise.
8247 * tracepoint.c (get_jump_space_head): Replace fatal with
8248 internal_error.
8249 (claim_trampoline_space): Likewise.
8250 (have_fast_tracepoint_trampoline_buffer): Likewise.
8251 (cmd_qtstart): Likewise.
8252 (stop_tracing): Likewise.
8253 (fast_tracepoint_collecting): Likewise.
8254 (target_malloc): Likewise.
8255 (download_tracepoint): Likewise.
8256 (download_trace_state_variables): Replace check with gdb_assert.
8257 (upload_fast_traceframes): Replace fatal with internal_error.
8258
8259 2014-08-19 Tom Tromey <tromey@redhat.com>
8260 Gary Benson <gbenson@redhat.com>
8261
8262 * Makefile.in (SFILES): Add common/common-debug.c.
8263 (OBS): Add common-debug.o.
8264 (common-debug.o): New rule.
8265 * debug.h (debug_printf): Don't declare.
8266 * debug.c (debug_printf): Renamed and rewritten as...
8267 (debug_vprintf): New function.
8268
8269 2014-08-19 Gary Benson <gbenson@redhat.com>
8270
8271 * utils.h: Do not include print-utils.h.
8272
8273 2014-08-19 Tom Tromey <tromey@redhat.com>
8274 Gary Benson <gbenson@redhat.com>
8275
8276 * server.h: Add static assertion.
8277 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
8278
8279 2014-08-19 Tom Tromey <tromey@redhat.com>
8280 Gary Benson <gbenson@redhat.com>
8281
8282 * Makefile.in (SFILES): Add common/errors.c.
8283 (OBS): Add errors.o.
8284 (IPA_OBS): Add errors-ipa.o.
8285 (errors.o): New rule.
8286 (errors-ipa.o): Likewise.
8287 * utils.h (perror_with_name, error, warning): Don't declare.
8288 * utils.c (warning): Renamed and rewritten as...
8289 (vwarning): New function.
8290 (error): Renamed and rewritten as...
8291 (verror): New function.
8292 (internal_error): Renamed and rewritten as...
8293 (internal_verror): New function.
8294
8295 2014-08-07 Gary Benson <gbenson@redhat.com>
8296
8297 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
8298 * configure: Regenerate.
8299 * config.in: Likewise.
8300 * server.h: Do not include errno.h.
8301 * event-loop.c: Likewise.
8302 * hostio-errno.c: Likewise.
8303 * linux-low.c: Likewise.
8304 * remote-utils.c: Likewise.
8305 * spu-low.c: Likewise.
8306 * utils.c: Likewise.
8307 * gdbreplay.c: Unconditionally include errno.h.
8308
8309 2014-08-07 Gary Benson <gbenson@redhat.com>
8310
8311 * server.h: Do not include string.h.
8312 * event-loop.c: Likewise.
8313 * linux-low.c: Likewise.
8314 * regcache.c: Likewise.
8315 * remote-utils.c: Likewise.
8316 * spu-low.c: Likewise.
8317 * utils.c: Likewise.
8318
8319 2014-08-07 Gary Benson <gbenson@redhat.com>
8320
8321 * server.h: Do not include gdb_assert.h.
8322
8323 2014-08-07 Gary Benson <gbenson@redhat.com>
8324
8325 * server.h: Do not include common-utils.h.
8326
8327 2014-08-07 Gary Benson <gbenson@redhat.com>
8328
8329 * server.h: Do not include ptid.h.
8330 * notif.h: Likewise.
8331
8332 2014-08-07 Gary Benson <gbenson@redhat.com>
8333
8334 * server.h: Do not include gdb_locale.h.
8335
8336 2014-08-07 Gary Benson <gbenson@redhat.com>
8337
8338 * server.h: Do not include gdb/signals.h.
8339 * win32-low.c: Likewise.
8340
8341 2014-08-07 Gary Benson <gbenson@redhat.com>
8342
8343 * server.h: Do not include pathmax.h.
8344
8345 2014-08-07 Gary Benson <gbenson@redhat.com>
8346
8347 * server.h: Do not include libiberty.h.
8348 * linux-bfin-low.c: Likewise.
8349
8350 2014-08-07 Gary Benson <gbenson@redhat.com>
8351
8352 * server.h: Do not include ansidecl.h.
8353
8354 2014-08-07 Gary Benson <gbenson@redhat.com>
8355
8356 * linux-x86-low.c: Do not include stddef.h.
8357 * lynx-ppc-low.c: Likewise.
8358 * tracepoint.c: Likewise.
8359
8360 2014-08-07 Gary Benson <gbenson@redhat.com>
8361
8362 * server.h: Do not include stdarg.h.
8363 * nto-low.c: Likewise.
8364
8365 2014-08-07 Gary Benson <gbenson@redhat.com>
8366
8367 * server.h: Do not include stdlib.h.
8368 * inferiors.c: Likewise.
8369 * linux-low.c: Likewise.
8370 * regcache.c: Likewise.
8371 * spu-low.c: Likewise.
8372 * tracepoint.c: Likewise.
8373 * utils.c: Likewise.
8374
8375 2014-08-07 Gary Benson <gbenson@redhat.com>
8376
8377 * server.h: Do not include stdio.h.
8378 * linux-low.c: Likewise.
8379 * remote-utils.c: Likewise.
8380 * spu-low.c: Likewise.
8381 * utils.c: Likewise.
8382 * wincecompat.c: Likewise.
8383
8384 2014-08-06 Gary Benson <gbenson@redhat.com>
8385
8386 * regcache.c (init_register_cache): Move conditionals inside if.
8387
8388 2014-08-06 Gary Benson <gbenson@redhat.com>
8389
8390 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
8391
8392 2014-07-31 Gary Benson <gbenson@redhat.com>
8393
8394 * ax.h: Do not include server.h.
8395 * gdbthread.h: Likewise.
8396 * lynx-low.h: Likewise.
8397 * notif.h: Likewise.
8398
8399 2014-07-30 Gary Benson <gbenson@redhat.com>
8400
8401 * server.h: Include common-defs.h.
8402 Do not include config.h or build-gnulib-gdbserver/config.h.
8403
8404 2014-07-30 Gary Benson <gbenson@redhat.com>
8405
8406 * hostio-errno.c: Move server.h to top of includes list.
8407 * inferiors.c: Likewise.
8408 * linux-x86-low.c: Likewise.
8409 * notif.c: Include server.h.
8410
8411 2014-07-24 Tom Tromey <tromey@redhat.com>
8412 Gary Benson <gbenson@redhat.com>
8413
8414 * server.h (CORE_ADDR): Now unsigned.
8415
8416 2014-07-16 Pedro Alves <palves@redhat.com>
8417
8418 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
8419
8420 2014-07-15 Pedro Alves <palves@redhat.com>
8421
8422 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
8423 copy.
8424
8425 2014-07-11 Pedro Alves <palves@redhat.com>
8426
8427 * linux-low.c (kill_wait_lwp): New function, based on
8428 kill_one_lwp_callback, but use my_waitpid directly.
8429 (kill_one_lwp_callback, linux_kill): Use it.
8430
8431 2014-06-23 Pedro Alves <palves@redhat.com>
8432
8433 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
8434 before setting DR0..DR3.
8435
8436 2014-06-20 Gary Benson <gbenson@redhat.com>
8437
8438 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
8439 * configure: Regenerated.
8440 * config.in: Likewise.
8441
8442 2014-06-20 Gary Benson <gbenson@redhat.com>
8443
8444 * Makefile.in (SFILES): Update locations for files moved
8445 from common to nat.
8446 (object file files): Reordered.
8447
8448 2014-06-20 Gary Benson <gbenson@redhat.com>
8449
8450 * i386-low.h (i386_dr_low_can_set_addr): Removed.
8451 (i386_dr_low_set_addr): Likewise.
8452 (i386_dr_low_get_addr): Likewise.
8453 (i386_dr_low_can_set_control): Likewise.
8454 (i386_dr_low_set_control): Likewise.
8455 (i386_dr_low_get_control): Likewise.
8456 (i386_dr_low_get_status): Likewise.
8457 (i386_get_debug_register_length): Likewise.
8458 * linux-x86-low.c (i386_dr_low_set_addr):
8459 Changed signature. Made static.
8460 (i386_dr_low_get_addr): Likewise.
8461 (i386_dr_low_set_control): Likewise.
8462 (i386_dr_low_get_control): Likewise.
8463 (i386_dr_low_get_status): Likewise.
8464 (i386_dr_low): New global variable.
8465 * win32-i386-low.c (i386_dr_low_set_addr):
8466 Changed signature. Made static.
8467 (i386_dr_low_get_addr): Likewise.
8468 (i386_dr_low_set_control): Likewise.
8469 (i386_dr_low_get_control): Likewise.
8470 (i386_dr_low_get_status): Likewise.
8471 (i386_dr_low): New global variable.
8472
8473 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
8474
8475 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
8476 * Makefile.in (AR, AR_FLAGS): Define.
8477 * configure: Regenerate.
8478
8479 2014-06-19 Gary Benson <gbenson@redhat.com>
8480
8481 * Makefile.in (i386-dregs.o): New rule.
8482 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
8483 * i386-low.c (target.h): Remove include.
8484 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
8485 (DR_CONTROL_SHIFT): Likewise.
8486 (DR_CONTROL_SIZE): Likewise.
8487 (DR_RW_EXECUTE): Likewise.
8488 (DR_RW_WRITE): Likewise.
8489 (DR_RW_READ): Likewise.
8490 (DR_RW_IORW): Likewise.
8491 (DR_LEN_1): Likewise.
8492 (DR_LEN_2): Likewise.
8493 (DR_LEN_4): Likewise.
8494 (DR_LEN_8): Likewise.
8495 (DR_LOCAL_ENABLE_SHIFT): Likewise.
8496 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
8497 (DR_ENABLE_SIZE): Likewise.
8498 (DR_LOCAL_SLOWDOWN): Likewise.
8499 (DR_GLOBAL_SLOWDOWN): Likewise.
8500 (DR_CONTROL_RESERVED): Likewise.
8501 (I386_DR_CONTROL_MASK): Likewise.
8502 (I386_DR_VACANT): Likewise.
8503 (I386_DR_LOCAL_ENABLE): Likewise.
8504 (I386_DR_GLOBAL_ENABLE): Likewise.
8505 (I386_DR_DISABLE): Likewise.
8506 (I386_DR_SET_RW_LEN): Likewise.
8507 (I386_DR_GET_RW_LEN): Likewise.
8508 (I386_DR_WATCH_HIT): Likewise.
8509 (i386_wp_op_t): Likewise.
8510 (i386_show_dr): Likewise.
8511 (i386_length_and_rw_bits): Likewise.
8512 (i386_insert_aligned_watchpoint): Likewise.
8513 (i386_remove_aligned_watchpoint): Likewise.
8514 (i386_handle_nonaligned_watchpoint): Likewise.
8515 i386_update_inferior_debug_regs(): Likewise.
8516 (i386_dr_insert_watchpoint): Likewise.
8517 (i386_dr_remove_watchpoint): Likewise.
8518 (i386_dr_region_ok_for_watchpoint): Likewise.
8519 (i386_dr_stopped_data_address): Likewise.
8520 (i386_dr_stopped_by_watchpoint): Likewise.
8521
8522 2014-06-19 Gary Benson <gbenson@redhat.com>
8523
8524 * i386-low.c (i386_dr_show): Renamed to
8525 i386_show_dr and made static. All uses updated.
8526 (i386_dr_length_and_rw_bits): Renamed to
8527 i386_length_and_rw_bits and made static.
8528 All uses updated.
8529 (i386_dr_insert_aligned_watchpoint): Renamed to
8530 i386_insert_aligned_watchpoint and made static.
8531 All uses updated.
8532 (i386_dr_remove_aligned_watchpoint): Renamed to
8533 i386_remove_aligned_watchpoint and made static.
8534 All uses updated.
8535 (i386_dr_update_inferior_debug_regs): Renamed to
8536 i386_update_inferior_debug_regs and made static.
8537 All uses updated.
8538
8539 2014-06-18 Gary Benson <gbenson@redhat.com>
8540
8541 * i386-low.h (i386_dr_low_can_set_addr): New macro.
8542 (i386_dr_low_can_set_control): Likewise.
8543 (i386_get_debug_register_length): Likewise.
8544 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
8545 (i386_dr_low_can_set_control): Likewise.
8546 (i386_get_debug_register_length): Likewise.
8547
8548 2014-06-17 Gary Benson <gbenson@redhat.com>
8549
8550 * i386-low.h (i386-dregs.h): New include.
8551 (DR_FIRSTADDR): Now in i386-dregs.h.
8552 (DR_LASTADDR): Likewise.
8553 (DR_NADDR): Likewise.
8554 (DR_STATUS): Likewise.
8555 (DR_CONTROL): Likewise.
8556 (i386_debug_reg_state): Likewise.
8557 (i386_dr_insert_watchpoint): Likewise.
8558 (i386_dr_remove_watchpoint): Likewise.
8559 (i386_dr_region_ok_for_watchpoint): Likewise.
8560 (i386_dr_stopped_data_address): Likewise.
8561 (i386_dr_stopped_by_watchpoint): Likewise.
8562 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
8563
8564 2014-06-18 Gary Benson <gbenson@redhat.com>
8565
8566 * i386-low.h (i386_low_insert_watchpoint): Renamed to
8567 i386_dr_insert_watchpoint.
8568 (i386_low_remove_watchpoint): Renamed to
8569 i386_dr_remove_watchpoint.
8570 (i386_low_region_ok_for_watchpoint): Renamed to
8571 i386_dr_region_ok_for_watchpoint.
8572 (i386_low_stopped_data_address): Renamed to
8573 i386_dr_stopped_data_address.
8574 (i386_low_stopped_by_watchpoint): Renamed to
8575 i386_dr_stopped_by_watchpoint.
8576 * i386-low.c (i386_show_dr): Renamed to
8577 i386_dr_show and made nonstatic. All uses updated.
8578 (i386_length_and_rw_bits): Renamed to
8579 i386_dr_length_and_rw_bits and made nonstatic.
8580 All uses updated.
8581 (i386_insert_aligned_watchpoint): Renamed to
8582 i386_dr_insert_aligned_watchpoint and made nonstatic.
8583 All uses updated.
8584 (i386_remove_aligned_watchpoint): Renamed to
8585 i386_dr_remove_aligned_watchpoint and made nonstatic.
8586 All uses updated.
8587 (i386_update_inferior_debug_regs): Renamed to
8588 i386_dr_update_inferior_debug_regs and made nonstatic.
8589 All uses updated.
8590 (i386_low_insert_watchpoint): Renamed to
8591 i386_dr_insert_watchpoint. All uses updated.
8592 (i386_low_remove_watchpoint): Renamed to
8593 i386_dr_remove_watchpoint. All uses updated.
8594 (i386_low_region_ok_for_watchpoint): Renamed to
8595 i386_dr_region_ok_for_watchpoint. All uses updated.
8596 (i386_low_stopped_data_address): Renamed to
8597 i386_dr_stopped_data_address. All uses updated.
8598 (i386_low_stopped_by_watchpoint): Renamed to
8599 i386_dr_stopped_by_watchpoint. All uses updated.
8600
8601 2014-06-18 Gary Benson <gbenson@redhat.com>
8602
8603 * i386-low.c (i386_dr_low_can_set_addr): New macro.
8604 (i386_dr_low_can_set_control): Likewise.
8605 (i386_insert_aligned_watchpoint): New check.
8606
8607 2014-06-18 Gary Benson <gbenson@redhat.com>
8608
8609 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
8610 Renamed to state.
8611
8612 2014-06-18 Gary Benson <gbenson@redhat.com>
8613
8614 * i386-low.c (i386_length_and_rw_bits): Use internal_error
8615 instead of fatal and error.
8616 (i386_handle_nonaligned_watchpoint): Likewise.
8617
8618 2014-06-18 Gary Benson <gbenson@redhat.com>
8619
8620 * i386-low.c (i386_get_debug_register_length): New macro.
8621 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
8622 (i386_show_dr): Use debug_printf instead of fprintf. Use
8623 phex to format values.
8624
8625 2014-06-18 Gary Benson <gbenson@redhat.com>
8626
8627 * i386-low.h: Comment changes.
8628 * i386-low.c: Likewise.
8629
8630 2014-06-18 Gary Benson <gbenson@redhat.com>
8631
8632 * i386-low.c: Whitespace changes.
8633
8634 2014-06-12 Tom Tromey <tromey@redhat.com>
8635
8636 * utils.c (freeargv): Remove.
8637
8638 2014-06-12 Tom Tromey <tromey@redhat.com>
8639
8640 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
8641 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
8642 (parse_debug_format_options): Likewise.
8643 (gdbserver_usage): Likewise.
8644 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
8645 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
8646 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
8647 against libiberty.
8648 ($(LIBGNU)): Depend on libiberty.
8649 (all-lib): Recurse into all subdirs.
8650 (install-only): Invoke "install" target in subdirs.
8651 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
8652 targets.
8653 * configure: Rebuild.
8654 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
8655 for vasprintf, vsnprintf, or gettimeofday.
8656 * configure.srv: Don't add safe-ctype.o or lbasename.o to
8657 srv_tgtobj.
8658
8659 2014-06-05 Joel Brobecker <brobecker@adacore.com>
8660
8661 * development.sh: Delete.
8662 * Makefile.in (config.status): Adjust dependency on development.sh.
8663 * configure.ac: Adjust development.sh source call.
8664 * configure: Regenerate.
8665
8666 2014-06-02 Pedro Alves <palves@redhat.com>
8667
8668 * ax.c (gdb_free_agent_expr): New function.
8669 * ax.h (gdb_free_agent_expr): New declaration.
8670 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
8671 list.
8672 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
8673 static.
8674 (clear_breakpoint_conditions_and_commands): New function.
8675 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
8676 (clear_breakpoint_conditions_and_commands): New declaration.
8677
8678 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
8679
8680 * linux-aarch64-low.c (asm/ptrace.h): Include.
8681
8682 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
8683
8684 Fix TLS access for -static -pthread.
8685 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
8686 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
8687 (thread_db_load_search, try_thread_db_load_1): Initialize it.
8688
8689 2014-05-20 Pedro Alves <palves@redhat.com>
8690
8691 * linux-aarch64-low.c (aarch64_insert_point)
8692 (aarch64_remove_point): No longer check whether the type is
8693 supported here. Adjust to new interface.
8694 (the_low_target): Install aarch64_supports_z_point_type as
8695 supports_z_point_type method.
8696 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
8697 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
8698 instead of a Z packet char. Adjust.
8699 (arm_supports_z_point_type): New function.
8700 (arm_insert_point, arm_remove_point): Adjust to new interface.
8701 (the_low_target): Install arm_supports_z_point_type.
8702 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
8703 (cris_insert_point, cris_remove_point): Adjust to new interface.
8704 Don't check whether the type is supported here.
8705 (the_low_target): Install cris_supports_z_point_type.
8706 * linux-low.c (linux_supports_z_point_type): New function.
8707 (linux_insert_point, linux_remove_point): Adjust to new interface.
8708 * linux-low.h (struct linux_target_ops) <insert_point,
8709 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
8710 raw_breakpoint pointer parameter.
8711 <supports_z_point_type>: New method.
8712 * linux-mips-low.c (mips_supports_z_point_type): New function.
8713 (mips_insert_point, mips_remove_point): Adjust to new interface.
8714 Use mips_supports_z_point_type.
8715 (the_low_target): Install mips_supports_z_point_type.
8716 * linux-ppc-low.c (the_low_target): Install NULL as
8717 supports_z_point_type method.
8718 * linux-s390-low.c (the_low_target): Install NULL as
8719 supports_z_point_type method.
8720 * linux-sparc-low.c (the_low_target): Install NULL as
8721 supports_z_point_type method.
8722 * linux-x86-low.c (x86_supports_z_point_type): New function.
8723 (x86_insert_point): Adjust to new insert_point interface. Use
8724 insert_memory_breakpoint. Adjust to new
8725 i386_low_insert_watchpoint interface.
8726 (x86_remove_point): Adjust to remove_point interface. Use
8727 remove_memory_breakpoint. Adjust to new
8728 i386_low_remove_watchpoint interface.
8729 (the_low_target): Install x86_supports_z_point_type.
8730 * lynx-low.c (lynx_target_ops): Install NULL as
8731 supports_z_point_type callback.
8732 * nto-low.c (nto_supports_z_point_type): New.
8733 (nto_insert_point, nto_remove_point): Adjust to new interface.
8734 (nto_target_ops): Install nto_supports_z_point_type.
8735 * mem-break.c: Adjust intro comment.
8736 (struct raw_breakpoint) <raw_type, size>: New fields.
8737 <inserted>: Update comment.
8738 <shlib_disabled>: Delete field.
8739 (enum bkpt_type) <gdb_breakpoint>: Delete value.
8740 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
8741 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
8742 (raw_bkpt_type_to_target_hw_bp_type): New function.
8743 (find_enabled_raw_code_breakpoint_at): New function.
8744 (find_raw_breakpoint_at): New type and size parameters. Use them.
8745 (insert_memory_breakpoint): New function, based off
8746 set_raw_breakpoint_at.
8747 (remove_memory_breakpoint): New function.
8748 (set_raw_breakpoint_at): Reimplement.
8749 (set_breakpoint): New, based on set_breakpoint_at.
8750 (set_breakpoint_at): Reimplement.
8751 (delete_raw_breakpoint): Go through the_target->remove_point
8752 instead of assuming memory breakpoints.
8753 (find_gdb_breakpoint_at): Delete.
8754 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
8755 (find_gdb_breakpoint): New function.
8756 (set_gdb_breakpoint_at): Delete.
8757 (z_type_supported): New function.
8758 (set_gdb_breakpoint_1): New function, loosely based off
8759 set_gdb_breakpoint_at.
8760 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
8761 (delete_gdb_breakpoint_at): Delete.
8762 (delete_gdb_breakpoint_1): New function, loosely based off
8763 delete_gdb_breakpoint_at.
8764 (delete_gdb_breakpoint): New function.
8765 (clear_gdb_breakpoint_conditions): Rename to ...
8766 (clear_breakpoint_conditions): ... this. Don't handle a NULL
8767 breakpoint.
8768 (add_condition_to_breakpoint): Make static.
8769 (add_breakpoint_condition): Take a struct breakpoint pointer
8770 instead of an address. Adjust.
8771 (gdb_condition_true_at_breakpoint): Rename to ...
8772 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
8773 z_type parameter.
8774 (gdb_condition_true_at_breakpoint): Reimplement.
8775 (add_breakpoint_commands): Take a struct breakpoint pointer
8776 instead of an address. Adjust.
8777 (gdb_no_commands_at_breakpoint): Rename to ...
8778 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
8779 parameter. Return true if no breakpoint was found. Change debug
8780 output.
8781 (gdb_no_commands_at_breakpoint): Reimplement.
8782 (run_breakpoint_commands): Rename to ...
8783 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
8784 and change return type to boolean.
8785 (run_breakpoint_commands): New function.
8786 (gdb_breakpoint_here): Also check for Z1 breakpoints.
8787 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
8788 breakpoint. Go through the_target->remove_point instead of
8789 assuming memory breakpoint.
8790 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
8791 software and hardware breakpoints.
8792 (reinsert_raw_breakpoint): Go through the_target->insert_point
8793 instead of assuming memory breakpoint.
8794 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
8795 software and hardware breakpoints.
8796 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
8797 Check both software and hardware breakpoints.
8798 (validate_inserted_breakpoint): Assert the breakpoint is a
8799 software breakpoint. Set the inserted flag to -1 instead of
8800 setting shlib_disabled.
8801 (delete_disabled_breakpoints): Adjust.
8802 (validate_breakpoints): Only validate software breakpoints.
8803 Adjust to inserted flag change.
8804 (check_mem_read, check_mem_write): Skip breakpoint types other
8805 than software breakpoints. Adjust to inserted flag change.
8806 * mem-break.h (enum raw_bkpt_type): New enum.
8807 (raw_breakpoint, struct process_info): Forward declare.
8808 (Z_packet_to_target_hw_bp_type): Delete declaration.
8809 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
8810 (set_gdb_breakpoint, delete_gdb_breakpoint)
8811 (clear_breakpoint_conditions): New declarations.
8812 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
8813 (breakpoint_inserted_here): Update comment.
8814 (add_breakpoint_condition, add_breakpoint_commands): Replace
8815 address parameter with a breakpoint pointer parameter.
8816 (gdb_breakpoint_here): Update comment.
8817 (delete_gdb_breakpoint_at): Delete.
8818 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
8819 * server.c (process_point_options): Take a struct breakpoint
8820 pointer instead of an address. Adjust.
8821 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
8822 delete_gdb_breakpoint.
8823 * spu-low.c (spu_target_ops): Install NULL as
8824 supports_z_point_type method.
8825 * target.h: Include mem-break.h.
8826 (struct target_ops) <prepare_to_access_memory>: Update comment.
8827 <supports_z_point_type>: New field.
8828 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
8829 instead of a char. Also take a raw breakpoint pointer.
8830 * win32-arm-low.c (the_low_target): Install NULL as
8831 supports_z_point_type.
8832 * win32-i386-low.c (i386_supports_z_point_type): New function.
8833 (i386_insert_point, i386_remove_point): Adjust to new interface.
8834 (the_low_target): Install i386_supports_z_point_type.
8835 * win32-low.c (win32_supports_z_point_type): New function.
8836 (win32_insert_point, win32_remove_point): Adjust to new interface.
8837 (win32_target_ops): Install win32_supports_z_point_type.
8838 * win32-low.h (struct win32_target_ops):
8839 <supports_z_point_type>: New method.
8840 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
8841 instead of a char. Also take a raw breakpoint pointer.
8842
8843 2014-05-20 Pedro Alves <palves@redhat.com>
8844
8845 * mem-break.h: Include break-common.h.
8846 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
8847 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
8848 (Z_packet_to_target_hw_bp_type): New declaration.
8849 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
8850 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
8851 (Z_PACKET_ACCESS_WP): Delete macros.
8852 (Z_packet_to_hw_type): Delete function.
8853 * i386-low.h: Don't include break-common.h here.
8854 (Z_packet_to_hw_type): Delete declaration.
8855 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
8856 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
8857 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
8858 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
8859 * linux-aarch64-low.c: Don't include break-common.h here.
8860 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
8861 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
8862 (Z_packet_to_target_hw_bp_type): Delete function.
8863 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
8864 function.
8865 (mips_insert_point, mips_remove_point): Use
8866 Z_packet_to_target_hw_bp_type.
8867
8868 2014-05-20 Pedro Alves <palves@redhat.com>
8869
8870 * linux-aarch64-low.c: Include break-common.h.
8871 (enum target_point_type): Delete.
8872 (Z_packet_to_point_type): Rename to ...
8873 (Z_packet_to_target_hw_bp_type): ... this, and return a
8874 target_hw_bp_type instead.
8875 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
8876 instead of an enum target_point_type.
8877 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
8878 breakpoint type.
8879 (aarch64_dr_state_insert_one_point)
8880 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
8881 (aarch64_handle_aligned_watchpoint)
8882 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
8883 Take an enum target_hw_bp_type instead of an enum
8884 target_point_type.
8885 (aarch64_supports_z_point_type): New function.
8886 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
8887 use Z_packet_to_target_hw_bp_type.
8888
8889 2014-05-20 Joel Brobecker <brobecker@adacore.com>
8890
8891 * configure.ac: Only use -Werror by default when DEVELOPMENT
8892 is true.
8893 * configure: Regenerate.
8894
8895 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
8896
8897 Fix gdbserver qGetTLSAddr for x86_64 -m32.
8898 * linux-x86-low.c (X86_64_USER_REGS): New.
8899 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
8900
8901 2014-04-28 Yao Qi <yao@codesourcery.com>
8902
8903 * Makefile.in (i386-avx512.c): Fix the typo of generated file
8904 name.
8905
8906 2014-04-25 Pedro Alves <palves@redhat.com>
8907
8908 PR server/16255
8909 * linux-low.c (linux_attach_fail_reason_string): New function.
8910 (linux_attach_lwp): Delete.
8911 (linux_attach_lwp_1): Rename to ...
8912 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
8913 argument. Remove "initial" parameter. Return int instead of
8914 void. Don't error or warn here.
8915 (linux_attach): Adjust to call linux_attach_lwp. Call error on
8916 failure to attach to the tgid. Call warning when failing to
8917 attach to an lwp.
8918 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
8919 argument. Remove "initial" parameter. Return int instead of
8920 void. Don't error or warn here.
8921 (linux_attach_fail_reason_string): New declaration.
8922 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
8923 interface change. Use linux_attach_fail_reason_string.
8924
8925 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
8926 Walfred Tedeschi <walfred.tedeschi@intel.com>
8927
8928 * Makefile.in: Added rules to handle new files
8929 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
8930 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
8931 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
8932 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
8933 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
8934 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
8935 x32-avx512-linux.o.
8936 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
8937 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
8938 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
8939 i386/x32-avx512.xml.
8940 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
8941 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
8942 i386/x32-avx512-linux.xml.
8943 * i387-fp.c (num_avx512_k_registers): New constant for number
8944 of K registers.
8945 (num_avx512_zmmh_low_registers): New constant for number of
8946 lower ZMM registers (0-15).
8947 (num_avx512_zmmh_high_registers): New constant for number of
8948 higher ZMM registers (16-31).
8949 (num_avx512_ymmh_registers): New contant for number of higher
8950 YMM registers (ymm16-31 added by avx521 on x86_64).
8951 (num_avx512_xmm_registers): New constant for number of higher
8952 XMM registers (xmm16-31 added by AVX512 on x86_64).
8953 (struct i387_xsave): Add space for AVX512 registers.
8954 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
8955 Add code to handle AVX512 registers.
8956 (i387_xsave_to_cache): Add code to handle AVX512 registers.
8957 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
8958 prototypei from generated file.
8959 (tdesc_amd64_avx512_linux): Likewise.
8960 (init_registers_x32_avx512_linux): Likewise.
8961 (tdesc_x32_avx512_linux): Likewise.
8962 (init_registers_i386_avx512_linux): Likewise.
8963 (tdesc_i386_avx512_linux): Likewise.
8964 (x86_64_regmap): Add AVX512 registers.
8965 (x86_linux_read_description): Add code to handle AVX512 XSTATE
8966 mask.
8967 (initialize_low_arch): Add code to initialize AVX512 registers.
8968
8969 2014-04-23 Pedro Alves <palves@redhat.com>
8970
8971 * mem-break.c (find_gdb_breakpoint_at): Make static.
8972 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
8973
8974 2014-04-23 Pedro Alves <palves@redhat.com>
8975
8976 * i386-low.c: Don't include break-common.h here.
8977 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
8978 prototype to take target_hw_bp_type as argument instead of a Z
8979 packet char.
8980 * i386-low.h: Include break-common.h here.
8981 (Z_packet_to_hw_type): Declare.
8982 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
8983 prototypes.
8984 * linux-x86-low.c (x86_insert_point): Convert the packet number to
8985 a target_hw_bp_type before calling i386_low_insert_watchpoint.
8986 (x86_remove_point): Convert the packet number to a
8987 target_hw_bp_type before calling i386_low_remove_watchpoint.
8988 * win32-i386-low.c (i386_insert_point): Convert the packet number
8989 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
8990 (i386_remove_point): Convert the packet number to a
8991 target_hw_bp_type before calling i386_low_remove_watchpoint.
8992
8993 2014-04-23 Pedro Alves <palves@redhat.com>
8994
8995 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
8996
8997 2014-04-10 Pedro Alves <palves@redhat.com>
8998
8999 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
9000 Check if the condition or command is NULL before checking if the
9001 breakpoint is known. On success, return true.
9002 * mem-break.h (add_breakpoint_condition): Document return.
9003 (add_breakpoint_commands): Add describing comment.
9004 * server.c (skip_to_semicolon): New function.
9005 (process_point_options): Use it.
9006
9007 2014-04-09 Pedro Alves <palves@redhat.com>
9008
9009 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
9010 to lwpid_of.
9011
9012 2014-02-27 Pedro Alves <palves@redhat.com>
9013
9014 PR 12702
9015 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
9016 macros.
9017 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
9018 output.
9019 (last_thread_of_process_p): Take a PID argument instead of a
9020 thread pointer.
9021 (linux_wait_for_lwp): Delete.
9022 (num_lwps, check_zombie_leaders, not_stopped_callback): New
9023 functions.
9024 (linux_low_filter_event): New function, party factored out from
9025 linux_wait_for_event.
9026 (linux_wait_for_event): Rename to ...
9027 (linux_wait_for_event_filtered): ... this. Add new filter ptid
9028 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
9029 sigsuspend. Check for zombie leaders.
9030 (linux_wait_for_event): Reimplement as wrapper around
9031 linux_wait_for_event_filtered.
9032 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
9033 a normal or signal exit is seen, it's the whole process exiting.
9034 (wait_for_sigstop): No longer a for_each_inferior callback.
9035 Rewrite on top of linux_wait_for_event_filtered.
9036 (stop_all_lwps): Call wait_for_sigstop directly.
9037 * server.c (resume, handle_target_event): Handle
9038 TARGET_WAITKIND_NO_RESUMED.
9039
9040 2014-02-26 Joel Brobecker <brobecker@adacore.com>
9041
9042 * win32-low.c (psapi_get_dll_name,
9043 * win32_CreateToolhelp32Snapshot): Delete.
9044 (win32_CreateToolhelp32Snapshot, win32_Module32First)
9045 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
9046 Delete.
9047 (handle_load_dll): Add function description.
9048 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
9049
9050 2014-02-26 Joel Brobecker <brobecker@adacore.com>
9051
9052 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
9053 Add comment.
9054 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
9055 base address when calling win32_add_one_solib.
9056 (handle_load_dll): Delete local variable load_addr.
9057 Remove 0x1000 offset applied to DLL base address when calling
9058 win32_add_one_solib.
9059 (handle_unload_dll): Add comment.
9060
9061 2014-02-26 Joel Brobecker <brobecker@adacore.com>
9062
9063 * win32-low.c (win32_add_all_dlls): Renames
9064 win32_ensure_ntdll_loaded. Rewrite function documentation.
9065 Adjust implementation to always load all DLLs.
9066 Add 0x1000 offset to DLL base address when calling
9067 win32_add_one_solib.
9068 (child_initialization_done): New static global.
9069 (do_initial_child_stuff): Set child_initialization_done to
9070 zero during child initialization, and 1 after. Replace call
9071 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
9072 Add comment.
9073 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
9074 (handle_unload_dll): Add function documentation.
9075 (get_child_debug_event): Ignore load and unload DLL events
9076 during child initialization.
9077
9078 2014-02-20 Doug Evans <dje@google.com>
9079
9080 Remove global all_lwps.
9081 * inferiors.h (ptid_of): Move here from linux-low.h.
9082 (pid_of, lwpid_of): Ditto.
9083 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
9084 parameter is a struct thread_info * now.
9085 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
9086 directly. Pass &all_threads to find_inferior instead of &all_lwps.
9087 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
9088 directly.
9089 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
9090 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
9091 * linux-arm-low.c (update_registers_callback): Update, "entry"
9092 parameter is a struct thread_info * now.
9093 Fetch lwpid from current_inferior directly.
9094 (arm_insert_point): Pass &all_threads to find_inferior instead of
9095 &all_lwps.
9096 (arm_remove_point): Ditto.
9097 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
9098 (arm_prepare_to_resume): Fetch pid from thread.
9099 (arm_read_description): Fetch lwpid from current_inferior directly.
9100 * linux-low.c (all_lwps): Delete.
9101 (delete_lwp): Delete call to remove_inferior.
9102 (handle_extended_wait): Fetch lwpid from thread.
9103 (add_lwp): Don't set lwp->entry.id. Remove call to
9104 add_inferior_to_list.
9105 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
9106 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
9107 (kill_one_lwp_callback): Ditto.
9108 (linux_kill): Don't dereference NULL pointer.
9109 Fetch ptid,lwpid from thread.
9110 (get_detach_signal): Fetch ptid from thread.
9111 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
9112 Simplify call to regcache_invalidate_thread.
9113 (delete_lwp_callback): Update, "entry" parameter is a
9114 struct thread_info * now. Fetch pid from thread.
9115 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
9116 (status_pending_p_callback): Update, "entry" parameter is a
9117 struct thread_info * now. Fetch ptid from thread.
9118 (find_lwp_pid): Update, "entry" parameter is a
9119 struct thread_info * now.
9120 (linux_wait_for_lwp): Fetch pid from thread.
9121 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
9122 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
9123 (enqueue_one_deferred_signal): Fetch lwpid from thread.
9124 (dequeue_one_deferred_signal): Ditto.
9125 (cancel_breakpoint): Fetch ptid from current_inferior.
9126 (linux_wait_for_event): Pass &all_threads to find_inferior,
9127 not &all_lwps. Fetch ptid, lwpid from thread.
9128 (count_events_callback): Update, "entry" parameter is a
9129 struct thread_info * now.
9130 (select_singlestep_lwp_callback): Ditto.
9131 (select_event_lwp_callback): Ditto.
9132 (cancel_breakpoints_callback): Ditto.
9133 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
9134 not &all_lwps.
9135 (select_event_lwp): Ditto. Fetch ptid from event_thread.
9136 (unsuspend_one_lwp): Update, "entry" parameter is a
9137 struct thread_info * now.
9138 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
9139 not &all_lwps.
9140 (linux_stabilize_threads): Ditto. And for for_each_inferior.
9141 Fetch lwpid from thread, not lwp.
9142 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
9143 Pass &all_threads to find_inferior, not &all_lwps.
9144 (send_sigstop): Fetch lwpid from thread, not lwp.
9145 (send_sigstop_callback): Update, "entry" parameter is a
9146 struct thread_info * now.
9147 (suspend_and_send_sigstop_callback): Ditto.
9148 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
9149 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
9150 struct thread_info * now.
9151 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
9152 from thread, lwp.
9153 (lwp_running): Update, "entry" parameter is a
9154 struct thread_info * now.
9155 (stop_all_lwps): Fetch ptid from thread.
9156 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
9157 (linux_resume_one_lwp): Fetch lwpid from thread.
9158 (linux_set_resume_request): Update, "entry" parameter is a
9159 struct thread_info * now. Fetch pid, lwpid from thread.
9160 (resume_status_pending_p): Update, "entry" parameter is a
9161 struct thread_info * now.
9162 (need_step_over_p): Ditto. Fetch lwpid from thread.
9163 (start_step_over): Fetch lwpid from thread.
9164 (linux_resume_one_thread): Update, "entry" parameter is a
9165 struct thread_info * now. Fetch lwpid from thread.
9166 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
9167 (proceed_one_lwp): Update, "entry" parameter is a
9168 struct thread_info * now. Fetch lwpid from thread.
9169 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
9170 struct thread_info * now.
9171 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
9172 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
9173 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
9174 directly.
9175 (regsets_store_inferior_registers): Ditto.
9176 (fetch_register, store_register): Ditto.
9177 (linux_read_memory, linux_write_memory): Ditto.
9178 (linux_request_interrupt): Ditto.
9179 (linux_read_auxv): Ditto.
9180 (linux_xfer_siginfo): Ditto.
9181 (linux_qxfer_spu): Ditto.
9182 (linux_qxfer_libraries_svr4): Ditto.
9183 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
9184 moved to inferiors.h.
9185 (get_lwp): Delete.
9186 (get_thread_lwp): Update.
9187 (struct lwp_info): Delete member "entry". Simplify comment for
9188 member "thread".
9189 (all_lwps): Delete.
9190 * linux-mips-low.c (mips_read_description): Fetch lwpid from
9191 current_inferior directly.
9192 (update_watch_registers_callback): Update, "entry" parameter is a
9193 struct thread_info * now. Fetch pid from thread.
9194 (mips_linux_prepare_to_resume): Fetch ptid from thread.
9195 (mips_insert_point): Fetch lwpid from current_inferior.
9196 Pass &all_threads to find_inferior, not &all_lwps.
9197 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
9198 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
9199 directly.
9200 (mips_stopped_data_address): Ditto.
9201 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
9202 directly.
9203 * linux-tile-low.c (tile_arch_setup): Ditto.
9204 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
9205 (update_debug_registers_callback): Update, "entry" parameter is a
9206 struct thread_info * now. Fetch pid from thread.
9207 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
9208 Pass &all_threads to find_inferior, not &all_lwps.
9209 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
9210 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
9211 Pass &all_threads to find_inferior, not &all_lwps.
9212 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
9213 (i386_dr_low_get_status): Ditto.
9214 (x86_linux_prepare_to_resume): Fetch ptid from thread.
9215 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
9216 (x86_linux_read_description): Ditto.
9217 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
9218
9219 2014-02-20 Doug Evans <dje@google.com>
9220
9221 * inferiors.c (get_first_inferior): Fix buglet.
9222
9223 2014-02-19 Doug Evans <dje@google.com>
9224
9225 * gdbthread.h (add_thread): Change result type to struct thread_info *.
9226 * inferiors.c (add_thread): Change result type to struct thread_info *.
9227 All callers updated.
9228 (add_lwp): Call add_thread here instead of in callers.
9229 All callers updated.
9230 * linux-low.h (get_lwp_thread): Rewrite.
9231 (struct lwp_info): New member "thread".
9232
9233 2014-02-19 Doug Evans <dje@google.com>
9234
9235 * linux-low.c (add_lwp): Change result to struct lwp_info *.
9236 All callers updated.
9237
9238 2014-02-19 Doug Evans <dje@google.com>
9239
9240 * inferiors.c (add_thread): Fix whitespace.
9241
9242 2014-02-19 Doug Evans <dje@google.com>
9243
9244 * dll.c (clear_dlls): Replace accessing list implemention details
9245 with API function.
9246 * gdbthread.h (get_first_thread): Declare.
9247 * inferiors.c (for_each_inferior_with_data): New function.
9248 (get_first_thread): New function.
9249 (find_thread_ptid): Simplify.
9250 (get_first_inferior): New function.
9251 (clear_list): Delete.
9252 (one_inferior_p): New function.
9253 (clear_inferior_list): New function.
9254 (clear_inferiors): Update.
9255 * inferiors.h (for_each_inferior_with_data): Declare.
9256 (clear_inferior_list): Declare.
9257 (one_inferior_p): Declare.
9258 (get_first_inferior): Declare.
9259 * linux-low.c (linux_wait_for_event): Replace accessing list
9260 implemention details with API function.
9261 * server.c (target_running): Ditto.
9262 (accumulate_file_name_length): New function.
9263 (emit_dll_description): New function.
9264 (handle_qxfer_libraries): Replace accessing list implemention
9265 details with API function.
9266 (handle_qxfer_threads_worker): New function.
9267 (handle_qxfer_threads_proper): Replace accessing list implemention
9268 details with API function.
9269 (handle_query): Ditto.
9270 (visit_actioned_threads_callback_ftype): New typedef.
9271 (visit_actioned_threads_data): New struct.
9272 (visit_actioned_threads): Rewrite to be find_inferior callback.
9273 (resume): Call find_inferior.
9274 (handle_status): Replace accessing list implemention
9275 details with API function.
9276 (process_serial_event): Replace accessing list implemention details
9277 with API function.
9278 * target.c (set_desired_inferior): Replace accessing list implemention
9279 details with API function.
9280 * tracepoint.c (same_process_p): New function.
9281 (gdb_agent_about_to_close): Replace accessing list implemention
9282 details with API function.
9283 * win32-low.c (child_delete_thread): Replace accessing list
9284 implemention details with API function.
9285 (match_dll_by_basename): New function.
9286 (dll_is_loaded_by_basename): New function.
9287 (win32_ensure_ntdll_loaded): Replace accessing list implemention
9288 details call to dll_is_loaded_by_basename.
9289
9290 2014-02-19 Doug Evans <dje@google.com>
9291
9292 * dll.h (struct dll_info): Add comment.
9293 * gdbthread.h (struct thread_info): Add comment.
9294 (current_ptid): Simplify.
9295 * inferiors.c (add_process): Update.
9296 (remove_process): Update.
9297 * inferiors.h (struct process_info): Rename member "head" to "entry".
9298 * linux-low.c (delete_lwp): Update.
9299 (add_lwp): Update.
9300 (last_thread_of_process_p): Update.
9301 (kill_one_lwp_callback, linux_kill): Update.
9302 (status_pending_p_callback): Update.
9303 (wait_for_sigstop): Update. Simplify read of ptid.
9304 (start_step_over): Update.
9305 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
9306 (get_lwp_thread): Update.
9307 (struct lwp_info): Rename member "head" to "entry".
9308 * regcache.h (inferior_list_entry): Delete.
9309 * server.c (kill_inferior_callback): Update.
9310 (detach_or_kill_inferior_callback): Update.
9311 (print_started_pid): Update.
9312 (print_attached_pid): Update.
9313 (process_serial_event): Simplify read of ptid.
9314 * thread-db.c (thread_db_create_event): Update.
9315 (thread_db_get_tls_address): Update.
9316 * win32-low.c (current_inferior_ptid): Simplify.
9317
9318 2014-02-19 Tom Tromey <tromey@redhat.com>
9319
9320 * target.h (struct target_ops) <supports_btrace>: Add target_ops
9321 argument.
9322 (target_supports_btrace): Update.
9323
9324 2014-02-14 Yao Qi <yao@codesourcery.com>
9325
9326 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
9327 (rsp-low-ipa.o): New target.
9328
9329 2014-02-12 Tom Tromey <tromey@redhat.com>
9330
9331 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
9332 convert_ascii_to_int.
9333 * regcache.c (registers_to_string): Likewise.
9334 * remote-utils.c (decode_M_packet): Likewise.
9335 * server.c (process_serial_event): Likewise.
9336
9337 2014-02-12 Tom Tromey <tromey@redhat.com>
9338
9339 * server.c (handle_query, handle_v_run): Use hex2bin, not
9340 unhexify.
9341 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
9342
9343 2014-02-12 Tom Tromey <tromey@redhat.com>
9344
9345 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
9346 convert_int_to_ascii.
9347 * regcache.c (registers_to_string, collect_register_as_string):
9348 Likewise.
9349 * remote-utils.c (look_up_one_symbol, relocate_instruction):
9350 Likewise.
9351 * server.c (process_serial_event): Likewise.
9352 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
9353 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
9354
9355 2014-02-12 Tom Tromey <tromey@redhat.com>
9356
9357 * remote-utils.c (look_up_one_symbol, monitor_output): Use
9358 bin2hex, not hexify.
9359 * tracepoint.c (cmd_qtstatus): Likewise.
9360
9361 2014-02-12 Tom Tromey <tromey@redhat.com>
9362
9363 * remote-utils.c (monitor_output): Pass explicit length to
9364 hexify.
9365
9366 2014-02-12 Tom Tromey <tromey@redhat.com>
9367
9368 * tracepoint.c: Include rsp-low.h.
9369 * server.c: Include rsp-low.h.
9370 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
9371 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
9372 declare.
9373 * remote-utils.c: Include rsp-low.h.
9374 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
9375 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
9376 (convert_int_to_ascii, convert_ascii_to_int): Move to
9377 common/rsp-low.c.
9378 * regcache.c: Include rsp-low.h.
9379 * ax.c: Include rsp-low.h.
9380 * Makefile.in (SFILES): Add common/rsp-low.c.
9381 (OBS): Add rsp-low.o.
9382 (rsp-low.o): New target.
9383
9384 2014-02-12 Tom Tromey <tromey@redhat.com>
9385
9386 * utils.h (pulongest, plongest, phex_nz): Don't declare.
9387 Include print-utils.h.
9388 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
9389 (plongest, thirty_two, phex_nz): Remove.
9390 * Makefile.in (SFILES): Add common/print-utils.c.
9391 (OBS): Add print-utils.o.
9392 (print-utils-ipa.o): New target.
9393 (print-utils.o): New target.
9394 (IPA_OBJS): Add print-utils-ipa.o.
9395
9396 2014-02-06 Tom Tromey <tromey@redhat.com>
9397
9398 * Makefile.in (SFILES): Fix indentation.
9399
9400 2014-02-05 Doug Evans <dje@google.com>
9401
9402 * linux-low.c (linux_wait_for_event): Improve comment.
9403 (linux_wait_1): Keep current_inferior in sync with event_child.
9404
9405 2014-01-22 Doug Evans <dje@google.com>
9406
9407 * gdbthread.h (gdb_id_to_thread): Delete, unused.
9408
9409 2014-01-22 Doug Evans <dje@google.com>
9410
9411 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
9412 * configure: Regenerate.
9413 * config.in: Regenerate.
9414 * Makefile.in (SFILES): Add debug.c.
9415 (OBS): Add debug.o.
9416 * debug.c: New file.
9417 * debug.h: New file.
9418 * linux-aarch64-low.c (*): Update all debugging printfs to use
9419 debug_printf instead of fprintf.
9420 * linux-arm-low.c (*): Ditto.
9421 * linux-cris-low.c (*): Ditto.
9422 * linux-crisv32-low.c (*): Ditto.
9423 * linux-m32r-low.c (*): Ditto.
9424 * linux-sparc-low.c (*): Ditto.
9425 * linux-x86.c (*): Ditto.
9426 * linux-low.c (*): Ditto.
9427 (linux_wait_1): Add calls to debug_enter, debug_exit.
9428 (linux_wait): Remove redundant debugging printf.
9429 (stop_all_lwps): Add calls to debug_enter, debug_exit.
9430 (linux_resume, unstop_all_lwps): Ditto.
9431 * mem-break.c (*): Update all debugging printfs to use
9432 debug_printf instead of fprintf.
9433 * remote-utils.c (*): Ditto.
9434 * thread-db.c (*): Ditto.
9435 * server.c #include <ctype.h>, "gdb_vecs.h".
9436 (debug_threads): Moved to debug.c.
9437 (*): Update all debugging printfs to use debug_printf instead of
9438 fprintf.
9439 (start_inferior): Replace call to fflush with call to debug_flush.
9440 (monitor_show_help): Mention set debug-format.
9441 (parse_debug_format_options): New function.
9442 (handle_monitor_command): Handle "monitor set debug-format".
9443 (gdbserver_usage): Mention --debug-format.
9444 (main): Parse --debug-format.
9445 * server.h (debug_threads): Declaration moved to debug.h.
9446 #include "debug.h".
9447 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
9448 trace_debug_1 that uses debug_printf.
9449 (tracepoint_look_up_symbols): Update all debugging printfs to use
9450 debug_printf instead of fprintf.
9451
9452 2014-01-20 Baruch Siach <baruch@tkos.co.il>
9453
9454 * linux-xtensa-low.c: Include asm/ptrace.h instead of
9455 sys/ptrace.h.
9456
9457 2014-01-17 Pedro Alves <palves@redhat.com>
9458
9459 PR build/16445
9460 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
9461 defined after including gdb_proc_service.h.
9462
9463 2014-01-16 Doug Evans <dje@google.com>
9464
9465 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
9466 (match_dll): Use it.
9467
9468 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
9469
9470 * target.h (target_ops) <read_btrace>: Change parameters and
9471 return type to allow error reporting.
9472 * server.c (handle_qxfer_btrace): Support delta reads. Pass
9473 trace reading errors on.
9474 * linux-low.c (linux_low_read_btrace): Pass trace reading
9475 errors on.
9476 (linux_low_disable_btrace): New.
9477
9478 2014-01-15 Doug Evans <dje@google.com>
9479
9480 * inferiors.c (thread_id_to_gdb_id): Delete.
9481 * inferiors.h (thread_id_to_gdb_id): Delete.
9482
9483 2014-01-13 Eli Zaretskii <eliz@gnu.org>
9484
9485 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
9486 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
9487 versions.
9488
9489 2014-01-08 Pedro Alves <palves@redhat.com>
9490
9491 * server.c (handle_status): Don't discard previous queued stop
9492 replies or thread's pending status here.
9493 (main) <disconnection>: Do it here instead.
9494
9495 2014-01-08 Pedro Alves <palves@redhat.com>
9496
9497 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
9498 * server.c (visit_actioned_threads, handle_pending_status): New
9499 function.
9500 (handle_v_cont): Factor out parts to ...
9501 (resume): ... this new function. If in all-stop, and a thread
9502 being resumed has a pending status, report it without actually
9503 resuming.
9504 (myresume): Adjust to use the new 'resume' function.
9505 (clear_pending_status_callback, set_pending_status_callback)
9506 (find_status_pending_thread_callback): New functions.
9507 (handle_status): Handle the case of multiple threads having
9508 interesting statuses to report. Report threads' real last signal
9509 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
9510 with an interesting thread to report the status for, instead of
9511 always reporting the status of the first thread.
9512
9513 2014-01-01 Joel Brobecker <brobecker@adacore.com>
9514
9515 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
9516 * gdbreplay.c (gdbreplay_version): Likewise.
9517
9518 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
9519
9520 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
9521 iov.iov_len with the real length in use.
9522
9523 2013-12-13 Joel Brobecker <brobecker@adacore.com>
9524
9525 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
9526 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
9527 for all targets that use win32-low.c.
9528 * win32-low.c (win32_ensure_ntdll_loaded): New function.
9529 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
9530
9531 2013-12-13 Pedro Alves <palves@redhat.com>
9532
9533 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
9534 if equal to TARGET_WAITKIND_LOADED.
9535 * win32-low.c (cached_status): New static global.
9536 (win32_wait): Add declaration.
9537 (do_initial_child_stuff): Flush all initial pending debug events
9538 up to the initial breakpoint.
9539 (win32_wait): If CACHED_STATUS was set, return that instead
9540 of doing a real wait. Remove the code resuming the execution
9541 of the inferior after receiving a TARGET_WAITKIND_LOADED event
9542 during the initial phase. Also remove the code changing
9543 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
9544 TARGET_WAITKIND_STOPPED.
9545
9546 2013-12-11 Yao Qi <yao@codesourcery.com>
9547
9548 * notif.c (handle_notif_ack): Return 0 if no notification
9549 matches.
9550
9551 2013-11-20 Doug Evans <dje@google.com>
9552
9553 * linux-low.c (linux_set_resume_request): Fix comment.
9554
9555 2013-11-20 Doug Evans <dje@google.com>
9556
9557 * linux-low.c (resume_status_pending_p): Tweak comment.
9558
9559 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
9560
9561 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
9562 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
9563 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
9564 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
9565 (srv_amd64_regobj): Add amd64-mpx.o.
9566 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
9567 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
9568 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
9569 * i387-fp.c (num_pl_bnd_register) Added constant.
9570 (num_pl_bnd_cfg_registers) Added constant.
9571 (struct i387_xsave) Added reserved area and MPX fields.
9572 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
9573 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
9574 function.
9575 (tdesc_i386_mpx_linux): Add MPX amd64 target.
9576 (init_registers_amd64_mpx_linux): Declare new function.
9577 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
9578 (x86_64_regmap): Add MPX registers.
9579 (x86_linux_read_description): Add MPX case.
9580 (initialize_low_arch): Initialize MPX targets.
9581
9582 2013-11-18 Tom Tromey <tromey@redhat.com>
9583
9584 * configure: Rebuild.
9585 * configure.ac: Don't check for stdlib.h.
9586 * gdbreplay.c: Unconditionally include stdlib.h.
9587
9588 2013-11-18 Tom Tromey <tromey@redhat.com>
9589
9590 * config.in: Rebuild.
9591 * configure: Rebuild.
9592 * configure.ac: Don't use AC_HEADER_DIRENT.
9593
9594 2013-11-18 Tom Tromey <tromey@redhat.com>
9595
9596 * server.h: Don't check HAVE_STRING_H.
9597 * gdbreplay.c: Don't check HAVE_STRING_H.
9598 * configure: Rebuild.
9599
9600 2013-11-18 Tom Tromey <tromey@redhat.com>
9601
9602 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
9603 LIBGNU.
9604
9605 2013-11-08 Tom Tromey <tromey@redhat.com>
9606
9607 * configure, config.in: Rebuild.
9608 * configure.ac: Remove unused configury.
9609
9610 2013-11-08 Tom Tromey <tromey@redhat.com>
9611
9612 * acinclude.m4: Include common.m4, codeset.m4.
9613 * configure, config.in: Rebuild.
9614 * configure.ac: Use GDB_AC_COMMON.
9615
9616 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
9617
9618 * linux-s390-low.c (HWCAP_S390_TE): New define.
9619 (s390_arch_setup): Consider the TE field in the HWCAP for
9620 determining 'have_regset_tdb'.
9621
9622 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
9623
9624 PR gdb/16014
9625 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
9626 call to sizeof.
9627
9628 2013-10-02 Pedro Alves <palves@redhat.com>
9629
9630 * server.c (process_serial_event): Don't output "GDBserver
9631 exiting" if GDB is connected through stdio.
9632 * target.c (mywait): Likewise, be silent if GDB is connected
9633 through stdio.
9634
9635 2013-10-01 Joel Brobecker <brobecker@adacore.com>
9636
9637 * lynx-low.c (lynx_add_threads_after_attach): New function.
9638 (lynx_attach): Remove call to add_thread. Add call to
9639 lynx_add_threads_after_attach instead.
9640
9641 2013-09-28 Mike Frysinger <vapier@gentoo.org>
9642
9643 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
9644 * config.in, configure: Regenerated.
9645
9646 2013-09-18 Yao Qi <yao@codesourcery.com>
9647
9648 PR server/15959
9649 * server.c (start_inferior): Clear 'resume_info'.
9650
9651 2013-09-16 Jiong Wang <jiwang@tilera.com>
9652
9653 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
9654 for each register.
9655
9656 2013-09-16 Jiong Wang <jiwang@tilera.com>
9657
9658 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
9659 linux-tile-low.o to srv_tgtobj.
9660
9661 2013-09-16 Will Newton <will.newton@linaro.org>
9662
9663 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
9664 out regs.
9665
9666 2013-09-06 Pedro Alves <palves@redhat.com>
9667
9668 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
9669 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
9670 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
9671 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
9672 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
9673 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
9674
9675 2013-09-06 Pedro Alves <palves@redhat.com>
9676
9677 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
9678 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
9679
9680 2013-09-06 Pedro Alves <palves@redhat.com>
9681
9682 * linux-amd64-ipa.c: Include tracepoint.h.
9683 * linux-i386-ipa.c: Include tracepoint.h.
9684
9685 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
9686
9687 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
9688 (ps_get_thread_area): New function.
9689
9690 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
9691
9692 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
9693 (initialize_low_arch): Call init_registers_crisv32 rather than
9694 init_register_crisv32.
9695
9696 2013-09-05 Pedro Alves <palves@redhat.com>
9697
9698 * server.h (handle_vFile, hostio_last_error_from_errno): Move
9699 to ...
9700 * hostio.h: ... this new file.
9701 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
9702 win32-low.c: Include hostio.h.
9703
9704 2013-09-05 Pedro Alves <palves@redhat.com>
9705
9706 * server.h (gdb_client_data, handler_func, callback_handler_func)
9707 (delete_file_handler, add_file_handler, append_callback_event)
9708 (delete_callback_event, start_event_loop, initialize_event_loop):
9709 Move to event-loop.h and include it.
9710 * event-loop.h: New file.
9711
9712 2013-09-05 Pedro Alves <palves@redhat.com>
9713
9714 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
9715 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
9716 (loaded_dll, unloaded_dll): Move to ...
9717 * dll.h: ... this new file.
9718 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
9719
9720 2013-09-05 Pedro Alves <palves@redhat.com>
9721
9722 * server.h (current_process, get_thread_process, all_processes)
9723 (add_inferior_to_list, for_each_inferior, current_inferior)
9724 (remove_inferior, add_process, remove_process, find_process_pid)
9725 (have_started_inferiors_p, have_attached_inferiors_p)
9726 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
9727 (clear_inferiors, find_inferior, find_inferior_id)
9728 (inferior_target_data, set_inferior_target_data)
9729 (inferior_regcache_data, set_inferior_regcache_data): Move to
9730 inferiors.h, and include it.
9731 * inferiors.h: New file.
9732
9733 2013-09-05 Pedro Alves <palves@redhat.com>
9734
9735 * server.h (struct emit_ops, current_insn_ptr, emit_error):
9736 Move ...
9737 * ax.h: ... here.
9738
9739 2013-09-05 Pedro Alves <palves@redhat.com>
9740
9741 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
9742 tracepoint.h.
9743 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
9744 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
9745 (handle_tracepoint_general_set, handle_tracepoint_query)
9746 (tracepoint_finished_step, tracepoint_was_hit)
9747 (release_while_stepping_state_list, current_traceframe)
9748 (in_readonly_region, traceframe_read_mem)
9749 (fetch_traceframe_registers, traceframe_read_sdata)
9750 (traceframe_read_info, struct fast_tpoint_collect_status)
9751 (fast_tracepoint_collecting, force_unlock_trace_buffer)
9752 (handle_tracepoit_bkpts, initialize_low_tracepoint)
9753 (supply_fast_tracepoint_registers)
9754 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
9755 (ipa_tdesc, claim_trampoline_space)
9756 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
9757 (agent_mem_read, agent_get_trace_state_variable_value)
9758 (agent_set_trace_state_variable_value, agent_tsv_read)
9759 (agent_mem_read_string, get_raw_reg_func_addr)
9760 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
9761 * tracepoint.h: ... this new file.
9762
9763 2013-09-05 Pedro Alves <palves@redhat.com>
9764
9765 * server.h (perror_with_name, error, fatal, warning, paddress)
9766 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
9767 include it.
9768 * utils.h: New file.
9769
9770 2013-09-05 Pedro Alves <palves@redhat.com>
9771
9772 * server.h (remote_debug, noack_mode, transport_is_reliable)
9773 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
9774 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
9775 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
9776 (write_enn, initialize_async_io, enable_async_io)
9777 (disable_async_io, check_remote_input_interrupt_request)
9778 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
9779 (dead_thread_notify, prepare_resume_reply)
9780 (decode_address_to_semicolon, decode_address, decode_m_packet)
9781 (decode_M_packet, decode_X_packet, decode_xfer_write)
9782 (decode_search_memory_packet, unhexify, hexify)
9783 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
9784 (look_up_one_symbol, relocate_instruction)
9785 (monitor_output): Move to remote-utils.h, and include it.
9786 * remote-utils.h: New file.
9787
9788 2013-09-05 Pedro Alves <palves@redhat.com>
9789
9790 * server.h (_): Delete.
9791
9792 2013-09-02 Pedro Alves <palves@redhat.com>
9793
9794 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
9795 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
9796 allocated.
9797 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
9798
9799 2013-09-02 Pierre Muller <muller@sourceware.org>
9800
9801 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
9802 or WriteProcessMemory complete successfully and handle
9803 ERROR_PARTIAL_COPY error.
9804
9805 2013-09-02 Pedro Alves <palves@redhat.com>
9806
9807 * server.c (gdb_read_memory): Return -1 on traceframe memory read
9808 error instead of EIO.
9809
9810 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9811
9812 PR server/15604
9813 * linux-low.c: Include filestuff.h.
9814 (linux_create_inferior) <pid == 0>: Call close_most_fds.
9815 * lynx-low.c: Include filestuff.h.
9816 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
9817 * server.c: Include filestuff.h.
9818 (main): Call notice_open_fds.
9819 * spu-low.c: Include filestuff.h.
9820 (spu_create_inferior) <pid == 0>: Call close_most_fds.
9821
9822 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
9823
9824 * Makefile.in: Explain why ../target and ../nat are not
9825 listed as include file search paths.
9826 (linux-waitpid.o): New object file rule.
9827 * configure.srv (srv_native_linux_obj): New variable.
9828 Replace all occurrences of linux native object files with
9829 $srv_native_linux_obj.
9830 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
9831 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
9832 (linux_enable_event_reporting): Remove declaration.
9833 (my_waitpid): Moved to common/linux-waitpid.c.
9834 (linux_wait_for_event): Pass ptid when calling
9835 linux_enable_event_reporting.
9836 (linux_supports_tracefork_flag): Remove.
9837 (linux_enable_event_reporting): Likewise.
9838 (linux_tracefork_grandchild): Remove.
9839 (STACK_SIZE): Moved to common/linux-ptrace.c.
9840 (linux_tracefork_child): Remove.
9841 (linux_test_for_tracefork): Remove.
9842 (linux_look_up_symbols): Call linux_supports_traceclone.
9843 (initialize_low): Remove call to linux_test_for_tracefork.
9844 * linux-low.h (PTRACE_TYPE_ARG3): Move to
9845 common/linux-ptrace.h.
9846 (PTRACE_TYPE_ARG4): Likewise.
9847 Include linux-ptrace.h.
9848
9849 2013-08-21 Pedro Alves <palves@redhat.com>
9850
9851 * config.in: Renegerate.
9852
9853 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
9854
9855 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
9856 (SFILES): Remove $(srcdir)/common/target-common.c and
9857 add $(srcdir)/target/waitstatus.c.
9858 (OBS): Remove target-common.o and add waitstatus.o.
9859 (server_h): Remove $(srcdir)/../common/target-common.h and
9860 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
9861 and $(srcdir)/../target/waitstatus.h.
9862 (target-common.o): Remove.
9863 (waitstatus.o): New target object file.
9864 * target.h: Do not include target-common.h and
9865 include target/resume.h, target/wait.h and
9866 target/waitstatus.h.
9867
9868 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
9869
9870 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
9871 to PTRACE_TYPE_ARG3.
9872 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
9873 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
9874 PTRACE_TYPE_ARG4.
9875 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
9876 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
9877
9878 2013-07-27 Jie Zhang <jie@codesourcery.com>
9879 Daniel Jacobowitz <dan@codesourcery.com>
9880 Yao Qi <yao@codesourcery.com>
9881
9882 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
9883 (mips-linux-watch.o): New rule.
9884 (mips_linux_watch_h): New variable.
9885 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
9886 srv_tgtobj.
9887 * linux-mips-low.c: Include mips-linux-watch.h.
9888 (struct arch_process_info, struct arch_lwp_info): New.
9889 (update_watch_registers_callback): New function.
9890 (mips_linux_new_process, mips_linux_new_thread) New functions.
9891 (mips_linux_prepare_to_resume, mips_insert_point): New
9892 functions.
9893 (mips_remove_point, mips_stopped_by_watchpoint): New
9894 functions.
9895 (rsp_bp_type_to_target_hw_bp_type): New function.
9896 (mips_stopped_data_address): New function.
9897 (the_low_target): Add watchpoint support functions.
9898
9899 2013-07-27 Yao Qi <yao@codesourcery.com>
9900
9901 * i386-low.c: Include break-common.h.
9902 (enum target_hw_bp_type): Remove.
9903
9904 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
9905
9906 * Makefile.in (SFILES): /common/target-common.c.
9907 (OBS): Add target-common.o.
9908 (server_h): Add $(srcdir)/../common/target-common.h.
9909 (target-common.o): New target.
9910 * server.c (queue_stop_reply_callback): Free
9911 status string after use.
9912 * target.c (target_waitstatus_to_string): Remove.
9913 * target.h: Include target-common.h.
9914 (resume_kind): Likewise.
9915 (target_waitkind): Likewise.
9916 (target_waitstatus): Likewise.
9917 (TARGET_WNOHANG): Likewise.
9918
9919 2013-07-04 Yao Qi <yao@codesourcery.com>
9920
9921 * Makefile.in (host_alias): Use @host_noncanonical@.
9922 (target_alias): Use @target_noncanonical@.
9923 * configure.ac: Use ACX_NONCANONICAL_TARGET and
9924 ACX_NONCANONICAL_HOST.
9925 * configure: Regenerated.
9926
9927 Revert:
9928 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
9929
9930 * configure.ac (version_host, version_target): Set and AC_SUBST them.
9931 * configure: Rebuild.
9932 * Makefile.in (version_host, version_target): Get from configure.
9933 (version.c): Use $(version_host) and $(version_target).
9934
9935 2013-07-03 Pedro Alves <palves@redhat.com>
9936
9937 * Makefile.in (config.status): Depend on development.sh.
9938 * acinclude.m4: Include libmcheck.m4.
9939 * configure: Regenerate.
9940
9941 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
9942
9943 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
9944 attribute inside the parentheses.
9945 (winapi_DebugSetProcessKillOnExit): Ditto.
9946 (winapi_DebugBreakProcess): Ditto.
9947 (winapi_GenerateConsoleCtrlEvent): Ditto.
9948
9949 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
9950
9951 * notif.h (notif_event): Add a dummy member to avoid compiler
9952 errors.
9953
9954 2013-07-01 Pedro Alves <palves@redhat.com>
9955
9956 * hostio.c (HOSTIO_PATH_MAX): Define.
9957 (require_filename, handle_open, handle_unlink, handle_readlink):
9958 Use it.
9959
9960 2013-07-01 Pedro Alves <palves@redhat.com>
9961
9962 * server.h: Include "pathmax.h".
9963 * linux-low.c: Don't include sys/param.h.
9964 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
9965 MAXPATHLEN.
9966 * win32-low.c: Don't include sys/param.h.
9967 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
9968
9969 2013-07-01 Pedro Alves <palves@redhat.com>
9970
9971 * event-loop.c: Don't check HAVE_UNISTD_H before including
9972 <unistd.h>.
9973 * gdbreplay.c: Likewise.
9974 * remote-utils.c: Likewise.
9975 * server.c: Likewise.
9976 * configure.ac: Don't check for unistd.h.
9977 * configure: Regenerate.
9978
9979 2013-06-28 Tom Tromey <tromey@redhat.com>
9980
9981 * Makefile.in (version.c): Use version.in, not
9982 common/version.in.
9983
9984 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
9985
9986 * configure.ac (version_host, version_target): Set and AC_SUBST them.
9987 * configure: Rebuild.
9988 * Makefile.in (version_host, version_target): Get from configure.
9989 (version.c): Use $(version_host) and $(version_target).
9990
9991 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
9992
9993 Fix trace-status to output user name without trailing colon.
9994 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
9995
9996 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
9997
9998 Fix trace-status to output proper start-time and stop-time.
9999 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
10000 output start time and stop time in hex as gdb expects.
10001
10002 2013-06-26 Pedro Alves <pedro@codesourcery.com>
10003
10004 * tracepoint.c (build_traceframe_info_xml): Output trace state
10005 variables present in the trace buffer.
10006
10007 2013-06-24 Tom Tromey <tromey@redhat.com>
10008
10009 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
10010 create-version.sh.
10011 (version.o): Remove.
10012 * gdbreplay.c: Include version.h.
10013 (version, host_name): Don't declare.
10014 * server.h: Include version.h.
10015 (version, host_name): Don't declare.
10016
10017 2013-06-12 Pedro Alves <palves@redhat.com>
10018
10019 * linux-x86-low.c (linux_is_elf64): Delete global.
10020 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
10021 with local linux_pid_exe_is_elf_64_file use.
10022
10023 2013-06-11 Pedro Alves <palves@redhat.com>
10024
10025 * linux-low.c (regset_disabled, disable_regset): New functions.
10026 (regsets_fetch_inferior_registers)
10027 (regsets_store_inferior_registers): Use them.
10028 (initialize_regsets_info); Don't allocate the disabled_regsets
10029 array here.
10030 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
10031 comment.
10032
10033 2013-06-11 Pedro Alves <palves@redhat.com>
10034
10035 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
10036 xmalloc.
10037
10038 2013-06-11 Pedro Alves <palves@redhat.com>
10039
10040 * linux-x86-low.c (initialize_low_arch): Call
10041 init_registers_x32_avx_linux.
10042
10043 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
10044
10045 Fix compatibility with Android Bionic.
10046 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
10047 it is not empty.
10048
10049 2013-06-07 Pedro Alves <palves@redhat.com>
10050
10051 PR server/14823
10052 * Makefile.in (OBS): Add tdesc.o.
10053 (IPA_OBJS): Add tdesc-ipa.o.
10054 (tdesc-ipa.o): New rule.
10055 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
10056 interface.
10057 * linux-low.c (new_inferior): Delete.
10058 (disabled_regsets, num_regsets): Delete.
10059 (linux_add_process): Adjust to set the new per-process
10060 new_inferior flag.
10061 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
10062 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
10063 was a stop. When calling arch_setup, switch the current inferior
10064 to the thread that got an event.
10065 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
10066 (regsets_fetch_inferior_registers)
10067 (regsets_store_inferior_registers): New regsets_info parameter.
10068 Adjust to use it.
10069 (linux_register_in_regsets): New regs_info parameter. Adjust to
10070 use it.
10071 (register_addr, fetch_register, store_register): New usrregs_info
10072 parameter. Adjust to use it.
10073 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
10074 parameter regs_info. Adjust to use it.
10075 (linux_fetch_registers): Get the current inferior's regs_info, and
10076 adjust to use it.
10077 (linux_store_registers): Ditto.
10078 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
10079 (initialize_low): Don't initialize the target_regsets here. Call
10080 initialize_low_arch.
10081 * linux-low.h (target_regsets): Delete declaration.
10082 (struct regsets_info): New.
10083 (struct usrregs_info): New.
10084 (struct regs_info): New.
10085 (struct process_info_private) <new_inferior>: New field.
10086 (struct linux_target_ops): Delete the num_regs, regmap, and
10087 regset_bitmap fields. New field regs_info.
10088 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
10089 * i387-fp.c (num_xmm_registers): Delete.
10090 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
10091 calls to new interface.
10092 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
10093 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
10094 Infer the number of xmm registers from the regcache's target
10095 description.
10096 * i387-fp.h (num_xmm_registers): Delete.
10097 * inferiors.c (add_thread): Don't install the thread's regcache
10098 here.
10099 * proc-service.c (gregset_info): Fetch the current inferior's
10100 regs_info. Adjust to use it.
10101 * regcache.c: Include tdesc.h.
10102 (register_bytes, reg_defs, num_registers)
10103 (gdbserver_expedite_regs): Delete.
10104 (get_thread_regcache): If the thread doesn't have a regcache yet,
10105 create one, instead of aborting gdbserver.
10106 (regcache_invalidate_one): Rename to ...
10107 (regcache_invalidate_thread): ... this.
10108 (regcache_invalidate_one): New.
10109 (regcache_invalidate): Only invalidate registers of the current
10110 process.
10111 (init_register_cache): Add target_desc parameter, and use it.
10112 (new_register_cache): Ditto. Assert the target description has a
10113 non zero registers_size.
10114 (regcache_cpy): Add assertions. Adjust.
10115 (realloc_register_cache, set_register_cache): Delete.
10116 (registers_to_string, registers_from_string): Adjust.
10117 (find_register_by_name, find_regno, find_register_by_number)
10118 (register_cache_size): Add target_desc parameter, and use it.
10119 (free_register_cache_thread, free_register_cache_thread_one)
10120 (regcache_release, register_cache_size): New.
10121 (register_size): Add target_desc parameter, and use it.
10122 (register_data, supply_register, supply_register_zeroed)
10123 (supply_regblock, supply_register_by_name, collect_register)
10124 (collect_register_as_string, collect_register_by_name): Adjust.
10125 * regcache.h (struct target_desc): Forward declare.
10126 (struct regcache) <tdesc>: New field.
10127 (init_register_cache, new_register_cache): Add target_desc
10128 parameter.
10129 (regcache_invalidate_thread): Declare.
10130 (regcache_invalidate_one): Delete declaration.
10131 (regcache_release): Declare.
10132 (find_register_by_number, register_cache_size, register_size)
10133 (find_regno): Add target_desc parameter.
10134 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
10135 declarations.
10136 * remote-utils.c: Include tdesc.h.
10137 (outreg, prepare_resume_reply): Adjust.
10138 * server.c: Include tdesc.h.
10139 (gdbserver_xmltarget): Delete declaration.
10140 (get_features_xml, process_serial_event): Adjust.
10141 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
10142 declare.
10143 (struct process_info) <tdesc>: New field.
10144 (ipa_tdesc): Declare.
10145 * tdesc.c: New file.
10146 * tdesc.h: New file.
10147 * tracepoint.c: Include tdesc.h.
10148 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
10149 (get_context_regcache): Adjust to pass ipa_tdesc down.
10150 (do_action_at_tracepoint): Adjust to get the register cache size
10151 from the context regcache's description.
10152 (traceframe_walk_blocks): Adjust to get the register cache size
10153 from the current trace frame's description.
10154 (traceframe_get_pc): Adjust to get current trace frame's
10155 description and pass it down.
10156 (gdb_collect): Adjust to get the register cache size from the
10157 IPA's description.
10158 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
10159 (gdbserver_xmltarget): Delete.
10160 (initialize_low_tracepoint): Set the ipa's target description.
10161 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
10162 (initialize_low_tracepoint): Set the ipa's target description.
10163 * linux-x86-low.c: Include tdesc.h.
10164 [__x86_64__] (is_64bit_tdesc): New.
10165 (ps_get_thread_area, x86_get_thread_area): Use it.
10166 (i386_cannot_store_register): Rename to ...
10167 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
10168 (i386_cannot_fetch_register): Rename to ...
10169 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
10170 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
10171 to new interface.
10172 (target_regsets): Rename to ...
10173 (x86_regsets): ... this.
10174 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
10175 interface.
10176 (x86_siginfo_fixup): Use is_64bit_tdesc.
10177 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
10178 (tdesc_x32_avx_linux, tdesc_x32_linux)
10179 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
10180 Declare.
10181 (x86_linux_update_xmltarget): Delete.
10182 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
10183 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
10184 (AMD64_LINUX_USER64_CS): New.
10185 (x86_linux_read_description): New, based on
10186 x86_linux_update_xmltarget.
10187 (same_process_callback): New.
10188 (x86_arch_setup_process_callback): New.
10189 (x86_linux_update_xmltarget): New.
10190 (x86_regsets_info): New.
10191 (amd64_linux_regs_info): New.
10192 (i386_linux_usrregs_info): New.
10193 (i386_linux_regs_info): New.
10194 (x86_linux_regs_info): New.
10195 (x86_arch_setup): Reimplement.
10196 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
10197 (x86_emit_ops): Ditto.
10198 (the_low_target): Adjust. Install x86_linux_regs_info,
10199 x86_cannot_fetch_register, and x86_cannot_store_register.
10200 (initialize_low_arch): New.
10201 * linux-ia64-low.c (tdesc_ia64): Declare.
10202 (ia64_fetch_register): Adjust.
10203 (ia64_usrregs_info, regs_info): New globals.
10204 (ia64_regs_info): New function.
10205 (the_low_target): Adjust.
10206 (initialize_low_arch): New function.
10207 * linux-sparc-low.c (tdesc_sparc64): Declare.
10208 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
10209 Adjust.
10210 (sparc_arch_setup): New function.
10211 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
10212 (the_low_target): Adjust.
10213 (initialize_low_arch): New function.
10214 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
10215 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
10216 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
10217 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
10218 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
10219 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
10220 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
10221 (tdesc_powerpc_isa205_vsx64l): Declare.
10222 (ppc_cannot_store_register, ppc_collect_ptrace_register)
10223 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
10224 (ppc_set_pc, ppc_get_hwcap): Adjust.
10225 (ppc_usrregs_info): Forward declare.
10226 (!__powerpc64__) ppc_regmap_adjusted: New global.
10227 (ppc_arch_setup): Adjust to the current process'es target
10228 description.
10229 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
10230 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
10231 (ppc_store_evrregset): Adjust.
10232 (target_regsets): Rename to ...
10233 (ppc_regsets): ... this, and make static.
10234 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
10235 (ppc_regs_info): New function.
10236 (the_low_target): Adjust.
10237 (initialize_low_arch): New function.
10238 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
10239 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
10240 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
10241 (tdesc_s390x_linux64v2): Declare.
10242 (s390_collect_ptrace_register, s390_supply_ptrace_register)
10243 (s390_fill_gregset, s390_store_last_break): Adjust.
10244 (target_regsets): Rename to ...
10245 (s390_regsets): ... this, and make static.
10246 (s390_get_pc, s390_set_pc): Adjust.
10247 (s390_get_hwcap): New target_desc parameter, and use it.
10248 [__s390x__] (have_hwcap_s390_high_gprs): New global.
10249 (s390_arch_setup): Adjust to set the current process'es target
10250 description. Don't adjust the regmap.
10251 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
10252 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
10253 (regs_info_3264): New globals.
10254 (s390_regs_info): New function.
10255 (the_low_target): Adjust.
10256 (initialize_low_arch): New function.
10257 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
10258 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
10259 [__mips64] (init_registers_mips_linux)
10260 (init_registers_mips_dsp_linux): Delete defines.
10261 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
10262 (have_dsp): New global.
10263 (mips_read_description): New, based on mips_arch_setup.
10264 (mips_arch_setup): Reimplement.
10265 (get_usrregs_info): New function.
10266 (mips_cannot_fetch_register, mips_cannot_store_register)
10267 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
10268 (mips_fill_fpregset, mips_store_fpregset): Adjust.
10269 (target_regsets): Rename to ...
10270 (mips_regsets): ... this, and make static.
10271 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
10272 (dsp_regs_info, regs_info): New globals.
10273 (mips_regs_info): New function.
10274 (the_low_target): Adjust.
10275 (initialize_low_arch): New function.
10276 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
10277 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
10278 Declare.
10279 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
10280 (arm_read_description): New, with bits factored from
10281 arm_arch_setup.
10282 (arm_arch_setup): Reimplement.
10283 (target_regsets): Rename to ...
10284 (arm_regsets): ... this, and make static.
10285 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
10286 (arm_regs_info): New function.
10287 (the_low_target): Adjust.
10288 (initialize_low_arch): New function.
10289 * linux-m68k-low.c (tdesc_m68k): Declare.
10290 (target_regsets): Rename to ...
10291 (m68k_regsets): ... this, and make static.
10292 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
10293 (m68k_regs_info): New function.
10294 (m68k_arch_setup): New function.
10295 (the_low_target): Adjust.
10296 (initialize_low_arch): New function.
10297 * linux-sh-low.c (tdesc_sharch): Declare.
10298 (target_regsets): Rename to ...
10299 (sh_regsets): ... this, and make static.
10300 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
10301 (sh_regs_info, sh_arch_setup): New functions.
10302 (the_low_target): Adjust.
10303 (initialize_low_arch): New function.
10304 * linux-bfin-low.c (tdesc_bfin): Declare.
10305 (bfin_arch_setup): New function.
10306 (bfin_usrregs_info, regs_info): New globals.
10307 (bfin_regs_info): New function.
10308 (the_low_target): Adjust.
10309 (initialize_low_arch): New function.
10310 * linux-cris-low.c (tdesc_cris): Declare.
10311 (cris_arch_setup): New function.
10312 (cris_usrregs_info, regs_info): New globals.
10313 (cris_regs_info): New function.
10314 (the_low_target): Adjust.
10315 (initialize_low_arch): New function.
10316 * linux-cris-low.c (tdesc_crisv32): Declare.
10317 (cris_arch_setup): New function.
10318 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
10319 (cris_regs_info): New function.
10320 (the_low_target): Adjust.
10321 (initialize_low_arch): New function.
10322 * linux-m32r-low.c (tdesc_m32r): Declare.
10323 (m32r_arch_setup): New function.
10324 (m32r_usrregs_info, regs_info): New globals.
10325 (m32r_regs_info): Adjust.
10326 (initialize_low_arch): New function.
10327 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
10328 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
10329 (tic6x_usrregs_info): Forward declare.
10330 (tic6x_read_description): New function, based on ...
10331 (tic6x_arch_setup): ... this. Reimplement.
10332 (target_regsets): Rename to ...
10333 (tic6x_regsets): ... this, and make static.
10334 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
10335 (tic6x_regs_info): New function.
10336 (the_low_target): Adjust.
10337 (initialize_low_arch): New function.
10338 * linux-xtensa-low.c (tdesc_xtensa): Declare.
10339 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
10340 (target_regsets): Rename to ...
10341 (xtensa_regsets): ... this, and make static.
10342 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
10343 globals.
10344 (xtensa_arch_setup, xtensa_regs_info): New functions.
10345 (the_low_target): Adjust.
10346 (initialize_low_arch): New function.
10347 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
10348 (nios2_arch_setup): Set the current process'es tdesc.
10349 (target_regsets): Rename to ...
10350 (nios2_regsets): ... this.
10351 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
10352 (nios2_regs_info): New function.
10353 (the_low_target): Adjust.
10354 (initialize_low_arch): New function.
10355 * linux-aarch64-low.c (tdesc_aarch64): Declare.
10356 (aarch64_arch_setup): Set the current process'es tdesc.
10357 (target_regsets): Rename to ...
10358 (aarch64_regsets): ... this.
10359 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
10360 (aarch64_regs_info): New function.
10361 (the_low_target): Adjust.
10362 (initialize_low_arch): New function.
10363 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
10364 globals.
10365 (target_regsets): Rename to ...
10366 (tile_regsets): ... this.
10367 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
10368 (tile_regs_info): New function.
10369 (tile_arch_setup): Set the current process'es tdesc.
10370 (the_low_target): Adjust.
10371 (initialize_low_arch): New function.
10372 * spu-low.c (tdesc_spu): Declare.
10373 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
10374 * win32-arm-low.c (tdesc_arm): Declare.
10375 (arm_arch_setup): New function.
10376 (the_low_target): Install arm_arch_setup instead of
10377 init_registers_arm.
10378 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
10379 (init_windows_x86): Rename to ...
10380 (i386_arch_setup): ... this. Set `win32_tdesc'.
10381 (the_low_target): Adjust.
10382 * win32-low.c (win32_tdesc): New global.
10383 (child_add_thread): Don't create the thread cache here.
10384 (do_initial_child_stuff): Set the new process'es tdesc.
10385 * win32-low.h (struct target_desc): Forward declare.
10386 (win32_tdesc): Declare.
10387 * lynx-i386-low.c (tdesc_i386): Declare global.
10388 (lynx_i386_arch_setup): Set `lynx_tdesc'.
10389 * lynx-low.c (lynx_tdesc): New global.
10390 (lynx_add_process): Set the new process'es tdesc.
10391 * lynx-low.h (struct target_desc): Forward declare.
10392 (lynx_tdesc): Declare global.
10393 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
10394 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
10395 * nto-low.c (nto_tdesc): New global.
10396 (do_attach): Set the new process'es tdesc.
10397 * nto-low.h (struct target_desc): Forward declare.
10398 (nto_tdesc): Declare.
10399 * nto-x86-low.c (tdesc_i386): Declare.
10400 (nto_x86_arch_setup): Set `nto_tdesc'.
10401
10402 2013-06-04 Gary Benson <gbenson@redhat.com>
10403
10404 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
10405 to qSupported response when appropriate.
10406 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
10407 with nonzero-length annex.
10408 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
10409 arguments supplied in annex.
10410
10411 2013-05-31 Doug Evans <dje@google.com>
10412
10413 PR server/15594
10414 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
10415 64 bits in 64-cross-32 environment.
10416
10417 2013-05-28 Pedro Alves <palves@redhat.com>
10418
10419 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
10420 (aarch64-without-fpu.c): Delete rule.
10421 * configure.srv (aarch64*-*-linux*): Remove references to
10422 aarch64-without-fpu.o and aarch64-without-fpu.xml.
10423 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
10424 declaration.
10425
10426 2013-05-24 Pedro Alves <palves@redhat.com>
10427
10428 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
10429 instead of strchr/decode_address. Error if the range isn't split
10430 with a ','. Don't assume there's be a ':' in the action.
10431
10432 2013-05-23 Yao Qi <yao@codesourcery.com>
10433 Pedro Alves <palves@redhat.com>
10434
10435 * linux-low.c (lwp_in_step_range): New function.
10436 (linux_wait_1): If the thread was range stepping and stopped
10437 outside the stepping range, report the stop to GDB. Otherwise,
10438 continue stepping. Add range stepping debug output.
10439 (linux_set_resume_request): Copy the step range from the resume
10440 request to the lwp.
10441 (linux_supports_range_stepping): New.
10442 (linux_target_ops) <supports_range_stepping>: Set to
10443 linux_supports_range_stepping.
10444 * linux-low.h (struct linux_target_ops)
10445 <supports_range_stepping>: New field.
10446 (struct lwp_info) <step_range_start, step_range_end>: New fields.
10447 * linux-x86-low.c (x86_supports_range_stepping): New.
10448 (the_low_target) <supports_range_stepping>: Set to
10449 x86_supports_range_stepping.
10450 * server.c (handle_v_cont): Handle 'r' action.
10451 (handle_v_requests): Append ";r" if the target supports range
10452 stepping.
10453 * target.h (struct thread_resume) <step_range_start,
10454 step_range_end>: New fields.
10455 (struct target_ops) <supports_range_stepping>:
10456 New field.
10457 (target_supports_range_stepping): New macro.
10458
10459 2013-05-17 Joel Brobecker <brobecker@adacore.com>
10460
10461 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
10462 confusion in comment.
10463
10464 2013-05-17 Joel Brobecker <brobecker@adacore.com>
10465
10466 * lynx-low.c (struct process_info_private): New type.
10467 (lynx_add_process): New function.
10468 (lynx_create_inferior, lynx_attach): Replace calls to
10469 add_process by calls to lynx_add_process.
10470 (lynx_resume): If PTID is null, then try using
10471 current_process()->private->last_wait_event_ptid.
10472 Add comments.
10473 (lynx_clear_inferiors): Delete. The contents of that function
10474 has been inlined in lynx_mourn;
10475 (lynx_wait_1): Save the ptid in the process's private data.
10476 (lynx_mourn): Free the process' private data. Replace call
10477 to lynx_clear_inferiors by call to clear_inferiors.
10478
10479 2013-05-17 Yao Qi <yao@codesourcery.com>
10480
10481 * i386-low.c (i386_length_and_rw_bits): Move the comment to
10482 the right place.
10483
10484 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
10485
10486 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
10487 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
10488 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
10489 PT_TEXT_END_ADDR guards. Update comments.
10490 (linux_target_op) <read_offsets>: Conditionally define to
10491 linux_read_offsets if the target is UCLIBC and if it defines
10492 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
10493
10494 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
10495 Andrew Jenner <andrew@codesourcery.com>
10496
10497 * Makefile.in (SFILES): Add linux-nios2-low.c.
10498 (clean): Add action to delete nios2-linux.c.
10499 (nios2-linux.c): New rule.
10500 * configure.srv: Add nios2*-*-linux*.
10501 * linux-nios2-low.c: New.
10502
10503 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
10504
10505 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
10506
10507 2013-04-25 Hui Zhu <hui@codesourcery.com>
10508
10509 PR gdb/15186
10510 * ax.c (ax_printf): Add fflush.
10511
10512 2013-04-22 Tom Tromey <tromey@redhat.com>
10513
10514 * Makefile.in (SFILES): Add filestuff.c.
10515 (OBS): Add filestuff.o.
10516 (filestuff.o): New target.
10517 * config.in, configure: Rebuild.
10518 * configure.ac: Check for fdwalk, pipe2.
10519
10520 2013-04-17 Pedro Alves <palves@redhat.com>
10521
10522 * configure.ac (USE_THREAD_DB): Delete variable.
10523 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
10524 Don't AC_SUBST USE_THREAD_DB.
10525 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
10526 * config.in, configure: Regenerate.
10527
10528 2013-04-16 Pedro Alves <palves@redhat.com>
10529
10530 * linux-low.h (struct lwp_info) <thread_known>: Move under
10531 the USE_THREAD_DB #ifdef.
10532
10533 2013-04-16 Pedro Alves <palves@redhat.com>
10534
10535 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
10536 (linux-low.o): Delete rule.
10537 * linux-low.h: Always include "gdb_thread_db.h" instead of
10538 conditionally including thread_db.h.
10539 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
10540 HAVE_THREAD_DB_H.
10541
10542 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
10543
10544 * Makefile.in (install-only): Fix make install regression.
10545
10546 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
10547
10548 Convert man pages to texinfo, new gdbinit.5 texinfo page.
10549 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
10550 installation.
10551 * gdbserver.1: Remove.
10552
10553 2013-03-22 Pedro Alves <palves@redhat.com>
10554
10555 * linux-low.c (handle_extended_wait): Don't call
10556 linux_enable_event_reporting.
10557
10558 2013-03-15 Tony Theodore <tonyt@logyst.com>
10559
10560 PR build/9098:
10561 * Makefile.in (SHELL): Use @SHELL@.
10562
10563 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
10564
10565 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
10566 compiler warning.
10567
10568 2013-03-13 Joel Brobecker <brobecker@adacore.com>
10569
10570 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
10571 Remove extraneous NULL element.
10572
10573 2013-03-13 Yao Qi <yao@codesourcery.com>
10574
10575 * tracepoint.c (traceframe_read_tsv): Look for the last matched
10576 'V' block in trace frame.
10577
10578 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
10579
10580 * target.h (struct target_ops): Add btrace ops.
10581 (target_supports_btrace): New macro.
10582 (target_enable_btrace): New macro.
10583 (target_disable_btrace): New macro.
10584 (target_read_btrace): New macro.
10585 * gdbthread.h (struct thread_info): Add btrace field.
10586 * server.c: Include btrace-common.h.
10587 (handle_btrace_general_set): New function.
10588 (handle_btrace_enable): New function.
10589 (handle_btrace_disable): New function.
10590 (handle_general_set): Call handle_btrace_general_set.
10591 (handle_qxfer_btrace): New function.
10592 (struct qxfer qxfer_packets[]): Add btrace entry.
10593 * inferiors.c (remove_thread): Disable btrace.
10594 * linux-low: Include linux-btrace.h.
10595 (linux_low_enable_btrace): New function.
10596 (linux_low_read_btrace): New function.
10597 (linux_target_ops): Add btrace ops.
10598 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
10599 Add srv_linux_btrace=yes.
10600 (x86_64-*-linux*): Add linux-btrace.o.
10601 Add srv_linux_btrace=yes.
10602 * configure.ac: Define HAVE_LINUX_BTRACE.
10603 * config.in: Regenerated.
10604 * configure: Regenerated.
10605
10606 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
10607
10608 * server.c (handle_qxfer): Preserve error message if -3 is
10609 returned.
10610 (qxfer): Document the -3 return value.
10611
10612 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
10613
10614 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
10615 (linux_btrace_h): New variable.
10616 (linux-btrace.o): New rule.
10617
10618 2013-03-08 Stan Shebs <stan@codesourcery.com>
10619 Hafiz Abid Qadeer <abidh@codesourcery.com>
10620
10621 * tracepoint.c (trace_buffer_size): New global.
10622 (DEFAULT_TRACE_BUFFER_SIZE): New define.
10623 (init_trace_buffer): Change to one-argument function. Allocate
10624 trace buffer memory.
10625 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
10626 handle QTBuffer:size packet.
10627 (cmd_bigqtbuffer_size): New function.
10628 (initialize_tracepoint): Call init_trace_buffer with
10629 DEFAULT_TRACE_BUFFER_SIZE.
10630 * server.c (handle_query): Add QTBuffer:size in the
10631 supported packets.
10632
10633 2013-03-07 Yao Qi <yao@codesourcery.com>
10634
10635 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
10636 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
10637 of -1.
10638 (cmd_qtsp): Adjust condition. Do post increment.
10639 Set cur_action and cur_step_action back to 0.
10640
10641 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
10642
10643 PR server/15236
10644 * linux-low.c (linux_write_memory): Return early success if LEN is
10645 zero.
10646
10647 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
10648
10649 * configure.srv: Add x86_64-*-cygwin* as target.
10650
10651 2013-02-28 Tom Tromey <tromey@redhat.com>
10652
10653 * configure.ac: Invoke AC_SYS_LARGEFILE.
10654 * configure, config.in: Rebuild.
10655
10656 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
10657
10658 * win32-low.c: Throughout, fix format strings and casts of
10659 printf-like functions to avoid type related warnings on all
10660 platforms.
10661 (get_child_debug_event): Print dwDebugEventCode as hex since
10662 that's how it's usually documented.
10663
10664 2013-02-28 Yao Qi <yao@codesourcery.com>
10665
10666 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
10667 pulongest.
10668
10669 2013-02-27 Jiong Wang <jiwang@tilera.com>
10670
10671 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
10672 (reg-tilegx32.c): New rule.
10673 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
10674 * linux-tile-low.c (tile_arch_setup): New function. Invoke
10675 different register info initializer according to elf class.
10676 (init_registers_tilgx32): New function. The tilegx32 register info
10677 initializer.
10678 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
10679 (tile_store_gregset): Likewise.
10680
10681 2013-02-27 Yao Qi <yao@codesourcery.com>
10682
10683 * server.c (process_point_options): Print debug message when
10684 debug_threads is true.
10685
10686 2013-02-26 Yao Qi <yao@codesourcery.com>
10687
10688 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
10689
10690 2013-02-19 Pedro Alves <palves@redhat.com>
10691 Kai Tietz <ktietz@redhat.com>
10692
10693 PR gdb/15161
10694
10695 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
10696 instead of strtoul to extract address from packet.
10697 (process_serial_event) <'z'>: Likewise.
10698
10699 2013-02-18 Yao Qi <yao@codesourcery.com>
10700
10701 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
10702
10703 2013-02-14 Pedro Alves <palves@redhat.com>
10704
10705 Plug memory leak.
10706
10707 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
10708 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
10709
10710 2013-02-14 Pedro Alves <palves@redhat.com>
10711
10712 * tracepoint.c (cmd_qtdpsrc): Use savestring.
10713
10714 2013-02-14 Pedro Alves <palves@redhat.com>
10715
10716 * tracepoint.c (save_string): Delete.
10717 (add_tracepoint_action): Use savestring instead of save_string.
10718
10719 2013-02-12 Pedro Alves <palves@redhat.com>
10720
10721 * linux-xtensa-low.c: Ditto.
10722 * xtensa-xtregs.c: Ditto.
10723
10724 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
10725
10726 * thread-db.c (thread_db_get_tls_address): NULL pointer check
10727 thread_db.
10728
10729 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
10730
10731 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
10732 aarch64_num_wp_regs and aarch64_num_bp_regs to
10733 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
10734
10735 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
10736
10737 * linux-aarch64-low.c (ps_get_thread_area): Replace
10738 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
10739
10740 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
10741 Marcus Shawcroft <marcus.shawcroft@arm.com>
10742 Nigel Stephens <nigel.stephens@arm.com>
10743 Yufeng Zhang <yufeng.zhang@arm.com>
10744
10745 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
10746 (aarch64.c, aarch64-without-fpu.c): New targets.
10747 * configure.srv (aarch64*-*-linux*): New.
10748 * linux-aarch64-low.c: New file.
10749
10750 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
10751
10752 * linux-low.c (handle_extended_wait, linux_create_inferior)
10753 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
10754 (dequeue_one_deferred_signal, linux_resume_one_thread)
10755 (fetch_register, linux_write_memory, linux_enable_event_reporting)
10756 (linux_tracefork_grandchild, linux_test_for_tracefork)
10757 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
10758 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
10759 where the argument is 0.
10760
10761 2013-01-25 Yao Qi <yao@codesourcery.com>
10762
10763 * event-loop.c: Include "queue.h".
10764 (gdb_event_p): New typedef.
10765 (struct gdb_event) <next_event>: Remove.
10766 (event_queue): Change to QUEUE(gdb_event_p).
10767 (async_queue_event): Remove.
10768 (gdb_event_xfree): New.
10769 (initialize_event_loop): New.
10770 (process_event): Use API from QUEUE.
10771 (wait_for_event): Likewise.
10772 * server.c (main): Call initialize_event_loop.
10773 * server.h (initialize_event_loop): Declare.
10774
10775 2013-01-18 Yao Qi <yao@codesourcery.com>
10776
10777 * ax.h (struct eval_agent_expr_context): New.
10778 (gdb_eval_agent_expr): Update declaration.
10779 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
10780 TFRAME. Add new argument CTX.
10781 * server.h (struct eval_agent_expr_context): Declare.
10782 (agent_mem_read, agent_tsv_read): Update declaration.
10783 (agent_mem_read_string): Likewise.
10784 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
10785 (add_traceframe_block): Add new argument TPOINT.
10786 Increase TPOINT->traceframe_usage.
10787 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
10788 eval_tracepoint_agent_expr.
10789 (condition_true_at_tracepoint): Likewise.
10790 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
10791 (agent_mem_read_string, agent_tsv_read): Likewise.
10792
10793 2013-01-16 Yao Qi <yao@codesourcery.com>
10794
10795 * linux-low.c (linux_resume_one_lwp): Don't check
10796 'lwp->bp_reinsert != 0'.
10797
10798 2013-01-07 Joel Brobecker <brobecker@adacore.com>
10799 Pedro Alves <palves@redhat.com>
10800
10801 * lynx-low.c (ptrace_request_to_str): Define a temporary
10802 macro and use it to simplify this function's implementation.
10803
10804 2013-01-07 Joel Brobecker <brobecker@adacore.com>
10805
10806 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
10807 sets errno.
10808
10809 2013-01-07 Joel Brobecker <brobecker@adacore.com>
10810
10811 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
10812
10813 2013-01-07 Joel Brobecker <brobecker@adacore.com>
10814
10815 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
10816
10817 2013-01-07 Joel Brobecker <brobecker@adacore.com>
10818
10819 * lynx-low.c (lynx_resume): Use the resume_info parameter
10820 to determine the ptid for the lynx_ptrace call, unless
10821 it is equal to minus_one_ptid, in which case we use the
10822 ptid of the current_inferior.
10823 (lynx_wait_1): After having received a thread create/exit
10824 event, resume the inferior's execution using the signaling
10825 thread's ptid, rather than the old ptid.
10826
10827 2013-01-07 Joel Brobecker <brobecker@adacore.com>
10828
10829 * lynx-low.c (lynx_resume): Delete variable ret.
10830
10831 2013-01-01 Joel Brobecker <brobecker@adacore.com>
10832
10833 * gdbreplay.c (gdbreplay_version): Update copyright year.
10834 * server.c (gdbserver_version): Likewise.
10835
10836 2012-12-17 Joel Brobecker <brobecker@adacore.com>
10837
10838 * lynx-low.c (lynx_wait_1): Add debug trace before adding
10839 new thread.
10840
10841 2012-12-17 Joel Brobecker <brobecker@adacore.com>
10842
10843 * lynx-low.c (ptrace_request_to_str): Add handling for
10844 PTRACE_GETTRACESIG.
10845
10846 2012-12-17 Joel Brobecker <brobecker@adacore.com>
10847
10848 * lynx-low.c (lynx_attach): Delete variable new_process.
10849
10850 2012-12-17 Joel Brobecker <brobecker@adacore.com>
10851
10852 * lynx-low.c (lynx_create_inferior): Delete variable
10853 new_process.
10854
10855 2012-12-17 Joel Brobecker <brobecker@adacore.com>
10856
10857 * lynx-low.c (ptrace_request_to_str): Do not handle
10858 PTRACE_GETTHREADLIST if this macro does not exist.
10859
10860 2012-12-15 Yao Qi <yao@codesourcery.com>
10861
10862 * Makefile.in (OBS): Add notif.o.
10863 * notif.c, notif.h: New.
10864 * server.c: Include "notif.h".
10865 (struct vstop_notif) <next>: Remove.
10866 <base>: New field.
10867 (queue_stop_reply): Update.
10868 (push_event, send_next_stop_reply): Remove.
10869 (discard_queued_stop_replies): Update.
10870 (notif_stop): New variable.
10871 (handle_v_stopped): Remove.
10872 (handle_v_requests): Don't call handle_v_stopped. Call
10873 handle_ack_notif instead.
10874 (queue_stop_reply_callback): Call notif_event_enque instead
10875 of queue_stop_reply.
10876 (handle_status): Don't call send_next_stop_reply, call
10877 notif_write_event instead.
10878 (kill_inferior_callback): Likewise.
10879 (detach_or_kill_inferior_callback): Likewise.
10880 (main): Call initialize_notif.
10881 (process_serial_event): Call QUEUE_is_empty.
10882 (handle_target_event): Call notif_push instead of push event.
10883 * server.h (push_event): Remove declaration.
10884
10885 2012-12-10 Tom Tromey <tromey@redhat.com>
10886
10887 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
10888 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
10889 macros.
10890 (.c.o): Rewrite.
10891 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
10892 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
10893 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
10894 (amd64-linux-ipa.o, ax.o): Rewrite.
10895 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
10896 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
10897 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
10898 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
10899 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
10900 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
10901 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
10902 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
10903 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
10904 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
10905 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
10906 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
10907 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
10908 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
10909 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
10910 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
10911 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
10912 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
10913 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
10914 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
10915 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
10916 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
10917 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
10918 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
10919 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
10920 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
10921 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
10922 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
10923 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
10924 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
10925 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
10926 (reg-tilegx.o): Remove.
10927 (all_object_files): New macro.
10928 Include .deps files.
10929 * aclocal.m4, configure: Rebuild.
10930 * acinclude.m4: Include depstand.m4, lead-dot.m4.
10931 * configure.ac: Invoke ZW_CREATE_DEPDIR,
10932 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
10933
10934 2012-12-05 Tom Tromey <tromey@redhat.com>
10935
10936 PR gdb/14917:
10937 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
10938
10939 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
10940
10941 * configure.ac: Check for linux/perf_event.h.
10942 * config.in: Regenerated.
10943 * configure: Regenerated.
10944
10945 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
10946
10947 * hostio.c (handle_readlink): Decrease buffer size
10948 parameter passed to readlink by one byte.
10949
10950 2012-11-26 Yao Qi <yao@codesourcery.com>
10951
10952 * configure.ac (build_warnings): Append '-Wempty-body'.
10953 * configure: Regenerated.
10954 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
10955 body.
10956
10957 2012-11-15 Pierre Muller <muller@sourceware.org>
10958
10959 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
10960 * config.in: Regenerate.
10961 * configure: Regenerate.
10962 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
10963 Use "gdb_wait.h" header instead of <sys/wait.h> header.
10964 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
10965 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
10966 header.
10967 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
10968 instead of <sys/wait.h> header.
10969 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
10970
10971 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
10972
10973 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
10974 (various make rules): Remove -DGDBSERVER
10975
10976 2012-11-09 Yao Qi <yao@codesourcery.com>
10977
10978 * spu-low.c (current_ptid): Move it to ..
10979 * gdbthread.h: ... here. New.
10980 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
10981 * server.c (myresume, process_serial_event): Likewise.
10982 * thread-db.c (thread_db_find_new_threads): Likewise.
10983 * tracepoint.c (run_inferior_command): Likewise.
10984
10985 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
10986
10987 * server.c (handle_search_memory_1): Include access length in
10988 warning message.
10989
10990 2012-09-05 Michael Brandt <michael.brandt@axis.com>
10991
10992 * linux-crisv32-low.c: Fix compile errors.
10993
10994 2012-09-04 Yao Qi <yao@codesourcery.com>
10995
10996 * tracepoint.c (cmd_qtsv): Adjust debug message.
10997 Don't check CUR_TPOINT.
10998
10999 2012-08-28 Yao Qi <yao@codesourcery.com>
11000
11001 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
11002 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
11003 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
11004 Remove declarations of xmalloc, xreallloc, xstrdup and
11005 freeargv.
11006 * Makefile.in (libiberty_h): New.
11007 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
11008 (linux-bfin-low.o): Append dependency 'libiberty.h'.
11009
11010 2012-08-23 Yao Qi <yao@codesourcery.com>
11011
11012 * server.h: Remove declaration of 'xsnprintf'.
11013
11014 2012-08-22 Keith Seitz <keiths@redhat.com>
11015
11016 * server.h: Include build-gnulib-gbserver/config.h.
11017 * gdbreplay.c: Likewise.
11018
11019 2012-08-08 Doug Evans <dje@google.com>
11020
11021 * Makefile.in (SFILES): Add gdb_vecs.c.
11022 (OBS): Add gdb_vecs.o.
11023 (gdb_vecs_h, host_defs_h): New variables.
11024 (thread-db.o): Add $(gdb_vecs_h) dependency.
11025 (gdb_vecs.o): New rule.
11026 * thread-db.c: #include "gdb_vecs.h".
11027 (thread_db_load_search): Use a vector to iterate over path elements.
11028 Handle text appearing after "$pdir".
11029
11030 * configure.ac: Add check for strstr.
11031 * config.in: Regenerate.
11032 * configure: Regenerate.
11033
11034 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
11035
11036 * hostio.c (handle_pread): If pread fails, fall back to attempting
11037 lseek/read.
11038 (handle_pwrite): Likewise for pwrite.
11039
11040 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
11041
11042 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
11043 between unsupported TYPE and unimplementable ADDR/LEN combination.
11044 (arm_insert_point): Act on new return value.
11045
11046 2012-07-31 Pedro Alves <palves@redhat.com>
11047
11048 * server.c (process_point_options): Only skip tokens if we find
11049 one that is unrecognized. Don't treat 'X' specially while
11050 skipping unrecognized tokens.
11051
11052 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
11053
11054 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
11055 to 4-byte-align HW breakpoint addresses for Thumb.
11056
11057 2012-07-27 Yao Qi <yao@codesourcery.com>
11058
11059 PR remote/14161.
11060
11061 * server.h: Declare gdb_agent_about_to_close.
11062 * target.c (kill_inferior): Include "agent.h".
11063 New. Send command 'kill'.
11064 * target.h (kill_inferior): Removed macro.
11065 * tracepoint.c (gdb_agent_about_to_close): New.
11066 (gdb_agent_helper_thread): Handle command 'close'.
11067 Wait endlessly until the inferior stops.
11068 Install gdb_agent_remove_socket to atexit hook.
11069 (agent_socket_name): New static variable.
11070 (gdb_agent_socket_init): Replace local variable 'name' with
11071 'agent_socket_name'.
11072 (gdb_agent_remove_socket): New.
11073
11074 2012-07-27 Yao Qi <yao@codesourcery.com>
11075
11076 * server.c (process_point_options): Stop at 'X' when parsing.
11077
11078 2012-07-19 Michael Eager <eager@eagercon.com>
11079
11080 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
11081 to hw_execute.
11082 * linux-x86-low.c (x86_insert_point, x86_remove_point):
11083 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
11084 hardware breakpoint.
11085
11086 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
11087
11088 * gdbserver/linux-low.c (initialize_low): Call
11089 linux_ptrace_init_warnings.
11090
11091 2012-07-02 Doug Evans <dje@google.com>
11092
11093 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
11094 pointer to int.
11095
11096 2012-07-02 Stan Shebs <stan@codesourcery.com>
11097
11098 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
11099 (ax.o): Add it to build rule.
11100 (ax-ipa.o): Ditto.
11101 (OBS): Add format.o.
11102 (IPA_OBS): Add format.o.
11103 * server.c (handle_query): Claim support for breakpoint commands.
11104 (process_point_options): Add command case.
11105 (process_serial_event): Leave running if there are printfs in
11106 effect.
11107 * mem-break.h (any_persistent_commands): Declare.
11108 (add_breakpoint_commands): Declare.
11109 (gdb_no_commands_at_breakpoint): Declare.
11110 (run_breakpoint_commands): Declare.
11111 * mem-break.c (struct point_command_list): New struct.
11112 (struct breakpoint): New field command_list.
11113 (any_persistent_commands): New function.
11114 (add_commands_to_breakpoint): New function.
11115 (add_breakpoint_commands): New function.
11116 (gdb_no_commands_at_breakpoint): New function.
11117 (run_breakpoint_commands): New function.
11118 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
11119 locally.
11120 * ax.c: Include format.h.
11121 (ax_printf): New function.
11122 (gdb_eval_agent_expr): Add printf opcode.
11123
11124 2012-06-13 Yao Qi <yao@codesourcery.com>
11125
11126 * server.c (start_inferior): Remove duplicated writes to fields
11127 'last_resume_kind' and 'last_status' of 'current_inferior'.
11128
11129 2012-06-12 Yao Qi <yao@codesourcery.com>
11130 Pedro Alves <palves@redhat.com>
11131
11132 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
11133 comment.
11134 * server.c (handle_v_cont): Extend comment.
11135
11136 2012-06-11 Yao Qi <yao@codesourcery.com>
11137
11138 * linux-low.c (linux_attach): Add 'static'.
11139
11140 2012-06-06 Yao Qi <yao@codesourcery.com>
11141
11142 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
11143
11144 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
11145
11146 Fix gcc -flto compilation warning.
11147 * server.c (main): Make variable multi_mode and attach volatile.
11148
11149 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
11150
11151 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
11152 if the platform doesn't know about it.
11153
11154 2012-05-30 Jeff Kenton <jkenton@tilera.com>
11155
11156 * Makefile.in (SFILES): Add linux-tile-low.c.
11157 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
11158 * configure.srv: Handle tilegx-*-linux*.
11159 * linux-tile-low.c: New file.
11160
11161 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11162
11163 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
11164
11165 2012-05-24 Pedro Alves <palves@redhat.com>
11166
11167 PR gdb/7205
11168
11169 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
11170
11171 2012-05-24 Pedro Alves <palves@redhat.com>
11172
11173 PR gdb/7205
11174
11175 Replace target_signal with gdb_signal throughout.
11176
11177 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
11178
11179 * linux-low.c (linux_store_registers): Avoid the copying sequence
11180 when no data has been retrieved by ptrace.
11181
11182 2012-05-22 Will Deacon <will.deacon@arm.com>
11183
11184 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
11185 Include asm/ptrace.h.
11186 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
11187 already defined.
11188
11189 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
11190
11191 * linux-low.c (linux_store_registers): Don't re-retrieve data
11192 with ptrace that has already been obtained from /proc. Always
11193 copy any data retrieved with ptrace to the buffer supplied.
11194
11195 2012-05-11 Yao Qi <yao@codesourcery.com>
11196 Pedro Alves <palves@redhat.com>
11197
11198 * linux-low.c (enum stopping_threads_kind): New.
11199 (stopping_threads): Change type to `enum stopping_threads_kind'.
11200 (handle_extended_wait): If stopping and suspending threads, leave
11201 the new_lwp suspended too.
11202 (linux_wait_for_event): Adjust.
11203 (stop_all_lwps): Set `stopping_threads' to
11204 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
11205 whether we're suspending threads or just stopping them. Assert no
11206 recursion happens.
11207
11208 2012-04-29 Yao Qi <yao@codesourcery.com>
11209
11210 * server.h: Move some code to ...
11211 * gdbthread.h: ... here. New.
11212 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
11213 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
11214 (nto-low.o, win32-low.o): Likewise.
11215 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
11216 * regcache.c, remote-utils.c, server.c: Likewise.
11217 * target.c, tracepoint.c, win32-low.c: Likewise.
11218
11219 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
11220
11221 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
11222 (PTRACE_ARG4_TYPE): Likewise.
11223 (PTRACE_XFER_TYPE): Likewise.
11224 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
11225 ptrace to PTRACE_ARG3_TYPE.
11226 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
11227 (PTRACE_ARG4_TYPE): Likewise.
11228 (PTRACE_XFER_TYPE): Likewise.
11229 (linux_detach_one_lwp): Cast fourth argument of
11230 ptrace to long then PTRACE_ARG4_TYPE.
11231 (regsets_fetch_inferior_registers): Cast third argument of
11232 ptrace to long then PTRACE_ARG3_TYPE.
11233 (regsets_store_inferior_registers): Likewise.
11234
11235 2012-04-20 Pedro Alves <palves@redhat.com>
11236
11237 * configure: Regenerate.
11238
11239 2012-04-19 Pedro Alves <palves@redhat.com>
11240
11241 * Makefile.in (GNULIB_BUILDDIR): New.
11242 (LIBGNU, INCGNU, GNULIB_H): Adjust.
11243 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
11244 (all, install-only, uninstall, clean-info, all-lib, clean): No
11245 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
11246 (maintainer-clean realclean distclean): Use subdir_do.
11247 (subdir_do): New.
11248 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
11249 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
11250 * acinclude.m4: Include acx_configure_dir.m4.
11251 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
11252 calls. Call AC_PROG_RANLIB. Configure gnulib using
11253 ACX_CONFIGURE_DIR.
11254 (GNULIB): New.
11255 (GNULIB_STDINT_H): Adjust.
11256 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
11257 * gdbreplay.c: Include build-gnulib/config.h.
11258 * server.h: Likewise.
11259 * aclocal.m4: Regenerate.
11260 * config.in: Regenerate.
11261 * configure: Regenerate.
11262
11263 2012-04-19 Pedro Alves <palves@redhat.com>
11264
11265 * Makefile.in (LIBGNU, INCGNU): Adjust.
11266 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
11267 (all, install-only, uninstall, clean-info, all-lib, clean)
11268 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
11269 * configure.ac: Adjust AC_OUTPUT output.
11270 * aclocal.m4: Regenerate.
11271 * configure: Regenerate.
11272
11273 2012-04-19 Pedro Alves <palves@redhat.com>
11274
11275 * Makefile.in (generated_files): New.
11276 (server_h): Remove the explicit dependency on config.h, and depend
11277 on $generated_files.
11278
11279 2012-04-19 Pedro Alves <palves@redhat.com>
11280
11281 * Makefile.in (INCGNU): Add -Ignulib.
11282
11283 2012-04-19 Pedro Alves <palves@redhat.com>
11284
11285 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
11286 (INCGNU): ... this, and spell out -I here.
11287 (GNULIB_LIB): Rename to ...
11288 (LIBGNU): ... this.
11289 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
11290
11291 2012-04-19 Pedro Alves <palves@redhat.com>
11292
11293 * config.in: Regenerate.
11294
11295 2012-04-19 Pedro Alves <palves@redhat.com>
11296
11297 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
11298 * server.h (memmem): Remove declaration.
11299 * config.in: Regenerate.
11300 * configure: Regenerate.
11301
11302 2012-04-19 Yao Qi <yao@codesourcery.com>
11303
11304 * Makefile.in (SFILES): Add common/vec.c.
11305 (OBS): Add vec.o.
11306 (vec.o): New rule.
11307
11308 2012-04-19 Yao Qi <yao@codesourcery.com>
11309
11310 * remote-utils.c (prepare_resume_reply): Replace with macro
11311 target_core_of_thread.
11312 * server.c (handle_qxfer_threads_proper): Likewise.
11313 * target.h (traget_core_of_thread): New macro.
11314
11315 2012-04-18 Pedro Alves <palves@redhat.com>
11316
11317 * aclocal.m4: Regenerate.
11318 * configure: Regenerate.
11319
11320 2012-04-16 Yao Qi <yao@codesourcery.com>
11321
11322 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
11323 duplicated on address.
11324
11325 2012-04-16 Yao Qi <yao@codesourcery.com>
11326
11327 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
11328 (struct tracepoint_action_ops) <send>: New field.
11329 (m_tracepoint_action_send, r_tracepoint_action_send): New.
11330 (agent_expr_send, x_tracepoint_action_send): New.
11331 (l_tracepoint_action_send): New.
11332 (cmd_qtdp): Download and install tracepoint
11333 according to `use_agent'.
11334 (run_inferior_command): Add one more parameter `len'.
11335 Update callers.
11336 (tracepoint_send_agent): New.
11337 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
11338
11339 2012-04-16 Yao Qi <yao@codesourcery.com>
11340
11341 * tracepoint.c (download_tracepoints): Moved to ...
11342 (cmd_qtstart): ... here.
11343
11344 2012-04-14 Yao Qi <yao@codesourcery.com>
11345
11346 * tracepoint.c: Include inttypes.h.
11347 (struct collect_memory_action): Use sized types.
11348 (struct tracepoint): Likewise.
11349 (cmd_qtdp, stop_tracing): Update print specifiers.
11350 (cmd_qtp, response_tracepoint): Likewise.
11351 (collect_data_at_tracepoint): Likewise.
11352 (collect_data_at_step): Likewise.
11353
11354 2012-04-14 Yao Qi <yao@codesourcery.com>
11355
11356 Import gnulib module inttypes.
11357 * aclocal.m4, config.in, configure: Regenerated.
11358
11359 2012-04-14 Yao Qi <yao@codesourcery.com>
11360
11361 * Makefile.in (maintainer-clean, realclean, distclean): Remove
11362 Makefile and config.status at last.
11363
11364 2012-04-13 Yao Qi <yao@codesourcery.com>
11365
11366 * tracepoint.c: Include stdint.h unconditionally.
11367
11368 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
11369
11370 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
11371 on BFD_HAVE_SYS_PROCFS_TYPE.
11372 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
11373 * configure: Regenerate.
11374 * config.in: Likewise.
11375
11376 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
11377
11378 * Makefile.in (clean): Also remove x32.c x32-linux.c
11379 x32-avx.c x32-avx-linux.c.
11380 (x32.o): New target.
11381 (x32.c): Likewise.
11382 (x32-linux.o): Likewise.
11383 (x32-linux.c): Likewise.
11384 (x32-avx.o): Likewise.
11385 (x32-avx.c): Likewise.
11386 (x32-avx-linux.o): Likewise.
11387 (x32-avx-linux.c): Likewise.
11388
11389 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
11390 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
11391 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
11392 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
11393 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
11394 i386/x32-avx-linux.xml.
11395
11396 * linux-x86-low.c (init_registers_x32_linux): New prototype.
11397 (init_registers_x32_avx_linux): Likwise.
11398 (x86_linux_update_xmltarget): Call init_registers_x32_linux
11399 or init_registers_x32_avx_linux if linux_is_elf64 is false.
11400
11401 2012-04-13 Pedro Alves <palves@redhat.com>
11402
11403 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
11404 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
11405 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
11406 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
11407 the sub-make.
11408
11409 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
11410
11411 * linux-x86-low.c (compat_x32_clock_t): New.
11412 (compat_x32_siginfo_t): Likewise.
11413 (compat_x32_siginfo_from_siginfo): Likewise.
11414 (siginfo_from_compat_x32_siginfo): Likewise.
11415 (linux_is_elf64): Likewise.
11416 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
11417 and siginfo_from_compat_x32_siginfo for x32.
11418 (x86_arch_setup): Set linux_is_elf64.
11419
11420 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
11421
11422 PR gdb/13969
11423 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
11424 e_machine field.
11425 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
11426 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
11427 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
11428 compatible with process.
11429
11430 2012-04-12 Yao Qi <yao@codesourcery.com>
11431
11432 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
11433 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
11434 (install-only, install-info, clean): Handle sub dir gnulib.
11435 (all-lib, am--refresh): New targets.
11436 (memmem.o): Remove target.
11437 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
11438 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
11439 (AC_REPLACE_FUNCS): Remove memmem.
11440 Invoke gl_INIT and AM_INIT_AUTOMAKE.
11441 (AC_OUTPUT): Generate Makefile in gnulib/.
11442 * aclocal.m4, config.in, configure: Regenerated.
11443
11444 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
11445
11446 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
11447
11448 2012-04-05 Pedro Alves <palves@redhat.com>
11449
11450 -Werror=strict-aliasing
11451
11452 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
11453 pointer.
11454
11455 2012-04-04 Pedro Alves <palves@redhat.com>
11456
11457 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
11458 (sparc_store_gregset_from_stack, sparc_store_gregset)
11459 (sparc_breakpoint_at): Fix formatting.
11460
11461 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
11462
11463 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
11464 are available.
11465 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
11466 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
11467 * config.in: Regenerate.
11468 * configure: Likewise.
11469
11470 2012-03-29 Pedro Alves <palves@redhat.com>
11471
11472 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
11473 Correct ptrace arguments.
11474
11475 2012-03-28 Pedro Alves <palves@redhat.com>
11476
11477 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
11478 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
11479 (IA64_FR1_REGNUM): New defines.
11480 (ia64_fetch_register): New.
11481 (the_low_target): Install it.
11482 * linux-low.h (struct linux_target_ops) <fetch_register>: New
11483 field.
11484 * linux-low.c (linux_fetch_registers): Try the
11485 the_low_target.fetch_register hook first.
11486
11487 * linux-arm-low.c (the_low_target): Adjust.
11488 * linux-bfin-low.c (the_low_target): Adjust.
11489 * linux-cris-low.c (the_low_target): Adjust.
11490 * linux-crisv32-low.c (the_low_target): Adjust.
11491 * linux-m32r-low.c (the_low_target): Adjust.
11492 * linux-m68k-low.c (the_low_target): Adjust.
11493 * linux-mips-low.c (the_low_target): Adjust.
11494 * linux-ppc-low.c (the_low_target): Adjust.
11495 * linux-s390-low.c (the_low_target): Adjust.
11496 * linux-sh-low.c (the_low_target): Adjust.
11497 * linux-sparc-low.c (the_low_target): Adjust.
11498 * linux-tic6x-low.c (the_low_target): Adjust.
11499 * linux-x86-low.c (the_low_target): Adjust.
11500 * linux-xtensa-low.c (the_low_target): Adjust.
11501
11502 2012-03-26 Pedro Alves <palves@redhat.com>
11503
11504 * server.c (handle_qxfer_libraries): Don't bail early if
11505 the_target->qxfer_libraries_svr4 is not NULL.
11506
11507 2012-03-26 Pedro Alves <palves@redhat.com>
11508
11509 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
11510
11511 2012-03-23 Pedro Alves <palves@redhat.com>
11512
11513 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
11514 "library-list-svr4" element's start tag when the the DSO list is
11515 empty.
11516
11517 2012-03-23 Pedro Alves <palves@redhat.com>
11518
11519 * linux-low.c (read_one_ptr): Read the inferior's pointer through
11520 a variable whose type size is the same as the inferior's pointer
11521 size.
11522
11523 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
11524
11525 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
11526 struct siginfo.
11527 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
11528 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
11529 * linux-low.h: Include <signal.h>.
11530 (struct siginfo): Remove forward declaration.
11531 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
11532 struct siginfo.
11533
11534 2012-03-21 Mike Frysinger <vapier@gentoo.org>
11535
11536 * .gitignore: Ignore more files.
11537
11538 2012-03-19 Pedro Alves <palves@redhat.com>
11539 Jan Kratochvil <jan.kratochvil@redhat.com>
11540
11541 * server.c (cont_thread, general_thread): Add describing comments.
11542 (start_inferior): Clear `cont_thread'.
11543 (handle_v_cont): Don't set `cont_thread' if resuming all threads
11544 of a process.
11545
11546 2012-03-15 Yao Qi <yao@codesourcery.com>
11547
11548 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
11549 handling to ...
11550 (cmd_qtdp): ... here.
11551
11552 2012-03-15 Yao Qi <yao@codesourcery.com>
11553
11554 * tracepoint.c (struct tracepoint_action_ops): New.
11555 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
11556 (m_tracepoint_action_download): New.
11557 (r_tracepoint_action_download): New.
11558 (x_tracepoint_action_download): New.
11559 (l_tracepoint_action_download): New.
11560 (add_tracepoint_action): Install `action->ops' according type.
11561 (download_tracepoint_1): Move code `download' function pointer
11562 of various tracepoint_action_ops.
11563
11564 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
11565
11566 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
11567 linux_ptrace_attach_warnings.
11568
11569 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
11570
11571 * Makefile.in (linux-ptrace.o): New.
11572 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
11573 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
11574 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
11575 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
11576 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
11577 of these targets.
11578 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
11579
11580 2012-03-08 Yao Qi <yao@codesourcery.com>
11581 Pedro Alves <palves@redhat.com>
11582
11583 Fix PR server/13392.
11584 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
11585 offset of JMP insn.
11586 * tracepoint.c (remove_tracepoint): New.
11587 (cmd_qtdp): Call remove_tracepoint when failed to install.
11588
11589 2012-03-07 Pedro Alves <palves@redhat.com>
11590
11591 * linux-low.c (get_detach_signal): New.
11592 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
11593 Pass on pending signals to PTRACE_DETACH. Check the result of the
11594 ptrace call.
11595 * server.c (program_signals, program_signals_p): New.
11596 (handle_general_set): Handle QProgramSignals.
11597 * server.h (program_signals, program_signals_p): Declare.
11598
11599 2012-03-05 Pedro Alves <palves@redhat.com>
11600 Jan Kratochvil <jan.kratochvil@redhat.com>
11601
11602 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
11603 New comment why.
11604
11605 2012-03-03 Yao Qi <yao@codesourcery.com>
11606
11607 * tracepoint.c (tracepoint_look_up_symbols): Update call to
11608 agent_look_up_symbols.
11609
11610 2012-03-03 Yao Qi <yao@codesourcery.com>
11611
11612 * Makefile.in (linux-low.o): Keep dependence on agent.h.
11613 (linux-x86-low.o): Likewise.
11614 * server.h: Remove in_process_agent_loaded.
11615 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
11616 common/agent.c.
11617 Update callers.
11618
11619 2012-03-03 Yao Qi <yao@codesourcery.com>
11620
11621 * tracepoint.c (gdb_agent_capability): New global.
11622 (in_process_agent_loaded_ust): Renamed to
11623 `in_process_agent_supports_ust'.
11624 Update callers.
11625 (in_process_agent_supports_ust): Call agent_capability_check.
11626 (clear_installed_tracepoints): Assert that agent supports
11627 agent.
11628
11629 2012-03-03 Yao Qi <yao@codesourcery.com>
11630
11631 * linux-low.c (linux_supports_agent): New.
11632 (linux_target_ops): Initialize field `supports_agent' with
11633 linux_supports_agent.
11634 * target.h (struct target_ops) <supports_agent>: New.
11635 (target_supports_agent): New macro.
11636 * server.c (handle_general_set): Handle packet 'QAgent'.
11637 (handle_query): Send `QAgent+'.
11638 * Makefile.in (server.o): Depends on agent.h.
11639
11640 2012-03-03 Yao Qi <yao@codesourcery.com>
11641
11642 * Makefile.in (OBS): Add agent.o.
11643 Add new rule for agent.o.
11644 Track dependence of tracepoint.c on agent.h.
11645 * tracepoint.c (run_inferior_command_1):
11646 (run_inferior_command): Call agent_run_command.
11647 (gdb_ust_connect_sync_socket): Deleted. Move it to
11648 common/agent.c.
11649 (resume_thread, stop_thread): Likewise.
11650 (gdb_ust_socket_init): Renamed to ...
11651 (gdb_agent_socket_init): ... New.
11652 (gdb_ust_thread): Renamed to ...
11653 (gdb_agent_helper_thread): ... New.
11654 (gdb_ust_init): Move some code to ...
11655 (gdb_agent_init): ... here. New.
11656 [HAVE_UST]: Call gdb_ust_init.
11657 (initialize_tracepoint_ftlib): Call gdb_agent_init.
11658 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
11659 * config.in, configure: Regenerated.
11660
11661 2012-03-02 Pedro Alves <palves@redhat.com>
11662
11663 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
11664 * linux-low.c (struct simple_pid_list): New.
11665 (stopped_pids): New a struct simple_pid_list pointer.
11666 (add_to_pid_list, pull_pid_from_list): New.
11667 (handle_extended_wait): Don't assume the first signal new children
11668 report is SIGSTOP. Adjust call to pull_pid_from_list.
11669 (linux_wait_for_lwp): Adjust.
11670
11671 2012-03-02 Yao Qi <yao@codesourcery.com>
11672
11673 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
11674 debug log.
11675
11676 2012-03-02 Yao Qi <yao@codesourcery.com>
11677
11678 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
11679 `stop_pc' and `tpoint'. Update caller.
11680
11681 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
11682
11683 * linux-low.h (linux_target_ops): Add regset_bitmap member.
11684 * linux-low.c (use_linux_regsets): New macro.
11685 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
11686 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
11687 (linux_register_in_regsets): New function.
11688 (usr_fetch_inferior_registers): Skip registers covered by
11689 regsets.
11690 (usr_store_inferior_registers): Likewise.
11691 (usr_fetch_inferior_registers): New macro.
11692 (usr_store_inferior_registers): Likewise.
11693 (linux_fetch_registers): Handle mixed regset/non-regset targets.
11694 (linux_store_registers): Likewise.
11695 * linux-mips-low.c (init_registers_mips_dsp_linux): New
11696 prototype.
11697 (init_registers_mips64_dsp_linux): Likewise.
11698 (init_registers_mips_linux): New macro.
11699 (init_registers_mips_dsp_linux): Likewise.
11700 (mips_dsp_num_regs): Likewise.
11701 (DSP_BASE, DSP_CONTROL): New fallback macros.
11702 (mips_base_regs): New macro.
11703 (mips_regmap): Use it. Fix the size.
11704 (mips_dsp_regmap): New variable.
11705 (mips_dsp_regset_bitmap): Likewise.
11706 (mips_arch_setup): New function.
11707 (mips_cannot_fetch_register): Use the_low_target.regmap rather
11708 than mips_regmap.
11709 (mips_cannot_store_register): Likewise.
11710 (the_low_target): Update .arch_setup, .num_regs and .regmap
11711 initializers. Add .regset_bitmap initializer.
11712 * linux-arm-low.c (the_low_target): Add .regset_bitmap
11713 initializer.
11714 * linux-bfin-low.c (the_low_target): Likewise.
11715 * linux-cris-low.c (the_low_target): Likewise.
11716 * linux-crisv32-low.c (the_low_target): Likewise.
11717 * linux-ia64-low.c (the_low_target): Likewise.
11718 * linux-m32r-low.c (the_low_target): Likewise.
11719 * linux-m68k-low.c (the_low_target): Likewise.
11720 * linux-ppc-low.c (the_low_target): Likewise.
11721 * linux-s390-low.c (the_low_target): Likewise.
11722 * linux-sh-low.c (the_low_target): Likewise.
11723 * linux-sparc-low.c (the_low_target): Likewise.
11724 * linux-tic6x-low.c (the_low_target): Likewise.
11725 * linux-x86-low.c (the_low_target): Likewise.
11726 * linux-xtensa-low.c (the_low_target): Likewise.
11727 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
11728 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
11729 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
11730 srv_xmlfiles.
11731 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
11732 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
11733
11734 2012-02-29 Yao Qi <yao@codesourcery.com>
11735 Pedro Alves <palves@redhat.com>
11736
11737 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
11738 `step_over_finished' is true.
11739
11740 2012-02-27 Pedro Alves <palves@redhat.com>
11741
11742 * linux-low.c (pid_is_stopped): Delete, moved to common/.
11743 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
11744
11745 2012-02-27 Pedro Alves <palves@redhat.com>
11746
11747 PR server/9684
11748 * linux-low.c (pid_is_stopped): New.
11749 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
11750
11751 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
11752
11753 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
11754 of conditions.
11755
11756 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
11757
11758 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
11759
11760 2012-02-24 Luis Machado <lgustavo@codesourcery>
11761
11762 * server.c (handle_query): Advertise support for target-side
11763 breakpoint condition evaluation.
11764 (process_point_options): New function.
11765 (process_serial_event): When inserting a breakpoint, check for
11766 a target-side condition that should be evaluated.
11767
11768 * mem-break.c: Include regcache.h and ax.h.
11769 (point_cond_list_t): New data structure.
11770 (breakpoint) <cond_list>: New field.
11771 (find_gdb_breakpoint_at): Make non-static.
11772 (delete_gdb_breakpoint_at): Clear any target-side
11773 conditions.
11774 (clear_gdb_breakpoint_conditions): New function.
11775 (add_condition_to_breakpoint): Likewise.
11776 (add_breakpoint_condition): Likewise.
11777 (gdb_condition_true_at_breakpoint): Likewise.
11778 (gdb_breakpoint_here): Return result directly instead
11779 of going through a local variable.
11780
11781 * mem-break.h (find_gdb_breakpoint_at): New prototype.
11782 (clear_gdb_breakpoint_conditions): Likewise.
11783 (add_breakpoint_condition): Likewise.
11784 (gdb_condition_true_at_breakpoint): Likewise.
11785
11786 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
11787 (need_step_over_p): Take target-side breakpoint condition into
11788 consideration.
11789
11790 2012-02-24 Luis Machado <lgustavo@codesourcery>
11791
11792 * server.h: Include tracepoint.h.
11793 (agent_mem_read, agent_get_trace_state_variable_value,
11794 agent_set_trace_state_variable_value,
11795 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
11796 get_set_tsv_func_addr): New prototypes.
11797
11798 * ax.h: New include file.
11799 * ax.c: New source file.
11800
11801 * tracepoint.c: Include ax.h.
11802 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
11803 agent_expr, eval_result_type): Move to ax.h.
11804 (parse_agent_expr): Rename to ...
11805 (gdb_parse_agent_expr): ... this, make it non-static and move
11806 to ax.h.
11807 (unparse_agent_expr) Rename to ...
11808 (gdb_unparse_agent_expr): ... this, make it non-static and move
11809 to ax.h.
11810 (eval_agent_expr): Rename to ...
11811 (eval_tracepoint_agent_expr): ... this.
11812 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
11813 forward declarations.
11814 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
11815 (agent_get_trace_state_variable_value): New function.
11816 (agent_set_trace_state_variable_value): New function.
11817 (cmd_qtdp): Call gdb_parse_agent_expr (...).
11818 (response_tracepoint): Call gdb_unparse_agent_expr (...).
11819 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
11820 (condition_true_at_tracepoint): Likewise.
11821 (parse_agent_expr): Rename to ...
11822 (gdb_parse_agent_expr): ... this and move to ax.c.
11823 (unparse_agent_expr): Rename to ...
11824 (gdb_unparse_agent_expr): ... this and move to ax.c.
11825 (gdb_agent_op_name): Move to ax.c.
11826 (eval_agent_expr): Rename to ...
11827 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
11828 and move to ax.c.
11829 (eval_tracepoint_agent_expr): New function.
11830 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
11831 non-static.
11832 (current_insn_ptr, emit_error, struct bytecode_address): Move to
11833 ax.c.
11834 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
11835 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
11836 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
11837 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
11838 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
11839 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
11840 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
11841 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
11842 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
11843 (compile_bytecodes): Remove forward declaration.
11844 (is_goto_target): Move to ax.c.
11845 (compile_bytecodes): Move to ax.c and call
11846 agent_get_trace_state_variable_value (...) and
11847 agent_set_trace_state_variable_value (...).
11848
11849 * Makefile.in: Update ax.c and IPA dependencies.
11850
11851 2012-02-24 Pedro Alves <palves@redhat.com>
11852
11853 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
11854 (cmd_bigqtbuffer_circular): ... this. Only handle
11855 'QTBuffer:circular:'.
11856 (handle_tracepoint_general_set): Adjust.
11857
11858 2012-02-16 Yao Qi <yao@codesourcery.com>
11859
11860 * inferiors.c: Move code to ...
11861 * dll.c: .... here. New.
11862 * server.h: Declare clear_dlls.
11863 * Makefile.in (SFILES): Add dll.c.
11864 (OBS): Add dll.o
11865 (dll.o): New rule.
11866
11867 2012-02-11 Yao Qi <yao@codesourcery.com>
11868
11869 * server.c: (handle_monitor_command): Add a new parameter
11870 `own_buf'.
11871 (handle_query): Update caller.
11872
11873 2012-02-09 Joel Brobecker <brobecker@adacore.com>
11874
11875 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
11876 * configure, config.in: Regenerate.
11877 * hostio.c: Provide an alternate implementation if HAVE_READLINK
11878 is not defined.
11879
11880 2012-02-02 Pedro Alves <palves@redhat.com>
11881
11882 Try SIGKILL first, then PTRACE_KILL.
11883 * linux-low.c (linux_kill_one_lwp): New.
11884 (linux_kill_one_lwp): Rename to ...
11885 (kill_one_lwp_callback): ... this. Use the new
11886 linux_kill_one_lwp.
11887
11888 2012-02-02 Pedro Alves <palves@redhat.com>
11889
11890 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
11891 inferior.
11892
11893 2012-01-27 Pedro Alves <palves@redhat.com>
11894
11895 * linux-low.c (linux_child_pid_to_exec_file): Delete.
11896 (elf_64_file_p): Make static.
11897 (linux_pid_exe_is_elf_64_file): New.
11898 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
11899 Delete declarations.
11900 (linux_pid_exe_is_elf_64_file): Declare.
11901 * linux-x86-low.c (x86_arch_setup): Use
11902 linux_pid_exe_is_elf_64_file.
11903
11904 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
11905
11906 * linux-low.c (linux_wait_for_event_1): Rename to ...
11907 (linux_wait_for_event): ... here and merge it with former
11908 linux_wait_for_event - new variable wait_ptid, use it.
11909 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
11910
11911 2012-01-23 Pedro Alves <palves@redhat.com>
11912
11913 * server.c (main): Avoid yet another case of infinite loop while
11914 detaching/killing after a longjmp.
11915
11916 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
11917
11918 Code cleanup.
11919 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
11920
11921 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
11922
11923 * hostio.c (handle_readlink): New function.
11924 (handle_vFile): Call it to handle "vFile:readlink" packets.
11925
11926 2012-01-20 Pedro Alves <palves@redhat.com>
11927 Ulrich Weigand <ulrich.weigand@linaro.org>
11928
11929 * server.c (handle_v_requests): Only support vAttach and vRun to
11930 start multiple processes when in extended protocol mode.
11931
11932 2012-01-17 Pedro Alves <palves@redhat.com>
11933
11934 * tracepoint.c (initialize_tracepoint): Use mmap instead of
11935 memalign plus mprotect to allocate the scratch buffer.
11936
11937 2012-01-13 Pedro Alves <palves@redhat.com>
11938
11939 * server.c (attach_inferior): Clear `cont_thread'.
11940
11941 2012-01-13 Pedro Alves <palves@redhat.com>
11942
11943 * server.c (main): Avoid infinite loop while detaching/killing
11944 after a longjmp.
11945
11946 2012-01-09 Doug Evans <dje@google.com>
11947
11948 * server.c (start_inferior): Set last_ptid in --wrapper case.
11949
11950 2012-01-06 Yao Qi <yao@codesourcery.com>
11951
11952 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
11953 defined.
11954 [IN_PROCESS_AGENT] (debug_agent): New global variable.
11955
11956 2012-01-04 Yao Qi <yao@codesourcery.com>
11957
11958 * tracepoint.c (cmd_qtdp): Print debug message
11959 for static tracepoint.
11960
11961 2012-01-04 Yao Qi <yao@codesourcery.com>
11962
11963 * tracepoint.c (trace_vdebug): Differentiate debug message
11964 between gdbserver and IPA.
11965
11966 2012-01-03 Yao Qi <yao@codesourcery.com>
11967
11968 * tracepoint.c (tracepoint_was_hit): Don't collect for
11969 static tracepoint.
11970
11971 2012-01-02 Joel Brobecker <brobecker@adacore.com>
11972
11973 * terminal.h: Reformat copyright header.
11974
11975 2012-01-02 Joel Brobecker <brobecker@adacore.com>
11976
11977 * server.c (gdbserver_version): Update copyright year.
11978 * gdbreplay.c (gdbreplay_version): Likewise.
11979
11980 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
11981
11982 * linux-low.c (linux_create_inferior): Put empty if clause for write.
11983
11984 Revert:
11985 2011-12-18 Hui Zhu <teawater@gmail.com>
11986 * linux-low.c (linux_create_inferior): Save return value to ret.
11987
11988 2011-12-18 Hui Zhu <teawater@gmail.com>
11989
11990 * linux-low.c (linux_create_inferior): Save return value to ret.
11991
11992 2011-12-16 Doug Evans <dje@google.com>
11993
11994 * linux-low.c (linux_create_inferior): If stdio connection,
11995 redirect stdin from /dev/null, stdout to stderr.
11996 * remote-utils.c (remote_is_stdio): New static global.
11997 (remote_connection_is_stdio): New function.
11998 (remote_prepare): Handle stdio connection.
11999 (remote_open): Ditto.
12000 (remote_close): Don't close stdin for stdio connections.
12001 (read_prim,write_prim): New functions. Replace all calls to
12002 read/write to these.
12003 * server.c (main): Watch for "-" argument. Move call to
12004 remote_prepare before start_inferior.
12005 * server.h (STDIO_CONNECTION_NAME): New macro.
12006 (remote_connection_is_stdio): Declare.
12007
12008 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
12009 in debugging output.
12010
12011 2011-12-15 Yao Qi <yao@codesourcery.com>
12012
12013 * tracepoint.c: Include sys/syscall.h.
12014 (gdb_ust_thread): Remove preprocessor conditional.
12015
12016 2011-12-14 Pedro Alves <pedro@codesourcery.com>
12017
12018 * linux-low.c (linux_detach_one_lwp): Call
12019 the_low_target.prepare_to_resume before detaching.
12020
12021 2011-12-14 Yao Qi <yao@codesourcery.com>
12022
12023 * tracepoint.c (gdb_ust_thread): Don't ignore return value
12024 of write.
12025
12026 2011-12-14 Yao Qi <yao@codesourcery.com>
12027
12028 * i386-low.c (i386_low_stopped_data_address): Initialize local
12029 variable `control'.
12030
12031 2011-12-13 Pedro Alves <pedro@codesourcery.com>
12032
12033 PR remote/13492
12034
12035 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
12036 DR_CONTROL unless necessary. Extend comments.
12037 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
12038 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
12039
12040 2011-12-13 Yao Qi <yao@codesourcery.com>
12041
12042 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
12043 macros.
12044 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
12045
12046 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
12047
12048 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
12049 Print new debug message for such case.
12050
12051 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
12052
12053 Fix overlapping memcpy.
12054 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
12055 the read_inferior_memory transfer.
12056 (delete_fast_tracepoint_jump): New variable buf. Use it for the
12057 write_inferior_memory transfer.
12058 (set_fast_tracepoint_jump): New variable buf. Use it for the
12059 read_inferior_memory and write_inferior_memory transfers.
12060 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
12061 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
12062 Use it for the write_inferior_memory transfer.
12063 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
12064 buffers.
12065
12066 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
12067
12068 * linux-low.c (fetch_register, store_register): Make code
12069 consistent, fix formatting.
12070
12071 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
12072
12073 * linux-low.c (usr_store_inferior_registers): Factor out code
12074 to handle individual registers into...
12075 (store_register): ... this new function.
12076
12077 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
12078
12079 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
12080 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
12081 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
12082 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
12083 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
12084 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
12085 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
12086 (srv_xmlfiles): Add new XML files.
12087
12088 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
12089 and <sys/uio.h>.
12090 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
12091 (init_registers_s390_linux32v1): Add prototype.
12092 (init_registers_s390_linux32v2): Likewise.
12093 (init_registers_s390_linux64v1): Likewise.
12094 (init_registers_s390_linux64v2): Likewise.
12095 (init_registers_s390x_linux64v1): Likewise.
12096 (init_registers_s390x_linux64v2): Likewise.
12097 (s390_num_regs): Increment to 52.
12098 (s390_regmap): Add orig_r2 register.
12099 (s390_num_regs_3264): Increment to 68.
12100 (s390_regmap_3264): Add orig_r2 register.
12101 (s390_collect_ptrace_register): Handle orig_r2 register.
12102 (s390_supply_ptrace_register): Likewise.
12103 (s390_fill_last_break): New function.
12104 (s390_store_last_break): Likewise.
12105 (s390_fill_system_call): New function.
12106 (s390_store_system_call): Likewise.
12107 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
12108 register sets.
12109 (s390_check_regset): New function.
12110 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
12111 NT_S390_SYSTEM_CALL regsets and use appropriate description.
12112 Update target_regsets for available register sets.
12113
12114 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
12115 Jan Kratochvil <jan.kratochvil@redhat.com>
12116
12117 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
12118 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
12119 New.
12120 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
12121 * linux-low.h (struct process_info_private): New member r_debug.
12122 * server.c (handle_qxfer_libraries): Call
12123 the_target->qxfer_libraries_svr4.
12124 (handle_qxfer_libraries_svr4): New function.
12125 (qxfer_packets): New entry "libraries-svr4".
12126 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
12127 * target.h (struct target_ops): New member qxfer_libraries_svr4.
12128 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
12129 PACKET_qXfer_libraries_svr4.
12130
12131 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
12132
12133 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
12134 PSW address/mask between 8-byte and 16-byte formats.
12135 (s390_supply_ptrace_register): Likewise.
12136 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
12137 basic addressing mode bit.
12138
12139 2011-11-24 Stan Shebs <stan@codesourcery.com>
12140
12141 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
12142
12143 2011-11-17 Stan Shebs <stan@codesourcery.com>
12144
12145 * tracepoint.c (struct tracepoint): New field traceframe_usage.
12146 (tracing_start_time): New global.
12147 (tracing_stop_time): New global.
12148 (tracing_user_name): New global.
12149 (tracing_notes): New global.
12150 (tracing_stop_note): New global.
12151 (cmd_qtstart): Set traceframe_usage, start_time.
12152 (stop_tracing): Set stop_time.
12153 (cmd_qtstatus): Report additional status.
12154 (cmd_qtp): New function.
12155 (handle_tracepoint_query): Call it.
12156 (cmd_qtnotes): New function.
12157 (handle_tracepoint_general_set): Call it.
12158 (get_timestamp): Rename from tsv_get_timestamp.
12159
12160 2011-11-14 Stan Shebs <stan@codesourcery.com>
12161 Kwok Cheung Yeung <kcy@codesourcery.com>
12162
12163 * linux-x86-low.c (small_jump_insn): New.
12164 (i386_install_fast_tracepoint_jump_pad): Add arguments for
12165 trampoline and error message, build a trampoline and issue a small
12166 jump instruction to it.
12167 (x86_install_fast_tracepoint_jump_pad): Add arguments for
12168 trampoline and error message.
12169 (x86_get_min_fast_tracepoint_insn_len): New.
12170 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
12171 * linux-low.h (struct linux_target_ops): Add arguments to
12172 install_fast_tracepoint_jump_pad operation, add new operation.
12173 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
12174 arguments.
12175 (linux_get_min_fast_tracepoint_insn_len): New function.
12176 (linux_target_op): Add new operation.
12177 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
12178 (gdb_trampoline_buffer_end): Ditto.
12179 (gdb_trampoline_buffer_error): Ditto.
12180 (struct ipa_sym_addresses): Add fields for new IPA variables.
12181 (symbol_list): Add entries for new IPA variables.
12182 (struct tracepoint): Add fields to hold the address range of the
12183 trampoline used by the tracepoint.
12184 (trampoline_buffer_head): New static variable.
12185 (trampoline_buffer_tail): Ditto.
12186 (claim_trampoline_space): New function.
12187 (have_fast_tracepoint_trampoline_buffer): New function.
12188 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
12189 structure.
12190 (install_fast_tracepoint): Ditto, also add error buffer argument.
12191 (cmd_qtminftpilen): New function.
12192 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
12193 (fast_tracepoint_from_trampoline_address): New function.
12194 (fast_tracepoint_collecting): Handle trampoline as part of jump
12195 pad space.
12196 (set_trampoline_buffer_space): New function.
12197 (initialize_tracepoint): Initialize new IPA variables.
12198 * target.h (struct target_ops): Add arguments to
12199 install_fast_tracepoint_jump_pad operation, add new
12200 get_min_fast_tracepoint_insn_len operation.
12201 (target_get_min_fast_tracepoint_insn_len): New.
12202 (install_fast_tracepoint_jump_pad): Add arguments.
12203 * server.h (IPA_BUFSIZ): Define.
12204 * linux-i386-ipa.c: Include extra header files.
12205 (initialize_fast_tracepoint_trampoline_buffer): New function.
12206 (initialize_low_tracepoint): Call it.
12207 * server.h (set_trampoline_buffer_space): Declare.
12208 (claim_trampoline_space): Ditto.
12209 (have_fast_tracepoint_trampoline_buffer): Ditto.
12210
12211 2011-11-14 Yao Qi <yao@codesourcery.com>
12212
12213 * server.c (handle_query): Handle InstallInTrace for qSupported.
12214 * tracepoint.c (add_tracepoint): Sort list.
12215 (install_tracepoint, download_tracepoint): New.
12216 (cmd_qtdp): Call them to install and download tracepoints.
12217 (sort_tracepoints): Removed.
12218 (cmd_qtstart): Update.
12219
12220 2011-11-14 Yao Qi <yao@codesourcery.com>
12221
12222 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
12223 * mem-break.h: Declare.
12224 * tracepoint.c (cmd_qtstart): Move some code to ...
12225 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
12226 New.
12227 (download_tracepoints): Move some code to ...
12228 (download_tracepoint_1): ... here. New.
12229
12230 2011-11-08 Yao Qi <yao@codesourcery.com>
12231
12232 * remote-utils.c (relocate_instruction): A comment fix.
12233
12234 2011-11-07 Joel Brobecker <brobecker@adacore.com>
12235
12236 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
12237 (i386_dr_low_get_control, i386_dr_low_get_status): Use
12238 dr_status_mirror and dr_control_mirror from debug_reg_state.
12239 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
12240 (i386_initial_stuff): Remove use of deleted globals.
12241 (i386_get_thread_context, i386_set_thread_context,
12242 i386_thread_added): Use dr_status_mirror and dr_control_mirror
12243 from debug_reg_state.
12244
12245 2011-11-05 Yao Qi <yao@codesourcery.com>
12246
12247 * tracepoint.c (gdb_collect): Loop over tracepoints of same
12248 address as TPOINT's.
12249
12250 2011-11-02 Stan Shebs <stan@codesourcery.com>
12251
12252 * tracepoint.c (agent_mem_read_string): New function.
12253 (eval_agent_expr): Call it for tracenz.
12254 * server.c (handle_query): Report support for tracenz.
12255
12256 2011-11-02 Yao Qi <yao@codesourcery.com>
12257
12258 * tracepoint.c (cmd_qtstart): Remove unused local variables.
12259
12260 2011-11-02 Yao Qi <yao@codesourcery.com>
12261
12262 * target.h: Fix a typo in comment.
12263
12264 2011-10-31 Pedro Alves <pedro@codesourcery.com>
12265
12266 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
12267 clobber the breakpoints' shadows with fast tracepoint jumps.
12268 * mem-break.h (check_mem_write): Add `myaddr' parameter.
12269 * target.c (write_inferior_memory): Also pass MYADDR down to
12270 check_mem_write.
12271
12272 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
12273
12274 * configure.ac: Check support for personality routine.
12275 * configure: Regenerate.
12276 * config.in: Likewise.
12277 * linux-low.c: Include <sys/personality.h>.
12278 Define ADDR_NO_RANDOMIZE if necessary.
12279 (linux_create_inferior): Disable address space randomization when
12280 forking inferior, if requested.
12281 (linux_supports_disable_randomization): New function.
12282 (linux_target_ops): Install it.
12283 * server.h (disable_randomization): Declare.
12284 * server.c (disable_randomization): New global variable.
12285 (handle_general_set): Handle QDisableRandomization.
12286 (handle_query): Likewise for qSupported.
12287 (main): Support --disable-randomization and --no-disable-randomization
12288 command line arguments.
12289 * target.h (struct target_ops): Add supports_disable_randomization.
12290 (target_supports_disable_randomization): New macro.
12291
12292 2011-09-29 Mike Frysinger <vapier@gentoo.org>
12293
12294 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
12295 ifdef check.
12296 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
12297 [!PT_GETDSBT] (target_loadmap): New definition.
12298 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
12299 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
12300 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
12301 and PT_GETDSBT to LINUX_LOADMAP.
12302 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
12303 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
12304
12305 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
12306
12307 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
12308 (arm_linux_hwbp_cap): New static variable.
12309 (arm_linux_get_hwbp_cap): Replace by ...
12310 (arm_linux_init_hwbp_cap): ... this new function.
12311 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
12312 (arm_linux_get_hw_watchpoint_count): Likewise.
12313 (arm_linux_get_hw_watchpoint_max_length): Likewise.
12314 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
12315 (arm_prepare_to_resume): Use perror_with_name instead of error.
12316
12317 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
12318
12319 * linux-arm-low.c: Include <signal.h>.
12320 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
12321 (struct arm_linux_hwbp_cap): New data type.
12322 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
12323 (struct arm_linux_hw_breakpoint): New data type.
12324 (MAX_BPTS, MAX_WPTS): Define.
12325 (struct arch_process_info, struct arch_lwp_info): New data types.
12326 (arm_linux_get_hwbp_cap): New function.
12327 (arm_linux_get_hw_breakpoint_count): Likewise.
12328 (arm_linux_get_hw_watchpoint_count): Likewise.
12329 (arm_linux_get_hw_watchpoint_max_length): Likewise.
12330 (arm_hwbp_control_initialize): Likewise.
12331 (arm_hwbp_control_is_enabled): Likewise.
12332 (arm_hwbp_control_is_initialized): Likewise.
12333 (arm_hwbp_control_disable): Likewise.
12334 (arm_linux_hw_breakpoint_equal): Likewise.
12335 (arm_linux_hw_point_initialize): Likewise.
12336 (struct update_registers_data): New data structure.
12337 (update_registers_callback: New function.
12338 (arm_insert_point): Likewise.
12339 (arm_remove_point): Likewise.
12340 (arm_stopped_by_watchpoint): Likewise.
12341 (arm_stopped_data_address): Likewise.
12342 (arm_new_process): Likewise.
12343 (arm_new_thread): Likewise.
12344 (arm_prepare_to_resume): Likewise.
12345 (the_low_target): Register arm_insert_point, arm_remove_point,
12346 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
12347 arm_new_thread, and arm_prepare_to_resume.
12348
12349 2011-09-15 Stan Shebs <stan@codesourcery.com>
12350
12351 * server.h (struct emit_ops): Add compare-goto fields.
12352 * tracepoint.c (gdb_agent_op_sizes): New table.
12353 (emit_eq_goto): New function.
12354 (emit_ne_goto): New function.
12355 (emit_lt_goto): New function.
12356 (emit_le_goto): New function.
12357 (emit_gt_goto): New function.
12358 (emit_ge_goto): New function.
12359 (is_goto_target): New function.
12360 (compile_bytecodes): Recognize special cases of compare-goto
12361 combinations and call specialized emitters for them.
12362 * linux-x86-low.c (amd64_emit_eq_goto): New function.
12363 (amd64_emit_ne_goto): New function.
12364 (amd64_emit_lt_goto): New function.
12365 (amd64_emit_le_goto): New function.
12366 (amd64_emit_gt_goto): New function.
12367 (amd64_emit_ge_goto): New function.
12368 (amd64_emit_ops): Add the new functions.
12369 (i386_emit_eq_goto): New function.
12370 (i386_emit_ne_goto): New function.
12371 (i386_emit_lt_goto): New function.
12372 (i386_emit_le_goto): New function.
12373 (i386_emit_gt_goto): New function.
12374 (i386_emit_ge_goto): New function.
12375 (i386_emit_ops): Add the new functions.
12376
12377 2011-09-08 Stan Shebs <stan@codesourcery.com>
12378
12379 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
12380 (i386_emit_epilogue): Restore %ebx.
12381
12382 2011-08-31 Jie Zhang <jzhang918@gmail.com>
12383
12384 * server.c (step_thread): Remove definition.
12385 (process_serial_event): Don't handle Hs.
12386 * server.h (step_thread): Remove declaration.
12387 * target.c (set_desired_inferior): Remove use of step_thread.
12388
12389 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
12390
12391 * linux-low.c: Include linux-procfs.h.
12392 (linux_attach_lwp_1): Update comments.
12393 (linux_attach): Scan for existing threads when attaching to a
12394 process that is the tgid.
12395 * Makefile.in: Update dependencies.
12396
12397 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
12398
12399 * configure.srv: Add linux-procfs.o dependencies.
12400
12401 2011-08-14 Yao Qi <yao@codesourcery.com>
12402
12403 * target.h (struct target_ops): Fix indent.
12404 * win32-low.c (win32_target_ops): Fix comment.
12405
12406 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
12407 Yao Qi <yao@codesourcery.com>
12408
12409 * Makefile.in (clean): Remove tic6x-*.c files.
12410 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
12411 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
12412 (tic6x-c64xp-linux.c): Likewise.
12413 * configure.srv: Add support for tic6x-*-uclinux.
12414 * linux-tic6x-low.c: New.
12415 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
12416
12417 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
12418 Yao Qi <yao@codesourcery.com>
12419
12420 * target.h (struct target_ops): Add read_loadmap.
12421 * linux-low.c (struct target_loadseg): New type.
12422 (struct target_loadmap): New type.
12423 (linux_read_loadmap): New function.
12424 (linux_target_ops): Add linux_read_loadmap.
12425 * server.c (handle_query): Support qXfer:fdpic:read packet.
12426 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
12427 to NULL.
12428
12429 2011-08-05 Eli Zaretskii <eliz@gnu.org>
12430
12431 * win32-low.c: Include <stdint.h>.
12432
12433 2011-07-22 Pedro Alves <pedro@codesourcery.com>
12434
12435 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
12436 to the inferior here.
12437 (i386_remove_aligned_watchpoint): Ditto.
12438 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
12439 fit part of the watchpoint in the debug registers.
12440 (i386_update_inferior_debug_regs): New.
12441 (i386_low_insert_watchpoint): Work on a local mirror of the debug
12442 registers, and only update the inferior on success.
12443 (i386_low_remove_watchpoint): Ditto.
12444
12445 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
12446
12447 * linux-low.c (compare_ints, unique, list_threads, show_process,
12448 linux_core_of_thread): Delete.
12449 (linux_target_ops): Change linux_core_of_thread to
12450 linux_common_core_of_thread.
12451 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
12452 * utils.c (malloc_failure): Change type of argument.
12453 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
12454 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
12455 common/linux-osdata.c, common/ptid.c and common/buffer.c.
12456 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
12457 (IPA_OBJS): Add common-utils-ipa.o.
12458 (ptid_h, linux_osdata_h): New macros.
12459 (server_h): Add common/common-utils.h, common/xml-utils.h,
12460 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
12461 common/ptid.h.
12462 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
12463 ptid.o, buffer.o): New rules.
12464 (linux-low.o): Add common/linux-osdata.h as a dependency.
12465 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
12466 * configure.ac: Add AC_HEADER_DIRENT check.
12467 * config.in: Regenerate.
12468 * configure: Regenerate.
12469 * remote-utils.c (xml_escape_text): Delete.
12470 (buffer_grow, buffer_free, buffer_init, buffer_finish,
12471 buffer_xml_printf): Move to common/buffer.c.
12472 * server.c (main): Remove call to initialize_inferiors.
12473 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
12474 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
12475 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
12476 internal_error, gdb_assert, gdb_assert_fail): Delete.
12477 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
12478 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
12479 common/buffer.h.
12480 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
12481 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
12482 initialize_inferiors): Delete.
12483
12484 2011-07-20 Pedro Alves <pedro@codesourcery.com>
12485
12486 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
12487 symbol error.
12488
12489 2011-05-31 Pedro Alves <pedro@codesourcery.com>
12490
12491 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
12492 assertion.
12493 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
12494
12495 2011-05-26 Yao Qi <yao@codesourcery.com>
12496
12497 * Makefile.in (thread-db.o): Track dependence to
12498 common/gdb_thread_db.h.
12499 * thread-db.c: include gdb_thread_db.h from right place.
12500
12501 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
12502
12503 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
12504 __FILE__ and __LINE__ to internal_error.
12505
12506 2011-05-13 Doug Evans <dje@google.com>
12507
12508 * thread-db.c (try_thread_db_load_from_sdir): New function.
12509 (try_thread_db_load_from_dir): New function.
12510 (thread_db_load_search): Handle $sdir, ignore $pdir.
12511 Remove trying of system directories if search of
12512 libthread-db-search-path fails, that is now done via $sdir.
12513
12514 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
12515
12516 * server.c (handle_query): Add EnableDisableTracepoints to the list
12517 of supported features.
12518 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
12519 tracepoints.
12520 (cmd_qtenable_disable): New.
12521 (cmd_qtstart): Install tracepoints even if disabled.
12522 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
12523 receiving a QTEnable or QTDisable packet.
12524 (gdb_collect): Skip data collection if fast tracepoint is disabled.
12525 (ust_marker_to_static_tracepoint): Do not ignore disabled static
12526 tracepoints.
12527 (gdb_probe): Skip data collection if static tracepoint is disabled.
12528
12529 2011-05-10 Doug Evans <dje@google.com>
12530
12531 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
12532
12533 2011-05-04 Doug Evans <dje@google.com>
12534
12535 * linux-low.c (linux_join): Skip process lookup.
12536 * spu-low.c (spu_join): Ditto.
12537 * server.c (join_inferiors_callback): Delete.
12538 (process_serial_event): For 'D' packet (detach) call join_inferior
12539 directly.
12540
12541 2011-05-04 Joseph Myers <joseph@codesourcery.com>
12542
12543 * README: Don't mention xscale*-*-linux*.
12544 * configure.srv (xscale*-*-linux*): Don't handle target.
12545
12546 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
12547
12548 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
12549 casting pointers.
12550 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
12551 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
12552 (i386_emit_void_call_2): Likewise.
12553
12554 2011-04-26 Yao Qi <yao@codesourcery.com>
12555
12556 * linux-low.c: Move common macros to linux-ptrace.h.
12557 Include linux-ptrace.h.
12558 * Makefile.in (linux_ptrace_h): New.
12559 (linux-low.o): Depends on linux-ptrace.h.
12560
12561 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
12562
12563 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
12564 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
12565 (remote_prepare): New function with most of the TCP code from ...
12566 (remote_open): ... here. Detect PORT here unconditionally. Move also
12567 setting transport_is_reliable.
12568 * server.c (run_once): New variable.
12569 (gdbserver_usage): Document it.
12570 (main): Set run_once for `--once'. Call remote_prepare. Exit after
12571 the first run if RUN_ONCE.
12572 * server.h (run_once, remote_prepare): New declarations.
12573
12574 2011-04-19 Tom Tromey <tromey@redhat.com>
12575
12576 * win32-low.c (handle_load_dll): Remove duplicate "the".
12577
12578 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
12579
12580 Remove support for old Cygwin 1.5 versions.
12581 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
12582 function to avoid warning.
12583 (win32_add_one_solib): Use cygwin_conv_path function to avoid
12584 warning.
12585
12586 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
12587
12588 * gdbserver/server.h (Macro _): Define it if not available.
12589
12590 2011-03-14 Michael Snyder <msnyder@vmware.com>
12591
12592 * hostio.c (handle_close): Remove unnecessary null test.
12593
12594 2011-03-10 Joel Brobecker <brobecker@adacore.com>
12595
12596 * Makefile.in (maintainer-clean realclean distclean): Remove
12597 "make ... subdir_do" command.
12598
12599 2011-03-10 Michael Snyder <msnyder@vmware.com>
12600
12601 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
12602
12603 * server.c (handle_v_run): Free alloced buffer on early return.
12604
12605 2011-03-09 Yao Qi <yao@codesourcery.com>
12606
12607 Revert:
12608 2011-03-04 Yao Qi <yao@codesourcery.com>
12609
12610 * Makefile.in: Remove GNU make feature --directory.
12611
12612 2011-03-05 Yao Qi <yao@codesourcery.com>
12613
12614 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
12615 (subdir_do): New make target. Copied from gdb/Makefile.
12616 (maintainer-clean, realclean, distclean, clean): Call corresponding
12617 make targets in common/Makefile.
12618
12619 2011-02-11 Yao Qi <yao@codesourcery.com>
12620
12621 * configure.ac: Call AC_PROG_RANLIB.
12622 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
12623 * configure: Regenerate.
12624
12625 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
12626
12627 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
12628
12629 2011-03-06 Yao Qi <yao@codesourcery.com>
12630
12631 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
12632
12633 2011-03-05 Yao Qi <yao@codesourcery.com>
12634
12635 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
12636 (subdir_do): New make target. Copied from gdb/Makefile.
12637 (maintainer-clean, realclean, distclean, clean): Call corresponding
12638 make targets in common/Makefile.
12639
12640 2011-03-04 Yao Qi <yao@codesourcery.com>
12641
12642 * Makefile.in: Remove GNU make feature --directory.
12643
12644 2011-03-04 Michael Snyder <msnyder@vmware.com>
12645
12646 * server.c (queue_stop_reply): Call xmalloc not malloc.
12647
12648 2011-03-02 Michael Snyder <msnyder@vmware.com>
12649
12650 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
12651
12652 2011-02-28 Michael Snyder <msnyder@vmware.com>
12653
12654 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
12655 (cmd_qtframe): Ditto.
12656 (cmd_qtbuffer): Ditto.
12657 (cmd_bigqtbuffer): Ditto.
12658
12659 * utils.c (decimal2str): Initialize 'width' to nine, then
12660 don't mess with it.
12661
12662 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
12663
12664 * hostio.c (require_data): Free *data, not data.
12665
12666 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
12667
12668 * hostio.c (require_data): Use free, not xfree.
12669
12670 2011-02-27 Michael Snyder <msnyder@vmware.com>
12671
12672 * server.c (handle_query): Discard unused value.
12673
12674 * hostio.c (require_data): Free malloc memory before returning
12675 error.
12676
12677 2011-02-26 Michael Snyder <msnyder@vmware.com>
12678
12679 * linux-low.c (list_threads): Call closedir for dirent.
12680
12681 2011-02-27 Michael Snyder <msnyder@vmware.com>
12682
12683 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
12684 a case statement falls through.
12685
12686 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
12687
12688 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
12689 in comparison.
12690
12691 2011-02-26 Michael Snyder <msnyder@vmware.com>
12692
12693 * utils.c (decimal2str): Eliminate dead code and dead param.
12694 (pulongest): Drop dead param from call to decimal2str.
12695 (plongest): Ditto.
12696
12697 2011-02-24 Joel Brobecker <brobecker@adacore.com>
12698
12699 Revert the following patch (not approved yet):
12700 2011-02-21 Hui Zhu <teawater@gmail.com>
12701 * tracepoint.c (tp_printf): New function.
12702 (eval_agent_expr): Handle gdb_agent_op_printf.
12703
12704 2011-02-21 Hui Zhu <teawater@gmail.com>
12705
12706 * tracepoint.c (tp_printf): New function.
12707 (eval_agent_expr): Handle gdb_agent_op_printf.
12708
12709 2011-02-18 Tom Tromey <tromey@redhat.com>
12710
12711 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
12712 (tracepoint.o): Likewise.
12713 * tracepoint.c (enum gdb_agent_op): Use ax.def.
12714 (gdb_agent_op_names): Likewise.
12715
12716 2011-02-18 Tom Tromey <tromey@redhat.com>
12717
12718 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
12719 gdb_agent_op_rot>: New constants.
12720 (gdb_agent_op_names): Add pick and roll.
12721 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
12722 cases.
12723
12724 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
12725
12726 * aclocal.m4: Regenerated with aclocal-1.11.1.
12727
12728 2011-02-14 Pedro Alves <pedro@codesourcery.com>
12729
12730 * server.c (handle_qxfer_traceframe_info): New.
12731 (qxfer_packets): Register "traceframe-info".
12732 (handle_query): Report support for qXfer:traceframe-info:read+.
12733 * tracepoint.c (match_blocktype): New.
12734 (traceframe_find_block_type): Rename to ...
12735 (traceframe_walk_blocks): ... this. Add callback filter argument,
12736 and use it.
12737 (traceframe_find_block_type): New, reimplemented on top of
12738 traceframe_walk_blocks.
12739 (build_traceframe_info_xml): New.
12740 (traceframe_read_info): New.
12741 * server.h (traceframe_read_info): Declare.
12742
12743 2011-02-11 Yao Qi <yao@codesourcery.com>
12744
12745 * configure.ac: Call AC_PROG_RANLIB.
12746 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
12747 * configure: Regenerate.
12748
12749 2011-02-07 Pedro Alves <pedro@codesourcery.com>
12750
12751 * server.c (gdb_read_memory): Change return semantics to allow
12752 partial transfers.
12753 (handle_search_memory_1): Adjust.
12754 (process_serial_event) <'m' packet>: Handle partial transfers.
12755 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
12756
12757 2011-01-28 Pedro Alves <pedro@codesourcery.com>
12758
12759 * regcache.c (init_register_cache): Initialize
12760 regcache->register_status.
12761 (free_register_cache): Release regcache->register_status.
12762 (regcache_cpy): Copy register_status.
12763 (registers_to_string): Print 'x's for unavailable registers.
12764 (supply_register): Mark the register's status valid or
12765 unavailable, depending on whether a buffer was passed in or not.
12766 (supply_register_zeroed): New.
12767 (supply_regblock): Mark the registers' status valid or
12768 unavailable, depending on whether a buffer was passed in or not.
12769 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
12770 (struct regcache): New `register_status' field.
12771 (supply_register_zeroed): Declare.
12772 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
12773 supply_register_zeroed, rather than passing a NULL buffer to
12774 supply_register.
12775 * tracepoint.c (fetch_traceframe_registers): Update comment.
12776
12777 2011-01-28 Pedro Alves <pedro@codesourcery.com>
12778
12779 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
12780 buffer explicit.
12781
12782 2011-01-25 Pedro Alves <pedro@codesourcery.com>
12783
12784 * server.h (decode_xfer_write): Change prototype.
12785 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
12786 and don't extract the annex here.
12787 * server.c (decode_xfer_read): Remove `annex' parameter,
12788 and don't extract the annex here.
12789 (decode_xfer): New.
12790 (struct qxfer): New.
12791 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
12792 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
12793 (handle_qxfer_statictrace): New functions, abstracted out from
12794 handle_query, and made to use the struct qxfer interface.
12795 (handle_threads_qxfer_proper): Rename to ...
12796 (handle_qxfer_threads_proper): ... this.
12797 (handle_threads_qxfer): Rename to ...
12798 (handle_qxfer_threads): ... this. Adjust.
12799 (qxfer_packets): New array.
12800 (handle_qxfer): New function.
12801 (handle_query): Use handle_qxfer.
12802
12803 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
12804
12805 * gdbreplay.c: Shorten lines of >= 80 columns.
12806 * linux-low.c: Ditto.
12807 * linux-ppc-low.c: Ditto.
12808 * linux-s390-low.c: Ditto.
12809 * linux-sparc-low.c: Ditto.
12810 * linux-x86-low.c: Ditto.
12811 * linux-xtensa-low.c: Ditto.
12812 * mem-break.c: Ditto.
12813 * nto-low.c: Ditto.
12814 * regcache.h: Ditto.
12815 * remote-utils.c: Ditto.
12816 * server.c: Ditto.
12817 * server.h: Ditto.
12818 * thread-db.c: Ditto.
12819 * tracepoint.c: Ditto.
12820 * utils.c: Ditto.
12821 * win32-low.h: Ditto.
12822
12823 2011-01-05 Joel Brobecker <brobecker@adacore.com>
12824
12825 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
12826 update.
12827
12828 2011-01-01 Joel Brobecker <brobecker@adacore.com>
12829
12830 * server.c (gdbserver_version): Update copyright year in version
12831 output.
12832 * gdbreplay.c (gdbreplay_version): Ditto.
12833
12834 2010-12-29 Jie Zhang <jie.zhang@analog.com>
12835
12836 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
12837 * linux-bfin-low.c: New file.
12838 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
12839 PT_DATA_ADDR for BFIN targets.
12840 * Makefile.in (SFILES): Add linux-bfin-low.c.
12841 (clean): Remove reg-bfin.c.
12842 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
12843 * README: Mention supported Blackfin targets.
12844
12845 2010-12-23 Mike Frysinger <vapier@gentoo.org>
12846
12847 * .gitignore: New file.
12848
12849 2010-11-16 Mike Frysinger <vapier@gentoo.org>
12850
12851 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
12852
12853 2010-10-22 Jie Zhang <jie@codesourcery.com>
12854
12855 * Makefile.in: Add FLAGS_TO_PASS variable.
12856 (install): Remove dependency of install-only and recursively
12857 invoke make for install-only.
12858
12859 2010-10-04 Doug Evans <dje@google.com>
12860
12861 * Makefile.in (uninstall): Use $(DESTDIR).
12862
12863 2010-09-24 Pedro Alves <pedro@codesourcery.com>
12864
12865 PR gdb/11842
12866
12867 * linux-x86-low.c (compat_siginfo_from_siginfo)
12868 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
12869 si_code is < 0. Check for si_code == SI_TIMER before checking for
12870 si_code < 0.
12871
12872 2010-09-13 Joel Brobecker <brobecker@adacore.com>
12873
12874 * lynx-i386-low.c: New file.
12875 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
12876
12877 2010-09-13 Joel Brobecker <brobecker@adacore.com>
12878
12879 * lynx-low.c (ptrace_request_to_str): Remove handling for
12880 request values that have been removed in LynxOS 5.x.
12881
12882 2010-09-13 Joel Brobecker <brobecker@adacore.com>
12883
12884 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
12885 <ptrace.h>
12886
12887 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
12888
12889 * configure.ac: Add --enable-inprocess-agent option.
12890 * configure: Rebuilt.
12891
12892 2010-09-06 Yao Qi <yao@codesourcery.com>
12893
12894 * linux-low.c (linux_kill): Remove unused variable.
12895 (linux_stabilize_threads): Likewise.
12896 * server.c (start_inferior): Likewise.
12897 (queue_stop_reply_callback): Likewise.
12898 * tracepoint.c (do_action_at_tracepoint): Likewise.
12899
12900 2010-09-06 Yao Qi <yao@codesourcery.com>
12901
12902 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
12903 on return.
12904
12905 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
12906
12907 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
12908
12909 2010-09-06 Pedro Alves <pedro@codesourcery.com>
12910
12911 * Makefile.in (install-only): Replace $IPA_DEPFILES with
12912 "$(IPA_DEPFILES)".
12913
12914 2010-09-01 Joel Brobecker <brobecker@adacore.com>
12915
12916 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
12917 gdbserver/lynx-ppc-low.c: New files.
12918 * Makefile.in (lynx_low_h): New variable.
12919 (lynx-low.o, lynx-ppc-low.o): New rules.
12920 * configure.ac: On LynxOS, link with -lnetinet.
12921 * configure.srv: Add handling of powerpc-*-lynxos* targets.
12922 * configure: regenerate.
12923
12924 2010-09-01 Joel Brobecker <brobecker@adacore.com>
12925
12926 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
12927 * configure.ac: Add check for vasprintf and vsnprintf.
12928 * configure, config.in: Regenerate.
12929 * server.h (vasprintf, vsnprintf): Add conditional declarations.
12930
12931 2010-09-01 Joel Brobecker <brobecker@adacore.com>
12932
12933 * gdbreplay.c: Move include of alloca.h up, next to include of
12934 malloc.h.
12935 * server.h: Add include of malloc.h.
12936 * mem-break.c: Remove include of malloc.h.
12937 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
12938
12939 2010-09-01 Joel Brobecker <brobecker@adacore.com>
12940
12941 * Makefile.in (memmem.o): Build with -Wno-error.
12942
12943 2010-09-01 Joel Brobecker <brobecker@adacore.com>
12944
12945 * utils.c (xsnprintf): Make non-static.
12946 * server.h: Add xsnprintf declaration.
12947 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
12948 replace calls to snprintf by calls to xsnprintf throughout.
12949
12950 2010-09-01 Joel Brobecker <brobecker@adacore.com>
12951
12952 * configure.ac: Add configure check for alloca.
12953 * configure, config.in: Regenerate.
12954 * server.h: Include alloca.h if it exists.
12955 * gdbreplay.c: Include alloca.h if it exists.
12956
12957 2010-08-28 Pedro Alves <pedro@codesourcery.com>
12958
12959 * linux-low.c (__SIGRTMIN): Define if not already defined.
12960 (linux_create_inferior): Check for __ANDROID__ rather than
12961 __SIGRTMIN.
12962 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
12963 are already deferred.
12964 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
12965 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
12966 stopped and already has a pending signal to report.
12967 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
12968 a pending signal to report or is moving out of a jump pad.
12969 (linux_init_signals): Check for __ANDROID__ rather than
12970 __SIGRTMIN.
12971
12972 2010-08-28 Pedro Alves <pedro@codesourcery.com>
12973
12974 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
12975 debug_threads check. Avoid a linear search when not doing debug
12976 output.
12977
12978 2010-08-27 Pedro Alves <pedro@codesourcery.com>
12979
12980 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
12981 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
12982 (struct file_handler) <fd>: Change type to gdb_fildes_t.
12983 (process_event): Change local fd's type to gdb_fildes_t.
12984 (create_file_handler): Adjust prototype.
12985 (delete_file_handler): Adjust prototype.
12986 (handle_file_event): Adjust prototype. Use pfildes.
12987 (create_file_event): Adjsut prototype.
12988 * remote-utils.c (remote_desc, listen_desc): Change type to
12989 gdb_fildes_t.
12990 * server.h: New gdb_fildes_t typedef.
12991 [USE_WIN32API]: Include winsock2.h.
12992 (delete_file_handler, add_file_handler): Adjust prototypes.
12993 (pfildes): Declare.
12994 * utils.c (pfildes): New.
12995
12996 2010-08-27 Pedro Alves <pedro@codesourcery.com>
12997
12998 * configure.ac (build_warnings): Add -Wno-char-subscripts.
12999 * configure: Regenerate.
13000
13001 2010-08-27 Pedro Alves <pedro@codesourcery.com>
13002
13003 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
13004 (linux_done_accessing_memory): ... this.
13005 (linux_target_ops): Adjust.
13006 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
13007 * nto-low.c (nto_target_ops): Adjust comment.
13008 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
13009 * spu-low.c (spu_target_ops): Adjust comment.
13010 * target.h (target_ops): Rename unprepare_to_access_memory field
13011 to done_accessing_memory.
13012 (unprepare_to_access_memory): Rename to ...
13013 (done_accessing_memory): ... this.
13014
13015 2010-08-26 Pedro Alves <pedro@codesourcery.com>
13016
13017 * linux-low.c (linux_prepare_to_access_memory): New.
13018 (linux_unprepare_to_access_memory): New.
13019 (linux_target_ops): Install them.
13020 * server.c (read_memory): Rename to ...
13021 (gdb_read_memory): ... this. Use
13022 prepare_to_access_memory/prepare_to_access_memory.
13023 (write_memory): Rename to ...
13024 (gdb_write_memory): ... this. Use
13025 prepare_to_access_memory/prepare_to_access_memory.
13026 (handle_search_memory_1): Adjust.
13027 (process_serial_event): Adjust.
13028 * target.h (struct target_ops): New fields
13029 prepare_to_access_memory and unprepare_to_access_memory.
13030 (prepare_to_access_memory, unprepare_to_access_memory): New.
13031 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
13032 prepare_to_access_memory/prepare_to_access_memory.
13033 * nto-low.c (nto_target_ops): Adjust.
13034 * spu-low.c (spu_target_ops): Adjust.
13035 * win32-low.c (win32_target_ops): Adjust.
13036
13037 2010-08-26 Pedro Alves <pedro@codesourcery.com>
13038
13039 * Makefile.in (WARN_CFLAGS): Get it from configure.
13040 (WERROR_CFLAGS): New.
13041 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
13042 * configure.ac: Introduce --enable-werror, which adds -Werror to
13043 the compiler command line. Enabled by default. Disable with
13044 --disable-werror. Add -Wdeclaration-after-statement
13045 Wpointer-arith and -Wformat-nonliteral to warning flags.
13046 * configure: Regenerate.
13047
13048 2010-08-26 Pedro Alves <pedro@codesourcery.com>
13049
13050 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
13051
13052 2010-08-26 Pedro Alves <pedro@codesourcery.com>
13053
13054 * gdbreplay.c (remote_error): New.
13055 (gdbchar): New.
13056 (expect): Use gdbchar. Check for error reading from GDB.
13057 Clarify sync error output.
13058 (play): Check for errors writing to GDB.
13059 * linux-low.c (sigchld_handler): Really ignore `write' errors.
13060 * remote-utils.c (getpkt): Check for errors writing to the remote
13061 descriptor.
13062
13063 2010-08-25 Pedro Alves <pedro@codesourcery.com>
13064
13065 * linux-low.c (linux_wait_1): Move non-debugging code out of
13066 `debug_threads' control.
13067
13068 2010-08-25 Pedro Alves <pedro@codesourcery.com>
13069
13070 * linux-low.c (linux_wait_1): Don't set last_status here.
13071 * server.c (push_event, queue_stop_reply_callback): Assert we're
13072 not pushing a TARGET_WAITKIND_IGNORE event.
13073 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
13074 (myresume, handle_target_event): Set the thread's last_resume_kind
13075 and last_status from the target returned status.
13076
13077 2010-08-25 Pedro Alves <pedro@codesourcery.com>
13078
13079 PR threads/10729
13080
13081 * linux-x86-low.c (update_debug_registers_callback): New.
13082 (i386_dr_low_set_addr): Use it.
13083 (i386_dr_low_get_addr): New.
13084 (i386_dr_low_set_control): Use update_debug_registers_callback.
13085 (i386_dr_low_get_control): New.
13086 (i386_dr_low_get_status): Adjust.
13087 * linux-low.c (linux_stop_lwp): New.
13088 * linux-low.h (linux_stop_lwp): Declare.
13089
13090 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
13091 argument instead of a i386_debug_reg_state.
13092 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
13093 a i386_debug_reg_state.
13094 (i386_insert_aligned_watchpoint): Adjust.
13095 (i386_remove_aligned_watchpoint): Adjust.
13096 (i386_low_stopped_data_address): Read the debug registers from the
13097 inferior instead of from the mirrors.
13098 * i386-low.h (struct i386_debug_reg_state): Extend comment.
13099 (i386_dr_low_get_addr): Declare.
13100 (i386_dr_low_get_control): Declare.
13101 (i386_dr_low_get_status): Change prototype.
13102
13103 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
13104 (i386_dr_low_get_addr): New.
13105 (i386_dr_low_get_control): New.
13106 (i386_dr_low_get_status): Adjust prototype. Return
13107 dr_status_mirror.
13108 (i386_initial_stuff): Clear dr_status_mirror and
13109 dr_control_mirror.
13110 (i386_get_thread_context): Adjust.
13111 (i386_set_thread_context): Adjust.
13112 (i386_thread_added): Adjust.
13113
13114 2010-08-24 Pedro Alves <pedro@codesourcery.com>
13115
13116 * linux-low.h (linux_thread_area): Delete declaration.
13117
13118 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
13119
13120 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
13121 after its termination.
13122
13123 2010-08-09 Pedro Alves <pedro@codesourcery.com>
13124
13125 * linux-low.c (gdb_wants_lwp_stopped): Delete.
13126 (gdb_wants_all_stopped): Delete.
13127 (linux_wait_1): Don't call them.
13128 * server.c (handle_v_cont): Tag all threads as want-stopped.
13129 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
13130 stopped as "client-wants-stopped".
13131
13132 2010-07-31 Pedro Alves <pedro@codesourcery.com>
13133
13134 * Makefile.in (signals_h): New.
13135 (server_h): Depend on it.
13136 (server.o): Don't depend on $(signals_def).
13137 (signals.o): Depend on $(signals_def).
13138
13139 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
13140
13141 * Makefile.in (signals_def): New.
13142 (server_h): Append include/gdb/signals.h and signals_def.
13143 (server.o): Append signals_def.
13144
13145 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
13146
13147 * server.c (handle_target_event): Use target_signal_to_host for
13148 resume_info.sig initialization.
13149 * target.h (struct thread_resume) <sig>: New comment.
13150
13151 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
13152
13153 * server.c (handle_query): strcpy() the returned string from paddress()
13154 instead of sprintf().
13155 * utils.c (paddress): Return phex_nz().
13156
13157 2010-07-07 Joel Brobecker <brobecker@adacore.com>
13158
13159 * server.c (handle_v_cont): Call mourn_inferior if process
13160 just exited.
13161 (myresume): Likewise.
13162
13163 2010-07-01 Pedro Alves <pedro@codesourcery.com>
13164
13165 Static tracepoints, and integration with UST.
13166
13167 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
13168 * mem-break.c (uninsert_all_breakpoints)
13169 (reinsert_all_breakpoints): New.
13170 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
13171 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
13172 (gdb_agent_ust_loaded, helper_thread_id)
13173 (gdb_agent_helper_thread_id): New macros.
13174 (struct ipa_sym_addresses): Add addr_ust_loaded,
13175 addr_helper_thread_id, addr_cmd_buf.
13176 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
13177 (in_process_agent_loaded_ust): New.
13178 (write_e_ust_not_loaded): New.
13179 (maybe_write_ipa_ust_not_loaded): New.
13180 (struct collect_static_trace_data_action): New.
13181 (enum tracepoint_type) <static_tracepoint>: New.
13182 (struct tracepoint) <handle>: Mention static tracepoints.
13183 (struct static_tracepoint_ctx): New.
13184 (CMD_BUF_SIZE): New.
13185 (add_tracepoint_action): Handle static tracepoint actions.
13186 (unprobe_marker_at): New.
13187 (clear_installed_tracepoints): Handle static tracepoints.
13188 (cmd_qtdp): Handle static tracepoints.
13189 (probe_marker_at): New.
13190 (cmd_qtstart): Handle static tracepoints.
13191 (response_tracepoint): Handle static tracepoints.
13192 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
13193 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
13194 (get_context_regcache): Handle static tracepoints.
13195 (do_action_at_tracepoint): Handle static tracepoint actions.
13196 (traceframe_find_block_type): Handle static trace data blocks.
13197 (traceframe_read_sdata): New.
13198 (download_tracepoints): Download static tracepoint actions.
13199 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
13200 (GDB_PROBE_NAME): New.
13201 (ust_ops): New.
13202 (GET_UST_SYM): New.
13203 (USTF): New.
13204 (dlsym_ust): New.
13205 (ust_marker_to_static_tracepoint): New.
13206 (gdb_probe): New.
13207 (collect_ust_data_at_tracepoint): New.
13208 (gdb_ust_probe): New.
13209 (UNIX_PATH_MAX, SOCK_DIR): New.
13210 (gdb_ust_connect_sync_socket): New.
13211 (resume_thread, stop_thread): New.
13212 (run_inferior_command): New.
13213 (init_named_socket): New.
13214 (gdb_ust_socket_init): New.
13215 (cstr_to_hexstr): New.
13216 (next_st): New.
13217 (first_marker, next_marker): New.
13218 (response_ust_marker): New.
13219 (cmd_qtfstm, cmd_qtsstm): New.
13220 (unprobe_marker_at, probe_marker_at): New.
13221 (cmd_qtstmat, gdb_ust_thread): New.
13222 (gdb_ust_init): New.
13223 (initialize_tracepoint_ftlib): Call gdb_ust_init.
13224 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
13225 (ST_REGENTRY): New.
13226 (x86_64_st_collect_regmap): New.
13227 (X86_64_NUM_ST_COLLECT_GREGS): New.
13228 (AMD64_RIP_REGNUM): New.
13229 (supply_static_tracepoint_registers): New.
13230 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
13231 (ST_REGENTRY): New.
13232 (i386_st_collect_regmap): New.
13233 (i386_NUM_ST_COLLECT_GREGS): New.
13234 (supply_static_tracepoint_registers): New.
13235 * server.c (handle_query): Handle qXfer:statictrace:read.
13236 <qSupported>: Report support for StaticTracepoints, and
13237 qXfer:statictrace:read features.
13238 * server.h (traceframe_read_sdata)
13239 (supply_static_tracepoint_registers): Declare.
13240 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
13241 (unpack_varlen_hex): Include in IPA build.
13242 * Makefile.in (ustlibs, ustinc): New.
13243 (IPA_OBJS): Add remote-utils-ipa.o.
13244 ($(IPA_LIB)): Link -ldl and -lpthread.
13245 (UST_CFLAGS): New.
13246 (IPAGENT_CFLAGS): Add UST_CFLAGS.
13247 * config.in, configure: Regenerate.
13248
13249 2010-06-20 Ian Lance Taylor <iant@google.com>
13250 Pedro Alves <pedro@codesourcery.com>
13251
13252 * linux-x86-low.c (always_true): Delete.
13253 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
13254 trying to fool the compiler with always_true.
13255
13256 2010-06-20 Pedro Alves <pedro@codesourcery.com>
13257
13258 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
13259 conditions in gdbserver.
13260
13261 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
13262
13263 * spu-low.c (spu_read_memory): Wrap around local store limit.
13264 (spu_write_memory): Likewise.
13265
13266 2010-06-15 Pedro Alves <pedro@codesourcery.com>
13267
13268 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
13269 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
13270 LONGEST uses.
13271 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
13272 uses.
13273 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
13274 uses with LONGEST uses.
13275
13276 2010-06-14 Stan Shebs <stan@codesourcery.com>
13277 Pedro Alves <pedro@codesourcery.com>
13278
13279 Bytecode compiler.
13280
13281 * linux-x86-low.c: Include limits.h.
13282 (add_insns): New.
13283 (always_true): New.
13284 (EMIT_ASM): New.
13285 (EMIT_ASM32): New.
13286 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
13287 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
13288 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
13289 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
13290 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
13291 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
13292 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
13293 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
13294 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
13295 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
13296 (amd64_emit_void_call_2): New.
13297 (amd64_emit_ops): New.
13298 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
13299 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
13300 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
13301 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
13302 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
13303 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
13304 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
13305 (i386_emit_call, i386_emit_reg, i386_emit_pop)
13306 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
13307 (i386_emit_stack_adjust, i386_emit_int_call_1)
13308 (i386_emit_void_call_2): New.
13309 (i386_emit_ops): New.
13310 (x86_emit_ops): New.
13311 (the_low_target): Install x86_emit_ops.
13312 * server.h (struct emit_ops): New.
13313 (get_raw_reg_func_addr): Declare.
13314 (current_insn_ptr, emit_error): Declare.
13315 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
13316 (set_trace_state_variable_value): New defines.
13317 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
13318 addr_get_trace_state_variable_value and
13319 addr_set_trace_state_variable_value.
13320 (symbol_list): New fields for get_raw_reg,
13321 get_trace_state_variable_value and set_trace_state_variable_value.
13322 (condfn): New typedef.
13323 (struct tracepoint): New field `compiled_cond'.
13324 (do_action_at_tracepoint): Clear compiled_cond.
13325 (get_trace_state_variable_value, set_trace_state_variable_value):
13326 Export in the IPA.
13327 (condition_true_at_tracepoint): If there's a compiled condition,
13328 run that.
13329 (current_insn_ptr, emit_error): New globals.
13330 (struct bytecode_address): New.
13331 (get_raw_reg_func_addr): New.
13332 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
13333 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
13334 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
13335 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
13336 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
13337 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
13338 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
13339 (compile_tracepoint_condition, compile_bytecodes): New.
13340 * target.h (emit_ops): Forward declare.
13341 (struct target_ops): New field emit_ops.
13342 (target_emit_ops): New.
13343 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
13344 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
13345 * linux-low.c (linux_emit_ops): New.
13346 (linux_target_ops): Install it.
13347 * linux-low.h (struct linux_target_ops): New field emit_ops.
13348
13349 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
13350
13351 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
13352 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
13353
13354 2010-06-01 Pedro Alves <pedro@codesourcery.com>
13355 Stan Shebs <stan@codesourcery.com>
13356
13357 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
13358 (all): Depend on $(extra_libraries).
13359 (install-only): Install the IPA.
13360 (IPA_OBJS, IPA_LIB): New.
13361 (clean): Remove the IPA lib.
13362 (IPAGENT_CFLAGS): New.
13363 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
13364 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
13365 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
13366 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
13367 * configure.ac: Check for atomic builtins support in the compiler.
13368 (IPA_DEPFILES, extra_libraries): Define.
13369 * configure.srv (ipa_obj): Add description.
13370 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
13371 (i[34567]86-*-linux*): Set ipa_obj.
13372 (x86_64-*-linux*): Set ipa_obj.
13373 * linux-low.c (stabilizing_threads): New.
13374 (supports_fast_tracepoints): New.
13375 (linux_detach): Stabilize threads before detaching.
13376 (handle_tracepoints): Handle internal tracing breakpoints. Assert
13377 the lwp is either not stabilizing, or is moving out of a jump pad.
13378 (linux_fast_tracepoint_collecting): New.
13379 (maybe_move_out_of_jump_pad): New.
13380 (enqueue_one_deferred_signal): New.
13381 (dequeue_one_deferred_signal): New.
13382 (linux_wait_for_event_1): If moving out of a jump pad, defer
13383 pending signals to later.
13384 (linux_stabilize_threads): New.
13385 (linux_wait_1): Check if threads need moving out of jump pads, and
13386 do it if so.
13387 (stuck_in_jump_pad_callback): New.
13388 (move_out_of_jump_pad_callback): New.
13389 (lwp_running): New.
13390 (linux_resume_one_lwp): Handle moving out of jump pads.
13391 (linux_set_resume_request): Dequeue deferred signals.
13392 (need_step_over_p): Also step over fast tracepoint jumps.
13393 (start_step_over): Also uninsert fast tracepoint jumps.
13394 (finish_step_over): Also reinsert fast tracepoint jumps.
13395 (linux_install_fast_tracepoint_jump): New.
13396 (linux_target_ops): Install linux_stabilize_threads and
13397 linux_install_fast_tracepoint_jump_pad.
13398 * linux-low.h (linux_target_ops) <get_thread_area,
13399 install_fast_tracepoint_jump_pad>: New fields.
13400 (struct lwp_info) <collecting_fast_tracepoint,
13401 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
13402 (linux_get_thread_area): Declare.
13403 * linux-x86-low.c (jump_insn): New.
13404 (x86_get_thread_area): New.
13405 (append_insns): New.
13406 (push_opcode): New.
13407 (amd64_install_fast_tracepoint_jump_pad): New.
13408 (i386_install_fast_tracepoint_jump_pad): New.
13409 (x86_install_fast_tracepoint_jump_pad): New.
13410 (the_low_target): Install x86_get_thread_area and
13411 x86_install_fast_tracepoint_jump_pad.
13412 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
13413 (struct fast_tracepoint_jump): New.
13414 (fast_tracepoint_jump_insn): New.
13415 (fast_tracepoint_jump_shadow): New.
13416 (find_fast_tracepoint_jump_at): New.
13417 (fast_tracepoint_jump_here): New.
13418 (delete_fast_tracepoint_jump): New.
13419 (set_fast_tracepoint_jump): New.
13420 (uninsert_fast_tracepoint_jumps_at): New.
13421 (reinsert_fast_tracepoint_jumps_at): New.
13422 (set_breakpoint_at): Use write_inferior_memory.
13423 (uninsert_raw_breakpoint): Use write_inferior_memory.
13424 (check_mem_read): Mask out fast tracepoint jumps.
13425 (check_mem_write): Mask out fast tracepoint jumps.
13426 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
13427 (set_fast_tracepoint_jump): Declare.
13428 (delete_fast_tracepoint_jump)
13429 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
13430 (reinsert_fast_tracepoint_jumps_at): Declare.
13431 * regcache.c: Don't compile many functions when building the
13432 in-process agent library.
13433 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
13434 the register buffer in the heap.
13435 (free_register_cache): If the register buffer isn't owned by the
13436 regcache, don't free it.
13437 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
13438 pre-existing register caches.
13439 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
13440 type.
13441 (convert_ascii_to_int): : Constify `from' parameter type.
13442 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
13443 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
13444 the needed buffer in-place.
13445 (relocate_instruction): New.
13446 * server.c (handle_query) <qSymbols>: If the target supports
13447 tracepoints, give it a chance of looking up symbols. Report
13448 support for fast tracepoints.
13449 (handle_status): Stabilize threads.
13450 (process_serial_event): Adjust.
13451 * server.h (struct fast_tracepoint_jump): Forward declare.
13452 (struct process_info) <fast_tracepoint_jumps>: New field.
13453 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
13454 (decode_X_packet, decode_M_packet): Adjust.
13455 (relocate_instruction): Declare.
13456 (in_process_agent_loaded): Declare.
13457 (tracepoint_look_up_symbols): Declare.
13458 (struct fast_tpoint_collect_status): Declare.
13459 (fast_tracepoint_collecting): Declare.
13460 (force_unlock_trace_buffer): Declare.
13461 (handle_tracepoint_bkpts): Declare.
13462 (initialize_low_tracepoint)
13463 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
13464 * target.h (struct target_ops) <stabilize_threads,
13465 install_fast_tracepoint_jump_pad>: New fields.
13466 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
13467 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
13468 [HAVE_STDINT_H]: Include stdint.h.
13469 (trace_debug_1): Rename to ...
13470 (trace_vdebug): ... this.
13471 (trace_debug): Rename to ...
13472 (trace_debug_1): ... this. Add `level' parameter.
13473 (trace_debug): New.
13474 (ATTR_USED, ATTR_NOINLINE): New.
13475 (IP_AGENT_EXPORT): New.
13476 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
13477 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
13478 (about_to_request_buffer_space, trace_buffer_is_full)
13479 (stopping_tracepoint, expr_eval_result, error_tracepoint)
13480 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
13481 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
13482 (traceframe_write_count, traceframes_created)
13483 (trace_state_variables)
13484 New renaming defines.
13485 (struct ipa_sym_addresses): New.
13486 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
13487 (symbol_list): New.
13488 (ipa_sym_addrs): New.
13489 (all_tracepoint_symbols_looked_up): New.
13490 (in_process_agent_loaded): New.
13491 (write_e_ipa_not_loaded): New.
13492 (maybe_write_ipa_not_loaded): New.
13493 (tracepoint_look_up_symbols): New.
13494 (debug_threads) [IN_PROCESS_AGENT]: New.
13495 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
13496 (UNKNOWN_SIDE_EFFECTS): New.
13497 (stop_tracing): New.
13498 (flush_trace_buffer): New.
13499 (stop_tracing_bkpt): New.
13500 (flush_trace_buffer_bkpt): New.
13501 (read_inferior_integer): New.
13502 (read_inferior_uinteger): New.
13503 (read_inferior_data_pointer): New.
13504 (write_inferior_data_pointer): New.
13505 (write_inferior_integer): New.
13506 (write_inferior_uinteger): New.
13507 (struct collect_static_trace_data_action): Delete.
13508 (enum tracepoint_type): New.
13509 (struct tracepoint) <type>: New field `type'.
13510 <actions_str, step_actions, step_actions_str>: Only include in
13511 GDBserver.
13512 <orig_size, obj_addr_on_target, adjusted_insn_addr>
13513 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
13514 (tracepoints): Use IP_AGENT_EXPORT.
13515 (last_tracepoint): Don't include in the IPA.
13516 (stopping_tracepoint): Use IP_AGENT_EXPORT.
13517 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
13518 (alloced_trace_state_variables): New.
13519 (trace_state_variables): Use IP_AGENT_EXPORT.
13520 (traceframe_t): Delete unused variable.
13521 (circular_trace_buffer): Don't include in the IPA.
13522 (trace_buffer_start): Delete.
13523 (struct trace_buffer_control): New.
13524 (trace_buffer_free): Delete.
13525 (struct ipa_trace_buffer_control): New.
13526 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
13527 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
13528 New.
13529 (trace_buffer_ctrl): New.
13530 (TRACE_BUFFER_CTRL_CURR): New.
13531 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
13532 Reimplement as macros.
13533 (trace_buffer_wrap): Delete.
13534 (traceframe_write_count, traceframe_read_count)
13535 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
13536 (struct tracepoint_hit_ctx) <type>: New field.
13537 (struct fast_tracepoint_ctx): New.
13538 (memory_barrier): New.
13539 (cmpxchg): New.
13540 (record_tracepoint_error): Update atomically in the IPA.
13541 (clear_inferior_trace_buffer): New.
13542 (about_to_request_buffer_space): New.
13543 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
13544 updating the same buffer.
13545 (add_tracepoint): Default the tracepoint's type to trap
13546 tracepoint, and orig_size to -1.
13547 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
13548 internal variables.
13549 (create_trace_state_variable): New parameter `gdb'. Handle it.
13550 (clear_installed_tracepoints): Clear fast tracepoint jumps.
13551 (cmd_qtdp): Handle fast tracepoints.
13552 (cmd_qtdv): Adjust.
13553 (max_jump_pad_size): New.
13554 (gdb_jump_pad_head): New.
13555 (get_jump_space_head): New.
13556 (claim_jump_space): New.
13557 (sort_tracepoints): New.
13558 (MAX_JUMP_SIZE): New.
13559 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
13560 IPA.
13561 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
13562 support. Upload fast traceframes, and delete internal IPA
13563 breakpoints.
13564 (stop_tracing_handler): New.
13565 (flush_trace_buffer_handler): New.
13566 (cmd_qtstop): Upload fast tracepoints.
13567 (response_tracepoint): Handle fast tracepoints.
13568 (tracepoint_finished_step): Upload fast traceframes. Set the
13569 tracepoint hit context's tracepoint type.
13570 (handle_tracepoint_bkpts): New.
13571 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
13572 type. Add comment about fast tracepoints.
13573 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
13574 non-existing action_str field.
13575 (get_context_regcache): Handle fast tracepoints.
13576 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
13577 to the regcache.
13578 (fast_tracepoint_from_jump_pad_address): New.
13579 (fast_tracepoint_from_ipa_tpoint_address): New.
13580 (collecting_t): New.
13581 (force_unlock_trace_buffer): New.
13582 (fast_tracepoint_collecting): New.
13583 (collecting): New.
13584 (gdb_collect): New.
13585 (write_inferior_data_ptr): New.
13586 (target_tp_heap): New.
13587 (target_malloc): New.
13588 (download_agent_expr): New.
13589 (UALIGN): New.
13590 (download_tracepoints): New.
13591 (download_trace_state_variables): New.
13592 (upload_fast_traceframes): New.
13593 (IPA_FIRST_TRACEFRAME): New.
13594 (IPA_NEXT_TRACEFRAME_1): New.
13595 (IPA_NEXT_TRACEFRAME): New.
13596 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
13597 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
13598 (gdb_jump_pad_buffer_end): New.
13599 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
13600 (initialize_tracepoint): Adjust.
13601 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
13602 buffer. Initialize the low module.
13603 * utils.c (PREFIX, TOOLNAME): New.
13604 (malloc_failure): Use PREFIX.
13605 (error): In the IPA, an error causes an exit.
13606 (fatal, warning): Use PREFIX.
13607 (internal_error): Use TOOLNAME.
13608 (NUMCELLS): Increase to 10.
13609 * configure, config.in: Regenerate.
13610
13611 2010-06-01 Pedro Alves <pedro@codesourcery.com>
13612
13613 * server.c (handle_query) <qSupported>: Do two passes over the
13614 qSupported string to avoid nesting strtok.
13615
13616 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
13617
13618 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
13619 (CDEPS): New.
13620 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
13621 -Wl,--dynamic-list.
13622 * configure: Regenerate.
13623 * proc-service.list: New.
13624
13625 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
13626
13627 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
13628 New comment.
13629
13630 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
13631
13632 * gdbreplay.c (remote_open): Check error return from socket() call by
13633 its equality to -1 not by it being negative.
13634 * remote-utils.c (remote_open): Likewise.
13635
13636 2010-05-23 Pedro Alves <pedro@codesourcery.com>
13637
13638 * config.h: Regenerate.
13639
13640 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
13641
13642 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
13643 doesn't provide PTRACE_GET_THREAD_AREA.
13644
13645 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
13646
13647 * linux-m68k-low.c: Include <asm/ptrace.h>
13648 (ps_get_thread_area): Implement.
13649
13650 2010-05-03 Doug Evans <dje@google.com>
13651
13652 * event-loop.c (struct callback_event): New struct.
13653 (callback_list): New global.
13654 (append_callback_event, delete_callback_event): New functions.
13655 (process_callback): New function.
13656 (start_event_loop): Call it.
13657 * remote-utils.c (NOT_SCHEDULED): Define.
13658 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
13659 moved out of readchar.
13660 (readchar): Rewrite. Call reschedule before returning.
13661 (reset_readchar): New function.
13662 (remote_close): Call it.
13663 (process_remaining, reschedule): New functions.
13664 * server.h (callback_handler_func): New typedef.
13665 (append_callback_event, delete_callback_event): Declare.
13666
13667 2010-05-03 Pedro Alves <pedro@codesourcery.com>
13668
13669 * proc-service.c (ps_pglobal_lookup): Use
13670 thread_db_look_up_one_symbol.
13671 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
13672 parameter. Use it instead of all_symbols_looked_up.
13673 * server.h (struct process_info) <all_symbols_looked_up>: Delete
13674 field.
13675 (all_symbols_looked_up): Don't declare.
13676 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
13677 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
13678 field.
13679 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
13680 Set all_symbols_looked_up here.
13681 (thread_db_look_up_one_symbol): New.
13682 (thread_db_get_tls_address): Adjust.
13683 (thread_db_load_search, try_thread_db_load_1): Always allocate the
13684 thread_db object on the heap, and tentatively set it in the
13685 process structure.
13686 (thread_db_init): Don't set all_symbols_looked_up here.
13687 * linux-low.h (thread_db_look_up_one_symbol): Declare.
13688
13689 2010-05-03 Pedro Alves <pedro@codesourcery.com>
13690
13691 * linux-low.c (linux_kill, linux_detach): Adjust.
13692 (status_pending_p_callback): Remove redundant statement. Check
13693 for !TARGET_WAITIKIND_IGNORE, instead of
13694 TARGET_WAITKIND_STOPPED.
13695 (handle_tracepoints): Make sure LWP is locked. Adjust.
13696 (linux_wait_for_event_1): Adjust.
13697 (linux_cancel_breakpoints): New.
13698 (unsuspend_one_lwp): New.
13699 (unsuspend_all_lwps): New.
13700 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
13701 (send_sigstop_callback): Change return type to int, add new
13702 `except' parameter and handle it.
13703 (suspend_and_send_sigstop_callback): New.
13704 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
13705 pass them down. If SUSPEND, also increment the lwp's suspend
13706 count.
13707 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
13708 (need_step_over_p): Don't consider suspended LWPs.
13709 (start_step_over): Adjust.
13710 (proceed_one_lwp): Change return type to int, add new `except'
13711 parameter and handle it.
13712 (unsuspend_and_proceed_one_lwp): New.
13713 (proceed_all_lwps): Use find_inferior instead of
13714 for_each_inferior.
13715 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
13716 also decrement the suspend count of LWPs. Pass `except' down,
13717 instead of hacking its suspend count.
13718 (linux_pause_all): Add `freeze' parameter. Adjust.
13719 (linux_unpause_all): New.
13720 (linux_target_ops): Install linux_unpause_all.
13721 * server.c (handle_status): Adjust.
13722 * target.h (struct target_ops): New fields `unpause_all' and
13723 `cancel_breakpoints'. Add new parameter to `pause_all'.
13724 (pause_all): Add new `freeze' parameter.
13725 (unpause_all): New.
13726 (cancel_breakpoints): New.
13727 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
13728 cancel breakpoints.
13729 (cmd_qtstart): Pause threads.
13730 (stop_tracing): Pause threads, and cancel breakpoints.
13731 * win32-low.c (win32_target_ops): Adjust.
13732
13733 2010-05-03 Pedro Alves <pedro@codesourcery.com>
13734
13735 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
13736 the inferior right away from here...
13737 (linux_wait_1): ... to here, and adjust to check the thread's
13738 last_resume_kind instead of the lwp's step or stop_expected flags.
13739
13740 2010-05-02 Pedro Alves <pedro@codesourcery.com>
13741
13742 * README: Use consistent `GDB' and `GDBserver' spellings.
13743
13744 2010-05-02 Pedro Alves <pedro@codesourcery.com>
13745
13746 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
13747 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
13748 (linux_detach_one_lwp): Assume the lwp is stopped.
13749 (any_thread_of): Delete.
13750 (linux_detach): Stop all lwps here. Don't blindly delete all
13751 breakpoints.
13752 (delete_lwp_callback): New.
13753 (linux_mourn): Delete all lwps of the process that is gone.
13754 (linux_wait_1): Don't delete the last lwp of the process here.
13755 * mem-break.h (mark_breakpoints_out): Declare.
13756 * mem-break.c (mark_breakpoints_out): New.
13757 (free_all_breakpoints): Use it.
13758 * server.c (handle_target_event): If the process is gone, mark
13759 breakpoints out.
13760 * thread-db.c (struct thread_db) <create_bp>: New field.
13761 (thread_db_enable_reporting): Fix prototype. Store a thread event
13762 breakpoint reference in the thread_db struct.
13763 (thread_db_load_search): Clear the thread_db object.
13764 (try_thread_db_load_1): Ditto.
13765 (switch_to_process): New.
13766 (disable_thread_event_reporting): Use it.
13767 (remove_thread_event_breakpoints): New.
13768 (thread_db_detach, thread_db_mourn): Use it.
13769
13770 2010-05-01 Pedro Alves <pedro@codesourcery.com>
13771
13772 * linux-low.c (linux_enable_event_reporting): New.
13773 (linux_wait_for_event_1, handle_extended_wait): Use it.
13774
13775 2010-04-30 Pedro Alves <pedro@codesourcery.com>
13776
13777 * linux-low.c (linux_kill_one_lwp, linux_kill)
13778 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
13779 (send_sigstop): Take an lwp_info as parameter instead. Queue a
13780 SIGSTOP even if the LWP is stopped.
13781 (send_sigstop_callback): New.
13782 (stop_all_lwps): Use send_sigstop_callback instead.
13783 (linux_resume_one_thread): Adjust.
13784 (proceed_one_lwp): Still proceed an LWP that the client has
13785 requested to stop, if we haven't reported it as stopped yet. Make
13786 sure that LWPs the client want stopped, have a pending SIGSTOP.
13787
13788 2010-04-26 Doug Evans <dje@google.com>
13789
13790 * server.c (handle_general_set): Make static.
13791
13792 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
13793 Print received char after testing for error/eof instead of before.
13794 (input_interrupt): Tweak comment.
13795
13796 2010-04-23 Doug Evans <dje@google.com>
13797
13798 * server.c (start_inferior): Print inferior argv if --debug.
13799
13800 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
13801
13802 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
13803 * nto-x86-low.c: Include server.h
13804
13805 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
13806
13807 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
13808 be consistent with other sources of this directory.
13809 (init_registers_amd64): Correct name of source file of this function
13810 in the comment.
13811
13812 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
13813
13814 * configure.srv (x86_64-*-mingw*): New configuration for Windows
13815 64-bit executables.
13816
13817 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
13818
13819 * win32-i386-low.c: Add 64-bit support.
13820 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
13821 (init_registers_amd64): Declare.
13822 (mappings): Add 64-bit version of array.
13823 (init_windows_x86): New function.
13824 (the_low_target): Change init_arch field to init_windows_x86.
13825
13826 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
13827
13828 * win32-low.c: Adapt to support also 64-bit architecture.
13829 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
13830 (get_image_name): Use SIZE_T type for local variable `done'.
13831 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
13832 (toolhelp_get_dll_name): Idem.
13833 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
13834 Use uintptr_t typecast to avoid warning.
13835 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
13836 (handle_exception): Use phex_nz to avoid warning.
13837 (win32_wait): Remove unused local variable `process'.
13838
13839 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
13840
13841 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
13842 `amd64-avx.o'.
13843
13844 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
13845
13846 * configure.ac: Use `ws2_32' library for srv_mingw.
13847 * configure: Regenerate.
13848 * gdbreplay.c: Include winsock2.h instead of winsock.h.
13849 * remote-utils.c: Likewise.
13850
13851 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
13852
13853 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
13854 if __x86_64__ is defined.
13855
13856 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
13857
13858 * configure: Regenerate.
13859
13860 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
13861
13862 * server.c (handle_query): Handle 'qGetTIBAddr' query.
13863 * target.h (target_ops): New get_tib_address field.
13864 * win32-low.h (win32_thread_info): Add thread_local_base field.
13865 * win32-low.c (child_add_thread): Add tlb argument.
13866 Set thread_local_base field to TLB.
13867 (get_child_debug_event): Adapt to child_add_thread change.
13868 (win32_get_tib_address): New function.
13869 (win32_target_ops): Set get_tib_address field to
13870 win32_get_tib_address.
13871 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
13872
13873 2010-04-12 Pedro Alves <pedro@codesourcery.com>
13874
13875 * linux-low.c (linux_mourn): Also remove the process.
13876 * server.c (handle_target_event): Don't remove the process here.
13877 * nto-low.c (nto_mourn): New.
13878 (nto_target_ops): Install it.
13879 * spu-low.c (spu_mourn): New.
13880 (spu_target_ops): Install it.
13881 * win32-low.c (win32_mourn): New.
13882 (win32_target_ops): Install it.
13883
13884 2010-04-12 Pedro Alves <pedro@codesourcery.com>
13885
13886 * server.h (buffer_xml_printf): Remove redundant `;'.
13887
13888 2010-04-12 Pedro Alves <pedro@codesourcery.com>
13889
13890 * regcache.c (set_register_cache): Invalidate regcaches before
13891 changing the register cache layout.
13892 (regcache_invalidate_one): Allow a NULL regcache.
13893 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
13894 regcaches before changing the register cache layout or the target
13895 regsets.
13896
13897 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
13898
13899 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
13900 variable warning on Linux/x86-64.
13901
13902 2010-04-11 Pedro Alves <pedro@codesourcery.com>
13903
13904 GDBserver disconnected tracing support.
13905
13906 * linux-low.c (linux_remove_process): Delete.
13907 (add_lwp): Don't set last_resume_kind here.
13908 (linux_kill): Use `mourn'.
13909 (linux_detach): Use `thread_db_detach', and `mourn'.
13910 (linux_mourn): New.
13911 (linux_attach_lwp_1): Adjust comment.
13912 (linux_attach): last_resume_kind moved the thread_info; adjust.
13913 (status_pending_p_callback): Adjust.
13914 (linux_wait_for_event_1): Adjust.
13915 (count_events_callback, select_singlestep_lwp_callback)
13916 (select_event_lwp_callback, cancel_breakpoints_callback)
13917 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
13918 (proceed_one_lwp): Adjust.
13919 (linux_async): Add debug output.
13920 (linux_thread_stopped): New.
13921 (linux_pause_all): New.
13922 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
13923 linux_pause_all.
13924 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
13925 (thread_db_free): Delete declaration.
13926 (thread_db_detach, thread_db_mourn): Declare.
13927 * thread-db.c (thread_db_init): Use thread_db_mourn.
13928 (thread_db_free): Delete, split in two.
13929 (disable_thread_event_reporting): New.
13930 (thread_db_detach): New.
13931 (thread_db_mourn): New.
13932
13933 * server.h (struct thread_info) <last_resume_kind>: New field.
13934 <attached>: Add comment.
13935 <gdb_detached>: New field.
13936 (handler_func): Change return type to int.
13937 (handle_serial_event, handle_target_event): Ditto.
13938 (gdb_connected): Declare.
13939 (tracing): Delete.
13940 (disconnected_tracing): Declare.
13941 (stop_tracing): Declare.
13942
13943 * server.c (handle_query) <qSupported>: Report support for
13944 disconnected tracing.
13945 (queue_stop_reply_callback): Account for running threads.
13946 (gdb_wants_thread_stopped): New.
13947 (gdb_wants_all_threads_stopped): New.
13948 (gdb_reattached_process): New.
13949 (handle_status): Clear the `gdb_detached' flag of all processes.
13950 In all-stop, stop all threads.
13951 (main): Be sure to leave tfind mode. Handle disconnected tracing.
13952 (process_serial_event): If the remote connection breaks, or if an
13953 exit was forced with "monitor exit", force an event loop exit.
13954 Handle disconnected tracing on detach.
13955 (handle_serial_event): Adjust.
13956 (handle_target_event): If GDB isn't connected, forward events back
13957 to the inferior, unless the last process exited, in which case,
13958 exit gdbserver. Adjust interface.
13959
13960 * remote-utils.c (remote_open): Don't block in accept. Instead
13961 register an event loop source on the listen socket file
13962 descriptor. Refactor bits into ...
13963 (listen_desc): ... this new global.
13964 (gdb_connected): ... this new function.
13965 (enable_async_notification): ... this new function.
13966 (handle_accept_event): ... this new function.
13967 (remote_close): Clear remote_desc.
13968
13969 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
13970
13971 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
13972 New fields.
13973 (mourn_inferior): Define.
13974 (target_process_qsupported): Avoid the dangling else problem.
13975 (thread_stopped): Define.
13976 (pause_all): Define.
13977 (target_waitstatus_to_string): Declare.
13978 * target.c (target_waitstatus_to_string): New.
13979
13980 * tracepoint.c (tracing): Make extern.
13981 (disconnected_tracing): New.
13982 (stop_tracing): Make extern. Handle tracing stops due to GDB
13983 disconnecting.
13984 (cmd_qtdisconnected): New.
13985 (cmd_qtstatus): Report disconnected tracing status in trace reply.
13986 (handle_tracepoint_general_set): Handle QTDisconnected.
13987
13988 * event-loop.c (event_handler_func): Change return type to int.
13989 (process_event): Bail out if the event handler wants the event
13990 loop to stop.
13991 (handle_file_event): Ditto.
13992 (start_event_loop): Bail out if the event handler wants the event
13993 loop to stop.
13994
13995 * nto-low.c (nto_target_ops): Adjust.
13996 * spu-low.c (spu_wait): Don't remove the process here.
13997 (spu_target_ops): Adjust.
13998 * win32-low.c (win32_wait): Don't remove the process here.
13999 (win32_target_ops): Adjust.
14000
14001 2010-04-11 Pedro Alves <pedro@codesourcery.com>
14002
14003 * regcache.c (realloc_register_cache): Invalidate inferior's
14004 regcache before recreating it.
14005
14006 2010-04-09 Pedro Alves <pedro@codesourcery.com>
14007
14008 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
14009
14010 2010-04-09 Stan Shebs <stan@codesourcery.com>
14011 Pedro Alves <pedro@codesourcery.com>
14012
14013 * server.h (LONGEST): New.
14014 (struct thread_info) <while_stepping>: New field.
14015 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
14016 Declare.
14017 (initialize_tracepoint, handle_tracepoint_general_set)
14018 (handle_tracepoint_query, tracepoint_finished_step)
14019 (tracepoint_was_hit, release_while_stepping_state_list):
14020 (current_traceframe): Declare.
14021 * server.c (handle_general_set): Handle tracepoint packets.
14022 (read_memory): New.
14023 (write_memory): New.
14024 (handle_search_memory_1): Use read_memory.
14025 (handle_query): Report support for conditional tracepoints, trace
14026 state variables, and tracepoint sources. Handle tracepoint
14027 queries.
14028 (main): Initialize the tracepoints module.
14029 (process_serial_event): Handle traceframe reads/writes.
14030
14031 * linux-low.c (handle_tracepoints): New.
14032 (linux_wait_1): Call it.
14033 (linux_resume_one_lwp): Handle while-stepping.
14034 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
14035 (linux_target_ops): Install them.
14036 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
14037 New field.
14038 * linux-x86-low.c (x86_supports_tracepoints): New.
14039 (the_low_target). Install it.
14040
14041 * mem-break.h (delete_breakpoint): Declare.
14042 * mem-break.c (delete_breakpoint): Make external.
14043
14044 * target.h (struct target_ops): Add `supports_tracepoints',
14045 `read_pc', and `write_pc' fields.
14046 (target_supports_tracepoints): Define.
14047 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
14048 (phex_nz): New.
14049
14050 * regcache.h (struct regcache) <registers_owned>: New field.
14051 (init_register_cache, regcache_cpy): Declare.
14052 (regcache_read_pc, regcache_write_pc): Declare.
14053 (register_cache_size): Declare.
14054 (supply_regblock): Declare.
14055 * regcache.c (init_register_cache): New.
14056 (new_register_cache): Use it.
14057 (regcache_cpy): New.
14058 (register_cache_size): New.
14059 (supply_regblock): New.
14060 (regcache_read_pc, regcache_write_pc): New.
14061
14062 * tracepoint.c: New.
14063
14064 * Makefile.in (OBS): Add tracepoint.o.
14065 (tracepoint.o): New rule.
14066
14067 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
14068
14069 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
14070 (i386-mmx.o): New.
14071 (i386-mmx.c): Likewise.
14072 (i386-mmx-linux.o): Likewise.
14073 (i386-mmx-linux.c): Likewise.
14074
14075 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
14076 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
14077 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
14078 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
14079
14080 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
14081 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
14082 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
14083
14084 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
14085
14086 * Makefile.in (clean): Updated.
14087 (i386-avx.o): New.
14088 (i386-avx.c): Likewise.
14089 (i386-avx-linux.o): Likewise.
14090 (i386-avx-linux.c): Likewise.
14091 (amd64-avx.o): Likewise.
14092 (amd64-avx.c): Likewise.
14093 (amd64-avx-linux.o): Likewise.
14094 (amd64-avx-linux.c): Likewise.
14095
14096 * configure.srv (srv_i386_regobj): Add i386-avx.o.
14097 (srv_i386_linux_regobj): Add i386-avx-linux.o.
14098 (srv_amd64_regobj): Add amd64-avx.o.
14099 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
14100 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
14101 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
14102 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
14103 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
14104 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
14105 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
14106
14107 * i387-fp.c: Include "i386-xstate.h".
14108 (i387_xsave): New.
14109 (i387_cache_to_xsave): Likewise.
14110 (i387_xsave_to_cache): Likewise.
14111 (x86_xcr0): Likewise.
14112
14113 * i387-fp.h (i387_cache_to_xsave): Likewise.
14114 (i387_xsave_to_cache): Likewise.
14115 (x86_xcr0): Likewise.
14116
14117 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
14118 * linux-crisv32-low.c (target_regsets): Likewise.
14119 * linux-m68k-low.c (target_regsets): Likewise.
14120 * linux-mips-low.c (target_regsets): Likewise.
14121 * linux-ppc-low.c (target_regsets): Likewise.
14122 * linux-s390-low.c (target_regsets): Likewise.
14123 * linux-sh-low.c (target_regsets): Likewise.
14124 * linux-sparc-low.c (target_regsets): Likewise.
14125 * linux-xtensa-low.c (target_regsets): Likewise.
14126
14127 * linux-low.c: Include <sys/uio.h>.
14128 (regsets_fetch_inferior_registers): Support nt_type.
14129 (regsets_store_inferior_registers): Likewise.
14130 (linux_process_qsupported): New.
14131 (linux_target_ops): Add linux_process_qsupported.
14132
14133 * linux-low.h (regset_info): Add nt_type.
14134 (linux_target_ops): Add process_qsupported.
14135
14136 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
14137 and <sys/uio.h>.
14138 (init_registers_i386_avx_linux): New.
14139 (init_registers_amd64_avx_linux): Likewise.
14140 (xmltarget_i386_linux_no_xml): Likewise.
14141 (xmltarget_amd64_linux_no_xml): Likewise.
14142 (PTRACE_GETREGSET): Likewise.
14143 (PTRACE_SETREGSET): Likewise.
14144 (x86_fill_xstateregset): Likewise.
14145 (x86_store_xstateregset): Likewise.
14146 (use_xml): Likewise.
14147 (x86_linux_update_xmltarget): Likewise.
14148 (x86_linux_process_qsupported): Likewise.
14149 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
14150 (x86_arch_setup): Don't call init_registers_amd64_linux nor
14151 init_registers_i386_linux here. Call
14152 x86_linux_update_xmltarget.
14153 (the_low_target): Add x86_linux_process_qsupported.
14154
14155 * server.c (handle_query): Call target_process_qsupported.
14156
14157 * target.h (target_ops): Add process_qsupported.
14158 (target_process_qsupported): New.
14159
14160 2010-04-03 Pedro Alves <pedro@codesourcery.com>
14161
14162 * inferiors.c (add_thread): Set last_status kind to
14163 TARGET_WAITKIND_IGNORE.
14164 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
14165 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
14166 (linux_wait_1): Move `thread' local definition to block that uses
14167 it. Don't NULL initialize `event_child'.
14168 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
14169 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
14170 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
14171
14172 2010-04-01 Pedro Alves <pedro@codesourcery.com>
14173
14174 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
14175 an extended waitstatus, or by a watchpoint.
14176 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
14177 thread was stepping or has been stopped by a watchpoint.
14178
14179 2010-04-01 Pedro Alves <pedro@codesourcery.com>
14180
14181 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
14182 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
14183 of another, then delete the previous, and validate all
14184 breakpoints.
14185 (validate_inserted_breakpoint): New.
14186 (delete_disabled_breakpoints): New.
14187 (validate_breakpoints): New.
14188 (check_mem_read): Validate breakpoints before trusting their
14189 shadow. Delete disabled breakpoints.
14190 (check_mem_write): Validate breakpoints before trusting they
14191 should be inserted. Delete disabled breakpoints.
14192 * mem-break.h (validate_breakpoints):
14193 * server.c (handle_query): Validate breakpoints when we see a
14194 qSymbol query.
14195
14196 2010-04-01 Pedro Alves <pedro@codesourcery.com>
14197
14198 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
14199 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
14200 if we could tell there's a GDB breakpoint at stop_pc.
14201 (need_step_over_p): Don't do a step over if we find a GDB
14202 breakpoint at the resume PC.
14203
14204 * mem-break.c (struct raw_breakpoint): New.
14205 (enum bkpt_type): New type `gdb_breakpoint'.
14206 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
14207 fields. New field `raw'.
14208 (find_raw_breakpoint_at): New.
14209 (set_raw_breakpoint_at): Handle refcounting. Create a raw
14210 breakpoint instead.
14211 (set_breakpoint_at): Adjust.
14212 (delete_raw_breakpoint): New.
14213 (release_breakpoint): New.
14214 (delete_breakpoint): Rename to...
14215 (delete_breakpoint_1): ... this. Add proc parameter. Use
14216 release_breakpoint. Return ENOENT.
14217 (delete_breakpoint): Reimplement.
14218 (find_breakpoint_at): Delete.
14219 (find_gdb_breakpoint_at): New.
14220 (delete_breakpoint_at): Delete.
14221 (set_gdb_breakpoint_at): New.
14222 (delete_gdb_breakpoint_at): New.
14223 (gdb_breakpoint_here): New.
14224 (set_reinsert_breakpoint): Use release_breakpoint.
14225 (uninsert_breakpoint): Rename to ...
14226 (uninsert_raw_breakpoint): ... this.
14227 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
14228 (reinsert_raw_breakpoint): Change parameter type to
14229 raw_breakpoint.
14230 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
14231 instead.
14232 (check_breakpoints): Adjust. Use release_breakpoint.
14233 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
14234 (breakpoint_inserted_here): Ditto.
14235 (check_mem_read): Adjust to iterate over raw breakpoints instead.
14236 Don't trust the breakpoint's shadow if it is not inserted.
14237 (check_mem_write): Adjust to iterate over raw breakpoints instead.
14238 (delete_all_breakpoints): Adjust.
14239 (free_all_breakpoints): Mark all breakpoints as uninserted, and
14240 use delete_breakpoint_1.
14241
14242 * mem-break.h (breakpoints_supported): Delete declaration.
14243 (set_gdb_breakpoint_at): Declare.
14244 (gdb_breakpoint_here): Declare.
14245 (delete_breakpoint_at): Delete.
14246 (delete_gdb_breakpoint_at): Declare.
14247
14248 * server.h (struct raw_breakpoint): Forward declare.
14249 (struct process_info): New field `raw_breakpoints'.
14250
14251 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
14252 breakpoints.
14253
14254 2010-03-24 Pedro Alves <pedro@codesourcery.com>
14255
14256 * linux-low.c (status_pending_p_callback): Fix comment.
14257 (linux_wait_for_event_1): Move most of the internal breakpoint
14258 handling from here...
14259 (linux_wait_1): ... to here.
14260 (count_events_callback): New.
14261 (select_singlestep_lwp_callback): New.
14262 (select_event_lwp_callback): New.
14263 (cancel_breakpoints_callback): New.
14264 (select_event_lwp): New.
14265 (linux_wait_1): Simplify internal breakpoint handling. Give equal
14266 priority to all LWPs that have had events that should be reported
14267 to the client. Cancel breakpoints when about to reporting the
14268 event to the client, not while stopping lwps. No longer cancel
14269 finished single-steps here.
14270 (cancel_finished_single_step): Delete.
14271 (cancel_finished_single_steps): Delete.
14272
14273 2010-03-24 Pedro Alves <pedro@codesourcery.com>
14274
14275 * mem-break.c (enum bkpt_type): New.
14276 (struct breakpoint): New field `type'.
14277 (set_breakpoint_at): Change return type to struct breakpoint
14278 pointer. Set type to `other_breakpoint' by default.
14279 (delete_breakpoint): Rewrite, supporting more than one breakpoint
14280 in the breakpoint list.
14281 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
14282 (reinsert_breakpoint): Rename to ...
14283 (reinsert_raw_breakpoint): ... this.
14284 (reinsert_breakpoints_at): Adjust.
14285 * mem-break.h (struct breakpoint): Declare.
14286 (set_breakpoint_at): Change return type to struct breakpoint
14287 pointer.
14288
14289 2010-03-24 Pedro Alves <pedro@codesourcery.com>
14290
14291 * server.c (handle_query): Assign, not compare.
14292
14293 2010-03-24 Pedro Alves <pedro@codesourcery.com>
14294
14295 Teach linux gdbserver to step-over-breakpoints.
14296
14297 * linux-low.c (can_hardware_single_step): New.
14298 (supports_breakpoints): New.
14299 (handle_extended_wait): If stopping threads, read the stop pc of
14300 the new cloned LWP.
14301 (get_pc): New.
14302 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
14303 low target doesn't support retrieving the PC.
14304 (add_lwp): Set last_resume_kind to resume_continue.
14305 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
14306 (linux_attach): Don't clear stop_expected. Set the lwp's
14307 last_resume_kind to resume_stop.
14308 (linux_detach_one_lwp): Don't check for removed breakpoints.
14309 (check_removed_breakpoint): Delete.
14310 (status_pending_p): Rename to ...
14311 (status_pending_p_callback): ... this. Don't check for removed
14312 breakpoints. Don't consider threads that are stopped from GDB's
14313 perspective.
14314 (linux_wait_for_lwp): Always read the stop_pc here.
14315 (cancel_breakpoint): New.
14316 (step_over_bkpt): New global.
14317 (linux_wait_for_event_1): Implement stepping over breakpoints.
14318 (gdb_wants_lwp_stopped): New.
14319 (gdb_wants_all_stopped): New.
14320 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
14321 single-step traps here. Store the thread's last reported target
14322 wait status.
14323 (send_sigstop): Don't clear stop_expected. Always set it,
14324 instead.
14325 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
14326 (cancel_finished_single_step): New.
14327 (cancel_finished_single_steps): New.
14328 (wait_for_sigstop): Don't cancel finished single-step traps here.
14329 (linux_resume_one_lwp): Don't check for removed breakpoints.
14330 Don't set `step' on non-hardware step archs.
14331 (linux_set_resume_request): Ignore resume_stop requests if already
14332 stopping or stopped. Set the lwp's last_resume_kind.
14333 (resume_status_pending_p): Don't check for removed breakpoints.
14334 (need_step_over_p): New.
14335 (start_step_over): New.
14336 (finish_step_over): New.
14337 (linux_resume_one_thread): Always queue a sigstop for resume_stop
14338 requests. Clear the thread's last reported target waitstatus.
14339 Don't use the `suspended' flag. Don't consider pending breakpoints.
14340 (linux_resume): Start a step-over if necessary.
14341 (proceed_one_lwp): New.
14342 (proceed_all_lwps): New.
14343 (unstop_all_lwps): New.
14344 * linux-low.h (struct lwp_info): Rewrite comment for the
14345 `suspended' flag. Add the `stop_pc' field. Delete the
14346 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
14347 Add `'last_resume_kind' and `need_step_over' fields.
14348 * inferiors.c (struct thread_info): Delete, moved elsewhere.
14349 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
14350 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
14351 (set_raw_breakpoint_at): New.
14352 (set_breakpoint_at): Rewrite to use it.
14353 (reinsert_breakpoint_handler): Delete.
14354 (set_reinsert_breakpoint): New.
14355 (reinsert_breakpoint_by_bp): Delete.
14356 (delete_reinsert_breakpoints): New.
14357 (uninsert_breakpoint): Rewrite.
14358 (uninsert_breakpoints_at): New.
14359 (reinsert_breakpoint): Rewrite.
14360 (reinsert_breakpoints_at): New.
14361 (check_breakpoints): Rewrite.
14362 (breakpoint_here): New.
14363 (breakpoint_inserted_here): New.
14364 (check_mem_read): Adjust.
14365 * mem-break.h (breakpoints_supported, breakpoint_here)
14366 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
14367 (reinsert_breakpoint_by_bp): Delete declaration.
14368 (delete_reinsert_breakpoints): Declare.
14369 (reinsert_breakpoint): Delete declaration.
14370 (reinsert_breakpoints_at): Declare.
14371 (uninsert_breakpoint): Delete declaration.
14372 (uninsert_breakpoints_at): Declare.
14373 (check_breakpoints): Adjust prototype.
14374 * server.h: Adjust include order.
14375 (struct thread_info): Declare here. Add a `last_status' field.
14376
14377 2010-03-23 Michael Snyder <msnyder@vmware.com>
14378
14379 * server.c (crc32): New function.
14380 (handle_query): Add handling for 'qCRC:' request.
14381
14382 2010-03-23 Pedro Alves <pedro@codesourcery.com>
14383
14384 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
14385 lwp had been stopped by a watchpoint.
14386
14387 2010-03-16 Pedro Alves <pedro@codesourcery.com>
14388
14389 * server.h (internal_error): Declare.
14390 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
14391 * utils.c (internal_error): New function.
14392
14393 2010-03-15 Andreas Schwab <schwab@redhat.com>
14394
14395 * configure.srv: Fix typo setting srv_regobj.
14396
14397 2010-03-15 Pedro Alves <pedro@codesourcery.com>
14398
14399 * linux-low.c (fetch_register): Avoid passing a non string literal
14400 format to `error'.
14401 (usr_store_inferior_registers): Ditto.
14402
14403 2010-03-14 Pedro Alves <pedro@codesourcery.com>
14404
14405 * linux-low.c (linux_write_memory): Bail out early if peeking
14406 memory failed.
14407
14408 2010-03-14 Pedro Alves <pedro@codesourcery.com>
14409
14410 * linux-low.h (struct lwp_info): New fields
14411 `stopped_by_watchpoint' and `stopped_data_address'.
14412 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
14413 here, and cache them in the lwp object.
14414 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
14415 directly.
14416 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
14417 field.
14418 (linux_stopped_by_watchpoint): Rewrite.
14419 (linux_stopped_data_address): Rewrite.
14420
14421 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
14422
14423 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
14424 switching the current inferior, not before.
14425
14426 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
14427
14428 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
14429 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
14430 i386-linux.c and amd64-linux.c.
14431 (reg-i386.o): Removed.
14432 (reg-i386.c): Likewise.
14433 (reg-i386-linux.o): Likewise.
14434 (reg-i386-linux.c): Likewise.
14435 (reg-x86-64.o): Likewise.
14436 (reg-x86-64.c): Likewise.
14437 (reg-x86-64-linux.o): Likewise.
14438 (reg-x86-64-linux.c): Likewise.
14439 (i386.o): New.
14440 (i386.c): Likewise.
14441 (i386-linux.o): Likewise.
14442 (i386-linux.c): Likewise.
14443 (amd64.o): Likewise.
14444 (amd64.c): Likewise.
14445 (amd64-linux.o): Likewise.
14446 (amd64-linux.c): Likewise.
14447
14448 * configure.srv (srv_i386_regobj): New.
14449 (srv_i386_linux_regobj): Likewise.
14450 (srv_amd64_regobj): Likewise.
14451 (srv_amd64_linux_regobj): Likewise.
14452 (srv_i386_32bit_xmlfiles): Likewise.
14453 (srv_i386_64bit_xmlfiles): Likewise.
14454 (srv_i386_xmlfiles): Likewise.
14455 (srv_amd64_xmlfiles): Likewise.
14456 (srv_i386_linux_xmlfiles): Likewise.
14457 (srv_amd64_linux_xmlfiles): Likewise.
14458 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
14459 srv_xmlfiles to $srv_i386_xmlfiles.
14460 (i[34567]86-*-mingw32ce*): Likewise.
14461 (i[34567]86-*-mingw*): Likewise.
14462 (i[34567]86-*-nto*): Likewise.
14463 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
14464 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
14465 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
14466 (x86_64-*-linux*): Likewise.
14467
14468 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
14469 (init_registers_amd64_linux): New.
14470 (x86_arch_setup): Replace init_registers_x86_64_linux with
14471 init_registers_amd64_linux.
14472
14473 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
14474
14475 * configure.ac: Check for libdl. If it is not available link against
14476 static libthread_db.
14477 * configure: Regenerate.
14478
14479 2010-02-22 Pedro Alves <pedro@codesourcery.com>
14480
14481 PR9605
14482
14483 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
14484 handing a read watchpoint.
14485 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
14486
14487 2010-02-12 Doug Evans <dje@google.com>
14488
14489 * linux-low.c (linux_supports_tracefork_flag): Document.
14490 (linux_look_up_symbols): Add comment.
14491
14492 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
14493
14494 * regcache.c (supply_register): Clear regcache if buf is NULL.
14495
14496 2010-02-02 Nicolas Roche <roche@sourceware.org>
14497 Joel Brobecker <brobecker@adacore.com>
14498
14499 * inferiors.c (find_inferior): Add function documentation.
14500 (unloaded_dll): Handle the case where the unloaded dll has not
14501 been previously registered in the dll list.
14502
14503 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
14504
14505 * linux-arm-low.c (thumb_breakpoint_len): Delete.
14506 (thumb2_breakpoint): New.
14507 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
14508
14509 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
14510
14511 * linux-low.c (get_stop_pc): Check for SIGTRAP.
14512 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
14513 breakpoints.
14514
14515 2010-01-21 Pedro Alves <pedro@codesourcery.com>
14516
14517 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
14518
14519 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
14520
14521 * linux-s390-low.c (s390_collect_ptrace_register)
14522 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
14523
14524 2010-01-21 Doug Evans <dje@google.com>
14525
14526 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
14527 (PTRACE_ARG4_TYPE): New macro.
14528 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
14529 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
14530 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
14531 (usr_store_inferior_registers): Ditto.
14532 (linux_read_memory, linux_write_memory): Ditto.
14533 (linux_test_for_tracefork): Ditto.
14534
14535 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
14536 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
14537
14538 2010-01-21 Pedro Alves <pedro@codesourcery.com>
14539
14540 * proc-service.c (ps_lgetregs): Don't refetch registers from the
14541 target.
14542
14543 2010-01-21 Pedro Alves <pedro@codesourcery.com>
14544
14545 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
14546 prototype to take a regcache. Adjust.
14547
14548 2010-01-20 Pedro Alves <pedro@codesourcery.com>
14549
14550 * regcache.h (struct thread_info): Forward declare.
14551 (struct regcache): New.
14552 (new_register_cache): Adjust prototype.
14553 (get_thread_regcache): Declare.
14554 (free_register_cache): Adjust prototype.
14555 (registers_to_string, registers_from_string): Ditto.
14556 (supply_register, supply_register_by_name, collect_register)
14557 (collect_register_as_string, collect_register_by_name): Ditto.
14558 * regcache.c (struct inferior_regcache_data): Delete.
14559 (get_regcache): Rename to ...
14560 (get_thread_regcache): ... this. Adjust. Switch inferior before
14561 fetching registers.
14562 (regcache_invalidate_one): Adjust.
14563 (regcache_invalidate): Fix prototype.
14564 (new_register_cache): Return the new register cache.
14565 (free_register_cache): Change prototype.
14566 (realloc_register_cache): Adjust.
14567 (registers_to_string): Change prototype to take a regcache. Adjust.
14568 (registers_from_string): Ditto.
14569 (register_data): Ditto.
14570 (supply_register): Ditto.
14571 (supply_register_by_name): Ditto.
14572 (collect_register): Ditto.
14573 (collect_register_as_string): Ditto.
14574 (collect_register_by_name): Ditto.
14575 * server.c (process_serial_event): Adjust.
14576 * linux-low.h (regset_fill_func, regset_store_func): Change
14577 prototype.
14578 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
14579 Change prototype.
14580 * linux-low.c (get_stop_pc): Adjust.
14581 (check_removed_breakpoint): Adjust.
14582 (linux_wait_for_event): Adjust.
14583 (linux_resume_one_lwp): Adjust.
14584 (fetch_register): Add regcache parameter. Adjust.
14585 (usr_store_inferior_registers): Ditto.
14586 (regsets_fetch_inferior_registers): Ditto.
14587 (regsets_store_inferior_registers): Ditto.
14588 (linux_fetch_registers, linux_store_registers): Ditto.
14589 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
14590 regcache. Adjust.
14591 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
14592 Ditto.
14593 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
14594 prototype to take a regcache.
14595 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
14596 * remote-utils.c (convert_ascii_to_int, outreg)
14597 (prepare_resume_reply): Change prototype to take a regcache.
14598 Adjust.
14599 * target.h (struct target_ops) <fetch_registers, store_registers>:
14600 Change prototype to take a regcache.
14601 (fetch_inferior_registers, store_inferior_registers): Change
14602 prototype to take a regcache. Adjust.
14603 * proc-service.c (ps_lgetregs): Adjust.
14604 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
14605 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
14606 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
14607 take a regcache. Adjust.
14608 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
14609 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
14610 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
14611 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
14612 * linux-cris-low.c (cris_get_pc, cris_set_pc)
14613 (cris_cannot_fetch_register):
14614 (cris_breakpoint_at): Change prototype to take a regcache.
14615 Adjust.
14616 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
14617 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
14618 to take a regcache. Adjust.
14619 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
14620 Adjust.
14621 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
14622 take a regcache. Adjust.
14623 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
14624 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
14625 (m68k_set_pc): Change prototype to take a regcache. Adjust.
14626 * linux-mips-low.c (mips_get_pc):
14627 (mips_set_pc): Change prototype to take a regcache. Adjust.
14628 (mips_reinsert_addr): Adjust.
14629 (mips_collect_register): Change prototype to take a regcache.
14630 Adjust.
14631 (mips_supply_register):
14632 (mips_collect_register_32bit, mips_supply_register_32bit)
14633 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
14634 (mips_store_fpregset): Ditto.
14635 * linux-ppc-low.c (ppc_supply_ptrace_register)
14636 (ppc_supply_ptrace_register): Ditto.
14637 (parse_spufs_run): Adjust.
14638 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
14639 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
14640 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
14641 take a regcache. Adjust.
14642 * linux-s390-low.c (s390_collect_ptrace_register)
14643 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
14644 (s390_set_pc): Change prototype to take a regcache. Adjust.
14645 (s390_arch_setup): Adjust.
14646 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
14647 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
14648 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
14649 (sparc_fill_gregset, sparc_store_gregset_from_stack)
14650 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
14651 regcache. Adjust.
14652 (sparc_breakpoint_at): Adjust.
14653 * linux-xtensa-low.c (xtensa_fill_gregset):
14654 (xtensa_store_gregset):
14655 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
14656 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
14657 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
14658 prototype to take a regcache. Adjust.
14659 * win32-arm-low.c (arm_fetch_inferior_register)
14660 (arm_store_inferior_register): Change prototype to take a
14661 regcache. Adjust.
14662 * win32-i386-low.c (i386_fetch_inferior_register)
14663 (i386_store_inferior_register): Change prototype to take a
14664 regcache. Adjust.
14665 * win32-low.c (child_fetch_inferior_registers)
14666 (child_store_inferior_registers): Change prototype to take a
14667 regcache. Adjust.
14668 (win32_wait): Adjust.
14669 (win32_fetch_inferior_registers): Change prototype to take a
14670 regcache. Adjust.
14671 (win32_store_inferior_registers): Adjust.
14672 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
14673 store_inferior_register>: Change prototype to take a regcache.
14674
14675 2010-01-20 Doug Evans <dje@google.com>
14676
14677 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
14678 #ifdef.
14679 (linux_wait_for_event1, linux_init_signals): Ditto.
14680 (W_STOPCODE): Provide definition if missing.
14681
14682 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
14683
14684 * linux-low.c (linux_core_of_thread): New.
14685 (compare_ints, show_process, list_threads): New.
14686 (linux_qxfer_osdata): Report threads and cores.
14687 (linux_target_op): Register linux_core_of_thread.
14688 * remote-utils.c (prepare_resume_reply): Report the core.
14689 (buffer_xml_printf): Support %d specifier.
14690 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
14691 New.
14692 (handle_query): Handle qXfer:threads. Announce availability
14693 thereof.
14694 * target.h (struct target_ops): New field core_of_thread.
14695
14696 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
14697
14698 * Makefile.in (clean): Remove new generated files.
14699 (reg-s390.o, reg-s390.c): Remove rules.
14700 (reg-s390x.o, reg-s390x.c): Likewise.
14701 (s390-linux32.o, s390-linux32.c): Add rules.
14702 (s390-linux64.o, s390-linux64.c): Likewise.
14703 (s390x-linux64.o, s390x-linux64.c): Likewise.
14704 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
14705 * linux-s390-low.c: Include <elf.h>.
14706 (HWCAP_S390_HIGH_GPRS): Define if undefined.
14707 (init_registers_s390): Remove prototype.
14708 (init_registers_s390x): Likewise.
14709 (init_registers_s390_linux32): Add prototype.
14710 (init_registers_s390_linux64): Likewise.
14711 (init_registers_s390x_linux64): Likewise.
14712 (s390_num_regs_3264): New define.
14713 (s390_regmap_3264): New global variable.
14714 (s390_cannot_fetch_register): Remove obsolete check.
14715 (s390_cannot_store_register): Likewise.
14716 (s390_collect_ptrace_register): Handle upper/lower register halves.
14717 (s390_supply_ptrace_register): Likewise.
14718 (s390_fill_gregset): Update to register number changes.
14719 (s390_get_hwcap): New routine.
14720 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
14721 Install appropriate regmap and register set.
14722
14723 2010-01-01 Joel Brobecker <brobecker@adacore.com>
14724
14725 * server.c (gdbserver_version): Update copyright year to 2010.
14726 * gdbreplay.c (gdbreplay_version): Likewise.
14727
14728 2009-12-28 Doug Evans <dje@google.com>
14729
14730 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
14731 elf/external.h. Include <elf.h> instead but only if necessary.
14732
14733 2009-12-28 Pedro Alves <pedro@codesourcery.com>
14734
14735 * linux-low.c (linux_remove_process): Remove `detaching'
14736 parameter. Don't release/detach from thread_db here.
14737 (linux_kill): Release/detach from thread_db here, ...
14738 (linux_detach): ... and here, before actually detaching.
14739 (linux_wait_1): ... and here, when a process exits.
14740 * thread-db.c (any_thread_of): New.
14741 (thread_db_free): Switch the current inferior to a thread of the
14742 passed in process.
14743
14744 2009-12-21 Doug Evans <dje@google.com>
14745
14746 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
14747
14748 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
14749 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
14750 warning ifndef __NR_tkill. Move setting of errno there too.
14751 Delete unnecessary resetting of errno after syscall.
14752 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
14753
14754 * configure.ac: Check for dladdr.
14755 * config.in: Regenerate.
14756 * configure: Regenerate.
14757 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
14758 (try_thread_db_load): Update.
14759
14760 * linux-low.c (my_waitpid): Delete unnecessary prototype.
14761
14762 2009-12-18 Doug Evans <dje@google.com>
14763
14764 * event-loop.c: Include unistd.h if it exists.
14765
14766 * linux-low.c (my_waitpid): Move definition away from being in
14767 between linux_tracefork_child/linux_test_for_tracefork.
14768
14769 * gdb_proc_service.h (psaddr_t): Fix type.
14770 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
14771 signature to match glibc.
14772
14773 2009-12-16 Doug Evans <dje@google.com>
14774
14775 * linux-low.c (linux_read_memory): Fix argument to read.
14776
14777 2009-11-26 Pedro Alves <pedro@codesourcery.com>
14778
14779 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
14780 events, don't leave current_inferior pointing at null.
14781
14782 2009-11-26 Pedro Alves <pedro@codesourcery.com>
14783
14784 * win32-low.c (LOG): Delete.
14785 (OUTMSG): Output to stderr.
14786 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
14787 on compile time LOG macro.
14788 (win32_wait): Fix debug output.
14789
14790 2009-11-26 Pedro Alves <pedro@codesourcery.com>
14791
14792 * win32-low.c (win32_add_one_solib): If the dll name is
14793 "ntdll.dll", prepend the system directory to the dll path.
14794
14795 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
14796
14797 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
14798
14799 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
14800 Vladimir Prus <vladimir@codesourcery.com>
14801
14802 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
14803 * configure.ac: Check for __mcoldfire__ and set
14804 gdb_cv_m68k_is_coldfire.
14805 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
14806 reg-cf.o and reg-m68k.o.
14807 * configure: Regenerated.
14808
14809 2009-11-16 Pedro Alves <pedro@codesourcery.com>
14810
14811 * linux-low.c (linux_remove_process): Add `detaching' parameter.
14812 Pass it to thread_db_free.
14813 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
14814 proper `detaching' argument to linux_remove_process.
14815 * linux-low.h (thread_db_free): Add `detaching' parameter.
14816 * thread-db.c (thread_db_init): Pass false as `detaching' argument
14817 to thread_db_free.
14818 (thread_db_free): Add `detaching' parameter. Only
14819 call td_ta_clear_event if detaching from process.
14820
14821 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
14822
14823 * thread-db.c (thread_db_free): Fix typo.
14824
14825 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
14826
14827 PR gdb/10838
14828 * thread-db.c (thread_db_free): Call td_ta_clear_event.
14829
14830 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
14831
14832 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
14833 with an i686 compiler.
14834 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
14835 needed.
14836 * configure: Rebuilt.
14837
14838 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
14839
14840 PR gdb/10783
14841
14842 * server.c (handle_search_memory_1): Correct read_addr initialization
14843 in loop for searching subsequent chunks.
14844
14845 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
14846
14847 * configure.ac: New --with-libthread-db option.
14848 * thread-db.c: Allow direct dependence on libthread_db.
14849 (thread_db_free): Adjust.
14850 * config.in: Regenerate.
14851 * configure: Likewise.
14852
14853 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
14854
14855 PR gdb/10757
14856 * thread-db.c (attach_thread): New function.
14857 (maybe_attach_thread): Return success/failure.
14858 (find_new_threads_callback): Adjust.
14859 (thread_db_find_new_threads): Loop until no new threads.
14860
14861 2009-10-13 Pedro Alves <pedro@codesourcery.com>
14862
14863 * proc-service.c (ps_lgetregs): Formatting.
14864
14865 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
14866
14867 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
14868 * configure.ac: Adjust.
14869 * linux-low.h (struct process_info_private): Move members to struct
14870 thread_db.
14871 (thread_db_free, thread_db_handle_monitor_command): New prototype.
14872 * linux-low.c (linux_remove_process): Adjust.
14873 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
14874 * server.c (handle_query): Move code ...
14875 (handle_monitor_command): ... here. New function.
14876 * target.h (struct target_ops): New member.
14877 * thread-db.c (struct thread_db): New.
14878 (libthread_db_search_path): New variable.
14879 (thread_db_create_event, thread_db_enable_reporting)
14880 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
14881 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
14882 (try_thread_db_load_1, dladdr_to_soname): New functions.
14883 (try_thread_db_load, thread_db_load_search): New functions.
14884 (thread_db_init): Search for libthread_db.
14885 (thread_db_free): New function.
14886 (thread_db_handle_monitor_command): Likewise.
14887 * config.in: Regenerate.
14888 * configure: Regenerate.
14889
14890 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
14891
14892 * spu-low.c (spu_kill): Wait for inferior to terminate.
14893 Call clear_inferiors.
14894 (spu_detach): Call clear_inferiors.
14895
14896 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
14897
14898 * aclocal.m4: Regenerate.
14899 * config.in: Likewise.
14900 * configure: Likewise.
14901
14902 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
14903
14904 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
14905 (parse_spufs_run): New function.
14906 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
14907 (ppc_breakpoint_at): Handle SPU breakpoints.
14908
14909 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
14910
14911 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
14912 (SPUFS_MAGIC): Define.
14913 (spu_enumerate_spu_ids): New function.
14914 (linux_qxfer_spu): New function.
14915 (linux_target_ops): Install linux_qxfer_spu.
14916
14917 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
14918
14919 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
14920 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
14921 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
14922 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
14923 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
14924 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
14925 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
14926 (init_registers_powerpc_cell32l): Add prototype.
14927 (init_registers_powerpc_cell64l): Likewise.
14928 (ppc_arch_setup): Detect Cell/B.E. architecture.
14929
14930 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
14931
14932 * Makefile.in (datarootdir): New variable.
14933
14934 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
14935
14936 * linux-low.c (linux_write_memory): Update debugging output.
14937 * Makefile.in (clean): Add new descriptions.
14938 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
14939 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
14940 * configure.srv: Add new files for arm*-*-linux*.
14941 * linux-arm-low.c: Add new declarations.
14942 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
14943 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
14944 (HWCAP_VFPv3D16): New.
14945 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
14946 instead of __IWMMXT__.
14947 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
14948 (arm_arch_setup): New.
14949 (target_regsets): Remove #ifdef. Add VFP regset.
14950 (the_low_target): Use arm_arch_setup.
14951
14952 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
14953
14954 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
14955 the main thread again.
14956
14957 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
14958
14959 Adding Neutrino gdbserver.
14960 * configure: Regenerated.
14961 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
14962 * configure.srv (i[34567]86-*-nto*): New target.
14963 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
14964 * remote-utils.c [__QNX__]: Include sys/iomgr.h
14965 (nto_comctrl) [__QNX__]: New function.
14966 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
14967
14968 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
14969
14970 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
14971 srv_tgtobj.
14972
14973 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
14974 Pedro Alves <pedro@codesourcery.com>
14975
14976 * win32-i386-low.c (i386_get_thread_context): Handle systems that
14977 don't support CONTEXT_EXTENDED_REGISTERS.
14978 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
14979 (the_low_target): Install them.
14980 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
14981 failing with ERROR_PIPE_NOT_CONNECTED.
14982
14983 2009-06-30 Doug Evans <dje@google.com>
14984 Pierre Muller <muller@ics.u-strasbg.fr>
14985
14986 Add h/w watchpoint support to x86-linux, win32-i386.
14987 * Makefile.in (SFILES): Add i386-low.c
14988 (i386_low_h): Define.
14989 (i386-low.o): Add dependencies.
14990 (linux-x86-low.o): Add i386-low.h dependency.
14991 (win32-i386-low.o): Ditto.
14992 * i386-low.c: New file.
14993 * i386-low.h: New file.
14994 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
14995 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
14996 * linux-low.c (linux_add_process): Initialize arch_private.
14997 (linux_remove_process): Free arch_private.
14998 (add_lwp): Initialize arch_private.
14999 (delete_lwp): Free arch_private.
15000 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
15001 provided.
15002 * linux-low.h (process_info_private): New member arch_private.
15003 (lwp_info): New member arch_private.
15004 (linux_target_ops): New members new_process, new_thread,
15005 prepare_to_resume.
15006 (ptid_of): New macro.
15007 * linux-x86-low.c: Include stddef.h, i386-low.h.
15008 (arch_process_info): New struct.
15009 (arch_lwp_info): New struct.
15010 (x86_linux_dr_get, x86_linux_dr_set): New functions.
15011 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
15012 (i386_dr_low_get_status): New function.
15013 (x86_insert_point, x86_remove_point): New functions.
15014 (x86_stopped_by_watchpoint): New function.
15015 (x86_stopped_data_address): New function.
15016 (x86_linux_new_process, x86_linux_new_thread): New functions.
15017 (x86_linux_prepare_to_resume): New function.
15018 (the_low_target): Add entries for insert_point, remove_point,
15019 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
15020 prepare_to_resume.
15021 * server.c (debug_hw_points): New global.
15022 (monitor_show_help): Document set debug-hw-points.
15023 (handle_query): Process "set debug-hw-points".
15024 * server.h (debug_hw_points): Declare.
15025 (paddress): Declare.
15026 * utils.c (NUMCELLS, CELLSIZE): New macros.
15027 (get_sell, xsnprintf, paddress): New functions.
15028 * win32-arm-low.c (the_low_target): Add entries for insert_point,
15029 remove_point, stopped_by_watchpoint, stopped_data_address.
15030 * win32-i386-low.c: Include i386-low.h.
15031 (debug_reg_state): Replaces dr.
15032 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
15033 (i386_dr_low_get_status): New function.
15034 (i386_insert_point, i386_remove_point): New functions.
15035 (i386_stopped_by_watchpoint): New function.
15036 (i386_stopped_data_address): New function.
15037 (i386_initial_stuff): Update.
15038 (get_thread_context,set_thread_context,i386_thread_added): Update.
15039 (the_low_target): Add entries for insert_point,
15040 remove_point, stopped_by_watchpoint, stopped_data_address.
15041 * win32-low.c (win32_insert_watchpoint): New function.
15042 (win32_remove_watchpoint): New function.
15043 (win32_stopped_by_watchpoint): New function.
15044 (win32_stopped_data_address): New function.
15045 (win32_target_ops): Add entries for insert_watchpoint,
15046 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
15047 * win32-low.h (win32_target_ops): New members insert_point,
15048 remove_point, stopped_by_watchpoint, stopped_data_address.
15049
15050 2009-06-25 Pedro Alves <pedro@codesourcery.com>
15051
15052 * server.c (process_serial_event): Re-return unsupported, not
15053 error, if the type isn't recognized. Re-allow supporting only
15054 insert or remove packets. Also call require_running for
15055 breakpoints. Add missing break statement to default case. Tidy.
15056 * target.h (struct target_ops): Rename insert_watchpoint to
15057 insert_point, and remove_watchpoint to remove_point.
15058
15059 * linux-low.h (struct linux_target_ops): Likewise.
15060 * linux-low.c (linux_insert_watchpoint): Rename to ...
15061 (linux_insert_point): ... this. Adjust.
15062 (linux_remove_watchpoint): Rename to ...
15063 (linux_remove_point): ... this. Adjust.
15064 (linux_target_ops): Adjust.
15065 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
15066 (cris_insert_point): ... this.
15067 (cris_remove_watchpoint): Rename to ...
15068 (cris_remove_point): ... this.
15069 (the_low_target): Adjust.
15070
15071 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
15072
15073 * server.c (handle_v_kill): Pass signal_pid to
15074 kill_inferior if multi_process is zero.
15075
15076 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
15077
15078 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
15079 * target.h (target_ops): Comment for *_watchpoint to make it clear
15080 the functions can get types '0' and '1'.
15081
15082 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
15083
15084 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
15085 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
15086 * regcache.c (get_regcache): Likewise.
15087 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
15088 * win32-low.c (child_fetch_inferior_registers): Remove check for
15089 regno 0.
15090
15091 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
15092 Pedro Alves <pedro@codesourcery.com>
15093
15094 * target.h (struct target_ops) <supports_multi_process>: New
15095 callback.
15096 (target_supports_multi_process): New.
15097 * server.c (handle_query): Even if GDB reports support, only
15098 enable multi-process if the target also supports it. Report
15099 multi-process support only if the target backend supports it.
15100 * linux-low.c (linux_supports_multi_process): New function.
15101 (linux_target_ops): Install it as target_supports_multi_process
15102 callback.
15103
15104 2009-05-24 Doug Evans <dje@google.com>
15105
15106 Global renaming of find_thread_pid to find_thread_ptid.
15107 * server.h (find_thread_ptid): Renamed from find_thread_pid.
15108 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
15109 All callers updated.
15110
15111 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
15112 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
15113 directly.
15114
15115 * linux-low.c (get_stop_pc): Print pc if debug_threads.
15116 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
15117 (linux_resume_one_lwp): Ditto.
15118
15119 2009-05-23 Doug Evans <dje@google.com>
15120
15121 * linux-low.c (linux_resume_one_lwp): Change type of first arg
15122 from struct inferior_list_entry * to struct lwp_info *.
15123 All callers updated.
15124
15125 2009-05-13 Doug Evans <dje@google.com>
15126
15127 * linux-x86-low.c: Don't include assert.h.
15128 (x86_siginfo_fixup): Use fatal, not assert.
15129 (x86_arch_setup): Fix comment.
15130
15131 2009-05-12 Doug Evans <dje@google.com>
15132
15133 Biarch support for i386/amd64 gdbserver.
15134 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
15135 Add linux-x86-low.c.
15136 (linux-i386-low.o, linux-x86-64-low.o): Delete.
15137 (linux-x86-low.o): Add.
15138 * linux-x86-64-low.c: Delete.
15139 * linux-i386-low.c: Delete.
15140 * linux-x86-low.c: New file.
15141 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
15142 linux-x86-low.o.
15143 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
15144 linux-x86-low.o.
15145 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
15146 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
15147 (linux_child_pid_to_exec_file): New function.
15148 (elf_64_header_p, elf_64_file_p): New functions.
15149 (siginfo_fixup): New function.
15150 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
15151 give target a chance to convert layout.
15152 * linux-low.h (linux_target_ops): New member siginfo_fixup.
15153 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
15154
15155 2009-05-07 Doug Evans <dje@google.com>
15156
15157 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
15158 (regsets_store_inferior_registers): Ditto.
15159
15160 2009-05-06 Pedro Alves <pedro@codesourcery.com>
15161
15162 PR server/10048
15163
15164 * linux-low.c (must_set_ptrace_flags): Delete.
15165 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
15166 of the global.
15167 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
15168 `lwp->must_set_ptrace_flags' instead.
15169 (linux_wait_for_event_1): Set ptrace options here.
15170 (linux_wait_1): ... not here.
15171
15172 2009-04-30 Doug Evans <dje@google.com>
15173
15174 * inferiors.c (started_inferior_callback): New function.
15175 (attached_inferior_callback): New function.
15176 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
15177 * server.c (print_started_pid, print_attached_pid): New functions.
15178 (detach_or_kill_for_exit): New function.
15179 (main): Call it instead of for_each_inferior (kill_inferior_callback).
15180 * server.h (have_started_inferiors_p): Declare.
15181 (have_attached_inferiors_p): Declare.
15182
15183 * inferiors.c (remove_process): Fix memory leak, free process.
15184 * linux-low.c (linux_remove_process): New function.
15185 (linux_kill): Call it instead of remove_process.
15186 (linux_detach, linux_wait_1): Ditto.
15187
15188 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
15189
15190 * configure.srv: Add x86 Windows CE target.
15191
15192 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
15193
15194 * inferiors.c (get_thread_process): Make global.
15195 * server.h (get_thread_process): Add prototype.
15196 * thread-db.c (find_one_thread): Use get_thread_process
15197 instead of current_process.
15198 (thread_db_get_tls_address): Do not crash if called when
15199 thread layer is not yet initialized.
15200
15201 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
15202
15203 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
15204 * spu-low.c (current_tid): Rename to ...
15205 (current_ptid): ... this.
15206 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
15207 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
15208 ptid_get_lwp (current_ptid) instead of current_tid.
15209 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
15210 instead of current_tid. Use find_process_pid to verify pid
15211 argument is valid. Pass proper argument to remove_process.
15212 (spu_thread_alive): Compare current_ptid instead of current_tid.
15213 (spu_resume): Likewise.
15214
15215 2009-04-02 Pedro Alves <pedro@codesourcery.com>
15216
15217 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
15218 variable.
15219
15220 2009-04-01 Pedro Alves <pedro@codesourcery.com>
15221
15222 Implement the multiprocess extensions, and add linux multiprocess
15223 support.
15224
15225 * server.h (ULONGEST): Declare.
15226 (struct ptid, ptid_t): New.
15227 (minus_one_ptid, null_ptid): Declare.
15228 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
15229 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
15230 (struct inferior_list_entry): Change `id' type from unsigned from
15231 to ptid_t.
15232 (struct sym_cache, struct breakpoint, struct
15233 process_info_private): Forward declare.
15234 (struct process_info): Declare.
15235 (current_process): Declare.
15236 (all_processes): Declare.
15237 (initialize_inferiors): Declare.
15238 (add_thread): Adjust to use ptid_t.
15239 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
15240 (add_process, remove_process, find_thread_pid): Declare.
15241 (find_inferior_id): Adjust to use ptid_t.
15242 (cont_thread, general_thread, step_thread): Change type to ptid_t.
15243 (multi_process): Declare.
15244 (push_event): Adjust to use ptid_t.
15245 (read_ptid, write_ptid): Declare.
15246 (prepare_resume_reply): Adjust to use ptid_t.
15247 (clear_symbol_cache): Declare.
15248 * inferiors.c (all_processes): New.
15249 (null_ptid, minus_one_ptid): New.
15250 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
15251 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
15252 (add_thread): Change unsigned long to ptid. Remove gdb_id
15253 parameter. Adjust.
15254 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
15255 (gdb_id_to_thread): Rename to ...
15256 (find_thread_pid): ... this. Change unsigned long to ptid.
15257 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
15258 (loaded_dll, pull_pid_from_list): Adjust.
15259 (add_process, remove_process, find_process_pid)
15260 (get_thread_process, current_process, initialize_inferiors): New.
15261 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
15262 (struct target_waitstatus) <related_pid>: Ditto.
15263 (struct target_ops) <kill, detach>: Add `pid' argument. Change
15264 return type to int.
15265 (struct target_ops) <join>: Add `pid' argument.
15266 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
15267 (struct target_ops) <wait>: Add `ptid' field. Change return type
15268 to ptid.
15269 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
15270 (mywait): Add `ptid' argument. Change return type to ptid_t.
15271 (target_pid_to_str): Declare.
15272 * target.c (set_desired_inferior): Adjust to use ptids.
15273 (mywait): Add new `ptid' argument. Adjust.
15274 (target_pid_to_str): New.
15275 * mem-break.h (free_all_breakpoints): Declare.
15276 * mem-break.c (breakpoints): Delelete.
15277 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
15278 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
15279 to use per-process breakpoint list.
15280 (free_all_breakpoints): New.
15281 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
15282 (symbol_cache, all_symbols_looked_up): Delete.
15283 (hexchars): New.
15284 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
15285 read_ptid): New.
15286 (prepare_resume_reply): Change ptid argument's type from unsigned
15287 long to ptid_t. Adjust. Implement W;process and X;process.
15288 (free_sym_cache, clear_symbol_cache): New.
15289 (look_up_one_symbol): Adjust to per-process symbol cache. *
15290 * server.c (cont_thread, general_thread, step_thread): Change type
15291 to ptid_t.
15292 (attached): Delete.
15293 (multi_process): New.
15294 (last_ptid): Change type to ptid_t.
15295 (struct vstop_notif) <ptid>: Change type to ptid_t.
15296 (queue_stop_reply, push_event): Change `ptid' argument's type to
15297 ptid_t.
15298 (discard_queued_stop_replies): Add `pid' argument.
15299 (start_inferior): Adjust to use ptids. Adjust to mywait interface
15300 changes. Don't reference the `attached' global.
15301 (attach_inferior): Adjust to mywait interface changes.
15302 (handle_query): Adjust to use ptids. Parse GDB's qSupported
15303 features. Handle and report "multiprocess+". Handle
15304 "qAttached:PID".
15305 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
15306 changes.
15307 (handle_v_kill): New.
15308 (handle_v_stopped): Adjust to use target_pid_to_str.
15309 (handle_v_requests): Allow multiple attaches and runs when
15310 multiprocess extensions are in effect. Handle "vKill".
15311 (myresume): Adjust to use ptids.
15312 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
15313 (handle_status): Adjust to discard_queued_stop_replies interface
15314 change.
15315 (first_thread_of, kill_inferior_callback)
15316 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
15317 (main): Call initialize_inferiors. Adjust to use ptids, killing
15318 and detaching from all inferiors. Handle multiprocess packet
15319 variants.
15320 * linux-low.h: Include gdb_proc_service.h.
15321 (struct process_info_private): New.
15322 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
15323 <lwpid_of>: Use ptid_get_lwp.
15324 (get_lwp_thread): Adjust.
15325 (struct lwp_info): Add `dead' member.
15326 (find_lwp_pid): Declare.
15327 * linux-low.c (thread_db_active): Delete.
15328 (new_inferior): Adjust comment.
15329 (inferior_pid): Delete.
15330 (linux_add_process): New.
15331 (handle_extended_wait): Adjust.
15332 (add_lwp): Change unsigned long to ptid.
15333 (linux_create_inferior): Add process to processes table. Adjust
15334 to use ptids. Don't set new_inferior here.
15335 (linux_attach_lwp): Rename to ...
15336 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
15337 it. Adjust to use ptids.
15338 (linux_attach_lwp): New.
15339 (linux_attach): Add process to processes table. Don't set
15340 new_inferior here.
15341 (struct counter): New.
15342 (second_thread_of_pid_p, last_thread_of_process_p): New.
15343 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
15344 multiple processes.
15345 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
15346 processes. Remove process from process table.
15347 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
15348 to multiple processes.
15349 (any_thread_of): New.
15350 (linux_detach): Add `pid' argument, and handle it. Remove process
15351 from processes table.
15352 (linux_join): Add `pid' argument. Handle it.
15353 (linux_thread_alive): Change unsighed long argument to ptid_t.
15354 Consider dead lwps as not being alive.
15355 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
15356 threads we're not interested in.
15357 (same_lwp, find_lwp_pid): New.
15358 (linux_wait_for_lwp): Change `pid' argument's type from int to
15359 ptid_t. Adjust.
15360 (linux_wait_for_event): Rename to ...
15361 (linux_wait_for_event_1): ... this. Change `pid' argument's type
15362 from int to ptid_t. Adjust.
15363 (linux_wait_for_event): New.
15364 (linux_wait_1): Add `ptid' argument. Change return type to
15365 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
15366 that exit from the process table.
15367 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
15368 Adjust.
15369 (mark_lwp_dead): New.
15370 (wait_for_sigstop): Adjust to use ptids. If a process exits while
15371 stopping all threads, mark its main lwp as dead.
15372 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
15373 ptids.
15374 (fetch_register, usr_store_inferior_registers)
15375 (regsets_fetch_inferior_registers)
15376 (regsets_store_inferior_registers, linux_read_memory)
15377 (linux_write_memory): Inline `inferior_pid'.
15378 (linux_look_up_symbols): Adjust to use per-process
15379 `thread_db_active'.
15380 (linux_request_interrupt): Adjust to use ptids.
15381 (linux_read_auxv): Inline `inferior_pid'.
15382 (initialize_low): Don't reference thread_db_active.
15383 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
15384 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
15385 (ps_getpid): Return the pid of the current inferior.
15386 * thread-db.c (proc_handle, thread_agent): Delete.
15387 (thread_db_create_event, thread_db_enable_reporting): Adjust to
15388 per-process data.
15389 (find_one_thread): Change argument type to ptid_t. Adjust to
15390 per-process data.
15391 (maybe_attach_thread): Adjust to per-process data and ptids.
15392 (thread_db_find_new_threads): Ditto.
15393 (thread_db_init): Ditto.
15394 * spu-low.c (spu_create_inferior, spu_attach): Add process to
15395 processes table. Adjust to use ptids.
15396 (spu_kill, spu_detach): Adjust interface. Remove process from
15397 processes table.
15398 (spu_join, spu_thread_alive): Adjust interface.
15399 (spu_wait): Adjust interface. Remove process from processes
15400 table. Adjust to use ptids.
15401 * win32-low.c (current_inferior_tid): Delete.
15402 (current_inferior_ptid): New.
15403 (debug_event_ptid): New.
15404 (thread_rec): Take a ptid. Adjust.
15405 (child_add_thread): Add `pid' argument. Adjust to use ptids.
15406 (child_delete_thread): Ditto.
15407 (do_initial_child_stuff): Add `attached' argument. Add process to
15408 processes table.
15409 (child_fetch_inferior_registers, child_store_inferior_registers):
15410 Adjust.
15411 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
15412 (win32_attach): Pass 1 to do_initial_child_stuff.
15413 (win32_kill): Adjust interface. Remove process from processes
15414 table.
15415 (win32_detach): Ditto.
15416 (win32_join): Adjust interface.
15417 (win32_thread_alive): Take a ptid.
15418 (win32_resume): Adjust to use ptids.
15419 (get_child_debug_event): Ditto.
15420 (win32_wait): Adjust interface. Remove exiting process from
15421 processes table.
15422
15423 2009-04-01 Pedro Alves <pedro@codesourcery.com>
15424
15425 Non-stop mode support.
15426
15427 * server.h (non_stop): Declare.
15428 (gdb_client_data, handler_func): Declare.
15429 (delete_file_handler, add_file_handler, start_event_loop):
15430 Declare.
15431 (handle_serial_event, handle_target_event, push_event)
15432 (putpkt_notif): Declare.
15433 * target.h (enum resume_kind): New.
15434 (struct thread_resume): Replace `step' field by `kind' field.
15435 (TARGET_WNOHANG): Define.
15436 (struct target_ops) <wait>: Add `options' argument.
15437 <supports_non_stop, async, start_non_stop>: New fields.
15438 (target_supports_non_stop, target_async): New.
15439 (start_non_stop): Declare.
15440 (mywait): Add `options' argument.
15441 * target.c (mywait): Add `options' argument. Print child exit
15442 notifications here.
15443 (start_non_stop): New.
15444 * server.c (non_stop, own_buf, mem_buf): New globals.
15445 (struct vstop_notif): New.
15446 (notif_queue): New global.
15447 (queue_stop_reply, push_event, discard_queued_stop_replies)
15448 (send_next_stop_reply): New.
15449 (start_inferior): Adjust to use resume_kind. Adjust to mywait
15450 interface changes.
15451 (attach_inferior): In non-stop mode, don't wait for the target
15452 here.
15453 (handle_general_set): Handle QNonStop.
15454 (handle_query): When handling qC, return the current general
15455 thread, instead of the first thread of the list.
15456 (handle_query): If the backend supports non-stop mode, include
15457 QNonStop+ in the qSupported query response.
15458 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
15459 and non-stop mode.
15460 (handle_v_attach, handle_v_run): Handle non-stop mode.
15461 (handle_v_stopped): New.
15462 (handle_v_requests): Report support for vCont;t. Handle vStopped.
15463 (myresume): Adjust to use resume_kind. Handle non-stop.
15464 (queue_stop_reply_callback): New.
15465 (handle_status): Handle non-stop mode.
15466 (main): Clear non_stop flag on reconnection. Use the event-loop.
15467 Refactor serial protocol handling from here ...
15468 (process_serial_event): ... to this new function. When GDB
15469 selects any thread, select one here. In non-stop mode, wait until
15470 GDB acks all pending events before exiting.
15471 (handle_serial_event, handle_target_event): New.
15472 * remote-utils.c (remote_open): Install remote_desc in the event
15473 loop.
15474 (remote_close): Remove remote_desc from the event loop.
15475 (putpkt_binary): Rename to...
15476 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
15477 (putpkt_binary): New as wrapper around putpkt_binary_1.
15478 (putpkt_notif): New.
15479 (prepare_resume_reply): In non-stop mode, don't change the
15480 general_thread.
15481 * event-loop.c: New.
15482 * Makefile.in (OBJ): Add event-loop.o.
15483 (event-loop.o): New rule.
15484
15485 * linux-low.h (pid_of): Moved here.
15486 (lwpid_of): New.
15487 (get_lwp_thread): Use lwpid_of.
15488 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
15489 * linux-low.c (pid_of): Delete.
15490 (inferior_pid): Use lwpid_of.
15491 (linux_event_pipe): New.
15492 (target_is_async_p): New.
15493 (delete_lwp): New.
15494 (handle_extended_wait): Use lwpid_of.
15495 (add_lwp): Don't set lwpid field.
15496 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
15497 (linux_kill_one_lwp): If killing a running lwp, stop it first.
15498 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
15499 (linux_detach_one_lwp): If detaching from a running lwp, stop it
15500 first. Adjust to linux_wait_for_event interface changes. Use
15501 lwpid_of.
15502 (linux_detach): Don't delete the main lwp here.
15503 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
15504 (status_pending_p): Don't consider explicitly suspended lwps.
15505 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
15506 pointer. Add OPTIONS argument. Change return type to int. Use
15507 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
15508 (linux_wait_for_event): Take an integer pid instead of a lwp_info
15509 pointer. Add status pointer argument. Return a pid instead of a
15510 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
15511 changes. In non-stop mode, don't switch to a random thread.
15512 (linux_wait): Rename to...
15513 (linux_wait_1): ... this. Add target_options argument, and handle
15514 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
15515 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
15516 clean exit and signal exit code. Don't stop all threads in
15517 non-stop mode. In all-stop mode, only stop all threads when
15518 reporting a stop to GDB. Handle explicit thread stop requests.
15519 (async_file_flush, async_file_mark): New.
15520 (linux_wait): New.
15521 (send_sigstop): Use lwpid_of.
15522 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
15523 interface changes. In non-stop mode, don't switch to a random
15524 thread.
15525 (linux_resume_one_lwp): Use lwpid_of.
15526 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
15527 (linux_resume_one_thread): ... this. Handle resume_stop. In
15528 non-stop mode, don't look for pending flag in all threads.
15529 (resume_status_pending_p): Don't consider explicitly suspended
15530 threads.
15531 (my_waitpid): Reimplement. Emulate __WALL.
15532 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
15533 Use lwpid_of.
15534 (sigchld_handler, linux_supports_non_stop, linux_async)
15535 (linux_start_non_stop): New.
15536 (linux_target_ops): Register linux_supports_non_stop, linux_async
15537 and linux_start_non_stop.
15538 (initialize_low): Install SIGCHLD handler.
15539 * thread-db.c (thread_db_create_event, find_one_thread)
15540 (thread_db_get_tls_address): Use lwpid_of.
15541 * win32-low.c (win32_detach): Adjust to use resume_kind.
15542 (win32_wait): Add `options' argument.
15543 * spu-low.c (spu_resume): Adjust to use resume_kind.
15544 (spu_wait): Add `options' argument.
15545
15546 2009-04-01 Pedro Alves <pedro@codesourcery.com>
15547
15548 Decouple target code from remote protocol.
15549
15550 * target.h (enum target_waitkind): New.
15551 (struct target_waitstatus): New.
15552 (struct target_ops) <wait>: Return an unsigned long. Take a
15553 target_waitstatus pointer instead of a char pointer.
15554 (mywait): Likewise.
15555 * target.c (mywait): Change prototype to return an unsigned long.
15556 Take a target_waitstatus pointer instead of a char pointer. Adjust.
15557 * server.h (thread_from_wait, old_thread_from_wait): Delete
15558 declarations.
15559 (prepare_resume_reply): Change prototype to take a
15560 target_waitstatus.
15561 * server.c (thread_from_wait, old_thread_from_wait): Delete.
15562 (last_status, last_ptid): New.
15563 (start_inferior): Remove "statusptr" argument. Adjust. Return a
15564 pid instead of a signal.
15565 (attach_inferior): Remove "status" and "signal" parameters.
15566 Adjust.
15567 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
15568 not as an address.
15569 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
15570 (handle_v_requests, myresume): Remove "status" and "signal"
15571 parameters. Adjust.
15572 (handle_status): New.
15573 (main): Delete local `status'. Adjust.
15574 * remote-utils.c: Include target.h.
15575 (prepare_resume_reply): Change prototype to take a
15576 target_waitstatus. Adjust.
15577
15578 * linux-low.c (linux_wait): Adjust to new target_ops->wait
15579 interface.
15580 * spu-low.c (spu_wait): Adjust.
15581 * win32-low.c (enum target_waitkind, struct target_waitstatus):
15582 Delete.
15583 (win32_wait): Adjust.
15584
15585 2009-04-01 Pedro Alves <pedro@codesourcery.com>
15586
15587 * target.h (struct thread_resume): Delete leave_stopped member.
15588 (struct target_ops): Add a `n' argument to the `resume' callback.
15589 * server.c (start_inferior): Adjust.
15590 (handle_v_cont, myresume): Adjust.
15591 * linux-low.c (check_removed_breakpoint): Adjust to resume
15592 interface change, and to removed leave_stopped field.
15593 (resume_ptr): Delete.
15594 (struct thread_resume_array): New.
15595 (linux_set_resume_request): Add new `arg' parameter. Adjust to
15596 resume interface change.
15597 (linux_continue_one_thread, linux_queue_one_thread)
15598 (resume_status_pending_p): Check if the resume field is NULL
15599 instead of checking the leave_stopped member.
15600 (linux_resume): Adjust to the target resume interface change.
15601 * spu-low.c (spu_resume): Adjust to the target resume interface
15602 change.
15603 * win32-low.c (win32_detach, win32_resume): Ditto.
15604
15605 2009-04-01 Pedro Alves <pedro@codesourcery.com>
15606
15607 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
15608 flag.
15609 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
15610 pending.
15611 (linux_continue_one_thread): Only preserve the stepping flag if
15612 there's a pending breakpoint.
15613
15614 2009-03-31 Pedro Alves <pedro@codesourcery.com>
15615
15616 * server.c (main): After the inferior having exited, call
15617 remote_close before exiting gdbserver.
15618
15619 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
15620
15621 Fix size of FPSCR in Power 7 processors.
15622 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
15623 (PPC_FEATURE_HAS_DFP): New #define.
15624 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
15625 size of the FPSCR.
15626
15627 2009-03-23 Pedro Alves <pedro@codesourcery.com>
15628
15629 * server.c (handle_query) Whitespace and formatting.
15630
15631 2009-03-22 Pedro Alves <pedro@codesourcery.com>
15632
15633 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
15634 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
15635 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
15636 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
15637 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
15638 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
15639 Makefile.in, configure.ac: Fix whitespace throughout.
15640 * configure: Regenerate.
15641
15642 2009-03-22 Pedro Alves <pedro@codesourcery.com>
15643
15644 * inferiors.c (find_inferior): Make it safe for the callback
15645 function to delete the currently iterated inferior.
15646
15647 2009-03-22 Pedro Alves <pedro@codesourcery.com>
15648
15649 * Makefile.in (linuw_low_h): Move higher.
15650 (thread-db.o): Depend on $(linux_low_h).
15651
15652 2009-03-17 Pedro Alves <pedro@codesourcery.com>
15653
15654 Rename "process" to "lwp" throughout.
15655
15656 * linux-low.c (all_processes): Rename to...
15657 (all_lwps): ... this.
15658 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
15659 (add_process): Rename to ...
15660 (add_lwp): ... this. Adjust.
15661 (linux_create_inferior): Adjust.
15662 (linux_attach_lwp): Adjust.
15663 (linux_attach): Adjust.
15664 (linux_kill_one_process): Rename to ...
15665 (linux_kill_one_lwp): ... this. Adjust.
15666 (linux_kill): Adjust.
15667 (linux_detach_one_process): Rename to ...
15668 (linux_detach_one_lwp): ... this. Adjust.
15669 (linux_detach): Adjust.
15670 (check_removed_breakpoint): Adjust.
15671 (status_pending_p): Adjust.
15672 (linux_wait_for_process): Rename to ...
15673 (linux_wait_for_lwp): ... this. Adjust.
15674 (linux_wait_for_event): Adjust.
15675 (send_sigstop): Adjust.
15676 (wait_for_sigstop): Adjust.
15677 (stop_all_processes): Rename to ...
15678 (stop_all_lwps): ... this.
15679 (linux_resume_one_process): Rename to ...
15680 (linux_resume_one_lwp): ... this. Adjust.
15681 (linux_set_resume_request, linux_continue_one_thread)
15682 (linux_queue_one_thread, resume_status_pending_p)
15683 (usr_store_inferior_registers, regsets_store_inferior_registers)
15684 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
15685 Adjust.
15686 * linux-low.h (get_process): Rename to ...
15687 (get_lwp): ... this. Adjust.
15688 (get_thread_process): Rename to ...
15689 (get_thread_lwp): ... this. Adjust.
15690 (get_process_thread): Rename to ...
15691 (get_lwp_thread): ... this. Adjust.
15692 (struct process_info): Rename to ...
15693 (struct lwp_info): ... this.
15694 (all_processes): Rename to ...
15695 (all_lwps): ... this.
15696 * proc-service.c (ps_lgetregs): Adjust.
15697 * thread-db.c (thread_db_create_event, find_one_thread)
15698 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
15699
15700 2009-03-14 Pedro Alves <pedro@codesourcery.com>
15701
15702 * server.c (handle_query): Handle "qAttached".
15703
15704 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
15705
15706 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
15707 GPLv3, update license URL.
15708
15709 2009-03-01 Doug Evans <dje@google.com>
15710
15711 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
15712 (server_h): Add gdb_signals.h.
15713 (signals.o): Update.
15714 * server.h (target_signal_from_host,target_signal_to_host_p)
15715 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
15716
15717 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
15718
15719 * remote-utils.c (getpkt): Also generate remote-debug
15720 information if noack_mode is set.
15721
15722 2009-02-06 Pedro Alves <pedro@codesourcery.com>
15723
15724 * server.c (handle_query): Report qXfer:siginfo:read and
15725 qXfer:siginfo:write as supported and handle them.
15726 * target.h (struct target_ops) <qxfer_siginfo>: New field.
15727 * linux-low.c (linux_xfer_siginfo): New.
15728 (linux_target_ops): Set it.
15729
15730 2009-01-26 Pedro Alves <pedro@codesourcery.com>
15731
15732 * server.c (gdbserver_usage): Mention --remote-debug.
15733 (main): Accept '--remote-debug' switch.
15734
15735 2009-01-18 Doug Evans <dje@google.com>
15736
15737 * regcache.c (new_register_cache): No need to check result of xcalloc.
15738 * server.c (handle_search_memory): Back out calls to xmalloc,
15739 result is checked and error is returned to user upon failure.
15740 (handle_query): Ditto. Add more checks for result of malloc.
15741 (handle_v_cont): Check result of malloc, report error back to
15742 user upon failure.
15743 (handle_v_run): Ditto. Call freeargv.
15744 * server.h (freeargv): Declare.
15745 * utils.c (freeargv): New fn.
15746
15747 2009-01-15 Doug Evans <dje@google.com>
15748
15749 * gdbreplay.c (perror_with_name): Make arg const char *.
15750 * server.h (target_signal_to_name): Make return type const char *.
15751 * thread-db.c (thread_db_err_str): Make return type const char *.
15752 * utils.c (perror_with_name): Make arg const char *.
15753
15754 2009-01-14 Pedro Alves <pedro@codesourcery.com>
15755
15756 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
15757 when handling a EXIT_PROCESS_DEBUG_EVENT.
15758
15759 2009-01-06 Joel Brobecker <brobecker@adacore.com>
15760
15761 * gdbreplay.c (gdbreplay_version): Update copyright year.
15762 * server.c (gdbserver_version): Likewise.
15763
15764 2009-01-05 Doug Evans <dje@google.com>
15765
15766 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
15767 (handle_extended_wait): Improve comment.
15768
15769 2008-12-13 Doug Evans <dje@google.com>
15770
15771 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
15772 * server.h (ATTR_MALLOC): New macro.
15773 (xmalloc,xcalloc,xstrdup): Declare.
15774 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
15775 * inferiors.c: Ditto.
15776 * linux-low.c: Ditto.
15777 * mem-break.c: Ditto.
15778 * regcache.c: Ditto.
15779 * remote-utils.c: Ditto.
15780 * server.c: Ditto.
15781 * target.c: Ditto.
15782 * win32-low.c: Ditto.
15783
15784 2008-12-12 Doug Evans <dje@google.com>
15785
15786 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
15787 in debugging printf.
15788
15789 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
15790
15791 2008-12-09 Doug Evans <dje@google.com>
15792
15793 * linux-low.h (struct process_info): Delete member tid, unused.
15794 * thread-db.c (find_one_thread): Update.
15795 (maybe_attach_thread): Update.
15796
15797 2008-12-02 Pedro Alves <pedro@codesourcery.com>
15798
15799 * target.h (struct target_ops): Add qxfer_osdata member.
15800 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
15801 and dirent.h.
15802 (linux_qxfer_osdata): New functions.
15803 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
15804 callback.
15805 * server.c (handle_query): Handle "qXfer:osdata:read:".
15806 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
15807 (buffer_xml_printf): New functions.
15808 * server.h (struct buffer): New.
15809 (buffer_grow_str, buffer_grow_str0): New macros.
15810 (buffer_grow, buffer_free, buffer_init, buffer_finish)
15811 (buffer_xml_printf): Declare.
15812
15813 2008-11-24 Doug Evans <dje@google.com>
15814
15815 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
15816
15817 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
15818
15819 * server.c (handle_v_run): Always use the supplied argument list.
15820
15821 2008-11-19 Bob Wilson <bob.wilson@acm.org>
15822
15823 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
15824 (xtensa_regmap_table): Add entry for scompare1.
15825
15826 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
15827
15828 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
15829 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
15830 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
15831 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
15832 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
15833 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
15834 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
15835 XML target descriptions.
15836 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
15837 when inferior is running on an ISA 2.05 or later processor. Add
15838 special case to return offset for full 64-bit slot of FPSCR when
15839 in 32-bits.
15840
15841 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
15842
15843 * Makefile.in (SFILES, clean): Added sparc64 files.
15844 (reg-sparc64.o, reg-sparc64.c): New.
15845 * configure.srv (sparc*-*-linux*): New configuration.
15846 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
15847 syscall arguments for SPARC.
15848 (regsets_store_inferior_registers): Likewise.
15849 * linux-sparc-low.c: New file.
15850
15851 2008-10-21 Doug Evans <dje@google.com>
15852
15853 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
15854 (READLINE_DIR,READLINE_DEP): Delete.
15855 (INTERNAL_CFLAGS): Update.
15856 (LINTFLAGS): Update.
15857
15858 2008-10-10 Pedro Alves <pedro@codesourcery.com>
15859
15860 * server.c (handle_v_run): If GDB didn't specify an argv, use the
15861 whole argv from the last run, not just argv[0].
15862
15863 2008-09-08 Pedro Alves <pedro@codesourcery.com>
15864
15865 * regcache.c (new_register_cache): Return NULL if the register
15866 cache size isn't known yet.
15867 (free_register_cache): Avoid dereferencing a NULL regcache.
15868
15869 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
15870
15871 * configure.srv: Merge MIPS and MIPS64.
15872
15873 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
15874
15875 * Makefile.in (uninstall): Apply $(EXEEXT) too.
15876
15877 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
15878
15879 * Makefile.in: Add required vsx dependencies.
15880
15881 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
15882 Declare init_registers_powerpc_vsx32l.
15883 Declare init_registers_powerpc_vsx64l.
15884 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
15885 (ppc_arch_setup): Check for VSX in hwcap.
15886 (ppc_fill_vsxregset): New function.
15887 (ppc_store_vsxregset): New function.
15888 Add new VSX entry in regset_info target_regsets.
15889
15890 * configure.srv: Add new VSX dependencies.
15891
15892 2008-08-12 Pedro Alves <pedro@codesourcery.com>
15893
15894 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
15895 (remote_open): Set or clear transport_is_reliable.
15896 (putpkt_binary): Don't expect acks in noack mode.
15897 (getpkt): Don't send ack/nac in noack mode.
15898 * server.c (handle_general_set): Handle QStartNoAckMode.
15899 (handle_query): If connected by tcp pass QStartNoAckMode+ in
15900 qSupported.
15901 (main): Reset noack_mode on every connection.
15902 * server.h (noack_mode): Declare.
15903
15904 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
15905
15906 * Makefile.in (GDBREPLAY_OBS): New variable.
15907 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
15908
15909 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
15910 Daniel Jacobowitz <dan@codesourcery.com>
15911
15912 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
15913 (usr_store_inferior_registers): Likewise.
15914 (regsets_store_inferior_registers): Likewise.
15915
15916 2008-07-31 Rolf Jansen <rj@surtec.com>
15917 Pedro Alves <pedro@codesourcery.com>
15918
15919 * configure.ac: Check for memmem declaration.
15920 * server.c [HAVE_MALLOC_H]: Include malloc.h.
15921 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
15922 (disable_packet_qfThreadInfo): Unconditionally compile.
15923 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
15924 * configure, config.in: Regenerate.
15925
15926 2008-07-28 Doug Kwan <dougkwan@google.com>
15927
15928 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
15929 (linux_write_memory): Remove declaration of errno.
15930
15931 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
15932
15933 * linux-low.c (handle_extended_wait): Do not use "status"
15934 variable uninitialized.
15935
15936 2008-07-07 Pedro Alves <pedro@codesourcery.com>
15937
15938 * server.c (handle_v_attach): Inhibit reporting dll changes.
15939
15940 2008-06-27 Pedro Alves <pedro@codesourcery.com>
15941
15942 * remote-utils.c (prepare_resume_reply): If requested, don't
15943 output "thread:TID" in the T stop reply.
15944
15945 * server.c (disable_packet_vCont, disable_packet_Tthread)
15946 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
15947 (handle_query): If requested, disable support for qC, qfThreadInfo
15948 and qsThreadInfo.
15949 (handle_v_requests): If requested, disable support for vCont.
15950 (gdbserver_show_disableable): New.
15951 (main): Handle --disable-packet and --disable-packet=LIST.
15952
15953 * server.h (disable_packet_vCont, disable_packet_Tthread)
15954 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
15955
15956 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
15957
15958 * server.c (gdbserver_usage): Mention --version.
15959
15960 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
15961
15962 * Makefile.in (gdbreplay.o): New rule.
15963
15964 2008-06-06 Joseph Myers <joseph@codesourcery.com>
15965
15966 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
15967 message, not gdbserver.
15968
15969 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
15970 Nathan Sidwell <nathan@codesourcery.com>
15971 Joseph Myers <joseph@codesourcery.com>
15972
15973 * acinclude.m4: Include ../../config/acx.m4.
15974 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
15975 * configure, config.in: Regenerate.
15976 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
15977 * server.c (gdbserver_version): Print PKGVERSION.
15978 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
15979 (main): Adjust gdbserver_usage calls.
15980 * gdbreplay.c (version, host_name): Add declarations.
15981 (gdbreplay_version, gdbreplay_usage): New.
15982 (main): Accept --version and --help options.
15983
15984 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
15985
15986 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
15987 (arm_breakpoint_at): Handle Thumb.
15988 (the_low_target): Add comment.
15989
15990 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
15991
15992 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
15993
15994 2008-05-09 Doug Evans <dje@google.com>
15995
15996 * server.h (decode_search_memory_packet): Declare.
15997 * remote-utils.c (decode_search_memory_packet): New fn.
15998 * server.c (handle_search_memory_1): New fn.
15999 (handle_search_memory): New fn.
16000 (handle_query): Process qSearch:memory packets.
16001
16002 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
16003
16004 * regcache.c (registers_length): Remove.
16005 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
16006 full register packet.
16007 * regcache.h (registers_length): Remove prototype.
16008 * server.h (PBUFSIZ): Define to 16384.
16009
16010 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
16011
16012 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
16013 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
16014 powerpc-64l.o, and powerpc-altivec64l.o.
16015 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
16016 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
16017 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
16018 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
16019 rs6000/power-linux.xml, and rs6000/power64-linux.xml
16020 to srv_xmlfiles.
16021
16022 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
16023 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
16024 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
16025 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
16026 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
16027 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
16028 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
16029 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
16030 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
16031 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
16032 (clean): Update.
16033
16034 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
16035 (init_registers_powerpc_32l): ... this new prototype.
16036 (init_registers_powerpc_32): Remove, replace by ...
16037 (init_registers_powerpc_altivec32l): ... this new prototype.
16038 (init_registers_powerpc_e500): Remove, replace by ...
16039 (init_registers_powerpc_e500l): ... this new prototype.
16040 (init_registers_ppc64): Remove, replace by ...
16041 (init_registers_powerpc_64l): ... this new prototype.
16042 (init_registers_powerpc_64): Remove, replace by ...
16043 (init_registers_powerpc_altivec64l): ... this new prototype.
16044 (ppc_num_regs): Set to 73.
16045 (PT_ORIG_R3, PT_TRAP): Define if necessary.
16046 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
16047 (ppc_cannot_store_register): Handle orig_r3 and trap.
16048 (ppc_arch_setup): Update init_registers_... calls.
16049 (ppc_fill_gregset): Handle orig_r3 and trap.
16050
16051 * inferiors.c (clear_inferiors): Reset current_inferior.
16052
16053 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
16054
16055 * acinclude.m4: Add override.m4.
16056 * configure: Regenerate.
16057
16058 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
16059
16060 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
16061 initial call to init_register_ppc64.
16062
16063 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
16064
16065 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
16066 single powerpc*-*-linux* case.
16067 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
16068
16069 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
16070
16071 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
16072 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
16073 from reg_xmlfiles.
16074 * linux-ppc-low.c: Include <elf.h>.
16075 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
16076 (ppc_hwcap): New global variable.
16077 (ppc_regmap): Remove __SPE__ #ifdef sections.
16078 (ppc_regmap_e500): New global variable.
16079 (ppc_cannot_store_register): Update __SPE__ special case.
16080 (ppc_get_hwcap): New function.
16081 (ppc_arch_setup): Use it to determine whether inferior supports
16082 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
16083 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
16084 Do not access registers if target does not support AltiVec.
16085 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
16086 Do not access registers if target does not support SPE.
16087 (target_regsets): Unconditionally include AltiVec and SPE regsets.
16088
16089 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
16090
16091 * linux-low.c (disabled_regsets, num_regsets): New.
16092 (use_regsets_p): Delete.
16093 (linux_wait_for_process): Clear disabled_regsets.
16094 (regsets_fetch_inferior_registers): Check and set it.
16095 (regsets_store_inferior_registers): Likewise.
16096 (linux_fetch_registers, linux_store_registers): Do not use
16097 use_regsets_p.
16098 (initialize_low): Allocate disabled_regsets.
16099
16100 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
16101
16102 * Makefile.in (LIBOBJS): New.
16103 (OBS): Use LIBOBJS.
16104 (memmem.o): New rule.
16105 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
16106 * configure: Regenerated.
16107
16108 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
16109
16110 * server.c (handle_query): Never return "unsupported" for
16111 qXfer:features:read queries.
16112
16113 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
16114
16115 * server.c (get_features_xml): Fix inverted condition.
16116 (handle_query): Always support qXfer:feature:read.
16117
16118 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
16119
16120 * server.c (wrapper_argv): New.
16121 (start_inferior): Handle wrapper_argv. If set, expect an extra
16122 trap.
16123 (gdbserver_usage): Document --wrapper.
16124 (main): Parse --wrapper.
16125
16126 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
16127
16128 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
16129 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
16130 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
16131 (ppc_set_pc): Likewise.
16132 (ppc_arch_setup): New function.
16133 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
16134 of collect_register.
16135 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
16136
16137 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
16138
16139 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
16140 instead of linux-ppc64-low.o.
16141 * linux-ppc64-low.c: Remove file.
16142 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
16143 (linux-ppc64-low.o): Remove rule.
16144
16145 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
16146 (init_registers_powerpc_64): Likewise.
16147 (ppc_regmap): Conditionally define depending on __powerpc64__.
16148 (ppc_cannot_store_register): Do not special-case "fpscr" when
16149 compiled on __powerpc64__.
16150 (ppc_collect_ptrace_register): New function.
16151 (ppc_supply_ptrace_register): New function.
16152 (ppc_breakpoint): Change type to "unsigned int".
16153 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
16154 (the_low_target): Conditionally provide initializers for the
16155 arch_setup member depending on __powerpc64__. Install
16156 collect_ptrace_register and supply_ptrace_register members.
16157
16158 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
16159
16160 * regcache.h (gdbserver_xmltarget): Add extern declaration.
16161 * server.c (gdbserver_xmltarget): Define.
16162 (get_features_xml): Use it to replace "target.xml" and arch_string.
16163
16164 * configure.srv: Remove srv_xmltarget. Add XML files that were
16165 mentioned there to srv_xmlfiles instead. Remove conditional tests
16166 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
16167 srv_xmlfiles and srv_regobj to include all possible choices.
16168 * configure.ac (srv_xmltarget): Remove.
16169 (srv_xmlfiles): Do not add "target.xml".
16170 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
16171 checks for supplementary target information.
16172 * configure: Regenerate.
16173 * Makefile.in (XML_TARGET): Remove.
16174 (target.xml): Remove rule.
16175 (clean): Do not clean up target.xml.
16176 (.PRECIOUS): Do not mention target.xml.
16177
16178 * target.h (struct target_ops): Remove arch_string member.
16179 * linux-low.c (linux_arch_string): Remove.
16180 (linux_target_ops): Remove arch_string initializer.
16181 * linux-low.h (struct linux_target_ops): Remove arch_string member.
16182 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
16183 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
16184 * spu-low.c (spu_arch_string): Remove.
16185 (spu_target_ops): Remove arch_string initializer.
16186 * win32-low.c (win32_arch_string): Remove.
16187 (win32_target_ops): Remove arch_string initializer.
16188 * win32-low.h (struct win32_target_ops): Remove arch_string member.
16189 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
16190 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
16191
16192 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
16193
16194 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
16195 by collect_ptrace_register and supply_ptrace_register hooks.
16196 * linux-low.c (fetch_register): Use supply_ptrace_register callback
16197 instead of checking for the_low_target.left_pad_xfer.
16198 (usr_store_inferior_registers): Use collect_ptrace_register callback
16199 instead of checking for the_low_target.left_pad_xfer.
16200
16201 * linux-s390-low.c (s390_collect_ptrace_register): New function.
16202 (s390_supply_ptrace_register): Likewise.
16203 (s390_fill_gregset): Call s390_collect_ptrace_register.
16204 (the_low_target): Update.
16205
16206 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
16207 (ppc_supply_ptrace_register): Likewise.
16208 (the_low_target): Update.
16209
16210 * linux-i386-low.c (the_low_target): Update.
16211 * linux-x86-64-low.c (the_low_target): Update.
16212
16213 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
16214
16215 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
16216 reg-s390.o and reg-s390x.o.
16217
16218 * linux-low.c (new_inferior): New global variable.
16219 (linux_create_inferior, linux_attach): Set it.
16220 (linux_wait_for_process): Call the_low_target.arch_setup after the
16221 target has stopped for the first time.
16222 (initialize_low): Do not call the_low_target.arch_setup.
16223
16224 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
16225 (s390_set_pc): Likewise.
16226 (s390_arch_setup): New function.
16227 (the_low_target): Use s390_arch_setup as arch_setup routine.
16228
16229 * regcache.c (realloc_register_cache): New function.
16230 (set_register_cache): Call it for each existing regcache.
16231
16232 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
16233
16234 * server.h (init_registers): Remove prototype.
16235
16236 * linux-low.h (struct linux_target_ops): Add arch_setup field.
16237 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
16238 instead of init_registers ().
16239 * linux-arm-low.c (init_registers_arm): Add prototype.
16240 (init_registers_arm_with_iwmmxt): Likewise.
16241 (the_low_target): Add initializer for arch_setup field.
16242 * linux-cris-low.c (init_registers_cris): Add prototype.
16243 (the_low_target): Add initializer for arch_setup field.
16244 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
16245 (the_low_target): Add initializer for arch_setup field.
16246 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
16247 (the_low_target): Add initializer for arch_setup field.
16248 * linux-ia64-low.c (init_registers_ia64): Add prototype.
16249 (the_low_target): Add initializer for arch_setup field.
16250 * linux-m32r-low.c (init_registers_m32r): Add prototype.
16251 (the_low_target): Add initializer for arch_setup field.
16252 * linux-m68k-low.c (init_registers_m68k): Add prototype.
16253 (the_low_target): Add initializer for arch_setup field.
16254 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
16255 (init_registers_mips64_linux): Likewise.
16256 (the_low_target): Add initializer for arch_setup field.
16257 * linux-ppc-low.c (init_registers_ppc): Add prototype.
16258 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
16259 (the_low_target): Add initializer for arch_setup field.
16260 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
16261 (init_registers_powerpc_64): Likewise.
16262 (the_low_target): Add initializer for arch_setup field.
16263 * linux-s390-low.c (init_registers_s390): Add prototype.
16264 (init_registers_s390x): Likewise.
16265 (the_low_target): Add initializer for arch_setup field.
16266 * linux-sh-low.c (init_registers_sh): Add prototype.
16267 (the_low_target): Add initializer for arch_setup field.
16268 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
16269 (the_low_target): Add initializer for arch_setup field.
16270 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
16271 (the_low_target): Add initializer for arch_setup field.
16272
16273 * win32-low.h (struct win32_target_ops): Add arch_setup field.
16274 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
16275 instead of init_registers ().
16276 * win32-arm-low.c (init_registers_arm): Add prototype.
16277 (the_low_target): Add initializer for arch_setup field.
16278 * win32-i386-low.c (init_registers_i386): Add prototype.
16279 (the_low_target): Add initializer for arch_setup field.
16280
16281 * spu-low.c (init_registers_spu): Add prototype.
16282 (initialize_low): Call initialie_registers_spu () instead of
16283 initialize_registers ().
16284
16285 2008-02-19 Pedro Alves <pedro@codesourcery.com>
16286
16287 * server.c (handle_v_requests): When handling the vRun and vAttach
16288 packets, if already debugging a process, don't kill it. Return an
16289 error instead.
16290
16291 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
16292
16293 * server.c (handle_query): Correct length check.
16294
16295 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
16296
16297 * win32-low.c (do_initial_child_stuff): Add process handle
16298 parameter. Set current_process_handle and current_process_id from the
16299 parameters. Clear globals.
16300 (win32_create_inferior): Don't set current_process_handle and
16301 current_process_id here. Instead pass them on the call to
16302 do_initial_child_stuff.
16303 (win32_attach): Likewise.
16304 (win32_clear_inferiors): New.
16305 (win32_kill): Don't close the current process handle or the
16306 current thread handle here. Instead call win32_clear_inferiors.
16307 (win32_detach): Don't open a new handle to the process. Call
16308 win32_clear_inferiors.
16309 (win32_join): Don't rely on current_process_handle; open a new
16310 handle using the process id.
16311 (win32_wait): Call win32_clear_inferiors when the inferior process
16312 has exited.
16313
16314 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
16315
16316 * server.c (monitor_show_help): Add "exit".
16317
16318 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
16319
16320 * Makefile.in (SFILES): Add linux-xtensa-low.c.
16321 (clean): Add reg-xtensa.c.
16322 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
16323 * configure.srv (xtensa*-*-linux*) New target.
16324 * linux-xtensa-low.c: New.
16325 * xtensa-xtregs.c: New.
16326
16327 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
16328
16329 * hostio.c: Don't include errno.h.
16330 (errno_to_fileio_errno): Move to hostio-errno.
16331 * hostio.c: (hostio_error): Remove the error parameter. Defer the
16332 error number outputting to the target->hostio_last_error callback.
16333 (hostio_packet_error): Use FILEIO_EINVAL directly.
16334 (handle_open, handle_pread, hostio_error, handle_unlink): Update
16335 calls to hostio_error.
16336 * hostio-errno.c: New.
16337 * server.h (hostio_last_error_from_errno): Declare.
16338 * target.h (target_ops): Add hostio_last_error member.
16339 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
16340 as hostio_last_error handler.
16341 * spu-low.c (spu_target_ops): Likewise.
16342 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
16343 (wince_hostio_last_error): New functions.
16344 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
16345 as hostio_last_error handler.
16346 (win32_target_ops) [!_WIN32_WCE]: Register
16347 hostio_last_error_from_errno as hostio_last_error handler.
16348 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
16349 (hostio-errno.o): New rule.
16350 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
16351 * configure.srv (srv_hostio_err_objs): New variable. Default to
16352 hostio-errno.o.
16353 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
16354 * configure: Regenerate.
16355
16356 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
16357
16358 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
16359 (linux_kill, linux_detach): Clean up the process list.
16360 * remote-utils.c (remote_open): Improve port number parsing.
16361 (putpkt_binary, input_interrupt): Only send interrupts if the target
16362 is running.
16363 * server.c (extended_protocol): Make static.
16364 (attached): Define earlier.
16365 (exit_requested, response_needed, program_argv): New variables.
16366 (target_running): New.
16367 (start_inferior): Clear attached here.
16368 (attach_inferior): Set attached here.
16369 (require_running): Define.
16370 (handle_query): Use require_running and target_running. Implement
16371 "monitor exit".
16372 (handle_v_attach, handle_v_run): New.
16373 (handle_v_requests): Use require_running. Handle vAttach and vRun.
16374 (gdbserver_usage): Update.
16375 (main): Redo argument parsing. Handle --debug and --multi. Handle
16376 --attach along with other options or after the port. Save
16377 program_argv. Support no initial program. Resynchronize
16378 communication with GDB after an error. Handle "monitor exit".
16379 Use require_running and target_running. Always allow the extended
16380 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
16381 restart in extended mode.
16382 * README: Refer to the GDB manual. Update --attach usage.
16383
16384 2007-12-20 Andreas Schwab <schwab@suse.de>
16385
16386 * linux-low.c (STACK_SIZE): Define.
16387 (linux_tracefork_child): Use it. Use __clone2 on ia64.
16388 (linux_test_for_tracefork): Likewise.
16389
16390 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
16391
16392 * linux-low.c (linux_wait_for_event): Update messages. Do not
16393 reinsert auto-delete breakpoints.
16394 * mem-break.c (struct breakpoint): Change return type of handler to
16395 int.
16396 (set_breakpoint_at): Update handler type.
16397 (reinsert_breakpoint_handler): Return 1 instead of calling
16398 delete_breakpoint.
16399 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
16400 setting a new one.
16401 (check_breakpoints): Delete auto-delete breakpoints and return 2.
16402 * mem-break.h (set_breakpoint_at): Update handler type.
16403 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
16404 * win32-low.c (auto_delete_breakpoint): New.
16405 (get_child_debug_event): Use it.
16406
16407 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
16408
16409 * configure.ac: Check for pread and pwrite.
16410 * hostio.c (handle_pread): Fall back to lseek and read.
16411 (handle_pwrite): Fall back to lseek and write.
16412 * config.in, configure: Regenerated.
16413
16414 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
16415
16416 * server.c (myresume): Add own_buf argument.
16417 (main): Update calls.
16418
16419 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
16420
16421 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
16422 * remote-utils.c (remote_open): Do not call disable_async_io.
16423 (block_async_io): Delete.
16424 (unblock_async_io): Make static.
16425 (initialize_async_io): New.
16426 * server.c (handle_v_cont): Handle async I/O here.
16427 (myresume): Likewise. Move other common resume tasks here...
16428 (main): ... from here. Call initialize_async_io. Disable async
16429 I/O before the main loop.
16430 * server.h (initialize_async_io): Declare.
16431 (block_async_io, unblock_async_io): Delete prototypes.
16432 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
16433
16434 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
16435
16436 * remote-utils.c (readchar): Allow binary data in received messages.
16437
16438 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
16439
16440 * win32-low.c (attaching): New global.
16441 (win32_create_inferior): Clear the `attaching' global.
16442 (win32_attach): Set the `attaching' global.
16443 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
16444 attaching. Only set a breakpoint at the entry point if not
16445 attaching.
16446
16447 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
16448
16449 * server.c (main): Don't report dll events on the initial
16450 connection on attaches.
16451
16452 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
16453
16454 * server.c (main): Relax numerical bases supported for the pid of
16455 the --attach command line argument.
16456
16457 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
16458
16459 * win32-low.c (win32_attach): Call OpenProcess before
16460 DebugActiveProcess, not after. Add last error output to error
16461 call.
16462
16463 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
16464
16465 * win32-low.c (win32_get_thread_context)
16466 (win32_set_thread_context): New functions.
16467 (thread_rec): Use win32_get_thread_context.
16468 (continue_one_thread, win32_resume): Use win32_set_thread_context.
16469 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
16470 field.
16471
16472 2007-12-03 Leo Zayas
16473 Pedro Alves <pedro_alves@portugalmail.pt>
16474
16475 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
16476 global variables.
16477 (child_add_thread): Minor cleanup.
16478 (child_continue): Resume artificially suspended threads before
16479 calling ContinueDebugEvent.
16480 (suspend_one_thread): New.
16481 (fake_breakpoint_event): New.
16482 (get_child_debug_event): Change return type to int. Check here if
16483 gdb sent an interrupt request. If a soft interrupt was requested,
16484 fake a breakpoint event. Return 0 if there is no event to handle,
16485 and 1 otherwise.
16486 (win32_wait): Don't check here if gdb sent an interrupt request.
16487 Ensure there is a valid event to handle.
16488 (win32_request_interrupt): Add soft interruption method as last
16489 resort.
16490
16491 2007-12-03 Leo Zayas
16492 Pedro Alves <pedro_alves@portugalmail.pt>
16493
16494 * win32-low.h (win32_thread_info): Add descriptions to the
16495 structure members. Replace `suspend_count' counter by a
16496 `suspended' flag.
16497 * win32-low.c (thread_rec): Update condition of when to get the
16498 context from the inferior. Rely on ContextFlags being set if it
16499 has already been retrieved. Only suspend the inferior thread if
16500 we haven't already. Warn if that fails.
16501 (continue_one_thread): s/suspend_count/suspended/. Only call
16502 ResumeThread once. Warn if that fails.
16503
16504 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
16505
16506 * win32-low.c (win32_wait): Don't read from the inferior when it
16507 has already exited.
16508
16509 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
16510
16511 * Makefile.in (win32_low_h): New variable.
16512 (win32-low.o): Add dependency on $(win32_low_h).
16513 (win32-arm-low.o, win32-i386-low.o): New rules.
16514
16515 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
16516
16517 * hostio.c: Correct copyright year.
16518
16519 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
16520
16521 * Makefile.in (OBS): Add hostio.o.
16522 (hostio.o): New rule.
16523 * server.h (handle_vFile): Declare.
16524 * hostio.c: New file.
16525 * server.c (handle_v_requests): Take packet_len and new_packet_len
16526 for binary packets. Call handle_vFile.
16527 (main): Update call to handle_v_requests.
16528
16529 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
16530
16531 * linux-low.c: Include <sched.h>.
16532
16533 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
16534
16535 * linux-low.c (linux_tracefork_grandchild): New.
16536 (linux_tracefork_child): Use clone.
16537 (linux_test_for_tracefork): Use clone; allocate and free a stack.
16538
16539 2007-10-31 Joel Brobecker <brobecker@adacore.com>
16540
16541 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
16542
16543 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
16544
16545 * linux-low.c (handle_extended_wait): Handle unexpected signals.
16546
16547 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
16548
16549 * inferiors.c (change_inferior_id): Delete.
16550 (add_pid_to_list, pull_pid_from_list): New.
16551 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
16552 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
16553 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
16554 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
16555 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
16556 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
16557 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
16558 (using_threads): Always set to 1.
16559 (handle_extended_wait): New.
16560 (add_process): Do not set TID.
16561 (linux_create_inferior): Set must_set_ptrace_flags.
16562 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
16563 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
16564 (linux_thread_alive): Rename TID argument to LWPID.
16565 (linux_wait_for_process): Handle unknown processes. Do not use TID.
16566 (linux_wait_for_event): Do not use TID or check using_threads. Update
16567 call to dead_thread_notify. Call handle_extended_wait.
16568 (linux_create_inferior): Use PTRACE_SETOPTIONS.
16569 (send_sigstop): Delete sigstop_sent.
16570 (wait_for_sigstop): Avoid TID.
16571 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
16572 (linux_test_for_tracefork): New.
16573 (linux_lookup_signals): Use thread_db_active and
16574 linux_supports_tracefork_flag.
16575 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
16576 * linux-low.h (get_process_thread): Avoid TID.
16577 (struct process_ifo): Move thread_known and tid to the end. Remove
16578 sigstop_sent.
16579 (linux_attach_lwp, thread_db_init): Update prototypes.
16580 * server.h (change_inferior_id): Delete prototype.
16581 (add_pid_to_list, pull_pid_from_list): New prototypes.
16582 * thread-db.c (thread_db_use_events): New.
16583 (find_first_thread): Rename to...
16584 (find_one_thread): ...this. Update callers and messages. Do not
16585 call fatal. Check thread_db_use_events. Do not call
16586 change_inferior_id or new_thread_notify.
16587 (maybe_attach_thread): Update. Do not call new_thread_notify.
16588 (thread_db_init): Set thread_db_use_events. Check use_events.
16589 * utils.c (fatal, warning): Correct message prefix.
16590
16591 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
16592
16593 * Makefile.in (clean): Remove new files.
16594 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
16595 (powerpc-64.o, powerpc-64.c): New rules.
16596 * configure.srv: Use alternate register sets for powerpc64-*-linux*
16597 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
16598 with SPE.
16599 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
16600 SPE targets.
16601 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
16602 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
16603 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
16604 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
16605 (target_regsets): Add AltiVec and SPE register sets.
16606 * configure.ac: Check for AltiVec and SPE.
16607 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
16608 (ppc_fill_vrregset, ppc_store_vrregset): New.
16609 (target_regsets): Add AltiVec register set.
16610 * configure: Regenerated.
16611
16612 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
16613
16614 * linux-low.c (O_LARGEFILE): Define.
16615 (linux_read_memory): Use /proc/PID/mem.
16616 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
16617 * configure, config.in: Regenerated.
16618
16619 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
16620
16621 * linux-low.c (linux_wait_for_event): Do not pass signals while
16622 single-stepping.
16623
16624 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
16625
16626 * win32-low.c (create_process): New.
16627 (win32_create_inferior): Use create_process instead of
16628 CreateProcess. If create_process failed retry appending an ".exe"
16629 suffix. Store the GetLastError result immediatelly after
16630 create_process calls and use it on the call to error.
16631
16632 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
16633
16634 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
16635
16636 2007-08-23 Joel Brobecker <brobecker@adacore.com>
16637
16638 * configure.ac: Switch license to GPLv3.
16639
16640 2007-08-01 Michael Snyder <msnyder@access-company.com>
16641
16642 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
16643
16644 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
16645
16646 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
16647 typedef.
16648 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
16649 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
16650 CloseToolhelp32Snapshot.
16651 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
16652 CloseToolhelp32Snapshot.
16653
16654 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
16655
16656 * server.c (main): Check for inferior exit before main loop.
16657
16658 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
16659
16660 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
16661 instead of on tmp_desc.
16662
16663 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
16664 Daniel Jacobowitz <dan@codesourcery.com>
16665
16666 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
16667 (add_thread): Minor cleanups.
16668 (clear_inferiors): Move lower in the file. Clear the DLL
16669 list.
16670 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
16671 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
16672 (xml_escape_text): New.
16673 * server.c (handle_query): Handle qXfer:libraries:read. Report it
16674 for qSupported.
16675 (handle_v_cont): Report errors.
16676 (gdbserver_version): Update.
16677 (main): Correct size of own_buf. Do not report initial DLL events.
16678 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
16679 (unloaded_dll, xml_escape_text): New.
16680 * win32-low.c (enum target_waitkind): Update comments.
16681 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
16682 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
16683 (win32_EnumProcessModules, win32_GetModuleInformation)
16684 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
16685 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
16686 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
16687 (win32_Module32First, win32_Module32Next, load_toolhelp)
16688 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
16689 (get_child_debug_event): Handle DLL events.
16690 (win32_wait): Likewise.
16691
16692 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
16693
16694 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
16695 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
16696
16697 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
16698
16699 * win32-low.c (handle_output_debug_string): Ignore event if not
16700 waiting.
16701
16702 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
16703
16704 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
16705
16706 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
16707
16708 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
16709
16710 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
16711
16712 * inferiors.c (change_inferior_id): Add comment.
16713 * linux-low.c (check_removed_breakpoint): Add an early
16714 prototype. Improve debug output.
16715 (linux_attach): Doc update.
16716 (linux_detach_one_process, linux_detach): Clean up before releasing
16717 each process.
16718 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
16719 * linux-low.h (struct process_info): Doc improvement.
16720 * mem-break.c (delete_all_breakpoints): New.
16721 * mem-break.h (delete_all_breakpoints): New prototype.
16722 * thread-db.c (find_first_thread): New.
16723 (thread_db_create_event): Call it instead of
16724 thread_db_find_new_threads. Clean up unused variables.
16725 (maybe_attach_thread): Remove first thread handling.
16726 (thread_db_find_new_threads): Use find_first_thread.
16727 (thread_db_get_tls_address): Likewise.
16728
16729 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
16730
16731 * thread-db.c (thread_db_find_new_threads): Add prototype.
16732 (thread_db_create_event): Check for the main thread before adding
16733 a new thread.
16734 (maybe_attach_thread): Only enable event reporting if TID == 0.
16735 (thread_db_get_tls_address): Check for new threads.
16736
16737 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
16738
16739 * linux-low.c (linux_create_inferior): Try execv before execvp.
16740 * spu-low.c (spu_create_inferior): Likewise.
16741
16742 2007-06-13 Mike Frysinger <vapier@gentoo.org>
16743
16744 * linux-low.c (linux_create_inferior): Change execv to execvp.
16745 * spu-low.c (spu_create_inferior): Likewies.
16746
16747 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
16748
16749 * Makefile.in (clean): Clean new files instead of deleted ones.
16750 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
16751 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
16752 rules.
16753 * configure.srv: Specify XML files and new regformats for MIPS and
16754 MIPS64 GNU/Linux.
16755 * linux-mips-low.c (mips_num_regs): Set to only used registers.
16756 (mips_regmap): Do not fetch $0. Remove unused registers. Add
16757 an entry for the restart register.
16758 (mips_cannot_fetch_register, mips_cannot_store_register)
16759 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
16760 register names to match the XML descriptions.
16761 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
16762 restart register instead of $0.
16763
16764 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
16765 Markus Deuling <deuling@de.ibm.com>
16766
16767 * remote-utils.c (decode_xfer_write): New function.
16768 * server.h (decode_xfer_write): Add prototype.
16769 * server.c (handle_query): Add PACKET_LEN argument. Support
16770 qXfer:spu:read and qXfer:spu:write packets.
16771 (main): Pass packet_len to handle_query.
16772 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
16773 * target.h (target_ops): Add qxfer_spu.
16774
16775 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
16776
16777 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
16778 accessing non-seekable spufs files.
16779
16780 2007-05-16 Markus Deuling <deuling@de.ibm.com>
16781
16782 * server.c (handle_query): Add reply for qC packet.
16783
16784 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16785 Leo Zayas <lerele@champenstudios@com>
16786
16787 * server.h (check_remote_input_interrupt_request): New function.
16788 * remote_utils.c (INVALID_DESCRIPTOR): New define.
16789 (remote_desc): Initialize with INVALID_DESCRIPTOR.
16790 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
16791 (check_remote_input_interrupt_request): New function.
16792 * server.h (check_remote_input_interrupt_request): Declare.
16793 * win32-low.c (winapi_DebugBreakProcess,
16794 winapi_GenerateConsoleCtrlEvent): New typedefs.
16795 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
16796 to 250 ms.
16797 (win32_wait): Check for remote interrupt request
16798 with check_remote_input_interrupt_request.
16799 (win32_request_interrupt): New function.
16800 (win32_target_op): Set request_interrupt to win32_request_interrupt.
16801
16802 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16803
16804 * win32-low.c (debug_registers_changed,
16805 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
16806 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
16807 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
16808 (thread_rec): Get context using the low target.
16809 (child_add_thread): Call thread_added on the low target,
16810 which does the same thing.
16811 (regptr): Delete.
16812 (do_initial_child_stuff): Remove debug registers references.
16813 Set context using the low target. Resume threads after
16814 setting the contexts.
16815 (child_continue): Remove dead variable. Remove debug
16816 registers references.
16817 (child_fetch_inferior_registers): Go through the low target.
16818 (do_child_store_inferior_registers): Remove.
16819 (child_store_inferior_registers): Go through the low target.
16820 (win32_resume): Remove debug registers references.
16821 Set context using the low target.
16822 (handle_exception): Change return type to void. Don't record
16823 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
16824 first chance exception.
16825 (get_child_debug_event): Change return type to void. Remove
16826 goto loop. Always return after waiting for debug event.
16827 (win32_wait): Convert to switch statement. Handle spurious
16828 events.
16829
16830 * win32-i386-low.c (debug_registers_changed,
16831 debug_registers_used): New.
16832 (initial_stuff): Rename to ...
16833 (i386_initial_stuff): ... this. Clear debug registers
16834 state variables.
16835 (store_debug_registers): Delete.
16836 (i386_get_thread_context): New.
16837 (load_debug_registers): Delete.
16838 (i386_set_thread_context): New.
16839 (i386_thread_added): New.
16840 (single_step): Rename to ...
16841 (i386_single_step): ... this.
16842 (do_fetch_inferior_registers): Rename to ...
16843 (i386_fetch_inferior_register): ... this.
16844 (i386_store_inferior_register): New.
16845 (the_low_target): Adapt to new interface.
16846
16847 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
16848 (arm_get_thread_context): New.
16849 (arm_set_thread_context): New.
16850 (regptr): New.
16851 (do_fetch_inferior_registers): Rename to ...
16852 (arm_fetch_inferior_register): ... this.
16853 (arm_store_inferior_register): New.
16854 (arm_wince_breakpoint): Reimplement as unsigned long.
16855 (arm_wince_breakpoint_len): Define.
16856 (the_low_target): Adapt to new interface.
16857
16858 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
16859 load_debug_registers. Add get_thread_context, set_thread_context,
16860 thread_added and store_inferior_register. Rename
16861 fetch_inferior_registers to fetch_inferior_register.
16862 (regptr): Remove declaration.
16863
16864 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16865
16866 * linux-low.c (linux_detach): Change return type to int. Return 0.
16867 * spu-low.c (spu_detach): Likewise.
16868
16869 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16870
16871 * target.h (target_ops): Change return type of detach to int.
16872 Add join.
16873 (join_inferior): New.
16874 * server.c (main): Don't skip detach support on mingw32.
16875 If the inferior doesn't support detaching return error.
16876 Call join_inferior instead of using waitpid.
16877 * linux-low.c (linux_join): New.
16878 (linux_target_op): Add linux_join.
16879 * spu-low.c (spu_join): New.
16880 (spu_target_ops): Add spu_join.
16881 * win32-low.c (win32_detach): Adapt to new interface.
16882 Reopen current_process_handle before detaching. Issue a child
16883 resume before detaching.
16884 (win32_join): New.
16885 (win32_target_op): Add win32_join.
16886
16887 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16888
16889 * win32-low.c (win32-attach): Fix return value.
16890 * target.h (target_ops): Describe ATTACH return values.
16891
16892 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16893
16894 * win32-low.c (GETPROCADDRESS): Define.
16895 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
16896 (winapi_DebugSetProcessKillOnExit): Likewise.
16897 (win32_create_inferior): Force usage of ansi CreateProcessA.
16898 (win32_attach): Use GETPROCADDRESS.
16899 (win32_detach): Likewise.
16900
16901 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16902
16903 * win32-low.c (win32_wait): Don't use WSTOPSIG.
16904
16905 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
16906
16907 * win32-low.c: Commit leftover changes from 2007-03-29.
16908
16909 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
16910
16911 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
16912 fields short instead of int. Add explicit padding.
16913 (i387_cache_to_fsave): Remove unnecessary casts.
16914 (i387_fsave_to_cache): Doc fix.
16915 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
16916
16917 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
16918
16919 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
16920 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
16921
16922 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
16923
16924 * configure.srv (arm*-*-mingw32ce*): Move near the other
16925 arm targets.
16926
16927 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
16928
16929 * configure.ac: Add errno checking.
16930 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
16931 sys/file.h and malloc.h.
16932 (AC_CHECK_DECLS): Add perror.
16933 (srv_mingwce): Handle.
16934 * configure.srv (i[34567]86-*-cygwin*): Add
16935 win32-i386-low.o to srv_tgtobj.
16936 (i[34567]86-*-mingw*): Likewise.
16937 (arm*-*-mingw32ce*): Add case.
16938 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
16939 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
16940 [__MINGW32CE__] (strerror): New function.
16941 [__MINGW32CE__] (errno): Define to GetLastError.
16942 [__MINGW32CE__] (COUNTOF): New macro.
16943 (remote_open): Remove extra close call.
16944 * mem-break.c (delete_breakpoint_at): New function.
16945 * mem-break.h (delete_breakpoint_at): Declare.
16946 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
16947 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
16948 [USE_WIN32API] (read, write): Add char* casts.
16949 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
16950 * server.h: Include wincecompat.h on Windows CE.
16951 [HAVE_ERRNO_H]: Check.
16952 (perror): Declare if not declared.
16953 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
16954 (perror_with_name): Remove errno declaration.
16955 * wincecompat.h: New.
16956 * wincecompat.c: New.
16957 * win32-low.h: New.
16958 * win32-arm-low.c: New.
16959 * win32-i386-low.c: New.
16960 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
16961 (OUTMSG2): Make it safe.
16962 (_T): New macro.
16963 (COUNTOF): New macro.
16964 (NUM_REGS): Get it from the low target.
16965 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
16966 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
16967 (thread_rec): Let low target handle debug registers.
16968 (child_add_thread): Likewise.
16969 (child_init_thread_list): Likewise.
16970 (continue_one_thread): Likewise.
16971 (regptr): New.
16972 (do_child_fetch_inferior_registers): Move to ...
16973 * win32-i386-low.c: ... here, and rename to ...
16974 (do_fetch_inferior_registers): ... this.
16975 * win32-low.c (child_fetch_inferior_registers):
16976 Go through the low target.
16977 (do_child_store_inferior_registers): Use regptr.
16978 (strwinerror): New function.
16979 (win32_create_inferior): Handle Windows CE.
16980 Use strwinerror instead of strerror on Windows error
16981 codes. Add program to the error output.
16982 Don't close the main thread handle on Windows CE.
16983 (win32_attach): Use coredll.dll on Windows CE.
16984 (win32_kill): Close current process and current
16985 thread handles.
16986 (win32_detach): Use coredll.dll on Windows CE.
16987 (win32_resume): Let low target handle debug registers, and
16988 step request.
16989 (handle_exception): Add/Remove initial breakpoint. Avoid
16990 non-existant WSTOPSIG on Windows CE.
16991 (win32_read_inferior_memory): Cast to remove warning.
16992 (win32_arch_string): Go through the low target.
16993 (initialize_low): Call set_breakpoint_data with the low
16994 target's breakpoint.
16995 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
16996 FOP_REGNUM, mappings): Move to ...
16997 * win32-i386-low.c: ... here.
16998 * win32-low.c (win32_thread_info): Move to ...
16999 * win32-low.h: ... here.
17000 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
17001 win32-arm-low.c and wincecompat.c.
17002 (all:): Add $EXEEXT.
17003 (install-only:): Likewise.
17004 (gdbserver:): Likewise.
17005 (gdbreplay:): Likewise.
17006 * config.in: Regenerate.
17007 * configure: Regenerate.
17008
17009 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
17010
17011 * win32-low.c: Rename typedef thread_info to
17012 win32_thread_info throughout.
17013
17014 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
17015
17016 * win32-i386-low.c: Rename to ...
17017 * win32-low.c: ... this.
17018 * configure.srv: Replace win32-i386-low.o with win32-low.o.
17019 * Makefile.in: Likewise.
17020
17021 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
17022
17023 * remote-utils.c (monitor_output): Constify msg parameter.
17024 * server.h (monitor_output): Likewise.
17025 * win32-i386-low.c (handle_output_debug_string): New.
17026 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
17027 handle_output_debug_string.
17028 (get_child_debug_event): Likewise.
17029
17030 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
17031
17032 * server.c (main): Correct strtoul check.
17033
17034 2007-03-27 Jon Ringle <jon@ringle.org>
17035
17036 * linux-low.c: Check __ARCH_HAS_MMU__ also.
17037
17038 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
17039
17040 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
17041
17042 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
17043
17044 * terminal.h: Check HAVE_SGTTY_H.
17045
17046 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
17047
17048 * remote-utils.c (remote_open): Print out the assigned port number.
17049
17050 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
17051
17052 * remote-utils.c (monitor_output): New function.
17053 * server.c (debug_threads): Define here.
17054 (monitor_show_help): New function.
17055 (handle_query): Handle qRcmd.
17056 (main): Do not handle 'd' packet.
17057 * server.h (debug_threads, remote_debug, monitor_output): Declare.
17058 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
17059 of debug_threads.
17060
17061 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
17062
17063 * Makefile.in (EXEEXT): New.
17064 (clean): Use $(EXEEXT).
17065
17066 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
17067
17068 * target.h (target_ops): Rename send_signal to request_interrupt,
17069 and remove enum target_signal parameter.
17070 * linux-low.c (linux_request_interrupt): Rename from
17071 linux_send_signal, and always send SIGINT.
17072 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
17073 and always send SIGINT.
17074 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
17075 of send_signal.
17076 (input_interrupt): Likewise.
17077
17078 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
17079
17080 * server.c (get_features_xml): Check if target implemented
17081 arch_string.
17082 * win32-i386-low.c (win32_arch_string): New.
17083 (win32_target_ops): Add win32_arch_string as arch_string member.
17084
17085 2007-02-22 Markus Deuling <deuling@de.ibm.com>
17086
17087 * spu-low.c (spu_arch_string): New.
17088 (spu_target_ops): Add spu_arch_string.
17089
17090 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
17091
17092 * remote-utils.c: Remove HAVE_TERMINAL_H check.
17093 * configure.ac: Do not check for terminal.h.
17094 * configure, config.in: Regenerated.
17095
17096 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
17097
17098 * Makefile.in (OBS): Add $(XML_BUILTIN).
17099 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
17100 (clean): Update.
17101 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
17102 (arm-with-iwmmxt.c): New.
17103 * config.in, configure: Regenerate.
17104 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
17105 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
17106 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
17107 (arm*-*-linux*): Add iWMMXt and regset support.
17108 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
17109 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
17110 (arm_store_wmmxregset, target_regsets): New.
17111 * server.c (get_features_xml): Take annex argument. Check builtin
17112 XML documents.
17113 (handle_query): Handle multiple annexes.
17114
17115 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
17116
17117 * remote-utils.c [USE_WIN32API] (read, write): Define.
17118 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
17119 write.
17120
17121 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
17122
17123 * linux-i386-low.c (the_low_target): Set arch_string.
17124 * linux-x86-64-low.c (the_low_target): Likewise.
17125 * linux-low.c (linux_arch_string): New.
17126 (linux_target_ops): Add it.
17127 * linux-low.h (struct linux_target_ops): Add arch_string.
17128 * server.c (write_qxfer_response): Use const void * for DATA.
17129 (get_features_xml): New.
17130 (handle_query): Handle qXfer:features:read. Report it for qSupported.
17131 * target.h (struct target_ops): Add arch_string method.
17132
17133 2007-01-03 Denis Pilat <denis.pilat@st.com>
17134 Daniel Jacobowitz <dan@codesourcery.com>
17135
17136 * linux-low.c (linux_kill): Handle being called with no threads.
17137 * win32-i386-low.c (win32_kill): Likewise.
17138 (get_child_debug_event): Clear current_process_handle.
17139
17140 2006-12-30 Denis PILAT <denis.pilat@st.com>
17141 Daniel Jacobowitz <dan@codesourcery.com>
17142
17143 * remote-utils.c (remote_open): Check the type of specified
17144 serial port devices before opening them.
17145 * server.c (main): Kill the inferior if an error occurs during
17146 the first remote_open.
17147
17148 2006-12-05 Markus Deuling <deuling@de.ibm.com>
17149
17150 * README: Update supported targets.
17151
17152 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
17153
17154 * Makefile.in (clean): Remove reg-mips64.c.
17155 (reg-mips64.c, reg-mips64.o): New rules.
17156 * configure.srv: Handle mips64. Include regset support for mips.
17157 * linux-mips-low.c (union mips_register): New.
17158 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
17159 (mips_breakpoint, mips_breakpoint_at): Use int.
17160 (mips_collect_register, mips_supply_register)
17161 (mips_collect_register_32bit, mips_supply_register_32bit)
17162 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
17163 (mips_store_fpregset, target_regsets): New.
17164 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
17165
17166 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
17167
17168 * configure.srv: Add target "spu*-*-*".
17169 * Makefile.in (clean): Remove reg-spu.c.
17170 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
17171 * spu-low.c: New file.
17172
17173 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
17174
17175 * configure.ac: Correct td_thr_tls_get_addr test.
17176 * configure: Regenerated.
17177
17178 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
17179
17180 * linux-low.c (linux_wait_for_event): Reformat. Use the
17181 pass_signals array.
17182 * remote-utils.c (decode_address_to_semicolon): New.
17183 * server.c (pass_signals, handle_general_set): New.
17184 (handle_query): Mention QPassSignals for qSupported.
17185 (main): Call handle_general_set.
17186 * server.h (pass_signals, decode_address_to_semicolon): New.
17187
17188 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
17189
17190 * server.c (handle_query): Correct error handling for read_auxv.
17191
17192 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
17193
17194 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
17195 and srv_linux_thread_db to yes.
17196 * linux-s390-low.c (s390_fill_gregset): New function.
17197 (target_regsets): Define data structure.
17198
17199 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
17200
17201 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
17202 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
17203 * config.in, configure: Regenerated.
17204 * inferiors.c (gdb_id_to_thread): New function.
17205 (gdb_id_to_thread_id): Use it.
17206 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
17207 * linux-low.h (struct process_info): Add th member.
17208 (thread_db_get_tls_address): New prototype.
17209 * remote-utils.c (decode_address): Make non-static.
17210 * server.c (handle_query): Handle qGetTLSAddr.
17211 * server.h (gdb_id_to_thread, decode_address): New prototypes.
17212 * target.h (struct target_ops): Add get_tls_address.
17213 * thread-db.c (maybe_attach_thread): Save the thread handle.
17214 (thread_db_get_tls_address): New.
17215
17216 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
17217
17218 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
17219 (linux_resume_one_process): Take a siginfo_t *. Update all
17220 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
17221 (struct pending_signals): Add a siginfo_t.
17222 (linux_wait_for_process): Always set last_status.
17223 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
17224 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
17225 * linux-low.h (struct process_info): Add last_status.
17226
17227 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
17228
17229 * remote-utils.c (try_rle): New function.
17230 (putpkt_binary): Use it.
17231
17232 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
17233
17234 * Makefile.in (clean): Clean reg-x86-64-linux.c.
17235 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
17236 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
17237 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
17238 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
17239 point registers.
17240
17241 2006-08-08 Richard Sandiford <richard@codesourcery.com>
17242
17243 * server.c (terminal_fd): New variable.
17244 (old_foreground_pgrp): Likewise.
17245 (restore_old_foreground_pgrp): New function.
17246 (start_inferior): Record the terminal file descriptor in terminal_fd
17247 and its original foreground group in old_foreground_pgrp. Register
17248 restore_old_foreground_pgrp with atexit().
17249
17250 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
17251
17252 * server.c (handle_query): Correct qPart to qXfer.
17253
17254 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
17255
17256 * configure.ac: Check for more headers which are missing on
17257 Windows. Automatically supply -lwsock32 and USE_WIN32API.
17258 * configure.srv: Add Cygwin and mingw32.
17259 * remote-utils.c: Don't include headers unconditionally which
17260 are missing on mingw32. Include <winsock.h> for mingw32.
17261 (remote_open): Adjust for mingw32 support. Flush
17262 standard error after writing to it.
17263 (remote_close, putpkt_binary, input_interrupt, block_async_io)
17264 (unblock_async_io, enable_async_io, disable_async_io)
17265 (readchar, getpkt): Update for Winsock support.
17266 (prepare_resume_reply): Expect a protocol signal number.
17267 * server.c: Disable <sys/wait.h> on mingw32.
17268 (start_inferior): Adjust for mingw32 support. Flush
17269 standard error after writing to it.
17270 (attach_inferior): Likewise. Use protocol signal
17271 numbers.
17272 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
17273 and names.
17274 * win32-i386-low.c: New file.
17275 * Makefile.in (XM_CLIBS): Set.
17276 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
17277 (win32-i386-low.o): New dependency rule.
17278 * linux-low.c (linux_wait): Use target signal numbers.
17279 * target.h (struct target_ops): Doc fix.
17280 * server.h (target_signal_to_name): New prototype.
17281 * gdbreplay.c: Don't include headers unconditionally which
17282 are missing on mingw32. Include <winsock.h> for mingw32.
17283 (remote_close, remote_open): Adjust for Winsock support.
17284 * configure, config.in: Regenerated.
17285
17286 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
17287
17288 * server.c (decode_xfer_read, write_qxfer_response): New.
17289 (handle_query): Take a packet length argument. Handle
17290 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
17291 the qSupported response.
17292 (main): Update call to handle_query.
17293
17294 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
17295
17296 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
17297 (putpkt_binary): Renamed from putpkt and adjusted for binary
17298 data.
17299 (putpkt): New wrapper for putpkt_binary.
17300 (readchar): Don't mask off the high bit.
17301 (decode_X_packet): New function.
17302 * server.c (main): Call putpkt_binary if a handler sets the packet
17303 length. Save the length of the incoming packet. Handle 'X'.
17304 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
17305
17306 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
17307
17308 * server.c (handle_query): Handle qSupported.
17309
17310 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
17311
17312 * remote-utils.c (all_symbols_looked_up): New variable.
17313 (look_up_one_symbol): Check it.
17314 * server.h (look_up_one_symbol): New declaration.
17315 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
17316
17317 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
17318
17319 * Makefile.in (linux-arm-low.o): Update dependencies.
17320 * linux-arm-low.c: Include "gdb_proc_service.h".
17321 (PTRACE_GET_THREAD_AREA): Define.
17322 (ps_get_thread_area): New function.
17323
17324 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
17325
17326 * configure.srv (m68k*-*-uclinux*): New target.
17327 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
17328 (linux_resume_one_process): Remove extraneous cast.
17329 (linux_read_offsets): New.
17330 (linux_target_op): Add linux_read_offsets on mmuless systems.
17331 * server.c (handle_query): Add qOffsets logic.
17332 * target.h (struct target_ops): Add read_offsets.
17333
17334 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
17335
17336 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
17337 (PTRACE_GET_THREAD_AREA): Define.
17338 (ps_get_thread_area): New function.
17339 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
17340 (linux-x86-64-low.o): Update.
17341
17342 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
17343
17344 * configure.ac: Remove checks for prfpregset_t.
17345 * gdb_proc_service.h: New file.
17346 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
17347 new "gdb_proc_service.h".
17348 * proc-service.c: Likewise.
17349 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
17350 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
17351 * Makefile.in (gdb_proc_service_h): Updated.
17352 * configure, config.in: Regenerated.
17353
17354 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
17355
17356 * remote-utils.c (prepare_resume_reply): Move declaration
17357 of gdb_id_from_wait to the top of the block.
17358
17359 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
17360
17361 * linux-low.c (regsets_store_inferior_registers): Read the regset
17362 from the target before filling it.
17363
17364 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
17365
17366 * server.c (attach_inferior): Return SIGTRAP for a successful
17367 attach.
17368
17369 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
17370
17371 * Makefile.in (OBS): Add version.o.
17372 (STAGESTUFF): Delete.
17373 (version.o): Add dependencies.
17374 (version.c): Replace rule.
17375 (clean): Remove version.c.
17376 * server.c (gdbserver_version): New.
17377 (gdbserver_usage): Use printf.
17378 (main): Handle --version and --help.
17379 * server.h (version, host_name): Add declarations.
17380
17381 2005-12-23 Eli Zaretskii <eliz@gnu.org>
17382
17383 * linux-arm-low.c:
17384 * linux-arm-low.c:
17385 * inferiors.c:
17386 * i387-fp.h:
17387 * i387-fp.c:
17388 * gdbreplay.c:
17389 * regcache.c:
17390 * proc-service.c:
17391 * mem-break.h:
17392 * mem-break.c:
17393 * linux-x86-64-low.c:
17394 * linux-sh-low.c:
17395 * linux-s390-low.c:
17396 * linux-ppc64-low.c:
17397 * linux-ppc-low.c:
17398 * linux-mips-low.c:
17399 * linux-m68k-low.c:
17400 * linux-m32r-low.c:
17401 * linux-low.h:
17402 * linux-low.c:
17403 * linux-ia64-low.c:
17404 * linux-i386-low.c:
17405 * linux-crisv32-low.c:
17406 * thread-db.c:
17407 * terminal.h:
17408 * target.h:
17409 * target.c:
17410 * server.h:
17411 * server.c:
17412 * remote-utils.c:
17413 * regcache.h:
17414 * utils.c:
17415 * Makefile.in:
17416 * configure.ac:
17417 * gdbserver.1: Add (C) after Copyright. Update the FSF
17418 address.
17419
17420 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
17421
17422 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
17423 (arm_breakpoint_at): Recognize both breakpoints.
17424 (the_low_target): Use the correct breakpoint instruction.
17425
17426 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
17427
17428 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
17429 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
17430 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
17431 (the_low_target): Update.
17432
17433 2005-10-25 Andreas Schwab <schwab@suse.de>
17434
17435 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
17436
17437 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
17438 (ia64_num_regs): Reduce to 462.
17439
17440 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
17441
17442 * acinclude.m4: Correct quoting.
17443 * aclocal.m4: Regenerated.
17444
17445 Suggested by SZOKOVACS Robert <szo@ies.hu>:
17446 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
17447 (thread_db_init): Call thread_db_err_str.
17448 * configure.ac: Check for TD_VERSION.
17449 * config.in, configure: Regenerated.
17450
17451 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
17452
17453 * server.h (error, fatal, warning): Add ATTR_FORMAT.
17454
17455 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
17456
17457 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
17458 is not available. Define HAVE_PTRACE_GETREGS if it is.
17459 * config.in, configure: Regenerated.
17460 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
17461 * linux-i386-low.c, linux-m68k-low.c: Update to use
17462 HAVE_PTRACE_GETREGS.
17463 * linux-low.c (regsets_fetch_inferior_registers)
17464 (regsets_store_inferior_registers): Only return 0 if we processed
17465 GENERAL_REGS.
17466 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
17467 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
17468
17469 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
17470
17471 * inferiors.c (struct thread_info): Add gdb_id.
17472 (add_thread): Add gdb_id argument.
17473 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
17474 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
17475 calls to add_thread.
17476 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
17477 * server.c (handle_query): Use thread_to_gdb_id.
17478 (handle_v_cont, main): Use gdb_id_to_thread_id.
17479 * server.h (add_thread): Update prototype.
17480 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
17481 prototypes.
17482
17483 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
17484
17485 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
17486 left-padded registers.
17487 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
17488 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
17489
17490 2005-07-01 Steve Ellcey <sje@cup.hp.com>
17491
17492 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
17493 * configure: Regenerate.
17494 * config.in: Regenerate.
17495 * server.h (NEED_DECLARATION_STRERROR):
17496 Replace with !HAVE_DECL_STRERROR.
17497
17498 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
17499
17500 * linux-low.c (linux_wait, linux_send_signal): Don't test
17501 an unsigned long variable for > 0 if it could be MAX_ULONG.
17502 * server.c (myresume): Likewise.
17503 * target.c (set_desired_inferior): Likewise.
17504
17505 2005-06-13 Mark Kettenis <kettenis@gnu.org>
17506
17507 * configure.ac: Simplify and improve check for socklen_t.
17508 * configure, config.in: Regenerate.
17509
17510 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
17511
17512 * acconfig.h: Remove.
17513 * configure.ac: Add a test for socklen_t. Use three-argument
17514 AC_DEFINE throughout.
17515 * config.in: Regenerated using autoheader 2.59.
17516 * configure: Regenerated.
17517
17518 * gdbreplay.c (socklen_t): Provide a default.
17519 (remote_open): Use socklen_t.
17520 * remote-utils.c (socklen_t): Provide a default.
17521 (remote_open): Use socklen_t.
17522 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
17523 unsigned char.
17524
17525 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
17526 char for buffers.
17527 * linux-low.c (linux_read_memory, linux_write_memory)
17528 (linux_read_auxv): Likewise.
17529 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
17530 (check_mem_write): Likewise.
17531 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
17532 Likewise.
17533 * regcache.c (struct inferior_rgcache_data, registers_to_string)
17534 (registers_from_string, register_data): Likewise.
17535 * server.c (handle_query, main): Likewise.
17536 * server.h (convert_ascii_to_int, convert_int_to_ascii)
17537 (decode_M_packet): Likewise.
17538 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
17539 * target.h (struct target_ops): Update read_memory, write_memory,
17540 and read_auxv.
17541 (read_inferior_memory, write_inferior_memory): Update.
17542 * linux-low.h (struct linux_target_ops): Change type of breakpoint
17543 to unsigned char *.
17544 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
17545 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
17546 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
17547 linux-s390-low.c, linux-sh-low.c: Update for changes in
17548 read_inferior_memory and the_low_target->breakpoint.
17549
17550 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
17551
17552 * Makefile.in (SFILES): Add linux-ppc64-low.c.
17553 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
17554 * configure.srv: Add powerpc64-*-linux*.
17555 * linux-ppc64-low.c: New file.
17556
17557 2005-05-23 Orjan Friberg <orjanf@axis.com>
17558
17559 * linux-cris-low.c: New file with support for CRIS.
17560 * linux-crisv32-low.c: Ditto for CRISv32.
17561 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
17562 (clean): Add reg-cris.c and reg-crisv32.c.
17563 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
17564 reg-crisv32.o, and reg-crisv32.c to make rules.
17565 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
17566 recognized targets.
17567
17568 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
17569
17570 * linux-low.c (fetch_register): Ensure buffer size is a multiple
17571 of sizeof (PTRACE_XFER_TYPE).
17572 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
17573
17574 2005-05-12 Orjan Friberg <orjanf@axis.com>
17575
17576 * target.h (struct target_ops): Add insert_watchpoint,
17577 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
17578 pointers for hardware watchpoint support.
17579 * linux-low.h (struct linux_target_ops): Ditto.
17580 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
17581 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
17582 to linux_target_ops.
17583 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
17584 reply packet.
17585 * server.c (main): Recognize 'Z' and 'z' packets.
17586
17587 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
17588
17589 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
17590 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
17591 (the_low_target): Add new members.
17592
17593 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
17594
17595 * proc-service.c (ps_lgetregs): Search all_processes instead of
17596 all_threads.
17597
17598 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
17599
17600 * server.c (start_inferior): Change return type to int.
17601 (attach_inferior): Change sigptr to int *.
17602 (handle_v_cont, handle_v_requests): Change signal to int *.
17603 (main): Change signal to int.
17604
17605 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
17606
17607 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
17608 * configure.srv: Add m32r*-*-linux*.
17609 * linux-m32r-low.c: New file.
17610
17611 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
17612
17613 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
17614
17615 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
17616
17617 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
17618 Take unsigned long arguments for PIDs.
17619 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
17620 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
17621 (wait_for_sigstop, linux_resume_one_process)
17622 (regsets_fetch_inferior_registers, linux_send_signal)
17623 (linux_read_auxv): Likewise. Update the types of variables holding
17624 PIDs. Update format string specifiers.
17625 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
17626 * remote-utils.c (prepare_resume_reply): Likewise.
17627 * server.c (cont_thread, general_thread, step_thread)
17628 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
17629 unsigned long.
17630 (handle_query): Update format specifiers.
17631 (handle_v_cont, main): Use strtoul for thread IDs.
17632 * server.h (struct inferior_list_entry): Use unsigned long for ID.
17633 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
17634 (general_thread, step_thread, thread_from_wait)
17635 (old_thread_from_wait): Update.
17636 * target.h (struct thread_resume): Use unsigned long for THREAD.
17637 (struct target_ops): Use unsigned long for arguments to attach and
17638 thread_alive.
17639
17640 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
17641
17642 * acinclude.m4: Include bfd/bfd.m4 directly.
17643 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
17644 <agriffis@toolchain.org>.
17645 * aclocal.m4, configure: Regenerated.
17646
17647 2005-01-07 Andrew Cagney <cagney@gnu.org>
17648
17649 * configure.ac: Rename configure.in, require autoconf 2.59.
17650 * configure: Re-generate.
17651
17652 2004-12-08 Daniel Jacobowitz <dan@debian.org>
17653
17654 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
17655 LIBS when finished.
17656 * aclocal.m4: Regenerated.
17657 * configure: Regenerated.
17658
17659 2004-11-21 Andreas Schwab <schwab@suse.de>
17660
17661 * linux-m68k-low.c (m68k_num_gregs): Define.
17662 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
17663 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
17664 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
17665 (m68k_breakpoint_at): New. Add to the_low_target.
17666
17667 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
17668 srv_linux_thread_db to yes.
17669
17670 2004-10-20 Joel Brobecker <brobecker@gnat.com>
17671
17672 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
17673 (ARCH_SET_FS): Likewise.
17674 (ARCH_GET_FS): Likewise.
17675 (ARCH_GET_GS): Likewise.
17676
17677 2004-10-16 Daniel Jacobowitz <dan@debian.org>
17678
17679 * linux-i386-low.c (ps_get_thread_area): New.
17680 * linux-x86-64-low.c (ps_get_thread_area): New.
17681 * linux-low.c: Include <sys/syscall.h>.
17682 (linux_kill_one_process): Don't kill the first thread here.
17683 (linux_kill): Kill the first thread here.
17684 (kill_lwp): New function.
17685 (send_sigstop, linux_send_signal): Use it.
17686 * proc-service.c: Clean up #ifdefs.
17687 (fpregset_info): Delete.
17688 (ps_lgetregs): Update and enable implementation.
17689 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
17690 implementations.
17691 * remote-utils.c (struct sym_cache, symbol_cache): New.
17692 (input_interrupt): Print a clearer message.
17693 (async_io_enabled): New variable.
17694 (enable_async_io, disable_async_io): Use it. Update comments.
17695 (look_up_one_symbol): Use the symbol cache.
17696 * thread-db.c (thread_db_look_up_symbols): New function.
17697 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
17698
17699 2004-10-16 Daniel Jacobowitz <dan@debian.org>
17700
17701 * configure.in: Test for -rdynamic.
17702 * configure: Regenerated.
17703 * Makefile (INTERNAL_LDFLAGS): New.
17704 (gdbserver, gdbreplay): Use it.
17705
17706 2004-09-02 Andrew Cagney <cagney@gnu.org>
17707
17708 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
17709
17710 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
17711
17712 * linux-low.c (linux_wait): Clear all_processes list also.
17713
17714 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
17715
17716 * linux-low.c: Include <errno.h>. Remove extern declaration of
17717 errno.
17718
17719 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
17720
17721 * gdbreplay.c, server.h, utils.c: Update copyright years.
17722
17723 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
17724
17725 * server.c (main): Print child status or termination signal from
17726 variable 'signal', not 'sig'.
17727
17728 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
17729
17730 * linux-low.c (linux_read_memory): Change return type to
17731 int. Check for and return error from ptrace().
17732 * target.c (read_inferior_memory): Change return type to int. Pass
17733 back return status from the_target->read_memory().
17734 * target.h (struct target_ops): Adapt *read_memory() prototype.
17735 Update comment.
17736 (read_inferior_memory): Adapt prototype.
17737 * server.c (main): Return an error packet if
17738 read_inferior_memory() returns an error.
17739
17740 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
17741
17742 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
17743 Unify with other clean targets.
17744
17745 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
17746
17747 * server.c (handle_v_cont): Call set_desired_inferior.
17748
17749 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
17750
17751 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
17752
17753 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
17754
17755 * linux-low.c (linux_wait): Unblock async I/O.
17756 (linux_resume): Block and enable async I/O.
17757 * remote-utils.c (block_async_io, unblock_async_io): New functions.
17758 * server.h (block_async_io, unblock_async_io): Add prototypes.
17759
17760 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
17761
17762 * remote-utils.c (remote_open): Print a status notice after
17763 opening a TCP port.
17764 * server.c (attach_inferior): Print a status notice after
17765 attaching.
17766
17767 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
17768
17769 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
17770
17771 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
17772
17773 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
17774 error packet.
17775 * server.c, target.h: Update copyright years.
17776
17777 2004-02-25 Roland McGrath <roland@redhat.com>
17778
17779 * target.h (struct target_ops): New member `read_auxv'.
17780 * server.c (handle_query): Handle qPart:auxv:read: query using that.
17781 * linux-low.c (linux_read_auxv): New function.
17782 (linux_target_ops): Initialize `read_auxv' member to that.
17783
17784 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
17785
17786 Committed by Jim Blandy <jimb@redhat.com>.
17787
17788 * linux-s390-low.c (s390_num_regs): Update.
17789 (s390_regmap): Remove control registers. Use __s390x__ predefine
17790 instead of GPR_SIZE to distiguish s390 and s390x targets.
17791
17792 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
17793
17794 * linux-low.c: Update copyright year.
17795 (check_removed_breakpoint): Clear pending_is_breakpoint.
17796 (linux_set_resume_request, linux_queue_one_thread)
17797 (resume_status_pending_p): New functions.
17798 (linux_continue_one_thread): Use process->resume.
17799 (linux_resume): Only resume threads if there are no pending events.
17800 * linux-low.h (struct process_info): Add resume request
17801 pointer.
17802
17803 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
17804
17805 * regcache.c (new_register_cache): Clear the allocated register
17806 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
17807
17808 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
17809
17810 * linux-low.c (linux_resume): Take a struct thread_resume *
17811 argument.
17812 (linux_wait): Update call.
17813 (resume_ptr): New static variable.
17814 (linux_continue_one_thread): Renamed from
17815 linux_continue_one_process. Use resume_ptr.
17816 (linux_resume): Use linux_continue_one_thread.
17817 * server.c (handle_v_cont, handle_v_requests): New functions.
17818 (myresume): New function.
17819 (main): Handle 'v' case.
17820 * target.h (struct thread_resume): New type.
17821 (struct target_ops): Change argument of "resume" to struct
17822 thread_resume *.
17823 (myresume): Delete macro.
17824
17825 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
17826
17827 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
17828 (uninstall): Support DESTDIR.
17829
17830 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
17831
17832 * configure.srv: Add xscale*linux copy of arm*linux entry.
17833
17834 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
17835
17836 * linux-arm-low.c (arm_reinsert_addr): New function.
17837 (the_low_target): Add arm_reinsert_addr.
17838
17839 2003-07-08 Mark Kettenis <kettenis@gnu.org>
17840
17841 * mem-break.c: Remove whitespace at end of file.
17842
17843 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
17844
17845 * configure.in: Check whether we need to prototype strerror.
17846 * server.h: Optionally prototype strerror.
17847 * gdbreplay.c (perror_with_name): Use strerror.
17848 * linux-low.c (linux_attach_lwp): Use strerror.
17849 * utils.c (perror_with_name): Use strerror.
17850 * config.in, configure: Regenerated.
17851
17852 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
17853
17854 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
17855 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
17856
17857 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
17858
17859 * Makefile.in (SFILES): Update.
17860 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
17861 low-sun3.c: Remove files.
17862
17863 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
17864
17865 * linux-low.c: Move comment to linux_thread_alive where it belonged.
17866 (linux_detach_one_process, linux_detach): New functions.
17867 (linux_target_ops): Add linux_detach.
17868 * server.c (main): Handle 'D' packet.
17869 * target.h (struct target_ops): Add "detach" member.
17870 (detach_inferior): Define.
17871
17872 2003-06-13 Mark Kettenis <kettenis@gnu.org>
17873
17874 From Kelley Cook <kelleycook@wideopenwest.com>:
17875 * configure.srv: Accept i[34567]86 variants.
17876
17877 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
17878
17879 * linux-low.c (linux_wait_for_event): Correct comment typos.
17880 (linux_resume_one_process): Call check_removed_breakpoint.
17881 (linux_send_signal): New function.
17882 (linux_target_ops): Add linux_send_signal.
17883 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
17884 of kill.
17885 * target.h (struct target_ops): Add send_signal.
17886
17887 2003-05-29 Jim Blandy <jimb@redhat.com>
17888
17889 * linux-low.c (usr_store_inferior_registers): Transfer buf in
17890 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
17891 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
17892 away part of the register's value.
17893
17894 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
17895
17896 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
17897 (linux_wait_for_event, linux_init_signals): Likewise.
17898
17899 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
17900
17901 * configure.in: Check for stdlib.h.
17902 * configure: Regenerated.
17903 * config.in: Regenerated.
17904
17905 2003-01-04 Andreas Schwab <schwab@suse.de>
17906
17907 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
17908
17909 2003-01-02 Andrew Cagney <ac131313@redhat.com>
17910
17911 * Makefile.in: Remove obsolete code.
17912
17913 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
17914
17915 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
17916 defined(PT_FPR0_HI).
17917
17918 2002-11-17 Stuart Hughes <seh@zee2.com>
17919
17920 * linux-arm-low.c (arm_num_regs): Increase.
17921 (arm_regmap): Include status register.
17922
17923 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
17924
17925 * linux-low.c (register_addr): Remove incorrect -1 check.
17926
17927 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
17928
17929 * linux-low.c (linux_create_inferior): Call setpgid. Return
17930 the new PID.
17931 (unstopped_p, linux_signal_pid): Remove.
17932 (linux_target_ops): Remove linux_signal_pid.
17933 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
17934 global instead of target method.
17935 * target.h (struct target_ops): Remove signal_pid. Update comment
17936 for create_inferior.
17937 * server.c (signal_pid): New variable.
17938 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
17939 gdbserver. Set the child to be the foreground process group.
17940 (attach_inferior): Set signal_pid.
17941
17942 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
17943
17944 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
17945
17946 2002-08-20 Jim Blandy <jimb@redhat.com>
17947
17948 * Makefile.in (LDFLAGS): Allow the configure script to establish a
17949 default for this.
17950
17951 2002-08-01 Andrew Cagney <cagney@redhat.com>
17952
17953 * Makefile.in: Make chill references obsolete.
17954
17955 2002-07-24 Kevin Buettner <kevinb@redhat.com>
17956
17957 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
17958 * configure: Regenerate.
17959 * config.in: Regenerate.
17960
17961 2002-07-09 David O'Brien <obrien@FreeBSD.org>
17962
17963 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
17964 (perror_with_name, remote_close, remote_open, expect, play): Static.
17965
17966 2002-07-04 Michal Ludvig <mludvig@suse.cz>
17967
17968 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17969 byte offsets instead of an array of indexes.
17970 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
17971
17972 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
17973
17974 * regcache.c: Add comment.
17975
17976 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
17977
17978 * thread-db.c: New file.
17979 * proc-service.c: New file.
17980 * acinclude.m4: New file.
17981 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
17982 proc-service.o, and thread-db.o.
17983 (linux-low.o): Add USE_THREAD_DB.
17984 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
17985 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
17986 * aclocal.m4: Regenerated.
17987 * config.in: Regenerated.
17988 * configure: Regenerated.
17989 * configure.in: Check for proc_service.h, sys/procfs.h,
17990 thread_db.h, and linux/elf.h headrs.
17991 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
17992 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
17993 Check for -lthread_db and thread support.
17994 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
17995 PowerPC, and SuperH.
17996 * i387-fp.c: Constify arguments.
17997 * i387-fp.h: Likewise.
17998 * inferiors.c: (struct thread_info): Renamed from
17999 `struct inferior_info'. Remove PID member. Use generic inferior
18000 list header. All uses updated.
18001 (inferiors, signal_pid): Removed.
18002 (all_threads): New variable.
18003 (get_thread): Define.
18004 (add_inferior_to_list): New function.
18005 (for_each_inferior): New function.
18006 (change_inferior_id): New function.
18007 (add_inferior): Removed.
18008 (remove_inferior): New function.
18009 (add_thread): New function.
18010 (free_one_thread): New function.
18011 (remove_thread): New function.
18012 (clear_inferiors): Use for_each_inferior and free_one_thread.
18013 (find_inferior): New function.
18014 (find_inferior_id): New function.
18015 (inferior_target_data): Update argument type.
18016 (set_inferior_target_data): Likewise.
18017 (inferior_regcache_data): Likewise.
18018 (set_inferior_regcache_data): Likewise.
18019 * linux-low.c (linux_bp_reinsert): Remove.
18020 (all_processes, stopping_threads, using_thrads)
18021 (struct pending_signals, debug_threads, pid_of): New.
18022 (inferior_pid): Replace with macro.
18023 (struct inferior_linux_data): Remove.
18024 (get_stop_pc, add_process): New functions.
18025 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
18026 Use add_process and add_thread.
18027 (linux_attach_lwp): New function, based on old linux_attach. Use
18028 add_process and add_thread. Set stop_expected for new threads.
18029 (linux_attach): New function.
18030 (linux_kill_one_process): New function.
18031 (linux_kill): Kill all LWPs.
18032 (linux_thread_alive): Use find_inferior_id.
18033 (check_removed_breakpoints, status_pending_p): New functions.
18034 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
18035 Update. Use WNOHANG. Wait for cloned processes also. Update process
18036 struct for the found process.
18037 (linux_wait_for_event): New function.
18038 (linux_wait): Use it. Support LWPs.
18039 (send_sigstop, wait_for_sigstop, stop_all_processes)
18040 (linux_resume_one_process, linux_continue_one_process): New functions.
18041 (linux_resume): Support LWPs.
18042 (REGISTER_RAW_SIZE): Remove.
18043 (fetch_register): Use register_size instead. Call supply_register.
18044 (usr_store_inferior_registers): Likewise. Call collect_register.
18045 Fix recursive case.
18046 (regsets_fetch_inferior_registers): Improve error message.
18047 (regsets_store_inferior_registers): Add debugging.
18048 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
18049 (unstopped_p, linux_signal_pid): New functions.
18050 (linux_target_ops): Add linux_signal_pid.
18051 (linux_init_signals): New function.
18052 (initialize_low): Call it. Initialize using_threads.
18053 * regcache.c (inferior_regcache_data): Add valid
18054 flag.
18055 (get_regcache): Fetch registers lazily. Add fetch argument
18056 and update all callers.
18057 (regcache_invalidate_one, regcache_invalidate): New
18058 functions.
18059 (new_register_cache): Renamed from create_register_cache.
18060 Return the new regcache.
18061 (free_register_cache): Change argument to a void *.
18062 (registers_to_string, registers_from_string): Call get_regcache
18063 with fetch flag set.
18064 (register_data): Make static. Pass fetch flag to get_regcache.
18065 (supply_register): Call get_regcache with fetch flag clear.
18066 (collect_register): Call get_regcache with fetch flag set.
18067 (collect_register_as_string): New function.
18068 * regcache.h: Update.
18069 * remote-utils.c (putpkt): Flush after debug output and use
18070 stderr.
18071 Handle input interrupts while waiting for an ACK.
18072 (input_interrupt): Use signal_pid method.
18073 (getpkt): Flush after debug output and use stderr.
18074 (outreg): Use collect_register_as_string.
18075 (new_thread_notify, dead_thread_notify): New functions.
18076 (prepare_resume_reply): Check using_threads. Set thread_from_wait
18077 and general_thread.
18078 (look_up_one_symbol): Flush after debug output.
18079 * server.c (step_thread, server_waiting): New variables.
18080 (start_inferior): Don't use signal_pid. Update call to mywait.
18081 (attach_inferior): Update call to mywait.
18082 (handle_query): Handle qfThreadInfo and qsThreadInfo.
18083 (main): Don't fetch/store registers explicitly. Use
18084 set_desired_inferior. Support proposed ``Hs'' packet. Update
18085 calls to mywait.
18086 * server.h: Update.
18087 (struct inferior_list, struct_inferior_list_entry): New.
18088 * target.c (set_desired_inferior): New.
18089 (write_inferior_memory): Constify.
18090 (mywait): New function.
18091 * target.h: Update.
18092 (struct target_ops): New signal_pid method.
18093 (mywait): Removed macro, added prototype.
18094
18095 * linux-low.h (regset_func): Removed.
18096 (regset_fill_func, regset_store_func): New.
18097 (enum regset_type): New.
18098 (struct regset_info): Add type field. Use new operation types.
18099 (struct linux_target_ops): stop_pc renamed to get_pc.
18100 Add decr_pc_after_break and breakpoint_at.
18101 (get_process, get_thread_proess, get_process_thread)
18102 (strut process_info, all_processes, linux_attach_lwp)
18103 (thread_db_init): New.
18104
18105 * linux-arm-low.c (arm_get_pc, arm_set_pc,
18106 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
18107 (the_low_target): Add new members.
18108 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
18109 (i386_store_fpxregset): Constify.
18110 (target_regsets): Add new kind identifier.
18111 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
18112 (i386_set_pc): Add debugging.
18113 (i386_breakpoint_at): New function.
18114 (the_low_target): Add new members.
18115 * linux-mips-low.c (mips_get_pc, mips_set_pc)
18116 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
18117 (mips_breakpoint_at): New.
18118 (the_low_target): Add new members.
18119 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
18120 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
18121 (the_low_target): Add new members.
18122 * linux-sh-low.c (sh_get_pc, sh_set_pc)
18123 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
18124 (the_low_target): Add new members.
18125 * linux-x86-64-low.c (target_regsets): Add new kind
18126 identifier.
18127
18128 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
18129
18130 From Martin Pool <mbp@samba.org>:
18131 * server.c (gdbserver_usage): New function.
18132 (main): Call it.
18133
18134 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
18135
18136 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
18137 stop_at -> stop_pc.
18138
18139 2002-05-04 Andrew Cagney <ac131313@redhat.com>
18140
18141 * Makefile.in: Remove obsolete code.
18142
18143 2002-04-24 Michal Ludvig <mludvig@suse.cz>
18144
18145 * linux-low.c (regsets_fetch_inferior_registers),
18146 (regsets_store_inferior_registers): Removed cast to int from
18147 ptrace() calls.
18148 * regcache.h: Added declaration of struct inferior_info.
18149
18150 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
18151
18152 * inferiors.c (struct inferior_info): Add regcache_data.
18153 (add_inferior): Call create_register_cache.
18154 (clear_inferiors): Call free_register_cache.
18155 (inferior_regcache_data, set_inferior_regcache_data): New functions.
18156 * regcache.c (struct inferior_regcache_data): New.
18157 (registers): Remove.
18158 (get_regcache): New function.
18159 (create_register_cache, free_register_cache): New functions.
18160 (set_register_cache): Don't initialize the register cache here.
18161 (registers_to_string, registers_from_string, register_data): Call
18162 get_regcache.
18163 * regcache.h: Add prototypes.
18164 * server.h: Likewise.
18165
18166 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
18167
18168 * mem-break.c: New file.
18169 * mem-break.h: New file.
18170 * Makefile.in: Add mem-break.o rule; update server.h
18171 dependencies.
18172 * inferiors.c (struct inferior_info): Add target_data
18173 member.
18174 (clear_inferiors): Free target_data member if set.
18175 (inferior_target_data, set_inferior_target_data): New functions.
18176 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
18177 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
18178 * linux-low.c (linux_bp_reinsert): New variable.
18179 (struct inferior_linux_data): New.
18180 (linux_create_inferior): Use set_inferior_target_data.
18181 (linux_attach): Likewise. Call add_inferior.
18182 (linux_wait_for_one_inferior): New function.
18183 (linux_wait): Call it.
18184 (linux_write_memory): Add const.
18185 (initialize_low): Call set_breakpoint_data.
18186 * linux-low.h (struct linux_target_ops): Add breakpoint
18187 handling members.
18188 * server.c (attach_inferior): Remove extra add_inferior
18189 call.
18190 * server.h: Include mem-break.h. Update inferior.c
18191 prototypes.
18192 * target.c (read_inferior_memory)
18193 (write_inferior_memory): New functions.
18194 * target.h (read_inferior_memory)
18195 (write_inferior_memory): Change macros to prototypes.
18196 (struct target_ops): Update comments. Add const to write_memory
18197 definition.
18198
18199 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
18200
18201 * linux-low.c (usr_store_inferior_registers): Support
18202 registers which are allowed to fail to store.
18203 * linux-low.h (linux_target_ops): Likewise.
18204 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
18205 (ppc_cannot_store_register): FPSCR may not be storable.
18206
18207 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
18208
18209 * server.h: Include <string.h> if HAVE_STRING_H.
18210 * ChangeLog: Correct paths in last ChangeLog entry.
18211
18212 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
18213
18214 * linux-low.h: Remove obsolete prototypes.
18215 (struct linux_target_ops): New.
18216 (extern the_low_target): New.
18217 * linux-low.c (num_regs, regmap): Remove declarations.
18218 (register_addr): Use the_low_target explicitly.
18219 (fetch_register): Likewise.
18220 (usr_fetch_inferior_registers): Likewise.
18221 (usr_store_inferior_registers): Likewise.
18222 * linux-arm-low.c (num_regs): Remove.
18223 (arm_num_regs): Define.
18224 (arm_regmap): Renamed from regmap, made static.
18225 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
18226 made static.
18227 (arm_cannot_store_register): Renamed from cannot_store_register,
18228 made static.
18229 (the_low_target): New.
18230 * linux-i386-low.c (num_regs): Remove.
18231 (i386_num_regs): Define.
18232 (i386_regmap): Renamed from regmap, made static.
18233 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
18234 made static.
18235 (i386_cannot_store_register): Renamed from cannot_store_register,
18236 made static.
18237 (the_low_target): New.
18238 * linux-ia64-low.c (num_regs): Remove.
18239 (ia64_num_regs): Define.
18240 (ia64_regmap): Renamed from regmap, made static.
18241 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
18242 made static.
18243 (ia64_cannot_store_register): Renamed from cannot_store_register,
18244 made static.
18245 (the_low_target): New.
18246 * linux-m68k-low.c (num_regs): Remove.
18247 (m68k_num_regs): Define.
18248 (m68k_regmap): Renamed from regmap, made static.
18249 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
18250 made static.
18251 (m68k_cannot_store_register): Renamed from cannot_store_register,
18252 made static.
18253 (the_low_target): New.
18254 * linux-mips-low.c (num_regs): Remove.
18255 (mips_num_regs): Define.
18256 (mips_regmap): Renamed from regmap, made static.
18257 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
18258 made static.
18259 (mips_cannot_store_register): Renamed from cannot_store_register,
18260 made static.
18261 (the_low_target): New.
18262 * linux-ppc-low.c (num_regs): Remove.
18263 (ppc_num_regs): Define.
18264 (ppc_regmap): Renamed from regmap, made static.
18265 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
18266 made static.
18267 (ppc_cannot_store_register): Renamed from cannot_store_register,
18268 made static.
18269 (the_low_target): New.
18270 * linux-s390-low.c (num_regs): Remove.
18271 (s390_num_regs): Define.
18272 (s390_regmap): Renamed from regmap, made static.
18273 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
18274 made static.
18275 (s390_cannot_store_register): Renamed from cannot_store_register,
18276 made static.
18277 (the_low_target): New.
18278 * linux-sh-low.c (num_regs): Remove.
18279 (sh_num_regs): Define.
18280 (sh_regmap): Renamed from regmap, made static.
18281 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
18282 made static.
18283 (sh_cannot_store_register): Renamed from cannot_store_register,
18284 made static.
18285 (the_low_target): New.
18286 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
18287 (the_low_target): New.
18288
18289 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
18290
18291 * Makefile.in: Add stamp-h target.
18292 * configure.in: Create stamp-h.
18293 * configure: Regenerated.
18294
18295 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
18296
18297 * inferiors.c: New file.
18298 * target.c: New file.
18299 * target.h: New file.
18300 * Makefile.in: Add target.o and inferiors.o. Update
18301 dependencies.
18302 * linux-low.c (inferior_pid): New static variable,
18303 moved from server.c.
18304 (linux_create_inferior): Renamed from create_inferior.
18305 Call add_inferior. Return 0 on success instead of a PID.
18306 (linux_attach): Renamed from myattach.
18307 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
18308 (linux_thread_alive): Renamed from mythread_alive.
18309 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
18310 child dies.
18311 (linux_resume): Renamed from myresume. Add missing ``return 0''.
18312 (regsets_store_inferior_registers): Correct error message.
18313 Add missing ``return 0''.
18314 (linux_fetch_registers): Renamed from fetch_inferior_registers.
18315 (linux_store_registers): Renamed from store_inferior_registers.
18316 (linux_read_memory): Renamed from read_inferior_memory.
18317 (linux_write_memory): Renamed from write_inferior_memory.
18318 (linux_target_ops): New structure.
18319 (initialize_low): Call set_target_ops ().
18320 * remote-utils.c (unhexify): New function.
18321 (hexify): New function.
18322 (input_interrupt): Send signals to ``signal_pid''.
18323 * server.c (inferior_pid): Remove.
18324 (start_inferior): Update create_inferior call.
18325 (attach_inferior): Call add_inferior.
18326 (handle_query): New function.
18327 (main): Call handle_query for `q' packets.
18328 * server.h: Include "target.h". Remove obsolete prototypes.
18329 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
18330
18331 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
18332
18333 * Makefile.in: Add WARN_CFLAGS. Update configury
18334 dependencies.
18335 * configure.in: Check for <string.h>
18336 * configure: Regenerate.
18337 * config.in: Regenerate.
18338 * gdbreplay.c: Include needed system headers.
18339 (remote_open): Remove strchr prototype.
18340 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
18341 * regcache.c (supply_register): Change buf argument to const void *.
18342 (supply_register_by_name): Likewise.
18343 (collect_register): Change buf argument to void *.
18344 (collect_register_by_name): Likewise.
18345 * regcache.h: Add missing prototypes.
18346 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
18347 * server.c (handle_query): New function.
18348 (attached): New static variable, moved out of main.
18349 (main): Quiet longjmp clobber warnings.
18350 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
18351 * utils.c (error): Remove NORETURN.
18352 (fatal): Likewise.