gdbserver: turn target op 'detach' into a method
[deliverable/binutils-gdb.git] / gdbserver / ChangeLog
CommitLineData
9061c9cf
TBA
12020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2
3 Turn process_stratum_target's detach 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 (detach_inferior): Update the macro.
9
10 Update the derived classes and callers below.
11
12 * linux-low.cc (linux_target_ops): Update.
13 (linux_detach): Turn into ...
14 (linux_process_target::detach): ... this.
15 * linux-low.h (class linux_process_target): Update.
16 * lynx-low.cc (lynx_target_ops): Update.
17 (lynx_detach): Turn into ...
18 (lynx_process_target::detach): ... this.
19 * lynx-low.h (class lynx_process_target): Update.
20 * nto-low.cc (nto_target_ops): Update.
21 (nto_detach): Turn into ...
22 (nto_process_target::detach): ... this.
23 * nto-low.h (class nto_process_target): Update.
24 * win32-low.cc (win32_target_ops): Update.
25 (win32_detach): Turn into ...
26 (win32_process_target::detach): ... this.
27 * win32-low.h (class win32_process_target): Update.
28
c6885a57
TBA
292020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
30
31 Turn process_stratum_target's kill op into a method of
32 process_target.
33
34 * target.h (struct process_stratum_target): Remove the target op.
35 (class process_target): Add the target op.
36
37 Update the derived classes and callers below.
38
39 * target.cc (kill_inferior): Update.
40 * linux-low.cc (linux_target_ops): Update.
41 (linux_kill): Turn into ...
42 (linux_process_target::kill): ... this.
43 * linux-low.h (class linux_process_target): Update.
44 * lynx-low.cc (lynx_target_ops): Update.
45 (lynx_kill): Turn into ...
46 (lynx_process_target::kill): ... this.
47 * lynx-low.h (class lynx_process_target): Update.
48 * nto-low.cc (nto_target_ops): Update.
49 (nto_kill): Turn into ...
50 (nto_process_target::kill): ... this.
51 * nto-low.h (class nto_process_target): Update.
52 * win32-low.cc (win32_target_ops): Update.
53 (win32_kill): Turn into ...
54 (win32_process_target::kill): ... this.
55 * win32-low.h (class win32_process_target): Update.
56
ef03dad8
TBA
572020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
58
59 Turn process_stratum_target's attach op into a method of
60 process_target.
61
62 * target.h (struct process_stratum_target): Remove the target op.
63 (class process_target): Add the target op.
64 (myattach): Update the macro.
65
66 Update the derived classes and callers below.
67
68 * linux-low.cc (linux_target_ops): Update.
69 (linux_attach): Turn into ...
70 (linux_process_target::attach): ... this.
71 * linux-low.h (class linux_process_target): Update.
72 * lynx-low.cc (lynx_target_ops): Update.
73 (lynx_attach): Turn into ...
74 (lynx_process_target::attach): ... this.
75 * lynx-low.h (class lynx_process_target): Update.
76 * nto-low.cc (nto_target_ops): Update.
77 (nto_attach): Turn into ...
78 (nto_process_target::attach): ... this.
79 * nto-low.h (class nto_process_target): Update.
80 * win32-low.cc (win32_target_ops): Update.
81 (win32_attach): Turn into ...
82 (win32_process_target::attach): ... this.
83 * win32-low.h (class win32_process_target): Update.
84
6dee9afb
TBA
852020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
86
87 Turn process_stratum_target's post_create_inferior op into a method
88 of process_target.
89
90 * target.h (struct process_stratum_target): Remove the target op.
91 (class process_target): Add the target op.
92 (target_post_create_inferior): Update the macro.
93 * target.cc (process_target::post_create_inferior): Define.
94
95 Update the derived classes and callers below.
96
97 * linux-low.cc (linux_target_ops): Update.
98 (linux_post_create_inferior): Turn into ...
99 (linux_process_target::post_create_inferior): ... this.
100 * linux-low.h (class linux_process_target): Update.
101 * lynx-low.cc (lynx_target_ops): Update.
102 * nto-low.cc (nto_target_ops): Update.
103 * win32-low.cc (win32_target_ops): Update.
104
15295543
TBA
1052020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
106
107 Turn process_stratum_target's create_inferior op into a method of
108 process_target.
109
110 * target.h (struct process_stratum_target): Remove the target op.
111 (class process_target): Add the target op.
112 (create_inferior): Rename the macro to ...
113 (target_create_inferior): ... this.
114
115 Update the derived classes and callers below.
116
117 * server.cc (handle_v_run): Update.
118 (captured_main): Update.
119 (process_serial_event): Update.
120 * linux-low.cc (linux_target_ops): Update.
121 (linux_create_inferior): Turn into ...
122 (linux_process_target::create_inferior): ... this.
123 * linux-low.h (class linux_process_target): Update.
124 * lynx-low.cc (lynx_target_ops): Update.
125 (lynx_create_inferior): Turn into ...
126 (lynx_process_target::create_inferior): ... this.
127 * lynx-low.h (class lynx_process_target): Update.
128 * nto-low.cc (nto_target_ops): Update.
129 (nto_create_inferior): Turn into ...
130 (nto_process_target::create_inferior): ... this.
131 * nto-low.h (class nto_process_target): Update.
132 * win32-low.cc (win32_target_ops): Update.
133 (win32_create_inferior): Turn into ...
134 (win32_process_target::create_inferior): ... this.
135 * win32-low.h (class win32_process_target): Update.
136
5ef9273d
TBA
1372020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
138
139 * target.h (class process_target): New class definition.
140 (struct process_stratum_target) <pt>: New field with type
141 'process_target*'.
142 * linux-low.h (class linux_process_target): Define as a derived
143 class of 'process_target'.
144 * linux-low.cc (linux_target_ops): Add a linux_process_target*
145 as the 'pt' field.
146 * lynx-low.h (class lynx_process_target): Define as a derived
147 class of 'process_target'.
148 * lynx-low.cc (lynx_target_ops): Add a lynx_process_target*
149 as the 'pt' field.
150 * nto-low.h (class nto_process_target): Define as a derived
151 class of 'process_target'.
152 * nto-low.cc (nto_target_ops): Add an nto_process_target*
153 as the 'pt' field.
154 * win32-low.h (class win32_process_target): Define as a derived
155 class of 'process_target'.
156 * win32-low.cc (win32_target_ops): Add a win32_process_target*
157 as the 'pt' field.
158
9f1528a1
AB
1592020-02-19 Andrew Burgess <andrew.burgess@embecosm.com>
160
161 * configure: Regenerate.
162
bf84f706
MR
1632020-02-19 Maciej W. Rozycki <macro@wdc.com>
164 Andrew Burgess <andrew.burgess@embecosm.com>
165
166 * linux-riscv-low.cc: New file.
167 * Makefile.in (SFILES): Add linux-riscv-low.cc, arch/riscv.c,
168 and nat/riscv-linux-tdesc.c.
169 * configure.srv <riscv*-*-linux*> (srv_tgtobj)
170 (srv_linux_regsets, srv_linux_usrregs, srv_linux_thread_db):
171 Define.
172
1a627e7e
TT
1732020-02-14 Tom Tromey <tom@tromey.com>
174
175 * acinclude.m4: Don't include acx_configure_dir.m4.
176 * Makefile.in (LIBIBERTY_BUILDDIR, GNULIB_BUILDDIR): Update.
177 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): Remove.
178 (all, install-only, uninstall, clean-info, clean)
179 (maintainer-clean): Don't recurse.
180 (subdir_do, all-lib): Remove.
181 ($(LIBGNU) $(LIBIBERTY) $(GNULIB_H)): Remove rule.
182 (GNULIB_H): Remove.
183 (generated_files): Update.
184 ($(GNULIB_BUILDDIR)/Makefile): Remove rule.
185 * configure: Rebuild.
186 * configure.ac: Don't configure gnulib or libiberty.
187 (GNULIB): Update.
188
a9b34532
EZ
1892020-02-14 Eli Zaretskii <eliz@gnu.org>
190
191 * win32-low.c (create_process): Prepend PROGRAM to ARGS when
192 preparing the command line for CreateProcess.
193 (win32_create_inferior): Reflect the program name in debugging
194 output that shows the process and its command line.
195
feacfcac
SM
1962020-02-13 Simon Marchi <simon.marchi@efficios.com>
197
198 * Makefile.in: Rename source files from .c to .cc.
199 * %.c: Rename to %.cc.
200 * configure.ac: Rename server.c to server.cc.
201 * configure: Re-generate.
202
06b3c5bd
SM
2032020-02-13 Simon Marchi <simon.marchi@efficios.com>
204
205 * Makefile.in: Rename gdbsupport source files from .c to .cc.
206
052793ad
HD
2072020-02-12 Hannes Domani <ssbssa@yahoo.de>
208
209 * win32-low.c (win32_create_inferior): Set signal_pid.
210
f20e3e82
MR
2112020-02-12 Maciej W. Rozycki <macro@wdc.com>
212 Pedro Alves <palves@redhat.com>
213
214 Skip building gdbserver in a cross-configuration.
215 * configure.srv: Set $gdbserver_host depending on whether $target
216 is $host. Use $gdbserver_host instead of $host.
217
8ddd8e0e
SM
2182020-02-11 Simon Marchi <simon.marchi@efficios.com>
219
220 * configure: Re-generate.
221
898e7f60
SM
2222020-02-11 Simon Marchi <simon.marchi@efficios.com>
223
224 * configure: Re-generate.
225
58df732b
SM
2262020-02-11 Simon Marchi <simon.marchi@efficios.com>
227
228 * acinclude.m4: Update warning.m4 path.
229
7928d571
HD
2302020-02-09 Hannes Domani <ssbssa@yahoo.de>
231
232 * win32-low.c (win32_clear_inferiors): Reset siginfo_er.
233 (handle_exception): Set siginfo_er.
234 (win32_xfer_siginfo): New function.
235
919adfe8
TT
2362020-02-07 Tom Tromey <tom@tromey.com>
237 Pedro Alves <palves@redhat.com>
238
239 * README: Update build documentation.
240 * configure.srv: Set UNSUPPORTED if host is unsupported. Check
241 host, not target.
242 * configure.ac: Update paths.
243 * configure: Rebuild.
244 * acinclude.m4: Update paths.
245 * Makefile.in: Update include paths.
246 (depcomp, INCLUDE_DIR, INCGNU, INCSUPPORT, INCLUDE_CFLAGS)
247 (SFILES, XML_DIR, n, $(GNULIB_BUILDDIR)/Makefile, config.status)
248 (version-generated.c, stamp-xml, regdat_sh, arch/%-ipa.o)
249 (gdbsupport/%-ipa.o, %-ipa.o, arch/%.o, gdbsupport/%.o, %.o)
250 (%-generated.c): Update paths.
251 * Move entire directory from ../gdb/gdbserver.
252
287c844a
MR
2532020-01-29 Maciej W. Rozycki <macro@wdc.com>
254
255 * configure.srv <i[34567]86-*-mingw*>: Fix whitespace damage.
256
548a204f
PFC
2572020-01-29 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
258
259 * configure.srv (powerpc*-*-linux*): Use srv_tgtobj in second
260 assignment instead of srv_linux_obj.
261
a2236a08
HD
2622020-01-28 Hannes Domani <ssbssa@yahoo.de>
263
264 * server.c (handle_qxfer_libraries): Write segment-address with
265 paddress.
266
bdaed379
HD
2672020-01-24 Hannes Domani <ssbssa@yahoo.de>
268
269 * Makefile.in (install-strip): New target.
270 (install_sh, INSTALL_STRIP_PROGRAM, STRIP): New variables.
271 * aclocal.m4: Regenerate.
272 * configure: Regenerate.
273 * configure.ac: Add AM_PROG_INSTALL_STRIP.
274
42cd72aa
MR
2752020-01-24 Maciej W. Rozycki <macro@wdc.com>
276
277 * Makefile.in (SFILES): Adjust paths to point to real files.
278 (OBS): Move waitstatus.o to target/waitstatus.o.
279 (TAGS): Transform paths appropriately.
280 (%.o): Rename to...
281 (nat/%.o): ... this pattern rule.
282 (%.o): Rename to...
283 (target/%.o): ... this pattern rule.
284 * configure.srv: Adjust paths throughout to include nat/ prefix
285 with the revant files.
286 * configure.ac: Add `nat' and `target' to CONFIG_SRC_SUBDIR.
287 * configure: Regenerate.
288
42ba50ec
MR
2892020-01-24 Maciej W. Rozycki <macro@wdc.com>
290
291 * Makefile.in (TAGS): Remove config files from the recipe.
292
05ea2a05
TT
2932020-01-14 Tom Tromey <tom@tromey.com>
294
295 * configure: Rebuild.
296 * configure.ac: Remove any checks that were added to common.m4.
297 * acinclude.m4: Include lib-ld.m4, lib-prefix.m4, and
298 lib-link.m4.
299
01027315
TT
3002020-01-14 Tom Tromey <tom@tromey.com>
301
302 * server.h: Include config.h.
303 * gdbreplay.c: Include config.h.
304 * configure: Rebuild.
305 * configure.ac: Don't source common.host.
306 * acinclude.m4: Update path.
307 * Makefile.in (INCSUPPORT): New variable.
308 (INCLUDE_CFLAGS): Add INCSUPPORT.
309 (SFILES): Update paths.
310 (version-generated.c): Update path to create-version.sh.
311 (gdbsupport/%-ipa.o, gdbsupport/%.o): Update paths.
312
b2ceabe8
TT
3132020-01-14 Tom Tromey <tom@tromey.com>
314
315 * configure.ac (LIBS): Use WIN32APILIBS.
316 (USE_WIN32API): Don't define.
317 * configure: Rebuild.
318
25c51f71
TT
3192020-01-14 Tom Tromey <tom@tromey.com>
320
321 * configure: Rebuild.
322
c0bd321d
SM
3232020-01-13 Simon Marchi <simon.marchi@efficios.com>
324
325 * Makefile.in (%-generated.c): Remove rule for files from
326 regformats/i386.
327
bb564c58
SM
3282020-01-13 Simon Marchi <simon.marchi@efficios.com>
329
330 * configure: Re-generate.
331
6e37c371
SM
3322020-01-13 Simon Marchi <simon.marchi@efficios.com>
333
334 * tracepoint.h (IP_AGENT_EXPORT_FUNC) [!IN_PROCESS_AGENT]:
335 Define to static.
336 * tracepoint.c (stop_tracing, flush_trace_buffer,
337 about_to_request_buffer_space, get_trace_state_variable_value,
338 set_trace_state_variable_value, gdb_collect): Add declaration.
339
df4a0200
SM
3402020-01-13 Simon Marchi <simon.marchi@efficios.com>
341
342 * linux-x86-low.c (x86_linux_regs_info, amd64_emit_eq_goto,
343 amd64_emit_ne_goto, amd64_emit_lt_goto, amd64_emit_le_goto,
344 amd64_emit_gt_goto, amd64_emit_ge_goto, amd64_emit_ge_goto,
345 i386_emit_eq_goto, i386_emit_ne_goto, i386_emit_lt_goto,
346 i386_emit_le_goto, i386_emit_gt_goto, i386_emit_ge_goto): Make
347 static.
348
89e94ec9
SM
3492020-01-13 Simon Marchi <simon.marchi@efficios.com>
350
351 * inferiors.c: Include gdbsupport/common-inferior.h.
352
2552728a
SM
3532020-01-13 Simon Marchi <simon.marchi@efficios.com>
354
355 * hostio-errno.c: Include hostio.h.
356
4025fa09
SM
3572020-01-13 Simon Marchi <simon.marchi@efficios.com>
358
359 * Makefile.in (%-generated.c): Make $(regdat_sh) a regular
360 prerequisite.
361
c0b0a142
SM
3622020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
363
364 * linux-arm-tdesc.c: Include linux-arm-tdesc.h.
365 * linux-arm-tdesc.h: Include arch/arm.h.
366
bb1183e2
SM
3672020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
368
369 * linux-aarch64-low.c (aarch64_write_goto_address): Make static.
370
f5df0b5f
SM
3712020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
372
373 * linux-aarch32-tdesc.c: Include linux-aarch32-tdesc.h.
374 * linux-aarch64-tdesc.c: Include linux-aarch64-tdesc.h.
375
5b6d1e4f
PA
3762020-01-10 Pedro Alves <palves@redhat.com>
377
378 * fork-child.c (post_fork_inferior): Pass target down to
379 startup_inferior.
380 * inferiors.c (switch_to_thread): Add process_stratum_target
381 parameter.
382 * lynx-low.c (lynx_target_ops): Now a process_stratum_target.
383 * nto-low.c (nto_target_ops): Now a process_stratum_target.
384 * linux-low.c (linux_target_ops): Now a process_stratum_target.
385 * remote-utils.c (prepare_resume_reply): Pass the target to
386 switch_to_thread.
387 * target.c (the_target): Now a process_stratum_target.
388 (done_accessing_memory): Pass the target to switch_to_thread.
389 (set_target_ops): Ajust to use process_stratum_target.
390 * target.h (struct target_ops): Rename to ...
391 (struct process_stratum_target): ... this.
392 (the_target, set_target_ops): Adjust.
393 (prepare_to_access_memory): Adjust comment.
394 * win32-low.c (child_xfer_memory): Adjust to use
395 process_stratum_target.
396 (win32_target_ops): Now a process_stratum_target.
397
559e7e50
EZ
3982020-01-06 Eli Zaretskii <eliz@gnu.org>
399 Pedro Alves <palves@redhat.com>
400
401 * win32-low.c (get_child_debug_event): Extract the fatal exception
402 from the exit status and convert to the equivalent Posix signal
403 number.
404 (win32_wait): Allow TARGET_WAITKIND_SIGNALLED status as well.
405 * Makefile.in (OBS, SFILES): Add gdb_wait.[co].
406
48189bec
HD
4072020-01-01 Hannes Domani <ssbssa@yahoo.de>
408
409 * Makefile.in: Use INSTALL_PROGRAM_ENV.
410
5dd8bf88
JB
4112020-01-01 Joel Brobecker <brobecker@adacore.com>
412
413 * server.c (gdbserver_version): Change copyright year to 2020.
414 * gdbreplay.c (gdbreplay_version): Likewise.
415
0ad6b8ee
CB
4162019-12-19 Christian Biesinger <cbiesinger@google.com>
417
418 * configure: Regenerate.
419 * configure.ac: Quote variable arguments of test.
420
1ee7b812
BE
4212019-12-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
422
423 * Makefile.in: Fix build with GNU Make 3.81
424
d9fa87f4
TT
4252019-12-16 Tom Tromey <tromey@adacore.com>
426
427 * server.c (get_exec_file): Constify result.
428
ab7d13f0
CB
4292019-12-10 Christian Biesinger <cbiesinger@google.com>
430
431 * Makefile.in: Add safe-strerror.c to gdbreplay and IPA, and change
432 UNDO_GNULIB_CFLAGS to undo strerror_r instead of strerror.
433 * config.in: Regenerate.
434 * configure: Regenerate.
435 * configure.ac: Don't check for strerror.
436 * linux-i386-ipa.c (initialize_fast_tracepoint_trampoline_buffer):
437 Call safe_strerror instead of strerror.
438 * server.h (strerror): Remove this now-unnecessary declaration.
439 * tracepoint.c (init_named_socket): Call safe_strerror instead of
440 strerror.
441 (gdb_agent_helper_thread): Likewise.
442 * utils.c (perror_with_name): Likewise.
443
4da8c3a8
TT
4442019-11-26 Tom Tromey <tom@tromey.com>
445
446 * configure, config.in: Rebuild.
447
21987b9c
TT
4482019-11-26 Tom Tromey <tom@tromey.com>
449
450 * remote-utils.c (block_unblock_async_io): Use gdb_sigmask.
451 * linux-low.c (linux_wait_for_event_filtered, linux_async): Use
452 gdb_sigmask.
453 * configure, config.in: Rebuild.
454
5e030278
TT
4552019-11-26 Tom Tromey <tom@tromey.com>
456
457 * Makefile.in (PTHREAD_CFLAGS, PTHREAD_LIBS): New variables.
458 (INTERNAL_CFLAGS_BASE): Use PTHREAD_CFLAGS.
459 (GDBSERVER_LIBS): Use PTHREAD_LIBS.
460 * acinclude.m4: Include ax_pthread.m4.
461 * config.in, configure: Rebuild.
462
6d91ce9a
CB
4632019-11-26 Christian Biesinger <cbiesinger@google.com>
464
465 * debug.c (debug_set_output): Call safe_strerror instead of
466 strerror.
467 * linux-low.c (attach_proc_task_lwp_callback): Likewise.
468 (linux_kill_one_lwp): Likewise.
469 (linux_detach_one_lwp): Likewise.
470 (linux_wait_for_event_filtered): Likewise.
471 (store_register): Likewise.
472 * lynx-low.c (lynx_attach): Likewise.
473 * mem-break.c (insert_memory_breakpoint): Likewise.
474 (remove_memory_breakpoint): Likewise.
475 (delete_fast_tracepoint_jump): Likewise.
476 (set_fast_tracepoint_jump): Likewise.
477 (uninsert_fast_tracepoint_jumps_at): Likewise.
478 (reinsert_fast_tracepoint_jumps_at): Likewise.
479 * nto-low.c (nto_xfer_memory): Likewise.
480 (nto_resume): Likewise.
481
6cdd651f
LM
4822019-11-20 Luis Machado <luis.machado@linaro.org>
483
484 * linux-aarch64-low.c (is_sve_tdesc): Check against target feature
485 instead of register count.
486 * tdesc.c (tdesc_contains_feature): New function.
487 * tdesc.h (tdesc_contains_feature): New prototype.
488
cd850b40
CB
4892019-11-15 Christian Biesinger <cbiesinger@google.com>
490
491 * Makefile.in: Add safe-strerror.c.
492 * configure: Regenerate.
493 * configure.ac: Don't source common.host.
494
5abebf3c
CB
4952019-11-15 Christian Biesinger <cbiesinger@google.com>
496
497 * config.in: Regenerate.
498 * configure: Regenerate.
499
e06f3d6e
AB
5002019-11-12 Andrew Burgess <andrew.burgess@embecosm.com>
501
502 * ax.c (ax_printf): Handle size_t_arg.
503
ca3a04f6
CB
5042019-11-06 Christian Biesinger <cbiesinger@google.com>
505
506 * linux-tdep.c (linux_info_proc): Use strtok_r instead of strtok.
507 * mi/mi-main.c (output_cores): Likewise.
508 * nat/linux-osdata.c (linux_xfer_osdata_cpus): Likewise.
509 (linux_xfer_osdata_modules): Likewise.
510 * remote.c (register_remote_support_xml): Likewise.
511 * sparc64-tdep.c (adi_is_addr_mapped): Likewise.
512 * xml-syscall.c (syscall_create_syscall_desc): Likewise.
513
e48f6033
CB
5142019-11-01 Christian Biesinger <cbiesinger@google.com>
515
516 * configure: Regenerate.
517 * configure.ac: Remove check for strerror_r.
518
e7e97a2e
CB
5192019-10-31 Christian Biesinger <cbiesinger@google.com>
520
521 * config.in: Regenerate.
522 * configure: Regenerate.
523 * configure.ac: Also check for strerror_r.
524
75cafaa6
CB
5252019-10-31 Christian Biesinger <cbiesinger@google.com>
526
527 * ax.h (debug_agent): Remove duplicate declaration.
528
30baf67b
TV
5292019-10-26 Tom de Vries <tdevries@suse.de>
530
531 * linux-aarch64-low.c: Fix typos in comments.
532 * linux-arm-low.c: Same.
533 * linux-low.c: Same.
534 * linux-ppc-low.c: Same.
535 * proc-service.c: Same.
536 * regcache.h: Same.
537 * server.c: Same.
538 * tracepoint.c: Same.
539 * win32-low.c: Same.
540
52c64cf7
TT
5412019-10-25 Tom Tromey <tromey@adacore.com>
542
543 * utils.c (xstrdup): Remove.
544
c12d372d
TT
5452019-10-23 Tom Tromey <tom@tromey.com>
546
547 * configure, config.in: Rebuild.
548
4d0b984b
TT
5492019-10-23 Tom Tromey <tom@tromey.com>
550
551 * configure: Rebuild.
552 * acinclude.m4: Use m4_include, not sinclude.
553
c5adaa19
TT
5542019-10-17 Tom Tromey <tromey@adacore.com>
555
556 * configure: Rebuild.
557 * configure.ac: Use AC_CONFIG_HEADERS. Create stamp-h there, not
558 in AC_CONFIG_FILES invocation.
559 * Makefile.in (stamp-h, Makefile): Use new-style config.status
560 invocation.
561
fec4e896
CB
5622019-10-16 Christian Biesinger <cbiesinger@google.com>
563
564 * server.c: Include xml-builtin.h.
565 (get_xml_features): Don't declare xml_builtins here.
566
00975ff6
AB
5672019-10-15 Andrew Burgess <andrew.burgess@embecosm.com>
568
569 * Makefile.in: Remove references to vec-ipa.o.
570
0dc32745
AB
5712019-10-15 Andrew Burgess <andrew.burgess@embecosm.com>
572
573 * Makefile.in: Remove references to vec.c.
574
3e6ec53a
CB
5752019-10-02 Christian Biesinger <cbiesinger@google.com>
576
577 * server.c (server_waiting): Change to bool.
578 (extended_protocol): Likewise.
579 (response_needed): Likewise.
580 (exit_requested): Likewise.
581 (run_once): Likewise.
582 (report_no_resumed): Likewise.
583 (non_stop): Likewise.
584 (disable_packet_vCont): Likewise.
585 (disable_packet_Tthread): Likewise.
586 (disable_packet_qC): Likewise.
587 (disable_packet_qfThreadInfo): Likewise.
588 (handle_general_set): Update.
589 (handle_detach): Update.
590 (handle_monitor_command): Update.
591 (handle_query): Update.
592 (captured_main): Update.
593 (process_serial_event): Update.
594 * server.h (server_waiting): Change to bool.
595 (disable_packet_vCont): Likewise.
596 (disable_packet_Tthread): Likewise.
597 (disable_packet_qC): Likewise.
598 (disable_packet_qfThreadInfo): Likewise.
599 (run_once): Likewise.
600 (non_stop): Likewise.
601 * target.c (target_stop_and_wait): Update.
602
80fd2826
TT
6032019-10-02 Tom Tromey <tromey@adacore.com>
604
605 * Makefile.in (SFILES): Add common-inferior.c.
606 (OBS): Add common-inferior.o.
607 * server.c (startup_with_shell): Don't define.
608
46f29a9a
AB
6092019-10-02 Andrew Burgess <andrew.burgess@embecosm.com>
610
611 * linux-low.c (linux_low_read_btrace): Update for change to
612 std::vector.
613
f9d949fb
CB
6142019-09-20 Christian Biesinger <cbiesinger@google.com>
615
616 * debug.c (debug_threads): Remove comment in favor of the header.
617 * debug.h (using_threads): Add declaration.
618 (debug_threads): Add comment.
619 * linux-aarch64-low.c: Include debug.h and remove declaration of
620 debug_threads.
621 * nto-low.c: Likewise.
622 * remote-utils.c: Likewise.
623 * thread-db.c: Likewise.
624
abf516c6
UW
6252019-09-20 Ulrich Weigand <uweigand@de.ibm.com>
626
627 * configure.srv (ipa_ppc_linux_regobj): Remove powerpc-cell32l-ipa.o
628 and powerpc-cell64l-ipa.o.
629 (powerpc*-*-linux*): Remove powerpc-cell32l.o and powerpc-cell64l.o
630 from srv_regobj. Remove rs6000/powerpc-cell32l.xml and
631 rs6000/powerpc-cell64l.xml from srv_xmlfiles.
632 (spu*-*-*): Remove.
633
634 * spu-low.c: Remove file.
635
636 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Remove.
637 (parse_spufs_run): Remove.
638 (ppc_get_pc): Remove Cell/B.E. support.
639 (ppc_set_pc): Likewise.
640 (ppc_breakpoint_at): Likewise.
641 (ppc_arch_setup): Likewise.
642 (ppc_get_ipa_tdesc_idx): Do not handle tdesc_powerpc_cell64l or
643 tdesc_powerpc_cell32l.
644 (initialize_low_arch): Do not call init_registers_powerpc_cell64l
645 or init_registers_powerpc_cell32l.
646 * linux-ppc-ipa.c (get_ipa_tdesc): Do not handle PPC_TDESC_CELL.
647 (initialize_low_tracepoint): Do not call init_registers_powerpc_cell64l
648 or init_registers_powerpc_cell32l.
649 * linux-ppc-tdesc-init.h (PPC_TDESC_CELL): Mark as unused.
650 (init_registers_powerpc_cell32l): Remove prototype.
651 (init_registers_powerpc_cell64l): Likewise.
652
653 * target.h (struct target_ops): Remove qxfer_spu member.
654 * server.c (handle_qxfer_spu): Remove.
655 (qxfer_packets): Remove entry for "spu".
656 (handle_query): No longer support qXfer:spu:read or qXfer:spu:write.
657 * linux-low.c (SPUFS_MAGIC): Remove.
658 (spu_enumerate_spu_ids): Remove.
659 (linux_qxfer_spu): Remove.
660 (linux_target_ops): Remove qxfer_spu member.
661 * lynx-low.c (lynx_target_ops): Remove qxfer_spu member.
662 * nto-low.c (nto_target_ops): Remove qxfer_spu member.
663 * win32-low.c (win32_target_ops): Remove qxfer_spu member.
664
2d41fa11
SDJ
6652019-08-23 Sergio Durigan Junior <sergiodj@redhat.com>
666
667 * Makefile.in (SFILES): Add 'gdbsupport/gdb-dlfcn.c'.
668 (OBS): Add 'gdbsupport/gdb-dlfcn.o'.
669 * config.in: Regenerate.
670 * configure: Regenerate.
671
d59b55f0
TT
6722019-08-15 Tom Tromey <tromey@adacore.com>
673
674 * target.c (target_write_memory): Use gdb::byte_vector.
675
4196ab2a
TT
6762019-08-15 Tom Tromey <tromey@adacore.com>
677
678 * tracepoint.c (write_inferior_data_pointer)
679 (write_inferior_integer, write_inferior_int8)
680 (write_inferior_uinteger, m_tracepoint_action_download)
681 (r_tracepoint_action_download, x_tracepoint_action_download)
682 (l_tracepoint_action_download, clear_inferior_trace_buffer)
683 (download_agent_expr, download_tracepoint_1)
684 (download_trace_state_variables, upload_fast_traceframes): Update.
685 * server.c (gdb_write_memory): Update.
686 * remote-utils.c (relocate_instruction): Update.
687 * proc-service.c (ps_pdwrite): Update.
688 * mem-break.c (remove_memory_breakpoint)
689 (delete_fast_tracepoint_jump, set_fast_tracepoint_jump)
690 (uninsert_fast_tracepoint_jumps_at)
691 (reinsert_fast_tracepoint_jumps_at): Update.
692 * linux-x86-low.c (append_insns)
693 (i386_install_fast_tracepoint_jump_pad)
694 (amd64_write_goto_address, i386_write_goto_address): Update.
695 * linux-s390-low.c (append_insns, s390_write_goto_address):
696 Update.
697 * linux-ppc-low.c (ppc_relocate_instruction)
698 (ppc_install_fast_tracepoint_jump_pad, emit_insns)
699 (ppc_write_goto_address): Update.
700 * linux-aarch64-low.c (append_insns): Update.
701 * target.h (struct target_ops): Update.
702 (write_inferior_memory): Don't declare.
703 * target.c (target_write_memory): Rename from
704 write_inferior_memory. Remove old target_write_memory.
705
c6778d00
TT
7062019-08-15 Tom Tromey <tromey@adacore.com>
707
708 * target.c (write_inferior_memory): Use std::vector.
709
404f2902
FCE
7102019-08-06 Frank Ch. Eigler <fche@redhat.com>
711
712 PR build/24886
713 * configure.ac: Drop enable-libmcheck support.
714 * configure, config.in: Rebuild.
715 * acinclude.m4: Don't include it.
716
4c5aa8e0
AH
7172019-07-19 Alan Hayward <alan.hayward@arm.com>
718
719 * configure.srv: Remove Arm xml files.
720
7cc17433
AH
7212019-07-19 Alan Hayward <alan.hayward@arm.com>
722
723 * configure.srv: Add new files. Remove xml generated files.
724 * linux-aarch32-low.c (initialize_low_arch_aarch32): Don't init
725 registers.
726 * linux-aarch32-low.h (tdesc_arm_with_neon): Remove.
727 * linux-aarch32-tdesc.c: New file.
728 * linux-aarch32-tdesc.h: New file.
729 * linux-aarch64-low.c (aarch64_arch_setup): Call aarch32_linux_read_description.
730 * linux-arm-low.c (init_registers_arm, tdesc_arm)
731 (init_registers_arm_with_iwmmxt, tdesc_arm_with_iwmmxt)
732 (init_registers_arm_with_vfpv2, tdesc_arm_with_vfpv2)
733 (init_registers_arm_with_vfpv3, tdesc_arm_with_vfpv3): Remove.
734 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
735 (arm_store_vfpregset): Call arm_linux_get_tdesc_fp_type.
736 (arm_read_description): Call arm_linux_read_description.
737 (initialize_low_arch): Don't init registers.
738 * linux-arm-tdesc.c: New file.
739 * linux-arm-tdesc.h: New file.
740
166a82be
AH
7412019-07-10 Alan Hayward <alan.hayward@arm.com>
742
743 * linux-arm-low.c (arm_fill_wmmxregset, arm_store_wmmxregset):
744 Move counter inside for.
745 (arm_read_description): Check ptrace earlier.
746 (arm_arch_setup): Call arm_linux_init_hwbp_cap here.
747
268a13a5
TT
7482019-07-09 Tom Tromey <tom@tromey.com>
749
750 * configure: Rebuild.
751 * configure.ac: Change common to gdbsupport.
752 * acinclude.m4: Change common to gdbsupport.
753 * Makefile.in (SFILES, OBS, GDBREPLAY_OBS, IPA_OBJS)
754 (version-generated.c, gdbsupport/%-ipa.o, gdbsupport/%.o): Change
755 common to gdbsupport.
756 * ax.c, event-loop.c, fork-child.c, gdb_proc_service.h,
757 gdbreplay.c, gdbthread.h, hostio-errno.c, hostio.c, i387-fp.c,
758 inferiors.c, inferiors.h, linux-aarch64-tdesc-selftest.c,
759 linux-amd64-ipa.c, linux-i386-ipa.c, linux-low.c,
760 linux-tic6x-low.c, linux-x86-low.c, linux-x86-tdesc-selftest.c,
761 linux-x86-tdesc.c, lynx-i386-low.c, lynx-low.c, mem-break.h,
762 nto-x86-low.c, regcache.c, regcache.h, remote-utils.c, server.c,
763 server.h, spu-low.c, symbol.c, target.h, tdesc.c, tdesc.h,
764 thread-db.c, tracepoint.c, win32-i386-low.c, win32-low.c: Change
765 common to gdbsupport.
766
350fab54
AH
7672019-07-04 Alan Hayward <alan.hayward@arm.com>
768
769 * linux-aarch32-low.c (arm_read_description, arm_regsets): Use new
770 defines.
771 * linux-arm-low.c (arm_read_description, arm_regsets): Likewise.
772
2b40fda7
AH
7732019-07-04 Alan Hayward <alan.hayward@arm.com>
774
775 * configure.srv: Remove legacy xml.
776 * linux-aarch64-low.c (initialize_low_arch): Remove
777 initialize_low_tdesc call.
778 * linux-aarch64-tdesc-selftest.c: Remove file.
779 * linux-aarch64-tdesc.h (initialize_low_tdesc): Remove.
780 * linux-x86-low.c (initialize_low_arch): Remove
781 initialize_low_tdesc call.
782 * linux-x86-tdesc-selftest.c: Remove file.
783 * linux-x86-tdesc.h (initialize_low_tdesc): Remove.
784
7d10623d
TV
7852019-06-20 Tom de Vries <tdevries@suse.de>
786
787 * linux-s390-ipa.c (get_ipa_tdesc)[!__s390x__]: Use
788 s390_te_linux64_ft_collect_regmap for S390_TDESC_GS.
789
8d6a48df
TV
7902019-06-19 Tom de Vries <tdevries@suse.de>
791
792 * debug.h (debug_write): Change return type to ssize_t.
793 * debug.c (debug_write): Same.
794
73cc7272
TT
7952019-06-14 Tom Tromey <tom@tromey.com>
796
797 * configure.ac: Use new path to gnulib.
798 * configure: Rebuild.
799 * Makefile.in (INCGNU, $(GNULIB_BUILDDIR)/Makefile): Use new path
800 to gnulib.
801
08f10e02
TT
8022019-06-11 Tom Tromey <tom@tromey.com>
803
804 * Makefile.in (SFILES): Add alloc.c.
805 (OBS): Add alloc.o.
806 (IPA_OBJS): Add alloc-ipa.o.
807 (alloc-ipa.o): New target.
808 (%.o: ../%.c): New pattern rule.
809
422186a9
TT
8102019-06-10 Tom Tromey <tromey@adacore.com>
811
812 * remote-utils.c (look_up_one_symbol, relocate_instruction): Don't
813 end warning with a newline.
814 * linux-s390-low.c (s390_get_wordsize): Don't end warning with a
815 newline.
816 * thread-db.c (attach_thread): Don't end warning with a newline.
817 (thread_db_notice_clone): Likewise.
818 * tracepoint.c (gdb_agent_helper_thread): Don't end warning with a
819 newline.
820 * linux-x86-low.c (x86_get_min_fast_tracepoint_insn_len): Don't
821 end warning with a newline.
822
b02f78f9
PA
8232019-06-04 Pedro Alves <palves@redhat.com>
824
825 * server.c (captured_main): Use make_unique_xstrdup.
826
88ed7edb
TT
8272019-06-02 Tom Tromey <tom@tromey.com>
828
829 * gdbreplay.c (fromhex): Remove.
830 * Makefile.in (GDBREPLAY_OBS): Add rsp-low.o.
831
33a6bc35
TT
8322019-05-29 Tom Tromey <tromey@adacore.com>
833
834 * configure: Rebuild.
835
e90a813d
KB
8362019-05-06 Kevin Buettner <kevinb@redhat.com>
837
838 * linux-x86-low.c (x86_fill_gregset): Don't compile 64-bit
839 sign extension code on 32-bit builds.
840
353ea2d1
EZ
8412019-05-03 Eli Zaretskii <eliz@gnu.org>
842
843 * remote-utils.c:
844 * gdbreplay.c [USE_WIN32API]: Remove the _WIN32_WINNT override.
845
b494cdff
TT
8462019-04-19 Tom Tromey <tom@tromey.com>
847
848 * server.c (struct vstop_notif): Derive from notif_event.
849 <base>: Remove.
850 (queue_stop_reply): Update.
851 (remove_all_on_match_ptid): Change type. Rewrite.
852 (discard_queued_stop_replies): Rewrite.
853 (in_queued_stop_replies_ptid): Change type.
854 (in_queued_stop_replies): Rewrite.
855 (notif_stop): Update.
856 (queue_stop_reply_callback): Update.
857 (captured_main): Don't call initialize_notif.
858 (push_stop_notification): Update.
859 * notif.c (notif_write_event, handle_notif_ack)
860 (notif_event_enque, notif_push): Update.
861 (notif_event_xfree, initialize_notif): Remove.
862 * notif.h (struct notif_event): Include <list>, not
863 "common/queue.h".
864 (struct notif_server) <queue>: Now a std::list.
865 (notif_event_p): Remove typedef.
866 (initialize_notif): Don't declare.
867 (struct notif_event): Add virtual destructor.
868
a7e559cc
AH
8692019-04-17 Alan Hayward <alan.hayward@arm.com>
870
871 * ax.c (ax_vdebug): Call debug_printf.
872 * debug.c (debug_write): New function.
873 * debug.h (debug_write): New declaration.
874 * linux-low.c (sigchld_handler): Call debug_write.
875
aeb2e706
AH
8762019-04-17 Alan Hayward <alan.hayward@arm.com>
877
878 * debug.c (debug_set_output): New function.
879 (debug_vprintf): Send output to debug_file.
880 (debug_flush): Likewise.
881 * debug.h (debug_set_output): New declaration.
882 * server.c (handle_monitor_command): Add debug-file option.
883 (captured_main): Likewise.
884
c1bc0935
AH
8852019-04-17 Alan Hayward <alan.hayward@arm.com>
886
887 * debug.c (remote_debug): Add definition.
888 * debug.h (remote_debug): Add declaration.
889 * hostio.c (remote_debug): Remove declaration.
890 * remote-utils.c (struct ui_file): Likewise.
891 (remote_debug): Likewise.
892 * remote-utils.h (remote_debug): Likewise,
893 * server.c (remote_debug): Remove definition.
894
3f52fdbc
KB
8952019-04-10 Kevin Buettner <kevinb@redhat.com>
896
897 * linux-x86-low.c (x86_fill_gregset): Sign extend EAX value
898 when using a 64-bit gdbserver.
899
b0319eaa
TT
9002019-04-09 Tom Tromey <tromey@adacore.com>
901
902 * linux-low.c (select_event_lwp): Use find_thread_in_random.
903
eedc3f4f
TT
9042019-04-08 Tom Tromey <tom@tromey.com>
905
906 * linux-low.c (linux_detach_one_lwp): Replace throw_exception with
907 throw.
908 (linux_resume_one_lwp): Likewise.
909
230d2906
TT
9102019-04-08 Tom Tromey <tom@tromey.com>
911
912 * gdbreplay.c: Update.
913 * linux-low.c: Update.
914 * server.c: Update.
915
a70b8144
TT
9162019-04-08 Tom Tromey <tom@tromey.com>
917
918 * server.c: Use C++ exception handling.
919 * linux-low.c: Use C++ exception handling.
920 * gdbreplay.c: Use C++ exception handling.
921
3d6e9d23
TT
9222019-04-08 Tom Tromey <tom@tromey.com>
923
924 * server.c (handle_btrace_general_set, handle_qxfer_btrace)
925 (handle_qxfer_btrace_conf, detach_or_kill_for_exit_cleanup)
926 (captured_main, main): Update.
927 * gdbreplay.c (main): Update.
928
0570503d
PFC
9292019-04-05 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
930
931 * linux-low.c (linux_get_auxv): Remove static. Return auxv entry
932 value in argument pointer, return 1 if the entry is found and 0
933 otherwise. Move comment.
934 (linux_get_hwcap, linux_get_hwcap2): Use modified linux_get_auxv.
935 * linux-low.h (linux_get_auxv): Declare.
936 * linux-ppc-low.c (is_elfv2_inferior): Use linux_get_auxv.
937
227a9e65
TT
9382019-04-05 Tom Tromey <tromey@adacore.com>
939
940 * server.c (gdbserver_usage): Use upper-case for metasyntactic
941 variables.
942
69f4c9cc
AH
9432019-03-28 Alan Hayward <alan.hayward@arm.com>
944
945 * linux-low.c (AT_HWCAP2): Add define if not already included.
946
974c89e0
AH
9472019-03-26 Alan Hayward <alan.hayward@arm.com>
948
949 * linux-aarch64-low.c (aarch64_get_hwcap): Remove function.
950 (aarch64_arch_setup): Call linux_get_hwcap.
951 * linux-arm-low.c (arm_get_hwcap): Remove function.
952 (arm_read_description): Call linux_get_hwcap.
953 * linux-low.c (linux_get_auxv): New function.
954 (linux_get_hwcap): Likewise.
955 (linux_get_hwcap2): Likewise.
956 * linux-low.h (linux_get_hwcap): New declaration.
957 (linux_get_hwcap2): Likewise.
958 * linux-ppc-low.c (ppc_get_auxv): Remove function.
959 (ppc_arch_setup): Call linux_get_hwcap.
960 * linux-s390-low.c (s390_get_hwcap): Remove function.
961 (s390_arch_setup): Call linux_get_hwcap.
962
1ef53e6b
AH
9632019-03-22 Alan Hayward <alan.hayward@arm.com>
964 Jiong Wang <jiong.wang@arm.com>
965
966 * linux-aarch64-low.c (aarch64_store_pauthregset): New function.
967 * linux-low.c (regsets_store_inferior_registers): Allow optional reads
968 to fail.
969 * linux-low.h (enum regset_type): Add OPTIONAL_REGS.
970
ee4fbcfa
AH
9712019-03-22 Alan Hayward <alan.hayward@arm.com>
972 Jiong Wang <jiong.wang@arm.com>
973
974 * linux-aarch64-low.c (AARCH64_HWCAP_PACA): New define.
975 (aarch64_get_hwcap): New function.
976 (aarch64_arch_setup): Read APIA hwcap.
977
6dc0ebde
AH
9782019-03-22 Alan Hayward <alan.hayward@arm.com>
979 Jiong Wang <jiong.wang@arm.com>
980
981 * linux-aarch64-ipa.c (get_ipa_tdesc): Add pauth param.
982 (initialize_low_tracepoint): Likewise.
983 * linux-aarch64-low.c (aarch64_arch_setup): Likewise.
984 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Likewise.
985 * linux-aarch64-tdesc.c (struct target_desc): Likewise.
986 (aarch64_linux_read_description): Likewise.
987 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Likewise.
988
1163a4b7
JB
9892019-03-12 John Baldwin <jhb@FreeBSD.org>
990
991 * linux-x86-tdesc.c (i386_linux_read_description): Update call to
992 i386_create_target_description for 'segments' parameter.
993 * lynx-i386-low.c (lynx_i386_arch_setup): Likewise.
994 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
995 * win32-i386-low.c (i386_arch_setup): Likewise.
996
d3a70e03
TT
9972019-03-12 Tom Tromey <tromey@adacore.com>
998
999 * linux-low.c (iterate_over_lwps): Update.
1000
37991b4f
TT
10012019-03-06 Tom Tromey <tom@tromey.com>
1002
1003 * server.c (detach_or_kill_for_exit_cleanup): Remove parameter.
1004 (captured_main): Use SCOPE_EXIT.
1005
45950eb6
SDJ
10062019-03-04 Sergio Durigan Junior <sergiodj@redhat.com>
1007
1008 * configure.srv: Use '$enable_unittest' instead of '$development'
1009 when checking whether to fill 'srv_regobj' on 'aarch64*-*-linux*'
1010 case.
1011
43ac54fc
TT
10122019-02-27 Tom Tromey <tromey@adacore.com>
1013
1014 * gdbreplay.c (logchar): Handle \r\n.
1015
df0da8a2
AH
10162019-02-07 Alan Hayward <alan.hayward@arm.com>
1017
1018 * linux-low.c (linux_attach): Add process before lwp.
1019 * server.c (attach_inferior): Check if already attached.
1020
1a5c2598
TT
10212019-02-07 Tom Tromey <tom@tromey.com>
1022
1023 * x86-tdesc.h: Rename include guard.
1024 * x86-low.h: Add include guard.
1025 * wincecompat.h: Rename include guard.
1026 * win32-low.h: Add include guard.
1027 * utils.h: Rename include guard.
1028 * tracepoint.h: Rename include guard.
1029 * tdesc.h: Rename include guard.
1030 * target.h: Rename include guard.
1031 * server.h: Rename include guard.
1032 * remote-utils.h: Rename include guard.
1033 * regcache.h: Rename include guard.
1034 * nto-low.h: Rename include guard.
1035 * notif.h: Add include guard.
1036 * mem-break.h: Rename include guard.
1037 * lynx-low.h: Add include guard.
1038 * linux-x86-tdesc.h: Add include guard.
1039 * linux-s390-tdesc.h: Add include guard.
1040 * linux-ppc-tdesc-init.h: Add include guard.
1041 * linux-low.h: Add include guard.
1042 * linux-aarch64-tdesc.h: Add include guard.
1043 * linux-aarch32-low.h: Add include guard.
1044 * inferiors.h: Rename include guard.
1045 * i387-fp.h: Rename include guard.
1046 * hostio.h: Rename include guard.
1047 * gdbthread.h: Rename include guard.
1048 * gdb_proc_service.h: Rename include guard.
1049 * event-loop.h: Rename include guard.
1050 * dll.h: Rename include guard.
1051 * debug.h: Rename include guard.
1052 * ax.h: Rename include guard.
1053
956cc47c
SN
10542018-01-30 Szabolcs Nagy <szabolcs.nagy@arm.com>
1055
1056 PR gdb/23985
1057 * Makefile.in (IPAGENT_CFLAGS): Add UNDO_GNULIB_CFLAGS.
1058 (UNDO_GNULIB_CFLAGS): Undo gnulib replacements.
1059
a0707f3c
TT
10602019-01-25 Tom Tromey <tom@tromey.com>
1061
1062 * Makefile.in (INCLUDE_CFLAGS): Don't add -I for common.
1063
0747795c
TT
10642019-01-25 Tom Tromey <tom@tromey.com>
1065
1066 * win32-low.c: Fix common/ includes.
1067 * win32-i386-low.c: Fix common/ includes.
1068 * tracepoint.c: Fix common/ includes.
1069 * thread-db.c: Fix common/ includes.
1070 * target.h: Fix common/ includes.
1071 * symbol.c: Fix common/ includes.
1072 * spu-low.c: Fix common/ includes.
1073 * server.h: Fix common/ includes.
1074 * server.c: Fix common/ includes.
1075 * remote-utils.c: Fix common/ includes.
1076 * regcache.h: Fix common/ includes.
1077 * regcache.c: Fix common/ includes.
1078 * nto-x86-low.c: Fix common/ includes.
1079 * notif.h: Fix common/ includes.
1080 * mem-break.h: Fix common/ includes.
1081 * lynx-low.c: Fix common/ includes.
1082 * lynx-i386-low.c: Fix common/ includes.
1083 * linux-x86-tdesc-selftest.c: Fix common/ includes.
1084 * linux-x86-low.c: Fix common/ includes.
1085 * linux-low.c: Fix common/ includes.
1086 * inferiors.h: Fix common/ includes.
1087 * i387-fp.c: Fix common/ includes.
1088 * hostio.c: Fix common/ includes.
1089 * hostio-errno.c: Fix common/ includes.
1090 * gdbthread.h: Fix common/ includes.
1091 * gdbreplay.c: Fix common/ includes.
1092 * fork-child.c: Fix common/ includes.
1093 * event-loop.c: Fix common/ includes.
1094 * ax.c:
1095 (enum gdb_agent_op): Fix common/ includes.
1096
be6d4f74
TT
10972019-01-21 Tom Tromey <tom@tromey.com>
1098
1099 * tracepoint.c: Fix includes.
1100 * remote-utils.c: Fix includes.
1101 * linux-x86-low.c: Fix includes.
1102
66d91b39
JB
11032019-01-01 Joel Brobecker <brobecker@adacore.com>
1104
1105 * gdbreplay.c (gdbreplay_version): Update copyright year in
1106 version message.
1107 * server.c (gdbserver_version): Likewise.
1108
754e3168
AH
11092018-12-05 Alan Hayward <alan.hayward@arm.com>
1110
1111 * linux-low.c (add_lwp): Switch ordering.
1112
d105de22
TT
11132018-11-29 Tom Tromey <tom@tromey.com>
1114
1115 * win32-low.c (win32_join): Take pid, not process.
1116 * target.h (struct target_ops) <join>: Change argument type.
1117 (join_inferior): Change argument name.
1118 * spu-low.c (spu_join): Take pid, not process.
1119 * server.c (handle_detach): Preserve pid before destroying
1120 process.
1121 * lynx-low.c (lynx_join): Take pid, not process.
1122 * linux-low.c (linux_join): Take pid, not process.
1123
50138245
AH
11242018-11-23 Alan Hayward <alan.hayward@arm.com>
1125
1126 * linux-aarch64-low.c (aarch64_cannot_store_register): Remove.
1127 (aarch64_cannot_fetch_register): Likewise.
1128 (struct linux_target_ops): Update references.
1129
64f57f3d
PFC
11302018-10-31 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1131
1132 * linux-ppc-low.c: Include nat/linux-ptrace.h.
1133
8d619c01
EBM
11342018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1135
1136 * configure.srv (ipa_ppc_linux_regobj): Add
1137 powerpc-isa207-htm-vsx32l-ipa.o and
1138 powerpc-isa207-htm-vsx64l-ipa.o.
1139 (powerpc*-*-linux*): Add powerpc-isa207-htm-vsx32l.o and
1140 powerpc-isa207-htm-vsx64l.o to srv_regobj. Add
1141 rs6000/power-htm-spr.xml, rs6000/power-htm-core.xml,
1142 rs6000/power64-htm-core.xml, rs6000/power-htm-fpu.xml,
1143 rs6000/power-htm-altivec.xml, rs6000/power-htm-vsx.xml,
1144 rs6000/power-htm-ppr.xml, rs6000/power-htm-dscr.xml,
1145 rs6000/power-htm-tar.xml, rs6000/powerpc-isa207-htm-vsx32l.xml,
1146 and rs6000/powerpc-isa207-htm-vsx64l.xml to srv_xmlfiles.
1147 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
1148 <PPC_TDESC_ISA207_HTM_VSX>: New enum value.
1149 (init_registers_powerpc_isa207_htm_vsx32l)
1150 (init_registers_powerpc_isa207_htm_vsx64l): Declare.
1151 * linux-ppc-low.c (ppc_fill_tm_sprregset, ppc_store_tm_sprregset)
1152 (ppc_store_tm_cgprregset, ppc_store_tm_cfprregset)
1153 (ppc_store_tm_cvrregset, ppc_store_tm_cvsxregset)
1154 (ppc_store_tm_cpprregset, ppc_store_tm_cdscrregset)
1155 (ppc_store_tm_ctarregset): New functions.
1156 (ppc_regsets): Add entries for HTM regsets.
1157 (ppc_arch_setup): Set htm in features struct when needed. Set
1158 sizes for the HTM regsets.
1159 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_HTM_VSX.
1160 (initialize_low_arch): Call
1161 init_registers_powerpc_isa207_htm_vsx32l and
1162 init_registers_powerpc_isa207_htm_vsx64l.
1163 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
1164 PPC_TDESC_ISA207_HTM_VSX.
1165 (initialize_low_tracepoint): Call
1166 init_registers_powerpc_isa207_htm_vsx32l and
1167 init_registers_powerpc_isa207_htm_vsx64l.
1168
232bfb86
EBM
11692018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1170
1171 * configure.srv (powerpc*-*-linux*): Add rs6000/power-ebb.xml and
1172 rs6000/power-linux-pmu.xml to srv_xmlfiles.
1173 * linux-ppc-low.c (ppc_store_ebbregset, ppc_fill_pmuregset)
1174 (ppc_store_pmuregset): New functions.
1175 (ppc_regsets): Add entries for ebb and pmu regsets.
1176 (ppc_arch_setup): Set isa207 in features struct if the ebb and
1177 pmu regsets are available. Set sizes for these regsets.
1178
f2cf6173
EBM
11792018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1180
1181 * configure.srv (ipa_ppc_linux_regobj): Add
1182 powerpc-isa207-vsx64l-ipa.o and powerpc-isa207-vsx32l-ipa.o.
1183 (powerpc*-*-linux*): Add powerpc-isa207-vsx32l.o and
1184 powerpc-isa207-vsx64l.o to srv_regobj, add rs6000/power-tar.xml,
1185 rs6000/powerpc-isa207-vsx32l.xml, and
1186 rs6000/powerpc-isa207-vsx64l.xml to srv_xmlfiles.
1187 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
1188 <PPC_TDESC_ISA207_VSX>: New enum value.
1189 (init_registers_powerpc_isa207_vsx32l): Declare.
1190 (init_registers_powerpc_isa207_vsx64l): Declare.
1191 * linux-ppc-low.c (ppc_fill_tarregset): New function.
1192 (ppc_store_tarregset): New function.
1193 (ppc_regsets): Add entry for the TAR regset.
1194 (ppc_arch_setup): Set isa207 in features struct when needed. Set
1195 size for the TAR regsets.
1196 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_VSX.
1197 (initialize_low_arch): Call init_registers_powerpc_isa207_vsx32l
1198 and init_registers_powerpc_isa207_vsx64l.
1199 * linux-ppc-ipa.c (get_ipa_tdesc): Handle PPC_TDESC_ISA207_VSX.
1200 (initialize_low_tracepoint): Call
1201 init_registers_powerpc_isa207_vsx32l and
1202 init_registers_powerpc_isa207_vsx64l.
1203
7ca18ed6
EBM
12042018-10-26 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
1205 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1206
1207 * configure.srv (ipa_ppc_linux_regobj): Add
1208 powerpc-isa205-ppr-dscr-vsx32l-ipa.o and
1209 powerpc-isa205-ppr-dscr-vsx64l-ipa.o.
1210 (powerpc*-*-linux*): Add powerpc-isa205-ppr-dscr-vsx32l.o and
1211 powerpc-isa205-ppr-dscr-vsx64l.o to srv_regobj, add
1212 rs6000/power-dscr.xml, rs6000/power-ppr.xml,
1213 rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml and
1214 rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml to srv_xmlfiles.
1215 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
1216 <PPC_TDESC_ISA205_PPR_DSCR_VSX>: New enum value.
1217 (init_registers_powerpc_isa205_ppr_dscr_vsx32l)
1218 (init_registers_powerpc_isa205_ppr_dscr_vsx64l): Declare.
1219 * linux-ppc-low.c: Include "elf/common.h" and <sys/uio.h>.
1220 (ppc_hwcap): Add comment.
1221 (ppc_hwcap2): New global.
1222 (ppc_check_regset, ppc_fill_pprregset, ppc_store_pprregset)
1223 (ppc_fill_dscrregset, ppc_store_dscrregset): New functions.
1224 (ppc_regsets): Add entries for the DSCR and PPR regsets.
1225 (ppc_arch_setup): Get AT_HWCAP2. Set ppr_dscr in features struct
1226 when needed. Set sizes for the the DSCR and PPR regsets.
1227 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA205_PPR_DSCR_VSX.
1228 (initialize_low_arch): Call
1229 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
1230 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
1231 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
1232 PPC_TDESC_ISA205_PPR_DSCR_VSX.
1233 (initialize_low_tracepoint): Call
1234 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
1235 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
1236
5c849b22
PFC
12372018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1238
1239 * linux-ppc-low.c (ppc_fill_vrregset): Remove memset calls.
1240
8ecfd7bd
SDJ
12412018-10-10 Sergio Durigan Junior <sergiodj@redhat.com>
1242 Simon Marchi <simark@simark.ca>
1243
1244 * acinclude.m4: Include "../selftest.m4".
1245 * configure: Regenerate.
1246 * configure.ac: Use "GDB_AC_SELFTEST".
1247 * configure.srv: Use "$enable_unittests" instead of
1248 "$development" when checking whether unit tests have been
1249 enabled.
1250 * server.c (captured_main): Update message informing that
1251 selftests have been disabled.
1252
96643e35
TT
12532018-10-04 Tom Tromey <tom@tromey.com>
1254
1255 * configure: Rebuild.
1256
da4ae14a
TT
12572018-10-04 Tom Tromey <tom@tromey.com>
1258
1259 * server.c (handle_status): Rename inner "thread".
1260 (process_serial_event): Declare "res" in 'm' case.
1261 * linux-low.c (last_thread_of_process_p, find_lwp_pid)
1262 (iterate_over_lwps): Rename inner "thread".
1263 (linux_qxfer_libraries_svr4): Rename inner "len".
1264 * gdbthread.h (find_thread_in_random): Rename inner "thread".
1265
7c619dbd
GB
12662018-10-01 Gary Benson <gbenson@redhat.com>
1267
1268 * gdb_proc_service.h: Moved common code to
1269 common/gdb_proc_service.h.
1270
3795e814
GB
12712018-10-01 Gary Benson <gbenson@redhat.com>
1272
1273 * gdb_proc_service.h: Synchronize comments and whitespace with
1274 GDB's version of this file.
1275
49b036f1
TT
12762018-09-25 Tom Tromey <tom@tromey.com>
1277
1278 * configure: Rebuild.
1279 * configure.ac (WARN_CFLAGS): Don't remove -Wmissing-prototypes.
1280
8ff03f0b
SM
12812018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
1282
1283 * Makefile.in (gdbserver$(EXEEXT)): Sort OBS.
1284 (gdbreplay$(EXEEXT)): Sort GDBREPLAY_OBS.
1285 ($(IPA_LIB)): Sort IPA_OBJS.
1286
a1cd91dc
SM
12872018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
1288
1289 * Makefile.in: Remove references to $(ADD_DEPS).
1290
752312ba
TT
12912018-09-16 Tom Tromey <tom@tromey.com>
1292
1293 * remote-utils.c (remote_open): Use GNU style for metasyntactic
1294 variables.
1295 * gdbreplay.c (gdbreplay_usage): Use GNU style for metasyntactic
1296 variables.
1297
f1628857
TT
12982018-09-05 Tom Tromey <tom@tromey.com>
1299
1300 * configure: Rebuild.
1301
ad202fcc
SM
13022018-08-28 Simon Marchi <simon.marchi@polymtl.ca>
1303
1304 PR build/23399
1305 * tracepoint.c (IPA_SYM_STRUCT_NAME): Define.
1306
d3d8724a
TT
13072018-08-27 Tom Tromey <tom@tromey.com>
1308
1309 PR build/23087:
1310 * configure: Rebuild.
1311
b4f183d2
TT
13122018-08-27 Tom Tromey <tom@tromey.com>
1313
1314 * linux-s390-low.c (s390_emit_ext, s390_emit_litpool)
1315 (s390_emit_const, s390_emit_reg, s390_emit_zero_ext)
1316 (s390_emit_stack_adjust, s390_emit_set_r2, s390x_emit_ext)
1317 (s390x_emit_const, s390x_emit_reg, s390x_emit_zero_ext)
1318 (s390x_emit_stack_adjust): Add casts to unsigned char.
1319
4e2aa472
SM
13202018-08-22 Simon Marchi <simon.marchi@ericsson.com>
1321
1322 PR gdb/23374
1323 PR gdb/23375
1324 * server.h (struct client_state) <disable_randomization>:
1325 Initialize to 1.
1326
cf4088a9
SM
13272018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
1328
1329 * linux-mips-low.c (mips_collect_ptrace_register): Remove unused
1330 variable.
1331 (mips_supply_ptrace_register): Likewise.
1332
a0de763e
TT
13332018-07-22 Tom Tromey <tom@tromey.com>
1334
1335 * configure: Rebuild.
1336
b0a7723d
TT
13372018-07-22 Tom Tromey <tom@tromey.com>
1338
1339 * win32-low.c (win32_create_inferior): Remove unused variables.
1340 * gdbreplay.c (remote_open): Remove unused variable.
1341 * remote-utils.c (remote_prepare): Remove unused variable.
1342 * x86-tdesc.h (X86_TDESC_H): Define.
1343 (amd64_expedite_regs): Define conditionally.
1344 (i386_expedite_regs): Mark ATTRIBUTE_UNUSED.
1345 * linux-x86-tdesc.c (i386_tdescs): Move inside #if.
1346 * remote-utils.c (readchar): Remove unused variable.
1347
a780ef4f
PA
13482018-07-13 Pedro Alves <palves@redhat.com>
1349
1350 * linux-low.c (linux_kill): Change parameter to process_info
1351 pointer instead of pid. Adjust.
1352 * lynx-low.c (lynx_kill): Likewise.
1353 * nto-low.c (nto_kill): Likewise.
1354 * spu-low.c (spu_kill): Likewise.
1355 * win32-low.c (win32_kill): Likewise.
1356 * server.c (handle_v_kill, kill_inferior_callback)
1357 (detach_or_kill_for_exit): Adjust.
1358 * target.c (kill_inferior): Change parameter to process_info
1359 pointer instead of pid. Adjust.
1360 * target.h (struct target_ops) <kill>: Change parameter to
1361 process_info pointer instead of pid. Adjust all implementations
1362 and callers.
1363 (kill_inferior): Likewise.
1364
ef2ddb33
PA
13652018-07-13 Pedro Alves <palves@redhat.com>
1366
1367 * linux-low.c (linux_detach, linux_join): Change parameter to
1368 process_info pointer instead of pid. Adjust.
1369 * lynx-low.c (lynx_detach, lynx_join): Likewise.
1370 * nto-low.c (nto_detach): Likewise.
1371 * spu-low.c (spu_detach, spu_join): Likewise.
1372 * win32-low.c (win32_detach, win32_join): Likewise.
1373 * server.c (handle_detach, detach_or_kill_for_exit): Adjust.
1374 * target.h (struct target_ops) <detach, join>: Change parameter to
1375 process_info pointer instead of pid. Adjust all implementations
1376 and callers.
1377 (detach_inferior, join_inferior): Rename 'pid' parameter to
1378 'proc'.
1379
c7ab0aef
SDJ
13802018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
1381 Jan Kratochvil <jan.kratochvil@redhat.com>
1382 Paul Fertser <fercerpav@gmail.com>
1383 Tsutomu Seki <sekiriki@gmail.com>
1384
1385 * Makefile.in (SFILES): Add '$(srcdir)/common/netstuff.c'.
1386 (OBS): Add 'common/netstuff.o'.
1387 (GDBREPLAY_OBS): Likewise.
1388 * gdbreplay.c: Include 'wspiapi.h' and 'netstuff.h'.
1389 (remote_open): Implement support for IPv6
1390 connections.
1391 * remote-utils.c: Include 'netstuff.h', 'filestuff.h'
1392 and 'wspiapi.h'.
1393 (handle_accept_event): Accept connections from IPv6 sources.
1394 (remote_prepare): Handle IPv6-style hostnames; implement
1395 support for IPv6 connections.
1396 (remote_open): Implement support for printing connections from
1397 IPv6 sources.
1398
31445d10
PA
13992018-07-11 Pedro Alves <palves@redhat.com>
1400
1401 PR gdb/23377
1402 * mem-break.c (any_persistent_commands): Add process_info
1403 parameter and use it instead of relying on the current process.
1404 Change return type to bool.
1405 * mem-break.h (any_persistent_commands): Add process_info
1406 parameter and change return type to bool.
1407 * server.c (handle_detach): Remove require_running_or_return call.
1408 Look up the process_info for the process we're about to detach.
1409 If not found, return back error to GDB. Adjust
1410 any_persistent_commands call to pass down a process pointer.
1411
cb197132
PA
14122018-07-11 Pedro Alves <palves@redhat.com>
1413
1414 * i387-fp.c (i387_cache_to_fsave, cache_to_fxsave)
1415 (i387_cache_to_xsave): Use regcache_raw_get_unsigned_by_name
1416 instead of collect_register_by_name.
1417 * regcache.c (regcache_raw_get_unsigned_by_name): New.
1418 * regcache.h (regcache_raw_get_unsigned_by_name): New.
1419
1b919490
VB
14202018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
1421 Pedro Alves <palves@redhat.com>
1422
1423 * linux-low.c (initialize_low): Call linux_proc_init_warnings.
1424
d7e15655
TT
14252018-07-03 Tom Tromey <tom@tromey.com>
1426
1427 * linux-low.c: Update.
1428 * lynx-low.c: Update.
1429 * mem-break.c: Update.
1430 * nto-low.c: Update.
1431 * remote-utils.c: Update.
1432 * server.c: Update.
1433 * spu-low.c: Update.
1434 * target.c: Update.
1435 * win32-low.c: Update.
1436
26a57c92
TT
14372018-07-03 Tom Tromey <tom@tromey.com>
1438
1439 * server.c: Update.
1440
0e998d96
TT
14412018-07-03 Tom Tromey <tom@tromey.com>
1442
1443 * linux-low.c: Update.
1444
cc6bcb54
TT
14452018-07-03 Tom Tromey <tom@tromey.com>
1446
1447 * target.c: Update.
1448
e38504b3
TT
14492018-07-03 Tom Tromey <tom@tromey.com>
1450
1451 * linux-low.c: Update.
1452 * linux-mips-low.c: Update.
1453 * lynx-low.c: Update.
1454 * nto-low.c: Update.
1455 * remote-utils.c: Update.
1456 * server.c: Update.
1457 * spu-low.c: Update.
1458 * target.c: Update.
1459 * thread-db.c: Update.
1460
e99b03dc
TT
14612018-07-03 Tom Tromey <tom@tromey.com>
1462
1463 * linux-low.c: Update.
1464 * linux-mips-low.c: Update.
1465 * lynx-low.c: Update.
1466 * mem-break.c: Update.
1467 * nto-low.c: Update.
1468 * remote-utils.c: Update.
1469 * server.c: Update.
1470 * spu-low.c: Update.
1471 * target.c: Update.
1472 * tracepoint.c: Update.
1473
f2907e49
TT
14742018-07-03 Tom Tromey <tom@tromey.com>
1475
1476 * linux-low.c: Update.
1477 * linux-ppc-low.c: Update.
1478 * linux-x86-low.c: Update.
1479 * proc-service.c: Update.
1480 * server.c: Update.
1481 * spu-low.c: Update.
1482 * thread-db.c: Update.
1483 * win32-low.c: Update.
1484
fd79271b
TT
14852018-07-03 Tom Tromey <tom@tromey.com>
1486
1487 * linux-low.c: Update.
1488 * lynx-low.c: Update.
1489 * nto-low.c: Update.
1490 * remote-utils.c: Update.
1491 * spu-low.c: Update.
1492 * thread-db.c: Update.
1493 * win32-low.c: Update.
1494
c0867626
SDJ
14952018-06-29 Joel Brobecker <brobecker@adacore.com>
1496
1497 * linux-x86-tdesc.c (amd64_linux_read_description): Add missing
1498 parameter in call to 'amd64_create_target_description'.
1499
2512d7ef
JK
15002018-06-28 Jan Kratochvil <jan.kratochvil@redhat.com>
1501
1502 * x86-tdesc.h: Remove executable permission flag.
1503
d0ac1c44
SM
15042018-06-19 Simon Marchi <simon.marchi@ericsson.com>
1505
1506 * configure.ac: Remove AC_PREREQ, add missing quoting.
1507 * configure: Re-generate.
1508 * config.in: Re-generate.
1509 * aclocal.m4: Re-generate.
1510
c4eb05ff
SM
15112018-06-18 Simon Marchi <simon.marchi@ericsson.com>
1512
1513 * tracepoint.h (current_traceframe): Remove declaration.
1514
02895270
AH
15152018-06-18 Alan Hayward <alan.hayward@arm.com>
1516
1517 * linux-aarch64-low.c (is_sve_tdesc): New function.
1518 (aarch64_sve_regs_copy_to_regcache): Likewise.
1519 (aarch64_sve_regs_copy_from_regcache): Likewise.
1520 (aarch64_regs_info): Add SVE checks.
1521 (initialize_low_arch): Initialize SVE.
1522
e9902bfc
AH
15232018-06-18 Alan Hayward <alan.hayward@arm.com>
1524
1525 * Makefile.in: Add aarch64-sve-linux-ptrace.c.
1526
fefa175e
AH
15272018-06-11 Alan Hayward <alan.hayward@arm.com>
1528
1529 * linux-aarch64-ipa.c (get_ipa_tdesc): Add null VQ param.
1530 (initialize_low_tracepoint): Likewise
1531 * linux-aarch64-low.c (aarch64_arch_setup): Get VQ.
1532 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Add null VQ
1533 param.
1534 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add VQ
1535 checks.
1536 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Add VQ.
1537
b91ad3ff
AH
15382018-06-11 Alan Hayward <alan.hayward@arm.com>
1539
1540 * server.h (PBUFSIZ): Increase size
1541
f868386e
AH
15422018-06-11 Alan Hayward <alan.hayward@arm.com>
1543
1544 * regcache.c (regcache::raw_compare): New function.
1545 * regcache.h (regcache::raw_compare): New declaration.
1546
9c861883
AH
15472018-06-11 Alan Hayward <alan.hayward@arm.com>
1548
1549 * regcache.c (new_register_cache): Use new.
1550 (free_register_cache): Use delete.
1551 (register_data): Use const.
1552 (supply_register): Move body inside regcache.
1553 (regcache::raw_supply): New override function.
1554 (collect_register): Move body inside regcache.
1555 (regcache::raw_collect): New override function.
1556 (regcache::get_register_status): New override function.
1557 * regcache.h (struct regcache): Inherit from reg_buffer_common.
1558
40591844
TT
15592018-06-09 Tom Tromey <tom@tromey.com>
1560
1561 * event-loop.c (gdb_event, gdb_event_p): Remove typedefs. Don't
1562 declare queue.
1563 (event_queue): Use std::queue.
1564 (gdb_event_xfree): Remove.
1565 (initialize_event_loop, process_event, wait_for_event): Update.
1566
6341380d
SC
15672018-06-08 Stan Cox <scox@redhat.com>
1568
1569 * win32-low.c (win32_create_inferior): last_ptid and last_status
1570 moved to client_state.
1571
03349c93
PA
15722018-06-08 Pedro Alves <palves@redhat.com>
1573
1574 * Makefile.in (GDBREPLAY_OBS): Add common/cleanups.o,
1575 common/common-exceptions.o, common/common-utils.o,
1576 common/errors.o, common/print-utils.o and utils.o.
1577 * gdbreplay.c: Include "common-defs.h" instead of the two
1578 'config.h's here. Don't include stdio.h, errno.h, stdlib.h,
1579 string.h or alloca.h.
1580 (perror_with_name): Delete.
1581 (remote_open): Use xstrdup instead of strdup.
1582 (main): Rename to ...
1583 (captured_main): ... this.
1584 (main): New.
1585
8dcc53b3
TT
15862018-06-08 Tom Tromey <tom@tromey.com>
1587
1588 * linux-low.c (linux_low_read_btrace): Update.
1589
c12a5089
SC
15902018-06-04 Stan Cox <scox@redhat.com>
1591
1592 * server.h (struct client_state): New.
1593 * server.c (cont_thread, general_thread, multi_process)
1594 (report_fork_events, report_vfork_events, report_exec_events)
1595 (report_thread_events, swbreak_feature, hwbreak_feature)
1596 (vCont_supported, disable_randomization, pass_signals)
1597 (program_signals, program_signals_p, last_status, last_ptid, own_buf):
1598 Moved to client_state.
1599 * remote-utils.c (remote_debug, noack_mode)
1600 (transport_is_reliable): Moved to client_state.
1601 * tracepoint.c (current_traceframe): Moved to client_state.
1602
1603 Update all callers.
1604 * server.c, remote-utils.c, tracepoint.c, fork-child.c,
1605 linux-low.c, remote-utils.h, target.c: Use client_state.
1606
122394f1
AH
16072018-05-31 Alan Hayward <alan.hayward@arm.com>
1608
1609 * configure.srv: Add new c/h file.
1610
95228a0d
AH
16112018-05-31 Alan Hayward <alan.hayward@arm.com>
1612
1613 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add
1614 null VQ.
1615
d8dab6c3
MR
16162018-05-25 Maciej W. Rozycki <macro@mips.com>
1617
1618 * gdb.arch/mips-fpregset-core.exp: New test.
1619 * gdb.arch/mips-fpregset-core.c: New test source.
1620
81e25b7c
EK
16212018-05-23 Erik Kurzinger <ekurzinger@nvidia.com>
1622
1623 PR server/23198
1624 * hostio.c (require_int): Do not report overflow for integers
1625 between 0xfffffff and 0x7fffffff.
1626
7e947ad3
MR
16272018-05-22 Maciej W. Rozycki <macro@mips.com>
1628
1629 * linux-mips-low.c [HAVE_PTRACE_GETREGS] (mips_collect_register)
1630 (mips_supply_register): Move outside HAVE_PTRACE_GETREGS.
1631 (mips_collect_ptrace_register, mips_supply_ptrace_register): New
1632 functions.
1633 (the_low_target): Wire them.
1634
1d75a658
PFC
16352018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1636
1637 * linux-ppc-low.c (ppc_fill_vrregset): Add vscr_offset variable.
1638 Set vscr_offset to 0 in little-endian mode and 12 in big-endian
1639 mode. Call collect_register_by_name with vscr using
1640 vscr_offset. Zero-pad vscr and vrsave fields in collector buffer.
1641 (ppc_store_vrregset): Add and set vscr_offset variable as in
1642 ppc_fill_vrregset. Call supply_register_by_name with vscr using
1643 vscr_offset.
1644
d078308a
PFC
16452018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1646
1647 * linux-ppc-low.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
1648 (ppc_arch_setup): Change SIZEOF_VRREGS and SIZEOF_VSXREGS to
1649 PPC_LINUX_SIZEOF_VRREGSET and PPC_LINUX_SIZEOF_VSXREGSET.
1650
7273b5fc
PFC
16512018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1652
1653 * linux-ppc-low.c (ppc_fill_vsxregset): Remove ppc_hwcap check.
1654 (ppc_store_vsxregset): Likewise.
1655 (ppc_fill_vrregset): Likewise.
1656 (ppc_store_vrregset): Likewise.
1657 (ppc_fill_evrregset): Likewise.
1658 (ppc_store_evrregset): Likewise.
1659 (ppc_regsets): Set VSX/VR/EVR regset sizes to 0.
1660 (ppc_arch_setup): Iterate through ppc_regsets and set sizes when
1661 needed.
1662
2e077f5e
PFC
16632018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1664
1665 * linux-ppc-low.c (ppc_arch_setup): Remove code for getting the
1666 wordsize of the inferior. Call ppc_linux_target_wordsize.
1667
bd64614e
PFC
16682018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1669
1670 * configure.srv (srv_tgtobj): Add arch/ppc-linux-common.o.
1671 * Makefile.in (SFILES): Add arch/ppc-linux-common.c.
1672 * linux-ppc-tdesc.h: Rename to linux-ppc-tdesc-init.h.
1673 * linux-ppc-tdesc-init.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
1674 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
1675 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
1676 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
1677 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
1678 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
1679 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
1680 (tdesc_powerpc_e500l): Remove.
1681 * linux-ppc-ipa.c: Include arch/ppc-linux-tdesc.h and
1682 linux-ppc-tdesc-init.h. Don't include linux-ppc-tdesc.h.
1683 * linux-ppc-low.c: Include arch/ppc-linux-common.h,
1684 arch/ppc-linux-tdesc.h, and linux-ppc-tdesc-init.h. Don't include
1685 linux-ppc-tdesc.h.
1686 (ppc_arch_setup): Remove target description matching code. Fill a
1687 ppc_linux_features struct and call ppc_linux_match_description
1688 with it.
1689
75d74cca
MR
16902018-05-22 Maciej W. Rozycki <macro@mips.com>
1691
1692 * linux-mips-low.c (mips_cannot_fetch_register): Return 1 if the
1693 width of the requested register exceeds the width of the
1694 `ptrace' data type.
1695 (mips_cannot_store_register): Likewise.
1696
e4439e43
MR
16972018-05-21 Maciej W. Rozycki <macro@mips.com>
1698
1699 * linux-mips-low.c (mips_fetch_register): New function. Update
1700 preceding comment.
1701 (mips_store_gregset): Supply 0 rather than $restart for $zero.
1702 (the_low_target): Wire `mips_fetch_register'.
1703
55271bf9
JB
17042018-05-10 Joel Brobecker <brobecker@adacore.com>
1705
1706 * lynx-i386-low.c (LYNXOS_178): New macro.
1707 [LYNXOS_178] (usr_fcontext_t): Provide a definition that matches
1708 the layout on LynxOS-178.
1709 (lynx_i386_fill_fpregset, lynx_i386_store_fpregset): Do not
1710 handle floating point registers that are not supported by
1711 LynxOS-178.
1712
1a34f210
TT
17132018-05-10 Tom Tromey <tom@tromey.com>
1714
1715 * configure: Rebuild.
1716
190852c8
JB
17172018-05-10 Joel Brobecker <brobecker@adacore.com>
1718
1719 PR server/23158:
1720 * tdesc.h (init_target_desc) <expedite_regs>: New parameter.
1721 * tdesc.c (init_target_desc) <expedite_regs>: New parameter.
1722 Use it to set the expedite_regs field in the given tdesc.
1723 * x86-tdesc.h: New file.
1724 * linux-aarch64-tdesc.c (aarch64_linux_read_description):
1725 Adjust following the addition of the new expedite_regs parameter
1726 to init_target_desc.
1727 * linux-tic6x-low.c (tic6x_read_description): Likewise.
1728 * linux-x86-tdesc.c: #include "x86-tdesc.h".
1729 (i386_linux_read_description, amd64_linux_read_description):
1730 Adjust following the addition of the new expedite_regs parameter
1731 to init_target_desc.
1732 * lynx-i386-low.c: #include "x86-tdesc.h".
1733 (lynx_i386_arch_setup): Adjust following the addition of the new
1734 expedite_regs parameter to init_target_desc.
1735 * nto-x86-low.c: #include "x86-tdesc.h".
1736 (nto_x86_arch_setup): Adjust following the addition of the new
1737 expedite_regs parameter to init_target_desc.
1738 * win32-i386-low.c: #include "x86-tdesc.h".
1739 (i386_arch_setup): Adjust following the addition of the new
1740 expedite_regs parameter to init_target_desc.
1741
7dbac825
JB
17422018-05-10 Joel Brobecker <brobecker@adacore.com>
1743
1744 PR server/23158:
1745 * win32-low.c (win32_create_inferior): Add call to my_wait
1746 setting last_status global.
1747
906994d9
JB
17482018-05-10 Joel Brobecker <brobecker@adacore.com>
1749
1750 PR server/23158:
1751 * win32-low.c (create_process): Only call gdb_tilde_expand if
1752 inferior_cwd is not NULL.
1753
8ee22052
AB
17542018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
1755
1756 * i387-fp.c (i387_cache_to_xsave): Only write x87 control
1757 registers to the cache if their values have changed.
1758 (i387_xsave_to_cache): Provide default values for x87 control
1759 registers when these features are available, but disabled.
1760 * regcache.c (supply_register_by_name_zeroed): New function.
1761 * regcache.h (supply_register_by_name_zeroed): Declare new
1762 function.
1763
aff689d3
TT
17642018-05-07 Tom Tromey <tom@tromey.com>
1765
1766 * configure: Rebuild.
1767
85e26832
TT
17682018-05-04 Tom Tromey <tom@tromey.com>
1769
1770 * configure: Rebuild.
1771
a3b60e45
JK
17722018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
1773 Pedro Alves <palves@redhat.com>
1774
1775 * linux-aarch64-low.c (aarch64_stopped_data_address):
1776 Likewise.
1777
632e107b
TT
17782018-04-27 Tom Tromey <tom@tromey.com>
1779
1780 * configure: Rebuild.
1781
458412c3
TT
17822018-04-23 Tom Tromey <tom@tromey.com>
1783
1784 * configure: Rebuild.
1785
f31c089e
SM
17862018-04-19 Simon Marchi <simon.marchi@ericsson.com>
1787
1788 * Makefile.in (depcomp): Add "..".
1789 (all_deps_files): New and use it.
1790
b319b098
AH
17912018-04-18 Alan Hayward <alan.hayward@arm.com>
1792
1793 * configure.srv (aarch64*-*-linux*): Don't include xml.
1794 (i[34567]86-*-cygwin*): Likewise.
1795 (i[34567]86-*-linux*): Likewise.
1796 (i[34567]86-*-lynxos*): Likewise.
1797 (i[34567]86-*-mingw32ce*): Likewise.
1798 (i[34567]86-*-mingw*): Likewise.
1799 (i[34567]86-*-nto*): Likewise.
1800 (tic6x-*-uclinux): Likewise.
1801 (x86_64-*-linux*): Likewise.
1802 (x86_64-*-mingw*): Likewise.
1803 (x86_64-*-cygwin*): Likewise.
1804
3b74854b
AH
18052018-04-18 Alan Hayward <alan.hayward@arm.com>
1806
1807 * tdesc.c: Remove xml parameter.
1808
e98577a9
AH
18092018-04-18 Alan Hayward <alan.hayward@arm.com>
1810
1811 * server.c (get_features_xml): Remove cast.
1812 * tdesc.c (void target_desc::accept): Fill in function.
1813 (tdesc_get_features_xml): Remove old xml creation.
1814 (print_xml_feature::visit_pre): Add xml vistor.
1815 * tdesc.h (struct target_desc): Make xmltarget mutable.
1816 (tdesc_get_features_xml): Remove declaration.
1817
d278f585
AH
18182018-04-18 Alan Hayward <alan.hayward@arm.com>
1819
1820 * tdesc.c (tdesc_architecture_name): Add new function.
1821 (tdesc_osabi_name): Likewise.
1822 (tdesc_get_features_xml): Use new functions.
1823
eee8a18d
AH
18242018-04-18 Alan Hayward <alan.hayward@arm.com>
1825
1826 * tdesc.c (tdesc_create_flags): Remove.
1827 (tdesc_add_flag): Likewise.
1828 (tdesc_named_type): Likewise.
1829 (tdesc_create_union): Likewise.
1830 (tdesc_create_struct): Likewise.
1831 (tdesc_create_vector): Likewise.
1832 (tdesc_add_bitfield): Likewise.
1833 (tdesc_add_field): Likewise.
1834 (tdesc_set_struct_size): Likewise.
1835
82ec9bc7
AH
18362018-04-18 Alan Hayward <alan.hayward@arm.com>
1837
1838 * tdesc.c (~target_desc): Remove implictly deleted items.
1839 (init_target_desc): Iterate all features.
1840 (tdesc_get_features_xml): Use vector.
1841 (tdesc_create_feature): Create feature.
1842 * tdesc.h (tdesc_feature) Remove
1843 (target_desc): Add features.
1844
ea3e7d71
AH
18452018-04-18 Alan Hayward <alan.hayward@arm.com>
1846
1847 * Makefile.in: Add common/tdesc.c
1848 * tdesc.c (init_target_desc): init all reg_defs from register
1849 vector.
1850 (tdesc_create_reg): Create tdesc_reg.
1851 * tdesc.h (tdesc_feature): Add register vector.
1852
17d08cd4
SM
18532018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
1854
1855 * tdesc.h (struct target_desc) <features>: Change type to
1856 std::vector<std::string>.
1857 * tdesc.c (target_desc::~target_desc): Adjust to std::vector
1858 changes.
1859 (tdesc_get_features_xml): Likewise.
1860 (tdesc_create_feature): Likewise.
1861
5cd3e386
AH
18622018-03-26 Alan Hayward <alan.hayward@arm.com>
1863
1864 * regcache.c (find_register_by_number): Return a ref.
1865 (find_regno): Use references.
1866 (register_size): Likewise.
1867 (register_data): Likewise.
1868 * tdesc.c (target_desc::~target_desc): Remove free calls.
1869 (target_desc::operator==): Use std::vector compare.
1870 (init_target_desc): Use reference.
1871 (tdesc_create_reg): Use reg constructors.
1872 * tdesc.h (struct target_desc): Replace pointer with object.
1873
dff7492c
AH
18742018-03-23 Alan Hayward <alan.hayward@arm.com>
1875
1876 * regcache.c (find_register_by_number): Make static.
1877 (find_regno): Use find_register_by_number
1878 * regcache.h (struct reg): Remove declaration.
1879
d80e5242
AH
18802018-03-23 Alan Hayward <alan.hayward@arm.com>
1881
1882 * tdesc.c (target_desc::~target_desc): Move to here.
1883 (target_desc::operator==): Likewise.
1884 * tdesc.h (target_desc::~target_desc): Move from here.
1885 (target_desc::operator==): Likewise.
1886
f69c5afb
AA
18872018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
1888
1889 * linux-s390-low.c (s390_get_wordsize): Correct brace style.
1890
ce29f843
AA
18912018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1892
1893 * linux-s390-ipa.c (get_ipa_tdesc): Add handling for
1894 S390_TDESC_GS.
1895 * linux-s390-low.c (s390_get_ipa_tdesc_idx): Likewise.
1896 (initialize_low_tracepoint): Call init_registers_s390x_gs_linux64
1897 and init_registers_s390_gs_linux64.
1898
c49bd90b
AA
18992018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1900
1901 * linux-s390-low.c (s390_fill_gs): Remove function.
1902 (s390_fill_gsbc): Remove function.
1903 (s390_regsets): Set fill functions for the guarded storage regsets
1904 to NULL.
1905
7edb9bd3
AA
19062018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1907
1908 * linux-s390-low.c (s390_get_hwcap): Replace tdesc parameter by
1909 the word size. Add comment.
1910 (s390_get_wordsize): New function.
1911 (s390_arch_setup): No longer select a temporary tdesc to fetch the
1912 pswm with it. Instead, use s390_get_wordsize to determine the
1913 word size first and derive the correct tdesc from that directly.
1914
39be3c7e
SM
19152018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
1916
1917 * Makefile.in: Include silent-rules.mk.
1918 (srcdir, abs_top_srcdir, abs_srcdir, VPATH): Move up.
1919 (COMPILE): Add ECHO_CXX.
1920 (gdbserver$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
1921 (gdbreplay$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
1922 ($(IPA_LIB)): Add SILENCE and ECHO_CXXLD.
1923 (version-generated.c): Add ECHO_GEN.
1924 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN_GENERATED.
1925 (IPAGENT_COMPILE): Add ECHO_CXX.
1926 (%-generated.c): Add ECHO_REGDAT.
1927
3ae9ce5d
TT
19282018-03-14 Tom Tromey <tom@tromey.com>
1929
1930 PR cli/14977:
1931 * ax.c (ax_printf): Special case for NULL.
1932
e6a58aa8
SM
19332018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
1934
1935 * linux-low.c (linux_qxfer_libraries_svr4): Use
1936 xml_escape_text_append.
1937
f6e8a41e
SM
19382018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
1939
1940 * linux-low.c (linux_qxfer_libraries_svr4): Use std::string.
1941
b9671caf
SM
19422018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
1943
1944 * server.c (handle_general_set): Remove unnecessary xstrdup.
1945
e80aaf61
SM
19462018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
1947
1948 * server.c (parse_debug_format_options): Adjust to
1949 delim_string_to_char_ptr_vec changes.
1950 * thread-db.c (thread_db_load_search): Adjust to
1951 dirnames_to_char_ptr_vec changes.
1952
b1223e78
MM
19532018-03-01 Markus Metzger <markus.t.metzger@intel.com>
1954
1955 * target.h (target_enable_btrace, target_disable_btrace)
1956 (target_read_btrace, target_read_btrace_conf): Turn macro into
1957 inline function. Throw error if target method is not defined.
1958 * server.c (handle_qxfer_btrace handle_qxfer_btrace_conf): Remove
1959 check for btrace target method. Be prepared to handle exceptions
1960 from btrace target methods.
1961
81561546
SDJ
19622018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
1963
1964 * server.c (captured_main): Change order of error message printed
1965 when the current working directory cannot be found.
1966
25e3c82c
SDJ
19672018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
1968
1969 * server.c: Include "filenames.h" and "pathstuff.h".
1970 (program_name): Delete variable.
1971 (program_path): New anonymous class.
1972 (get_exec_wrapper): Use "program_path" instead of
1973 "program_name".
1974 (handle_v_run): Likewise.
1975 (captured_main): Likewise.
1976 (process_serial_event): Likewise.
1977
b4987c95
SDJ
19782018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
1979
1980 * Makefile.in (SFILES): Add "$(srcdir)/common/pathstuff.c".
1981 (OBJS): Add "pathstuff.o".
1982 * server.c (current_directory): New global variable.
1983 (captured_main): Initialize "current_directory".
1984
f46cd62a
AH
19852018-02-26 Alan Hayward <alan.hayward@arm.com>
1986
1987 * tdesc.c: Use common/tdesc.h.
1988 * tdesc.h: Likewise.
1989
a543c5ca
AH
19902018-02-20 Alan Hayward <alan.hayward@arm.com>
1991 Simon Marchi <simon.marchi@ericsson.com>
1992
1993 * Makefile.in: Switch order of make rules.
1994
b5884fa7
AH
19952018-02-19 Alan Hayward <alan.hayward@arm.com>
1996
1997 * Makefile.in: Add common directory in build.
1998 * configure.ac: Add common reference.
1999 * configure: Regenerate.
2000
de6242d3
MM
20012018-02-09 Markus Metzger <markus.t.metzger@intel.com>
2002
2003 * linux-low.c (linux_target_ops): Remove linux_supports_btrace.
2004 * nto-low.c (nto_target_ops): Remove NULL for supports_btrace.
2005 * spu-low.c (spu_target_ops): Likewise.
2006 * win32-low.c (win32_target_ops): Likewise.
2007 * server.c (supported_btrace_packets): Report packets unconditionally.
2008 * target.h (target_ops) <supports_btrace>: Remove.
2009 (target_supports_btrace): Remove.
2010
9ee23a85
MM
20112018-02-09 Markus Metzger <markus.t.metzger@intel.com>
2012
2013 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt)
2014 (handle_btrace_disable): Change return type to void. Use exceptions
2015 to report errors.
2016 (handle_btrace_general_set): Catch exception and copy message to
2017 return message.
2018
8ce47547
TT
20192018-02-08 Tom Tromey <tom@tromey.com>
2020
2021 * linux-low.c (install_software_single_step_breakpoints): Use
2022 make_scoped_restore.
2023 * inferiors.c (make_cleanup_restore_current_thread): Remove.
2024 (do_restore_current_thread_cleanup): Remove.
2025 * gdbthread.h (make_cleanup_restore_current_thread): Don't
2026 declare.
2027
45dd3607
TT
20282018-02-08 Tom Tromey <tom@tromey.com>
2029
2030 * mem-break.c (set_raw_breakpoint_at): Use
2031 gdb::unique_xmalloc_ptr.
2032
e671cd59
PA
20332018-01-30 Pedro Alves <palves@redhat.com>
2034
2035 PR gdb/13211
2036 * target.c (target_terminal::terminal_state): Rename to ...
2037 (target_terminal::m_terminal_state): ... this.
2038
a0aad537
JC
20392018-01-19 James Clarke <jrtc27@jrtc27.com>
2040
2041 * linux-low.c (handle_extended_wait): Surround call to
2042 thread_db_notice_clone with #ifdef USE_THREAD_DB.
2043
4d9b86e1
SM
20442018-01-17 Simon Marchi <simon.marchi@ericsson.com>
2045
2046 * linux-low.c (attach_proc_task_lwp_callback): Adjust to
2047 linux_ptrace_attach_fail_reason_string now returning an
2048 std::string.
2049 (linux_attach): Likewise.
2050 * thread-db.c (attach_thread): Likewise.
2051
f517c180
EA
20522018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
2053
2054 PR gdb/21559
2055 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
2056 checking for fs_base/gs_base fields in struct user_regs_struct.
2057 * configure: Regenerate.
2058
9a70f35c
YQ
20592018-01-16 Yao Qi <yao.qi@linaro.org>
2060
2061 PR gdb/18749
2062 * linux-low.c (fetch_register): Call supply_register instead of
2063 error.
2064
605fd3c6
YQ
20652018-01-08 Yao Qi <yao.qi@linaro.org>
2066 Simon Marchi <simon.marchi@ericsson.com>
2067
2068 * Makefile.in (OBS): Remove selftest.o.
2069 * configure.ac: Set srv_selftest_objs if $development is true.
2070 (GDBSERVER_DEPFILES): Append $srv_selftest_objs.
2071 * configure: Re-generated.
2072 * server.c (captured_main): Wrap variable selftest_filter with
2073 GDB_SELF_TEST.
2074
2cc05030
SM
20752018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
2076
2077 * server.c (parse_debug_format_options): Return std::string.
2078 (handle_monitor_command, captured_main): Adjust.
2079
e379cee6
PA
20802018-01-05 Pedro Alves <palves@redhat.com>
2081
2082 PR gdb/18653
2083 * server.c (captured_main): Pass quiet=false to
2084 save_original_signals_state.
2085
82e1e79a
JB
20862018-01-01 Joel Brobecker <brobecker@adacore.com>
2087
2088 * gdbreplay.c (gdbreplay_version): Update copyright year in
2089 version message.
2090 * server.c (gdbserver_version): Likewise.
2091
8e481c3b
TT
20922017-12-08 Tom Tromey <tom@tromey.com>
2093
2094 * ax.c (ax_printf): Update.
2095
a8806230
YQ
20962017-12-07 Yao Qi <yao.qi@linaro.org>
2097
2098 * linux-aarch64-ipa.c (initialize_low_tracepoint): Call
2099 aarch64_linux_read_description.
2100 * linux-amd64-ipa.c (idx2mask): New array.
2101 (get_ipa_tdesc): Move idx2mask out.
2102 (initialize_low_tracepoint): Initialize target descriptions.
2103 * linux-i386-ipa.c (idx2mask): New array.
2104 (get_ipa_tdesc): Move idx2mask out.
2105 (initialize_low_tracepoint): Initialize target descriptions.
2106
d4a0e8b5
SM
21072017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
2108
2109 * tdesc.c (struct tdesc_type): Change return type.
2110 (tdesc_add_flag): Change parameter type.
2111 (tdesc_add_bitfield): Likewise.
2112 (tdesc_add_field): Likewise.
2113 (tdesc_set_struct_size): Likewise.
2114
798a7429
SM
21152017-12-05 Simon Marchi <simon.marchi@ericsson.com>
2116
2117 * regcache.c (registers_to_string): Remove unused variable.
2118
c0e15c9b
SM
21192017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2120
2121 * inferiors.c (for_each_inferior_with_data): Remove.
2122 * inferiors.h (for_each_inferior_with_data): Remove.
2123 * server.c (handle_qxfer_threads_worker): Change parameter type.
2124 (handle_qxfer_threads_proper): Use for_each_thread.
2125
f0045347
SM
21262017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2127
2128 * inferiors.c (for_each_inferior): Remove.
2129 (clear_inferiors): Use for_each_thread.
2130 * inferiors.h (for_each_inferior): Remove.
2131 * linux-low.c (linux_wait_for_event_filtered): Use
2132 for_each_thread.
2133 (linux_stabilize_threads): Likewise.
2134 * regcache.c (regcache_release): Likewise.
2135 * server.c (gdb_wants_all_threads_stopped): Likewise.
2136 (clear_pending_status_callback): Remove.
2137 (handle_status): Use for_each_thread.
2138 (captured_main): Likewise.
2139 * win32-low.c (child_init_thread_list): Likewise.
2140 (win32_clear_inferiors): Likewise.
2141 (fake_breakpoint_event): Likewise.
2142
9521758b
SM
21432017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2144
2145 * inferiors.h (find_inferior): Remove.
2146 * inferiors.c (find_inferior): Remove.
2147
8f86d7aa
SM
21482017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2149
2150 * linux-low.c (resume_status_pending_p): Update comment.
2151 (need_step_over_p): Update comment.
2152
e2b44075
SM
21532017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2154
2155 * linux-low.c (proceed_one_lwp): Return void, change parameter
2156 type.
2157 (unsuspend_and_proceed_one_lwp): Likewise.
2158 (proceed_all_lwps): Use for_each_thread.
2159 (unstop_all_lwps): Likewise.
2160
c80825ff
SM
21612017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2162
2163 * linux-low.c (linux_resume_one_thread): Return void, take
2164 parameter directly.
2165 (linux_resume): Use for_each_thread.
2166
df3e4dbe
SM
21672017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2168
2169 * linux-low.c (send_sigstop_callback): Return void, change
2170 parameter type. Rename to...
2171 (send_sigstop): ... this.
2172 (suspend_and_send_sigstop_callback): Return void, change parameter
2173 type. Rename to...
2174 (suspend_and_send_sigstop): ... this.
2175 (stop_all_lwps): Use for_each_thread.
2176
5a6b0a41
SM
21772017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2178
2179 * linux-low.c (lwp_running): Return bool, remove unused
2180 argument.
2181 (linux_stabilize_threads): Use find_thread.
2182
39a64da5
SM
21832017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2184
2185 * linux-low.c (select_singlestep_lwp_callback): Remove.
2186 (count_events_callback): Remove.
2187 (select_event_lwp_callback): Remove.
2188 (select_event_lwp): Use find_thread/for_each_thread.
2189
a1385b7b
SM
21902017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2191
2192 * linux-low.c (not_stopped_callback): Return bool, take filter
2193 argument directly.
2194 (linux_wait_for_event_filtered): Use find_thread.
2195 (linux_wait_1): Likewise.
2196
454296a2
SM
21972017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2198
2199 * linux-low.c (same_lwp): Remove.
2200 (find_lwp_pid): Use find_thread.
2201
6b2a85da
SM
22022017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2203
2204 * linux-low.c (delete_lwp_callback): Remove.
2205 (linux_mourn): Use for_each_thread.
2206
798a38e8
SM
22072017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2208
2209 * linux-low.c (linux_detach_lwp_callback): Return void, remove
2210 args parameter, don't check for pid.
2211 (linux_detach): Use for_each_thread.
2212
e4eb0dec
SM
22132017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2214
2215 * linux-low.c (struct counter): Remove.
2216 (second_thread_of_pid_p): Remove.
2217 (last_thread_of_process_p): Use find_thread.
2218
83e1b6c1
SM
22192017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2220
2221 * inferiors.c (find_inferior_in_random): Remove.
2222 * inferiors.h (find_inferior_in_random): Remove.
2223 * linux-low.c (status_pending_p_callback): Return bool, accept
2224 parameter ptid directly.
2225 (linux_wait_for_event_filtered): Use find_thread_in_random.
2226 (linux_wait_1): Likewise.
2227
8dc7b443
SM
22282017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2229
2230 * inferiors.c (find_inferior_id): Remove.
2231 (find_thread_ptid): Move implemention from find_inferior_id to
2232 here.
2233 * inferiors.h (find_inferior_id): Remove.
2234 * server.c (handle_status): Use find_thread_ptid.
2235 (process_serial_event): Likewise.
2236 * thread-db.c (find_one_thread): Likewise.
2237 (thread_db_thread_handle): Likewise.
2238 * win32-low.c (thread_rec): Likewise.
2239 (child_delete_thread): Likewise.
2240 (win32_thread_alive): Likewise.
2241 (get_child_debug_event): Likewise.
2242
da25033c
SM
22432017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2244
2245 * linux-mips-low.c (update_watch_registers_callback): Return
2246 void, remove pid_p parameter, don't check for pid.
2247 (mips_insert_point, mips_remove_point): Use for_each_thread.
2248
c91bb56b
SM
22492017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2250
2251 * lynx.low (lynx_delete_thread_callback): Remove.
2252 (lynx_mourn): Use for_each_thread.
2253
634a3254
SM
22542017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2255
2256 * regcache.c (regcache_invalidate_one): Remove.
2257 (regcache_invalidate_pid): use for_each_thread.
2258
41272101
TT
22592017-11-26 Tom Tromey <tom@tromey.com>
2260
2261 * linux-low.c (linux_create_inferior): Update.
2262
f5291a6f
UW
22632017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
2264
2265 * spu-low.c (spu_create_inferior): Fix typo in argument name.
2266
6654d750
AH
22672017-11-24 Alan Hayward <alan.hayward@arm.com>
2268
2269 * configure.srv: Add linux-aarch64-tdesc-selftest.o.
2270 * linux-aarch64-low.c (initialize_low_arch): Call init func.
2271 * linux-aarch64-tdesc-selftest.c: New file.
2272 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
2273
22742017-11-24 Alan Hayward <alan.hayward@arm.com>
2275
2276 * configure.srv: Add new file.
2277 * linux-aarch64-low.c (initialize_low_arch): Call init func.
2278 * linux-aarch64-tdesc-selftest.c: New file.
2279 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
2280
49bdb7ee
AH
22812017-11-24 Alan Hayward <alan.hayward@arm.com>
2282
2283 * linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init.
2284 * linux-aarch64-low.c (initialize_low_arch): Remove init.
2285 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
2286
d6d7ce56
AH
22872017-11-24 Alan Hayward <alan.hayward@arm.com>
2288
2289 * configure.srv: Add new files.
2290 * linux-aarch64-ipa.c (get_ipa_tdesc): Call
2291 aarch64_linux_read_description.
2292 * linux-aarch64-low.c (aarch64_linux_read_description):
2293 Merge with aarch64_arch_setup.
2294 (aarch64_arch_setup): Call aarch64_linux_read_description.
2295 * linux-aarch64-tdesc.c: New file.
2296 * linux-aarch64-tdesc.h: New file.
2297
506fe5f4
YQ
22982017-11-24 Yao Qi <yao.qi@linaro.org>
2299
2300 * configure.srv: Set $srv_regobj for tic6x-linux.
2301 * linux-tic6x-low.c: Include "arch/tic6x.h" and "tdesc.h".
2302 (tic6x_read_description): Move some code to tic6x_arch_setup.
2303 (tic6x_tdesc_test): New function.
2304 (initialize_low_arch): Call selftests::register_test.
2305
29f9a567
YQ
23062017-11-22 Yao Qi <yao.qi@linaro.org>
2307
2308 * remote-utils.c (prepare_resume_reply): Use memcpy.
2309
578290ec
SM
23102017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2311
2312 * linux-low.c (kill_one_lwp_callback): Return void, take
2313 argument directly, don't filter on pid.
2314 (linux_kill): Use for_each_thread.
2315
eca55aec
SM
23162017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2317
2318 * linux-low.c (need_step_over_p): Return bool, remove dummy
2319 argument.
2320 (linux_resume, proceed_all_lwps): Use find_thread.
2321
25c28b4d
SM
23222017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2323
2324 * linux-low.c (resume_status_pending_p): Return bool, remove
2325 flag_p argument.
2326 (linux_resume): Use find_thread.
2327
5fdda392
SM
23282017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2329
2330 * linux-low.c (struct thread_resume_array): Remove.
2331 (linux_set_resume_request): Return void, take arguments
2332 directly.
2333 (linux_resume): Use for_each_thread.
2334
fcb056a5
SM
23352017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2336
2337 * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
2338 return bool, remove data argument.
2339 (linux_stabilize_threads): Use find_thread.
2340
139720c5
SM
23412017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2342
2343 * linux-low.c (unsuspend_one_lwp): Remove.
2344 (unsuspend_all_lwps): Use for_each_thread, inline code from
2345 unsuspend_one_lwp.
2346
6d1e5673
SM
23472017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2348
2349 * gdbthread.h (find_thread): Add overload with ptid_t filter.
2350 * linux-low.c (struct iterate_over_lwps_args): Remove.
2351 (iterate_over_lwps_filter): Remove.
2352 (iterate_over_lwps): Use find_thread.
2353
bbf550d5
SM
23542017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2355
2356 * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
2357 (linux_handle_new_gdb_connection): Use for_each_thread, inline
2358 code from reset_lwp_ptrace_options_callback.
2359
00192f77
SM
23602017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2361
2362 * linux-arm-low.c (struct update_registers_data): Remove.
2363 (update_registers_callback): Return void, take arguments
2364 directly, don't check thread's pid.
2365 (arm_insert_point, arm_remove_point): Use for_each_thread.
2366
2bee2b6c
SM
23672017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2368
2369 * win32-low.c (continue_one_thread): Return void, take argument
2370 directly.
2371 (child_continue): Use for_each_thread.
2372
0b360f19
SM
23732017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2374
2375 * win32-i386-low.c (update_debug_registers_callback): Rename
2376 to ...
2377 (update_debug_registers): ... this, return void, remove pid_p arg.
2378 (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
2379
f27866ba
SM
23802017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
2381
2382 * inferiors.h (struct process_info): Add constructor, initialize
2383 fields..
2384 <syscalls_to_catch>: Change type to std::vector<int>.
2385 * inferiors.c (add_process): Allocate process_info with new.
2386 (remove_process): Free process_info with delete.
2387 * linux-low.c (handle_extended_wait): Adjust.
2388 (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
2389 * server.c (handle_general_set): Adjust.
2390
e849ea89
PA
23912017-11-16 Pedro Alves <palves@redhat.com>
2392
2393 * remote-utils.c (remote_close): Block SIGIO signals instead of
2394 uninstalling the SIGIO handler.
2395
1d0aa65c
AH
23962017-11-16 Alan Hayward <alan.hayward@arm.com>
2397
2398 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
2399
3491a34c
YQ
24002017-11-16 Yao Qi <yao.qi@linaro.org>
2401
2402 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
2403 (tic6x_store_gregset): Likewise.
2404 (tic6x_usrregs_info): Move it up.
2405
a602f924
AH
24062017-11-15 Alan Hayward <alan.hayward@arm.com>
2407
2408 * Makefile.in: Update arch rules.
2409 * configure.srv: Explicitly mark arch/ files.
2410
5616b6c3
AS
24112017-11-13 Andreas Schwab <schwab@suse.de>
2412
2413 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
2414 function.
2415 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2416
d1928160
PA
24172017-11-06 Pedro Alves <palves@redhat.com>
2418
2419 * config.in, configure: Regenerate.
2420
bac608e7
SM
24212017-10-27 Simon Marchi <simon.marchi@ericsson.com>
2422
2423 * target.c (struct thread_search): Remove.
2424 (thread_search_callback): Remove.
2425 (prepare_to_access_memory): Use for_each_thread instead of
2426 find_inferior. Inline code from thread_search_callback.
2427
eaddb425
SM
24282017-10-27 Simon Marchi <simon.marchi@ericsson.com>
2429
2430 * server.c (struct visit_actioned_threads_data): Remove.
2431 (visit_actioned_threads): Change prototype to take arguments
2432 directly.
2433 (resume): Use find_thread instead of find_inferior.
2434
99078d34
SM
24352017-10-27 Simon Marchi <simon.marchi@ericsson.com>
2436
2437 * server.c (queue_stop_reply_callback): Change prototype, return
2438 void.
2439 (find_status_pending_thread_callback): Remove.
2440 (handle_status): Replace find_inferior with find_thread and
2441 for_each_thread.
2442
cc628f3d
AH
24432017-10-25 Alan Hayward <alan.hayward@arm.com>
2444
2445 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
2446 with REGNO.
2447 (aarch64_store_gregset): Likewise.
2448 (aarch64_fill_fpregset): Likewise.
2449 (aarch64_store_fpregset): Likewise.
2450
4d3bb80e
SM
24512017-10-21 Simon Marchi <simon.marchi@ericsson.com>
2452
2453 * gdbthread.h (find_thread, for_each_thread): New functions.
2454 * inferiors.c (thread_of_pid): Remove.
2455 (find_any_thread_of_pid): Use find_thread.
2456 * linux-low.c (num_lwps): Use for_each_thread.
2457
7a7cdfa0
YQ
24582017-10-17 Yao Qi <yao.qi@linaro.org>
2459
2460 * Makefile.in: Remove one rule.
2461 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
2462
e675d170
YQ
24632017-10-17 Yao Qi <yao.qi@linaro.org>
2464
2465 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
2466 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
2467
7eb4e0f9
YQ
24682017-10-17 Yao Qi <yao.qi@linaro.org>
2469
2470 * configure.srv: Rename arm.o with arch/arm.o.
2471
60d6cfc9
YQ
24722017-10-17 Yao Qi <yao.qi@linaro.org>
2473
2474 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
2475 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
2476 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
2477 (arch-i386.o, arch-amd64.o): Remove rules.
2478 (arch/%.o): New rule.
2479 Update POSTCOMPILE and COMPILE.pre.
2480 * configure.ac: Invoke AC_CONFIG_COMMANDS.
2481 * configure: Re-generated.
2482 * configure.srv: Replace arch-i386.o with arch/i386.o.
2483 Replace arch-amd64.o with arch/amd64.o.
2484
5bfda255
YQ
24852017-10-16 Yao Qi <yao.qi@linaro.org>
2486
2487 * configure: Regenerated.
2488
9c80ecd6
SM
24892017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
2490
2491 * inferiors.h: (struct inferior_list): Remove.
2492 (struct inferior_list_entry); Remove.
2493 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
2494 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
2495 get_first_inferior): Remove.
2496 (for_each_inferior, for_each_inferior_with_data, find_inferior,
2497 find_inferior_id, find_inferior_in_random): Change signature.
2498 * inferiors.c (all_threads): Change type to
2499 std::list<thread_info *>.
2500 (get_thread): Remove macro.
2501 (find_inferior, find_inferior_id): Change signature, implement
2502 using find_thread.
2503 (find_inferior_in_random): Change signature, implement using
2504 find_thread_in_random.
2505 (for_each_inferior, for_each_inferior_with_data): Change
2506 signature, implement using for_each_thread.
2507 (add_inferior_to_list, remove_inferior): Remove.
2508 (add_thread, get_first_thread, thread_of_pid,
2509 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
2510 (get_first_inferior, one_inferior_p, clear_inferior_list):
2511 Remove.
2512 (clear_inferiors, get_thread_process): Update.
2513 * gdbthread.h: Include <list>.
2514 (struct thread_info) <entry>: Remove field.
2515 <id>: New field.
2516 (all_threads): Change type to std::list<thread_info *>.
2517 (get_first_inferior): Add doc.
2518 (find_thread, for_each_thread, find_thread_in_random): New
2519 functions.
2520 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
2521 * linux-arm-low.c (update_registers_callback): Update.
2522 * linux-low.c (second_thread_of_pid_p): Update.
2523 (kill_one_lwp_callback, linux_detach_lwp_callback,
2524 delete_lwp_callback, status_pending_p_callback, same_lwp,
2525 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
2526 iterate_over_lwps, not_stopped_callback,
2527 resume_stopped_resumed_lwps, count_events_callback,
2528 select_singlestep_lwp_callback, select_event_lwp_callback,
2529 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
2530 suspend_and_send_sigstop_callback, wait_for_sigstop,
2531 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
2532 lwp_running, linux_set_resume_request, resume_status_pending_p,
2533 need_step_over_p, start_step_over, linux_resume_one_thread,
2534 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
2535 reset_lwp_ptrace_options_callback): Update.
2536 * linux-mips-low.c (update_watch_registers_callback): Update.
2537 * regcache.c (regcache_invalidate_one, regcache_invalidate):
2538 Update.
2539 (free_register_cache_thread_one): Remove.
2540 (regcache_release): Update.
2541 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
2542 handle_qxfer_threads_worker): Update.
2543 (handle_query): Update, use list iterator.
2544 (visit_actioned_threads, handle_pending_status,
2545 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
2546 clear_pending_status_callback, set_pending_status_callback,
2547 find_status_pending_thread_callback, handle_status,
2548 process_serial_event): Update.
2549 * target.c (thread_search_callback): Update.
2550 * thread-db.c (thread_db_get_tls_address): Update.
2551 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
2552 Update.
2553 * win32-i386-low.c (update_debug_registers_callback): Update.
2554 * win32-low.c (delete_thread_info, child_delete_thread,
2555 continue_one_thread, suspend_one_thread,
2556 get_child_debug_event): Adjust.
2557
9179355e
SM
25582017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
2559
2560 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
2561 * inferiors.h: Include <list>.
2562 (struct process_info) <entry>: Remove field.
2563 <pid>: New field.
2564 (pid_of): Change macro to function.
2565 (ptid_of, lwpid_of): Remove macro.
2566 (all_processes): Change type to std::list<process_info *>.
2567 (ALL_PROCESSES): Remove macro.
2568 (for_each_process, find_process): New function.
2569 * inferiors.c (all_processes): Change type to
2570 std::list<process_info *>.
2571 (find_thread_process): Adjust.
2572 (add_process): Likewise.
2573 (remove_process): Likewise.
2574 (find_process_pid): Likewise.
2575 (get_first_process): Likewise.
2576 (started_inferior_callback): Remove.
2577 (have_started_inferiors_p): Adjust.
2578 (attached_inferior_callback): Remove.
2579 (have_attached_inferiors_p): Adjust.
2580 * linux-low.c (check_zombie_leaders): Likewise.
2581 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
2582 (x86_linux_update_xmltarget): Adjust.
2583 * server.c (handle_query): Likewise.
2584 (gdb_reattached_process): Remove.
2585 (handle_status): Adjust.
2586 (kill_inferior_callback): Likewise.
2587 (detach_or_kill_inferior): Remove.
2588 (print_started_pid): Likewise.
2589 (print_attached_pid): Likewise.
2590 (detach_or_kill_for_exit): Update.
2591 (process_serial_event): Likewise.
2592 * linux-arm-low.c (arm_new_fork): Likewise.
2593
c9cb8905
SM
25942017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
2595
2596 * dll.h: Include <list>.
2597 (struct dll_info): Add constructor.
2598 <entry>: Remove field.
2599 (all_dlls): Change type to std::list<dll_info>.
2600 * dll.c: Include <algorithm>.
2601 (get_dll): Remove macro.
2602 (all_dlls): Change type to std::list<dll_info *>.
2603 (free_one_dll): Remove.
2604 (match_dll): Likewise.
2605 (loaded_dll): Adjust.
2606 (unloaded_dll): Adjust to all_dlls type change, use
2607 std::find_if. Inline code from match_dll.
2608 (clear_dlls): Adjust to all_dlls type change.
2609 * server.c (emit_dll_description): Remove.
2610 (handle_qxfer_libraries): Adjust to all_dlls type change,
2611 integrate emit_dll_description's functionality.
2612
04ec7890
SM
26132017-10-12 Simon Marchi <simon.marchi@ericsson.com>
2614
2615 * linux-low.h (struct linux_target_ops) <delete_process>: New
2616 field.
2617 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
2618 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
2619 (struct linux_target_ops): Add delete_process callback.
2620 * linux-arm-low.c (arm_delete_process): New.
2621 (struct linux_target_ops): Add delete_process callback.
2622 * linux-bfin-low.c (struct linux_target_ops): Likewise.
2623 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
2624 * linux-m32r-low.c (struct linux_target_ops): Likewise.
2625 * linux-mips-low.c (mips_linux_delete_process): New.
2626 (struct linux_target_ops): Add delete_process callback.
2627 * linux-ppc-low.c (struct linux_target_ops): Likewise.
2628 * linux-s390-low.c (struct linux_target_ops): Likewise.
2629 * linux-sh-low.c (struct linux_target_ops): Likewise.
2630 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
2631 * linux-tile-low.c (struct linux_target_ops): Likewise.
2632 * linux-x86-low.c (x86_linux_delete_process): New.
2633 (struct linux_target_ops): Add delete_process callback.
2634 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
2635
466eecee
SM
26362017-10-12 Simon Marchi <simon.marchi@ericsson.com>
2637
2638 * linux-aarch64-low.c (the_low_target): Add thread delete
2639 callback.
2640 * linux-arm-low.c (arm_delete_thread): New function.
2641 (the_low_target): Add thread delete callback.
2642 * linux-bfin-low.c (the_low_target): Likewise.
2643 * linux-crisv32-low.c (the_low_target): Likewise.
2644 * linux-low.c (delete_lwp): Invoke delete_thread callback if
2645 set.
2646 * linux-low.h (struct linux_target_ops) <delete_thread>: New
2647 field.
2648 * linux-m32r-low.c (the_low_target): Add thread delete callback.
2649 * linux-mips-low.c (mips_linux_delete_thread): New function.
2650 (the_low_target): Add thread delete callback.
2651 * linux-ppc-low.c (the_low_target): Likewise.
2652 * linux-s390-low.c (the_low_target): Likewise.
2653 * linux-sh-low.c (the_low_target): Likewise.
2654 * linux-tic6x-low.c (the_low_target): Likewise.
2655 * linux-tile-low.c (the_low_target): Likewise.
2656 * linux-x86-low.c (the_low_target): Likewise.
2657 * linux-xtensa-low.c (the_low_target): Likewise.
2658
b79f7801
YZ
26592017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
2660
2661 * win32-low.c: Include "common-inferior.h".
2662
bc3b087d
SDJ
26632017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
2664
2665 * inferiors.c (set_inferior_cwd): New function.
2666 * server.c (handle_general_set): Handle QSetWorkingDir packet.
2667 (handle_query): Inform that QSetWorkingDir is supported.
2668 * win32-low.c (create_process): Pass the inferior's cwd to
2669 CreateProcess.
2670
d092c5a2
SDJ
26712017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
2672
2673 * inferiors.c (current_inferior_cwd): New global variable.
2674 (get_inferior_cwd): New function.
2675 * inferiors.h (struct process_info) <cwd>: New field.
2676
7da0a886
SDJ
26772017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
2678
2679 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
2680 (OBS): Add gdb_tilde_expand.o.
2681
289a6840
SM
26822017-10-02 Simon Marchi <simon.marchi@ericsson.com>
2683
2684 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
2685 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
2686
256642e8
PA
26872017-09-29 Pedro Alves <palves@redhat.com>
2688
2689 * ax.c (gdb_parse_agent_expr): Constify.
2690 * ax.h (gdb_parse_agent_expr): Constify.
2691 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
2692 Constify.
2693 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
2694 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
2695 * remote-utils.h (read_ptid): Constify.
2696 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
2697 (process_point_options, process_serial_event): Constify.
2698 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
2699 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
2700 (cmd_qtbuffer): Constify.
2701
5b9ca4d4
PA
27022017-09-29 Pedro Alves <palves@redhat.com>
2703
2704 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
2705 fails.
2706
94c207e0
PA
27072017-09-29 Pedro Alves <palves@redhat.com>
2708
2709 * linux-low.c (handle_extended_wait): Pass parent thread instead
2710 of process to thread_db_notice_clone.
2711 * linux-low.h (thread_db_notice_clone): Replace parent process
2712 parameter with parent thread parameter.
2713 * thread-db.c (find_one_thread): Add comment.
2714 (thread_db_notice_clone): Replace parent process parameter with
2715 parent thread parameter. Temporarily switch to the parent thread.
2716
75352e28
SDJ
27172017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
2718
2719 * gdbthread.h: Include "common-gdbthread.h".
2720 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
2721 "if" when validating the ptid.
2722 * remote-utils.c: Include "gdbthread.h".
2723 (prepare_resume_reply): Use "switch_to_thread".
2724 * target.c (done_accessing_memory): Likewise.
2725
ad339634
AA
27262017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
2727
2728 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
2729 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
2730 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
2731 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
2732 s390x-gs-linux64-ipa.o to ipa_obj.
2733 * linux-s390-low.c (HWCAP_S390_GS): New define.
2734 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
2735 New functions.
2736 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
2737 (s390_arch_setup): Check for guarded-storage support and choose
2738 appropriate tdesc.
2739 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
2740 init_registers_s390x_gs_linux64.
2741 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
2742 enum value.
2743 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
2744 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
2745
cc4d742f
SM
27462017-09-22 Simon Marchi <simon.marchi@ericsson.com>
2747
2748 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
2749
f6327dcb
KB
27502017-09-21 Kevin Buettner <kevinb@redhat.com>
2751
2752 * linux-low.h (struct lwp_info): Add new field, thread_handle.
2753 (thread_db_thread_handle): Declare.
2754 * linux-low.c (linux_target_ops): Initialize thread_handle.
2755 * server.c (handle_qxfer_threads_worker): Add support for
2756 "handle" attribute.
2757 * target.h (struct target_ops): Add new function pointer,
2758 thread_handle.
2759 (target_thread_handle): Define.
2760 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
2761 field in lwp.
2762 (thread_db_thread_handle): New function.
2763
86299109
KB
27642017-09-21 Kevin Buettner <kevinb@redhat.com>
2765
2766 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
2767 * linux-low.h (thread_db_notice_clone): Declare.
2768 * thread-db.c (thread_db_notice_clone): New function.
2769
f557a88a
PA
27702017-09-21 Pedro Alves <palves@redhat.com>
2771
2772 * server.c (gdb_read_memory, handle_status, process_serial_event)
2773 (handle_serial_event, handle_target_event): Adjust to
2774 set_desired_thread prototype change.
2775 * target.c (set_desired_thread): Remove 'use_general' parameter
2776 and adjust.
2777 * target.h (set_desired_thread): Remove 'use_general' parameter.
2778
223ffa71
TT
27792017-09-20 Tom Tromey <tom@tromey.com>
2780
2781 * target.c (target_terminal::terminal_state): Define.
2782 (target_terminal::init): Rename from target_terminal_init.
2783 (target_terminal::inferior): Rename from
2784 target_terminal_inferior.
2785 (target_terminal::ours): Rename from target_terminal_ours.
2786 (target_terminal::ours_for_output, target_terminal::info): New.
2787
04fd3ba9
SM
27882017-09-16 Simon Marchi <simon.marchi@ericsson.com>
2789
2790 * server.c (accumulate_file_name_length): Remove.
2791 (emit_dll_description): Adjust to std::string change.
2792 (handle_qxfer_libraries): Use std::string to hold document.
2793
5e187554
SM
27942017-09-16 Simon Marchi <simon.marchi@ericsson.com>
2795
2796 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
2797 return type of xml_escape_text.
2798 * server.c (emit_dll_description): Likewise.
2799
1526853e
SM
28002017-09-16 Simon Marchi <simon.marchi@ericsson.com>
2801
2802 * server.c (captured_main): Accept argument for --selftest.
2803 Update run_tests call.
2804 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
2805 when registering selftests.
2806
c4dfafab
SDJ
28072017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
2808
2809 * regcache.c (get_thread_regcache): Update code to use "std::vector"
2810 instead of "VEC" for "target_desc.reg_defs".
2811 (regcache_cpy): Likewise.
2812 (registers_to_string): Likewise.
2813 (registers_from_string): Likewise.
2814 (find_regno): Likewise.
2815 (supply_regblock): Likewise.
2816 (regcache_raw_read_unsigned): Likewise.
2817 * tdesc.c (init_target_desc): Likewise.
2818 (tdesc_create_reg): Likewise.
2819 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
2820 (struct target_desc) <reg_defs>: Convert to "std::vector".
2821 (target_desc): Do not initialize "reg_defs".
2822 (~target_desc): Update code to use "std::vector" instead of "VEC"
2823 for "target_desc.reg_defs".
2824 (operator==): Likewise.
2825
124aceb4
SM
28262017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2827
2828 * inferiors.h (thread_to_gdb_id): Remove.
2829 * inferiors.c (thread_to_gdb_id): Remove.
2830 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
2831 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
2832 lynx_store_registers, lynx_read_memory, lynx_write_memory):
2833 Likewise.
2834 * nto-low.c (nto_fetch_registers, nto_store_registers,
2835 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
2836
96cde54f
SM
28372017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2838
2839 * inferiors.h (gdb_id_to_thread_id): Remove.
2840 * inferiors.c (gdb_id_to_thread_id): Remove.
2841 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
2842 removal. Move pid declaration closer to where it's used.
2843
e8ca139e
SM
28442017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2845
2846 * server.c (handle_detach): New function.
2847 (process_serial_event): Move code out, call handle_detach.
2848
f8a4e119
SM
28492017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2850
2851 * server.c (require_running): Rename to ...
2852 (require_running_or_return): ... this ...
2853 (require_running_or_break): ... and this.
2854 (handle_query, process_serial_event): Adjust.
2855
0eb0a407
SM
28562017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2857
2858 * linux-low.c (linux_set_resume_request): Remove unused
2859 variables.
2860
785922a5
SM
28612017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2862
2863 * server.c (first_thread_of): Remove.
2864 (process_serial_event): Replace usage of first_thread_of with
2865 find_any_thread_of_pid.
2866 * tracepoint.c (same_process_p): Remove.
2867 (gdb_agent_about_to_close): Replace usage of same_process_p with
2868 find_any_thread_of_pid.
2869 * linux-x86-low.c (same_process_callback): Remove.
2870 (x86_arch_setup_process_callback): Replace usage of
2871 same_process_callback with find_any_thread_of_pid.
2872 * thread-db.c (any_thread_of): Remove.
2873 (switch_to_process): Replace usage of any_thread_of with
2874 find_any_thread_of_pid.
2875 * inferiors.c (thread_pid_matches_callback): Remove.
2876 (find_thread_process): Adjust to use find_any_thread_of_pid.
2877
a059f00c
SDJ
28782017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
2879
2880 * regcache.c (get_thread_regcache): Guard calls to "memset"
e79be6e5 2881 with "!VEC_empty".
a059f00c 2882
cc397f3a
SDJ
28832017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
2884
2885 * linux-low.c (handle_extended_wait): Use
2886 "allocate_target_description" instead of "XNEW".
2887 * linux-x86-low.c (initialize_low_arch): Likewise.
2888
22916b07
YQ
28892017-09-05 Yao Qi <yao.qi@linaro.org>
2890
2891 * configure.srv (srv_i386_regobj): Remove.
2892 (srv_amd64_regobj): Remove.
2893 (srv_regobj): Set it to "" for x86 non-linux targets.
2894 * linux-x86-tdesc.c (i386_linux_read_description):
2895 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
2896 (init_registers_i386): Remove the declaration.
2897 (tdesc_i386): Remove the declaration.
2898 (lynx_i386_arch_setup): Call i386_create_target_description.
2899 * nto-x86-low.c: Likewise.
2900 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
2901 [!__x86_64__]: include arch/i386.h.
2902 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
2903
38602d55
YQ
29042017-09-05 Yao Qi <yao.qi@linaro.org>
2905
2906 * configure.srv (srv_amd64_linux_xmlfiles): Remove
2907 i386/amd64-XXX-linux from it.
2908
44b886ff
YQ
29092017-09-05 Yao Qi <yao.qi@linaro.org>
2910
2911 * configure.srv: Empty srv_amd64_linux_regobj if $development is
2912 false.
2913 (ipa_amd64_linux_regobj): Remove.
2914 (ipa_x32_linux_regobj): Remove.
2915
b4570e4b
YQ
29162017-09-05 Yao Qi <yao.qi@linaro.org>
2917
2918 * Makefile.in (arch-amd64.o): New rule.
2919 * configure.srv: Append arch-amd64.o.
2920 * linux-amd64-ipa.c: Include common/x86-xstate.h.
2921 (get_ipa_tdesc): Call amd64_linux_read_description.
2922 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
2923 and init_registers_amd64_XXX.
2924 * linux-x86-low.c (x86_linux_read_description): Call
2925 amd64_linux_read_description.
2926 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
2927 (initialize_low_arch): Don't call init_registers_x32_XXX and
2928 init_registers_amd64_XXX.
2929 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
2930 and tdesc_amd64_XXX.
2931 [__x86_64__] (amd64_tdesc_test): New function.
2932 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
2933 and init_registers_amd64_XXX.
2934 * linux-x86-tdesc.c: Include arch/amd64.h.
2935 (xcr0_to_tdesc_idx): New function.
2936 (i386_linux_read_description): New function.
2937 (amd64_get_ipa_tdesc_idx): New function.
2938 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
2939 (amd64_get_ipa_tdesc): Declare.
2940
d1f28ea2
YQ
29412017-09-05 Yao Qi <yao.qi@linaro.org>
2942
2943 * configure.srv (srv_i386_linux_xmlfiles): Remove
2944 i386/i386-XXX-linux.xml from it.
2945
25a93583
YQ
29462017-09-05 Yao Qi <yao.qi@linaro.org>
2947
2948 * configure.srv: Set srv_i386_linux_regobj empty if $development
2949 is false.
2950 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
2951 initialize_low_tdesc.
2952 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
2953 with #if initialize_low_tdesc.
2954 * linux-x86-tdesc-selftest.c: New file.
2955 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
2956
5f035c07
YQ
29572017-09-05 Yao Qi <yao.qi@linaro.org>
2958
2959 * Makefile.in (arch-i386.o): New rule.
2960 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
2961 (x86_64-*-linux*): Likewise.
2962 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
2963 include arch/i386.h.
2964 (i386_linux_read_description): Remove code and call
2965 i386_create_target_description.
2966 * tdesc.c (allocate_target_description): New function.
2967 * tdesc.h (set_tdesc_architecture): Remove declaration.
2968 (set_tdesc_osabi): Likewise.
2969
0abe8a89
YQ
29702017-09-05 Yao Qi <yao.qi@linaro.org>
2971
2972 * linux-x86-tdesc.c: Don't include <inttypes.h>.
2973 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
2974 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
2975 .xmltarget.
2976 * server.c (get_features_xml): Call tdesc_get_features_xml.
2977 * tdesc.c (set_tdesc_architecture): New function.
2978 (set_tdesc_osabi): New function.
2979 (tdesc_get_features_xml): New function.
2980 (tdesc_create_feature): Add an argument.
2981 * tdesc.h (struct target_desc) <features>: New field.
2982 <arch, osabi>: New field.
2983 (~target_desc): xfree features, arch, and osabi.
2984 (target_desc::oerator==): Don't compare .xmltarget.
2985 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
2986 (set_tdesc_osabi): Likewise.
2987 (tdesc_get_features_xml): Likewise.
2988
0a188386
YQ
29892017-09-05 Yao Qi <yao.qi@linaro.org>
2990
2991 * linux-x86-tdesc.c: Include selftest.h.
2992 (i386_tdesc_test): New function.
2993 (initialize_low_tdesc): Call selftests::register_test.
2994 * tdesc.h: Include regdef.h.
2995 (target_desc): Override operator == and !=.
2996
f49ff000
YQ
29972017-09-05 Yao Qi <yao.qi@linaro.org>
2998
2999 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
3000 (ipa_obj): Likewise.
3001 * linux-i386-ipa.c: Include common/x86-xstate.h
3002 (get_ipa_tdesc): Call i386_linux_read_description.
3003 (initialize_low_tracepoint): Don't call init_registers_XXX
3004 functions, call initialize_low_tdesc instead.
3005 * linux-x86-low.c (x86_linux_read_description): Call
3006 i386_linux_read_description.
3007 (initialize_low_arch): Don't call init_registers_i386_XXX
3008 functions, call initialize_low_tdesc.
3009 * linux-x86-tdesc.c: New file.
3010 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
3011 (i386_get_ipa_tdesc_idx): Declare.
3012 (i386_get_ipa_tdesc): Declare.
3013 (initialize_low_tdesc): Declare.
3014
2b68ef2f
YQ
30152017-09-05 Yao Qi <yao.qi@linaro.org>
3016
3017 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
3018 instead of 0.
3019
f7000548
YQ
30202017-09-05 Yao Qi <yao.qi@linaro.org>
3021
3022 * Makefile.in (IPA_OBJS): Add vec-ipa.o
3023 * regcache.c (get_thread_regcache): Use VEC_length.
3024 (init_register_cache): Likewise.
3025 (regcache_cpy): Likewise.
3026 (registers_to_string): Iterate reg_defs via VEC_iterate.
3027 (find_regno): Likewise.
3028 (find_register_by_number): Use VEC_index.
3029 (register_size): Call find_register_by_number.
3030 (register_data): Call find_register_by_number.
3031 (supply_regblock): Use VEC_length.
3032 (regcache_raw_read_unsigned): Likewise.
3033 * tdesc.c (init_target_desc): Iterate reg_defs via
3034 VEC_iterate.
3035 (default_description): Update initializer.
3036 (copy_target_description): Don't update field num_registers.
3037 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
3038 <num_registers>: Remove.
3039
50a421ac
SM
30402017-09-04 Simon Marchi <simon.marchi@ericsson.com>
3041
3042 * Makefile.in (.SECONDARY): Define target.
3043
23fdd69e
SM
30442017-09-03 Simon Marchi <simon.marchi@ericsson.com>
3045
3046 * linux-low.c (linux_wait_1): Adjust.
3047 * server.c (queue_stop_reply_callback): Adjust.
3048
0a2dde4a
SDJ
30492017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
3050
3051 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
3052 QEnvironmentUnset and QEnvironmentReset packets.
3053 (handle_query): Inform remote that QEnvironmentHexEncoded,
3054 QEnvironmentUnset and QEnvironmentReset are supported.
3055
6afd337d
SM
30562017-08-25 Simon Marchi <simon.marchi@ericsson.com>
3057
3058 * inferiors.h (inferior_target_data): Rename to ...
3059 (thread_target_data): ... this.
3060 (inferior_regcache_data): Rename to ...
3061 (thread_regcache_data): ... this.
3062 (set_inferior_regcache_data): Rename to ...
3063 (set_thread_regcache_data): ... this.
3064 * inferiors.c (inferior_target_data): Rename to ...
3065 (thread_target_data): ... this.
3066 (inferior_regcache_data): Rename to ...
3067 (thread_regcache_data): ... this.
3068 (set_inferior_regcache_data): Rename to ...
3069 (set_thread_regcache_data): ... this.
3070 (free_one_thread): Update.
3071 * linux-low.h (get_thread_lwp): Update.
3072 * regcache.c (get_thread_regcache): Update.
3073 (regcache_invalidate_thread): Update.
3074 (free_register_cache_thread): Update.
3075 * win32-i386-low.c (update_debug_registers_callback): Update.
3076 (win32_get_current_dr): Update.
3077 * win32-low.c (thread_rec): Update.
3078 (delete_thread_info): Update.
3079 (continue_one_thread): Update.
3080 (suspend_one_thread): Update.
3081
a160cc46
SM
30822017-08-24 Simon Marchi <simon.marchi@ericsson.com>
3083
3084 * inferiors.c (set_inferior_target_data): Remove.
3085 * inferiors.h (set_inferior_target_data): Remove.
3086
6d580b63
YQ
30872017-08-18 Yao Qi <yao.qi@linaro.org>
3088
3089 * Makefile.in (OBS): Add selftest.o.
3090 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
3091 * configure, config.in: Re-generated.
3092 * server.c: Include common/sefltest.h.
3093 (captured_main): Handle option --selftest.
3094
f5a29eb0
YQ
30952017-08-09 Yao Qi <yao.qi@linaro.org>
3096
3097 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
3098 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
3099 i386-avx-mpx.o and i386-mmx.o.
3100 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
3101 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
3102 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
3103 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
3104 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
3105 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
3106 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
3107 i386/amd64-avx-mpx.xml.
3108
57757c2f
YQ
31092017-08-09 Yao Qi <yao.qi@linaro.org>
3110
3111 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
3112 and x32-avx-avx512.o.
3113 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
3114 i386/x32-avx-avx512.xml.
3115
229d26fc
SM
31162017-07-26 Simon Marchi <simon.marchi@ericsson.com>
3117
3118 * tracepoint.h (enum class fast_tpoint_collect_result): New
3119 enumeration.
3120 (fast_tracepoint_collecting): Change return type to
3121 fast_tpoint_collect_result.
3122 * tracepoint.c (fast_tracepoint_collecting): Likewise.
3123 * linux-low.h: Include tracepoint.h.
3124 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
3125 fast_tpoint_collect_result.
3126 * linux-low.c (handle_tracepoints): Adjust.
3127 (linux_fast_tracepoint_collecting): Change return type to
3128 fast_tpoint_collect_result.
3129 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
3130 linux_wait_1, stuck_in_jump_pad_callback,
3131 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
3132 proceed_one_lwp): Adjust to type change.
3133
2e1e43e1
YQ
31342017-07-10 Yao Qi <yao.qi@linaro.org>
3135
3136 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
3137
adc764e7
YQ
31382017-06-29 Yao Qi <yao.qi@linaro.org>
3139
3140 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
3141 Remove.
3142 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
3143
a206891a
SM
31442017-06-20 Simon Marchi <simon.marchi@ericsson.com>
3145
3146 * Makefile.in (IPA_OBJS): Sort and format one item per line.
3147
9a6c7d9c
SDJ
31482017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
3149
3150 * linux-low.c (linux_create_inferior): Adjust code to access the
3151 environment information via 'gdb_environ' class.
3152 * lynx-low.c (lynx_create_inferior): Likewise.
3153 * server.c (our_environ): Make it an instance of 'gdb_environ'.
3154 (get_environ): Return a pointer to 'our_environ'.
3155 (captured_main): Initialize 'our_environ'.
3156 * server.h (get_environ): Adjust prototype.
3157 * spu-low.c (spu_create_inferior): Adjust code to access the
3158 environment information via 'gdb_environ' class.
3159
ae3e2ccf
SM
31602017-06-17 Simon Marchi <simon.marchi@ericsson.com>
3161
3162 * linux-low.c (linux_read_memory, linux_write_memory): Remove
3163 usage of "register" keyword.
3164
3e019bdc
SM
31652017-06-17 Simon Marchi <simon.marchi@ericsson.com>
3166
3167 * configure: Re-generate.
3168
8465943a
SM
31692017-06-17 Simon Marchi <simon.marchi@ericsson.com>
3170
3171 * configure: Re-generate.
3172
cf0dd6f0
SM
31732017-06-17 Simon Marchi <simon.marchi@ericsson.com>
3174
3175 * Makefile.in (COMPILE.pre): Add "-x c++".
3176
9845682b
SDJ
31772017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
3178
3179 * fork-child.c: Conditionally include <signal.h>.
3180
aefd8b33
SDJ
31812017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
3182
3183 * server.c (handle_general_set): Handle new packet
3184 "QStartupWithShell".
3185 (handle_query): Add "QStartupWithShell" to the list of supported
3186 packets.
3187 (gdbserver_usage): Add help text explaining the
3188 new "--startup-with-shell" and "--no-startup-with-shell" CLI
3189 options.
3190 (captured_main): Recognize and act upon the presence of the new
3191 CLI options.
3192
2090129c
SDJ
31932017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
3194 Pedro Alves <palves@redhat.com>
3195
3196 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
3197 * configure: Regenerate.
3198 * configure.srv (srv_linux_obj): Add "fork-child.o" and
3199 "fork-inferior.o".
3200 (i[34567]86-*-lynxos*): Likewise.
3201 (spu*-*-*): Likewise.
3202 * fork-child.c: New file.
3203 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
3204 and "environ.h".
3205 (linux_ptrace_fun): New function.
3206 (linux_create_inferior): Adjust function prototype to reflect
3207 change on "target.h". Adjust function code to use
3208 "fork_inferior".
3209 (linux_request_interrupt): Delete "signal_pid".
3210 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
3211 (lynx_ptrace_fun): New function.
3212 (lynx_create_inferior): Adjust function prototype to reflect
3213 change on "target.h". Adjust function code to use
3214 "fork_inferior".
3215 * nto-low.c (nto_create_inferior): Adjust function prototype and
3216 code to reflect change on "target.h". Update comments.
3217 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
3218 "common-terminal.h" and "environ.h".
3219 (terminal_fd): Moved to fork-child.c.
3220 (old_foreground_pgrp): Likewise.
3221 (restore_old_foreground_pgrp): Likewise.
3222 (last_status): Make it global.
3223 (last_ptid): Likewise.
3224 (our_environ): New variable.
3225 (startup_with_shell): Likewise.
3226 (program_name): Likewise.
3227 (program_argv): Rename to...
3228 (program_args): ...this.
3229 (wrapper_argv): New variable.
3230 (start_inferior): Delete function.
3231 (get_exec_wrapper): New function.
3232 (get_exec_file): Likewise.
3233 (get_environ): Likewise.
3234 (prefork_hook): Likewise.
3235 (post_fork_inferior): Likewise.
3236 (postfork_hook): Likewise.
3237 (postfork_child_hook): Likewise.
3238 (handle_v_run): Update code to deal with arguments coming from the
3239 remote host. Update calls from "start_inferior" to
3240 "create_inferior".
3241 (captured_main): Likewise. Initialize environment variable. Call
3242 "have_job_control".
3243 * server.h (post_fork_inferior): New prototype.
3244 (get_environ): Likewise.
3245 (last_status): Declare.
3246 (last_ptid): Likewise.
3247 (signal_pid): Likewise.
3248 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
3249 (spu_ptrace_fun): New function.
3250 (spu_create_inferior): Adjust function prototype to reflect change
3251 on "target.h". Adjust function code to use "fork_inferior".
3252 * target.c (target_terminal_init): New function.
3253 (target_terminal_inferior): Likewise.
3254 (target_terminal_ours): Likewise.
3255 * target.h: Include <vector>.
3256 (struct target_ops) <create_inferior>: Update prototype.
3257 (create_inferior): Update macro.
3258 * utils.c (gdb_flush_out_err): New function.
3259 * win32-low.c (win32_create_inferior): Adjust function prototype
3260 and code to reflect change on "target.h".
3261
043a4934
SDJ
32622017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
3263
3264 * inferiors.c (switch_to_thread): New function.
3265
15652511
SDJ
32662017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
3267
3268 * Makefile.in (SFILE): Add "common/job-control.c".
3269 (OBS): Add "job-control.o".
3270
21ea5acd
SDJ
32712017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
3272
3273 * Makefile: Remove "@host_makefile_frag@".
3274
e13cb306
PA
32752017-05-05 Pedro Alves <palves@redhat.com>
3276
3277 * configure: Regenerate.
3278
c94fee56
SDJ
32792017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
3280
3281 * configure: Regenerate.
3282
a0ff9e1a
SM
32832017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
3284
3285 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
3286 software_single_step change of return type to
3287 std::vector<CORE_ADDR>.
3288 * linux-low.c (install_software_single_step_breakpoints):
3289 Likewise.
3290 * linux-low.h (install_software_single_step_breakpoints):
3291 Likewise.
3292
be628ab8
SDJ
32932017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
3294
3295 * remote-utils.c: Include "gdb_termios.h" instead of
3296 "terminal.h".
3297 * terminal.h: Delete file.
3298
7c5ded6a
SDJ
32992017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
3300
3301 * server.c: Include <vector>.
3302 <program_argv, wrapper_argv>: Convert to std::vector.
3303 (start_inferior): Rewrite function to use C++.
3304 (handle_v_run): Likewise. Update code that calculates the argv
3305 based on the vRun packet; use C++.
3306 (captured_main): Likewise.
3307
436252de
SM
33082017-04-06 Simon Marchi <simon.marchi@ericsson.com>
3309
3310 * server.c (handle_v_cont): Initialize thread_resume::thread
3311 with null_ptid.
3312
9bf2a700
PA
33132017-04-05 Pedro Alves <palves@redhat.com>
3314
3315 * configure: Regenerate.
3316
a121b7c1
PA
33172017-04-05 Pedro Alves <palves@redhat.com>
3318
3319 * gdbreplay.c (sync_error): Constify.
3320 * linux-x86-low.c (push_opcode): Constify.
3321
21c8a587
PA
33222017-04-05 Pedro Alves <palves@redhat.com>
3323
3324 * win32-low.c (get_child_debug_event)
3325 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
3326 Report TARGET_WAITKIND_SPURIOUS instead.
3327
fb32b4f7
PA
33282017-04-05 Pedro Alves <palves@redhat.com>
3329
e79be6e5
SM
3330 * remote-utils.c (remote_prepare, remote_open): Constify.
3331 * remote-utils.h (remote_prepare, remote_open): Constify.
3332 * server.c (captured_main): Constify 'port' handling.
fb32b4f7 3333
65dd1e59
SM
33342017-04-04 Simon Marchi <simon.marchi@ericsson.com>
3335
3336 * Makefile.in (clean): Clear .deps.
3337
8fa5b777
SM
33382017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
3339
3340 * .gitignore: Remove generated files, replace with wildcard.
3341 * (clean): Replace removal of generated files with wildcard.
3342 (version.c): Replace with...
3343 (version-generated.c): ...this.
3344 (xml-builtin.c): Replace with...
3345 (xml-builtin-generated.c): ...this.
3346 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
3347 (%.c: *regformats*): Replace with...
3348 (%-generated.c: *regformats*): ...this.
3349
a12e714b
MF
33502017-03-27 Max Filippov <jcmvbkbc@gmail.com>
3351
3352 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
3353 (xtensa_fill_gregset): Call collect_register_by_name for
3354 threadptr register.
3355 (xtensa_store_gregset): Call supply_register_by_name for
3356 threadptr register.
3357
1a09b50a
MF
33582017-03-27 Max Filippov <jcmvbkbc@gmail.com>
3359
3360 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
3361 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
3362 (xtensa_store_gregset): Call supply_register for all registers in
3363 a0_regnum..a0_regnum + C0_NREGS range.
3364
1a01e7c6
SM
33652017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3366
3367 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
3368 (ax-ipa.o: ax.c): Remove.
3369 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
3370 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
3371 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
3372 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
3373 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
3374
36bc18a8
SM
33752017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3376
3377 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
3378 (print-utils-ipa.o: ../common/print-utils.c): Remove.
3379 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
3380 (errors-ipa.o: ../common/errors.c): Remove.
3381 (format-ipa.o: ../common/format.c): Remove.
3382 (common-utils-ipa.o: ../common/common-utils.c): Remove.
3383
a8ebe3d5
SM
33842017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3385
3386 * Makefile.in (%-ipa.o: %.c): New rule.
3387 (tracepoint-ipa.o: tracepoint.c): Remove.
3388 (utils-ipa.o: utils.c): Remove.
3389 (remote-utils-ipa.o: remote-utils.c): Remove.
3390 (regcache-ipa.o: regcache.c): Remove.
3391 (i386-linux-ipa.o: i386-linux.c): Remove.
3392 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
3393 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
3394 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
3395 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
3396 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
3397 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
3398 (amd64-linux-ipa.o: amd64-linux.c): Remove.
3399 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
3400 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
3401 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
3402 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
3403 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
3404 (aarch64-ipa.o: aarch64.c): Remove.
3405 (s390-linux32-ipa.o: s390-linux32.c): Remove.
3406 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
3407 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
3408 (s390-linux64-ipa.o: s390-linux64.c): Remove.
3409 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
3410 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
3411 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
3412 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
3413 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
3414 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
3415 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
3416 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
3417 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
3418 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
3419 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
3420 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
3421 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
3422 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
3423 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
3424 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
3425 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
3426 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
3427 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
3428 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
3429 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
3430 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
3431 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
3432 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
3433 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
3434 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
3435 (tdesc-ipa.o: tdesc.c): Remove.
3436 (x32-linux-ipa.o: x32-linux.c): Remove.
3437 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
3438 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
3439
50cfacb7
SM
34402017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3441
3442 * Makefile.in (%.o: ../arch/%.c): New rule.
3443 (arm.o: ../arch/arm.c): Remove.
3444 (arm-linux.o: ../arch/arm-linux.c): Remove.
3445 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
3446 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
3447
c5a22423
SM
34482017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3449
3450 * Makefile.in (%.o: ../nat/%.c): New rule.
3451 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
3452 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
3453 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
3454 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
3455 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
3456 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
3457 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
3458 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
3459 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
3460 (linux-personality.o: ../nat/linux-personality.c): Remove.
3461 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
3462 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
3463 (x86-linux.o: ../nat/x86-linux.c): Remove.
3464 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
3465 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
3466
6bda016b
SM
34672017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3468
3469 * Makefile.in (%.o: ../common/%.c): New rule.
3470 (signals.o: ../common/signals.c): Remove.
3471 (print-utils.o: ../common/print-utils.c): Remove.
3472 (rsp-low.o: ../common/rsp-low.c): Remove.
3473 (common-utils.o: ../common/common-utils.c): Remove.
3474 (posix-strerror.o: ../common/posix-strerror.c): Remove.
3475 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
3476 (vec.o: ../common/vec.c): Remove.
3477 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
3478 (xml-utils.o: ../common/xml-utils.c): Remove.
3479 (ptid.o: ../common/ptid.c): Remove.
3480 (buffer.o: ../common/buffer.c): Remove.
3481 (format.o: ../common/format.c): Remove.
3482 (filestuff.o: ../common/filestuff.c): Remove.
3483 (agent.o: ../common/agent.c): Remove.
3484 (errors.o: ../common/errors.c): Remove.
3485 (environ.o: ../common/environ.c): Remove.
3486 (common-debug.o: ../common/common-debug.c): Remove.
3487 (cleanups.o: ../common/cleanups.c): Remove.
3488 (common-exceptions.o: ../common/common-exceptions.c): Remove.
3489 (fileio.o: ../common/fileio.c): Remove.
3490 (common-regcache.o: ../common/common-regcache.c): Remove.
3491 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
3492 (new-op.o: ../common/new-op.c): Remove.
3493 (btrace-common.o: ../common/btrace-common.c): Remove.
3494
21122961
SM
34952017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3496
3497 * Makefile.in (%.o: ../target/%.c): New rule.
3498 (waitstatus.o: ../target/waitstatus.c): Remove.
3499
c362e621
SM
35002017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3501
3502 * Makefile.in
3503 (%.c: ../regformats/%.dat,
3504 (%.c: ../regformats/arm/%.dat,
3505 (%.c: ../regformats/i386/%.dat,
3506 (%.c: ../regformats/rs6000/%.dat): New rules.
3507 (aarch64.c): Remove.
3508 (reg-arm.c): Remove.
3509 (arm-with-iwmmxt.c): Remove.
3510 (arm-with-vfpv2.c): Remove.
3511 (arm-with-vfpv3.c): Remove.
3512 (arm-with-neon.c): Remove.
3513 (reg-bfin.c): Remove.
3514 (reg-cris.c): Remove.
3515 (reg-crisv32.c): Remove.
3516 (i386.c): Remove.
3517 (i386-linux.c): Remove.
3518 (i386-avx.c): Remove.
3519 (i386-avx-linux.c): Remove.
3520 (i386-avx-avx512.c): Remove.
3521 (i386-avx-avx512-linux.c): Remove.
3522 (i386-mpx.c): Remove.
3523 (i386-mpx-linux.c): Remove.
3524 (i386-avx-mpx-avx512-pku.c): Remove.
3525 (i386-avx-mpx-avx512-pku-linux.c): Remove.
3526 (i386-avx-mpx.c): Remove.
3527 (i386-avx-mpx-linux.c): Remove.
3528 (i386-mmx.c): Remove.
3529 (i386-mmx-linux.c): Remove.
3530 (reg-ia64.c): Remove.
3531 (reg-m32r.c): Remove.
3532 (reg-m68k.c): Remove.
3533 (reg-cf.c): Remove.
3534 (mips-linux.c): Remove.
3535 (mips-dsp-linux.c): Remove.
3536 (mips64-linux.c): Remove.
3537 (mips64-dsp-linux.c): Remove.
3538 (nios2-linux.c): Remove.
3539 (powerpc-32.c): Remove.
3540 (powerpc-32l.c): Remove.
3541 (powerpc-altivec32l.c): Remove.
3542 (powerpc-cell32l.c): Remove.
3543 (powerpc-vsx32l.c): Remove.
3544 (powerpc-isa205-32l.c): Remove.
3545 (powerpc-isa205-altivec32l.c): Remove.
3546 (powerpc-isa205-vsx32l.c): Remove.
3547 (powerpc-e500l.c): Remove.
3548 (powerpc-64l.c): Remove.
3549 (powerpc-altivec64l.c): Remove.
3550 (powerpc-cell64l.c): Remove.
3551 (powerpc-vsx64l.c): Remove.
3552 (powerpc-isa205-64l.c): Remove.
3553 (powerpc-isa205-altivec64l.c): Remove.
3554 (powerpc-isa205-vsx64l.c): Remove.
3555 (s390-linux32.c): Remove.
3556 (s390-linux32v1.c): Remove.
3557 (s390-linux32v2.c): Remove.
3558 (s390-linux64.c): Remove.
3559 (s390-linux64v1.c): Remove.
3560 (s390-linux64v2.c): Remove.
3561 (s390-te-linux64.c): Remove.
3562 (s390-vx-linux64.c): Remove.
3563 (s390-tevx-linux64.c): Remove.
3564 (s390x-linux64.c): Remove.
3565 (s390x-linux64v1.c): Remove.
3566 (s390x-linux64v2.c): Remove.
3567 (s390x-te-linux64.c): Remove.
3568 (s390x-vx-linux64.c): Remove.
3569 (s390x-tevx-linux64.c): Remove.
3570 (tic6x-c64xp-linux.c): Remove.
3571 (tic6x-c64x-linux.c): Remove.
3572 (tic6x-c62x-linux.c): Remove.
3573 (reg-sh.c): Remove.
3574 (reg-sparc64.c): Remove.
3575 (reg-spu.c): Remove.
3576 (amd64.c): Remove.
3577 (amd64-linux.c): Remove.
3578 (amd64-avx.c): Remove.
3579 (amd64-avx-linux.c): Remove.
3580 (amd64-avx-avx512.c): Remove.
3581 (amd64-avx-avx512-linux.c): Remove.
3582 (amd64-mpx.c): Remove.
3583 (amd64-mpx-linux.c): Remove.
3584 (amd64-avx-mpx-avx512-pku.c): Remove.
3585 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
3586 (amd64-avx-mpx.c): Remove.
3587 (amd64-avx-mpx-linux.c): Remove.
3588 (x32.c): Remove.
3589 (x32-linux.c): Remove.
3590 (x32-avx.c): Remove.
3591 (x32-avx-linux.c): Remove.
3592 (x32-avx-avx512.c): Remove.
3593 (x32-avx-avx512-linux.c): Remove.
3594 (reg-xtensa.c): Remove.
3595 (reg-tilegx.c): Remove.
3596 (reg-tilegx32.c): Remove.
3597
1672e0d9
SDJ
35982017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
3599
3600 * Makefile.in (SFILES): Add "common/environ.c".
3601 (OBJS): Add "common/environ.h".
3602
239b6d10
WT
36032017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
3604
3605 * configure.ac: Check if the fs_base and gs_base members of
3606 `struct user_regs_struct' exist.
3607 * config.in: Regenerated.
3608 * configure: Likewise.
3609
694b382c
AT
36102017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
3611
3612 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
3613 target_read_memory.
3614 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
3615 (get_next_pcs_syscall_next_pc): Likewise.
3616
7dc53023
LM
36172016-12-23 Luis Machado <lgustavo@codesourcery.com>
3618
3619 * win32-i386-low.c: Fix incorrect reference to a couple source files.
3620 * nto-x86-low.c: Likewise.
3621
ad02e4fe
SM
36222016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
3623
3624 * Makefile.in: Include disable-implicit-rules.mk.
3625
dcb07cfa
PA
36262016-11-23 Pedro Alves <palves@redhat.com>
3627
3628 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
3629 (debug_vprintf): Use std::chrono::steady_clock instead of
3630 gettimeofday. Use '.' instead of ':'.
3631 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
3632 (get_timestamp): Use std::chrono::steady_clock instead of
3633 gettimeofday.
3634
8629c02c
SM
36352016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
3636
3637 * Makefile.in: Fix whitespace formatting.
3638
b593ecca
SM
36392016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
3640
3641 * Makefile.in (SFILES, OBS): Flatten list and order
3642 alphabetically.
3643
9986ba08
PA
36442016-11-23 Pedro Alves <palves@redhat.com>
3645
3646 * event-loop.c (handle_file_event): Use warning.
3647 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
3648 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
3649 Use warning.
3650
4eefa7bc
PA
36512016-11-23 Pedro Alves <palves@redhat.com>
3652
3653 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
3654 output.
3655 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
3656 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
3657 debug_printf and debug_flush for debug output.
3658 * server.c (handle_general_set): Likewise.
3659 * thread-db.c (try_thread_db_load): Use debug_printf for debug
3660 output.
3661
5443506e
SM
36622016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
3663
3664 * Makefile.in (.c.o): Replace rule with ...
3665 (%.o: %.c): ... this one.
3666
3b165252
SM
36672016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
3668
3669 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
3670 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
3671 make.
3672 * configure.ac: Remove checks for the make program.
3673 * configure: Re-generate.
3674
0bcda685
PA
36752016-10-28 Pedro Alves <palves@redhat.com>
3676
3677 * Makefile.in (CXX_DIALECT): Get from configure.
3678 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
3679 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
3680 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
3681 * config.in: Regenerate.
3682 * configure: Regenerate.
3683
c3805894
YQ
36842016-10-27 Yao Qi <yao.qi@linaro.org>
3685
3686 * linux-low.c (linux_supports_range_stepping): Return true if
3687 can_software_single_step return true.
3688
89342618
YQ
36892016-10-27 Yao Qi <yao.qi@linaro.org>
3690
3691 * inferiors.c (find_inferior_in_random): New function.
3692 * inferiors.h (find_inferior_in_random): Declare.
3693 * linux-low.c (linux_wait_for_event_filtered): Call
3694 find_inferior_in_random instead of find_inferior.
3695
e3652c84
YQ
36962016-10-27 Yao Qi <yao.qi@linaro.org>
3697
3698 * linux-low.c (linux_wait_1): If single-step breakpoints are
3699 inserted, remove them.
3700
5a04c4cf
PA
37012016-10-26 Pedro Alves <palves@redhat.com>
3702
3703 * linux-low.c (handle_extended_wait): Link parent/child fork
3704 threads.
3705 (linux_wait_1): Unlink them.
3706 (linux_set_resume_request): Ignore resume requests for
3707 already-resumed and unhandled fork child threads.
3708 * linux-low.h (struct lwp_info) <fork_relative>: New field.
3709 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
3710 New functions.
3711 (handle_v_requests) <vCont>: Don't call require_running.
3712 * server.h (in_queued_stop_replies): New declaration.
3713
cb93dc7f
YQ
37142016-10-24 Yao Qi <yao.qi@linaro.org>
3715
3716 PR server/20733
3717 * linux-aarch64-low.c (append_insns): Cast the return value to
3718 'uint32_t *'.
3719
a1078bea
YQ
37202016-10-10 Yao Qi <yao.qi@linaro.org>
3721
3722 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
3723
1fb77080
SDJ
37242016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
3725
3726 * target.c (target_supports_multi_process): New function, moved
3727 from...
3728 * target.h (target_supports_multi_process): ... here. Remove
3729 macro.
3730
39b5a3b9
TT
37312016-10-05 Tom Tromey <tom@tromey.com>
3732
3733 PR remote/20655:
3734 * tracepoint.c (handle_tracepoint_bkpts): Check
3735 ipa_error_tracepoint, not ipa_stopping_tracepoint.
3736
c1d0b70a
YQ
37372016-10-05 Yao Qi <yao.qi@linaro.org>
3738
3739 * configure.srv: Update the path of arm-*.xml files.
3740
0a69eedb
YQ
37412016-10-05 Terry Guo <terry.guo@arm.com>
3742 Yao Qi <yao.qi@linaro.org>
3743
3744 * Makefile.in: Adjust the path of rules.
3745 * configure.srv: Update the path of xml files.
3746 * regformats/arm-with-iwmmxt.dat: Regenerated.
3747 * regformats/arm-with-neon.dat: Likewise.
3748 * regformats/arm-with-vfpv2.dat: Likewise.
3749 * regformats/arm-with-vfpv3.dat Likewise.
3750
17e16485
YQ
37512016-09-30 Yao Qi <yao.qi@linaro.org>
3752
3753 PR gdbserver/20627
3754 * target.c (target_stop_and_wait): Don't call
3755 target_continue_no_signal, use resume_stop instead.
3756
edeeb602
YQ
37572016-09-26 Yao Qi <yao.qi@linaro.org>
3758
3759 * linux-low.c (linux_wait_1): Call debug_exit.
3760
503b1c39
PA
37612016-09-23 Pedro Alves <palves@redhat.com>
3762
3763 * Makefile.in (SFILES): Add common/new-op.c.
3764 (OBS): Add common/new-op.o.
3765 (new-op.o): New rule.
3766
74172ecf
SM
37672016-09-21 Simon Marchi <simon.marchi@ericsson.com>
3768
3769 * .gitinore: Ignore more files.
3770
fc6cda2e
YQ
37712016-09-21 Yao Qi <yao.qi@linaro.org>
3772
3773 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
3774 23.
3775
bc1e6c81
SDJ
37762016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
3777
3778 * server.c (start_inferior): Call target_mourn_inferior instead of
3779 mourn_inferior; pass ptid_t argument to it.
3780 (resume): Likewise.
3781 (handle_target_event): Likewise.
3782 * target.c (target_mourn_inferior): New function.
3783 * target.h (mourn_inferior): Delete macro.
3784
0e00e962
AA
37852016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
3786
3787 * linux-low.c (lwp_is_stepping): New function.
3788
1d8cb77d
CL
37892016-09-06 Carl Love <cel@us.ibm.com>
3790
3791 * server.c (start_inferior): Fixed comment, requested comment change
3792 didn't get updated correctly. Removed reference to ptrace () call as
3793 it is only true on Linux systems.
3794
7313bced
CL
37952016-09-06 Carl Love <cel@us.ibm.com>
3796
3797 * server.c (start_inferior): Do not call
3798 function target_post_create_inferior () if the
3799 inferior process has already exited.
3800
cf6de44d
PA
38012016-09-05 Pedro Alves <palves@redhat.com>
3802
3803 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
3804 (COMPILE.pre, CC_LD): Use CXX directly.
3805 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
3806 * acinclude.m4: Don't include build-with-cxx.m4.
3807 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
3808 * configure: Regenerate.
3809
c1da6748
AT
38102016-09-02 Akash Trehan <akash.trehan123@gmail.com>
3811
3812 PR gdb/19495
3813 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
3814 call writing data to own_buf.
3815
f2b9e3df
SDJ
38162016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
3817
3818 * target.c (mywait): Call target_wait instead of
3819 the_target->wait.
3820 (target_wait): New function.
3821
049a8570
SDJ
38222016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
3823
3824 * server.c (start_inferior): New variable 'ptid'. Replace calls
3825 to the_target->resume by target_continue{,_no_signal}, depending
3826 on the case.
3827 * target.c (target_stop_and_wait): Call target_continue_no_signal
3828 instead of the_target->resume.
3829 (target_continue): New function.
3830
3aa5cfa0
AT
38312016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
3832
3833 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
3834
754653a7
AZ
38352016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
3836
3837 PR server/20491
3838 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
3839 ps_prochandle.
3840 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
3841 * linux-arm-low.c (ps_get_thread_area): Likewise.
3842 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
3843 * linux-m68k-low.c (ps_get_thread_area): Likewise.
3844 * linux-mips-low.c (ps_get_thread_area): Likewise.
3845 * linux-nios2-low.c (ps_get_thread_area): Likewise.
3846 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
3847 * linux-x86-low.c (ps_get_thread_area): Likewise.
3848 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
3849
ed036b40
PA
38502016-08-19 Pedro Alves <palves@redhat.com>
3851
3852 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
3853
c8ef42ee
PA
38542016-08-19 Pedro Alves <palves@redhat.com>
3855
3856 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
3857 comment. Use memcpy instead of casting through unsigned long.
3858
9c235a72
PA
38592016-08-19 Pedro Alves <palves@redhat.com>
3860
3861 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
3862 allocating around 0x80000000.
3863
201506da
PA
38642016-08-19 Pedro Alves <palves@redhat.com>
3865
3866 PR gdb/20415
3867 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
3868 (x32-avx512-linux-ipa.o): New rules.
3869 * configure.ac (x86_64-*-linux*): New x32 check.
3870 * configure.srv (ipa_x32_linux_regobj): New.
3871 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
3872 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
3873 descriptions.
3874 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
3875 descriptions.
3876 * configure: Regenerate.
3877
f348d89a
PA
38782016-08-09 Pedro Alves <palves@redhat.com>
3879
3880 PR gdb/18653
3881 * Makefile.in (OBS): Add signals-state-save-restore.o.
3882 (signals-state-save-restore.o): New rule.
3883 * config.in: Regenerate.
3884 * configure: Regenerate.
3885 * linux-low.c: Include "signals-state-save-restore.h".
3886 (linux_create_inferior): Call
3887 restore_original_signals_state.
3888 * server.c: Include "dispositions-save-restore.h".
3889 (captured_main): Call save_original_signals_state.
3890
1baf5149
PA
38912016-08-05 Pedro Alves <palves@redhat.com>
3892
3893 * configure: Regenerate.
3894
fcd4a73d
YQ
38952016-08-04 Yao Qi <yao.qi@linaro.org>
3896
3897 * linux-low.c (regsets_fetch_inferior_registers): Check
3898 errno is ESRCH or not.
3899
979659d0
YQ
39002016-08-02 Yao Qi <yao.qi@linaro.org>
3901
3902 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
3903 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
3904 (thread_db_load_search): Update.
3905 (try_thread_db_load_1): Don't look for td_ta_event_addr,
3906 td_ta_set_event and td_ta_event_getmsg.
3907
6598661d
PA
39082016-07-26 Pedro Alves <palves@redhat.com>
3909
3910 PR server/20414
3911 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
3912 of unsigned long for 64-bit registers and use uint32_t instead of
3913 unsigned int for 32-bit registers.
3914
9cf12d57
PA
39152016-07-26 Pedro Alves <palves@redhat.com>
3916
3917 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
3918 to 'ptrace'.
3919
305450ed
TT
39202016-07-21 Tom Tromey <tom@tromey.com>
3921
3922 * configure: Rebuild.
3923
2583da7c
YQ
39242016-07-21 Yao Qi <yao.qi@linaro.org>
3925
3926 * mem-break.c (find_gdb_breakpoint): Cast bp to
3927 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
3928
21536b36
YQ
39292016-07-21 Yao Qi <yao.qi@linaro.org>
3930
3931 * server.c (handle_v_requests): Support s and S actions
3932 if target_supports_software_single_step return true.
3933
8901d193
YQ
39342016-07-21 Yao Qi <yao.qi@linaro.org>
3935
3936 * linux-low.c (resume_stopped_resumed_lwps): If resume request
3937 is resume_step, call maybe_hw_step.
3938 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
3939 and unstop them.
3940 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
3941 breakpoints or not.
3942 (proceed_one_lwp): If resume request is resume_step, install
3943 reinsert breakpoints and call maybe_hw_step.
3944
0e9a339e
YQ
39452016-07-21 Yao Qi <yao.qi@linaro.org>
3946
3947 * linux-low.c (proceed_one_lwp): Declare.
3948 (linux_resume_one_thread): Remove local variable 'step'.
3949 Lift code enqueue signal. Call proceed_one_lwp instead of
3950 linux_resume_one_lwp.
3951
4281b351
YQ
39522016-07-21 Yao Qi <yao.qi@linaro.org>
3953
3954 * linux-low.c (linux_resume_one_thread): Call
3955 enqueue_pending_signal.
3956
984a2c04
YQ
39572016-07-21 Yao Qi <yao.qi@linaro.org>
3958
3959 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
3960 * inferiors.c (do_restore_current_thread_cleanup): New function.
3961 (make_cleanup_restore_current_thread): Likewise.
3962 * linux-low.c (install_software_single_step_breakpoints): Call
3963 make_cleanup_restore_current_thread. Switch current_thread to
3964 thread.
3965
bec903c9
YQ
39662016-07-21 Yao Qi <yao.qi@linaro.org>
3967
3968 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
3969 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
3970 (clone_one_breakpoint): Likewise.
3971 (delete_reinsert_breakpoints): Change parameter to thread.
3972 Callers updated.
3973 (has_reinsert_breakpoints): Likewise.
3974 (uninsert_reinsert_breakpoints): Likewise.
3975 (reinsert_reinsert_breakpoints): Likewise.
3976 * mem-break.h (set_reinsert_breakpoint): Update declaration.
3977 (delete_reinsert_breakpoints): Likewise.
3978 (reinsert_reinsert_breakpoints): Likewise.
3979 (uninsert_reinsert_breakpoints): Likewise.
3980 (has_reinsert_breakpoints): Likewise.
3981
63c40ec7
YQ
39822016-07-21 Yao Qi <yao.qi@linaro.org>
3983
3984 * inferiors.c (get_thread_process): Make parameter const.
3985 * inferiors.h (get_thread_process): Update declaration.
3986 * mem-break.c (clone_all_breakpoints): Remove all parameters.
3987 Add new parameters child_thread and parent_thread. Callers
3988 updated.
3989 * mem-break.h (clone_all_breakpoints): Update declaration.
3990
9aa76cd0
YQ
39912016-07-21 Yao Qi <yao.qi@linaro.org>
3992
3993 * mem-break.c (struct breakpoint) <cond_list>: Remove.
3994 <command_list, handler>: Remove.
3995 (struct gdb_breakpoint): New.
3996 (struct other_breakpoint): New.
3997 (struct reinsert_breakpoint): New.
3998 (is_gdb_breakpoint): New function.
3999 (any_persistent_commands): Update command_list if
4000 is_gdb_breakpoint returns true.
4001 (set_breakpoint): Create breakpoints according to their types.
4002 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
4003 (set_gdb_breakpoint_1): Likewise.
4004 (set_gdb_breakpoint): Likewise.
4005 (clear_breakpoint_conditions): Change parameter type to
4006 'struct gdb_breakpoint *'.
4007 (clear_breakpoint_commands): Likewise.
4008 (clear_breakpoint_conditions_and_commands): Likewise.
4009 (add_condition_to_breakpoint): Likewise.
4010 (add_breakpoint_condition): Likewise.
4011 (add_commands_to_breakpoint): Likewise.
4012 (check_breakpoints): Check other_breakpoint.
4013 (clone_one_breakpoint): Clone breakpopint according to its type.
4014 * mem-break.h (struct gdb_breakpoint): Declare.
4015 (set_gdb_breakpoint): Update declaration.
4016 (clear_breakpoint_conditions_and_commands): Likewise.
4017 (add_breakpoint_condition): Likewise.
4018 (add_breakpoint_commands): Likewise.
4019 * server.c (process_point_options): Change parameter type to
4020 'struct gdb_breakpoint *'.
4021
811f8301
YQ
40222016-07-21 Yao Qi <yao.qi@linaro.org>
4023
4024 * mem-break.c (set_breakpoint_at): Rename it to ...
4025 (set_breakpoint_type_at): ... it.
4026 (set_breakpoint_at): Call set_breakpoint_type_at.
4027 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
4028 * mem-break.h (set_breakpoint_at): Update comments.
4029
b1c51e36
CLT
40302016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
4031
4032 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
4033 to buf parameter.
4034 (nios2_store_gregset): Likewise.
4035
ced2dffb
PA
40362016-07-01 Pedro Alves <palves@redhat.com>
4037 Antoine Tremblay <antoine.tremblay@ericsson.com>
4038
4039 * linux-low.c: Change interface to take the target lwp_info
4040 pointer directly and return void. Handle detaching from a zombie
4041 thread.
4042 (linux_detach_lwp_callback): New function.
4043 (linux_detach): Detach from the leader thread after detaching from
4044 the clone threads.
4045
2ac09a5b
YQ
40462016-06-28 Yao Qi <yao.qi@linaro.org>
4047
4048 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
4049 for variable new_offset.
4050 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
4051 (aarch64_ftrace_insn_reloc_cb): Likewise.
4052 (aarch64_ftrace_insn_reloc_tb): Likewise.
4053 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
4054 PRIx64 instead of PRIx32.
4055
79e7fd4f
YQ
40562016-06-28 Yao Qi <yao.qi@linaro.org>
4057
4058 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
4059 (the_low_target): Install arm_get_syscall_trapinfo.
4060
061fc021
YQ
40612016-06-28 Yao Qi <yao.qi@linaro.org>
4062
4063 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
4064 function.
4065 (the_low_target): Install aarch64_get_syscall_trapinfo.
4066
4cc32bec
YQ
40672016-06-28 Yao Qi <yao.qi@linaro.org>
4068
4069 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
4070 Callers updated.
4071 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
4072 Remove parameter sysno.
4073 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
4074 sysret.
4075
782c1122
AA
40762016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
4077
4078 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
4079 (s390_emit_ne_goto): Likewise.
4080 (s390_emit_lt_goto): Likewise.
4081 (s390_emit_le_goto): Likewise.
4082 (s390_emit_gt_goto): Likewise.
4083 (s390_emit_ge_goto): Likewise.
4084 (s390x_emit_eq_goto): Likewise.
4085 (s390x_emit_ne_goto): Likewise.
4086 (s390x_emit_lt_goto): Likewise.
4087 (s390x_emit_le_goto): Likewise.
4088 (s390x_emit_gt_goto): Likewise.
4089 (s390x_emit_ge_goto): Likewise.
4090 (s390_emit_ops_impl): Mark variable static.
4091 (s390x_emit_ops): Likewise.
4092
2e7b624b
YQ
40932016-06-17 Yao Qi <yao.qi@linaro.org>
4094
4095 * linux-low.c (handle_extended_wait): Call
4096 uninsert_reinsert_breakpoints for the parent process. Remove
4097 reinsert breakpoints from the child process. Reinsert them to
4098 the parent process when vfork is done.
4099 * mem-break.c (uninsert_reinsert_breakpoints): New function.
4100 (reinsert_reinsert_breakpoints): New function.
4101 * mem-break.h (uninsert_reinsert_breakpoints): Declare
4102 (reinsert_reinsert_breakpoints): Declare.
4103
8a81c5d7
YQ
41042016-06-17 Yao Qi <yao.qi@linaro.org>
4105
4106 * linux-low.c (handle_extended_wait): If the parent is doing
4107 step-over, remove the reinsert breakpoints from the forked child.
4108
f50bf8e5
YQ
41092016-06-17 Yao Qi <yao.qi@linaro.org>
4110
4111 * linux-low.c (unsuspend_all_lwps): Declare.
4112 (linux_low_filter_event): If thread exited, call finish_step_over.
4113 If step-over is finished, unsuspend other threads.
4114
8376a3cb
YQ
41152016-06-17 Yao Qi <yao.qi@linaro.org>
4116
4117 * linux-low.c (linux_resume_one_lwp_throw): Assert
4118 has_reinsert_breakpoints returns false.
4119 * mem-break.c (delete_disabled_breakpoints): Assert
4120 bp type isn't reinsert_breakpoint.
4121
f79b145d
YQ
41222016-06-17 Yao Qi <yao.qi@linaro.org>
4123
4124 * linux-low.c (maybe_hw_step): New function.
4125 (linux_resume_one_lwp_throw): Call maybe_hw_step.
4126 (finish_step_over): Switch current_thread to lwp temporarily,
4127 and assert has_reinsert_breakpoints returns true.
4128 (proceed_one_lwp): Call maybe_hw_step.
4129 * mem-break.c (has_reinsert_breakpoints): New function.
4130 * mem-break.h (has_reinsert_breakpoints): Declare.
4131
0ae534d2
JT
41322016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
4133
4134 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
4135
fcdad592
YQ
41362016-05-17 Yao Qi <yao.qi@linaro.org>
4137
4138 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
4139 instead of find_inferior.
4140
9e784964
YQ
41412016-05-05 Yao Qi <yao.qi@linaro.org>
4142
4143 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
4144 Initialize res to zero.
4145
cf2ebb6e
YQ
41462016-05-05 Yao Qi <yao.qi@linaro.org>
4147
4148 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
4149 to uint32_t.
4150
c1aebf87
UW
41512016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
4152
4153 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
4154 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
4155 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
4156
35fd2deb 41572016-04-28 Par Olsson <par.olsson@windriver.com>
cbe14bcf 4158 Simon Marchi <simon.marchi@ericsson.com>
35fd2deb
PO
4159
4160 * tracepoint.c (write_inferior_int8): New function.
4161 (cmd_qtenable_disable): Write enable flag using
4162 write_inferior_int8.
4163
484b3c32
YQ
41642016-04-25 Yao Qi <yao.qi@linaro.org>
4165
4166 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
4167 (need_step_over_p): Return zero if the LWP has pending signals
4168 can be delivered on software single step target.
4169
85ba7d86
YQ
41702016-04-25 Yao Qi <yao.qi@linaro.org>
4171
4172 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
4173 return instead of error.
4174
3539aa13
YQ
41752016-04-22 Yao Qi <yao.qi@linaro.org>
4176
4177 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
4178 to 23.
4179
5b061e98
YQ
41802016-04-22 Yao Qi <yao.qi@linaro.org>
4181
4182 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
4183 signal when stepping over breakpoint with software single
4184 step.
4185
3451269c
PA
41862016-04-21 Pedro Alves <palves@redhat.com>
4187
4188 * linux-s390-low.c (s390_collect_ptrace_register)
4189 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
4190 add casts.
4191 (s390_check_regset): Use void * instead of gdb_byte *.
4192
a2358508
PA
41932016-04-20 Pedro Alves <palves@redhat.com>
4194
4195 * configure: Renegerate.
4196
6885166d
YQ
41972016-04-20 Yao Qi <yao.qi@linaro.org>
4198
4199 * linux-aarch32-low.c: Include "arch/arm-linux.h".
4200 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
4201 number 16.
4202 (arm_store_gregset): Likewise.
4203
2b863f51
WT
42042016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
4205
4206 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
4207 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
4208 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
4209 (amd64-avx-mpx-linux.c): New rules.
4210 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
4211 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
4212 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
4213 (srv_amd64_regobj): Add amd64-avx-mpx.o.
4214 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
4215 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
4216 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
4217 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
4218 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
4219 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
4220 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
4221 * linux-x86-low.c (x86_linux_read_description): Add case for
4222 X86_XSTATE_AVX_MPX_MASK.
4223 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
4224 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
4225 init_registers_i386_avx_mpx_linux.
4226 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
4227 (initialize_low_tracepoint): Call
4228 init_registers_i386_avx_mpx_linux.
4229 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
4230 (initialize_low_tracepoint): Call
4231 init_registers_amd64_avx_mpx_linux.
4232 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
4233 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
4234 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
4235 declarations.
4236
9b30624b
PA
42372016-04-18 Pedro Alves <palves@redhat.com>
4238
4239 * configure: Regenerate.
4240
45e3745e
AT
42412016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
4242
4243 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
4244 (aarch64_emit_sub): Likewise.
4245
2afc13ff
PA
42462016-04-12 Pedro Alves <palves@redhat.com>
4247
4248 * utils.c (prepare_to_throw_exception): Delete.
4249
6e774b13
SM
42502016-04-05 Simon Marchi <simon.marchi@ericsson.com>
4251
4252 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
4253
4dca19f8
MK
42542016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
4255
4256 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
4257
d0a9981f
MK
42582016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
4259
4260 * linux-aarch64-ipa.c: Add <elf.h> include.
4261 * linux-ppc-ipa.c: Add <elf.h> include.
4262 * linux-s390-ipa.c: Add <elf.h> include.
4263
252db07e
MK
42642016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
4265
4266 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
4267 (get_raw_reg_ptr): Likewise.
4268 (get_trace_state_variable_value_ptr): Likewise.
4269 (set_trace_state_variable_value_ptr): Likewise.
4270 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
4271 char *.
4272
14e2b6d9
MK
42732016-03-31 Wei-cheng Wang <cole945@gmail.com>
4274 Marcin Kościelnicki <koriakin@0x04.net>
4275
4276 PR/17221
4277 * linux-ppc-low.c (emit_insns): New function.
4278 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
4279 (ppc_emit_prologue): New function.
4280 (ppc_emit_epilogue): New function.
4281 (ppc_emit_add): New function.
4282 (ppc_emit_sub): New function.
4283 (ppc_emit_mul): New function.
4284 (ppc_emit_lsh): New function.
4285 (ppc_emit_rsh_signed): New function.
4286 (ppc_emit_rsh_unsigned): New function.
4287 (ppc_emit_ext): New function.
4288 (ppc_emit_zero_ext): New function.
4289 (ppc_emit_log_not): New function.
4290 (ppc_emit_bit_and): New function.
4291 (ppc_emit_bit_or): New function.
4292 (ppc_emit_bit_xor): New function.
4293 (ppc_emit_bit_not): New function.
4294 (ppc_emit_equal): New function.
4295 (ppc_emit_less_signed): New function.
4296 (ppc_emit_less_unsigned): New function.
4297 (ppc_emit_ref): New function.
4298 (ppc_emit_const): New function.
4299 (ppc_emit_reg): New function.
4300 (ppc_emit_pop): New function.
4301 (ppc_emit_stack_flush): New function.
4302 (ppc_emit_swap): New function.
4303 (ppc_emit_stack_adjust): New function.
4304 (ppc_emit_call): New function.
4305 (ppc_emit_int_call_1): New function.
4306 (ppc_emit_void_call_2): New function.
4307 (ppc_emit_if_goto): New function.
4308 (ppc_emit_goto): New function.
4309 (ppc_emit_eq_goto): New function.
4310 (ppc_emit_ne_goto): New function.
4311 (ppc_emit_lt_goto): New function.
4312 (ppc_emit_le_goto): New function.
4313 (ppc_emit_gt_goto): New function.
4314 (ppc_emit_ge_goto): New function.
4315 (ppc_write_goto_address): New function.
4316 (ppc_emit_ops_impl): New static variable.
4317 (ppc64v1_emit_prologue): New function.
4318 (ppc64v2_emit_prologue): New function.
4319 (ppc64_emit_epilogue): New function.
4320 (ppc64_emit_add): New function.
4321 (ppc64_emit_sub): New function.
4322 (ppc64_emit_mul): New function.
4323 (ppc64_emit_lsh): New function.
4324 (ppc64_emit_rsh_signed): New function.
4325 (ppc64_emit_rsh_unsigned): New function.
4326 (ppc64_emit_ext): New function.
4327 (ppc64_emit_zero_ext): New function.
4328 (ppc64_emit_log_not): New function.
4329 (ppc64_emit_bit_and): New function.
4330 (ppc64_emit_bit_or): New function.
4331 (ppc64_emit_bit_xor): New function.
4332 (ppc64_emit_bit_not): New function.
4333 (ppc64_emit_equal): New function.
4334 (ppc64_emit_less_signed): New function.
4335 (ppc64_emit_less_unsigned): New function.
4336 (ppc64_emit_ref): New function.
4337 (ppc64_emit_const): New function.
4338 (ppc64v1_emit_reg): New function.
4339 (ppc64v2_emit_reg): New function.
4340 (ppc64_emit_pop): New function.
4341 (ppc64_emit_stack_flush): New function.
4342 (ppc64_emit_swap): New function.
4343 (ppc64v1_emit_call): New function.
4344 (ppc64v2_emit_call): New function.
4345 (ppc64v1_emit_int_call_1): New function.
4346 (ppc64v2_emit_int_call_1): New function.
4347 (ppc64v1_emit_void_call_2): New function.
4348 (ppc64v2_emit_void_call_2): New function.
4349 (ppc64_emit_if_goto): New function.
4350 (ppc64_emit_eq_goto): New function.
4351 (ppc64_emit_ne_goto): New function.
4352 (ppc64_emit_lt_goto): New function.
4353 (ppc64_emit_le_goto): New function.
4354 (ppc64_emit_gt_goto): New function.
4355 (ppc64_emit_ge_goto): New function.
4356 (ppc64v1_emit_ops_impl): New static variable.
4357 (ppc64v2_emit_ops_impl): New static variable.
4358 (ppc_emit_ops): New function.
4359 (linux_low_target): Wire in ppc_emit_ops.
4360
a2174ba4
MK
43612016-03-31 Wei-cheng Wang <cole945@gmail.com>
4362 Marcin Kościelnicki <koriakin@0x04.net>
4363
4364 PR/17221
4365 * Makefile.in: Add powerpc-*-ipa.o
4366 * configure.srv: Add ipa_obj for powerpc*-linux.
4367 * linux-ppc-ipa.c: New file.
4368 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
4369 includes.
4370 (PPC_FIELD): New macro.
4371 (PPC_SEXT): New macro.
4372 (PPC_OP6): New macro.
4373 (PPC_BO): New macro.
4374 (PPC_LI): New macro.
4375 (PPC_BD): New macro.
4376 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
4377 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
4378 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
4379 (ppc_get_thread_area): New function.
4380 (is_elfv2_inferior): New function.
4381 (gen_ds_form): New function.
4382 (GEN_STD): New macro.
4383 (GEN_STDU): New macro.
4384 (GEN_LD): New macro.
4385 (GEN_LDU): New macro.
4386 (gen_d_form): New function.
4387 (GEN_ADDI): New macro.
4388 (GEN_ADDIS): New macro.
4389 (GEN_LI): New macro.
4390 (GEN_LIS): New macro.
4391 (GEN_ORI): New macro.
4392 (GEN_ORIS): New macro.
4393 (GEN_LWZ): New macro.
4394 (GEN_STW): New macro.
4395 (GEN_STWU): New macro.
4396 (gen_xfx_form): New function.
4397 (GEN_MFSPR): New macro.
4398 (GEN_MTSPR): New macro.
4399 (GEN_MFCR): New macro.
4400 (GEN_MTCR): New macro.
4401 (GEN_SYNC): New macro.
4402 (GEN_LWSYNC): New macro.
4403 (gen_x_form): New function.
4404 (GEN_OR): New macro.
4405 (GEN_MR): New macro.
4406 (GEN_LWARX): New macro.
4407 (GEN_STWCX): New macro.
4408 (GEN_CMPW): New macro.
4409 (gen_md_form): New function.
4410 (GEN_RLDICL): New macro.
4411 (GEN_RLDICR): New macro.
4412 (gen_i_form): New function.
4413 (GEN_B): New macro.
4414 (GEN_BL): New macro.
4415 (gen_b_form): New function.
4416 (GEN_BNE): New macro.
4417 (GEN_LOAD): New macro.
4418 (GEN_STORE): New macro.
4419 (gen_limm): New function.
4420 (gen_atomic_xchg): New function.
4421 (gen_call): New function.
4422 (ppc_relocate_instruction): New function.
4423 (ppc_install_fast_tracepoint_jump_pad): New function.
4424 (ppc_get_min_fast_tracepoint_insn_len): New function.
4425 (ppc_get_ipa_tdesc_idx): New function.
4426 (the_low_target): Wire in the new functions.
4427 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
4428 tdescs.
4429 * linux-ppc-tdesc.h: New file.
4430
a13c4696
MK
44312016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
4432
4433 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
4434 (alloc_jump_pad_buffer): New function.
4435 * linux-amd64-ipa.c: Add <sys/mman.h> include.
4436 (alloc_jump_pad_buffer): New function.
4437 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
4438 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
4439 (alloc_jump_pad_buffer): New function.
4440 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
4441 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
4442 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
4443 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
4444
1cda1512
MK
44452016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
4446
4447 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
4448 * linux-amd64-ipa.c: Likewise.
4449 * linux-i386-ipa.c: Likewise.
4450 * linux-s390-ipa.c: Likewise.
4451 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
4452 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
4453 set_trace_state_variable_value_ptr.
4454 (struct ipa_sym_addresses): Likewise.
4455 (symbol_list): Likewise.
4456 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
4457 accessing gdb_collect directly.
4458 (gdb_collect_ptr_type): New typedef.
4459 (get_raw_reg_ptr_type): New typedef.
4460 (get_trace_state_variable_value_ptr_type): New typedef.
4461 (set_trace_state_variable_value_ptr_type): New typedef.
4462 (gdb_collect_ptr): New global.
4463 (get_raw_reg_ptr): New global.
4464 (get_trace_state_variable_value_ptr): New global.
4465 (set_trace_state_variable_value_ptr): New global.
4466 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
4467 accessing get_raw_reg directly.
4468 (get_get_tsv_func_addr): Likewise for
4469 get_trace_state_variable_value_ptr.
4470 (get_set_tsv_func_addr): Likewise for
4471 set_trace_state_variable_value_ptr.
4472 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
4473
72fb5488
SM
44742016-03-30 Simon Marchi <simon.marchi@ericsson.com>
4475
4476 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
4477
28170b88
MK
44782016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
4479
4480 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
4481 packets.
4482 (relocate_instruction): Remove own_buf.
4483 * server.c (own_buf): Make global.
4484 (handle_v_requests): Make global.
4485 * server.h (own_buf): New declaration.
4486 (handle_v_requests): New prototype.
4487
f39e8743
MK
44882016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
4489
4490 PR 18377
4491 * linux-s390-low.c (add_insns): New function.
4492 (s390_emit_prologue): New function.
4493 (s390_emit_epilogue): New function.
4494 (s390_emit_add): New function.
4495 (s390_emit_sub): New function.
4496 (s390_emit_mul): New function.
4497 (s390_emit_lsh): New function.
4498 (s390_emit_rsh_signed): New function.
4499 (s390_emit_rsh_unsigned): New function.
4500 (s390_emit_ext): New function.
4501 (s390_emit_log_not): New function.
4502 (s390_emit_bit_and): New function.
4503 (s390_emit_bit_or): New function.
4504 (s390_emit_bit_xor): New function.
4505 (s390_emit_bit_not): New function.
4506 (s390_emit_equal): New function.
4507 (s390_emit_less_signed): New function.
4508 (s390_emit_less_unsigned): New function.
4509 (s390_emit_ref): New function.
4510 (s390_emit_if_goto): New function.
4511 (s390_emit_goto): New function.
4512 (s390_write_goto_address): New function.
4513 (s390_emit_litpool): New function.
4514 (s390_emit_const): New function.
4515 (s390_emit_call): New function.
4516 (s390_emit_reg): New function.
4517 (s390_emit_pop): New function.
4518 (s390_emit_stack_flush): New function.
4519 (s390_emit_zero_ext): New function.
4520 (s390_emit_swap): New function.
4521 (s390_emit_stack_adjust): New function.
4522 (s390_emit_set_r2): New function.
4523 (s390_emit_int_call_1): New function.
4524 (s390_emit_void_call_2): New function.
4525 (s390_emit_eq_goto): New function.
4526 (s390_emit_ne_goto): New function.
4527 (s390_emit_lt_goto): New function.
4528 (s390_emit_le_goto): New function.
4529 (s390_emit_gt_goto): New function.
4530 (s390_emit_ge_goto): New function.
4531 (s390x_emit_prologue): New function.
4532 (s390x_emit_epilogue): New function.
4533 (s390x_emit_add): New function.
4534 (s390x_emit_sub): New function.
4535 (s390x_emit_mul): New function.
4536 (s390x_emit_lsh): New function.
4537 (s390x_emit_rsh_signed): New function.
4538 (s390x_emit_rsh_unsigned): New function.
4539 (s390x_emit_ext): New function.
4540 (s390x_emit_log_not): New function.
4541 (s390x_emit_bit_and): New function.
4542 (s390x_emit_bit_or): New function.
4543 (s390x_emit_bit_xor): New function.
4544 (s390x_emit_bit_not): New function.
4545 (s390x_emit_equal): New function.
4546 (s390x_emit_less_signed): New function.
4547 (s390x_emit_less_unsigned): New function.
4548 (s390x_emit_ref): New function.
4549 (s390x_emit_if_goto): New function.
4550 (s390x_emit_const): New function.
4551 (s390x_emit_call): New function.
4552 (s390x_emit_reg): New function.
4553 (s390x_emit_pop): New function.
4554 (s390x_emit_stack_flush): New function.
4555 (s390x_emit_zero_ext): New function.
4556 (s390x_emit_swap): New function.
4557 (s390x_emit_stack_adjust): New function.
4558 (s390x_emit_int_call_1): New function.
4559 (s390x_emit_void_call_2): New function.
4560 (s390x_emit_eq_goto): New function.
4561 (s390x_emit_ne_goto): New function.
4562 (s390x_emit_lt_goto): New function.
4563 (s390x_emit_le_goto): New function.
4564 (s390x_emit_gt_goto): New function.
4565 (s390x_emit_ge_goto): New function.
4566 (s390_emit_ops): New function.
4567 (struct linux_target_ops): Fill in emit_ops hook.
4568
abd9baf9
MK
45692016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
4570
4571 PR 18377
4572 * Makefile.in: Add s390 IPA files.
4573 * configure.srv: Build IPA for s390.
4574 * linux-s390-ipa.c: New file.
4575 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
4576 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
4577 (tdesc_s390_linux32): Likewise.
4578 (init_registers_s390_linux32v1): Likewise.
4579 (tdesc_s390_linux32v1): Likewise.
4580 (init_registers_s390_linux32v2): Likewise.
4581 (tdesc_s390_linux32v2): Likewise.
4582 (init_registers_s390_linux64): Likewise.
4583 (tdesc_s390_linux64): Likewise.
4584 (init_registers_s390_linux64v1): Likewise.
4585 (tdesc_s390_linux64v1): Likewise.
4586 (init_registers_s390_linux64v2): Likewise.
4587 (tdesc_s390_linux64v2): Likewise.
4588 (init_registers_s390_te_linux64): Likewise.
4589 (tdesc_s390_te_linux64): Likewise.
4590 (init_registers_s390_vx_linux64): Likewise.
4591 (tdesc_s390_vx_linux64): Likewise.
4592 (init_registers_s390_tevx_linux64): Likewise.
4593 (tdesc_s390_tevx_linux64): Likewise.
4594 (init_registers_s390x_linux64): Likewise.
4595 (tdesc_s390x_linux64): Likewise.
4596 (init_registers_s390x_linux64v1): Likewise.
4597 (tdesc_s390x_linux64v1): Likewise.
4598 (init_registers_s390x_linux64v2): Likewise.
4599 (tdesc_s390x_linux64v2): Likewise.
4600 (init_registers_s390x_te_linux64): Likewise.
4601 (tdesc_s390x_te_linux64): Likewise.
4602 (init_registers_s390x_vx_linux64): Likewise.
4603 (tdesc_s390x_vx_linux64): Likewise.
4604 (init_registers_s390x_tevx_linux64): Likewise.
4605 (tdesc_s390x_tevx_linux64): Likewise.
4606 (have_hwcap_s390_vx): New static variable.
4607 (s390_arch_setup): Fill have_hwcap_s390_vx.
4608 (s390_get_thread_area): New function.
4609 (s390_ft_entry_gpr_esa): New const.
4610 (s390_ft_entry_gpr_zarch): New const.
4611 (s390_ft_entry_misc): New const.
4612 (s390_ft_entry_fr): New const.
4613 (s390_ft_entry_vr): New const.
4614 (s390_ft_main_31): New const.
4615 (s390_ft_main_64): New const.
4616 (s390_ft_exit_fr): New const.
4617 (s390_ft_exit_vr): New const.
4618 (s390_ft_exit_misc): New const.
4619 (s390_ft_exit_gpr_esa): New const.
4620 (s390_ft_exit_gpr_zarch): New const.
4621 (append_insns): New function.
4622 (s390_relocate_instruction): New function.
4623 (s390_install_fast_tracepoint_jump_pad): New function.
4624 (s390_get_min_fast_tracepoint_insn_len): New function.
4625 (s390_get_ipa_tdesc_idx): New function.
4626 (struct linux_target_ops): Wire in the above functions.
4627 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
4628 * linux-s390-tdesc.h: New file.
4629
a4105d04
MK
46302016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
4631
4632 * linux-s390-low.c (s390_supports_tracepoints): New function.
4633 (struct linux_target_ops): Fill supports_tracepoints hook.
4634
35ac8b3e
YQ
46352016-03-18 Yao Qi <yao.qi@linaro.org>
4636
4637 * linux-low.c (lwp_signal_can_be_delivered): New function.
4638 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
4639
94610ec4
YQ
46402016-03-18 Yao Qi <yao.qi@linaro.org>
4641
4642 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
4643 0 if signal is enqueued. Remove 'signal' from one debugging
4644 message. Move one debugging message to some lines below.
4645 Remove code setting 'signal' to 0.
4646
80aea927
YQ
46472016-03-18 Yao Qi <yao.qi@linaro.org>
4648
4649 * linux-low.c (linux_low_filter_event): Remove redundant
4650 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
4651
b04fd3be
MK
46522016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
4653
4654 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
4655 (struct linux_target_ops): Wire in the above.
4656
c40c8d4b
YQ
46572016-03-03 Yao Qi <yao.qi@linaro.org>
4658
4659 * linux-low.c: Update comments to start_step_over.
4660
0f8288ae
YQ
46612016-03-03 Yao Qi <yao.qi@linaro.org>
4662
4663 PR server/19736
4664 * linux-low.c (handle_extended_wait): Set child suspended
4665 if event_lwp->bp_reinsert isn't zero.
4666
fdbd04a8
YQ
46672016-03-02 Yao Qi <yao.qi@linaro.org>
4668
4669 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
4670 enqueue_pending_signal.
4671
6896a8fa
MK
46722016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
4673
4674 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
4675 is actually loaded.
4676
ab503087
MK
46772016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
4678
4679 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
4680 (s390_regmap_3264) [!__s390x__]: New global.
4681 (s390_collect_ptrace_register): Skip map entries containing -1.
4682 (s390_supply_ptrace_register): Ditto.
4683 (s390_fill_gprs_high): New function.
4684 (s390_store_gprs_high): New function.
4685 (s390_regsets): Add NT_S390_HIGH_GPRS.
4686 (s390_get_hwcap): Enable on 31-bit.
4687 (have_hwcap_s390_high_gprs): Enable on 31-bit.
4688 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
4689 Detect NT_S390_HIGH_GPRS.
4690 (s390_usrregs_info_3264): Enable on 31-bit.
4691 (s390_regs_info): Enable regs_info_3264 on 31-bit.
4692 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
4693
ae91f625
MK
46942016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
4695
4696 PR gdb/13808
4697 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
4698 * configure.srv: Ditto.
4699 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
4700 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
4701 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
4702 (init_registers_amd64_linux): Remove prototype.
4703 (tdesc_amd64_linux): Remove declaration.
4704 (get_ipa_tdesc): New function.
4705 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
4706 initialize remaining tdescs.
4707 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
4708 (init_registers_i386_linux): Remove prototype.
4709 (tdesc_i386_linux): Remove declaration.
4710 (get_ipa_tdesc): New function.
4711 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
4712 initialize remaining tdescs.
4713 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
4714 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
4715 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
4716 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
4717 (x86_get_ipa_tdesc_idx): New function.
4718 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
4719 * linux-x86-tdesc.h: New file.
4720 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
4721 (target_get_ipa_tdesc_idx): New macro.
4722 * tracepoint.c (ipa_tdesc_idx): New macro.
4723 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
4724 (symbol_list): Add ipa_tdesc_idx.
4725 (cmd_qtstart): Write ipa_tdesc_idx in the target.
4726 (ipa_tdesc): Remove.
4727 (ipa_tdesc_idx): New variable.
4728 (get_context_regcache): Use get_ipa_tdesc.
4729 (gdb_collect): Ditto.
4730 (gdb_probe): Ditto.
4731 * tracepoint.h (get_ipa_tdesc): New prototype.
4732 (ipa_tdesc): Remove.
4733
e7ad2f14
PA
47342016-02-24 Pedro Alves <palves@redhat.com>
4735
4736 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
4737 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
4738 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
4739 Factor out common code between the USE_SIGTRAP_SIGINFO and
4740 !USE_SIGTRAP_SIGINFO blocks.
4741 (linux_low_filter_event): Call save_stop_reason instead of
4742 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
4743 Update comments.
4744 (linux_wait_1): Update comments.
4745
657f9cde
WW
47462016-02-24 Wei-cheng Wang <cole945@gmail.com>
4747
4748 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
4749 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
4750 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
4751 ppc_insert_point, ppc_remove_point.
4752
b00b61e1
MK
47532016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
4754
4755 * linux-s390-low.c (s390_supports_z_point_type): New function.
4756 (struct linux_target_ops): Wire s390_supports_z_point_type in.
4757
553cb527
YQ
47582016-02-16 Yao Qi <yao.qi@linaro.org>
4759
4760 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
4761 PC. Get pc from regcache_read_pc.
4762
a5652c21
YQ
47632016-02-12 Yao Qi <yao.qi@linaro.org>
4764
4765 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
4766 or linux_get_pc_32bit.
4767 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
4768
ed443b61
YQ
47692016-02-12 Yao Qi <yao.qi@linaro.org>
4770
4771 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
4772 arm_linux_get_next_pcs_fixup.
4773
020ecd38
MK
47742016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
4775
4776 * tracepoint.c (x_tracepoint_action_download): Change
4777 write_inferior_data_ptr to write_inferior_data_pointer.
4778 (cmd_qtstart): Likewise.
4779 (write_inferior_data_ptr): Remove.
4780 (download_agent_expr): Change write_inferior_data_ptr to
4781 write_inferior_data_pointer.
4782 (download_tracepoint_1): Likewise.
4783 (download_tracepoint): Likewise.
4784 (download_trace_state_variables): Likewise.
4785
7cae9051
WW
47862016-02-11 Wei-cheng Wang <cole945@gmail.com>
4787 Marcin Kościelnicki <koriakin@0x04.net>
4788
4789 * tracepoint.c (struct tracepoint_action_ops): Remove.
4790 (struct tracepoint_action): Remove ops.
4791 (m_tracepoint_action_download, r_tracepoint_action_download)
4792 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
4793 size and offset accordingly.
4794 (m_tracepoint_action_ops, r_tracepoint_action_ops)
4795 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
4796 (tracepoint_action_send, tracepoint_action_download): New functions.
4797 Helpers for trace action handlers.
4798 (add_tracepoint_action): Remove setup actions ops.
4799 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
4800
9f6a71b4
YQ
48012016-02-10 Yao Qi <yao.qi@linaro.org>
4802
4803 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
4804
1e94266c
SM
48052016-02-09 Simon Marchi <simon.marchi@ericsson.com>
4806
4807 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
4808 to AC_OUTPUT.
4809 * configure: Regenerate.
4810
8adce034
SM
48112016-02-09 Simon Marchi <simon.marchi@ericsson.com>
4812
4813 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
4814 void * to gdb_byte *.
4815 * linux-low.c (siginfo_fixup): Likewise.
4816 (linux_xfer_siginfo): Likewise.
4817 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
4818 Likewise.
4819 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
4820
93813b37
WT
48212016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
4822
4823 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
4824 to srv_tgtobj.
4825 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
4826 to srv_tgtobj.
4827 * linux-x86-low.c [__x86_64__]: Include
4828 "nat/amd64-linux-siginfo.h".
4829 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
4830 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
4831 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
4832 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
4833 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
4834 (cpt_si_fd, si_timerid, si_overrun): Move from
4835 nat/amd64-linux-siginfo.c.
4836 * Makefile.in (amd64-linux-siginfo.o:): New rule.
4837
8424cc97
SM
48382016-01-28 Simon Marchi <simon.marchi@ericsson.com>
4839
4840 * server.c (skip_to_semicolon): Remove.
4841 (process_point_options): Use strchrnul instead of
4842 skip_to_semicolon.
4843
4d18591b
YQ
48442016-01-26 Yao Qi <yao.qi@linaro.org>
4845
4846 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
4847 * linux-low.c (install_software_single_step_breakpoints): Don't
4848 call regcache_read_pc.
4849 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
4850 argument pc.
4851
d8020970
YQ
48522016-01-26 Yao Qi <yao.qi@linaro.org>
4853
4854 * linux-low.c (install_software_single_step_breakpoints): Call
4855 regcache_read_pc instead of get_pc.
4856
8b207339
YQ
48572016-01-26 Yao Qi <yao.qi@linaro.org>
4858
4859 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
4860 (unblock_async_io): Rename to ...
4861 (block_unblock_async_io): ... it. New function.
4862 (enable_async_io): Don't install SIGIO handler. Unblock it
4863 instead.
4864 (disable_async_io): Don't ignore SIGIO. Block it instead.
4865 (initialize_async_io): Install SIGIO handler. Don't call
4866 unblock_async_io.
4867
18879fef
YQ
48682016-01-26 Yao Qi <yao.qi@linaro.org>
4869
4870 * remote-utils.c (getpkt): If the buffer isn't empty, and the
4871 first character is '\003', call *the_target->request_interrupt.
4872
a0f8e08a
YQ
48732016-01-25 Yao Qi <yao.qi@linaro.org>
4874
4875 * remote-utils.c (new_thread_notify): Remove.
4876 (dead_thread_notify): Likewise.
4877 * remote-utils.h (new_thread_notify): Remove declaration.
4878 (dead_thread_notify): Likewise.
4879
cc5fd9ab
MK
48802016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
4881
4882 * gdb.trace/pending.exp: Fix expected message on continue.
4883
99e8eb11
MK
48842016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
4885
4886 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
4887 it works properly on big-endian machines where sizeof (CORE_ADDR)
4888 != sizeof (void *).
4889
a994041d
PA
48902016-01-21 Pedro Alves <palves@redhat.com>
4891
4892 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
4893 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
4894 * configure: Regenerate.
4895
f7a6a40d
YQ
48962016-01-21 Yao Qi <yao.qi@linaro.org>
4897
4898 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
4899 is_thumb and set it according to CPSR saved on the stack.
4900 (get_next_pcs_syscall_next_pc): Pass is_thumb to
4901 arm_sigreturn_next_pc.
4902
6f69e520
YQ
49032016-01-18 Yao Qi <yao.qi@linaro.org>
4904
4905 * linux-low.c (linux_set_pc_64bit): New function.
4906 (linux_get_pc_64bit): New function.
4907 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
4908 Declare.
4909 * linux-sparc-low.c (debug_threads): Remove declaration.
4910 (sparc_get_pc): Remove.
4911 (the_low_target): Use linux_get_pc_64bit instead of
4912 sparc_get_pc.
4913 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
4914 (the_low_target): Use linux_get_pc_64bit and
4915 linux_set_pc_64bit.
4916
276d4552
YQ
49172016-01-18 Yao Qi <yao.qi@linaro.org>
4918
4919 * linux-arm-low.c (debug_threads): Remove declaration.
4920 (arm_get_pc, arm_set_pc): Remove.
4921 (the_low_target): Use linux_get_pc_32bit and
4922 linux_set_pc_32bit.
4923 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
4924 (the_low_target): Use linux_get_pc_32bit and
4925 linux_set_pc_32bit.
4926 * linux-cris-low.c (debug_threads): Remove declaration.
4927 (cris_get_pc, cris_set_pc,): Remove.
4928 (the_low_target): Use linux_get_pc_32bit and
4929 linux_set_pc_32bit.
4930 * linux-crisv32-low.c (debug_threads): Remove declaration.
4931 (cris_get_pc, cris_set_pc): Remove.
4932 (the_low_target): Use linux_get_pc_32bit and
4933 linux_set_pc_32bit.
4934 * linux-low.c: Include inttypes.h.
4935 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
4936 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
4937 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
4938 (the_low_target): Use linux_get_pc_32bit and
4939 linux_set_pc_32bit.
4940 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
4941 (the_low_target): Use linux_get_pc_32bit and
4942 linux_set_pc_32bit.
4943 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
4944 (the_low_target): Use linux_get_pc_32bit and
4945 linux_set_pc_32bit.
4946 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
4947 (the_low_target): Use linux_get_pc_32bit and
4948 linux_set_pc_32bit.
4949 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
4950 (the_low_target): Use linux_get_pc_32bit and
4951 linux_set_pc_32bit.
4952
eb0edac8
GB
49532016-01-18 Gary Benson <gbenson@redhat.com>
4954
4955 * configure.ac (AC_FUNC_FORK): New check.
4956 * config.in: Regenerate.
4957 * configure: Likewise.
4958
1b451dda
YQ
49592016-01-14 Yao Qi <yao.qi@linaro.org>
4960
4961 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
4962 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
4963 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
4964 arm_get_next_pcs_ctor.
4965
82075af2
JS
49662016-01-12 Josh Stone <jistone@redhat.com>
4967 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4968
4969 * inferiors.h: Include "gdb_vecs.h".
4970 (struct process_info): Add syscalls_to_catch.
4971 * inferiors.c (remove_process): Free syscalls_to_catch.
4972 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
4973 syscall_return stops.
4974 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
4975 * server.c (handle_general_set): Handle QCatchSyscalls.
4976 (handle_query): Report support for QCatchSyscalls.
4977 * target.h (struct target_ops): Add supports_catch_syscall.
4978 (target_supports_catch_syscall): New macro.
4979 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
4980 (struct lwp_info): Add syscall_state.
4981 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
4982 Maintain syscall_state and syscalls_to_catch across exec.
4983 (get_syscall_trapinfo): New function, proxy to the_low_target.
4984 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
4985 (linux_low_filter_event): Toggle syscall_state entry/return for
4986 syscall traps, and set it ignored for all others.
4987 (gdb_catching_syscalls_p): New function.
4988 (gdb_catch_this_syscall_p): New function.
4989 (linux_wait_1): Handle SYSCALL_SIGTRAP.
4990 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
4991 (linux_supports_catch_syscall): New function.
4992 (linux_target_ops): Install it.
4993 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
4994 (the_low_target): Install it.
4995
8f13a3ce
MF
49962016-01-12 Mike Frysinger <vapier@gentoo.org>
4997
4998 * acinclude.m4: Include new ../warning.m4 file.
4999 * configure: Regenerated.
5000 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
5001
5b3da067
MF
50022016-01-12 Mike Frysinger <vapier@gentoo.org>
5003
5004 * ax.c (is_goto_target): Mark static.
5005 * linux-low.c (register_addr): Likewise.
5006 (linux_fetch_registers, linux_store_registers): Likewise.
5007 * mem-break.c (any_persistent_commands): Fix old prototype.
5008 (add_commands_to_breakpoint): Mark static.
5009 * regcache.c (find_register_by_name): Delete unused func.
5010 * remote-utils.c (hex_or_minus_one): Mark static.
5011 * server.c (monitor_show_help): Mark static.
5012 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
5013 handle_v_requests): Likewise.
5014
bc504a31
PA
50152016-01-12 Pedro Alves <palves@redhat.com>
5016
5017 Remove use of the registered trademark symbol throughout.
5018
5a0dd67a
YQ
50192016-01-08 Yao Qi <yao.qi@linaro.org>
5020
5021 * remote-utils.c (getpkt): If c is '\003', call target hook
5022 request_interrupt.
5023
b2ca446f
YQ
50242016-01-06 Yao Qi <yao.qi@linaro.org>
5025
5026 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
5027 linux-aarch32-low.c.
5028 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
5029 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
5030 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
5031 (thumb2_breakpoint): Declare.
5032 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
5033 linux-aarch32-low.h.
5034 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
5035 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
5036 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
5037
edd88788
JB
50382016-01-01 Joel Brobecker <brobecker@adacore.com>
5039
5040 * gdbreplay.c (gdbreplay_version): Change copyright year in
5041 version message.
5042 * server.c (gdbserver_version): Likewise.
5043
65da7f14
PP
50442015-12-28 Patrick Palka <patrick@parcs.ath.cx>
5045
5046 * server.c (crc32_table): Delete.
5047 (crc32): Use libiberty's xcrc32 function.
5048
4abd5ed2
JB
50492015-12-22 Joel Brobecker <brobecker@adacore.com>
5050
5051 * lynx-low.c (lynx_delete_thread_callback): New function.
5052 (lynx_mourn): Properly delete our process and all of its
5053 threads. Remove call to clear_inferiors.
5054
0e50fe5c
JB
50552015-12-22 Joel Brobecker <brobecker@adacore.com>
5056
5057 * target.c (thread_search_callback): Add check that
5058 the thread_stopped target callback is not NULL before
5059 calling it.
5060
35adc03f
YQ
50612015-12-21 Yao Qi <yao.qi@linaro.org>
5062
5063 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
5064 arm breakpoint.
5065
bd2b2909
AT
50662015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
5067
5068 * server.c (handle_query): Call target_supports_software_single_step.
5069
7fe5e27e
AT
50702015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
5071
5072 * linux-low.c (single_step): New function.
5073 (linux_resume_one_lwp_throw): Call single_step.
5074 (start_step_over): Likewise.
5075
d9311bfa
AT
50762015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
5077
5078 * Makefile.in (SFILES): Append arch/arm-linux.c,
5079 arch/arm-get-next-pcs.c.
5080 (arm-linux.o): New rule.
5081 (arm-get-next-pcs.o): New rule.
5082 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
5083 arm-linux.o.
5084 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
5085 to linux-aarch32-low.c.
5086 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
5087 (arm_breakpoint_len, thumb_breakpoint): Likewise.
5088 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
5089 (thumb2_breakpoint_len): Likewise.
5090 (arm_is_thumb_mode): Make non-static.
5091 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
5092 from linux-aarch32-low.c.
5093 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
5094 (arm_breakpoint_len, thumb_breakpoint): Likewise.
5095 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
5096 (thumb2_breakpoint_len): Likewise.
5097 (arm_is_thumb_mode): New declaration.
5098 * linux-arm-low.c: Include arch/arm-linux.h
5099 aarch/arm-get-next-pcs.h, sys/syscall.h.
5100 (get_next_pcs_ops): New struct.
5101 (get_next_pcs_addr_bits_remove): New function.
5102 (get_next_pcs_is_thumb): New function.
5103 (get_next_pcs_read_memory_unsigned_integer): Likewise.
5104 (arm_sigreturn_next_pc): Likewise.
5105 (get_next_pcs_syscall_next_pc): Likewise.
5106 (arm_gdbserver_get_next_pcs): Likewise.
5107 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
5108 Initialize.
5109 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
5110 * server.h: Include gdb_vecs.h.
5111
68ce2059
AT
51122015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
5113
5114 * Makefile.in (SFILES): Append common/common-regcache.c.
5115 (OBS): Append common-regcache.o.
5116 (common-regcache.o): New rule.
5117 * regcache.c (init_register_cache): Initialize cache to
5118 REG_UNAVAILABLE.
5119 (regcache_raw_read_unsigned): New function.
5120 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
5121 register_status enum.
5122
fa5308bd
AT
51232015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
5124
5125 * linux-aarch64-low.c (the_low_targets): Rename
5126 breakpoint_reinsert_addr to get_next_pcs.
5127 * linux-arm-low.c (the_low_targets): Likewise.
5128 * linux-bfin-low.c (the_low_targets): Likewise.
5129 * linux-cris-low.c (the_low_targets): Likewise.
5130 * linux-crisv32-low.c (the_low_targets): Likewise.
5131 * linux-low.c (can_software_single_step): Likewise.
5132 (install_software_single_step_breakpoints): New function.
5133 (start_step_over): Use install_software_single_step_breakpoints.
5134 * linux-low.h: New CORE_ADDR vector.
5135 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
5136 get_next_pcs.
5137 * linux-mips-low.c (the_low_targets): Likewise.
5138 * linux-nios2-low.c (the_low_targets): Likewise.
5139 * linux-sparc-low.c (the_low_targets): Likewise.
5140
4a6ed09b
PA
51412015-12-17 Pedro Alves <palves@redhat.com>
5142
5143 * linux-low.c (linux_kill_one_lwp): Remove references to
5144 LinuxThreads.
5145 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
5146 to 'kill'.
5147 (linux_init_signals): Delete.
5148 (initialize_low): Adjust.
5149 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
5150
7544db95
PA
51512015-12-16 Pedro Alves <palves@redhat.com>
5152
5153 * configure.ac (compiler warning flags): When testing a
5154 -Wno-foo option, check whether -Wfoo works instead.
5155 * configure: Regenerate.
5156
8020350c
DB
51572015-12-11 Don Breazeal <donb@codesourcery.com>
5158
5159 * server.c (process_serial_event): Don't exit from gdbserver
5160 in remote mode if there are still active inferiors.
5161
db91f502
YQ
51622015-12-11 Yao Qi <yao.qi@linaro.org>
5163
5164 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
5165 arm_breakpoint_at if the process is 32-bit.
5166
b37a6290
YQ
51672015-12-11 Yao Qi <yao.qi@linaro.org>
5168
5169 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
5170 arm breakpoint.
5171
17b1509a
YQ
51722015-12-07 Yao Qi <yao.qi@linaro.org>
5173
5174 * configure.srv: Append arm.o to srv_tgtobj for
5175 aarch64*-*-linux* target.
5176 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
5177 from linux-arm-low.c.
5178 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
5179 (arm_breakpoint_len, thumb_breakpoint): Likewise.
5180 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
5181 (thumb2_breakpoint_len): Likewise.
5182 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
5183 (arm_breakpoint_kinds): Likewise.
5184 (arm_breakpoint_kind_from_pc): Likewise.
5185 (arm_sw_breakpoint_from_kind): Likewise.
5186 (arm_breakpoint_kind_from_current_state): Likewise.
5187 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
5188 (arm_sw_breakpoint_from_kind): Declare.
5189 (arm_breakpoint_kind_from_current_state): Declare.
5190 (arm_breakpoint_at): Declare.
5191 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
5192 arm_sw_breakpoint_from_kind if process is 32-bit.
5193 (aarch64_breakpoint_kind_from_pc): New function.
5194 (aarch64_breakpoint_kind_from_current_state): New function.
5195 (the_low_target): Initialize fields breakpoint_kind_from_pc
5196 and breakpoint_kind_from_current_state.
5197 * linux-arm-low.c (arm_breakpoint_kinds): Move to
5198 linux-aarch32-low.c.
5199 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
5200 (arm_breakpoint, arm_breakpoint_len): Likewise.
5201 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
5202 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
5203 (arm_is_thumb_mode): Likewise.
5204 (arm_breakpoint_at): Likewise.
5205 (arm_breakpoint_kind_from_pc): Likewise.
5206 (arm_sw_breakpoint_from_kind): Likewise.
5207 (arm_breakpoint_kind_from_current_state): Likewise.
5208
5209 Revert:
5210 2015-08-04 Yao Qi <yao.qi@linaro.org>
5211
5212 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
5213 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
5214 * server.c (extended_protocol): Remove "static".
5215 * server.h (extended_protocol): Declare it.
5216
ece66d65
JS
52172015-12-04 Josh Stone <jistone@redhat.com>
5218
5219 * target.h (struct target_ops) <arch_setup>: Rename to ...
5220 (struct target_ops) <post_create_inferior>: ... this.
5221 (target_arch_setup): Rename to ...
5222 (target_post_create_inferior): ... this, calling post_create_inferior.
5223 * server.c (start_inferior): Update target_arch_setup calls to
5224 target_post_create_inferior.
5225 * linux-low.c (linux_low_ptrace_options): Forward declare.
5226 (linux_arch_setup): Update its comment for general use.
5227 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
5228 (struct linux_target_ops): Use linux_post_create_inferior.
5229 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
5230 to post_create_inferior.
5231 * nto-low.c (struct nto_target_ops): Likewise.
5232 * spu-low.c (struct spu_target_ops): Likewise.
5233 * win32-low.c (struct win32_target_ops): Likewise.
5234
e58c48b4
AT
52352015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
5236
5237 * linux-arm-low.c: Remove duplicate arch/arm.h include.
5238
fbec8956
AT
52392015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
5240
5241 * linux-arm-low.c (arm_reinsert_addr): Remove function.
5242 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
5243 * linux-cris-low.c (cris_reinsert_addr> Remove function.
5244 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
5245 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
5246 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
5247 * linux-mips-low.c (mips_reinsert_addr): Remove function.
5248 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
5249 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
5250 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
5251 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
5252 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
5253
9b4c5f87
AT
52542015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
5255
5256 * linux-low.c (linux_look_up_symbols): Don't call
5257 linux_supports_traceclone.
5258 * linux-low.h (thread_db_init): Remove use_events argument.
5259 * thread-db.c (thread_db_use_event): Remove global variable.
5260 (struct thread_db) <td_thr_event_enable_p>: Remove field.
5261 (struct thread_db) <td_create_bp>: Remove field.
5262 (thread_db_create_event): Remove function.
5263 (thread_db_enable_reporting): Likewise.
5264 (find_one_thread): Don't check for thread_db_use_events.
5265 (attach_thread): Likewise.
5266 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
5267 (try_thread_db_load_1): Don't check for thread_db_use_events.
5268 (thread_db_init): Remove use_events argument and thread events
5269 handling.
5270 (remove_thread_event_breakpoints): Remove function.
5271 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
5272
7d00775e
AT
52732015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
5274
5275 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
5276 New function.
5277 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5278 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
5279 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5280 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
5281 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
5282 Initialize.
5283 * linux-crisv32-low.c (cris_supports_hardware_single_step):
5284 New function.
5285 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5286 * linux-low.c (can_hardware_single_step): Use
5287 supports_hardware_single_step.
5288 (can_software_single_step): New function.
5289 (start_step_over): Call can_software_single_step.
5290 (linux_supports_hardware_single_step): New function.
5291 (struct target_ops) <supports_software_single_step>: Initialize.
5292 * linux-low.h (struct linux_target_ops)
5293 <supports_hardware_single_step>: Initialize.
5294 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
5295 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5296 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
5297 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
5298 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
5299 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5300 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
5301 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5302 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
5303 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
5304 Initialize.
5305 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
5306 (struct linux_target_ops) <tile_supports_hardware_single_step>:
5307 Initialize.
5308 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
5309 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5310 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
5311 New function.
5312 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5313 * target.h (struct target_ops): <supports_software_single_step>:
5314 New field.
5315 (target_supports_software_single_step): New macro.
5316
2d97cd35
AT
53172015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
5318
5319 * linux-low.c (linux_wait_1): Fix pc advance condition.
5320 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
5321 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
5322
769ef81f
AT
53232015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
5324
5325 * linux-arm-low.c (arm_is_thumb_mode): New function.
5326 (arm_breakpoint_at): Use arm_is_thumb_mode.
5327 (arm_breakpoint_kind_from_current_state): New function.
5328 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
5329 Initialize.
5330 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
5331 (linux_breakpoint_kind_from_current_state): New function.
5332 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
5333 * linux-low.h (struct linux_target_ops)
5334 <breakpoint_kind_from_current_state>: New field.
5335 * target.h (struct target_ops): Likewise.
5336 (target_breakpoint_kind_from_current_state): New macro.
5337
1bebeeca
PA
53382015-11-30 Pedro Alves <palves@redhat.com>
5339
5340 * linux-low.c (linux_resume): Wake up the event loop before
5341 returning.
5342
a67a9fae
PA
53432015-11-30 Pedro Alves <palves@redhat.com>
5344
5345 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
5346 check.
5347 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
5348 to -1.
5349 * target.c (struct thread_search): New structure.
5350 (thread_search_callback): New function.
5351 (prev_general_thread): New global.
5352 (prepare_to_access_memory, done_accessing_memory): New functions.
5353 * target.h (prepare_to_access_memory, done_accessing_memory):
5354 Replace macros with function declarations.
5355
f2faf941
PA
53562015-11-30 Pedro Alves <palves@redhat.com>
5357
5358 PR 14618
5359 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
5360 report TARGET_WAITKIND_NO_RESUMED.
5361 * remote-utils.c (prepare_resume_reply): Handle
5362 TARGET_WAITKIND_NO_RESUMED.
5363 * server.c (report_no_resumed): New global.
5364 (handle_query) <qSupported>: Handle "no-resumed+". Report
5365 "no-resumed+" support.
5366 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
5367 return error if the client doesn't support no-resumed events.
5368 (push_stop_notification): New function.
5369 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
5370 events if the client supports them.
5371
a681f9c9
PA
53722015-11-30 Pedro Alves <palves@redhat.com>
5373
5374 * linux-low.c (thread_still_has_status_pending_p): Don't check
5375 vCont;t here.
5376 (lwp_resumed): New function.
5377 (status_pending_p_callback): Return early if the LWP is not
5378 supposed to be resumed.
5379
65706a29
PA
53802015-11-30 Pedro Alves <palves@redhat.com>
5381
5382 * linux-low.c (handle_extended_wait): Assert that the LWP's
5383 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
5384 thread create events, leave the new child's status pending.
5385 (linux_low_filter_event): If GDB wants to hear about thread exit
5386 events, leave the LWP marked dead and don't delete it.
5387 (linux_wait_for_event_filtered): Don't check for thread exit.
5388 (filter_exit_event): New function.
5389 (linux_wait_1): Use it, when returning an exit event.
5390 (linux_resume_one_lwp_throw): Assert that the LWP's
5391 waitstatus is TARGET_WAITKIND_IGNORE.
5392 * remote-utils.c (prepare_resume_reply): Handle
5393 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
5394 * server.c (report_thread_events): New global.
5395 (handle_general_set): Handle QThreadEvents.
5396 (handle_query) <qSupported>: Handle and report QThreadEvents+;
5397 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
5398 TARGET_WAITKIND_THREAD_EXITED.
5399 * server.h (report_thread_events): Declare.
5400
56cf4bed
PA
54012015-11-30 Pedro Alves <palves@redhat.com>
5402
5403 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
5404 the thread's last_resume_kind was resume_stop.
5405
500c1d85
PA
54062015-11-30 Pedro Alves <palves@redhat.com>
5407
5408 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
5409 before returning.
5410
de979965
PA
54112015-11-30 Pedro Alves <palves@redhat.com>
5412
5413 * server.c (handle_v_requests): Handle vCtrlC.
5414
34c65914
PA
54152015-11-30 Pedro Alves <palves@redhat.com>
5416
5417 * gdbthread.h (find_any_thread_of_pid): Declare.
5418 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
5419 functions.
5420 * server.c (handle_query): If current_thread is NULL, look for
5421 another thread of the selected process.
5422
79efa585 54232015-11-26 Daniel Colascione <dancol@dancol.org>
01a49af8 5424 Simon Marchi <simon.marchi@ericsson.com>
79efa585
SM
5425
5426 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
5427 * server.c (handle_qxfer_threads_worker): Refactor to include thread
5428 name in reply.
5429 * target.h (struct target_ops) <thread_name>: New field.
5430 (target_thread_name): New macro.
5431
80d82c19
JB
54322015-11-23 Joel Brobecker <brobecker@adacore.com>
5433
5434 * regcache.h (regcache_invalidate_pid): Add declaration.
5435 * regcache.c (regcache_invalidate_pid): New function, extracted
5436 from regcache_invalidate.
5437 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
5438 Add trivial documentation comment.
5439 * lynx-low.c: Use regcache_invalidate_pid instead of
5440 regcache_invalidate.
5441
64da5dd5
JB
54422015-11-23 Joel Brobecker <brobecker@adacore.com>
5443
5444 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
5445 and Elf64_auxv_t if the target is Android.
5446
37ce4055
DE
54472015-11-22 Doug Evans <xdje42@gmail.com>
5448
5449 * target.h: #include <sys/types.h>.
5450
06e03fff
PA
54512015-11-19 Pedro Alves <palves@redhat.com>
5452
5453 * linux-low.c (linux_process_qsupported): Change prototype.
5454 Adjust.
5455 * linux-low.h (struct linux_target_ops) <process_qsupported>:
5456 Change prototype.
5457 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
5458 and adjust to loop over all features.
5459 * server.c (handle_query) <qSupported>: Adjust to call
5460 target_process_qsupported once, passing it a vector of unprocessed
5461 features.
5462 * target.h (struct target_ops) <process_qsupported>: Change
5463 prototype.
5464 (target_process_qsupported): Adjust.
5465
9a084706
PA
54662015-11-19 Pedro Alves <palves@redhat.com>
5467
5468 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
5469 mode.
5470 * configure: Regenerate.
5471
dad44a1f
PA
54722015-11-19 Pedro Alves <palves@redhat.com>
5473
5474 * configure: Regenerate.
5475
231c0592
YQ
54762015-11-19 Yao Qi <yao.qi@linaro.org>
5477
5478 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
5479 type to uint32_t.
5480
6c1c9a8b
YQ
54812015-11-19 Yao Qi <yao.qi@linaro.org>
5482
5483 * linux-aarch64-low.c (enum aarch64_operand_type): New.
5484 (struct aarch64_operand): Move enum out.
5485
9caa3311
YQ
54862015-11-19 Yao Qi <yao.qi@linaro.org>
5487
5488 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
5489 struct user_fpsimd_state *.
5490 (aarch64_store_fpregset): Likewise.
5491
6a69a054
YQ
54922015-11-19 Yao Qi <yao.qi@linaro.org>
5493
5494 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
5495 struct user_pt_regs *.
5496 (aarch64_store_gregset): Likewise.
5497
1798301e
PA
54982015-11-18 Pedro Alves <palves@redhat.com>
5499
5500 * Makefile.in (all_object_files): Add $IPA_OBJS.
5501
ce7715e2
PA
55022015-11-17 Pedro Alves <palves@redhat.com>
5503
5504 * win32-low.c (win32_resume): Use gdb_signal_from_host,
5505 GDB_SIGNAL_0 and gdb_signal_to_string.
5506
c0879059
PA
55072015-11-17 Pedro Alves <palves@redhat.com>
5508
5509 * win32-low.c (handle_output_debug_string): Remove parameter.
5510 (win32_kill): Remove our_status local and adjust call to
5511 handle_output_debug_string.
5512 (get_child_debug_event): Adjust call to
5513 handle_output_debug_string.
5514
1996e237
SM
55152015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5516
5517 * linux-mips-low.c (mips_fill_gregset): Add cast.
5518 (mips_store_gregset): Likewise.
5519 (mips_fill_fpregset): Likewise.
5520 (mips_store_fpregset): Likewise.
5521
cbec665b
SM
55222015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5523
5524 * linux-mips-low.c (mips_add_watchpoint): Rename private to
5525 priv.
5526
eb3e3c67
SM
55272015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5528
5529 * linux-mips-low.c (mips_linux_new_thread): Change type of
5530 watch_type to enum target_hw_bp_type.
5531
171de4b8
SM
55322015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5533
5534 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
5535 Change return type to arm_hwbp_type.
5536
04248ead
SM
55372015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5538
5539 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
5540 (arm_store_gregset): Likewise.
5541 * linux-arm-low.c (arm_get_hwcap): Likewise.
5542 (arm_read_description): Likewise.
5543
04b3479c
SM
55442015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5545
5546 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
5547
2bc84e8a
SM
55482015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5549
5550 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
5551 (ppc_fill_vsxregset): Likewise.
5552 (ppc_store_vsxregset): Likewise.
5553 (ppc_fill_vrregset): Likewise.
5554 (ppc_store_vrregset): Likewise.
5555 (ppc_fill_evrregset): Likewise.
5556 (ppc_store_evrregset): Likewise.
5557
e6c5bb05
SM
55582015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5559
5560 * linux-ppc-low.c (ppc_usrregs_info): Remove
5561 forward-declaration.
5562 (ppc_arch_setup): Move lower in file.
5563
7ea45d72
SM
55642015-10-30 Simon Marchi <simon.marchi@ericsson.com>
5565
5566 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
5567 (ps_pdwrite): Likewise.
5568
69291610
HW
55692015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
5570
5571 * linux-arm-low.c (arm_new_thread): Move pointer dereference
5572 to after assert checks.
5573
b42945fd
SM
55742015-10-29 Simon Marchi <simon.marchi@ericsson.com>
5575
5576 * proc-service.c (ps_pdread): Add/adjust casts.
5577 (ps_pdwrite): Add/adjust casts.
5578
d6f85c84
SM
55792015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
5580
5581 * server.c (handle_search_memory_1): Cast return value of
5582 memmem.
5583
f98cd059
SM
55842015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
5585
5586 * server.c (write_qxfer_response): Change type of data to
5587 gdb_byte *.
5588
d2412fa5
PA
55892015-10-29 Pedro Alves <palves@redhat.com>
5590
5591 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
5592
c17414a2
PA
55932015-10-29 Pedro Alves <palves@redhat.com>
5594
5595 * tracepoint.c (clear_installed_tracepoints): Add casts.
5596
e053fbc4
PA
55972015-10-29 Pedro Alves <palves@redhat.com>
5598
5599 * server.c (handle_v_cont, process_serial_event): Add enum
5600 gdb_signal casts to signal parsing code.
5601
add67df8
PA
56022015-10-29 Pedro Alves <palves@redhat.com>
5603
5604 * linux-low.h (NULL_REGSET): Define.
5605 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
5606 * linux-arm-low.c (arm_regsets): Likewise.
5607 * linux-crisv32-low.c (cris_regsets): Likewise.
5608 * linux-m68k-low.c (m68k_regsets): Likewise.
5609 * linux-mips-low.c (mips_regsets): Likewise.
5610 * linux-nios2-low.c (nios2_regsets): Likewise.
5611 * linux-ppc-low.c (ppc_regsets): Likewise.
5612 * linux-s390-low.c (s390_regsets): Likewise.
5613 * linux-sh-low.c (sh_regsets): Likewise.
5614 * linux-sparc-low.c (sparc_regsets): Likewise.
5615 * linux-tic6x-low.c (tic6x_regsets): Likewise.
5616 * linux-tile-low.c (tile_regsets): Likewise.
5617 * linux-x86-low.c (x86_regsets): Likewise.
5618 * linux-xtensa-low.c (xtensa_regsets): Likewise.
5619
50bc912a
PA
56202015-10-29 Pedro Alves <palves@redhat.com>
5621
5622 * linux-low.h (NULL_REGSET): Define.
5623 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
5624 * linux-arm-low.c (arm_regsets): Likewise.
5625 * linux-crisv32-low.c (cris_regsets): Likewise.
5626 * linux-m68k-low.c (m68k_regsets): Likewise.
5627 * linux-mips-low.c (mips_regsets): Likewise.
5628 * linux-nios2-low.c (nios2_regsets): Likewise.
5629 * linux-ppc-low.c (ppc_regsets): Likewise.
5630 * linux-s390-low.c (s390_regsets): Likewise.
5631 * linux-sh-low.c (sh_regsets): Likewise.
5632 * linux-sparc-low.c (sparc_regsets): Likewise.
5633 * linux-tic6x-low.c (tic6x_regsets): Likewise.
5634 * linux-tile-low.c (tile_regsets): Likewise.
5635 * linux-x86-low.c (x86_regsets): Likewise.
5636 * linux-xtensa-low.c (xtensa_regsets): Likewise.
5637
682b2546
DE
56382015-10-26 Doug Evans <dje@google.com>
5639
5640 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
5641
963843d4
DE
56422015-10-26 Doug Evans <dje@google.com>
5643
5644 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
5645
d41401ac
DE
56462015-10-26 Doug Evans <dje@google.com>
5647
5648 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
5649 for debug_printf.
5650 (attach_thread, find_new_threads_callback): Ditto.
5651
3db28855
AT
56522015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
5653
5654 * mem-break.h (set_breakpoint_data): Remove.
5655
fb78e89c
AT
56562015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
5657
5658 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
5659 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
5660 (initialize_low): Remove set_breakpoint_data call.
5661 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
5662 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
5663 (initialize_low): Remove set_breakpoint_data call.
5664 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
5665 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
5666 (initialize_low): Remove set_breakpoint_data call.
5667
2e6ee069
AT
56682015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
5669
5670 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
5671 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
5672 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
5673 * target.h (target_breakpoint_kind_from_pc): New macro.
5674
1652a986
AT
56752015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
5676
5677 * linux-low.c (default_breakpoint_kind_from_pc): New function.
5678 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
5679 the default breakpoint kind.
5680
abeead09
AT
56812015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5682
5683 * linux-arm-low.c (arm_supports_z_point_type): Add software
5684 breakpoint support.
5685
b0b4b501
AT
56862015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5687
5688 * linux-arm-low.c: Refactor breakpoint definitions.
5689 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
5690 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
5691
8689682c
AT
56922015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5693
5694 * Makefile.in: Add arm.c/o.
5695 * configure.srv: Likewise.
5696 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
5697 (arm_breakpoint_kind_from_pc): New function.
5698 (arm_sw_breakpoint_from_kind): Return proper kind.
5699 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
5700
27165294
AT
57012015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5702
5703 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
5704 removal.
5705 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
5706 (struct raw_breakpoint) <size>: Remove.
5707 (struct raw_breakpoint) <kind>: Add.
5708 (bp_size): New function.
5709 (bp_opcode): Likewise.
5710 (find_raw_breakpoint_at): Adjust for kind.
5711 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
5712 (remove_memory_breakpoint): Adjust for kind call bp_size.
5713 (set_raw_breakpoint_at): Adjust for kind.
5714 (set_breakpoint): Likewise.
5715 (set_breakpoint_at): Call breakpoint_kind_from_pc.
5716 (delete_raw_breakpoint): Adjust for kind.
5717 (delete_breakpoint): Likewise.
5718 (find_gdb_breakpoint): Likewise.
5719 (set_gdb_breakpoint_1): Likewise.
5720 (set_gdb_breakpoint): Likewise.
5721 (delete_gdb_breakpoint_1): Likewise.
5722 (delete_gdb_breakpoint): Likewise.
5723 (uninsert_raw_breakpoint): Likewise.
5724 (reinsert_raw_breakpoint): Likewise.
5725 (set_breakpoint_data): Remove.
5726 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
5727 (check_mem_read): Adjust for kind call bp_size.
5728 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
5729 (clone_one_breakpoint): Adjust for kind.
5730 * mem-break.h (set_gdb_breakpoint): Likewise.
5731 (delete_gdb_breakpoint): Likewise.
5732 * server.c (process_serial_event): Likewise.
5733
dd373349
AT
57342015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5735
5736 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
5737 (struct linux_target_ops) <breakpoint>: Remove.
5738 (struct linux_target_ops) <breakpoint_len>: Remove.
5739 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5740 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5741 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
5742 (arm_sw_breakpoint_from_kind): New function.
5743 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
5744 (struct linux_target_ops) <breakpoint>: Remove.
5745 (struct linux_target_ops) <breakpoint_len>: Remove.
5746 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5747 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5748 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
5749 (struct linux_target_ops) <breakpoint>: Remove.
5750 (struct linux_target_ops) <breakpoint_len>: Remove.
5751 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5752 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5753 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
5754 (struct linux_target_ops) <breakpoint>: Remove.
5755 (struct linux_target_ops) <breakpoint_len>: Remove.
5756 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5757 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5758 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
5759 and sw_breakpoint_from_kind to increment the pc.
5760 (linux_breakpoint_kind_from_pc): New function.
5761 (linux_sw_breakpoint_from_kind): New function.
5762 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
5763 (initialize_low): Call breakpoint_kind_from_pc and
5764 sw_breakpoint_from_kind to replace breakpoint_data/len.
5765 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
5766 New field.
5767 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
5768 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
5769 (struct linux_target_ops) <breakpoint>: Remove.
5770 (struct linux_target_ops) <breakpoint_len>: Remove.
5771 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5772 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5773 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
5774 (struct linux_target_ops) <breakpoint>: Remove.
5775 (struct linux_target_ops) <breakpoint_len>: Remove.
5776 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5777 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5778 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
5779 (struct linux_target_ops) <breakpoint>: Remove.
5780 (struct linux_target_ops) <breakpoint_len>: Remove.
5781 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5782 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5783 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
5784 (struct linux_target_ops) <breakpoint>: Remove.
5785 (struct linux_target_ops) <breakpoint_len>: Remove.
5786 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5787 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5788 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
5789 (struct linux_target_ops) <breakpoint>: Remove.
5790 (struct linux_target_ops) <breakpoint_len>: Remove.
5791 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5792 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5793 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
5794 (struct linux_target_ops) <breakpoint>: Remove.
5795 (struct linux_target_ops) <breakpoint_len>: Remove.
5796 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5797 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5798 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
5799 (struct linux_target_ops) <breakpoint>: Remove.
5800 (struct linux_target_ops) <breakpoint_len>: Remove.
5801 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5802 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5803 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
5804 (struct linux_target_ops) <breakpoint>: Remove.
5805 (struct linux_target_ops) <breakpoint_len>: Remove.
5806 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5807 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5808 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
5809 (struct linux_target_ops) <breakpoint>: Remove.
5810 (struct linux_target_ops) <breakpoint_len>: Remove.
5811 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5812 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5813 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
5814 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
5815 (struct linux_target_ops) <breakpoint>: Remove.
5816 (struct linux_target_ops) <breakpoint_len>: Remove.
5817 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5818 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5819 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
5820 (struct linux_target_ops) <breakpoint>: Remove.
5821 (struct linux_target_ops) <breakpoint_len>: Remove.
5822 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5823 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5824
4cd98a19
AT
58252015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5826
5827 * linux-cris-low.c (cris_get_pc): Remove void arg.
5828
774ee6d2
AR
58292015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
5830
5831 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
5832 variable name.
5833
833dcd29
AR
58342015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
5835
5836 * inferiors.c (thread_pid_matches_callback): New function.
5837 (find_thread_process): New function.
5838 (remove_thread): Reset current_thread.
5839 (remove_process): Assert threads have been removed first.
5840
8d689ee5
YQ
58412015-10-15 Yao Qi <yao.qi@linaro.org>
5842
5843 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
5844 if it is 3.
5845 (aarch64_remove_point): Likewise.
5846 * regcache.c (regcache_register_size): New function.
5847
1c2e1515
YQ
58482015-10-12 Yao Qi <yao.qi@linaro.org>
5849
5850 * linux-aarch64-low.c: Update all callers as emit_load_store
5851 is renamed to aarch64_emit_load_store.
5852
e1c587c3
YQ
58532015-10-12 Yao Qi <yao.qi@linaro.org>
5854
5855 * linux-aarch64-low.c: Update all callers of function renaming
5856 from emit_insn to aarch64_emit_insn.
5857
b6542f81
YQ
58582015-10-12 Yao Qi <yao.qi@linaro.org>
5859
5860 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
5861 arch/aarch64-insn.h.
5862 (struct aarch64_memory_operand): Likewise.
5863 (ENCODE): Likewise.
5864 (emit_insn): Move to arch/aarch64-insn.c.
5865 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
5866 (emit_load_store): Move to arch/aarch64-insn.c.
5867 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
5868 (can_encode_int32): Remove.
5869
246994ce
YQ
58702015-10-12 Yao Qi <yao.qi@linaro.org>
5871
5872 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
5873 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
5874 (aarch64_relocate_instruction): Likewise.
5875 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
5876 (struct aarch64_insn_visitor): Likewise.
5877
0badd99f
YQ
58782015-10-12 Yao Qi <yao.qi@linaro.org>
5879
5880 * linux-aarch64-low.c (struct aarch64_insn_data): New.
5881 (struct aarch64_insn_visitor): New.
5882 (struct aarch64_insn_relocation_data): New.
5883 (aarch64_ftrace_insn_reloc_b): New function.
5884 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
5885 (aarch64_ftrace_insn_reloc_cb): Likewise.
5886 (aarch64_ftrace_insn_reloc_tb): Likewise.
5887 (aarch64_ftrace_insn_reloc_adr): Likewise.
5888 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
5889 (aarch64_ftrace_insn_reloc_others): Likewise.
5890 (visitor): New.
5891 (aarch64_relocate_instruction): Use visitor.
5892
dfaffe9d
YQ
58932015-10-12 Yao Qi <yao.qi@linaro.org>
5894
5895 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
5896 int. Add argument buf.
5897 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
5898 aarch64_relocate_instruction.
5899
70b439f0
YQ
59002015-10-12 Yao Qi <yao.qi@linaro.org>
5901
5902 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
5903 argument insn. Remove local variable insn. Don't call
5904 target_read_uint32.
5905 (aarch64_install_fast_tracepoint_jump_pad): Call
5906 target_read_uint32.
5907
7781c06f
YQ
59082015-09-30 Yao Qi <yao.qi@linaro.org>
5909
5910 * linux-aarch64-low.c (emit_movk): Shorten a long line.
5911 (emit_load_store_pair): Likewise.
5912
9a3c8263
SM
59132015-09-25 Simon Marchi <simon.marchi@ericsson.com>
5914
5915 * dll.c (match_dll): Add cast(s).
5916 (unloaded_dll): Likewise.
5917 * linux-low.c (second_thread_of_pid_p): Likewise.
5918 (delete_lwp_callback): Likewise.
5919 (count_events_callback): Likewise.
5920 (select_event_lwp_callback): Likewise.
5921 (linux_set_resume_request): Likewise.
5922 * server.c (accumulate_file_name_length): Likewise.
5923 (emit_dll_description): Likewise.
5924 (handle_qxfer_threads_worker): Likewise.
5925 (visit_actioned_threads): Likewise.
5926 * thread-db.c (any_thread_of): Likewise.
5927 * tracepoint.c (same_process_p): Likewise.
5928 (match_blocktype): Likewise.
5929 (build_traceframe_info_xml): Likewise.
5930
224c3ddb
SM
59312015-09-25 Simon Marchi <simon.marchi@ericsson.com>
5932
5933 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
5934 assignment.
5935 (gdb_unparse_agent_expr): Likewise.
5936 * hostio.c (require_data): Likewise.
5937 (handle_pread): Likewise.
5938 * linux-low.c (disable_regset): Likewise.
5939 (fetch_register): Likewise.
5940 (store_register): Likewise.
5941 (get_dynamic): Likewise.
5942 (linux_qxfer_libraries_svr4): Likewise.
5943 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
5944 (set_fast_tracepoint_jump): Likewise.
5945 (uninsert_fast_tracepoint_jumps_at): Likewise.
5946 (reinsert_fast_tracepoint_jumps_at): Likewise.
5947 (validate_inserted_breakpoint): Likewise.
5948 (clone_agent_expr): Likewise.
5949 * regcache.c (init_register_cache): Likewise.
5950 * remote-utils.c (putpkt_binary_1): Likewise.
5951 (decode_M_packet): Likewise.
5952 (decode_X_packet): Likewise.
5953 (look_up_one_symbol): Likewise.
5954 (relocate_instruction): Likewise.
5955 (monitor_output): Likewise.
5956 * server.c (handle_search_memory): Likewise.
5957 (handle_qxfer_exec_file): Likewise.
5958 (handle_qxfer_libraries): Likewise.
5959 (handle_qxfer): Likewise.
5960 (handle_query): Likewise.
5961 (handle_v_cont): Likewise.
5962 (handle_v_run): Likewise.
5963 (captured_main): Likewise.
5964 * target.c (write_inferior_memory): Likewise.
5965 * thread-db.c (try_thread_db_load_from_dir): Likewise.
5966 * tracepoint.c (init_trace_buffer): Likewise.
5967 (add_tracepoint_action): Likewise.
5968 (add_traceframe): Likewise.
5969 (add_traceframe_block): Likewise.
5970 (cmd_qtdpsrc): Likewise.
5971 (cmd_qtdv): Likewise.
5972 (cmd_qtstatus): Likewise.
5973 (response_source): Likewise.
5974 (response_tsv): Likewise.
5975 (cmd_qtnotes): Likewise.
5976 (gdb_collect): Likewise.
5977 (initialize_tracepoint): Likewise.
5978
afbe19f8
PL
59792015-09-21 Pierre Langlois <pierre.langlois@arm.com>
5980
5981 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
5982 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
5983 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
5984 <NOP>: New.
5985 (enum aarch64_condition_codes): New enum.
5986 (w0): New static global.
5987 (fp): Likewise.
5988 (lr): Likewise.
5989 (struct aarch64_memory_operand) <type>: New
5990 MEMORY_OPERAND_POSTINDEX type.
5991 (postindex_memory_operand): New helper function.
5992 (emit_ret): New function.
5993 (emit_load_store_pair): New function, factored out of emit_stp
5994 with support for MEMORY_OPERAND_POSTINDEX.
5995 (emit_stp): Rewrite using emit_load_store_pair.
5996 (emit_ldp): New function.
5997 (emit_load_store): Likewise.
5998 (emit_ldr): Mention post-index instruction in comment.
5999 (emit_ldrh): New function.
6000 (emit_ldrb): New function.
6001 (emit_ldrsw): Mention post-index instruction in comment.
6002 (emit_str): Likewise.
6003 (emit_subs): New function.
6004 (emit_cmp): Likewise.
6005 (emit_and): Likewise.
6006 (emit_orr): Likewise.
6007 (emit_orn): Likewise.
6008 (emit_eor): Likewise.
6009 (emit_mvn): Likewise.
6010 (emit_lslv): Likewise.
6011 (emit_lsrv): Likewise.
6012 (emit_asrv): Likewise.
6013 (emit_mul): Likewise.
6014 (emit_sbfm): Likewise.
6015 (emit_sbfx): Likewise.
6016 (emit_ubfm): Likewise.
6017 (emit_ubfx): Likewise.
6018 (emit_csinc): Likewise.
6019 (emit_cset): Likewise.
6020 (emit_nop): Likewise.
6021 (emit_ops_insns): New helper function.
6022 (emit_pop): Likewise.
6023 (emit_push): Likewise.
6024 (aarch64_emit_prologue): New function.
6025 (aarch64_emit_epilogue): Likewise.
6026 (aarch64_emit_add): Likewise.
6027 (aarch64_emit_sub): Likewise.
6028 (aarch64_emit_mul): Likewise.
6029 (aarch64_emit_lsh): Likewise.
6030 (aarch64_emit_rsh_signed): Likewise.
6031 (aarch64_emit_rsh_unsigned): Likewise.
6032 (aarch64_emit_ext): Likewise.
6033 (aarch64_emit_log_not): Likewise.
6034 (aarch64_emit_bit_and): Likewise.
6035 (aarch64_emit_bit_or): Likewise.
6036 (aarch64_emit_bit_xor): Likewise.
6037 (aarch64_emit_bit_not): Likewise.
6038 (aarch64_emit_equal): Likewise.
6039 (aarch64_emit_less_signed): Likewise.
6040 (aarch64_emit_less_unsigned): Likewise.
6041 (aarch64_emit_ref): Likewise.
6042 (aarch64_emit_if_goto): Likewise.
6043 (aarch64_emit_goto): Likewise.
6044 (aarch64_write_goto_address): Likewise.
6045 (aarch64_emit_const): Likewise.
6046 (aarch64_emit_call): Likewise.
6047 (aarch64_emit_reg): Likewise.
6048 (aarch64_emit_pop): Likewise.
6049 (aarch64_emit_stack_flush): Likewise.
6050 (aarch64_emit_zero_ext): Likewise.
6051 (aarch64_emit_swap): Likewise.
6052 (aarch64_emit_stack_adjust): Likewise.
6053 (aarch64_emit_int_call_1): Likewise.
6054 (aarch64_emit_void_call_2): Likewise.
6055 (aarch64_emit_eq_goto): Likewise.
6056 (aarch64_emit_ne_goto): Likewise.
6057 (aarch64_emit_lt_goto): Likewise.
6058 (aarch64_emit_le_goto): Likewise.
6059 (aarch64_emit_gt_goto): Likewise.
6060 (aarch64_emit_ge_got): Likewise.
6061 (aarch64_emit_ops_impl): New static global variable.
6062 (aarch64_emit_ops): New target function, return
6063 &aarch64_emit_ops_impl.
6064 (struct linux_target_ops): Install it.
6065
bb903df0
PL
60662015-09-21 Pierre Langlois <pierre.langlois@arm.com>
6067
6068 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
6069 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
6070 aarch64-ipa.o.
6071 * linux-aarch64-ipa.c: New file.
6072 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
6073 and endian.h.
6074 (aarch64_get_thread_area): New target method.
6075 (extract_signed_bitfield): New helper function.
6076 (aarch64_decode_ldr_literal): New function.
6077 (enum aarch64_opcodes): New enum.
6078 (struct aarch64_register): New struct.
6079 (struct aarch64_operand): New struct.
6080 (x0): New static global.
6081 (x1): Likewise.
6082 (x2): Likewise.
6083 (x3): Likewise.
6084 (x4): Likewise.
6085 (w2): Likewise.
6086 (ip0): Likewise.
6087 (sp): Likewise.
6088 (xzr): Likewise.
6089 (aarch64_register): New helper function.
6090 (register_operand): Likewise.
6091 (immediate_operand): Likewise.
6092 (struct aarch64_memory_operand): New struct.
6093 (offset_memory_operand): New helper function.
6094 (preindex_memory_operand): Likewise.
6095 (enum aarch64_system_control_registers): New enum.
6096 (ENCODE): New macro.
6097 (emit_insn): New helper function.
6098 (emit_b): New function.
6099 (emit_bcond): Likewise.
6100 (emit_cb): Likewise.
6101 (emit_tb): Likewise.
6102 (emit_blr): Likewise.
6103 (emit_stp): Likewise.
6104 (emit_ldp_q_offset): Likewise.
6105 (emit_stp_q_offset): Likewise.
6106 (emit_load_store): Likewise.
6107 (emit_ldr): Likewise.
6108 (emit_ldrsw): Likewise.
6109 (emit_str): Likewise.
6110 (emit_ldaxr): Likewise.
6111 (emit_stxr): Likewise.
6112 (emit_stlr): Likewise.
6113 (emit_data_processing_reg): Likewise.
6114 (emit_data_processing): Likewise.
6115 (emit_add): Likewise.
6116 (emit_sub): Likewise.
6117 (emit_mov): Likewise.
6118 (emit_movk): Likewise.
6119 (emit_mov_addr): Likewise.
6120 (emit_mrs): Likewise.
6121 (emit_msr): Likewise.
6122 (emit_sevl): Likewise.
6123 (emit_wfe): Likewise.
6124 (append_insns): Likewise.
6125 (can_encode_int32_in): New helper function.
6126 (aarch64_relocate_instruction): New function.
6127 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
6128 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
6129 (struct linux_target_ops): Install aarch64_get_thread_area,
6130 aarch64_install_fast_tracepoint_jump_pad and
6131 aarch64_get_min_fast_tracepoint_insn_len.
6132
787749ea
PL
61332015-09-21 Pierre Langlois <pierre.langlois@arm.com>
6134
6135 * Makefile.in (aarch64-insn.o): New rule.
6136 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
6137
9812b2e6
YQ
61382015-09-21 Yao Qi <yao.qi@linaro.org>
6139
6140 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
6141
18fe412b
YQ
61422015-09-21 Yao Qi <yao.qi@linaro.org>
6143
6144 * tracepoint.c (max_jump_pad_size): Remove.
6145
a0cc84cd
YQ
61462015-09-18 Yao Qi <yao.qi@linaro.org>
6147
6148 * linux-aarch64-low.c: Don't include sys/uio.h.
6149 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
6150
d78908cf
WW
61512015-09-16 Wei-cheng Wang <cole945@gmail.com>
6152
6153 * tracepoint.c (eval_result_type): Change prototype.
6154 (condition_true_at_tracepoint): Fix argument to compiled_cond.
6155
d57e0d50
PA
61562015-09-15 Pedro Alves <palves@redhat.com>
6157
6158 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
6159 Check whether to report exec events instead of checking whether
6160 multiprocess is enabled.
6161
5a676acc
PA
61622015-09-15 Pedro Alves <palves@redhat.com>
6163
6164 PR remote/18965
6165 * remote-utils.c (prepare_resume_reply): Merge
6166 TARGET_WAITKIND_VFORK_DONE switch case with the
6167 TARGET_WAITKIND_FORKED case.
6168
7c5d0fad
YQ
61692015-09-15 Yao Qi <yao.qi@linaro.org>
6170
6171 * server.c (handle_query): Check string comparison using
6172 "else if" instead of "if".
6173
750ce8d1
YQ
61742015-09-15 Yao Qi <yao.qi@linaro.org>
6175
6176 * server.c (vCont_supported): New global variable.
6177 (handle_query): Set vCont_supported to 1 if "vContSupported+"
6178 matches. Append ";vContSupported+" to own_buf.
6179 (handle_v_requests): Append ";s;S" to own_buf if target supports
6180 hardware single step or vCont_supported is false.
6181 (capture_main): Set vCont_supported to zero.
6182
70b90b91
YQ
61832015-09-15 Yao Qi <yao.qi@linaro.org>
6184
6185 * linux-low.c (linux_supports_conditional_breakpoints): Rename
6186 it to ...
6187 (linux_supports_hardware_single_step): ... New function.
6188 (linux_target_ops): Update.
6189 * lynx-low.c (lynx_target_ops): Set field
6190 supports_hardware_single_step to target_can_do_hardware_single_step.
6191 * nto-low.c (nto_target_ops): Likewise.
6192 * spu-low.c (spu_target_ops): Likewise.
6193 * win32-low.c (win32_target_ops): Likewise.
6194 * target.c (target_can_do_hardware_single_step): New function.
6195 * target.h (struct target_ops) <supports_conditional_breakpoints>:
6196 Remove. <supports_hardware_single_step>: New field.
6197 (target_supports_conditional_breakpoints): Remove.
6198 (target_supports_hardware_single_step): New macro.
6199 (target_can_do_hardware_single_step): Declare.
6200 * server.c (handle_query): Use target_supports_hardware_single_step
6201 instead of target_supports_conditional_breakpoints.
6202
ade90bde
YQ
62032015-09-15 Yao Qi <yao.qi@linaro.org>
6204
6205 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
6206 function.
6207 (struct linux_target_ops the_low_target): Install
6208 aarch64_linux_siginfo_fixup.
6209
94585166
DB
62102015-09-11 Don Breazeal <donb@codesourcery.com>
6211 Luis Machado <lgustavo@codesourcery.com>
6212
6213 * linux-low.c (linux_mourn): Static declaration.
6214 (linux_arch_setup): Move in front of
6215 handle_extended_wait.
6216 (linux_arch_setup_thread): New function.
6217 (handle_extended_wait): Handle exec events. Call
6218 linux_arch_setup_thread. Make event_lwp argument a
6219 pointer-to-a-pointer.
6220 (check_zombie_leaders): Do not check stopped threads.
6221 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
6222 (linux_low_filter_event): Add lwp and thread for exec'ing
6223 non-leader thread if leader thread has been deleted.
6224 Refactor code into linux_arch_setup_thread and call it.
6225 Pass child lwp pointer by reference to handle_extended_wait.
6226 (linux_wait_for_event_filtered): Update comment.
6227 (linux_wait_1): Prevent clobbering exec event status.
6228 (linux_supports_exec_events): New function.
6229 (linux_target_ops) <supports_exec_events>: Initialize new member.
6230 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
6231 new member.
6232 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
6233 * server.c (report_exec_events): New global variable.
6234 (handle_query): Handle qSupported query for exec-events feature.
6235 (captured_main): Initialize report_exec_events.
6236 * server.h (report_exec_events): Declare new global variable.
6237 * target.h (struct target_ops) <supports_exec_events>: New
6238 member.
6239 (target_supports_exec_events): New macro.
6240 * win32-low.c (win32_target_ops) <supports_exec_events>:
6241 Initialize new member.
6242
0568462b
MM
62432015-09-09 Markus Metzger <markus.t.metzger@intel.com>
6244
6245 * linux-low.c (linux_low_enable_btrace): Remove.
6246 (linux_target_ops): Replace linux_low_enable_btrace with
6247 linux_enable_btrace.
6248
39edd165
YQ
62492015-09-03 Yao Qi <yao.qi@linaro.org>
6250
6251 * linux-aarch64-low.c (aarch64_insert_point): Call
6252 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
6253 returns true.
6254
1db33b5a
UW
62552015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
6256
6257 * linux-low.c (check_stopped_by_breakpoint): Use
6258 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
6259
ab290430
PA
62602015-08-27 Pedro Alves <palves@redhat.com>
6261
6262 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
6263
8d749320
SM
62642015-08-26 Simon Marchi <simon.marchi@ericsson.com>
6265
6711b7f8
SM
6266 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
6267 the XNEW-family equivalent.
8d749320
SM
6268 (compile_bytecodes): Likewise.
6269 * dll.c (loaded_dll): Likewise.
6270 * event-loop.c (append_callback_event): Likewise.
6271 (create_file_handler): Likewise.
6272 (create_file_event): Likewise.
6273 * hostio.c (handle_open): Likewise.
6274 * inferiors.c (add_thread): Likewise.
6275 (add_process): Likewise.
6276 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
6277 * linux-arm-low.c (arm_new_process): Likewise.
6278 (arm_new_thread): Likewise.
6279 * linux-low.c (add_to_pid_list): Likewise.
6280 (linux_add_process): Likewise.
6281 (handle_extended_wait): Likewise.
6282 (add_lwp): Likewise.
6283 (enqueue_one_deferred_signal): Likewise.
6284 (enqueue_pending_signal): Likewise.
6285 (linux_resume_one_lwp_throw): Likewise.
6286 (linux_resume_one_thread): Likewise.
6287 (linux_read_memory): Likewise.
6288 (linux_write_memory): Likewise.
6289 * linux-mips-low.c (mips_linux_new_process): Likewise.
6290 (mips_linux_new_thread): Likewise.
6291 (mips_add_watchpoint): Likewise.
6292 * linux-x86-low.c (initialize_low_arch): Likewise.
6293 * lynx-low.c (lynx_add_process): Likewise.
6294 * mem-break.c (set_raw_breakpoint_at): Likewise.
6295 (set_breakpoint): Likewise.
6296 (add_condition_to_breakpoint): Likewise.
6297 (add_commands_to_breakpoint): Likewise.
6298 (clone_agent_expr): Likewise.
6299 (clone_one_breakpoint): Likewise.
6300 * regcache.c (new_register_cache): Likewise.
6301 * remote-utils.c (look_up_one_symbol): Likewise.
6302 * server.c (queue_stop_reply): Likewise.
6303 (start_inferior): Likewise.
6304 (queue_stop_reply_callback): Likewise.
6305 (handle_target_event): Likewise.
6306 * spu-low.c (fetch_ppc_memory): Likewise.
6307 (store_ppc_memory): Likewise.
6308 * target.c (set_target_ops): Likewise.
6309 * thread-db.c (thread_db_load_search): Likewise.
6310 (try_thread_db_load_1): Likewise.
6311 * tracepoint.c (add_tracepoint): Likewise.
6312 (add_tracepoint_action): Likewise.
6313 (create_trace_state_variable): Likewise.
6314 (cmd_qtdpsrc): Likewise.
6315 (cmd_qtro): Likewise.
6316 (add_while_stepping_state): Likewise.
6317 * win32-low.c (child_add_thread): Likewise.
6318 (get_image_name): Likewise.
6319
ed8b7b42
YQ
63202015-08-25 Yao Qi <yao.qi@linaro.org>
6321
6322 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
6323
db3cb7cb
YQ
63242015-08-25 Yao Qi <yao.qi@linaro.org>
6325
6326 * Makefile.in (aarch64-linux.o): New rule.
6327 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
6328 srv_tgtobj.
6329 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
6330 (aarch64_init_debug_reg_state): Make it extern.
6331 (aarch64_linux_prepare_to_resume): Remove.
6332
f6011a1c
YQ
63332015-08-25 Yao Qi <yao.qi@linaro.org>
6334
6335 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
6336 lwp_arch_private_info and ptid_of_lwp.
6337
88e2cf7e
YQ
63382015-08-25 Yao Qi <yao.qi@linaro.org>
6339
6340 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
6341 Find proc_info by find_process_pid. All callers updated.
6342
5e35436e
YQ
63432015-08-25 Yao Qi <yao.qi@linaro.org>
6344
6345 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
6346 Remove.
6347 (debug_reg_change_callback): Remove.
6348 (aarch64_notify_debug_reg_change): Remove.
6349
4a8a7965
YQ
63502015-08-25 Yao Qi <yao.qi@linaro.org>
6351
6352 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
6353 Call current_lwp_ptid.
6354
32a271ee
YQ
63552015-08-25 Yao Qi <yao.qi@linaro.org>
6356
6357 * linux-aarch64-low.c (debug_reg_change_callback): Use
6358 debug_printf.
6359
0d51c8d7
YQ
63602015-08-25 Yao Qi <yao.qi@linaro.org>
6361
6362 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
6363
31a43dd5
YQ
63642015-08-25 Yao Qi <yao.qi@linaro.org>
6365
6366 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
6367
8ee52567
YQ
63682015-08-25 Yao Qi <yao.qi@linaro.org>
6369
6370 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
6371 the code.
6372
ff3f0f45
YQ
63732015-08-25 Yao Qi <yao.qi@linaro.org>
6374
6375 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
6376 Remove.
6377 (debug_reg_change_callback): Remove argument entry and add argument
6378 lwp. Remove local variable thread. Don't print thread id in the
6379 debugging output. Don't check whether pid of thread equals to pid.
6380 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
6381 iterate_over_lwps instead find_inferior.
6382
3d40fbb5
PA
63832015-08-24 Pedro Alves <palves@redhat.com>
6384
6385 * inferiors.c (get_first_process): New function.
6386 * inferiors.h (get_first_process): New declaration.
6387 * remote-utils.c (read_ptid): Default to the first process in the
6388 list, instead of to the current thread's process.
6389
438e1e42
PA
63902015-08-24 Pedro Alves <palves@redhat.com>
6391
6392 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
6393 * event-loop.c: Likewise.
6394 * remote-utils.c: Likewise.
6395 * tracepoint.c: Likewise.
6396
a8c6d4fc
PA
63972015-08-24 Pedro Alves <palves@redhat.com>
6398
6399 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
6400 ptid_get_lwp.
6401
99b0bb12
PA
64022015-08-21 Pedro Alves <palves@redhat.com>
6403
6404 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
6405 instead of literal 1.
6406
f8904751
PA
64072015-08-21 Pedro Alves <palves@redhat.com>
6408
6409 * tdesc.c (default_description): Explicitly zero-initialize.
6410
465a859e
PA
64112015-08-21 Pedro Alves <palves@redhat.com>
6412
6413 PR gdb/18749
6414 * inferiors.c (remove_thread): Discard any pending stop reply for
6415 this thread.
6416 * server.c (remove_all_on_match_pid): Rename to ...
6417 (remove_all_on_match_ptid): ... this. Work with a filter ptid
6418 instead of a pid.
6419 (discard_queued_stop_replies): Change parameter to a ptid. Now
6420 extern.
6421 (handle_v_kill, kill_inferior_callback, captured_main)
6422 (process_serial_event): Adjust.
6423 * server.h (discard_queued_stop_replies): Declare.
6424
f0db101d
PA
64252015-08-21 Pedro Alves <palves@redhat.com>
6426
6427 * linux-low.c (wait_for_sigstop): Always switch to no thread
6428 selected if the previously current thread dies.
6429 * lynx-low.c (lynx_request_interrupt): Use the first thread's
6430 process instead of the current thread's.
6431 * remote-utils.c (input_interrupt): Don't check if there's no
6432 current thread.
6433 * server.c (gdb_read_memory, gdb_write_memory): If setting the
6434 current thread to the general thread fails, error out.
6435 (handle_qxfer_auxv, handle_qxfer_libraries)
6436 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
6437 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
6438 (handle_query): Check if there's a thread selected instead of
6439 checking whether there's any thread in the thread list.
6440 (handle_qxfer_threads, handle_qxfer_btrace)
6441 (handle_qxfer_btrace_conf): Don't error out early if there's no
6442 thread in the thread list.
6443 (handle_v_cont, myresume): Don't set the current thread to the
6444 continue thread.
6445 (process_serial_event) <Hg handling>: Also set thread_id if the
6446 previous general thread is still alive.
6447 (process_serial_event) <g/G handling>: If setting the current
6448 thread to the general thread fails, error out.
6449 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
6450 thread's lwp instead of the current thread's.
6451 * target.c (set_desired_thread): If the desired thread was not
6452 found, leave the current thread pointing to NULL. Return an int
6453 (boolean) indicating success.
6454 * target.h (set_desired_thread): Change return type to int.
6455
40045d91
MF
64562015-08-20 Max Filippov <jcmvbkbc@gmail.com>
6457
6458 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
6459 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
6460 #includes.
6461 (ps_get_thread_area): New function.
6462
45face3b
GB
64632015-08-19 Gary Benson <gbenson@redhat.com>
6464
6465 * hostio.c (handle_pread): Do not attempt to read more data
6466 than hostio_reply_with_data can fit in a packet.
6467
16d5f642
JB
64682015-08-18 Joel Brobecker <brobecker@adacore.com>
6469
6470 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
6471
a738da3a
MF
64722015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
6473
6474 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
6475
33ebda9d
PA
64762015-08-06 Pedro Alves <palves@redhat.com>
6477
6478 * tracepoint.c (expr_eval_result): Now an int.
6479
a44892be
PA
64802015-08-06 Pedro Alves <palves@redhat.com>
6481
6482 * gdbthread.h (struct regcache): Forward declare.
6483 (struct thread_info) <regcache_data>: Now a struct regcache
6484 pointer.
6485 * inferiors.c (inferior_regcache_data)
6486 (set_inferior_regcache_data): Now work with struct regcache
6487 pointers.
6488 * inferiors.h (struct regcache): Forward declare.
6489 (inferior_regcache_data, set_inferior_regcache_data): Now work
6490 with struct regcache pointers.
6491 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
6492 (free_register_cache_thread): Remove struct regcache pointer
6493 casts.
6494
608a1e46
PA
64952015-08-06 Pedro Alves <palves@redhat.com>
6496
6497 * server.c (captured_main): On error, print the exception message
6498 to stderr, and if run_once is set, throw a quit.
6499
f0ce0d3a
PA
65002015-08-06 Pedro Alves <palves@redhat.com>
6501
6502 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
6503 the current thread.
6504
bf47e248
PA
65052015-08-06 Pedro Alves <palves@redhat.com>
6506
6507 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
6508 reading beyond the passed in buffer length.
6509
b6b9ffcc
PL
65102015-08-06 Pierre Langlois <pierre.langlois@arm.com>
6511
6512 * tracepoint.c (symbol_list) <required>: Remove.
6513
863d01bd
PA
65142015-08-06 Pedro Alves <palves@redhat.com>
6515
6516 * linux-low.c (handle_extended_wait): Set the fork child's suspend
6517 count if stopping and suspending threads.
6518 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
6519 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
6520 (linux_detach): Complete an ongoing step-over.
6521 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
6522 throughout.
6523 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
6524 (linux_wait_1): If passing a signal to the inferior after
6525 finishing a step-over, unsuspend and re-resume all lwps. If we
6526 see a single-step event but the thread should be continuing, don't
6527 pass the trap to gdb.
6528 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
6529 internal_error instead of gdb_assert.
6530 (enqueue_pending_signal): New function.
6531 (check_ptrace_stopped_lwp_gone): Add debug output.
6532 (start_step_over): Use internal_error instead of gdb_assert.
6533 (complete_ongoing_step_over): New function.
6534 (linux_resume_one_thread): Don't resume a suspended thread.
6535 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
6536 it stepping.
6537
00db26fa
PA
65382015-08-06 Pedro Alves <palves@redhat.com>
6539
6540 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
6541 (linux_thread_alive): Use lwp_is_marked_dead.
6542 (extended_event_reported): Delete.
6543 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
6544 instead of extended_event_reported.
6545 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
6546 as well.
6547 (lwp_is_marked_dead): New function.
6548 (lwp_running): Use lwp_is_marked_dead.
6549 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
6550 comment.
6551
ad071a30
PA
65522015-08-06 Pedro Alves <palves@redhat.com>
6553
6554 * linux-low.c (linux_wait_1): Move fork event output out of the
6555 !report_to_gdb check. Pass event_child->waitstatus to
6556 target_waitstatus_to_string instead of ourstatus.
6557
524b57e6
YQ
65582015-08-04 Yao Qi <yao.qi@linaro.org>
6559
6560 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
6561 if current_thread is 32 bit.
6562
6085d6f6
YQ
65632015-08-04 Yao Qi <yao.qi@linaro.org>
6564
6565 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
6566 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
6567 * server.c (extended_protocol): Remove "static".
6568 * server.h (extended_protocol): Declare it.
6569
8a7e4587
YQ
65702015-08-04 Yao Qi <yao.qi@linaro.org>
6571
6572 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
6573 both aarch64 and aarch32.
6574 (aarch64_set_pc): Likewise.
6575
3b53ae99
YQ
65762015-08-04 Yao Qi <yao.qi@linaro.org>
6577
6578 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
6579 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
6580 arm-with-neon.xml to srv_xmlfiles.
6581 * linux-aarch64-low.c: Include linux-aarch32-low.h.
6582 (is_64bit_tdesc): New function.
6583 (aarch64_linux_read_description): New function.
6584 (aarch64_arch_setup): Call aarch64_linux_read_description.
6585 (regs_info): Rename to regs_info_aarch64.
6586 (aarch64_regs_info): Return right regs_info.
6587 (initialize_low_arch): Call initialize_low_arch_aarch32.
6588
bd9e6534
YQ
65892015-08-04 Yao Qi <yao.qi@linaro.org>
6590
6591 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
6592 * linux-aarch32-low.c: New file.
6593 * linux-aarch32-low.h: New file.
6594 * linux-arm-low.c (arm_fill_gregset): Move it to
6595 linux-aarch32-low.c.
6596 (arm_store_gregset): Likewise.
6597 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
6598 (arm_store_vfpregset): Call arm_store_vfpregset_num.
6599 (arm_arch_setup): Check if PTRACE_GETREGSET works.
6600 (regs_info): Rename to regs_info_arm.
6601 (arm_regs_info): Return regs_info_aarch32 if
6602 have_ptrace_getregset is 1 and target description is
6603 arm_with_neon or arm_with_vfpv3.
6604 (initialize_low_arch): Don't call init_registers_arm_with_neon.
6605 Call initialize_low_arch_aarch32 instead.
6606
ded48a5e
YQ
66072015-08-04 Yao Qi <yao.qi@linaro.org>
6608
6609 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
6610 * linux-low.c: ... here.
6611 * linux-low.h (have_ptrace_getregset): Declare it.
6612
96e9210f
PA
66132015-08-04 Pedro Alves <palves@redhat.com>
6614
6615 * thread-db.c (struct thread_db): Use new typedefs.
6616 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
6617 CHK calls.
6618 (disable_thread_event_reporting): Cast result of dlsym to
6619 destination function pointer type.
6620 (thread_db_mourn): Use td_ta_delete_ftype.
6621
af60a1ef
SL
66222015-08-03 Sandra Loosemore <sandra@codesourcery.com>
6623
6624 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
6625 arch variant.
6626 (CDX_BREAKPOINT): Define for R2.
6627 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
6628 (the_low_target): Add comments.
6629
e8b41681
YQ
66302015-07-30 Yao Qi <yao.qi@linaro.org>
6631
6632 * linux-arm-low.c (arm_hwcap): Remove it.
6633 (arm_read_description): New local variable arm_hwcap. Don't
6634 set arm_hwcap to zero.
6635
89abb039
YQ
66362015-07-30 Yao Qi <yao.qi@linaro.org>
6637
6638 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
6639 Use regcache->tdesc instead.
6640 (arm_store_wmmxregset): Likewise.
6641 (arm_fill_vfpregset): Likewise.
6642 (arm_store_vfpregset): Likewise.
6643
deca266c
YQ
66442015-07-30 Yao Qi <yao.qi@linaro.org>
6645
6646 * linux-arm-low.c: Include arch/arm.h.
6647 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
6648 (arm_store_gregset): Likewise.
6649
aa58a496
SM
66502015-07-29 Simon Marchi <simon.marchi@ericsson.com>
6651
6652 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
6653 ptrace's 4th parameter.
6654
50904b25
YQ
66552015-07-27 Yao Qi <yao.qi@linaro.org>
6656
6657 * configure.srv (case aarch64*-*-linux*): Don't set
6658 srv_linux_usrregs.
6659
5826e159
PA
66602015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
6661
6662 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
6663 sys/ptrace.h.
6664 * linux-arm-low.c: Likewise.
6665 * linux-cris-low.c: Likewise.
6666 * linux-crisv32-low.c: Likewise.
6667 * linux-low.c: Likewise.
6668 * linux-m68k-low.c: Likewise.
6669 * linux-mips-low.c: Likewise.
6670 * linux-nios2-low.c: Likewise.
6671 * linux-s390-low.c: Likewise.
6672 * linux-sparc-low.c: Likewise.
6673 * linux-tic6x-low.c: Likewise.
6674 * linux-tile-low.c: Likewise.
6675 * linux-x86-low.c: Likewise.
6676
54019719
PA
66772015-07-24 Pedro Alves <palves@redhat.com>
6678
6679 * config.in: Regenerate.
6680 * configure: Regenerate.
6681
eb7aa561
PA
66822015-07-24 Pedro Alves <palves@redhat.com>
6683
6684 * acinclude.m4: Include ../ptrace.m4.
6685 * configure.ac: Call GDB_AC_PTRACE.
6686 * config.in, configure: Regenerate.
6687
55d7b841
YQ
66882015-07-24 Yao Qi <yao.qi@linaro.org>
6689
6690 * linux-low.c (linux_create_inferior): Remove setting to
6691 proc->priv->new_inferior.
6692 (linux_attach): Likewise.
6693 (linux_low_filter_event): Likewise.
6694 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
6695
c06cbd92
YQ
66962015-07-24 Yao Qi <yao.qi@linaro.org>
6697
6698 * linux-low.c (linux_arch_setup): New function.
6699 (linux_low_filter_event): If proc->tdesc is NULL and
6700 proc->attached is true, call the_low_target.arch_setup.
6701 Otherwise, keep status pending, and return.
6702 (linux_resume_one_lwp_throw): Don't call get_pc if
6703 thread->while_stepping isn't NULL. Don't call
6704 get_thread_regcache if proc->tdesc is NULL.
6705 (need_step_over_p): Return 0 if proc->tdesc is NULL.
6706 (linux_target_ops): Install arch_setup.
6707 * server.c (start_inferior): Call the_target->arch_setup.
6708 * target.h (struct target_ops) <arch_setup>: New field.
6709 (target_arch_setup): New marco.
6710 * lynx-low.c (lynx_target_ops): Update.
6711 * nto-low.c (nto_target_ops): Update.
6712 * spu-low.c (spu_target_ops): Update.
6713 * win32-low.c (win32_target_ops): Update.
6714
5ae3ebba
YQ
67152015-07-24 Yao Qi <yao.qi@linaro.org>
6716
6717 * linux-low.c (linux_add_process): Don't set
6718 proc->priv->new_inferior.
6719 (linux_create_inferior): Set proc->priv->new_inferior to 1.
6720 (linux_attach): Likewise.
6721
eb97750b
YQ
67222015-07-24 Yao Qi <yao.qi@linaro.org>
6723
6724 * server.c (start_inferior): Code refactor.
6725
51aee833
YQ
67262015-07-24 Yao Qi <yao.qi@linaro.org>
6727
6728 * server.c (process_serial_event): Set general_thread.
6729
af1b22f3
YQ
67302015-07-21 Yao Qi <yao.qi@linaro.org>
6731
6732 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
6733 aarch64_linux_get_debug_reg_capacity.
6734
554717a3
YQ
67352015-07-17 Yao Qi <yao.qi@linaro.org>
6736
6737 * Makefile.in (aarch64-linux-hw-point.o): New rule.
6738 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
6739 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
6740 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
6741 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
6742 (AARCH64_HWP_ALIGNMENT): Likewise.
6743 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
6744 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
6745 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
6746 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
6747 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
6748 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
6749 (struct aarch64_debug_reg_state): Likewise.
6750 (struct arch_lwp_info): Likewise.
6751 (aarch64_align_watchpoint): Likewise.
6752 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
6753 (aarch64_watchpoint_length): Likewise.
6754 (aarch64_point_encode_ctrl_reg): Likewise
6755 (aarch64_point_is_aligned): Likewise.
6756 (aarch64_align_watchpoint): Likewise.
6757 (aarch64_linux_set_debug_regs):
6758 (aarch64_dr_state_insert_one_point): Likewise.
6759 (aarch64_dr_state_remove_one_point): Likewise.
6760 (aarch64_handle_breakpoint): Likewise.
6761 (aarch64_handle_aligned_watchpoint): Likewise.
6762 (aarch64_handle_unaligned_watchpoint): Likewise.
6763 (aarch64_handle_watchpoint): Likewise.
6764
c67ca4de
YQ
67652015-07-17 Yao Qi <yao.qi@linaro.org>
6766
6767 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
6768 and don't aarch64_get_debug_reg_state. All callers update.
6769 (aarch64_handle_aligned_watchpoint): Likewise.
6770 (aarch64_handle_unaligned_watchpoint): Likewise.
6771 (aarch64_handle_watchpoint): Likewise.
6772 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
6773 (aarch64_remove_point): Likewise.
6774
25abf979
YQ
67752015-07-17 Yao Qi <yao.qi@linaro.org>
6776
6777 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
6778 debug_printf.
6779 (aarch64_handle_unaligned_watchpoint): Likewise.
6780
db1ff28b
JK
67812015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
6782
6783 Revert the previous 3 commits:
6784 Move gdb_regex* to common/
6785 Move linux_find_memory_regions_full & co.
6786 gdbserver build-id attribute generator
6787
700ca40f
JK
67882015-07-15 Aleksandar Ristovski <aristovski@qnx.com
6789 Jan Kratochvil <jan.kratochvil@redhat.com>
6790
6791 gdbserver build-id attribute generator.
6792 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
6793 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
6794 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
6795 (find_phdr): New.
6796 (get_dynamic): Use find_pdhr to traverse program headers.
6797 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
6798 (compare_mapping_entry_range, struct find_memory_region_callback_data)
6799 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
6800 (get_hex_build_id): New.
6801 (linux_qxfer_libraries_svr4): Add optional build-id attribute
6802 to reply XML document.
6803
9904185c
JK
68042015-07-15 Aleksandar Ristovski <aristovski@qnx.com
6805 Jan Kratochvil <jan.kratochvil@redhat.com>
6806
6807 * target.c: Include target/target-utils.h and fcntl.h.
6808 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
6809 (target_fileio_read_stralloc): New functions.
6810
6e5b4429
JK
68112015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
6812
6813 * Makefile.in (OBS): Add gdb_regex.o.
6814 (gdb_regex.o): New.
6815 * config.in: Rebuilt.
6816 * configure: Rebuilt.
6817
ddc98fbf
JK
68182015-07-15 Aleksandar Ristovski <aristovski@qnx.com
6819 Jan Kratochvil <jan.kratochvil@redhat.com>
6820
6821 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
6822 * Makefile.in (OBS): Add target-utils.o.
6823 (linux-maps.o, target-utils.o): New.
6824 * configure.srv (srv_linux_obj): Add linux-maps.o.
6825
e57bb7a0
PL
68262015-07-15 Pierre Langlois <pierre.langlois@arm.com>
6827
6828 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
6829 function, return 1.
6830 (the_low_target): Install it.
6831
586b02a9
PA
68322015-07-14 Pedro Alves <palves@redhat.com>
6833
6834 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
6835 Instead, ignore ECHILD, and throw an error for other errnos.
6836
58c1b36c
PA
68372015-07-10 Pedro Alves <palves@redhat.com>
6838
6839 * event-loop.c (struct callback_event) <data>: Change type to
6840 gdb_client_data instance instead of gdb_client_data pointer.
6841 (append_callback_event): Adjust.
6842
421530db
PL
68432015-07-10 Pierre Langlois <pierre.langlois@arm.com>
6844
6845 * linux-aarch64-low.c: Add comments for each linux_target_ops
6846 method. Remove comments already covered in target_ops and
6847 linux_target_ops definitions.
6848 (the_low_target): Add comments for each unimplemented method.
6849
c2d65f38
YQ
68502015-07-09 Yao Qi <yao.qi@linaro.org>
6851
6852 * linux-aarch64-low.c (aarch64_regmap): Remove.
6853 (aarch64_usrregs_info): Remove.
6854 (regs_info): Set field usrregs to NULL.
6855
b20a6524
MM
68562015-07-02 Markus Metzger <markus.t.metzger@intel.com>
6857
6858 * linux-low.c: Include "rsp-low.h"
6859 (linux_low_encode_pt_config, linux_low_encode_raw): New.
6860 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
6861 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
6862 (handle_btrace_enable_pt): New.
6863 (handle_btrace_general_set): Support "pt".
6864 (handle_btrace_conf_general_set): Support "pt:size".
6865
96c97461
PL
68662015-06-29 Pierre Langlois <pierre.langlois@arm.com>
6867
6868 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
6869 Z_PACKET_SW_BP.
6870
37d66942
PL
68712015-06-29 Pierre Langlois <pierre.langlois@arm.com>
6872
6873 * linux-aarch64-low.c: Remove comment about endianness.
6874 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
6875 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
6876 memcmp.
6877
dc06243f
GB
68782015-06-24 Gary Benson <gbenson@redhat.com>
6879
6880 * linux-i386-ipa.c (stdint.h): Do not include.
6881 * lynx-i386-low.c (stdint.h): Likewise.
6882 * lynx-ppc-low.c (stdint.h): Likewise.
6883 * mem-break.c (stdint.h): Likewise.
6884 * thread-db.c (stdint.h): Likewise.
6885 * tracepoint.c (stdint.h): Likewise.
6886 * win32-low.c (stdint.h): Likewise.
6887
124e13d9
SM
68882015-06-18 Simon Marchi <simon.marchi@ericsson.com>
6889
6890 * server.c (write_qxfer_response): Update call to
6891 remote_escape_output.
6892
909c2cda
JK
68932015-06-15 Aleksandar Ristovski <aristovski@qnx.com
6894 Jan Kratochvil <jan.kratochvil@redhat.com>
6895
6896 Merge multiple hex conversions.
6897 * gdbreplay.c (tohex): Rename to 'fromhex'.
6898 (logchar): Use fromhex.
6899
24c05f46
JK
69002015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
6901
6902 * server.c (handle_qxfer_libraries): Set `version' attribute for
6903 <library-list>.
6904
14d2069a
GB
69052015-06-10 Gary Benson <gbenson@redhat.com>
6906
6907 * target.h (struct target_ops) <multifs_open>: New field.
6908 <multifs_unlink>: Likewise.
6909 <multifs_readlink>: Likewise.
6910 * linux-low.c (nat/linux-namespaces.h): New include.
6911 (linux_target_ops): Initialize the_target->multifs_open,
6912 the_target->multifs_unlink and the_target->multifs_readlink.
6913 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
6914 * hostio.c (hostio_fs_pid): New static variable.
6915 (hostio_handle_new_gdb_connection): New function.
6916 (handle_setfs): Likewise.
6917 (handle_open): Use the_target->multifs_open as appropriate.
6918 (handle_unlink): Use the_target->multifs_unlink as appropriate.
6919 (handle_readlink): Use the_target->multifs_readlink as
6920 appropriate.
6921 (handle_vFile): Handle vFile:setfs packets.
6922 * server.c (handle_query): Call hostio_handle_new_gdb_connection
6923 after target_handle_new_gdb_connection.
6924
4b8b5e72
GB
69252015-06-10 Gary Benson <gbenson@redhat.com>
6926
6927 * configure.ac (AC_CHECK_FUNCS): Add setns.
6928 * config.in: Regenerate.
6929 * configure: Likewise.
6930 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
6931 (linux-namespaces.o): New rule.
6932 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
6933
3ac2e371
GB
69342015-06-09 Gary Benson <gbenson@redhat.com>
6935
6936 * hostio.c (handle_open): Process mode argument with
6937 fileio_to_host_mode.
6938
ca9b78ce
YQ
69392015-06-01 Yao Qi <yao.qi@linaro.org>
6940
6941 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
6942 * linux-x86-low.c: Likewise.
6943
bfacd19d
DB
69442015-05-28 Don Breazeal <donb@codesourcery.com>
6945
6946 * linux-low.c (handle_extended_wait): Initialize
6947 thread_info.last_resume_kind for new fork children.
6948
452003ef
PA
69492015-05-15 Pedro Alves <palves@redhat.com>
6950
6951 * target.h (target_handle_new_gdb_connection): Rewrite using if
6952 wrapped in do/while.
6953
1041a03c
JB
69542015-05-14 Joel Brobecker <brobecker@adacore.com>
6955
6956 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
6957 * configure, config.in: Regenerate.
6958 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
6959 Declare typedef.
6960
c269dbdb
DB
69612015-05-12 Don Breazeal <donb@codesourcery.com>
6962
6963 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
6964 PTRACE_EVENT_VFORK_DONE.
6965 (linux_low_ptrace_options, extended_event_reported): Add vfork
6966 events.
6967 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
6968 and "vforkdone" for RSP 'T' Stop Reply Packet.
6969 * server.h (report_vfork_events): Declare
6970 global variable.
6971
3a8a0396
DB
69722015-05-12 Don Breazeal <donb@codesourcery.com>
6973
6974 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
6975 (the_low_target) <new_fork>: Initialize new member.
6976 * linux-arm-low.c (arm_new_fork): New function.
6977 (the_low_target) <new_fork>: Initialize new member.
6978 * linux-low.c (handle_extended_wait): Call new target function
6979 new_fork.
6980 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
6981 * linux-mips-low.c (mips_add_watchpoint): New function
6982 extracted from mips_insert_point.
6983 (the_low_target) <new_fork>: Initialize new member.
6984 (mips_linux_new_fork): New function.
6985 (mips_insert_point): Call mips_add_watchpoint.
6986 * linux-x86-low.c (x86_linux_new_fork): New function.
6987 (the_low_target) <new_fork>: Initialize new member.
6988
de0d863e
DB
69892015-05-12 Don Breazeal <donb@codesourcery.com>
6990
6991 * linux-low.c (handle_extended_wait): Implement return value,
6992 rename argument 'event_child' to 'event_lwp', handle
6993 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
6994 (linux_low_ptrace_options): New function.
6995 (linux_low_filter_event): Call linux_low_ptrace_options,
6996 use different argument fo linux_enable_event_reporting,
6997 use return value from handle_extended_wait.
6998 (extended_event_reported): New function.
6999 (linux_wait_1): Call extended_event_reported and set
7000 status to report fork events.
7001 (linux_write_memory): Add pid to debug message.
7002 (reset_lwp_ptrace_options_callback): New function.
7003 (linux_handle_new_gdb_connection): New function.
7004 (linux_target_ops): Initialize new structure member.
7005 * linux-low.h (struct lwp_info) <waitstatus>: New member.
7006 * lynx-low.c: Initialize new structure member.
7007 * remote-utils.c (prepare_resume_reply): Implement stop reason
7008 "fork" for "T" stop message.
7009 * server.c (handle_query): Call handle_new_gdb_connection.
7010 * server.h (report_fork_events): Declare global flag.
7011 * target.h (struct target_ops) <handle_new_gdb_connection>:
7012 New member.
7013 (target_handle_new_gdb_connection): New macro.
7014 * win32-low.c: Initialize new structure member.
7015
ddcbc397
DB
70162015-05-12 Don Breazeal <donb@codesourcery.com>
7017
7018 * mem-break.c (APPEND_TO_LIST): Define macro.
7019 (clone_agent_expr): New function.
7020 (clone_one_breakpoint): New function.
7021 (clone_all_breakpoints): New function.
7022 * mem-break.h: Declare new functions.
7023
89245bc0
DB
70242015-05-12 Don Breazeal <donb@codesourcery.com>
7025
7026 * linux-low.c (linux_supports_fork_events): New function.
7027 (linux_supports_vfork_events): New function.
7028 (linux_target_ops): Initialize new structure members.
7029 (initialize_low): Call linux_check_ptrace_features.
7030 * lynx-low.c (lynx_target_ops): Initialize new structure
7031 members.
7032 * server.c (report_fork_events, report_vfork_events):
7033 New global flags.
7034 (handle_query): Add new features to qSupported packet and
7035 response.
7036 (captured_main): Initialize new global variables.
7037 * target.h (struct target_ops) <supports_fork_events>:
7038 New member.
7039 <supports_vfork_events>: New member.
7040 (target_supports_fork_events): New macro.
7041 (target_supports_vfork_events): New macro.
7042 * win32-low.c (win32_target_ops): Initialize new structure
7043 members.
7044
835205d0
GB
70452015-05-12 Gary Benson <gbenson@redhat.com>
7046
7047 * server.c (handle_qxfer_exec_file): Use current process
7048 if annex is empty.
7049
21e94bd9
SL
70502015-05-08 Sandra Loosemore <sandra@codesourcery.com>
7051
7052 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
7053 Remove HAVE_PTRACE_GETREGS conditionals.
7054 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
7055 instead of PTRACE_GETREGS and PTRACE_SETREGS.
7056
45614f15
YQ
70572015-05-08 Yao Qi <yao.qi@linaro.org>
7058
7059 * linux-low.c (linux_supports_conditional_breakpoints): New
7060 function.
7061 (linux_target_ops): Install new target method.
7062 * lynx-low.c (lynx_target_ops): Install NULL hook for
7063 supports_conditional_breakpoints.
7064 * nto-low.c (nto_target_ops): Likewise.
7065 * spu-low.c (spu_target_ops): Likewise.
7066 * win32-low.c (win32_target_ops): Likewise.
7067 * server.c (handle_query): Check
7068 target_supports_conditional_breakpoints.
7069 * target.h (struct target_ops) <supports_conditional_breakpoints>:
7070 New field.
7071 (target_supports_conditional_breakpoints): New macro.
7072
80ad801e
PA
70732015-05-06 Pedro Alves <palves@redhat.com>
7074
7075 PR server/18081
7076 * server.c (start_inferior): If the process exits, mourn it.
7077
819843c7
GB
70782015-04-21 Gary Benson <gbenson@redhat.com>
7079
7080 * hostio.c (fileio_open_flags_to_host): Factored out to
7081 fileio_to_host_openflags in common/fileio.c. Single use
7082 updated.
7083
a2d5a9d7
MF
70842015-04-17 Max Filippov <jcmvbkbc@gmail.com>
7085
7086 * linux-xtensa-low.c (xtensa_fill_gregset)
7087 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
7088 XCHAL_HAVE_LOOP.
7089
deb44829
MF
70902015-04-17 Max Filippov <jcmvbkbc@gmail.com>
7091
7092 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
7093 (regs_info): Replace usrregs pointer with NULL.
7094
e57f1de3
GB
70952015-04-17 Gary Benson <gbenson@redhat.com>
7096
7097 * target.h (struct target_ops) <pid_to_exec_file>: New field.
7098 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
7099 * server.c (handle_qxfer_exec_file): New function.
7100 (qxfer_packets): Add exec-file entry.
7101 (handle_query): Report qXfer:exec-file:read as supported packet.
7102
62828379
RN
71032015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
7104
7105 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
7106
b88bb450
GB
71072015-04-09 Gary Benson <gbenson@redhat.com>
7108
7109 * hostio-errno.c (errno_to_fileio_error): Remove function.
7110 Update caller to use remote_fileio_to_fio_error.
7111
c8f4bfdd
YQ
71122015-04-09 Yao Qi <yao.qi@linaro.org>
7113
7114 * linux-low.c (linux_insert_point): Call
7115 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
7116 (linux_remove_point): Call remove_memory_breakpoint if type is
7117 raw_bkpt_type_sw.
7118 * linux-x86-low.c (x86_insert_point): Don't call
7119 insert_memory_breakpoint.
7120 (x86_remove_point): Don't call remove_memory_breakpoint.
7121
41f98f02
PA
71222015-04-01 Pedro Alves <palves@redhat.com>
7123 Cleber Rosa <crosa@redhat.com>
7124
7125 * server.c (gdbserver_usage): Reorganize and extend the usage
7126 message.
7127
2bf6fb9d
PA
71282015-03-24 Pedro Alves <palves@redhat.com>
7129
7130 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
7131 output. Also dump TRAP_TRACE.
7132 (linux_low_filter_event): In debug output, distinguish a
7133 resume_stop SIGSTOP from a delayed SIGSTOP.
7134
369f6daa
GB
71352015-03-24 Gary Benson <gbenson@redhat.com>
7136
7137 * linux-x86-low.c (x86_linux_new_thread): Moved to
7138 nat/x86-linux.c.
7139 (x86_linux_prepare_to_resume): Likewise.
7140
8e5d4070
GB
71412015-03-24 Gary Benson <gbenson@redhat.com>
7142
7143 * Makefile.in (x86-linux-dregs.o): New rule.
7144 * configure.srv: Add x86-linux-dregs.o to relevant targets.
7145 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
7146 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
7147 (x86_linux_dr_get): Likewise.
7148 (x86_linux_dr_set): Likewise.
7149 (update_debug_registers_callback): Likewise.
7150 (x86_linux_dr_set_addr): Likewise.
7151 (x86_linux_dr_get_addr): Likewise.
7152 (x86_linux_dr_set_control): Likewise.
7153 (x86_linux_dr_get_control): Likewise.
7154 (x86_linux_dr_get_status): Likewise.
7155 (x86_linux_update_debug_registers): Likewise.
7156
2b95d440
GB
71572015-03-24 Gary Benson <gbenson@redhat.com>
7158
7159 * linux-x86-low.c (x86_linux_update_debug_registers):
7160 New function, factored out from...
7161 (x86_linux_prepare_to_resume): ...this.
7162
14b0bc68
GB
71632015-03-24 Gary Benson <gbenson@redhat.com>
7164
7165 * linux-x86-low.c (x86_linux_dr_get): Update comments.
7166 (x86_linux_dr_set): Likewise.
7167 (update_debug_registers_callback): Likewise.
7168 (x86_linux_dr_set_addr): Likewise.
7169 (x86_linux_dr_get_addr): Likewise.
7170 (x86_linux_dr_set_control): Likewise.
7171 (x86_linux_dr_get_control): Likewise.
7172 (x86_linux_dr_get_status): Likewise.
7173 (x86_linux_prepare_to_resume): Likewise.
7174
5dfe6ca8
GB
71752015-03-24 Gary Benson <gbenson@redhat.com>
7176
7177 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
7178 Use perror_with_name. Pass string through gettext.
7179 (x86_linux_dr_set): Likewise.
7180
d33472ad
GB
71812015-03-24 Gary Benson <gbenson@redhat.com>
7182
7183 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
7184 (x86_linux_dr_set_addr): ...this.
7185 (x86_dr_low_get_addr): Rename to...
7186 (x86_linux_dr_get_addr): ...this.
7187 (x86_dr_low_set_control): Rename to...
7188 (x86_linux_dr_set_control): ...this.
7189 (x86_dr_low_get_control): Rename to...
7190 (x86_linux_dr_get_control): ...this.
7191 (x86_dr_low_get_status): Rename to...
7192 (x86_linux_dr_get_status): ...this.
7193 (x86_dr_low): Update with new function names.
7194
4b134ca1
GB
71952015-03-24 Gary Benson <gbenson@redhat.com>
7196
7197 * Makefile.in (x86-linux.o): New rule.
7198 * configure.srv: Add x86-linux.o to relevant targets.
7199 * linux-low.c (lwp_set_arch_private_info): New function.
7200 (lwp_arch_private_info): Likewise.
7201 * linux-x86-low.c: Include nat/x86-linux.h.
7202 (arch_lwp_info): Removed structure.
7203 (update_debug_registers_callback):
7204 Use lwp_set_debug_registers_changed.
7205 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
7206 and lwp_set_debug_registers_changed.
7207 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
7208
34c703da
GB
72092015-03-24 Gary Benson <gbenson@redhat.com>
7210
7211 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
7212 * linux-arm-low.c (arm_new_thread): Likewise.
7213 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
7214 * linux-mips-low.c (mips_linux_new_thread): Likewise.
7215 * linux-x86-low.c (x86_linux_new_thread): Likewise.
7216 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
7217
cff068da
GB
72182015-03-24 Gary Benson <gbenson@redhat.com>
7219
7220 * linux-low.c (ptid_of_lwp): New function.
7221 (lwp_is_stopped): Likewise.
7222 (lwp_stop_reason): Likewise.
7223 * linux-x86-low.c (update_debug_registers_callback):
7224 Use lwp_is_stopped.
7225 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
7226 lwp_stop_reason.
7227
b2f7c7e8
GB
72282015-03-24 Gary Benson <gbenson@redhat.com>
7229
7230 * linux-low.h (linux_stop_lwp): Remove declaration.
7231
6d4ee8c6
GB
72322015-03-24 Gary Benson <gbenson@redhat.com>
7233
7234 * linux-low.h: Include nat/linux-nat.h.
7235 * linux-low.c (iterate_over_lwps_args): New structure.
7236 (iterate_over_lwps_filter): New function.
7237 (iterate_over_lwps): Likewise.
7238 * linux-x86-low.c (update_debug_registers_callback):
7239 Update signature to what iterate_over_lwps expects.
7240 Remove PID check that iterate_over_lwps now performs.
7241 (x86_dr_low_set_addr): Use iterate_over_lwps.
7242 (x86_dr_low_set_control): Likewise.
7243
70a0bb6b
GB
72442015-03-24 Gary Benson <gbenson@redhat.com>
7245
7246 * linux-x86-low.c (x86_debug_reg_state): New function.
7247 (x86_linux_prepare_to_resume): Use the above.
7248
7b669087
GB
72492015-03-24 Gary Benson <gbenson@redhat.com>
7250
7251 * linux-low.c (current_lwp_ptid): New function.
7252 * linux-x86-low.c: Include nat/linux-nat.h.
7253 (x86_dr_low_get_addr): Use current_lwp_ptid.
7254 (x86_dr_low_get_control): Likewise.
7255 (x86_dr_low_get_status): Likewise.
7256
eef49a3d
PA
72572015-03-20 Pedro Alves <palves@redhat.com>
7258
7259 * tracepoint.c (cmd_qtstatus): Make "str" const.
7260
b2333d22
PA
72612015-03-20 Pedro Alves <palves@redhat.com>
7262
7263 * server.c (handle_general_set): Make "req_str" const.
7264
23f238d3
PA
72652015-03-19 Pedro Alves <palves@redhat.com>
7266
7267 * linux-low.c (linux_resume_one_lwp): Rename to ...
7268 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
7269 instead call perror_with_name.
7270 (check_ptrace_stopped_lwp_gone): New function.
7271 (linux_resume_one_lwp): Reimplement as wrapper around
7272 linux_resume_one_lwp_throw that swallows errors if the LWP is
7273 gone.
7274
91baf43f
PA
72752015-03-19 Pedro Alves <palves@redhat.com>
7276
7277 * linux-low.c (count_events_callback, select_event_lwp_callback):
7278 No longer check whether the thread has resume_stop as last resume
7279 kind.
7280
8bf3b159
PA
72812015-03-19 Pedro Alves <palves@redhat.com>
7282
7283 * linux-low.c (count_events_callback, select_event_lwp_callback):
7284 Use the lwp's status_pending_p field, not the thread's.
7285
b90fc188
PA
72862015-03-19 Pedro Alves <palves@redhat.com>
7287
7288 * linux-low.c (select_event_lwp_callback): Update comments to
7289 no longer mention SIGTRAP.
7290
464b0089
GB
72912015-03-18 Gary Benson <gbenson@redhat.com>
7292
7293 * server.c (handle_query): Do not report vFile:fstat as supported.
7294
aa9e327f
GB
72952015-03-11 Gary Benson <gbenson@redhat.com>
7296
7297 * hostio.c (sys/types.h): New include.
7298 (sys/stat.h): Likewise.
7299 (common-remote-fileio.h): Likewise.
7300 (handle_fstat): New function.
7301 (handle_vFile): Handle vFile:fstat packets.
aa9e327f 7302
791c0056
GB
73032015-03-11 Gary Benson <gbenson@redhat.com>
7304
7305 * configure.ac (AC_CHECK_MEMBERS): Add checks for
7306 struct stat.st_blocks and struct stat.st_blksize.
7307 * configure: Regenerate.
7308 * config.in: Likewise.
7309 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
7310 (OBS): Add common-remote-fileio.o.
7311 (common-remote-fileio.o): New rule.
7312
9a9df970
PA
73132015-03-09 Pedro Alves <palves@redhat.com>
7314
7315 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
7316 'struct sockaddr' pointer in 'accept' call.
7317
9eb1356e
PA
73182015-03-09 Pedro Alves <palves@redhat.com>
7319
7320 Revert:
7321 2015-03-07 Pedro Alves <palves@redhat.com>
7322 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
7323 or <winsock2.h> here. Instead include "gdb_socket.h".
7324 (remote_open): Use union gdb_sockaddr_u.
7325 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
7326 or <winsock2.h> here. Instead include "gdb_socket.h".
7327 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
7328 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
7329 or <sys/un.h>.
7330 (init_named_socket, gdb_agent_helper_thread): Use union
7331 gdb_sockaddr_u.
7332
aac331e4
PA
73332015-03-07 Pedro Alves <palves@redhat.com>
7334
7335 * configure.ac (build_warnings): Move
7336 -Wdeclaration-after-statement to the C-specific set.
7337 * configure: Regenerate.
7338
366c75fc
PA
73392015-03-07 Pedro Alves <palves@redhat.com>
7340
7341 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
7342 or <winsock2.h> here. Instead include "gdb_socket.h".
7343 (remote_open): Use union gdb_sockaddr_u.
7344 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
7345 or <winsock2.h> here. Instead include "gdb_socket.h".
7346 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
7347 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
7348 or <sys/un.h>.
7349 (init_named_socket, gdb_agent_helper_thread): Use union
7350 gdb_sockaddr_u.
7351
492d29ea
PA
73522015-03-07 Pedro Alves <palves@redhat.com>
7353
7354 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
7355 instead.
7356
60a191ed
YQ
73572015-03-06 Yao Qi <yao.qi@linaro.org>
7358
7359 * linux-aarch64-low.c (aarch64_insert_point): Use
7360 show_debug_regs as a boolean.
7361 (aarch64_remove_point): Likewise.
7362
f5771b1d
PA
73632015-03-05 Pedro Alves <palves@redhat.com>
7364
7365 * lynx-low.c (lynx_target_ops): Install NULL hooks for
7366 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
7367 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
7368 * nto-low.c (nto_target_ops): Likewise.
7369 * spu-low.c (spu_target_ops): Likewise.
7370 * win32-low.c (win32_target_ops): Likewise.
7371
3e572f71
PA
73722015-03-04 Pedro Alves <palves@redhat.com>
7373
72f4393d 7374 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
3e572f71
PA
7375 Decide whether a breakpoint triggered based on the SIGTRAP's
7376 siginfo.si_code.
72f4393d
L
7377 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
7378 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
3e572f71
PA
7379 (linux_low_filter_event): Check for breakpoints before checking
7380 watchpoints.
7381 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
7382 siginfo.si_code.
72f4393d
L
7383 (linux_stopped_by_sw_breakpoint)
7384 (linux_supports_stopped_by_sw_breakpoint)
7385 (linux_stopped_by_hw_breakpoint)
7386 (linux_supports_stopped_by_hw_breakpoint): New functions.
7387 (linux_target_ops): Install new target methods.
3e572f71 7388
1ec68e26
PA
73892015-03-04 Pedro Alves <palves@redhat.com>
7390
7391 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
7392 * server.c (swbreak_feature, hwbreak_feature): New globals.
7393 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
7394 (captured_main): Clear swbreak_feature and hwbreak_feature.
7395 * server.h (swbreak_feature, hwbreak_feature): Declare.
7396 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
7397 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
7398 supports_stopped_by_hw_breakpoint>: New fields.
7399 (target_supports_stopped_by_sw_breakpoint)
7400 (target_stopped_by_sw_breakpoint)
7401 (target_supports_stopped_by_hw_breakpoint)
7402 (target_stopped_by_hw_breakpoint): Declare.
7403
15c66dd6
PA
74042015-03-04 Pedro Alves <palves@redhat.com>
7405
7406 enum lwp_stop_reason -> enum target_stop_reason
7407 * linux-low.c (check_stopped_by_breakpoint): Adjust.
7408 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
7409 (linux_wait_1, stuck_in_jump_pad_callback)
7410 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
7411 (linux_stopped_by_watchpoint):
7412 * linux-low.h (enum lwp_stop_reason): Delete.
7413 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
7414 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
7415
98fc70d6
YQ
74162015-03-04 Yao Qi <yao.qi@linaro.org>
7417
7418 * Makefile.in (SFILES): Add linux-aarch64-low.c.
7419
dd2ac174
GB
74202015-03-03 Gary Benson <gbenson@redhat.com>
7421
7422 * hostio.c (handle_vFile): Fix prefix lengths.
7423
d68e53f4
MM
74242015-03-03 Markus Metzger <markus.t.metzger@intel.com>
7425
7426 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
7427 ptr_bits.
7428
bf2d68ab
AA
74292015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
7430
7431 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
7432 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
7433 (clean): Add "rm -f" for above C files.
7434 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
7435 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
7436 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
7437 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
7438 * linux-s390-low.c (HWCAP_S390_VX): New macro.
7439 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
7440 (init_registers_s390x_vx_linux64)
7441 (init_registers_s390x_tevx_linux64)
7442 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
7443 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
7444 declarations.
7445 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
7446 (s390_store_vxrs_high): New functions.
7447 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
7448 NT_S390_VXRS_HIGH.
7449 (s390_arch_setup): Add logic for selecting one of the new target
7450 descriptions. Activate the new vector regsets if applicable.
7451 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
7452 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
7453 and init_registers_s390x_tevx_linux64.
7454
c966a859
PA
74552015-03-01 Pedro Alves <palves@redhat.com>
7456
7457 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
7458 parameter.
7459
4180215b
PA
74602015-02-27 Pedro Alves <palves@redhat.com>
7461
7462 * linux-x86-low.c (u_debugreg_offset): New function.
7463 (x86_linux_dr_get, x86_linux_dr_set): Use it.
7464
749bab01
PA
74652015-02-27 Pedro Alves <palves@redhat.com>
7466
7467 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
7468 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
7469 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
7470 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
7471 (ps_lsetfpregs, ps_getpid)
7472 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
7473 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
7474 (ps_lsetxregs, ps_plog): Declare.
7475
3c14e5a3
PA
74762015-02-27 Pedro Alves <palves@redhat.com>
7477
7478 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
7479 IP_AGENT_EXPORT_FUNC.
7480 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
7481 IP_AGENT_EXPORT_FUNC.
7482 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
7483 (IP_AGENT_EXPORT): Delete.
7484 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
7485 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
7486 (gdb_trampoline_buffer_error, collecting, gdb_collect)
7487 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
7488 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
7489 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
7490 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
7491 (traceframe_read_count, traceframe_write_count)
7492 (traceframes_created, trace_state_variables, get_raw_reg)
7493 (get_trace_state_variable_value, set_trace_state_variable_value)
7494 (ust_loaded, helper_thread_id, cmd_buf): Use
7495 IPA_SYM_EXPORTED_NAME.
7496 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
7497 (tracepoints) Use IP_AGENT_EXPORT_VAR.
7498 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
7499 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
7500 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
7501 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
7502 EXTERN_C_PUSH/EXTERN_C_POP.
7503 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
7504 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
7505 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
7506 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
7507 (traceframe_write_count, traceframe_read_count)
7508 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
7509 (about_to_request_buffer_space, get_trace_state_variable_value)
7510 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
7511 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
7512 EXTERN_C_PUSH/EXTERN_C_POP.
7513 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
7514 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
7515 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
7516 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
7517 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
7518 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
7519 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
7520 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
7521 Define.
7522 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
7523 (IP_AGENT_EXPORT_VAR_DECL): Define.
7524 (tracing): Declare.
7525 (gdb_agent_get_raw_reg): Declare.
7526
fe978cb0
PA
75272015-02-27 Tom Tromey <tromey@redhat.com>
7528 Pedro Alves <palves@redhat.com>
7529
7530 Rename symbols whose names are reserved C++ keywords throughout.
7531
3bc3d82a
PA
75322015-02-27 Pedro Alves <palves@redhat.com>
7533
7534 * Makefile.in (COMPILER): New, get it from autoconf.
7535 (CXX): Get from autoconf instead.
7536 (COMPILE.pre): Use COMPILER.
7537 (CC-LD): Rename to ...
7538 (CC_LD): ... this. Use COMPILER.
7539 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
7540 (CXX_FOR_TARGET): Default to g++ instead of gcc.
7541 * acinclude.m4: Include build-with-cxx.m4.
7542 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
7543 Disable -Werror by default if building in C++ mode.
7544 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
7545 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
7546 the C++ compiler. Save/restore CXXFLAGS too.
7547 * configure: Regenerate.
7548
07697489
PA
75492015-02-27 Pedro Alves <palves@redhat.com>
7550
7551 * acinclude.m4: Include libiberty.m4.
7552 * configure.ac: Call libiberty_INIT.
7553 * config.in, configure: Regenerate.
7554
9beb7c4e
PA
75552015-02-26 Pedro Alves <palves@redhat.com>
7556
7557 * linux-low.c (linux_wait_1): When incrementing the PC past a
7558 program breakpoint always use the_low_target.breakpoint_len as
7559 increment, rather than the maximum between that and
7560 the_low_target.decr_pc_after_break.
7561
8090aef2
PA
75622015-02-23 Pedro Alves <palves@redhat.com>
7563
7564 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
7565 thread was doing a step-over; always adjust the PC if
7566 we stepped over a permanent breakpoint.
7567 (linux_wait_1): If we stepped over breakpoint that was on top of a
7568 permanent breakpoint, manually advance the PC past it.
7569
bc9540e8
PA
75702015-02-23 Pedro Alves <palves@redhat.com>
7571
7572 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
7573 modes.
7574 (x86_fill_gregset, x86_store_gregset): Use it when handling
7575 $orig_eax.
7576
2db9a427
PA
75772015-02-20 Pedro Alves <palves@redhat.com>
7578
7579 * thread-db.c: Include "nat/linux-procfs.h".
7580 (thread_db_init): Skip listing new threads if the kernel supports
7581 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
7582
afa8d396
PA
75832015-02-20 Pedro Alves <palves@redhat.com>
7584
7585 * linux-low.c (status_pending_p_callback): Use ptid_match.
7586
c9587f88
AT
75872015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
7588
7589 PR breakpoints/16812
7590 * linux-low.c (wstatus_maybe_breakpoint): Remove.
7591 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
7592 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
7593
b05ec7a5
AT
75942015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
7595
7596 PR breakpoints/15956
7597 * tracepoint.c (cmd_qtinit): Add check for current_thread.
7598
d33501a5
MM
75992015-02-09 Markus Metzger <markus.t.metzger@intel.com>
7600
7601 * linux-low.c (linux_low_btrace_conf): Print size.
7602 * server.c (handle_btrace_conf_general_set): New.
7603 (hanle_general_set): Call handle_btrace_conf_general_set.
7604 (handle_query): Report Qbtrace-conf:bts:size as supported.
7605
f4abbc16
MM
76062015-02-09 Markus Metzger <markus.t.metzger@intel.com>
7607
7608 * linux-low.c (linux_low_enable_btrace): Update parameters.
7609 (linux_low_btrace_conf): New.
7610 (linux_target_ops)<to_btrace_conf>: Initialize.
7611 * server.c (current_btrace_conf): New.
7612 (handle_btrace_enable): Rename to ...
7613 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
7614 to target_enable_btrace. Update comment. Update users.
7615 (handle_qxfer_btrace_conf): New.
7616 (qxfer_packets): Add btrace-conf entry.
7617 (handle_query): Report qXfer:btrace-conf:read as supported packet.
7618 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
7619 (target_ops)<read_btrace_conf>: New.
7620 (target_enable_btrace): Update parameters.
7621 (target_read_btrace_conf): New.
7622
043c3577
MM
76232015-02-09 Markus Metzger <markus.t.metzger@intel.com>
7624
7625 * server.c (handle_btrace_general_set): Remove call to
7626 target_supports_btrace.
7627 (supported_btrace_packets): New.
7628 (handle_query): Call supported_btrace_packets.
7629 * target.h: include btrace-common.h.
7630 (btrace_target_info): Removed.
7631 (supports_btrace, target_supports_btrace): Update parameters.
7632
734b0e4b
MM
76332015-02-09 Markus Metzger <markus.t.metzger@intel.com>
7634
7635 * Makefile.in (SFILES): Add common/btrace-common.c.
7636 (OBS): Add common/btrace-common.o.
7637 (btrace-common.o): Add build rules.
7638 * linux-low: Include btrace-common.h.
7639 (linux_low_read_btrace): Use struct btrace_data. Call
7640 btrace_data_init and btrace_data_fini.
7641
d6c146e9
PA
76422015-02-06 Pedro Alves <palves@redhat.com>
7643
7644 * thread-db.c (find_new_threads_callback): Add debug output.
7645
20ba1ce6
PA
76462015-02-04 Pedro Alves <palves@redhat.com>
7647
7648 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
7649 (resume_stopped_resumed_lwps): New function.
7650 (linux_wait_for_event_filtered): Use it.
7651
8cc73a39
SDJ
76522015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
7653
7654 * Makefile.in (SFILES): Add linux-personality.c.
7655 (linux-personality.o): New rule.
7656 * configure.srv (srv_linux_obj): Add linux-personality.o to the
7657 list of objects to be built.
7658 * linux-low.c: Include nat/linux-personality.h.
7659 (linux_create_inferior): Remove code to disable address space
7660 randomization (moved to ../nat/linux-personality.c). Create
7661 cleanup to disable address space randomization.
7662
fb23d554
SDJ
76632015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
7664
7665 * Makefile.in (posix-strerror.o): New rule.
7666 (mingw-strerror.o): Likewise.
7667 * configure: Regenerated.
7668 * configure.ac: Source file ../common/common.host. Initialize new
7669 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
7670
cdf43629
YQ
76712015-01-14 Yao Qi <yao@codesourcery.com>
7672
7673 * Makefile.in (SFILES): Add nat/ppc-linux.c.
7674 (ppc-linux.o): New rule.
7675 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
7676 * configure.ac: AC_CHECK_FUNCS(getauxval).
7677 * config.in: Re-generated.
7678 * configure: Re-generated.
7679 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
7680 ppc64_64bit_inferior_p
7681
514c5338
YQ
76822015-01-14 Yao Qi <yao@codesourcery.com>
7683
7684 * linux-ppc-low.c: Include "nat/ppc-linux.h".
7685 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
7686 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
7687 (PT_ORIG_R3, PT_TRAP): Likewise.
7688 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
7689 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
7690 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
7691
3368c1e5
JB
76922015-01-10 Joel Brobecker <brobecker@adacore.com>
7693
7694 * i387-fp.c (i387_cache_to_xsave): In look over
7695 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
7696 zmmh_low_space field by use of zmmh_high_space.
7697
582511be
PA
76982015-01-09 Pedro Alves <palves@redhat.com>
7699
7700 * linux-low.c (step_over_bkpt): Move higher up in the file.
7701 (handle_extended_wait): Don't store the stop_pc here.
7702 (get_stop_pc): Adjust comments and rename to ...
7703 (check_stopped_by_breakpoint): ... this. Record whether the LWP
7704 stopped for a software breakpoint or hardware breakpoint.
7705 (thread_still_has_status_pending_p): New function.
7706 (status_pending_p_callback): Use
7707 thread_still_has_status_pending_p. If the event is no longer
7708 interesting, resume the LWP.
7709 (handle_tracepoints): Add assert.
7710 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
7711 (wstatus_maybe_breakpoint): New function.
7712 (cancel_breakpoint): Delete function.
7713 (check_stopped_by_watchpoint): New function, factored out from
7714 linux_low_filter_event.
7715 (lp_status_maybe_breakpoint): Delete function.
7716 (linux_low_filter_event): Remove filter_ptid argument.
7717 Leave thread group exits pending here. Store the LWP's stop PC.
7718 Always leave events pending.
7719 (linux_wait_for_event_filtered): Pull all events out of the
7720 kernel, and leave them all pending.
7721 (count_events_callback, select_event_lwp_callback): Consider all
7722 events.
7723 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
7724 (select_event_lwp): Only give preference to the stepping LWP in
7725 all-stop mode. Adjust comments.
7726 (ignore_event): New function.
7727 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
7728 references to cancel_breakpoints. Adjust to renames. Also give
7729 equal priority to all LWPs that have had events in non-stop mode.
7730 If reporting a software breakpoint event, unadjust the LWP's PC.
7731 (linux_wait): If linux_wait_1 returned an ignored event, retry.
7732 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
7733 Adjust.
7734 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
7735 (resume_status_pending_p): Use thread_still_has_status_pending_p.
7736 (linux_stopped_by_watchpoint): Adjust.
7737 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
7738 * linux-low.h (enum lwp_stop_reason): New.
7739 (struct lwp_info) <stop_pc>: Adjust comment.
7740 <stopped_by_watchpoint>: Delete field.
7741 <stop_reason>: New field.
7742 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
7743 * mem-break.c (software_breakpoint_inserted_here)
7744 (hardware_breakpoint_inserted_here): New function.
7745 * mem-break.h (software_breakpoint_inserted_here)
7746 (hardware_breakpoint_inserted_here): Declare.
7747 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
7748 (cancel_breakpoints): Delete.
7749 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
7750 (upload_fast_traceframes): Remove references to
7751 cancel_breakpoints.
7752
a33e3959
PA
77532015-01-09 Pedro Alves <palves@redhat.com>
7754
7755 * thread-db.c (find_new_threads_callback): Ignore thread if the
7756 kernel thread ID is -1.
7757
8784d563
PA
77582015-01-09 Pedro Alves <palves@redhat.com>
7759
7760 * linux-low.c (linux_attach_fail_reason_string): Move to
7761 nat/linux-ptrace.c, and rename.
7762 (linux_attach_lwp): Update comment.
7763 (attach_proc_task_lwp_callback): New function.
7764 (linux_attach): Adjust to rename and use
7765 linux_proc_attach_tgid_threads.
7766 (linux_attach_fail_reason_string): Delete declaration.
7767
76f2b779
JB
77682015-01-01 Joel Brobecker <brobecker@adacore.com>
7769
7770 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
7771 * server.c (gdbserver_version): Likewise.
7772
fafcc06a
SDJ
77732014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
7774
7775 * remote-utils.c: Include ctype.h.
7776 (input_interrupt): Explicitly handle the case when the char
7777 received is the NUL byte. Improve the printing of non-ASCII
7778 characters.
7779
beed38b8
JB
77802014-12-16 Joel Brobecker <brobecker@adacore.com>
7781
7782 * linux-low.c (linux_low_filter_event): Update call to
7783 linux_enable_event_reporting following the addition of
7784 a new parameter to that function.
7785
bf330350
CU
77862014-12-16 Catalin Udma <catalin.udma@freescale.com>
7787
7788 PR server/17457
7789 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
7790 (AARCH64_FPCR_REGNO): Likewise.
7791 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
7792 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
7793 (aarch64_store_fpregset): Likewise.
7794
5227d625
JB
77952014-12-15 Joel Brobecker <brobecker@adacore.com>
7796
7797 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
7798 Remove FIXME comment about assumption about N.
7799
f93b65a0
JB
78002014-12-13 Joel Brobecker <brobecker@adacore.com>
7801
7802 * configure.ac: If large-file support is disabled in GDBserver,
7803 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
7804 * configure: Regenerate.
7805
e5a9158d
AA
78062014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7807
7808 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
7809 warning upon ENODATA from ptrace.
7810 * linux-s390-low.c (s390_store_tdb): New.
7811 (s390_regsets): Add regset for NT_S390_TDB.
7812
feea5f36
AA
78132014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7814
7815 * linux-low.c (regsets_store_inferior_registers): Skip regsets
7816 without a fill_function.
7817 * linux-s390-low.c (s390_fill_last_break): Remove.
7818 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
7819 (s390_arch_setup): Use regset's size instead of fill_function for
7820 loop end condition.
7821
098dbe61
AA
78222014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7823
7824 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
7825 the regset's store function when ptrace returned an error.
7826 * regcache.c (get_thread_regcache): Invalidate register cache
7827 before fetching inferior's registers.
7828
28eef672
AA
78292014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7830
7831 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
7832 while-loop as for-loop.
7833 (regsets_store_inferior_registers): Likewise.
7834
bdca27a2
YQ
78352014-11-28 Yao Qi <yao@codesourcery.com>
7836
7837 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
7838 * config.in, configure: Re-generate.
7839 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
7840 is defined.
7841
9c232dda
YQ
78422014-11-21 Yao Qi <yao@codesourcery.com>
7843
7844 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
7845 (AC_CHECK_HEADERS): Remove malloc.h.
7846 * configure: Re-generated.
7847 * config.in: Re-generated.
7848 * server.h: Don't include alloca.h and malloc.h.
7849 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
7850 Don't include malloc.h.
7851
43968415
JB
78522014-11-17 Joel Brobecker <brobecker@adacore.com>
7853
7854 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
7855 corresponding ERRNO check in same block.
7856
40e91bc7
PA
78572014-11-12 Pedro Alves <palves@redhat.com>
7858
7859 * server.c (cont_thread): Update comment.
7860 (start_inferior, attach_inferior): No longer clear cont_thread.
7861 (handle_v_cont): No longer set cont_thread.
7862 (captured_main): Clear cont_thread each time a GDB connects.
7863
c2c118cf
PA
78642014-11-12 Pedro Alves <palves@redhat.com>
7865
7866 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
7867 thread, and don't resume all threads if the Hc thread has exited.
7868
78708b7c
PA
78692014-11-12 Pedro Alves <palves@redhat.com>
7870
7871 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
7872 the process group instead of to a specific LWP.
7873
a2abc7de
PA
78742014-10-15 Pedro Alves <palves@redhat.com>
7875
7876 PR server/17487
7877 * win32-arm-low.c (arm_set_thread_context): Remove current_event
7878 parameter.
7879 (arm_set_thread_context): Delete.
7880 (the_low_target): Adjust.
7881 * win32-i386-low.c (debug_registers_changed)
7882 (debug_registers_used): Delete.
7883 (update_debug_registers_callback): New function.
7884 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
7885 needing to update their debug registers.
7886 (win32_get_current_dr): New function.
7887 (x86_dr_low_get_addr, x86_dr_low_get_control)
7888 (x86_dr_low_get_status): Fetch the debug register from the thread
7889 record's context.
7890 (i386_initial_stuff): Adjust.
7891 (i386_get_thread_context): Remove current_event parameter. Don't
7892 clear debug_registers_changed nor copy DR values to
7893 debug_reg_state.
7894 (i386_set_thread_context): Delete.
7895 (i386_prepare_to_resume): New function.
7896 (i386_thread_added): Mark the thread as needing to update irs
7897 debug registers.
7898 (the_low_target): Remove i386_set_thread_context and install
7899 i386_prepare_to_resume.
7900 * win32-low.c (win32_get_thread_context): Adjust.
7901 (win32_set_thread_context): Use SetThreadContext
7902 directly.
7903 (win32_prepare_to_resume): New function.
7904 (win32_require_context): New function, factored out from ...
7905 (thread_rec): ... this.
7906 (continue_one_thread): Call win32_prepare_to_resume on each thread
7907 we're about to continue.
7908 (win32_resume): Call win32_prepare_to_resume on the event thread.
7909 * win32-low.h (struct win32_thread_info)
7910 <debug_registers_changed>: New field.
7911 (struct win32_target_ops): Change prototype of set_thread_context,
7912 delete set_thread_context and add prepare_to_resume.
7913 (win32_require_context): New declaration.
7914
a442d071
GB
79152014-10-08 Gary Benson <gbenson@redhat.com>
7916
7917 * server.h: Do not include common-exceptions.h.
7918
6f1947e8
GB
79192014-10-08 Gary Benson <gbenson@redhat.com>
7920
7921 * server.h: Do not include cleanups.h.
7922
63b434a4
JH
79232014-09-30 James Hogan <james.hogan@imgtec.com>
7924
7925 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
7926 mips64-dsp-linux.c.
7927
c4d9ceb6
YQ
79282014-09-23 Yao Qi <yao@codesourcery.com>
7929
7930 * linux-low.c (lp_status_maybe_breakpoint): New function.
7931 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
7932 (count_events_callback): Likewise.
7933 (select_event_lwp_callback): Likewise.
7934 (cancel_breakpoints_callback): Likewise.
7935
89a5711c
DB
79362014-09-19 Don Breazeal <donb@codesourcery.com>
7937
7938 * linux-low.c (handle_extended_wait): Call
7939 linux_ptrace_get_extended_event.
7940 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
7941 linux_is_extended_waitstatus.
7942
bffc0964
JB
79432014-09-16 Joel Brobecker <brobecker@adacore.com>
7944
7945 * Makefile.in (CPPFLAGS): Define.
7946 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
7947 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
7948
0bfdf32f
GB
79492014-09-16 Gary Benson <gbenson@redhat.com>
7950
7951 * inferiors.h (current_inferior): Renamed as...
7952 (current_thread): New variable. All uses updated.
7953 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
7954 (maybe_move_out_of_jump_pad): Likewise.
7955 (cancel_breakpoint): Likewise.
7956 (linux_low_filter_event): Likewise.
7957 (wait_for_sigstop): Likewise.
7958 (linux_resume_one_lwp): Likewise.
7959 (need_step_over_p): Likewise.
7960 (start_step_over): Likewise.
7961 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
7962 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
7963 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
7964 and save_inferior as saved_thread.
7965 * regcache.c (get_thread_regcache): Renamed saved_inferior as
7966 saved_thread.
7967 (regcache_invalidate_thread): Likewise.
7968 * remote-utils.c (prepare_resume_reply): Likewise.
7969 * thread-db.c (thread_db_get_tls_address): Likewise.
7970 (disable_thread_event_reporting): Likewise.
7971 (remove_thread_event_breakpoints): Likewise.
7972 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
7973 as saved_thread.
7974 * target.h (set_desired_inferior): Renamed as...
7975 (set_desired_thread): New declaration. All uses updated.
7976 * server.c (myresume): Updated comment to reference thread instead
7977 of inferior.
7978 (handle_serial_event): Likewise.
7979 (handle_target_event): Likewise.
7980
361c8ade
GB
79812014-09-12 Tom Tromey <tromey@redhat.com>
7982 Gary Benson <gbenson@redhat.com>
7983
7984 * regcache.h: Include common-regcache.h.
7985 (regcache_read_pc): Don't declare.
7986 * regcache.c (get_thread_regcache_for_ptid): New function.
7987
bd9269f7
GB
79882014-09-11 Tom Tromey <tromey@redhat.com>
7989 Gary Benson <gbenson@redhat.com>
7990
7991 * symbol.c: New file.
7992 * Makefile.in (SFILES): Add symbol.c.
7993 (OBS): Add symbol.o.
7994
f8c1d06b
GB
79952014-09-11 Gary Benson <gbenson@redhat.com>
7996
7997 * target.c (target_stop_ptid, target_continue_ptid): New
7998 functions.
7999
721ec300
GB
80002014-09-11 Tom Tromey <tromey@redhat.com>
8001 Gary Benson <gbenson@redhat.com>
8002
8003 * target.h: Include target/target.h.
8004 * target.c (target_read_memory, target_read_uint32)
8005 (target_write_memory): New functions.
8006
c5e92cca
GB
80072014-09-11 Gary Benson <gbenson@redhat.com>
8008
8009 * server.h (debug_hw_points): Don't declare.
8010 * server.c (debug_hw_points): Don't define. Replace all uses
8011 with show_debug_regs.
8012 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
8013 all uses with show_debug_regs.
8014
2e4bb98a
EBM
80152014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
8016
8017 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
8018 endianness into account.
8019 (ppc_supply_ptrace_register): Likewise.
8020
ac740bc7
JH
80212014-09-03 James Hogan <james.hogan@imgtec.com>
8022
8023 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
8024 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
8025
97ea6506
GB
80262014-09-03 Gary Benson <gbenson@redhat.com>
8027
8028 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
8029 ALL_DEBUG_ADDRESS_REGISTERS.
8030
df7e5265
GB
80312014-09-02 Gary Benson <gbenson@redhat.com>
8032
8033 * i386-low.h: Renamed as...
8034 * x86-low.h: New file. All type, function and variable name
8035 prefixes changed from "i386_" to "x86_". All references updated.
8036 * i386-low.c: Renamed as...
8037 * x86-low.c: New file. All type, function and variable name
8038 prefixes changed from "i386_" to "x86_". All references updated.
8039
ed859da7
GB
80402014-09-02 Gary Benson <gbenson@redhat.com>
8041
8042 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
8043 (x86_linux_new_thread): Likewise.
8044
860789c7
GB
80452014-08-29 Gary Benson <gbenson@redhat.com>
8046
8047 * server.h (setjmp.h): Do not include.
8048 (toplevel): Do not declare.
8049 (common-exceptions.h): Include.
8050 (cleanups.h): Likewise.
8051 * server.c (toplevel): Do not define.
8052 (exit_code): New static global.
8053 (detach_or_kill_for_exit_cleanup): New function.
8054 (main): New function. Original main renamed to...
8055 (captured_main): New function.
8056 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
8057
ff55e1b5
GB
80582014-08-29 Gary Benson <gbenson@redhat.com>
8059
8060 * Makefile.in (SFILES): Add common/common-exceptions.c.
8061 (OBS): Add common-exceptions.o.
8062 (common-exceptions.o): New rule.
8063 * utils.c (prepare_to_throw_exception): New function.
8064
e9bcb658
GB
80652014-08-29 Gary Benson <gbenson@redhat.com>
8066
8067 * config.in: Regenerate.
8068 * configure: Likewise.
8069
e3180625
GB
80702014-08-29 Gary Benson <gbenson@redhat.com>
8071
8072 * Makefile.in (SFILES): Add common/cleanups.c.
8073 (OBS): cleanups.o.
8074 (cleanups.o): New rule.
8075
e3d6ba5d
GB
80762014-08-29 Gary Benson <gbenson@redhat.com>
8077
8078 * utils.c (internal_vwarning): New function.
8079
7096e886
GB
80802014-08-28 Gary Benson <gbenson@redhat.com>
8081
8082 * utils.h (fatal): Remove declaration.
8083 * utils.c (fatal): Remove function.
8084
14ce3192
GB
80852014-08-28 Gary Benson <gbenson@redhat.com>
8086
8087 * tracepoint.c (gdb_agent_init): Replace fatal with
8088 perror_with_name.
8089 (initialize_tracepoint): Likewise.
8090
50278d59
GB
80912014-08-28 Gary Benson <gbenson@redhat.com>
8092
8093 * remote-utils.c (remote_prepare): Replace fatal with error.
8094
aa96c426
GB
80952014-08-28 Gary Benson <gbenson@redhat.com>
8096
8097 * linux-low.c (linux_async): Replace fatal with warning.
8098 Tidy up and return.
8099 (linux_start_non_stop): Return -1 if linux_async failed.
8100
f7160e97
GB
81012014-08-28 Gary Benson <gbenson@redhat.com>
8102
8103 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
8104 gdb_assert.
8105 (i386_dr_low_get_addr): Remove vague comment.
8106 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
8107 gdb_assert.
8108
38e08fca
GB
81092014-08-28 Gary Benson <gbenson@redhat.com>
8110
8111 * inferiors.c (get_thread_process): Replace check with gdb_assert.
8112 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
8113 internal_error.
8114 (linux_resume_one_lwp): Likewise.
8115 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
8116 gdb_assert.
8117 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
8118 with internal_error.
8119 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
8120 (init_register_cache): Replace fatal with gdb_assert_not_reached.
8121 (find_register_by_name): Replace fatal with internal_error.
8122 (find_regno): Likewise.
8123 * tdesc.c (init_target_desc): Replace check with gdb_assert.
8124 * thread-db.c (thread_db_create_event): Likewise.
8125 (thread_db_load_search): Likewise.
8126 (try_thread_db_load_1): Likewise.
8127 * tracepoint.c (get_jump_space_head): Replace fatal with
8128 internal_error.
8129 (claim_trampoline_space): Likewise.
8130 (have_fast_tracepoint_trampoline_buffer): Likewise.
8131 (cmd_qtstart): Likewise.
8132 (stop_tracing): Likewise.
8133 (fast_tracepoint_collecting): Likewise.
8134 (target_malloc): Likewise.
8135 (download_tracepoint): Likewise.
8136 (download_trace_state_variables): Replace check with gdb_assert.
8137 (upload_fast_traceframes): Replace fatal with internal_error.
8138
34abf635
GB
81392014-08-19 Tom Tromey <tromey@redhat.com>
8140 Gary Benson <gbenson@redhat.com>
8141
8142 * Makefile.in (SFILES): Add common/common-debug.c.
8143 (OBS): Add common-debug.o.
8144 (common-debug.o): New rule.
8145 * debug.h (debug_printf): Don't declare.
8146 * debug.c (debug_printf): Renamed and rewritten as...
8147 (debug_vprintf): New function.
8148
f6e94d78
GB
81492014-08-19 Gary Benson <gbenson@redhat.com>
8150
8151 * utils.h: Do not include print-utils.h.
8152
9239eeab
GB
81532014-08-19 Tom Tromey <tromey@redhat.com>
8154 Gary Benson <gbenson@redhat.com>
8155
8156 * server.h: Add static assertion.
8157 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
8158
ef87c8bb
GB
81592014-08-19 Tom Tromey <tromey@redhat.com>
8160 Gary Benson <gbenson@redhat.com>
8161
8162 * Makefile.in (SFILES): Add common/errors.c.
8163 (OBS): Add errors.o.
8164 (IPA_OBS): Add errors-ipa.o.
8165 (errors.o): New rule.
8166 (errors-ipa.o): Likewise.
8167 * utils.h (perror_with_name, error, warning): Don't declare.
8168 * utils.c (warning): Renamed and rewritten as...
8169 (vwarning): New function.
8170 (error): Renamed and rewritten as...
8171 (verror): New function.
8172 (internal_error): Renamed and rewritten as...
8173 (internal_verror): New function.
8174
bb974a24
GB
81752014-08-07 Gary Benson <gbenson@redhat.com>
8176
8177 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
8178 * configure: Regenerate.
8179 * config.in: Likewise.
8180 * server.h: Do not include errno.h.
8181 * event-loop.c: Likewise.
8182 * hostio-errno.c: Likewise.
8183 * linux-low.c: Likewise.
8184 * remote-utils.c: Likewise.
8185 * spu-low.c: Likewise.
8186 * utils.c: Likewise.
8187 * gdbreplay.c: Unconditionally include errno.h.
8188
6d3d12eb
GB
81892014-08-07 Gary Benson <gbenson@redhat.com>
8190
8191 * server.h: Do not include string.h.
8192 * event-loop.c: Likewise.
8193 * linux-low.c: Likewise.
8194 * regcache.c: Likewise.
8195 * remote-utils.c: Likewise.
8196 * spu-low.c: Likewise.
8197 * utils.c: Likewise.
8198
dccbb609
GB
81992014-08-07 Gary Benson <gbenson@redhat.com>
8200
8201 * server.h: Do not include gdb_assert.h.
8202
e76df0d0
GB
82032014-08-07 Gary Benson <gbenson@redhat.com>
8204
8205 * server.h: Do not include common-utils.h.
8206
4cb9c816
GB
82072014-08-07 Gary Benson <gbenson@redhat.com>
8208
8209 * server.h: Do not include ptid.h.
8210 * notif.h: Likewise.
8211
3995eeee
GB
82122014-08-07 Gary Benson <gbenson@redhat.com>
8213
8214 * server.h: Do not include gdb_locale.h.
8215
cb9f1a9b
GB
82162014-08-07 Gary Benson <gbenson@redhat.com>
8217
8218 * server.h: Do not include gdb/signals.h.
8219 * win32-low.c: Likewise.
8220
a5fceff8
GB
82212014-08-07 Gary Benson <gbenson@redhat.com>
8222
8223 * server.h: Do not include pathmax.h.
8224
b9391142
GB
82252014-08-07 Gary Benson <gbenson@redhat.com>
8226
8227 * server.h: Do not include libiberty.h.
8228 * linux-bfin-low.c: Likewise.
8229
0e443c87
GB
82302014-08-07 Gary Benson <gbenson@redhat.com>
8231
8232 * server.h: Do not include ansidecl.h.
8233
8ebb3f56
GB
82342014-08-07 Gary Benson <gbenson@redhat.com>
8235
8236 * linux-x86-low.c: Do not include stddef.h.
8237 * lynx-ppc-low.c: Likewise.
8238 * tracepoint.c: Likewise.
8239
8980bdf6
GB
82402014-08-07 Gary Benson <gbenson@redhat.com>
8241
8242 * server.h: Do not include stdarg.h.
8243 * nto-low.c: Likewise.
8244
d7096f71
GB
82452014-08-07 Gary Benson <gbenson@redhat.com>
8246
8247 * server.h: Do not include stdlib.h.
8248 * inferiors.c: Likewise.
8249 * linux-low.c: Likewise.
8250 * regcache.c: Likewise.
8251 * spu-low.c: Likewise.
8252 * tracepoint.c: Likewise.
8253 * utils.c: Likewise.
8254
d02f550d
GB
82552014-08-07 Gary Benson <gbenson@redhat.com>
8256
8257 * server.h: Do not include stdio.h.
8258 * linux-low.c: Likewise.
8259 * remote-utils.c: Likewise.
8260 * spu-low.c: Likewise.
8261 * utils.c: Likewise.
8262 * wincecompat.c: Likewise.
8263
87f6c4e3
GB
82642014-08-06 Gary Benson <gbenson@redhat.com>
8265
8266 * regcache.c (init_register_cache): Move conditionals inside if.
8267
7089dca4
GB
82682014-08-06 Gary Benson <gbenson@redhat.com>
8269
8270 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
8271
462f517e
GB
82722014-07-31 Gary Benson <gbenson@redhat.com>
8273
8274 * ax.h: Do not include server.h.
8275 * gdbthread.h: Likewise.
8276 * lynx-low.h: Likewise.
8277 * notif.h: Likewise.
8278
976411d6
GB
82792014-07-30 Gary Benson <gbenson@redhat.com>
8280
8281 * server.h: Include common-defs.h.
8282 Do not include config.h or build-gnulib-gdbserver/config.h.
8283
d41f6d8e
GB
82842014-07-30 Gary Benson <gbenson@redhat.com>
8285
8286 * hostio-errno.c: Move server.h to top of includes list.
8287 * inferiors.c: Likewise.
8288 * linux-x86-low.c: Likewise.
8289 * notif.c: Include server.h.
8290
314c6a35
TT
82912014-07-24 Tom Tromey <tromey@redhat.com>
8292 Gary Benson <gbenson@redhat.com>
8293
8294 * server.h (CORE_ADDR): Now unsigned.
8295
69ff6be5
PA
82962014-07-16 Pedro Alves <palves@redhat.com>
8297
8298 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
8299
ce9e3fe7
PA
83002014-07-15 Pedro Alves <palves@redhat.com>
8301
8302 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
8303 copy.
8304
e76126e8
PA
83052014-07-11 Pedro Alves <palves@redhat.com>
8306
8307 * linux-low.c (kill_wait_lwp): New function, based on
8308 kill_one_lwp_callback, but use my_waitpid directly.
8309 (kill_one_lwp_callback, linux_kill): Use it.
8310
8e9db26e
PA
83112014-06-23 Pedro Alves <palves@redhat.com>
8312
8313 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
8314 before setting DR0..DR3.
8315
698b3e08
GB
83162014-06-20 Gary Benson <gbenson@redhat.com>
8317
8318 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
8319 * configure: Regenerated.
8320 * config.in: Likewise.
8321
125f8a3d
GB
83222014-06-20 Gary Benson <gbenson@redhat.com>
8323
8324 * Makefile.in (SFILES): Update locations for files moved
8325 from common to nat.
8326 (object file files): Reordered.
8327
42995dbd
GB
83282014-06-20 Gary Benson <gbenson@redhat.com>
8329
8330 * i386-low.h (i386_dr_low_can_set_addr): Removed.
8331 (i386_dr_low_set_addr): Likewise.
8332 (i386_dr_low_get_addr): Likewise.
8333 (i386_dr_low_can_set_control): Likewise.
8334 (i386_dr_low_set_control): Likewise.
8335 (i386_dr_low_get_control): Likewise.
8336 (i386_dr_low_get_status): Likewise.
8337 (i386_get_debug_register_length): Likewise.
8338 * linux-x86-low.c (i386_dr_low_set_addr):
8339 Changed signature. Made static.
8340 (i386_dr_low_get_addr): Likewise.
8341 (i386_dr_low_set_control): Likewise.
8342 (i386_dr_low_get_control): Likewise.
8343 (i386_dr_low_get_status): Likewise.
8344 (i386_dr_low): New global variable.
8345 * win32-i386-low.c (i386_dr_low_set_addr):
8346 Changed signature. Made static.
8347 (i386_dr_low_get_addr): Likewise.
8348 (i386_dr_low_set_control): Likewise.
8349 (i386_dr_low_get_control): Likewise.
8350 (i386_dr_low_get_status): Likewise.
8351 (i386_dr_low): New global variable.
8352
e1d2394b
MS
83532014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
8354
8355 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
8356 * Makefile.in (AR, AR_FLAGS): Define.
8357 * configure: Regenerate.
8358
3a8ee006
GB
83592014-06-19 Gary Benson <gbenson@redhat.com>
8360
8361 * Makefile.in (i386-dregs.o): New rule.
8362 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
8363 * i386-low.c (target.h): Remove include.
8364 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
8365 (DR_CONTROL_SHIFT): Likewise.
8366 (DR_CONTROL_SIZE): Likewise.
8367 (DR_RW_EXECUTE): Likewise.
8368 (DR_RW_WRITE): Likewise.
8369 (DR_RW_READ): Likewise.
8370 (DR_RW_IORW): Likewise.
8371 (DR_LEN_1): Likewise.
8372 (DR_LEN_2): Likewise.
8373 (DR_LEN_4): Likewise.
8374 (DR_LEN_8): Likewise.
8375 (DR_LOCAL_ENABLE_SHIFT): Likewise.
8376 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
8377 (DR_ENABLE_SIZE): Likewise.
8378 (DR_LOCAL_SLOWDOWN): Likewise.
8379 (DR_GLOBAL_SLOWDOWN): Likewise.
8380 (DR_CONTROL_RESERVED): Likewise.
8381 (I386_DR_CONTROL_MASK): Likewise.
8382 (I386_DR_VACANT): Likewise.
8383 (I386_DR_LOCAL_ENABLE): Likewise.
8384 (I386_DR_GLOBAL_ENABLE): Likewise.
8385 (I386_DR_DISABLE): Likewise.
8386 (I386_DR_SET_RW_LEN): Likewise.
8387 (I386_DR_GET_RW_LEN): Likewise.
8388 (I386_DR_WATCH_HIT): Likewise.
8389 (i386_wp_op_t): Likewise.
8390 (i386_show_dr): Likewise.
8391 (i386_length_and_rw_bits): Likewise.
8392 (i386_insert_aligned_watchpoint): Likewise.
8393 (i386_remove_aligned_watchpoint): Likewise.
8394 (i386_handle_nonaligned_watchpoint): Likewise.
8395 i386_update_inferior_debug_regs(): Likewise.
8396 (i386_dr_insert_watchpoint): Likewise.
8397 (i386_dr_remove_watchpoint): Likewise.
8398 (i386_dr_region_ok_for_watchpoint): Likewise.
8399 (i386_dr_stopped_data_address): Likewise.
8400 (i386_dr_stopped_by_watchpoint): Likewise.
8401
8f26655c
GB
84022014-06-19 Gary Benson <gbenson@redhat.com>
8403
8404 * i386-low.c (i386_dr_show): Renamed to
8405 i386_show_dr and made static. All uses updated.
8406 (i386_dr_length_and_rw_bits): Renamed to
8407 i386_length_and_rw_bits and made static.
8408 All uses updated.
8409 (i386_dr_insert_aligned_watchpoint): Renamed to
8410 i386_insert_aligned_watchpoint and made static.
8411 All uses updated.
8412 (i386_dr_remove_aligned_watchpoint): Renamed to
8413 i386_remove_aligned_watchpoint and made static.
8414 All uses updated.
8415 (i386_dr_update_inferior_debug_regs): Renamed to
8416 i386_update_inferior_debug_regs and made static.
8417 All uses updated.
8418
b9228891
GB
84192014-06-18 Gary Benson <gbenson@redhat.com>
8420
5171def3
GB
8421 * i386-low.h (i386_dr_low_can_set_addr): New macro.
8422 (i386_dr_low_can_set_control): Likewise.
8423 (i386_get_debug_register_length): Likewise.
8424 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
8425 (i386_dr_low_can_set_control): Likewise.
8426 (i386_get_debug_register_length): Likewise.
8427
84282014-06-17 Gary Benson <gbenson@redhat.com>
8429
b9228891
GB
8430 * i386-low.h (i386-dregs.h): New include.
8431 (DR_FIRSTADDR): Now in i386-dregs.h.
8432 (DR_LASTADDR): Likewise.
8433 (DR_NADDR): Likewise.
8434 (DR_STATUS): Likewise.
8435 (DR_CONTROL): Likewise.
8436 (i386_debug_reg_state): Likewise.
8437 (i386_dr_insert_watchpoint): Likewise.
8438 (i386_dr_remove_watchpoint): Likewise.
8439 (i386_dr_region_ok_for_watchpoint): Likewise.
8440 (i386_dr_stopped_data_address): Likewise.
8441 (i386_dr_stopped_by_watchpoint): Likewise.
8442 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
8443
4be83cc2
GB
84442014-06-18 Gary Benson <gbenson@redhat.com>
8445
8446 * i386-low.h (i386_low_insert_watchpoint): Renamed to
8447 i386_dr_insert_watchpoint.
8448 (i386_low_remove_watchpoint): Renamed to
8449 i386_dr_remove_watchpoint.
8450 (i386_low_region_ok_for_watchpoint): Renamed to
8451 i386_dr_region_ok_for_watchpoint.
8452 (i386_low_stopped_data_address): Renamed to
8453 i386_dr_stopped_data_address.
8454 (i386_low_stopped_by_watchpoint): Renamed to
8455 i386_dr_stopped_by_watchpoint.
8456 * i386-low.c (i386_show_dr): Renamed to
8457 i386_dr_show and made nonstatic. All uses updated.
8458 (i386_length_and_rw_bits): Renamed to
8459 i386_dr_length_and_rw_bits and made nonstatic.
8460 All uses updated.
8461 (i386_insert_aligned_watchpoint): Renamed to
8462 i386_dr_insert_aligned_watchpoint and made nonstatic.
8463 All uses updated.
8464 (i386_remove_aligned_watchpoint): Renamed to
8465 i386_dr_remove_aligned_watchpoint and made nonstatic.
8466 All uses updated.
8467 (i386_update_inferior_debug_regs): Renamed to
8468 i386_dr_update_inferior_debug_regs and made nonstatic.
8469 All uses updated.
8470 (i386_low_insert_watchpoint): Renamed to
8471 i386_dr_insert_watchpoint. All uses updated.
8472 (i386_low_remove_watchpoint): Renamed to
8473 i386_dr_remove_watchpoint. All uses updated.
8474 (i386_low_region_ok_for_watchpoint): Renamed to
8475 i386_dr_region_ok_for_watchpoint. All uses updated.
8476 (i386_low_stopped_data_address): Renamed to
8477 i386_dr_stopped_data_address. All uses updated.
8478 (i386_low_stopped_by_watchpoint): Renamed to
8479 i386_dr_stopped_by_watchpoint. All uses updated.
8480
131aa0d4
GB
84812014-06-18 Gary Benson <gbenson@redhat.com>
8482
8483 * i386-low.c (i386_dr_low_can_set_addr): New macro.
8484 (i386_dr_low_can_set_control): Likewise.
8485 (i386_insert_aligned_watchpoint): New check.
8486
d9305f7f
GB
84872014-06-18 Gary Benson <gbenson@redhat.com>
8488
8489 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
8490 Renamed to state.
8491
e927c9fc
GB
84922014-06-18 Gary Benson <gbenson@redhat.com>
8493
8494 * i386-low.c (i386_length_and_rw_bits): Use internal_error
8495 instead of fatal and error.
8496 (i386_handle_nonaligned_watchpoint): Likewise.
8497
1b6d4134
GB
84982014-06-18 Gary Benson <gbenson@redhat.com>
8499
8500 * i386-low.c (i386_get_debug_register_length): New macro.
8501 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
8502 (i386_show_dr): Use debug_printf instead of fprintf. Use
8503 phex to format values.
8504
6e62758f
GB
85052014-06-18 Gary Benson <gbenson@redhat.com>
8506
8507 * i386-low.h: Comment changes.
8508 * i386-low.c: Likewise.
8509
fc6e2f03
GB
85102014-06-18 Gary Benson <gbenson@redhat.com>
8511
8512 * i386-low.c: Whitespace changes.
8513
f9d1eeed
TT
85142014-06-12 Tom Tromey <tromey@redhat.com>
8515
8516 * utils.c (freeargv): Remove.
8517
0b04e523
TT
85182014-06-12 Tom Tromey <tromey@redhat.com>
8519
8520 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
8521 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
8522 (parse_debug_format_options): Likewise.
8523 (gdbserver_usage): Likewise.
8524 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
8525 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
8526 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
8527 against libiberty.
8528 ($(LIBGNU)): Depend on libiberty.
8529 (all-lib): Recurse into all subdirs.
8530 (install-only): Invoke "install" target in subdirs.
8531 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
8532 targets.
8533 * configure: Rebuild.
8534 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
8535 for vasprintf, vsnprintf, or gettimeofday.
8536 * configure.srv: Don't add safe-ctype.o or lbasename.o to
8537 srv_tgtobj.
8538
270c9937
JB
85392014-06-05 Joel Brobecker <brobecker@adacore.com>
8540
8541 * development.sh: Delete.
8542 * Makefile.in (config.status): Adjust dependency on development.sh.
8543 * configure.ac: Adjust development.sh source call.
8544 * configure: Regenerate.
8545
0a261ed8
PA
85462014-06-02 Pedro Alves <palves@redhat.com>
8547
8548 * ax.c (gdb_free_agent_expr): New function.
8549 * ax.h (gdb_free_agent_expr): New declaration.
8550 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
8551 list.
8552 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
8553 static.
8554 (clear_breakpoint_conditions_and_commands): New function.
8555 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
8556 (clear_breakpoint_conditions_and_commands): New declaration.
8557
e9dae05e
RR
85582014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
8559
8560 * linux-aarch64-low.c (asm/ptrace.h): Include.
8561
5876f503
JK
85622014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
8563
8564 Fix TLS access for -static -pthread.
8565 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
8566 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
8567 (thread_db_load_search, try_thread_db_load_1): Initialize it.
8568
802e8e6d
PA
85692014-05-20 Pedro Alves <palves@redhat.com>
8570
8571 * linux-aarch64-low.c (aarch64_insert_point)
8572 (aarch64_remove_point): No longer check whether the type is
8573 supported here. Adjust to new interface.
8574 (the_low_target): Install aarch64_supports_z_point_type as
8575 supports_z_point_type method.
8576 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
8577 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
8578 instead of a Z packet char. Adjust.
8579 (arm_supports_z_point_type): New function.
8580 (arm_insert_point, arm_remove_point): Adjust to new interface.
8581 (the_low_target): Install arm_supports_z_point_type.
8582 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
8583 (cris_insert_point, cris_remove_point): Adjust to new interface.
8584 Don't check whether the type is supported here.
8585 (the_low_target): Install cris_supports_z_point_type.
8586 * linux-low.c (linux_supports_z_point_type): New function.
8587 (linux_insert_point, linux_remove_point): Adjust to new interface.
8588 * linux-low.h (struct linux_target_ops) <insert_point,
8589 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
8590 raw_breakpoint pointer parameter.
8591 <supports_z_point_type>: New method.
8592 * linux-mips-low.c (mips_supports_z_point_type): New function.
8593 (mips_insert_point, mips_remove_point): Adjust to new interface.
8594 Use mips_supports_z_point_type.
8595 (the_low_target): Install mips_supports_z_point_type.
8596 * linux-ppc-low.c (the_low_target): Install NULL as
8597 supports_z_point_type method.
8598 * linux-s390-low.c (the_low_target): Install NULL as
8599 supports_z_point_type method.
8600 * linux-sparc-low.c (the_low_target): Install NULL as
8601 supports_z_point_type method.
8602 * linux-x86-low.c (x86_supports_z_point_type): New function.
8603 (x86_insert_point): Adjust to new insert_point interface. Use
8604 insert_memory_breakpoint. Adjust to new
8605 i386_low_insert_watchpoint interface.
8606 (x86_remove_point): Adjust to remove_point interface. Use
8607 remove_memory_breakpoint. Adjust to new
8608 i386_low_remove_watchpoint interface.
8609 (the_low_target): Install x86_supports_z_point_type.
8610 * lynx-low.c (lynx_target_ops): Install NULL as
8611 supports_z_point_type callback.
8612 * nto-low.c (nto_supports_z_point_type): New.
8613 (nto_insert_point, nto_remove_point): Adjust to new interface.
8614 (nto_target_ops): Install nto_supports_z_point_type.
8615 * mem-break.c: Adjust intro comment.
8616 (struct raw_breakpoint) <raw_type, size>: New fields.
8617 <inserted>: Update comment.
8618 <shlib_disabled>: Delete field.
8619 (enum bkpt_type) <gdb_breakpoint>: Delete value.
8620 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
8621 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
8622 (raw_bkpt_type_to_target_hw_bp_type): New function.
8623 (find_enabled_raw_code_breakpoint_at): New function.
8624 (find_raw_breakpoint_at): New type and size parameters. Use them.
8625 (insert_memory_breakpoint): New function, based off
8626 set_raw_breakpoint_at.
8627 (remove_memory_breakpoint): New function.
8628 (set_raw_breakpoint_at): Reimplement.
8629 (set_breakpoint): New, based on set_breakpoint_at.
8630 (set_breakpoint_at): Reimplement.
8631 (delete_raw_breakpoint): Go through the_target->remove_point
8632 instead of assuming memory breakpoints.
8633 (find_gdb_breakpoint_at): Delete.
8634 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
8635 (find_gdb_breakpoint): New function.
8636 (set_gdb_breakpoint_at): Delete.
8637 (z_type_supported): New function.
8638 (set_gdb_breakpoint_1): New function, loosely based off
8639 set_gdb_breakpoint_at.
8640 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
8641 (delete_gdb_breakpoint_at): Delete.
8642 (delete_gdb_breakpoint_1): New function, loosely based off
8643 delete_gdb_breakpoint_at.
8644 (delete_gdb_breakpoint): New function.
8645 (clear_gdb_breakpoint_conditions): Rename to ...
8646 (clear_breakpoint_conditions): ... this. Don't handle a NULL
8647 breakpoint.
8648 (add_condition_to_breakpoint): Make static.
8649 (add_breakpoint_condition): Take a struct breakpoint pointer
8650 instead of an address. Adjust.
8651 (gdb_condition_true_at_breakpoint): Rename to ...
8652 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
8653 z_type parameter.
8654 (gdb_condition_true_at_breakpoint): Reimplement.
8655 (add_breakpoint_commands): Take a struct breakpoint pointer
8656 instead of an address. Adjust.
8657 (gdb_no_commands_at_breakpoint): Rename to ...
8658 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
8659 parameter. Return true if no breakpoint was found. Change debug
8660 output.
8661 (gdb_no_commands_at_breakpoint): Reimplement.
8662 (run_breakpoint_commands): Rename to ...
8663 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
8664 and change return type to boolean.
8665 (run_breakpoint_commands): New function.
8666 (gdb_breakpoint_here): Also check for Z1 breakpoints.
8667 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
8668 breakpoint. Go through the_target->remove_point instead of
8669 assuming memory breakpoint.
8670 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
8671 software and hardware breakpoints.
8672 (reinsert_raw_breakpoint): Go through the_target->insert_point
8673 instead of assuming memory breakpoint.
8674 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
8675 software and hardware breakpoints.
8676 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
8677 Check both software and hardware breakpoints.
8678 (validate_inserted_breakpoint): Assert the breakpoint is a
8679 software breakpoint. Set the inserted flag to -1 instead of
8680 setting shlib_disabled.
8681 (delete_disabled_breakpoints): Adjust.
8682 (validate_breakpoints): Only validate software breakpoints.
8683 Adjust to inserted flag change.
8684 (check_mem_read, check_mem_write): Skip breakpoint types other
8685 than software breakpoints. Adjust to inserted flag change.
8686 * mem-break.h (enum raw_bkpt_type): New enum.
8687 (raw_breakpoint, struct process_info): Forward declare.
8688 (Z_packet_to_target_hw_bp_type): Delete declaration.
8689 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
8690 (set_gdb_breakpoint, delete_gdb_breakpoint)
8691 (clear_breakpoint_conditions): New declarations.
8692 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
8693 (breakpoint_inserted_here): Update comment.
8694 (add_breakpoint_condition, add_breakpoint_commands): Replace
8695 address parameter with a breakpoint pointer parameter.
8696 (gdb_breakpoint_here): Update comment.
8697 (delete_gdb_breakpoint_at): Delete.
8698 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
8699 * server.c (process_point_options): Take a struct breakpoint
8700 pointer instead of an address. Adjust.
8701 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
8702 delete_gdb_breakpoint.
8703 * spu-low.c (spu_target_ops): Install NULL as
8704 supports_z_point_type method.
8705 * target.h: Include mem-break.h.
8706 (struct target_ops) <prepare_to_access_memory>: Update comment.
8707 <supports_z_point_type>: New field.
8708 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
8709 instead of a char. Also take a raw breakpoint pointer.
8710 * win32-arm-low.c (the_low_target): Install NULL as
8711 supports_z_point_type.
8712 * win32-i386-low.c (i386_supports_z_point_type): New function.
8713 (i386_insert_point, i386_remove_point): Adjust to new interface.
8714 (the_low_target): Install i386_supports_z_point_type.
8715 * win32-low.c (win32_supports_z_point_type): New function.
8716 (win32_insert_point, win32_remove_point): Adjust to new interface.
8717 (win32_target_ops): Install win32_supports_z_point_type.
8718 * win32-low.h (struct win32_target_ops):
8719 <supports_z_point_type>: New method.
8720 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
8721 instead of a char. Also take a raw breakpoint pointer.
8722
932539e3
PA
87232014-05-20 Pedro Alves <palves@redhat.com>
8724
8725 * mem-break.h: Include break-common.h.
8726 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
8727 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
8728 (Z_packet_to_target_hw_bp_type): New declaration.
8729 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
8730 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
8731 (Z_PACKET_ACCESS_WP): Delete macros.
8732 (Z_packet_to_hw_type): Delete function.
8733 * i386-low.h: Don't include break-common.h here.
8734 (Z_packet_to_hw_type): Delete declaration.
8735 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
8736 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
8737 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
8738 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
8739 * linux-aarch64-low.c: Don't include break-common.h here.
8740 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
8741 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
8742 (Z_packet_to_target_hw_bp_type): Delete function.
8743 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
8744 function.
8745 (mips_insert_point, mips_remove_point): Use
8746 Z_packet_to_target_hw_bp_type.
8747
4ff0d3d8
PA
87482014-05-20 Pedro Alves <palves@redhat.com>
8749
8750 * linux-aarch64-low.c: Include break-common.h.
8751 (enum target_point_type): Delete.
8752 (Z_packet_to_point_type): Rename to ...
8753 (Z_packet_to_target_hw_bp_type): ... this, and return a
8754 target_hw_bp_type instead.
8755 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
8756 instead of an enum target_point_type.
8757 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
8758 breakpoint type.
8759 (aarch64_dr_state_insert_one_point)
8760 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
8761 (aarch64_handle_aligned_watchpoint)
8762 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
8763 Take an enum target_hw_bp_type instead of an enum
8764 target_point_type.
8765 (aarch64_supports_z_point_type): New function.
8766 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
8767 use Z_packet_to_target_hw_bp_type.
8768
786dc519
JB
87692014-05-20 Joel Brobecker <brobecker@adacore.com>
8770
8771 * configure.ac: Only use -Werror by default when DEVELOPMENT
8772 is true.
8773 * configure: Regenerate.
8774
9e0aa64f
JK
87752014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
8776
8777 Fix gdbserver qGetTLSAddr for x86_64 -m32.
8778 * linux-x86-low.c (X86_64_USER_REGS): New.
8779 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
8780
2b577b92
YQ
87812014-04-28 Yao Qi <yao@codesourcery.com>
8782
8783 * Makefile.in (i386-avx512.c): Fix the typo of generated file
8784 name.
8785
94611da2
PA
87862014-04-25 Pedro Alves <palves@redhat.com>
8787
8788 PR server/16255
8789 * linux-low.c (linux_attach_fail_reason_string): New function.
8790 (linux_attach_lwp): Delete.
8791 (linux_attach_lwp_1): Rename to ...
8792 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
8793 argument. Remove "initial" parameter. Return int instead of
8794 void. Don't error or warn here.
8795 (linux_attach): Adjust to call linux_attach_lwp. Call error on
8796 failure to attach to the tgid. Call warning when failing to
8797 attach to an lwp.
8798 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
8799 argument. Remove "initial" parameter. Return int instead of
8800 void. Don't error or warn here.
8801 (linux_attach_fail_reason_string): New declaration.
8802 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
8803 interface change. Use linux_attach_fail_reason_string.
8804
01f9f808
MS
88052014-04-24 Michael Sturm <michael.sturm@mintel.com>
8806 Walfred Tedeschi <walfred.tedeschi@intel.com>
8807
8808 * Makefile.in: Added rules to handle new files
8809 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
8810 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
8811 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
8812 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
8813 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
8814 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
8815 x32-avx512-linux.o.
8816 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
8817 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
8818 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
8819 i386/x32-avx512.xml.
8820 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
8821 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
8822 i386/x32-avx512-linux.xml.
8823 * i387-fp.c (num_avx512_k_registers): New constant for number
8824 of K registers.
8825 (num_avx512_zmmh_low_registers): New constant for number of
8826 lower ZMM registers (0-15).
8827 (num_avx512_zmmh_high_registers): New constant for number of
8828 higher ZMM registers (16-31).
8829 (num_avx512_ymmh_registers): New contant for number of higher
8830 YMM registers (ymm16-31 added by avx521 on x86_64).
8831 (num_avx512_xmm_registers): New constant for number of higher
8832 XMM registers (xmm16-31 added by AVX512 on x86_64).
8833 (struct i387_xsave): Add space for AVX512 registers.
8834 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
8835 Add code to handle AVX512 registers.
8836 (i387_xsave_to_cache): Add code to handle AVX512 registers.
8837 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
8838 prototypei from generated file.
8839 (tdesc_amd64_avx512_linux): Likewise.
8840 (init_registers_x32_avx512_linux): Likewise.
8841 (tdesc_x32_avx512_linux): Likewise.
8842 (init_registers_i386_avx512_linux): Likewise.
8843 (tdesc_i386_avx512_linux): Likewise.
8844 (x86_64_regmap): Add AVX512 registers.
8845 (x86_linux_read_description): Add code to handle AVX512 XSTATE
8846 mask.
8847 (initialize_low_arch): Add code to initialize AVX512 registers.
8848
51aa91f9
PA
88492014-04-23 Pedro Alves <palves@redhat.com>
8850
8851 * mem-break.c (find_gdb_breakpoint_at): Make static.
8852 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
8853
a4165e94
PA
88542014-04-23 Pedro Alves <palves@redhat.com>
8855
8856 * i386-low.c: Don't include break-common.h here.
8857 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
8858 prototype to take target_hw_bp_type as argument instead of a Z
8859 packet char.
8860 * i386-low.h: Include break-common.h here.
8861 (Z_packet_to_hw_type): Declare.
8862 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
8863 prototypes.
8864 * linux-x86-low.c (x86_insert_point): Convert the packet number to
8865 a target_hw_bp_type before calling i386_low_insert_watchpoint.
8866 (x86_remove_point): Convert the packet number to a
8867 target_hw_bp_type before calling i386_low_remove_watchpoint.
8868 * win32-i386-low.c (i386_insert_point): Convert the packet number
8869 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
8870 (i386_remove_point): Convert the packet number to a
8871 target_hw_bp_type before calling i386_low_remove_watchpoint.
8872
b8acf843
PA
88732014-04-23 Pedro Alves <palves@redhat.com>
8874
8875 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
8876
d708bcd1
PA
88772014-04-10 Pedro Alves <palves@redhat.com>
8878
8879 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
8880 Check if the condition or command is NULL before checking if the
8881 breakpoint is known. On success, return true.
8882 * mem-break.h (add_breakpoint_condition): Document return.
8883 (add_breakpoint_commands): Add describing comment.
8884 * server.c (skip_to_semicolon): New function.
8885 (process_point_options): Use it.
8886
2eec7d5b
PA
88872014-04-09 Pedro Alves <palves@redhat.com>
8888
8889 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
8890 to lwpid_of.
8891
fa96cb38
PA
88922014-02-27 Pedro Alves <palves@redhat.com>
8893
8894 PR 12702
8895 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
8896 macros.
8897 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
8898 output.
8899 (last_thread_of_process_p): Take a PID argument instead of a
8900 thread pointer.
8901 (linux_wait_for_lwp): Delete.
8902 (num_lwps, check_zombie_leaders, not_stopped_callback): New
8903 functions.
8904 (linux_low_filter_event): New function, party factored out from
8905 linux_wait_for_event.
8906 (linux_wait_for_event): Rename to ...
8907 (linux_wait_for_event_filtered): ... this. Add new filter ptid
8908 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
8909 sigsuspend. Check for zombie leaders.
8910 (linux_wait_for_event): Reimplement as wrapper around
8911 linux_wait_for_event_filtered.
8912 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
8913 a normal or signal exit is seen, it's the whole process exiting.
8914 (wait_for_sigstop): No longer a for_each_inferior callback.
8915 Rewrite on top of linux_wait_for_event_filtered.
8916 (stop_all_lwps): Call wait_for_sigstop directly.
8917 * server.c (resume, handle_target_event): Handle
8918 TARGET_WAITKIND_NO_RESUMED.
8919
d763de10
JB
89202014-02-26 Joel Brobecker <brobecker@adacore.com>
8921
8922 * win32-low.c (psapi_get_dll_name,
8923 * win32_CreateToolhelp32Snapshot): Delete.
8924 (win32_CreateToolhelp32Snapshot, win32_Module32First)
8925 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
8926 Delete.
8927 (handle_load_dll): Add function description.
8928 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
8929
850a0f76
JB
89302014-02-26 Joel Brobecker <brobecker@adacore.com>
8931
8932 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
8933 Add comment.
8934 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
8935 base address when calling win32_add_one_solib.
8936 (handle_load_dll): Delete local variable load_addr.
8937 Remove 0x1000 offset applied to DLL base address when calling
8938 win32_add_one_solib.
8939 (handle_unload_dll): Add comment.
8940
f25b3fc3
JB
89412014-02-26 Joel Brobecker <brobecker@adacore.com>
8942
8943 * win32-low.c (win32_add_all_dlls): Renames
8944 win32_ensure_ntdll_loaded. Rewrite function documentation.
8945 Adjust implementation to always load all DLLs.
8946 Add 0x1000 offset to DLL base address when calling
8947 win32_add_one_solib.
8948 (child_initialization_done): New static global.
8949 (do_initial_child_stuff): Set child_initialization_done to
8950 zero during child initialization, and 1 after. Replace call
8951 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
8952 Add comment.
8953 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
8954 (handle_unload_dll): Add function documentation.
8955 (get_child_debug_event): Ignore load and unload DLL events
8956 during child initialization.
8957
d86d4aaf
DE
89582014-02-20 Doug Evans <dje@google.com>
8959
3bc32da3 8960 Remove global all_lwps.
d86d4aaf
DE
8961 * inferiors.h (ptid_of): Move here from linux-low.h.
8962 (pid_of, lwpid_of): Ditto.
8963 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
8964 parameter is a struct thread_info * now.
8965 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
8966 directly. Pass &all_threads to find_inferior instead of &all_lwps.
8967 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
8968 directly.
8969 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
8970 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
8971 * linux-arm-low.c (update_registers_callback): Update, "entry"
8972 parameter is a struct thread_info * now.
8973 Fetch lwpid from current_inferior directly.
8974 (arm_insert_point): Pass &all_threads to find_inferior instead of
8975 &all_lwps.
8976 (arm_remove_point): Ditto.
8977 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
8978 (arm_prepare_to_resume): Fetch pid from thread.
8979 (arm_read_description): Fetch lwpid from current_inferior directly.
8980 * linux-low.c (all_lwps): Delete.
8981 (delete_lwp): Delete call to remove_inferior.
8982 (handle_extended_wait): Fetch lwpid from thread.
8983 (add_lwp): Don't set lwp->entry.id. Remove call to
8984 add_inferior_to_list.
8985 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
8986 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
8987 (kill_one_lwp_callback): Ditto.
8988 (linux_kill): Don't dereference NULL pointer.
8989 Fetch ptid,lwpid from thread.
8990 (get_detach_signal): Fetch ptid from thread.
8991 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
8992 Simplify call to regcache_invalidate_thread.
8993 (delete_lwp_callback): Update, "entry" parameter is a
8994 struct thread_info * now. Fetch pid from thread.
8995 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
8996 (status_pending_p_callback): Update, "entry" parameter is a
8997 struct thread_info * now. Fetch ptid from thread.
8998 (find_lwp_pid): Update, "entry" parameter is a
8999 struct thread_info * now.
9000 (linux_wait_for_lwp): Fetch pid from thread.
9001 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
9002 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
9003 (enqueue_one_deferred_signal): Fetch lwpid from thread.
9004 (dequeue_one_deferred_signal): Ditto.
9005 (cancel_breakpoint): Fetch ptid from current_inferior.
9006 (linux_wait_for_event): Pass &all_threads to find_inferior,
9007 not &all_lwps. Fetch ptid, lwpid from thread.
9008 (count_events_callback): Update, "entry" parameter is a
9009 struct thread_info * now.
9010 (select_singlestep_lwp_callback): Ditto.
9011 (select_event_lwp_callback): Ditto.
9012 (cancel_breakpoints_callback): Ditto.
9013 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
9014 not &all_lwps.
9015 (select_event_lwp): Ditto. Fetch ptid from event_thread.
9016 (unsuspend_one_lwp): Update, "entry" parameter is a
9017 struct thread_info * now.
9018 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
9019 not &all_lwps.
9020 (linux_stabilize_threads): Ditto. And for for_each_inferior.
9021 Fetch lwpid from thread, not lwp.
9022 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
9023 Pass &all_threads to find_inferior, not &all_lwps.
9024 (send_sigstop): Fetch lwpid from thread, not lwp.
9025 (send_sigstop_callback): Update, "entry" parameter is a
9026 struct thread_info * now.
9027 (suspend_and_send_sigstop_callback): Ditto.
9028 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
9029 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
9030 struct thread_info * now.
9031 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
9032 from thread, lwp.
9033 (lwp_running): Update, "entry" parameter is a
9034 struct thread_info * now.
9035 (stop_all_lwps): Fetch ptid from thread.
9036 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
9037 (linux_resume_one_lwp): Fetch lwpid from thread.
9038 (linux_set_resume_request): Update, "entry" parameter is a
9039 struct thread_info * now. Fetch pid, lwpid from thread.
9040 (resume_status_pending_p): Update, "entry" parameter is a
9041 struct thread_info * now.
9042 (need_step_over_p): Ditto. Fetch lwpid from thread.
9043 (start_step_over): Fetch lwpid from thread.
9044 (linux_resume_one_thread): Update, "entry" parameter is a
9045 struct thread_info * now. Fetch lwpid from thread.
9046 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
9047 (proceed_one_lwp): Update, "entry" parameter is a
9048 struct thread_info * now. Fetch lwpid from thread.
9049 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
9050 struct thread_info * now.
9051 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
9052 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
9053 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
9054 directly.
9055 (regsets_store_inferior_registers): Ditto.
9056 (fetch_register, store_register): Ditto.
9057 (linux_read_memory, linux_write_memory): Ditto.
9058 (linux_request_interrupt): Ditto.
9059 (linux_read_auxv): Ditto.
9060 (linux_xfer_siginfo): Ditto.
9061 (linux_qxfer_spu): Ditto.
9062 (linux_qxfer_libraries_svr4): Ditto.
9063 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
9064 moved to inferiors.h.
9065 (get_lwp): Delete.
9066 (get_thread_lwp): Update.
9067 (struct lwp_info): Delete member "entry". Simplify comment for
9068 member "thread".
9069 (all_lwps): Delete.
9070 * linux-mips-low.c (mips_read_description): Fetch lwpid from
9071 current_inferior directly.
9072 (update_watch_registers_callback): Update, "entry" parameter is a
9073 struct thread_info * now. Fetch pid from thread.
9074 (mips_linux_prepare_to_resume): Fetch ptid from thread.
9075 (mips_insert_point): Fetch lwpid from current_inferior.
9076 Pass &all_threads to find_inferior, not &all_lwps.
9077 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
9078 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
9079 directly.
9080 (mips_stopped_data_address): Ditto.
9081 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
9082 directly.
9083 * linux-tile-low.c (tile_arch_setup): Ditto.
9084 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
9085 (update_debug_registers_callback): Update, "entry" parameter is a
9086 struct thread_info * now. Fetch pid from thread.
9087 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
9088 Pass &all_threads to find_inferior, not &all_lwps.
9089 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
9090 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
9091 Pass &all_threads to find_inferior, not &all_lwps.
9092 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
9093 (i386_dr_low_get_status): Ditto.
9094 (x86_linux_prepare_to_resume): Fetch ptid from thread.
9095 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
9096 (x86_linux_read_description): Ditto.
9097 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
9098
3b8361aa
DE
90992014-02-20 Doug Evans <dje@google.com>
9100
9101 * inferiors.c (get_first_inferior): Fix buglet.
9102
f7667f0d
DE
91032014-02-19 Doug Evans <dje@google.com>
9104
9105 * gdbthread.h (add_thread): Change result type to struct thread_info *.
9106 * inferiors.c (add_thread): Change result type to struct thread_info *.
9107 All callers updated.
9108 (add_lwp): Call add_thread here instead of in callers.
9109 All callers updated.
9110 * linux-low.h (get_lwp_thread): Rewrite.
9111 (struct lwp_info): New member "thread".
9112
b3312d80
DE
91132014-02-19 Doug Evans <dje@google.com>
9114
9115 * linux-low.c (add_lwp): Change result to struct lwp_info *.
9116 All callers updated.
9117
ecc6f45c
DE
91182014-02-19 Doug Evans <dje@google.com>
9119
9120 * inferiors.c (add_thread): Fix whitespace.
9121
649ebbca
DE
91222014-02-19 Doug Evans <dje@google.com>
9123
9124 * dll.c (clear_dlls): Replace accessing list implemention details
9125 with API function.
9126 * gdbthread.h (get_first_thread): Declare.
9127 * inferiors.c (for_each_inferior_with_data): New function.
9128 (get_first_thread): New function.
9129 (find_thread_ptid): Simplify.
9130 (get_first_inferior): New function.
9131 (clear_list): Delete.
9132 (one_inferior_p): New function.
9133 (clear_inferior_list): New function.
9134 (clear_inferiors): Update.
9135 * inferiors.h (for_each_inferior_with_data): Declare.
9136 (clear_inferior_list): Declare.
9137 (one_inferior_p): Declare.
9138 (get_first_inferior): Declare.
9139 * linux-low.c (linux_wait_for_event): Replace accessing list
9140 implemention details with API function.
9141 * server.c (target_running): Ditto.
9142 (accumulate_file_name_length): New function.
9143 (emit_dll_description): New function.
9144 (handle_qxfer_libraries): Replace accessing list implemention
9145 details with API function.
9146 (handle_qxfer_threads_worker): New function.
9147 (handle_qxfer_threads_proper): Replace accessing list implemention
9148 details with API function.
9149 (handle_query): Ditto.
9150 (visit_actioned_threads_callback_ftype): New typedef.
9151 (visit_actioned_threads_data): New struct.
9152 (visit_actioned_threads): Rewrite to be find_inferior callback.
9153 (resume): Call find_inferior.
9154 (handle_status): Replace accessing list implemention
9155 details with API function.
9156 (process_serial_event): Replace accessing list implemention details
9157 with API function.
9158 * target.c (set_desired_inferior): Replace accessing list implemention
9159 details with API function.
9160 * tracepoint.c (same_process_p): New function.
9161 (gdb_agent_about_to_close): Replace accessing list implemention
9162 details with API function.
9163 * win32-low.c (child_delete_thread): Replace accessing list
9164 implemention details with API function.
9165 (match_dll_by_basename): New function.
9166 (dll_is_loaded_by_basename): New function.
9167 (win32_ensure_ntdll_loaded): Replace accessing list implemention
9168 details call to dll_is_loaded_by_basename.
9169
80894984
DE
91702014-02-19 Doug Evans <dje@google.com>
9171
9172 * dll.h (struct dll_info): Add comment.
9173 * gdbthread.h (struct thread_info): Add comment.
9174 (current_ptid): Simplify.
9175 * inferiors.c (add_process): Update.
9176 (remove_process): Update.
9177 * inferiors.h (struct process_info): Rename member "head" to "entry".
9178 * linux-low.c (delete_lwp): Update.
9179 (add_lwp): Update.
9180 (last_thread_of_process_p): Update.
9181 (kill_one_lwp_callback, linux_kill): Update.
9182 (status_pending_p_callback): Update.
9183 (wait_for_sigstop): Update. Simplify read of ptid.
9184 (start_step_over): Update.
9185 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
9186 (get_lwp_thread): Update.
9187 (struct lwp_info): Rename member "head" to "entry".
9188 * regcache.h (inferior_list_entry): Delete.
9189 * server.c (kill_inferior_callback): Update.
9190 (detach_or_kill_inferior_callback): Update.
9191 (print_started_pid): Update.
9192 (print_attached_pid): Update.
9193 (process_serial_event): Simplify read of ptid.
9194 * thread-db.c (thread_db_create_event): Update.
9195 (thread_db_get_tls_address): Update.
9196 * win32-low.c (current_inferior_ptid): Simplify.
9197
46917d26
TT
91982014-02-19 Tom Tromey <tromey@redhat.com>
9199
9200 * target.h (struct target_ops) <supports_btrace>: Add target_ops
9201 argument.
9202 (target_supports_btrace): Update.
9203
0759a81e
YQ
92042014-02-14 Yao Qi <yao@codesourcery.com>
9205
9206 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
9207 (rsp-low-ipa.o): New target.
9208
a7191e8b
TT
92092014-02-12 Tom Tromey <tromey@redhat.com>
9210
9211 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
9212 convert_ascii_to_int.
9213 * regcache.c (registers_to_string): Likewise.
9214 * remote-utils.c (decode_M_packet): Likewise.
9215 * server.c (process_serial_event): Likewise.
9216
ff0e980e
TT
92172014-02-12 Tom Tromey <tromey@redhat.com>
9218
9219 * server.c (handle_query, handle_v_run): Use hex2bin, not
9220 unhexify.
9221 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
9222
e9371aff
TT
92232014-02-12 Tom Tromey <tromey@redhat.com>
9224
9225 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
9226 convert_int_to_ascii.
9227 * regcache.c (registers_to_string, collect_register_as_string):
9228 Likewise.
9229 * remote-utils.c (look_up_one_symbol, relocate_instruction):
9230 Likewise.
9231 * server.c (process_serial_event): Likewise.
9232 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
9233 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
9234
971dc0b8
TT
92352014-02-12 Tom Tromey <tromey@redhat.com>
9236
9237 * remote-utils.c (look_up_one_symbol, monitor_output): Use
9238 bin2hex, not hexify.
9239 * tracepoint.c (cmd_qtstatus): Likewise.
9240
0a822afb
TT
92412014-02-12 Tom Tromey <tromey@redhat.com>
9242
9243 * remote-utils.c (monitor_output): Pass explicit length to
9244 hexify.
9245
9c3d6531
TT
92462014-02-12 Tom Tromey <tromey@redhat.com>
9247
9248 * tracepoint.c: Include rsp-low.h.
9249 * server.c: Include rsp-low.h.
9250 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
9251 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
9252 declare.
9253 * remote-utils.c: Include rsp-low.h.
9254 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
9255 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
9256 (convert_int_to_ascii, convert_ascii_to_int): Move to
9257 common/rsp-low.c.
9258 * regcache.c: Include rsp-low.h.
9259 * ax.c: Include rsp-low.h.
9260 * Makefile.in (SFILES): Add common/rsp-low.c.
9261 (OBS): Add rsp-low.o.
9262 (rsp-low.o): New target.
9263
01fd3ea5
TT
92642014-02-12 Tom Tromey <tromey@redhat.com>
9265
9266 * utils.h (pulongest, plongest, phex_nz): Don't declare.
9267 Include print-utils.h.
9268 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
9269 (plongest, thirty_two, phex_nz): Remove.
9270 * Makefile.in (SFILES): Add common/print-utils.c.
9271 (OBS): Add print-utils.o.
9272 (print-utils-ipa.o): New target.
9273 (print-utils.o): New target.
9274 (IPA_OBJS): Add print-utils-ipa.o.
9275
e99dc820
TT
92762014-02-06 Tom Tromey <tromey@redhat.com>
9277
9278 * Makefile.in (SFILES): Fix indentation.
9279
ee1e2d4f
DE
92802014-02-05 Doug Evans <dje@google.com>
9281
9282 * linux-low.c (linux_wait_for_event): Improve comment.
9283 (linux_wait_1): Keep current_inferior in sync with event_child.
9284
f5a02773
DE
92852014-01-22 Doug Evans <dje@google.com>
9286
9287 * gdbthread.h (gdb_id_to_thread): Delete, unused.
9288
87ce2a04
DE
92892014-01-22 Doug Evans <dje@google.com>
9290
9291 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
9292 * configure: Regenerate.
9293 * config.in: Regenerate.
9294 * Makefile.in (SFILES): Add debug.c.
9295 (OBS): Add debug.o.
9296 * debug.c: New file.
9297 * debug.h: New file.
9298 * linux-aarch64-low.c (*): Update all debugging printfs to use
9299 debug_printf instead of fprintf.
9300 * linux-arm-low.c (*): Ditto.
9301 * linux-cris-low.c (*): Ditto.
9302 * linux-crisv32-low.c (*): Ditto.
9303 * linux-m32r-low.c (*): Ditto.
9304 * linux-sparc-low.c (*): Ditto.
9305 * linux-x86.c (*): Ditto.
9306 * linux-low.c (*): Ditto.
9307 (linux_wait_1): Add calls to debug_enter, debug_exit.
9308 (linux_wait): Remove redundant debugging printf.
9309 (stop_all_lwps): Add calls to debug_enter, debug_exit.
9310 (linux_resume, unstop_all_lwps): Ditto.
9311 * mem-break.c (*): Update all debugging printfs to use
9312 debug_printf instead of fprintf.
9313 * remote-utils.c (*): Ditto.
9314 * thread-db.c (*): Ditto.
9315 * server.c #include <ctype.h>, "gdb_vecs.h".
9316 (debug_threads): Moved to debug.c.
9317 (*): Update all debugging printfs to use debug_printf instead of
9318 fprintf.
9319 (start_inferior): Replace call to fflush with call to debug_flush.
9320 (monitor_show_help): Mention set debug-format.
9321 (parse_debug_format_options): New function.
9322 (handle_monitor_command): Handle "monitor set debug-format".
9323 (gdbserver_usage): Mention --debug-format.
9324 (main): Parse --debug-format.
9325 * server.h (debug_threads): Declaration moved to debug.h.
9326 #include "debug.h".
9327 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
9328 trace_debug_1 that uses debug_printf.
9329 (tracepoint_look_up_symbols): Update all debugging printfs to use
9330 debug_printf instead of fprintf.
9331
e671835b
BS
93322014-01-20 Baruch Siach <baruch@tkos.co.il>
9333
9334 * linux-xtensa-low.c: Include asm/ptrace.h instead of
9335 sys/ptrace.h.
9336
b5737fa9
PA
93372014-01-17 Pedro Alves <palves@redhat.com>
9338
ea38d2a9 9339 PR build/16445
c7faa97a
PA
9340 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
9341 defined after including gdb_proc_service.h.
b5737fa9 9342
40ed484e
DE
93432014-01-16 Doug Evans <dje@google.com>
9344
9345 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
9346 (match_dll): Use it.
9347
969c39fb
MM
93482014-01-16 Markus Metzger <markus.t.metzger@intel.com>
9349
9350 * target.h (target_ops) <read_btrace>: Change parameters and
9351 return type to allow error reporting.
9352 * server.c (handle_qxfer_btrace): Support delta reads. Pass
9353 trace reading errors on.
9354 * linux-low.c (linux_low_read_btrace): Pass trace reading
9355 errors on.
9356 (linux_low_disable_btrace): New.
9357
ab7f45ba
DE
93582014-01-15 Doug Evans <dje@google.com>
9359
9360 * inferiors.c (thread_id_to_gdb_id): Delete.
9361 * inferiors.h (thread_id_to_gdb_id): Delete.
9362
66af0f44
EZ
93632014-01-13 Eli Zaretskii <eliz@gnu.org>
9364
9365 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
9366 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
9367 versions.
9368
9939e131
PA
93692014-01-08 Pedro Alves <palves@redhat.com>
9370
9371 * server.c (handle_status): Don't discard previous queued stop
9372 replies or thread's pending status here.
9373 (main) <disconnection>: Do it here instead.
9374
b7ea362b
PA
93752014-01-08 Pedro Alves <palves@redhat.com>
9376
9377 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
9378 * server.c (visit_actioned_threads, handle_pending_status): New
9379 function.
9380 (handle_v_cont): Factor out parts to ...
9381 (resume): ... this new function. If in all-stop, and a thread
9382 being resumed has a pending status, report it without actually
9383 resuming.
9384 (myresume): Adjust to use the new 'resume' function.
9385 (clear_pending_status_callback, set_pending_status_callback)
9386 (find_status_pending_thread_callback): New functions.
9387 (handle_status): Handle the case of multiple threads having
9388 interesting statuses to report. Report threads' real last signal
9389 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
9390 with an interesting thread to report the status for, instead of
9391 always reporting the status of the first thread.
9392
28498c42
JB
93932014-01-01 Joel Brobecker <brobecker@adacore.com>
9394
9395 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
9396 * gdbreplay.c (gdbreplay_version): Likewise.
9397
f45c82da
YZ
93982013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
9399
9400 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
9401 iov.iov_len with the real length in use.
9402
379a5e2d
JB
94032013-12-13 Joel Brobecker <brobecker@adacore.com>
9404
9405 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
9406 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
9407 for all targets that use win32-low.c.
9408 * win32-low.c (win32_ensure_ntdll_loaded): New function.
9409 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
9410
4210d83e
PA
94112013-12-13 Pedro Alves <palves@redhat.com>
9412
9413 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
9414 if equal to TARGET_WAITKIND_LOADED.
9415 * win32-low.c (cached_status): New static global.
9416 (win32_wait): Add declaration.
9417 (do_initial_child_stuff): Flush all initial pending debug events
9418 up to the initial breakpoint.
9419 (win32_wait): If CACHED_STATUS was set, return that instead
9420 of doing a real wait. Remove the code resuming the execution
9421 of the inferior after receiving a TARGET_WAITKIND_LOADED event
9422 during the initial phase. Also remove the code changing
9423 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
9424 TARGET_WAITKIND_STOPPED.
9425
e7f0d979
YQ
94262013-12-11 Yao Qi <yao@codesourcery.com>
9427
9428 * notif.c (handle_notif_ack): Return 0 if no notification
9429 matches.
9430
ebcf782c
DE
94312013-11-20 Doug Evans <dje@google.com>
9432
9433 * linux-low.c (linux_set_resume_request): Fix comment.
9434
20ad9378
DE
94352013-11-20 Doug Evans <dje@google.com>
9436
9437 * linux-low.c (resume_status_pending_p): Tweak comment.
9438
a196ebeb
WT
94392013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
9440
9441 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
9442 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
9443 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
9444 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
9445 (srv_amd64_regobj): Add amd64-mpx.o.
9446 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
9447 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
9448 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
9449 * i387-fp.c (num_pl_bnd_register) Added constant.
9450 (num_pl_bnd_cfg_registers) Added constant.
9451 (struct i387_xsave) Added reserved area and MPX fields.
9452 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
9453 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
9454 function.
9455 (tdesc_i386_mpx_linux): Add MPX amd64 target.
9456 (init_registers_amd64_mpx_linux): Declare new function.
9457 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
9458 (x86_64_regmap): Add MPX registers.
9459 (x86_linux_read_description): Add MPX case.
9460 (initialize_low_arch): Initialize MPX targets.
9461
0080a2f6
TT
94622013-11-18 Tom Tromey <tromey@redhat.com>
9463
9464 * configure: Rebuild.
9465 * configure.ac: Don't check for stdlib.h.
9466 * gdbreplay.c: Unconditionally include stdlib.h.
9467
2978b111
TT
94682013-11-18 Tom Tromey <tromey@redhat.com>
9469
9470 * config.in: Rebuild.
9471 * configure: Rebuild.
9472 * configure.ac: Don't use AC_HEADER_DIRENT.
9473
a3d08894
TT
94742013-11-18 Tom Tromey <tromey@redhat.com>
9475
9476 * server.h: Don't check HAVE_STRING_H.
9477 * gdbreplay.c: Don't check HAVE_STRING_H.
9478 * configure: Rebuild.
9479
0a5dd17d
TT
94802013-11-18 Tom Tromey <tromey@redhat.com>
9481
9482 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
9483 LIBGNU.
9484
1bd2f0ba
TT
94852013-11-08 Tom Tromey <tromey@redhat.com>
9486
9487 * configure, config.in: Rebuild.
9488 * configure.ac: Remove unused configury.
9489
3266f10b
TT
94902013-11-08 Tom Tromey <tromey@redhat.com>
9491
9492 * acinclude.m4: Include common.m4, codeset.m4.
9493 * configure, config.in: Rebuild.
9494 * configure.ac: Use GDB_AC_COMMON.
9495
6682d959
AA
94962013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
9497
9498 * linux-s390-low.c (HWCAP_S390_TE): New define.
9499 (s390_arch_setup): Consider the TE field in the HWCAP for
9500 determining 'have_regset_tdb'.
9501
fd0a4d76
SDJ
95022013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
9503
9504 PR gdb/16014
9505 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
9506 call to sizeof.
9507
1a3d890b
PA
95082013-10-02 Pedro Alves <palves@redhat.com>
9509
9510 * server.c (process_serial_event): Don't output "GDBserver
9511 exiting" if GDB is connected through stdio.
9512 * target.c (mywait): Likewise, be silent if GDB is connected
9513 through stdio.
9514
97ad4581
JB
95152013-10-01 Joel Brobecker <brobecker@adacore.com>
9516
9517 * lynx-low.c (lynx_add_threads_after_attach): New function.
9518 (lynx_attach): Remove call to add_thread. Add call to
9519 lynx_add_threads_after_attach instead.
9520
5b4e221c
MF
95212013-09-28 Mike Frysinger <vapier@gentoo.org>
9522
9523 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
9524 * config.in, configure: Regenerated.
9525
ee47b2f8
YQ
95262013-09-18 Yao Qi <yao@codesourcery.com>
9527
9528 PR server/15959
9529 * server.c (start_inferior): Clear 'resume_info'.
9530
d6707650 95312013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 9532
d6707650
JW
9533 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
9534 for each register.
9535
9243dd0e 95362013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 9537
9243dd0e
JW
9538 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
9539 linux-tile-low.o to srv_tgtobj.
9540
c623a6ef
WN
95412013-09-16 Will Newton <will.newton@linaro.org>
9542
9543 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
9544 out regs.
9545
fb71d39e
PA
95462013-09-06 Pedro Alves <palves@redhat.com>
9547
9548 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
9549 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
9550 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
9551 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
9552 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
9553 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
9554
8e7e9910
PA
95552013-09-06 Pedro Alves <palves@redhat.com>
9556
9557 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
9558 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
9559
7c3a12ca
PA
95602013-09-06 Pedro Alves <palves@redhat.com>
9561
9562 * linux-amd64-ipa.c: Include tracepoint.h.
9563 * linux-i386-ipa.c: Include tracepoint.h.
9564
8eb3d7b6
RW
95652013-09-06 Ricard Wanderlof <ricardw@axis.com>
9566
9567 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
9568 (ps_get_thread_area): New function.
9569
eddddb9d
RW
95702013-09-06 Ricard Wanderlof <ricardw@axis.com>
9571
9572 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
9573 (initialize_low_arch): Call init_registers_crisv32 rather than
9574 init_register_crisv32.
9575
533b0600
PA
95762013-09-05 Pedro Alves <palves@redhat.com>
9577
9578 * server.h (handle_vFile, hostio_last_error_from_errno): Move
9579 to ...
9580 * hostio.h: ... this new file.
9581 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
9582 win32-low.c: Include hostio.h.
9583
0ce3d3b5
PA
95842013-09-05 Pedro Alves <palves@redhat.com>
9585
9586 * server.h (gdb_client_data, handler_func, callback_handler_func)
9587 (delete_file_handler, add_file_handler, append_callback_event)
9588 (delete_callback_event, start_event_loop, initialize_event_loop):
9589 Move to event-loop.h and include it.
9590 * event-loop.h: New file.
9591
799cdc37
PA
95922013-09-05 Pedro Alves <palves@redhat.com>
9593
9594 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
9595 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
9596 (loaded_dll, unloaded_dll): Move to ...
9597 * dll.h: ... this new file.
9598 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
9599
6a6bbd9d
PA
96002013-09-05 Pedro Alves <palves@redhat.com>
9601
9602 * server.h (current_process, get_thread_process, all_processes)
9603 (add_inferior_to_list, for_each_inferior, current_inferior)
9604 (remove_inferior, add_process, remove_process, find_process_pid)
9605 (have_started_inferiors_p, have_attached_inferiors_p)
9606 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
9607 (clear_inferiors, find_inferior, find_inferior_id)
9608 (inferior_target_data, set_inferior_target_data)
9609 (inferior_regcache_data, set_inferior_regcache_data): Move to
9610 inferiors.h, and include it.
9611 * inferiors.h: New file.
9612
f699aaba
PA
96132013-09-05 Pedro Alves <palves@redhat.com>
9614
9615 * server.h (struct emit_ops, current_insn_ptr, emit_error):
9616 Move ...
72f4393d 9617 * ax.h: ... here.
f699aaba 9618
c144c7a0
PA
96192013-09-05 Pedro Alves <palves@redhat.com>
9620
9621 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
9622 tracepoint.h.
9623 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
9624 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
9625 (handle_tracepoint_general_set, handle_tracepoint_query)
9626 (tracepoint_finished_step, tracepoint_was_hit)
9627 (release_while_stepping_state_list, current_traceframe)
9628 (in_readonly_region, traceframe_read_mem)
9629 (fetch_traceframe_registers, traceframe_read_sdata)
9630 (traceframe_read_info, struct fast_tpoint_collect_status)
9631 (fast_tracepoint_collecting, force_unlock_trace_buffer)
9632 (handle_tracepoit_bkpts, initialize_low_tracepoint)
9633 (supply_fast_tracepoint_registers)
9634 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
9635 (ipa_tdesc, claim_trampoline_space)
9636 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
9637 (agent_mem_read, agent_get_trace_state_variable_value)
9638 (agent_set_trace_state_variable_value, agent_tsv_read)
9639 (agent_mem_read_string, get_raw_reg_func_addr)
9640 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
9641 * tracepoint.h: ... this new file.
9642
ff42e6ab
PA
96432013-09-05 Pedro Alves <palves@redhat.com>
9644
9645 * server.h (perror_with_name, error, fatal, warning, paddress)
9646 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
9647 include it.
9648 * utils.h: New file.
9649
541af0f4
PA
96502013-09-05 Pedro Alves <palves@redhat.com>
9651
9652 * server.h (remote_debug, noack_mode, transport_is_reliable)
9653 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
9654 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
9655 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
9656 (write_enn, initialize_async_io, enable_async_io)
9657 (disable_async_io, check_remote_input_interrupt_request)
9658 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
9659 (dead_thread_notify, prepare_resume_reply)
9660 (decode_address_to_semicolon, decode_address, decode_m_packet)
9661 (decode_M_packet, decode_X_packet, decode_xfer_write)
9662 (decode_search_memory_packet, unhexify, hexify)
9663 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
9664 (look_up_one_symbol, relocate_instruction)
9665 (monitor_output): Move to remote-utils.h, and include it.
9666 * remote-utils.h: New file.
9667
eebdf26b
PA
96682013-09-05 Pedro Alves <palves@redhat.com>
9669
9670 * server.h (_): Delete.
9671
3aafd2ff
PA
96722013-09-02 Pedro Alves <palves@redhat.com>
9673
9674 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
9675 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
9676 allocated.
9677 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
9678
cee83bcb
PM
96792013-09-02 Pierre Muller <muller@sourceware.org>
9680
9681 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
9682 or WriteProcessMemory complete successfully and handle
9683 ERROR_PARTIAL_COPY error.
9684
9a13b2fa
PA
96852013-09-02 Pedro Alves <palves@redhat.com>
9686
9687 * server.c (gdb_read_memory): Return -1 on traceframe memory read
9688 error instead of EIO.
9689
602e3198
JK
96902013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9691
9692 PR server/15604
9693 * linux-low.c: Include filestuff.h.
9694 (linux_create_inferior) <pid == 0>: Call close_most_fds.
9695 * lynx-low.c: Include filestuff.h.
9696 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
9697 * server.c: Include filestuff.h.
9698 (main): Call notice_open_fds.
9699 * spu-low.c: Include filestuff.h.
9700 (spu_create_inferior) <pid == 0>: Call close_most_fds.
9701
96d7229d
LM
97022013-08-22 Luis Machado <lgustavo@codesourcery.com>
9703
9704 * Makefile.in: Explain why ../target and ../nat are not
9705 listed as include file search paths.
9706 (linux-waitpid.o): New object file rule.
9707 * configure.srv (srv_native_linux_obj): New variable.
9708 Replace all occurrences of linux native object files with
9709 $srv_native_linux_obj.
9710 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
9711 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
9712 (linux_enable_event_reporting): Remove declaration.
9713 (my_waitpid): Moved to common/linux-waitpid.c.
9714 (linux_wait_for_event): Pass ptid when calling
9715 linux_enable_event_reporting.
9716 (linux_supports_tracefork_flag): Remove.
9717 (linux_enable_event_reporting): Likewise.
9718 (linux_tracefork_grandchild): Remove.
9719 (STACK_SIZE): Moved to common/linux-ptrace.c.
9720 (linux_tracefork_child): Remove.
9721 (linux_test_for_tracefork): Remove.
9722 (linux_look_up_symbols): Call linux_supports_traceclone.
9723 (initialize_low): Remove call to linux_test_for_tracefork.
9724 * linux-low.h (PTRACE_TYPE_ARG3): Move to
9725 common/linux-ptrace.h.
9726 (PTRACE_TYPE_ARG4): Likewise.
9727 Include linux-ptrace.h.
9728
32940073
PA
97292013-08-21 Pedro Alves <palves@redhat.com>
9730
9731 * config.in: Renegerate.
9732
33b60d58 97332013-08-19 Luis Machado <lgustavo@codesourcery.com>
a261b8f5 9734
33b60d58
LM
9735 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
9736 (SFILES): Remove $(srcdir)/common/target-common.c and
9737 add $(srcdir)/target/waitstatus.c.
9738 (OBS): Remove target-common.o and add waitstatus.o.
9739 (server_h): Remove $(srcdir)/../common/target-common.h and
9740 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
9741 and $(srcdir)/../target/waitstatus.h.
9742 (target-common.o): Remove.
9743 (waitstatus.o): New target object file.
9744 * target.h: Do not include target-common.h and
9745 include target/resume.h, target/wait.h and
9746 target/waitstatus.h.
9747
b8e1b30e
LM
97482013-08-13 Luis Machado <lgustavo@codesourcery.com>
9749
9750 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
9751 to PTRACE_TYPE_ARG3.
9752 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
9753 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
9754 PTRACE_TYPE_ARG4.
9755 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
9756 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
9757
7a60ad40
YQ
97582013-07-27 Jie Zhang <jie@codesourcery.com>
9759 Daniel Jacobowitz <dan@codesourcery.com>
9760 Yao Qi <yao@codesourcery.com>
9761
9762 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
9763 (mips-linux-watch.o): New rule.
9764 (mips_linux_watch_h): New variable.
9765 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
9766 srv_tgtobj.
9767 * linux-mips-low.c: Include mips-linux-watch.h.
9768 (struct arch_process_info, struct arch_lwp_info): New.
9769 (update_watch_registers_callback): New function.
9770 (mips_linux_new_process, mips_linux_new_thread) New functions.
9771 (mips_linux_prepare_to_resume, mips_insert_point): New
9772 functions.
9773 (mips_remove_point, mips_stopped_by_watchpoint): New
9774 functions.
9775 (rsp_bp_type_to_target_hw_bp_type): New function.
9776 (mips_stopped_data_address): New function.
9777 (the_low_target): Add watchpoint support functions.
9778
de6f69ad
YQ
97792013-07-27 Yao Qi <yao@codesourcery.com>
9780
9781 * i386-low.c: Include break-common.h.
9782 (enum target_hw_bp_type): Remove.
9783
3360c0bf
LM
97842013-07-24 Luis Machado <lgustavo@codesourcery.com>
9785
9786 * Makefile.in (SFILES): /common/target-common.c.
9787 (OBS): Add target-common.o.
9788 (server_h): Add $(srcdir)/../common/target-common.h.
9789 (target-common.o): New target.
9790 * server.c (queue_stop_reply_callback): Free
9791 status string after use.
9792 * target.c (target_waitstatus_to_string): Remove.
9793 * target.h: Include target-common.h.
9794 (resume_kind): Likewise.
9795 (target_waitkind): Likewise.
9796 (target_waitstatus): Likewise.
9797 (TARGET_WNOHANG): Likewise.
9798
bd885420
YQ
97992013-07-04 Yao Qi <yao@codesourcery.com>
9800
9801 * Makefile.in (host_alias): Use @host_noncanonical@.
9802 (target_alias): Use @target_noncanonical@.
9803 * configure.ac: Use ACX_NONCANONICAL_TARGET and
9804 ACX_NONCANONICAL_HOST.
9805 * configure: Regenerated.
9806
9807 Revert:
9808 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
9809
9810 * configure.ac (version_host, version_target): Set and AC_SUBST them.
9811 * configure: Rebuild.
9812 * Makefile.in (version_host, version_target): Get from configure.
9813 (version.c): Use $(version_host) and $(version_target).
9814
17ef446e
PA
98152013-07-03 Pedro Alves <palves@redhat.com>
9816
9817 * Makefile.in (config.status): Depend on development.sh.
9818 * acinclude.m4: Include libmcheck.m4.
9819 * configure: Regenerate.
9820
7a9a7487
MG
98212013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
9822
9823 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
9824 attribute inside the parentheses.
9825 (winapi_DebugSetProcessKillOnExit): Ditto.
9826 (winapi_DebugBreakProcess): Ditto.
9827 (winapi_GenerateConsoleCtrlEvent): Ditto.
a261b8f5 9828
49b64de6
MG
98292013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
9830
9831 * notif.h (notif_event): Add a dummy member to avoid compiler
9832 errors.
9833
d5749ee7
PA
98342013-07-01 Pedro Alves <palves@redhat.com>
9835
9836 * hostio.c (HOSTIO_PATH_MAX): Define.
9837 (require_filename, handle_open, handle_unlink, handle_readlink):
9838 Use it.
9839
d8d2a3ee
PA
98402013-07-01 Pedro Alves <palves@redhat.com>
9841
9842 * server.h: Include "pathmax.h".
9843 * linux-low.c: Don't include sys/param.h.
9844 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
9845 MAXPATHLEN.
9846 * win32-low.c: Don't include sys/param.h.
9847 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
9848
bc7dea8d
PA
98492013-07-01 Pedro Alves <palves@redhat.com>
9850
9851 * event-loop.c: Don't check HAVE_UNISTD_H before including
9852 <unistd.h>.
9853 * gdbreplay.c: Likewise.
9854 * remote-utils.c: Likewise.
9855 * server.c: Likewise.
9856 * configure.ac: Don't check for unistd.h.
9857 * configure: Regenerate.
9858
d6c2da54
TT
98592013-06-28 Tom Tromey <tromey@redhat.com>
9860
9861 * Makefile.in (version.c): Use version.in, not
9862 common/version.in.
9863
257b6bec
MG
98642013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
9865
9866 * configure.ac (version_host, version_target): Set and AC_SUBST them.
9867 * configure: Rebuild.
9868 * Makefile.in (version_host, version_target): Get from configure.
9869 (version.c): Use $(version_host) and $(version_target).
9870
86ebe149
DK
98712013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
9872
9873 Fix trace-status to output user name without trailing colon.
9874 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
9875
f30aa5af
DK
98762013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
9877
9878 Fix trace-status to output proper start-time and stop-time.
9879 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
9880 output start time and stop time in hex as gdb expects.
9881
28a93511
YQ
98822013-06-26 Pedro Alves <pedro@codesourcery.com>
9883
9884 * tracepoint.c (build_traceframe_info_xml): Output trace state
9885 variables present in the trace buffer.
9886
01208463
TT
98872013-06-24 Tom Tromey <tromey@redhat.com>
9888
9889 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
9890 create-version.sh.
9891 (version.o): Remove.
9892 * gdbreplay.c: Include version.h.
9893 (version, host_name): Don't declare.
9894 * server.h: Include version.h.
9895 (version, host_name): Don't declare.
9896
760256f9
PA
98972013-06-12 Pedro Alves <palves@redhat.com>
9898
9899 * linux-x86-low.c (linux_is_elf64): Delete global.
9900 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
9901 with local linux_pid_exe_is_elf_64_file use.
9902
030031ee
PA
99032013-06-11 Pedro Alves <palves@redhat.com>
9904
9905 * linux-low.c (regset_disabled, disable_regset): New functions.
9906 (regsets_fetch_inferior_registers)
9907 (regsets_store_inferior_registers): Use them.
9908 (initialize_regsets_info); Don't allocate the disabled_regsets
9909 array here.
9910 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
9911 comment.
9912
5da6eb0a
PA
99132013-06-11 Pedro Alves <palves@redhat.com>
9914
9915 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
9916 xmalloc.
9917
7e5aaa09
PA
99182013-06-11 Pedro Alves <palves@redhat.com>
9919
9920 * linux-x86-low.c (initialize_low_arch): Call
9921 init_registers_x32_avx_linux.
9922
d878444c
JK
99232013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
9924
9925 Fix compatibility with Android Bionic.
9926 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
9927 it is not empty.
9928
3aee8918
PA
99292013-06-07 Pedro Alves <palves@redhat.com>
9930
5f2b57b5 9931 PR server/14823
3aee8918
PA
9932 * Makefile.in (OBS): Add tdesc.o.
9933 (IPA_OBJS): Add tdesc-ipa.o.
9934 (tdesc-ipa.o): New rule.
9935 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
9936 interface.
9937 * linux-low.c (new_inferior): Delete.
9938 (disabled_regsets, num_regsets): Delete.
9939 (linux_add_process): Adjust to set the new per-process
9940 new_inferior flag.
9941 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
9942 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
9943 was a stop. When calling arch_setup, switch the current inferior
9944 to the thread that got an event.
9945 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
9946 (regsets_fetch_inferior_registers)
9947 (regsets_store_inferior_registers): New regsets_info parameter.
9948 Adjust to use it.
9949 (linux_register_in_regsets): New regs_info parameter. Adjust to
9950 use it.
9951 (register_addr, fetch_register, store_register): New usrregs_info
9952 parameter. Adjust to use it.
9953 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
9954 parameter regs_info. Adjust to use it.
9955 (linux_fetch_registers): Get the current inferior's regs_info, and
9956 adjust to use it.
9957 (linux_store_registers): Ditto.
9958 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
9959 (initialize_low): Don't initialize the target_regsets here. Call
9960 initialize_low_arch.
9961 * linux-low.h (target_regsets): Delete declaration.
9962 (struct regsets_info): New.
9963 (struct usrregs_info): New.
9964 (struct regs_info): New.
9965 (struct process_info_private) <new_inferior>: New field.
9966 (struct linux_target_ops): Delete the num_regs, regmap, and
9967 regset_bitmap fields. New field regs_info.
9968 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
9969 * i387-fp.c (num_xmm_registers): Delete.
9970 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
9971 calls to new interface.
9972 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
9973 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
9974 Infer the number of xmm registers from the regcache's target
9975 description.
9976 * i387-fp.h (num_xmm_registers): Delete.
9977 * inferiors.c (add_thread): Don't install the thread's regcache
9978 here.
9979 * proc-service.c (gregset_info): Fetch the current inferior's
9980 regs_info. Adjust to use it.
9981 * regcache.c: Include tdesc.h.
9982 (register_bytes, reg_defs, num_registers)
9983 (gdbserver_expedite_regs): Delete.
9984 (get_thread_regcache): If the thread doesn't have a regcache yet,
9985 create one, instead of aborting gdbserver.
9986 (regcache_invalidate_one): Rename to ...
9987 (regcache_invalidate_thread): ... this.
9988 (regcache_invalidate_one): New.
9989 (regcache_invalidate): Only invalidate registers of the current
9990 process.
9991 (init_register_cache): Add target_desc parameter, and use it.
9992 (new_register_cache): Ditto. Assert the target description has a
9993 non zero registers_size.
9994 (regcache_cpy): Add assertions. Adjust.
9995 (realloc_register_cache, set_register_cache): Delete.
9996 (registers_to_string, registers_from_string): Adjust.
9997 (find_register_by_name, find_regno, find_register_by_number)
9998 (register_cache_size): Add target_desc parameter, and use it.
9999 (free_register_cache_thread, free_register_cache_thread_one)
10000 (regcache_release, register_cache_size): New.
10001 (register_size): Add target_desc parameter, and use it.
10002 (register_data, supply_register, supply_register_zeroed)
10003 (supply_regblock, supply_register_by_name, collect_register)
10004 (collect_register_as_string, collect_register_by_name): Adjust.
10005 * regcache.h (struct target_desc): Forward declare.
10006 (struct regcache) <tdesc>: New field.
10007 (init_register_cache, new_register_cache): Add target_desc
10008 parameter.
10009 (regcache_invalidate_thread): Declare.
10010 (regcache_invalidate_one): Delete declaration.
10011 (regcache_release): Declare.
10012 (find_register_by_number, register_cache_size, register_size)
10013 (find_regno): Add target_desc parameter.
10014 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
10015 declarations.
10016 * remote-utils.c: Include tdesc.h.
10017 (outreg, prepare_resume_reply): Adjust.
10018 * server.c: Include tdesc.h.
10019 (gdbserver_xmltarget): Delete declaration.
10020 (get_features_xml, process_serial_event): Adjust.
10021 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
10022 declare.
10023 (struct process_info) <tdesc>: New field.
10024 (ipa_tdesc): Declare.
10025 * tdesc.c: New file.
10026 * tdesc.h: New file.
10027 * tracepoint.c: Include tdesc.h.
10028 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
10029 (get_context_regcache): Adjust to pass ipa_tdesc down.
10030 (do_action_at_tracepoint): Adjust to get the register cache size
10031 from the context regcache's description.
10032 (traceframe_walk_blocks): Adjust to get the register cache size
10033 from the current trace frame's description.
10034 (traceframe_get_pc): Adjust to get current trace frame's
10035 description and pass it down.
10036 (gdb_collect): Adjust to get the register cache size from the
10037 IPA's description.
10038 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
10039 (gdbserver_xmltarget): Delete.
10040 (initialize_low_tracepoint): Set the ipa's target description.
10041 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
10042 (initialize_low_tracepoint): Set the ipa's target description.
10043 * linux-x86-low.c: Include tdesc.h.
10044 [__x86_64__] (is_64bit_tdesc): New.
10045 (ps_get_thread_area, x86_get_thread_area): Use it.
10046 (i386_cannot_store_register): Rename to ...
10047 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
10048 (i386_cannot_fetch_register): Rename to ...
10049 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
10050 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
10051 to new interface.
10052 (target_regsets): Rename to ...
10053 (x86_regsets): ... this.
10054 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
10055 interface.
10056 (x86_siginfo_fixup): Use is_64bit_tdesc.
10057 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
10058 (tdesc_x32_avx_linux, tdesc_x32_linux)
10059 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
10060 Declare.
10061 (x86_linux_update_xmltarget): Delete.
10062 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
10063 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
10064 (AMD64_LINUX_USER64_CS): New.
10065 (x86_linux_read_description): New, based on
10066 x86_linux_update_xmltarget.
10067 (same_process_callback): New.
10068 (x86_arch_setup_process_callback): New.
10069 (x86_linux_update_xmltarget): New.
10070 (x86_regsets_info): New.
10071 (amd64_linux_regs_info): New.
10072 (i386_linux_usrregs_info): New.
10073 (i386_linux_regs_info): New.
10074 (x86_linux_regs_info): New.
10075 (x86_arch_setup): Reimplement.
10076 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
10077 (x86_emit_ops): Ditto.
10078 (the_low_target): Adjust. Install x86_linux_regs_info,
10079 x86_cannot_fetch_register, and x86_cannot_store_register.
10080 (initialize_low_arch): New.
10081 * linux-ia64-low.c (tdesc_ia64): Declare.
10082 (ia64_fetch_register): Adjust.
10083 (ia64_usrregs_info, regs_info): New globals.
10084 (ia64_regs_info): New function.
10085 (the_low_target): Adjust.
10086 (initialize_low_arch): New function.
10087 * linux-sparc-low.c (tdesc_sparc64): Declare.
10088 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
10089 Adjust.
10090 (sparc_arch_setup): New function.
10091 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
10092 (the_low_target): Adjust.
10093 (initialize_low_arch): New function.
10094 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
10095 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
10096 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
10097 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
10098 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
10099 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
10100 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
10101 (tdesc_powerpc_isa205_vsx64l): Declare.
10102 (ppc_cannot_store_register, ppc_collect_ptrace_register)
10103 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
10104 (ppc_set_pc, ppc_get_hwcap): Adjust.
10105 (ppc_usrregs_info): Forward declare.
10106 (!__powerpc64__) ppc_regmap_adjusted: New global.
10107 (ppc_arch_setup): Adjust to the current process'es target
10108 description.
10109 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
10110 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
10111 (ppc_store_evrregset): Adjust.
10112 (target_regsets): Rename to ...
10113 (ppc_regsets): ... this, and make static.
10114 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
10115 (ppc_regs_info): New function.
10116 (the_low_target): Adjust.
10117 (initialize_low_arch): New function.
10118 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
10119 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
10120 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
10121 (tdesc_s390x_linux64v2): Declare.
10122 (s390_collect_ptrace_register, s390_supply_ptrace_register)
10123 (s390_fill_gregset, s390_store_last_break): Adjust.
10124 (target_regsets): Rename to ...
10125 (s390_regsets): ... this, and make static.
10126 (s390_get_pc, s390_set_pc): Adjust.
10127 (s390_get_hwcap): New target_desc parameter, and use it.
10128 [__s390x__] (have_hwcap_s390_high_gprs): New global.
10129 (s390_arch_setup): Adjust to set the current process'es target
10130 description. Don't adjust the regmap.
10131 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
10132 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
10133 (regs_info_3264): New globals.
10134 (s390_regs_info): New function.
10135 (the_low_target): Adjust.
10136 (initialize_low_arch): New function.
10137 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
10138 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
10139 [__mips64] (init_registers_mips_linux)
10140 (init_registers_mips_dsp_linux): Delete defines.
10141 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
10142 (have_dsp): New global.
10143 (mips_read_description): New, based on mips_arch_setup.
10144 (mips_arch_setup): Reimplement.
10145 (get_usrregs_info): New function.
10146 (mips_cannot_fetch_register, mips_cannot_store_register)
10147 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
10148 (mips_fill_fpregset, mips_store_fpregset): Adjust.
10149 (target_regsets): Rename to ...
10150 (mips_regsets): ... this, and make static.
10151 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
10152 (dsp_regs_info, regs_info): New globals.
10153 (mips_regs_info): New function.
10154 (the_low_target): Adjust.
10155 (initialize_low_arch): New function.
10156 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
10157 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
10158 Declare.
10159 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
10160 (arm_read_description): New, with bits factored from
10161 arm_arch_setup.
10162 (arm_arch_setup): Reimplement.
10163 (target_regsets): Rename to ...
10164 (arm_regsets): ... this, and make static.
10165 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
10166 (arm_regs_info): New function.
10167 (the_low_target): Adjust.
10168 (initialize_low_arch): New function.
10169 * linux-m68k-low.c (tdesc_m68k): Declare.
10170 (target_regsets): Rename to ...
10171 (m68k_regsets): ... this, and make static.
10172 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
10173 (m68k_regs_info): New function.
10174 (m68k_arch_setup): New function.
10175 (the_low_target): Adjust.
10176 (initialize_low_arch): New function.
10177 * linux-sh-low.c (tdesc_sharch): Declare.
10178 (target_regsets): Rename to ...
10179 (sh_regsets): ... this, and make static.
10180 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
10181 (sh_regs_info, sh_arch_setup): New functions.
10182 (the_low_target): Adjust.
10183 (initialize_low_arch): New function.
10184 * linux-bfin-low.c (tdesc_bfin): Declare.
10185 (bfin_arch_setup): New function.
10186 (bfin_usrregs_info, regs_info): New globals.
10187 (bfin_regs_info): New function.
10188 (the_low_target): Adjust.
10189 (initialize_low_arch): New function.
10190 * linux-cris-low.c (tdesc_cris): Declare.
10191 (cris_arch_setup): New function.
10192 (cris_usrregs_info, regs_info): New globals.
10193 (cris_regs_info): New function.
10194 (the_low_target): Adjust.
10195 (initialize_low_arch): New function.
10196 * linux-cris-low.c (tdesc_crisv32): Declare.
10197 (cris_arch_setup): New function.
10198 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
10199 (cris_regs_info): New function.
10200 (the_low_target): Adjust.
10201 (initialize_low_arch): New function.
10202 * linux-m32r-low.c (tdesc_m32r): Declare.
10203 (m32r_arch_setup): New function.
10204 (m32r_usrregs_info, regs_info): New globals.
10205 (m32r_regs_info): Adjust.
10206 (initialize_low_arch): New function.
10207 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
10208 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
10209 (tic6x_usrregs_info): Forward declare.
10210 (tic6x_read_description): New function, based on ...
10211 (tic6x_arch_setup): ... this. Reimplement.
10212 (target_regsets): Rename to ...
10213 (tic6x_regsets): ... this, and make static.
10214 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
10215 (tic6x_regs_info): New function.
10216 (the_low_target): Adjust.
10217 (initialize_low_arch): New function.
10218 * linux-xtensa-low.c (tdesc_xtensa): Declare.
10219 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
10220 (target_regsets): Rename to ...
10221 (xtensa_regsets): ... this, and make static.
10222 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
10223 globals.
10224 (xtensa_arch_setup, xtensa_regs_info): New functions.
10225 (the_low_target): Adjust.
10226 (initialize_low_arch): New function.
10227 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
10228 (nios2_arch_setup): Set the current process'es tdesc.
10229 (target_regsets): Rename to ...
10230 (nios2_regsets): ... this.
10231 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
10232 (nios2_regs_info): New function.
10233 (the_low_target): Adjust.
10234 (initialize_low_arch): New function.
a261b8f5
PA
10235 * linux-aarch64-low.c (tdesc_aarch64): Declare.
10236 (aarch64_arch_setup): Set the current process'es tdesc.
10237 (target_regsets): Rename to ...
10238 (aarch64_regsets): ... this.
10239 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
10240 (aarch64_regs_info): New function.
10241 (the_low_target): Adjust.
10242 (initialize_low_arch): New function.
3aee8918
PA
10243 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
10244 globals.
10245 (target_regsets): Rename to ...
10246 (tile_regsets): ... this.
10247 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
10248 (tile_regs_info): New function.
10249 (tile_arch_setup): Set the current process'es tdesc.
10250 (the_low_target): Adjust.
10251 (initialize_low_arch): New function.
10252 * spu-low.c (tdesc_spu): Declare.
10253 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
10254 * win32-arm-low.c (tdesc_arm): Declare.
10255 (arm_arch_setup): New function.
10256 (the_low_target): Install arm_arch_setup instead of
10257 init_registers_arm.
10258 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
10259 (init_windows_x86): Rename to ...
10260 (i386_arch_setup): ... this. Set `win32_tdesc'.
10261 (the_low_target): Adjust.
10262 * win32-low.c (win32_tdesc): New global.
10263 (child_add_thread): Don't create the thread cache here.
10264 (do_initial_child_stuff): Set the new process'es tdesc.
10265 * win32-low.h (struct target_desc): Forward declare.
10266 (win32_tdesc): Declare.
10267 * lynx-i386-low.c (tdesc_i386): Declare global.
10268 (lynx_i386_arch_setup): Set `lynx_tdesc'.
10269 * lynx-low.c (lynx_tdesc): New global.
10270 (lynx_add_process): Set the new process'es tdesc.
10271 * lynx-low.h (struct target_desc): Forward declare.
10272 (lynx_tdesc): Declare global.
10273 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
10274 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
10275 * nto-low.c (nto_tdesc): New global.
10276 (do_attach): Set the new process'es tdesc.
10277 * nto-low.h (struct target_desc): Forward declare.
10278 (nto_tdesc): Declare.
10279 * nto-x86-low.c (tdesc_i386): Declare.
10280 (nto_x86_arch_setup): Set `nto_tdesc'.
10281
b1fbec62
GB
102822013-06-04 Gary Benson <gbenson@redhat.com>
10283
10284 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
10285 to qSupported response when appropriate.
10286 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
10287 with nonzero-length annex.
10288 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
10289 arguments supplied in annex.
10290
d1ec4ce7
DE
102912013-05-31 Doug Evans <dje@google.com>
10292
ac44adcb 10293 PR server/15594
d1ec4ce7
DE
10294 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
10295 64 bits in 64-cross-32 environment.
10296
9b25f2d3
PA
102972013-05-28 Pedro Alves <palves@redhat.com>
10298
10299 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
10300 (aarch64-without-fpu.c): Delete rule.
10301 * configure.srv (aarch64*-*-linux*): Remove references to
10302 aarch64-without-fpu.o and aarch64-without-fpu.xml.
10303 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
10304 declaration.
10305
6740dc9c
PA
103062013-05-24 Pedro Alves <palves@redhat.com>
10307
10308 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
10309 instead of strchr/decode_address. Error if the range isn't split
10310 with a ','. Don't assume there's be a ':' in the action.
10311
c2d6af84
PA
103122013-05-23 Yao Qi <yao@codesourcery.com>
10313 Pedro Alves <palves@redhat.com>
10314
10315 * linux-low.c (lwp_in_step_range): New function.
10316 (linux_wait_1): If the thread was range stepping and stopped
10317 outside the stepping range, report the stop to GDB. Otherwise,
10318 continue stepping. Add range stepping debug output.
10319 (linux_set_resume_request): Copy the step range from the resume
10320 request to the lwp.
10321 (linux_supports_range_stepping): New.
10322 (linux_target_ops) <supports_range_stepping>: Set to
10323 linux_supports_range_stepping.
10324 * linux-low.h (struct linux_target_ops)
10325 <supports_range_stepping>: New field.
10326 (struct lwp_info) <step_range_start, step_range_end>: New fields.
10327 * linux-x86-low.c (x86_supports_range_stepping): New.
10328 (the_low_target) <supports_range_stepping>: Set to
10329 x86_supports_range_stepping.
10330 * server.c (handle_v_cont): Handle 'r' action.
10331 (handle_v_requests): Append ";r" if the target supports range
10332 stepping.
10333 * target.h (struct thread_resume) <step_range_start,
10334 step_range_end>: New fields.
10335 (struct target_ops) <supports_range_stepping>:
10336 New field.
10337 (target_supports_range_stepping): New macro.
10338
58794e1a
JB
103392013-05-17 Joel Brobecker <brobecker@adacore.com>
10340
10341 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
10342 confusion in comment.
10343
d631c5a7
JB
103442013-05-17 Joel Brobecker <brobecker@adacore.com>
10345
10346 * lynx-low.c (struct process_info_private): New type.
10347 (lynx_add_process): New function.
10348 (lynx_create_inferior, lynx_attach): Replace calls to
10349 add_process by calls to lynx_add_process.
10350 (lynx_resume): If PTID is null, then try using
10351 current_process()->private->last_wait_event_ptid.
10352 Add comments.
10353 (lynx_clear_inferiors): Delete. The contents of that function
10354 has been inlined in lynx_mourn;
10355 (lynx_wait_1): Save the ptid in the process's private data.
10356 (lynx_mourn): Free the process' private data. Replace call
10357 to lynx_clear_inferiors by call to clear_inferiors.
10358
96f7a20f
YQ
103592013-05-17 Yao Qi <yao@codesourcery.com>
10360
10361 * i386-low.c (i386_length_and_rw_bits): Move the comment to
10362 the right place.
10363
db0dfaa0
LM
103642013-05-16 Luis Machado <lgustavo@codesourcery.com>
10365
10366 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
10367 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
10368 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
10369 PT_TEXT_END_ADDR guards. Update comments.
10370 (linux_target_op) <read_offsets>: Conditionally define to
10371 linux_read_offsets if the target is UCLIBC and if it defines
10372 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
10373
68f5f838
SL
103742013-05-06 Sandra Loosemore <sandra@codesourcery.com>
10375 Andrew Jenner <andrew@codesourcery.com>
10376
10377 * Makefile.in (SFILES): Add linux-nios2-low.c.
10378 (clean): Add action to delete nios2-linux.c.
10379 (nios2-linux.c): New rule.
10380 * configure.srv: Add nios2*-*-linux*.
10381 * linux-nios2-low.c: New.
10382
1ebff1fd
HAQ
103832013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
10384
10385 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
10386
f6150862
HZ
103872013-04-25 Hui Zhu <hui@codesourcery.com>
10388
10389 PR gdb/15186
f6150862
HZ
10390 * ax.c (ax_printf): Add fflush.
10391
614c279d
TT
103922013-04-22 Tom Tromey <tromey@redhat.com>
10393
10394 * Makefile.in (SFILES): Add filestuff.c.
10395 (OBS): Add filestuff.o.
10396 (filestuff.o): New target.
10397 * config.in, configure: Rebuild.
10398 * configure.ac: Check for fdwalk, pipe2.
10399
7d4e5717
PA
104002013-04-17 Pedro Alves <palves@redhat.com>
10401
10402 * configure.ac (USE_THREAD_DB): Delete variable.
10403 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
10404 Don't AC_SUBST USE_THREAD_DB.
10405 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
10406 * config.in, configure: Regenerate.
10407
d5c93e41
PA
104082013-04-16 Pedro Alves <palves@redhat.com>
10409
10410 * linux-low.h (struct lwp_info) <thread_known>: Move under
10411 the USE_THREAD_DB #ifdef.
10412
04f5fe89
PA
104132013-04-16 Pedro Alves <palves@redhat.com>
10414
10415 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
10416 (linux-low.o): Delete rule.
10417 * linux-low.h: Always include "gdb_thread_db.h" instead of
10418 conditionally including thread_db.h.
10419 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
10420 HAVE_THREAD_DB_H.
10421
480b27bf
JK
104222013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
10423
10424 * Makefile.in (install-only): Fix make install regression.
10425
43662968
JK
104262013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
10427
10428 Convert man pages to texinfo, new gdbinit.5 texinfo page.
10429 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
10430 installation.
10431 * gdbserver.1: Remove.
10432
3e74e146
PA
104332013-03-22 Pedro Alves <palves@redhat.com>
10434
10435 * linux-low.c (handle_extended_wait): Don't call
10436 linux_enable_event_reporting.
10437
a8347a2a
TT
104382013-03-15 Tony Theodore <tonyt@logyst.com>
10439
10440 PR build/9098:
10441 * Makefile.in (SHELL): Use @SHELL@.
10442
eeb56fa7
SDJ
104432013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
10444
10445 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
10446 compiler warning.
10447
4fa7e2ff
JB
104482013-03-13 Joel Brobecker <brobecker@adacore.com>
10449
10450 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
10451 Remove extraneous NULL element.
10452
8ddb1965
YQ
104532013-03-13 Yao Qi <yao@codesourcery.com>
10454
10455 * tracepoint.c (traceframe_read_tsv): Look for the last matched
10456 'V' block in trace frame.
10457
9accd112
MM
104582013-03-11 Markus Metzger <markus.t.metzger@intel.com>
10459
10460 * target.h (struct target_ops): Add btrace ops.
10461 (target_supports_btrace): New macro.
10462 (target_enable_btrace): New macro.
10463 (target_disable_btrace): New macro.
10464 (target_read_btrace): New macro.
10465 * gdbthread.h (struct thread_info): Add btrace field.
10466 * server.c: Include btrace-common.h.
10467 (handle_btrace_general_set): New function.
10468 (handle_btrace_enable): New function.
10469 (handle_btrace_disable): New function.
10470 (handle_general_set): Call handle_btrace_general_set.
10471 (handle_qxfer_btrace): New function.
10472 (struct qxfer qxfer_packets[]): Add btrace entry.
10473 * inferiors.c (remove_thread): Disable btrace.
10474 * linux-low: Include linux-btrace.h.
10475 (linux_low_enable_btrace): New function.
10476 (linux_low_read_btrace): New function.
10477 (linux_target_ops): Add btrace ops.
10478 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
10479 Add srv_linux_btrace=yes.
10480 (x86_64-*-linux*): Add linux-btrace.o.
10481 Add srv_linux_btrace=yes.
10482 * configure.ac: Define HAVE_LINUX_BTRACE.
10483 * config.in: Regenerated.
10484 * configure: Regenerated.
10485
5cc22e4c
MM
104862013-03-11 Markus Metzger <markus.t.metzger@intel.com>
10487
10488 * server.c (handle_qxfer): Preserve error message if -3 is
10489 returned.
10490 (qxfer): Document the -3 return value.
10491
7c97f91e
MM
104922013-03-11 Markus Metzger <markus.t.metzger@intel.com>
10493
10494 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
10495 (linux_btrace_h): New variable.
10496 (linux-btrace.o): New rule.
10497
be9a119c 104982013-03-08 Stan Shebs <stan@codesourcery.com>
f6f899bf
HAQ
10499 Hafiz Abid Qadeer <abidh@codesourcery.com>
10500
10501 * tracepoint.c (trace_buffer_size): New global.
10502 (DEFAULT_TRACE_BUFFER_SIZE): New define.
10503 (init_trace_buffer): Change to one-argument function. Allocate
10504 trace buffer memory.
10505 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
10506 handle QTBuffer:size packet.
10507 (cmd_bigqtbuffer_size): New function.
10508 (initialize_tracepoint): Call init_trace_buffer with
10509 DEFAULT_TRACE_BUFFER_SIZE.
10510 * server.c (handle_query): Add QTBuffer:size in the
10511 supported packets.
10512
e64f7499
YQ
105132013-03-07 Yao Qi <yao@codesourcery.com>
10514
10515 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
10516 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
10517 of -1.
10518 (cmd_qtsp): Adjust condition. Do post increment.
10519 Set cur_action and cur_step_action back to 0.
10520
f0ae6fc3
PA
105212013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
10522
10523 PR server/15236
10524 * linux-low.c (linux_write_memory): Return early success if LEN is
10525 zero.
10526
b5b0b0af
CV
105272013-03-05 Corinna Vinschen <vinschen@redhat.de>
10528
334ad4a8 10529 * configure.srv: Add x86_64-*-cygwin* as target.
b5b0b0af 10530
589bc927
TT
105312013-02-28 Tom Tromey <tromey@redhat.com>
10532
10533 * configure.ac: Invoke AC_SYS_LARGEFILE.
10534 * configure, config.in: Rebuild.
10535
dfe07582
CV
105362013-02-28 Corinna Vinschen <vinschen@redhat.com>
10537
10538 * win32-low.c: Throughout, fix format strings and casts of
10539 printf-like functions to avoid type related warnings on all
10540 platforms.
10541 (get_child_debug_event): Print dwDebugEventCode as hex since
10542 that's how it's usually documented.
10543
736cd585
YQ
105442013-02-28 Yao Qi <yao@codesourcery.com>
10545
10546 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
10547 pulongest.
10548
e1f58301
JW
105492013-02-27 Jiong Wang <jiwang@tilera.com>
10550
10551 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
10552 (reg-tilegx32.c): New rule.
10553 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
10554 * linux-tile-low.c (tile_arch_setup): New function. Invoke
10555 different register info initializer according to elf class.
10556 (init_registers_tilgx32): New function. The tilegx32 register info
10557 initializer.
10558 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
10559 (tile_store_gregset): Likewise.
10560
d171ca78
YQ
105612013-02-27 Yao Qi <yao@codesourcery.com>
10562
10563 * server.c (process_point_options): Print debug message when
10564 debug_threads is true.
10565
282bbdf3
YQ
105662013-02-26 Yao Qi <yao@codesourcery.com>
10567
10568 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
10569
aca22551
PA
105702013-02-19 Pedro Alves <palves@redhat.com>
10571 Kai Tietz <ktietz@redhat.com>
10572
10573 PR gdb/15161
10574
10575 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
10576 instead of strtoul to extract address from packet.
10577 (process_serial_event) <'z'>: Likewise.
10578
4f3cee1c
YQ
105792013-02-18 Yao Qi <yao@codesourcery.com>
10580
10581 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
10582
8e1d55a3
PA
105832013-02-14 Pedro Alves <palves@redhat.com>
10584
10585 Plug memory leak.
10586
10587 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
10588 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
10589
458820da
PA
105902013-02-14 Pedro Alves <palves@redhat.com>
10591
10592 * tracepoint.c (cmd_qtdpsrc): Use savestring.
10593
baea0dae
PA
105942013-02-14 Pedro Alves <palves@redhat.com>
10595
10596 * tracepoint.c (save_string): Delete.
10597 (add_tracepoint_action): Use savestring instead of save_string.
10598
0b1afbb3
PA
105992013-02-12 Pedro Alves <palves@redhat.com>
10600
10601 * linux-xtensa-low.c: Ditto.
10602 * xtensa-xtregs.c: Ditto.
10603
8a4ac37e
PA
106042013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
10605
10606 * thread-db.c (thread_db_get_tls_address): NULL pointer check
10607 thread_db.
10608
148de6bb
MS
106092013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
10610
10611 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
10612 aarch64_num_wp_regs and aarch64_num_bp_regs to
10613 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
10614
55fac6e0
MS
106152013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
10616
10617 * linux-aarch64-low.c (ps_get_thread_area): Replace
10618 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
10619
176eb98c
MS
106202013-02-04 Jim MacArthur <jim.macarthur@arm.com>
10621 Marcus Shawcroft <marcus.shawcroft@arm.com>
10622 Nigel Stephens <nigel.stephens@arm.com>
10623 Yufeng Zhang <yufeng.zhang@arm.com>
10624
10625 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
10626 (aarch64.c, aarch64-without-fpu.c): New targets.
10627 * configure.srv (aarch64*-*-linux*): New.
10628 * linux-aarch64-low.c: New file.
10629
56f7af9c
MS
106302013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
10631
43aaf8b6 10632 * linux-low.c (handle_extended_wait, linux_create_inferior)
56f7af9c
MS
10633 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
10634 (dequeue_one_deferred_signal, linux_resume_one_thread)
10635 (fetch_register, linux_write_memory, linux_enable_event_reporting)
10636 (linux_tracefork_grandchild, linux_test_for_tracefork)
10637 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
10638 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
10639 where the argument is 0.
10640
60f662b0
YQ
106412013-01-25 Yao Qi <yao@codesourcery.com>
10642
10643 * event-loop.c: Include "queue.h".
10644 (gdb_event_p): New typedef.
10645 (struct gdb_event) <next_event>: Remove.
10646 (event_queue): Change to QUEUE(gdb_event_p).
10647 (async_queue_event): Remove.
10648 (gdb_event_xfree): New.
10649 (initialize_event_loop): New.
10650 (process_event): Use API from QUEUE.
10651 (wait_for_event): Likewise.
10652 * server.c (main): Call initialize_event_loop.
10653 * server.h (initialize_event_loop): Declare.
10654
5ae4861a
YQ
106552013-01-18 Yao Qi <yao@codesourcery.com>
10656
10657 * ax.h (struct eval_agent_expr_context): New.
10658 (gdb_eval_agent_expr): Update declaration.
10659 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
10660 TFRAME. Add new argument CTX.
10661 * server.h (struct eval_agent_expr_context): Declare.
10662 (agent_mem_read, agent_tsv_read): Update declaration.
10663 (agent_mem_read_string): Likewise.
10664 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
10665 (add_traceframe_block): Add new argument TPOINT.
10666 Increase TPOINT->traceframe_usage.
10667 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
10668 eval_tracepoint_agent_expr.
10669 (condition_true_at_tracepoint): Likewise.
10670 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
10671 (agent_mem_read_string, agent_tsv_read): Likewise.
10672
85e00e85
YQ
106732013-01-16 Yao Qi <yao@codesourcery.com>
10674
10675 * linux-low.c (linux_resume_one_lwp): Don't check
10676 'lwp->bp_reinsert != 0'.
10677
4039cf45
JB
106782013-01-07 Joel Brobecker <brobecker@adacore.com>
10679 Pedro Alves <palves@redhat.com>
10680
10681 * lynx-low.c (ptrace_request_to_str): Define a temporary
10682 macro and use it to simplify this function's implementation.
10683
9044dee2
JB
106842013-01-07 Joel Brobecker <brobecker@adacore.com>
10685
10686 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
10687 sets errno.
10688
e6352c8f
JB
106892013-01-07 Joel Brobecker <brobecker@adacore.com>
10690
10691 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
10692
50681a27
JB
106932013-01-07 Joel Brobecker <brobecker@adacore.com>
10694
10695 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
10696
3f6e77ef
JB
106972013-01-07 Joel Brobecker <brobecker@adacore.com>
10698
10699 * lynx-low.c (lynx_resume): Use the resume_info parameter
10700 to determine the ptid for the lynx_ptrace call, unless
10701 it is equal to minus_one_ptid, in which case we use the
10702 ptid of the current_inferior.
10703 (lynx_wait_1): After having received a thread create/exit
10704 event, resume the inferior's execution using the signaling
10705 thread's ptid, rather than the old ptid.
10706
7fda33ae
JB
107072013-01-07 Joel Brobecker <brobecker@adacore.com>
10708
10709 * lynx-low.c (lynx_resume): Delete variable ret.
10710
b9786c74
JB
107112013-01-01 Joel Brobecker <brobecker@adacore.com>
10712
10713 * gdbreplay.c (gdbreplay_version): Update copyright year.
10714 * server.c (gdbserver_version): Likewise.
10715
8b93d60f
JB
107162012-12-17 Joel Brobecker <brobecker@adacore.com>
10717
10718 * lynx-low.c (lynx_wait_1): Add debug trace before adding
10719 new thread.
10720
037335a7
JB
107212012-12-17 Joel Brobecker <brobecker@adacore.com>
10722
10723 * lynx-low.c (ptrace_request_to_str): Add handling for
10724 PTRACE_GETTRACESIG.
10725
52d4cbd8
JB
107262012-12-17 Joel Brobecker <brobecker@adacore.com>
10727
10728 * lynx-low.c (lynx_attach): Delete variable new_process.
10729
ab8f6ca9
JB
107302012-12-17 Joel Brobecker <brobecker@adacore.com>
10731
10732 * lynx-low.c (lynx_create_inferior): Delete variable
10733 new_process.
10734
78cbc024
JB
107352012-12-17 Joel Brobecker <brobecker@adacore.com>
10736
10737 * lynx-low.c (ptrace_request_to_str): Do not handle
10738 PTRACE_GETTHREADLIST if this macro does not exist.
10739
14a00470
YQ
107402012-12-15 Yao Qi <yao@codesourcery.com>
10741
10742 * Makefile.in (OBS): Add notif.o.
10743 * notif.c, notif.h: New.
10744 * server.c: Include "notif.h".
10745 (struct vstop_notif) <next>: Remove.
10746 <base>: New field.
10747 (queue_stop_reply): Update.
10748 (push_event, send_next_stop_reply): Remove.
10749 (discard_queued_stop_replies): Update.
10750 (notif_stop): New variable.
10751 (handle_v_stopped): Remove.
10752 (handle_v_requests): Don't call handle_v_stopped. Call
10753 handle_ack_notif instead.
10754 (queue_stop_reply_callback): Call notif_event_enque instead
10755 of queue_stop_reply.
10756 (handle_status): Don't call send_next_stop_reply, call
10757 notif_write_event instead.
10758 (kill_inferior_callback): Likewise.
10759 (detach_or_kill_inferior_callback): Likewise.
10760 (main): Call initialize_notif.
10761 (process_serial_event): Call QUEUE_is_empty.
10762 (handle_target_event): Call notif_push instead of push event.
10763 * server.h (push_event): Remove declaration.
10764
61c125b9
TT
107652012-12-10 Tom Tromey <tromey@redhat.com>
10766
10767 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
10768 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
10769 macros.
10770 (.c.o): Rewrite.
10771 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
10772 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
10773 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
10774 (amd64-linux-ipa.o, ax.o): Rewrite.
10775 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
10776 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
10777 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
10778 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
10779 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
10780 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
10781 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
10782 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
10783 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
10784 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
10785 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
10786 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
10787 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
10788 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
10789 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
10790 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
10791 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
10792 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
10793 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
10794 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
10795 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
10796 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
10797 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
10798 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
10799 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
10800 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
10801 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
10802 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
10803 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
10804 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
10805 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
10806 (reg-tilegx.o): Remove.
10807 (all_object_files): New macro.
10808 Include .deps files.
10809 * aclocal.m4, configure: Rebuild.
10810 * acinclude.m4: Include depstand.m4, lead-dot.m4.
10811 * configure.ac: Invoke ZW_CREATE_DEPDIR,
10812 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
10813
e90e9ad9
TT
108142012-12-05 Tom Tromey <tromey@redhat.com>
10815
10816 PR gdb/14917:
10817 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
10818
02d403bf 108192012-11-28 Markus Metzger <markus.t.metzger@intel.com>
945bf713
MM
10820
10821 * configure.ac: Check for linux/perf_event.h.
10822 * config.in: Regenerated.
10823 * configure: Regenerated.
10824
0270a750
PA
108252012-11-26 Maxime Villard <rustyBSD@gmx.fr>
10826
10827 * hostio.c (handle_readlink): Decrease buffer size
10828 parameter passed to readlink by one byte.
10829
8c29b58e
YQ
108302012-11-26 Yao Qi <yao@codesourcery.com>
10831
10832 * configure.ac (build_warnings): Append '-Wempty-body'.
10833 * configure: Regenerated.
10834 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
10835 body.
10836
8bdce1ff
PM
108372012-11-15 Pierre Muller <muller@sourceware.org>
10838
10839 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
10840 * config.in: Regenerate.
10841 * configure: Regenerate.
10842 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
10843 Use "gdb_wait.h" header instead of <sys/wait.h> header.
10844 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
10845 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
10846 header.
10847 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
10848 instead of <sys/wait.h> header.
10849 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
10850
02d403bf 108512012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3ba6ad0f
MM
10852
10853 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
10854 (various make rules): Remove -DGDBSERVER
10855
fbd5db48
YQ
108562012-11-09 Yao Qi <yao@codesourcery.com>
10857
10858 * spu-low.c (current_ptid): Move it to ..
10859 * gdbthread.h: ... here. New.
10860 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
10861 * server.c (myresume, process_serial_event): Likewise.
10862 * thread-db.c (thread_db_find_new_threads): Likewise.
10863 * tracepoint.c (run_inferior_command): Likewise.
10864
b3dc46ff
AB
108652012-10-01 Andrew Burgess <aburgess@broadcom.com>
10866
10867 * server.c (handle_search_memory_1): Include access length in
10868 warning message.
10869
07c04788
HPN
108702012-09-05 Michael Brandt <michael.brandt@axis.com>
10871
10872 * linux-crisv32-low.c: Fix compile errors.
10873
918d227b
YQ
108742012-09-04 Yao Qi <yao@codesourcery.com>
10875
10876 * tracepoint.c (cmd_qtsv): Adjust debug message.
10877 Don't check CUR_TPOINT.
10878
18c1b81a
YQ
108792012-08-28 Yao Qi <yao@codesourcery.com>
10880
10881 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
10882 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
10883 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
10884 Remove declarations of xmalloc, xreallloc, xstrdup and
10885 freeargv.
10886 * Makefile.in (libiberty_h): New.
10887 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
10888 (linux-bfin-low.o): Append dependency 'libiberty.h'.
10889
dc82f37b
YQ
108902012-08-23 Yao Qi <yao@codesourcery.com>
10891
10892 * server.h: Remove declaration of 'xsnprintf'.
10893
406b1477
KS
108942012-08-22 Keith Seitz <keiths@redhat.com>
10895
10896 * server.h: Include build-gnulib-gbserver/config.h.
10897 * gdbreplay.c: Likewise.
10898
e6712ff1
DE
108992012-08-08 Doug Evans <dje@google.com>
10900
10901 * Makefile.in (SFILES): Add gdb_vecs.c.
10902 (OBS): Add gdb_vecs.o.
10903 (gdb_vecs_h, host_defs_h): New variables.
10904 (thread-db.o): Add $(gdb_vecs_h) dependency.
10905 (gdb_vecs.o): New rule.
10906 * thread-db.c: #include "gdb_vecs.h".
10907 (thread_db_load_search): Use a vector to iterate over path elements.
10908 Handle text appearing after "$pdir".
10909
10910 * configure.ac: Add check for strstr.
10911 * config.in: Regenerate.
10912 * configure: Regenerate.
10913
7c3270ae
UW
109142012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
10915
10916 * hostio.c (handle_pread): If pread fails, fall back to attempting
10917 lseek/read.
10918 (handle_pwrite): Likewise for pwrite.
10919
b62e2b27
UW
109202012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
10921
10922 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
10923 between unsupported TYPE and unimplementable ADDR/LEN combination.
10924 (arm_insert_point): Act on new return value.
10925
78a99e91
PA
109262012-07-31 Pedro Alves <palves@redhat.com>
10927
10928 * server.c (process_point_options): Only skip tokens if we find
10929 one that is unrecognized. Don't treat 'X' specially while
10930 skipping unrecognized tokens.
10931
fcf303ab
UW
109322012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
10933
10934 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
10935 to 4-byte-align HW breakpoint addresses for Thumb.
10936
7255706c
YQ
109372012-07-27 Yao Qi <yao@codesourcery.com>
10938
10939 PR remote/14161.
10940
10941 * server.h: Declare gdb_agent_about_to_close.
10942 * target.c (kill_inferior): Include "agent.h".
10943 New. Send command 'kill'.
10944 * target.h (kill_inferior): Removed macro.
10945 * tracepoint.c (gdb_agent_about_to_close): New.
10946 (gdb_agent_helper_thread): Handle command 'close'.
10947 Wait endlessly until the inferior stops.
10948 Install gdb_agent_remove_socket to atexit hook.
10949 (agent_socket_name): New static variable.
10950 (gdb_agent_socket_init): Replace local variable 'name' with
10951 'agent_socket_name'.
10952 (gdb_agent_remove_socket): New.
10953
5a3f286f
YQ
109542012-07-27 Yao Qi <yao@codesourcery.com>
10955
10956 * server.c (process_point_options): Stop at 'X' when parsing.
10957
961bd387
ME
109582012-07-19 Michael Eager <eager@eagercon.com>
10959
a261b8f5 10960 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
961bd387
ME
10961 to hw_execute.
10962 * linux-x86-low.c (x86_insert_point, x86_remove_point):
10963 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
10964 hardware breakpoint.
10965
aa7c7447
JK
109662012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
10967
10968 * gdbserver/linux-low.c (initialize_low): Call
10969 linux_ptrace_init_warnings.
10970
7f216e7c
DE
109712012-07-02 Doug Evans <dje@google.com>
10972
10973 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
10974 pointer to int.
10975
d3ce09f5
SS
109762012-07-02 Stan Shebs <stan@codesourcery.com>
10977
10978 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
10979 (ax.o): Add it to build rule.
10980 (ax-ipa.o): Ditto.
10981 (OBS): Add format.o.
10982 (IPA_OBS): Add format.o.
10983 * server.c (handle_query): Claim support for breakpoint commands.
10984 (process_point_options): Add command case.
10985 (process_serial_event): Leave running if there are printfs in
10986 effect.
10987 * mem-break.h (any_persistent_commands): Declare.
10988 (add_breakpoint_commands): Declare.
10989 (gdb_no_commands_at_breakpoint): Declare.
10990 (run_breakpoint_commands): Declare.
10991 * mem-break.c (struct point_command_list): New struct.
10992 (struct breakpoint): New field command_list.
10993 (any_persistent_commands): New function.
10994 (add_commands_to_breakpoint): New function.
10995 (add_breakpoint_commands): New function.
10996 (gdb_no_commands_at_breakpoint): New function.
10997 (run_breakpoint_commands): New function.
10998 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
10999 locally.
11000 * ax.c: Include format.h.
11001 (ax_printf): New function.
11002 (gdb_eval_agent_expr): Add printf opcode.
11003
2f8f6aed
YQ
110042012-06-13 Yao Qi <yao@codesourcery.com>
11005
11006 * server.c (start_inferior): Remove duplicated writes to fields
11007 'last_resume_kind' and 'last_status' of 'current_inferior'.
11008
0c9070b3
YQ
110092012-06-12 Yao Qi <yao@codesourcery.com>
11010 Pedro Alves <palves@redhat.com>
11011
11012 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
11013 comment.
11014 * server.c (handle_v_cont): Extend comment.
11015
c52daf70
YQ
110162012-06-11 Yao Qi <yao@codesourcery.com>
11017
11018 * linux-low.c (linux_attach): Add 'static'.
11019
d38bbb0a
YQ
110202012-06-06 Yao Qi <yao@codesourcery.com>
11021
11022 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
11023
89dc0afd
JK
110242012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
11025
11026 Fix gcc -flto compilation warning.
11027 * server.c (main): Make variable multi_mode and attach volatile.
11028
75f62ce7
TJB
110292012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
11030
11031 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
11032 if the platform doesn't know about it.
11033
65f479b6
PA
110342012-05-30 Jeff Kenton <jkenton@tilera.com>
11035
11036 * Makefile.in (SFILES): Add linux-tile-low.c.
11037 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
11038 * configure.srv: Handle tilegx-*-linux*.
11039 * linux-tile-low.c: New file.
11040
0c5bf5a9
JK
110412012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11042
11043 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
11044
a493e3e2
PA
110452012-05-24 Pedro Alves <palves@redhat.com>
11046
11047 PR gdb/7205
11048
43aaf8b6 11049 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
a493e3e2 11050
2ea28649
PA
110512012-05-24 Pedro Alves <palves@redhat.com>
11052
11053 PR gdb/7205
11054
11055 Replace target_signal with gdb_signal throughout.
11056
8d409d16
MR
110572012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
11058
11059 * linux-low.c (linux_store_registers): Avoid the copying sequence
11060 when no data has been retrieved by ptrace.
11061
23512c01
MGD
110622012-05-22 Will Deacon <will.deacon@arm.com>
11063
11064 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
11065 Include asm/ptrace.h.
11066 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
11067 already defined.
11068
4934b29e
MR
110692012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
11070
11071 * linux-low.c (linux_store_registers): Don't re-retrieve data
11072 with ptrace that has already been obtained from /proc. Always
11073 copy any data retrieved with ptrace to the buffer supplied.
11074
bde24c0a
PA
110752012-05-11 Yao Qi <yao@codesourcery.com>
11076 Pedro Alves <palves@redhat.com>
11077
11078 * linux-low.c (enum stopping_threads_kind): New.
11079 (stopping_threads): Change type to `enum stopping_threads_kind'.
11080 (handle_extended_wait): If stopping and suspending threads, leave
11081 the new_lwp suspended too.
11082 (linux_wait_for_event): Adjust.
11083 (stop_all_lwps): Set `stopping_threads' to
11084 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
11085 whether we're suspending threads or just stopping them. Assert no
11086 recursion happens.
11087
623b6bdf
YQ
110882012-04-29 Yao Qi <yao@codesourcery.com>
11089
11090 * server.h: Move some code to ...
11091 * gdbthread.h: ... here. New.
11092 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
11093 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
11094 (nto-low.o, win32-low.o): Likewise.
11095 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
11096 * regcache.c, remote-utils.c, server.c: Likewise.
11097 * target.c, tracepoint.c, win32-low.c: Likewise.
11098
f15f9948
TJB
110992012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
11100
11101 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
11102 (PTRACE_ARG4_TYPE): Likewise.
11103 (PTRACE_XFER_TYPE): Likewise.
11104 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
11105 ptrace to PTRACE_ARG3_TYPE.
11106 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
11107 (PTRACE_ARG4_TYPE): Likewise.
11108 (PTRACE_XFER_TYPE): Likewise.
11109 (linux_detach_one_lwp): Cast fourth argument of
11110 ptrace to long then PTRACE_ARG4_TYPE.
11111 (regsets_fetch_inferior_registers): Cast third argument of
11112 ptrace to long then PTRACE_ARG3_TYPE.
11113 (regsets_store_inferior_registers): Likewise.
11114
38ea300a
PA
111152012-04-20 Pedro Alves <palves@redhat.com>
11116
11117 * configure: Regenerate.
11118
c971b7fa
PA
111192012-04-19 Pedro Alves <palves@redhat.com>
11120
43aaf8b6 11121 * Makefile.in (GNULIB_BUILDDIR): New.
c971b7fa 11122 (LIBGNU, INCGNU, GNULIB_H): Adjust.
43aaf8b6
PA
11123 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
11124 (all, install-only, uninstall, clean-info, all-lib, clean): No
11125 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
11126 (maintainer-clean realclean distclean): Use subdir_do.
11127 (subdir_do): New.
11128 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
c971b7fa 11129 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
43aaf8b6
PA
11130 * acinclude.m4: Include acx_configure_dir.m4.
11131 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
11132 calls. Call AC_PROG_RANLIB. Configure gnulib using
11133 ACX_CONFIGURE_DIR.
11134 (GNULIB): New.
11135 (GNULIB_STDINT_H): Adjust.
11136 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
11137 * gdbreplay.c: Include build-gnulib/config.h.
11138 * server.h: Likewise.
11139 * aclocal.m4: Regenerate.
11140 * config.in: Regenerate.
11141 * configure: Regenerate.
c971b7fa 11142
809277f8
PA
111432012-04-19 Pedro Alves <palves@redhat.com>
11144
11145 * Makefile.in (LIBGNU, INCGNU): Adjust.
11146 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
11147 (all, install-only, uninstall, clean-info, all-lib, clean)
11148 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
11149 * configure.ac: Adjust AC_OUTPUT output.
11150 * aclocal.m4: Regenerate.
11151 * configure: Regenerate.
11152
fd9bb8b8
PA
111532012-04-19 Pedro Alves <palves@redhat.com>
11154
11155 * Makefile.in (generated_files): New.
11156 (server_h): Remove the explicit dependency on config.h, and depend
11157 on $generated_files.
11158
1c298c66
PA
111592012-04-19 Pedro Alves <palves@redhat.com>
11160
11161 * Makefile.in (INCGNU): Add -Ignulib.
11162
57c4b50b
PA
111632012-04-19 Pedro Alves <palves@redhat.com>
11164
11165 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
11166 (INCGNU): ... this, and spell out -I here.
11167 (GNULIB_LIB): Rename to ...
11168 (LIBGNU): ... this.
11169 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
11170
1030e047
PA
111712012-04-19 Pedro Alves <palves@redhat.com>
11172
11173 * config.in: Regenerate.
11174
447d4319
PA
111752012-04-19 Pedro Alves <palves@redhat.com>
11176
11177 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
11178 * server.h (memmem): Remove declaration.
11179 * config.in: Regenerate.
11180 * configure: Regenerate.
11181
aad9eab9
YQ
111822012-04-19 Yao Qi <yao@codesourcery.com>
11183
11184 * Makefile.in (SFILES): Add common/vec.c.
11185 (OBS): Add vec.o.
11186 (vec.o): New rule.
11187
3e10640f
YQ
111882012-04-19 Yao Qi <yao@codesourcery.com>
11189
11190 * remote-utils.c (prepare_resume_reply): Replace with macro
11191 target_core_of_thread.
11192 * server.c (handle_qxfer_threads_proper): Likewise.
11193 * target.h (traget_core_of_thread): New macro.
11194
71622373
PA
111952012-04-18 Pedro Alves <palves@redhat.com>
11196
11197 * aclocal.m4: Regenerate.
11198 * configure: Regenerate.
11199
80d26939
YQ
112002012-04-16 Yao Qi <yao@codesourcery.com>
11201
11202 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
11203 duplicated on address.
11204
42476b70
YQ
112052012-04-16 Yao Qi <yao@codesourcery.com>
11206
11207 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
11208 (struct tracepoint_action_ops) <send>: New field.
11209 (m_tracepoint_action_send, r_tracepoint_action_send): New.
11210 (agent_expr_send, x_tracepoint_action_send): New.
11211 (l_tracepoint_action_send): New.
11212 (cmd_qtdp): Download and install tracepoint
11213 according to `use_agent'.
11214 (run_inferior_command): Add one more parameter `len'.
11215 Update callers.
11216 (tracepoint_send_agent): New.
11217 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
11218
7bc83639
YQ
112192012-04-16 Yao Qi <yao@codesourcery.com>
11220
11221 * tracepoint.c (download_tracepoints): Moved to ...
11222 (cmd_qtstart): ... here.
11223
5f18041e
YQ
112242012-04-14 Yao Qi <yao@codesourcery.com>
11225
11226 * tracepoint.c: Include inttypes.h.
11227 (struct collect_memory_action): Use sized types.
11228 (struct tracepoint): Likewise.
11229 (cmd_qtdp, stop_tracing): Update print specifiers.
11230 (cmd_qtp, response_tracepoint): Likewise.
11231 (collect_data_at_tracepoint): Likewise.
11232 (collect_data_at_step): Likewise.
11233
55a8c076
YQ
112342012-04-14 Yao Qi <yao@codesourcery.com>
11235
11236 Import gnulib module inttypes.
11237 * aclocal.m4, config.in, configure: Regenerated.
11238
dc750257
YQ
112392012-04-14 Yao Qi <yao@codesourcery.com>
11240
11241 * Makefile.in (maintainer-clean, realclean, distclean): Remove
11242 Makefile and config.status at last.
11243
0ab5faf9
YQ
112442012-04-13 Yao Qi <yao@codesourcery.com>
11245
11246 * tracepoint.c: Include stdint.h unconditionally.
11247
18f5fd81
TJB
112482012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
11249
11250 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
11251 on BFD_HAVE_SYS_PROCFS_TYPE.
11252 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
11253 * configure: Regenerate.
11254 * config.in: Likewise.
11255
4d47af5c
L
112562012-04-13 H.J. Lu <hongjiu.lu@intel.com>
11257
11258 * Makefile.in (clean): Also remove x32.c x32-linux.c
11259 x32-avx.c x32-avx-linux.c.
11260 (x32.o): New target.
11261 (x32.c): Likewise.
11262 (x32-linux.o): Likewise.
11263 (x32-linux.c): Likewise.
11264 (x32-avx.o): Likewise.
11265 (x32-avx.c): Likewise.
11266 (x32-avx-linux.o): Likewise.
11267 (x32-avx-linux.c): Likewise.
11268
11269 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
11270 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
11271 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
11272 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
11273 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
11274 i386/x32-avx-linux.xml.
11275
11276 * linux-x86-low.c (init_registers_x32_linux): New prototype.
11277 (init_registers_x32_avx_linux): Likwise.
11278 (x86_linux_update_xmltarget): Call init_registers_x32_linux
11279 or init_registers_x32_avx_linux if linux_is_elf64 is false.
11280
ecedbe58
PA
112812012-04-13 Pedro Alves <palves@redhat.com>
11282
11283 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
11284 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
11285 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
11286 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
11287 the sub-make.
11288
c92b5177
L
112892012-04-12 H.J. Lu <hongjiu.lu@intel.com>
11290
11291 * linux-x86-low.c (compat_x32_clock_t): New.
11292 (compat_x32_siginfo_t): Likewise.
11293 (compat_x32_siginfo_from_siginfo): Likewise.
11294 (siginfo_from_compat_x32_siginfo): Likewise.
11295 (linux_is_elf64): Likewise.
11296 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
11297 and siginfo_from_compat_x32_siginfo for x32.
11298 (x86_arch_setup): Set linux_is_elf64.
11299
214d508e
L
113002012-04-12 H.J. Lu <hongjiu.lu@intel.com>
11301
11302 PR gdb/13969
11303 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
11304 e_machine field.
11305 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
11306 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
11307 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
11308 compatible with process.
11309
c9a1864a
YQ
113102012-04-12 Yao Qi <yao@codesourcery.com>
11311
11312 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
11313 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
11314 (install-only, install-info, clean): Handle sub dir gnulib.
11315 (all-lib, am--refresh): New targets.
11316 (memmem.o): Remove target.
11317 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
11318 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
11319 (AC_REPLACE_FUNCS): Remove memmem.
11320 Invoke gl_INIT and AM_INIT_AUTOMAKE.
11321 (AC_OUTPUT): Generate Makefile in gnulib/.
11322 * aclocal.m4, config.in, configure: Regenerated.
11323
367ba2c2
MR
113242012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
11325
11326 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
11327
9d236627
PA
113282012-04-05 Pedro Alves <palves@redhat.com>
11329
11330 -Werror=strict-aliasing
11331
11332 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
11333 pointer.
11334
111217b3
PA
113352012-04-04 Pedro Alves <palves@redhat.com>
11336
11337 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
11338 (sparc_store_gregset_from_stack, sparc_store_gregset)
11339 (sparc_breakpoint_at): Fix formatting.
11340
8365dcf5
TJB
113412012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
11342
11343 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
11344 are available.
11345 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
11346 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
11347 * config.in: Regenerate.
11348 * configure: Likewise.
11349
689cc2ae
PA
113502012-03-29 Pedro Alves <palves@redhat.com>
11351
11352 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
11353 Correct ptrace arguments.
11354
c14dfd32
PA
113552012-03-28 Pedro Alves <palves@redhat.com>
11356
11357 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
11358 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
11359 (IA64_FR1_REGNUM): New defines.
11360 (ia64_fetch_register): New.
11361 (the_low_target): Install it.
11362 * linux-low.h (struct linux_target_ops) <fetch_register>: New
11363 field.
11364 * linux-low.c (linux_fetch_registers): Try the
11365 the_low_target.fetch_register hook first.
11366
11367 * linux-arm-low.c (the_low_target): Adjust.
11368 * linux-bfin-low.c (the_low_target): Adjust.
11369 * linux-cris-low.c (the_low_target): Adjust.
11370 * linux-crisv32-low.c (the_low_target): Adjust.
11371 * linux-m32r-low.c (the_low_target): Adjust.
11372 * linux-m68k-low.c (the_low_target): Adjust.
11373 * linux-mips-low.c (the_low_target): Adjust.
11374 * linux-ppc-low.c (the_low_target): Adjust.
11375 * linux-s390-low.c (the_low_target): Adjust.
11376 * linux-sh-low.c (the_low_target): Adjust.
11377 * linux-sparc-low.c (the_low_target): Adjust.
11378 * linux-tic6x-low.c (the_low_target): Adjust.
11379 * linux-x86-low.c (the_low_target): Adjust.
11380 * linux-xtensa-low.c (the_low_target): Adjust.
11381
63c88e13
PA
113822012-03-26 Pedro Alves <palves@redhat.com>
11383
11384 * server.c (handle_qxfer_libraries): Don't bail early if
11385 the_target->qxfer_libraries_svr4 is not NULL.
11386
fb723180
PA
113872012-03-26 Pedro Alves <palves@redhat.com>
11388
11389 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
11390
0afae3cf
PA
113912012-03-23 Pedro Alves <palves@redhat.com>
11392
11393 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
11394 "library-list-svr4" element's start tag when the the DSO list is
11395 empty.
11396
485f1ee4
PA
113972012-03-23 Pedro Alves <palves@redhat.com>
11398
11399 * linux-low.c (read_one_ptr): Read the inferior's pointer through
11400 a variable whose type size is the same as the inferior's pointer
11401 size.
11402
a5362b9a
TS
114032012-03-21 Thomas Schwinge <thomas@codesourcery.com>
11404
11405 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
11406 struct siginfo.
11407 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
11408 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
11409 * linux-low.h: Include <signal.h>.
11410 (struct siginfo): Remove forward declaration.
11411 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
11412 struct siginfo.
11413
d226c142
MF
114142012-03-21 Mike Frysinger <vapier@gentoo.org>
11415
11416 * .gitignore: Ignore more files.
11417
122f36ef
PA
114182012-03-19 Pedro Alves <palves@redhat.com>
11419 Jan Kratochvil <jan.kratochvil@redhat.com>
11420
11421 * server.c (cont_thread, general_thread): Add describing comments.
11422 (start_inferior): Clear `cont_thread'.
11423 (handle_v_cont): Don't set `cont_thread' if resuming all threads
11424 of a process.
11425
fc3e5175
YQ
114262012-03-15 Yao Qi <yao@codesourcery.com>
11427
11428 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
11429 handling to ...
11430 (cmd_qtdp): ... here.
11431
8d0d92cd
YQ
114322012-03-15 Yao Qi <yao@codesourcery.com>
11433
11434 * tracepoint.c (struct tracepoint_action_ops): New.
11435 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
11436 (m_tracepoint_action_download): New.
11437 (r_tracepoint_action_download): New.
11438 (x_tracepoint_action_download): New.
11439 (l_tracepoint_action_download): New.
11440 (add_tracepoint_action): Install `action->ops' according type.
11441 (download_tracepoint_1): Move code `download' function pointer
11442 of various tracepoint_action_ops.
11443
87b0bb13
JK
114442012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
11445
11446 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
11447 linux_ptrace_attach_warnings.
11448
5f572dec
JK
114492012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
11450
11451 * Makefile.in (linux-ptrace.o): New.
11452 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
11453 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
11454 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
11455 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
11456 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
11457 of these targets.
11458 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
11459
f4647387
YQ
114602012-03-08 Yao Qi <yao@codesourcery.com>
11461 Pedro Alves <palves@redhat.com>
11462
11463 Fix PR server/13392.
11464 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
11465 offset of JMP insn.
11466 * tracepoint.c (remove_tracepoint): New.
11467 (cmd_qtdp): Call remove_tracepoint when failed to install.
11468
9b224c5e
PA
114692012-03-07 Pedro Alves <palves@redhat.com>
11470
11471 * linux-low.c (get_detach_signal): New.
11472 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
11473 Pass on pending signals to PTRACE_DETACH. Check the result of the
11474 ptrace call.
11475 * server.c (program_signals, program_signals_p): New.
11476 (handle_general_set): Handle QProgramSignals.
11477 * server.h (program_signals, program_signals_p): Declare.
11478
e237a7e2
JK
114792012-03-05 Pedro Alves <palves@redhat.com>
11480 Jan Kratochvil <jan.kratochvil@redhat.com>
11481
11482 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
11483 New comment why.
11484
5808517f
YQ
114852012-03-03 Yao Qi <yao@codesourcery.com>
11486
11487 * tracepoint.c (tracepoint_look_up_symbols): Update call to
11488 agent_look_up_symbols.
11489
58b4daa5
YQ
114902012-03-03 Yao Qi <yao@codesourcery.com>
11491
11492 * Makefile.in (linux-low.o): Keep dependence on agent.h.
11493 (linux-x86-low.o): Likewise.
11494 * server.h: Remove in_process_agent_loaded.
11495 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
11496 common/agent.c.
11497 Update callers.
11498
8ffcbaaf
YQ
114992012-03-03 Yao Qi <yao@codesourcery.com>
11500
11501 * tracepoint.c (gdb_agent_capability): New global.
11502 (in_process_agent_loaded_ust): Renamed to
11503 `in_process_agent_supports_ust'.
11504 Update callers.
11505 (in_process_agent_supports_ust): Call agent_capability_check.
11506 (clear_installed_tracepoints): Assert that agent supports
11507 agent.
11508
d1feda86
YQ
115092012-03-03 Yao Qi <yao@codesourcery.com>
11510
11511 * linux-low.c (linux_supports_agent): New.
11512 (linux_target_ops): Initialize field `supports_agent' with
11513 linux_supports_agent.
11514 * target.h (struct target_ops) <supports_agent>: New.
11515 (target_supports_agent): New macro.
11516 * server.c (handle_general_set): Handle packet 'QAgent'.
11517 (handle_query): Send `QAgent+'.
11518 * Makefile.in (server.o): Depends on agent.h.
11519
2fa291ac
YQ
115202012-03-03 Yao Qi <yao@codesourcery.com>
11521
11522 * Makefile.in (OBS): Add agent.o.
11523 Add new rule for agent.o.
11524 Track dependence of tracepoint.c on agent.h.
11525 * tracepoint.c (run_inferior_command_1):
11526 (run_inferior_command): Call agent_run_command.
11527 (gdb_ust_connect_sync_socket): Deleted. Move it to
11528 common/agent.c.
11529 (resume_thread, stop_thread): Likewise.
11530 (gdb_ust_socket_init): Renamed to ...
11531 (gdb_agent_socket_init): ... New.
11532 (gdb_ust_thread): Renamed to ...
11533 (gdb_agent_helper_thread): ... New.
11534 (gdb_ust_init): Move some code to ...
11535 (gdb_agent_init): ... here. New.
11536 [HAVE_UST]: Call gdb_ust_init.
11537 (initialize_tracepoint_ftlib): Call gdb_agent_init.
11538 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
11539 * config.in, configure: Regenerated.
11540
05044653
PA
115412012-03-02 Pedro Alves <palves@redhat.com>
11542
11543 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
11544 * linux-low.c (struct simple_pid_list): New.
11545 (stopped_pids): New a struct simple_pid_list pointer.
11546 (add_to_pid_list, pull_pid_from_list): New.
11547 (handle_extended_wait): Don't assume the first signal new children
11548 report is SIGSTOP. Adjust call to pull_pid_from_list.
11549 (linux_wait_for_lwp): Adjust.
11550
8d00225b
YQ
115512012-03-02 Yao Qi <yao@codesourcery.com>
11552
11553 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
11554 debug log.
11555
19560ba5
YQ
115562012-03-02 Yao Qi <yao@codesourcery.com>
11557
11558 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
11559 `stop_pc' and `tpoint'. Update caller.
11560
1faeff08
MR
115612012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
11562
11563 * linux-low.h (linux_target_ops): Add regset_bitmap member.
11564 * linux-low.c (use_linux_regsets): New macro.
11565 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
11566 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
11567 (linux_register_in_regsets): New function.
11568 (usr_fetch_inferior_registers): Skip registers covered by
11569 regsets.
11570 (usr_store_inferior_registers): Likewise.
11571 (usr_fetch_inferior_registers): New macro.
11572 (usr_store_inferior_registers): Likewise.
11573 (linux_fetch_registers): Handle mixed regset/non-regset targets.
11574 (linux_store_registers): Likewise.
11575 * linux-mips-low.c (init_registers_mips_dsp_linux): New
11576 prototype.
11577 (init_registers_mips64_dsp_linux): Likewise.
11578 (init_registers_mips_linux): New macro.
11579 (init_registers_mips_dsp_linux): Likewise.
11580 (mips_dsp_num_regs): Likewise.
11581 (DSP_BASE, DSP_CONTROL): New fallback macros.
11582 (mips_base_regs): New macro.
11583 (mips_regmap): Use it. Fix the size.
11584 (mips_dsp_regmap): New variable.
11585 (mips_dsp_regset_bitmap): Likewise.
11586 (mips_arch_setup): New function.
11587 (mips_cannot_fetch_register): Use the_low_target.regmap rather
11588 than mips_regmap.
11589 (mips_cannot_store_register): Likewise.
11590 (the_low_target): Update .arch_setup, .num_regs and .regmap
11591 initializers. Add .regset_bitmap initializer.
11592 * linux-arm-low.c (the_low_target): Add .regset_bitmap
11593 initializer.
11594 * linux-bfin-low.c (the_low_target): Likewise.
11595 * linux-cris-low.c (the_low_target): Likewise.
11596 * linux-crisv32-low.c (the_low_target): Likewise.
11597 * linux-ia64-low.c (the_low_target): Likewise.
11598 * linux-m32r-low.c (the_low_target): Likewise.
11599 * linux-m68k-low.c (the_low_target): Likewise.
11600 * linux-ppc-low.c (the_low_target): Likewise.
11601 * linux-s390-low.c (the_low_target): Likewise.
11602 * linux-sh-low.c (the_low_target): Likewise.
11603 * linux-sparc-low.c (the_low_target): Likewise.
11604 * linux-tic6x-low.c (the_low_target): Likewise.
11605 * linux-x86-low.c (the_low_target): Likewise.
11606 * linux-xtensa-low.c (the_low_target): Likewise.
11607 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
11608 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
11609 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
11610 srv_xmlfiles.
11611 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
11612 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
11613
c03e6ccc
YQ
116142012-02-29 Yao Qi <yao@codesourcery.com>
11615 Pedro Alves <palves@redhat.com>
11616
11617 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
11618 `step_over_finished' is true.
11619
644cebc9
PA
116202012-02-27 Pedro Alves <palves@redhat.com>
11621
11622 * linux-low.c (pid_is_stopped): Delete, moved to common/.
11623 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
11624
c14d7ab2
PA
116252012-02-27 Pedro Alves <palves@redhat.com>
11626
11627 PR server/9684
11628 * linux-low.c (pid_is_stopped): New.
11629 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
11630
412c89dd
LM
116312012-02-25 Luis Machado <lgustavo@codesourcery.com>
11632
11633 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
11634 of conditions.
11635
b745defe
MR
116362012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
11637
11638 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
11639
9f3a5c85
LM
116402012-02-24 Luis Machado <lgustavo@codesourcery>
11641
11642 * server.c (handle_query): Advertise support for target-side
11643 breakpoint condition evaluation.
11644 (process_point_options): New function.
11645 (process_serial_event): When inserting a breakpoint, check for
11646 a target-side condition that should be evaluated.
11647
11648 * mem-break.c: Include regcache.h and ax.h.
11649 (point_cond_list_t): New data structure.
11650 (breakpoint) <cond_list>: New field.
11651 (find_gdb_breakpoint_at): Make non-static.
11652 (delete_gdb_breakpoint_at): Clear any target-side
11653 conditions.
11654 (clear_gdb_breakpoint_conditions): New function.
11655 (add_condition_to_breakpoint): Likewise.
11656 (add_breakpoint_condition): Likewise.
11657 (gdb_condition_true_at_breakpoint): Likewise.
11658 (gdb_breakpoint_here): Return result directly instead
11659 of going through a local variable.
11660
11661 * mem-break.h (find_gdb_breakpoint_at): New prototype.
11662 (clear_gdb_breakpoint_conditions): Likewise.
11663 (add_breakpoint_condition): Likewise.
11664 (gdb_condition_true_at_breakpoint): Likewise.
11665
11666 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
11667 (need_step_over_p): Take target-side breakpoint condition into
11668 consideration.
11669
5e1dc496
LM
116702012-02-24 Luis Machado <lgustavo@codesourcery>
11671
11672 * server.h: Include tracepoint.h.
11673 (agent_mem_read, agent_get_trace_state_variable_value,
11674 agent_set_trace_state_variable_value,
11675 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
11676 get_set_tsv_func_addr): New prototypes.
11677
11678 * ax.h: New include file.
11679 * ax.c: New source file.
11680
11681 * tracepoint.c: Include ax.h.
11682 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
11683 agent_expr, eval_result_type): Move to ax.h.
11684 (parse_agent_expr): Rename to ...
11685 (gdb_parse_agent_expr): ... this, make it non-static and move
11686 to ax.h.
11687 (unparse_agent_expr) Rename to ...
11688 (gdb_unparse_agent_expr): ... this, make it non-static and move
11689 to ax.h.
11690 (eval_agent_expr): Rename to ...
11691 (eval_tracepoint_agent_expr): ... this.
11692 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
11693 forward declarations.
11694 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
11695 (agent_get_trace_state_variable_value): New function.
11696 (agent_set_trace_state_variable_value): New function.
11697 (cmd_qtdp): Call gdb_parse_agent_expr (...).
11698 (response_tracepoint): Call gdb_unparse_agent_expr (...).
11699 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
11700 (condition_true_at_tracepoint): Likewise.
11701 (parse_agent_expr): Rename to ...
11702 (gdb_parse_agent_expr): ... this and move to ax.c.
11703 (unparse_agent_expr): Rename to ...
11704 (gdb_unparse_agent_expr): ... this and move to ax.c.
11705 (gdb_agent_op_name): Move to ax.c.
11706 (eval_agent_expr): Rename to ...
11707 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
11708 and move to ax.c.
11709 (eval_tracepoint_agent_expr): New function.
11710 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
43aaf8b6 11711 non-static.
5e1dc496
LM
11712 (current_insn_ptr, emit_error, struct bytecode_address): Move to
11713 ax.c.
11714 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
11715 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
11716 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
11717 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
11718 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
11719 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
11720 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
11721 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
11722 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
11723 (compile_bytecodes): Remove forward declaration.
11724 (is_goto_target): Move to ax.c.
11725 (compile_bytecodes): Move to ax.c and call
11726 agent_get_trace_state_variable_value (...) and
11727 agent_set_trace_state_variable_value (...).
11728
11729 * Makefile.in: Update ax.c and IPA dependencies.
11730
277e4e52
PA
117312012-02-24 Pedro Alves <palves@redhat.com>
11732
11733 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
11734 (cmd_bigqtbuffer_circular): ... this. Only handle
11735 'QTBuffer:circular:'.
11736 (handle_tracepoint_general_set): Adjust.
11737
bf4c19f7
YQ
117382012-02-16 Yao Qi <yao@codesourcery.com>
11739
11740 * inferiors.c: Move code to ...
11741 * dll.c: .... here. New.
11742 * server.h: Declare clear_dlls.
11743 * Makefile.in (SFILES): Add dll.c.
11744 (OBS): Add dll.o
11745 (dll.o): New rule.
11746
d73f2619
YQ
117472012-02-11 Yao Qi <yao@codesourcery.com>
11748
11749 * server.c: (handle_monitor_command): Add a new parameter
11750 `own_buf'.
11751 (handle_query): Update caller.
11752
f8255c2a
JB
117532012-02-09 Joel Brobecker <brobecker@adacore.com>
11754
11755 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
11756 * configure, config.in: Regenerate.
11757 * hostio.c: Provide an alternate implementation if HAVE_READLINK
11758 is not defined.
11759
da84f473
PA
117602012-02-02 Pedro Alves <palves@redhat.com>
11761
11762 Try SIGKILL first, then PTRACE_KILL.
11763 * linux-low.c (linux_kill_one_lwp): New.
11764 (linux_kill_one_lwp): Rename to ...
11765 (kill_one_lwp_callback): ... this. Use the new
11766 linux_kill_one_lwp.
11767
e886a173
PA
117682012-02-02 Pedro Alves <palves@redhat.com>
11769
11770 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
11771 inferior.
11772
be07f1a2
PA
117732012-01-27 Pedro Alves <palves@redhat.com>
11774
11775 * linux-low.c (linux_child_pid_to_exec_file): Delete.
11776 (elf_64_file_p): Make static.
11777 (linux_pid_exe_is_elf_64_file): New.
11778 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
11779 Delete declarations.
11780 (linux_pid_exe_is_elf_64_file): Declare.
11781 * linux-x86-low.c (x86_arch_setup): Use
11782 linux_pid_exe_is_elf_64_file.
11783
d8301ad1
JK
117842012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
11785
11786 * linux-low.c (linux_wait_for_event_1): Rename to ...
11787 (linux_wait_for_event): ... here and merge it with former
11788 linux_wait_for_event - new variable wait_ptid, use it.
11789 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
11790
01b17894
PA
117912012-01-23 Pedro Alves <palves@redhat.com>
11792
11793 * server.c (main): Avoid yet another case of infinite loop while
11794 detaching/killing after a longjmp.
11795
e825046f
JK
117962012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
11797
11798 Code cleanup.
11799 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
11800
b9e7b9c3
UW
118012012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
11802
11803 * hostio.c (handle_readlink): New function.
11804 (handle_vFile): Call it to handle "vFile:readlink" packets.
11805
901f9912
UW
118062012-01-20 Pedro Alves <palves@redhat.com>
11807 Ulrich Weigand <ulrich.weigand@linaro.org>
11808
11809 * server.c (handle_v_requests): Only support vAttach and vRun to
11810 start multiple processes when in extended protocol mode.
11811
fc1ab1a0
PA
118122012-01-17 Pedro Alves <palves@redhat.com>
11813
11814 * tracepoint.c (initialize_tracepoint): Use mmap instead of
11815 memalign plus mprotect to allocate the scratch buffer.
11816
7d5d4e98
PA
118172012-01-13 Pedro Alves <palves@redhat.com>
11818
11819 * server.c (attach_inferior): Clear `cont_thread'.
11820
f128d5e9
PA
118212012-01-13 Pedro Alves <palves@redhat.com>
11822
11823 * server.c (main): Avoid infinite loop while detaching/killing
11824 after a longjmp.
11825
06db92f0
DE
118262012-01-09 Doug Evans <dje@google.com>
11827
11828 * server.c (start_inferior): Set last_ptid in --wrapper case.
11829
32d92999
YQ
118302012-01-06 Yao Qi <yao@codesourcery.com>
11831
11832 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
11833 defined.
11834 [IN_PROCESS_AGENT] (debug_agent): New global variable.
11835
5e0a92a9
YQ
118362012-01-04 Yao Qi <yao@codesourcery.com>
11837
11838 * tracepoint.c (cmd_qtdp): Print debug message
11839 for static tracepoint.
11840
ae639e8c
YQ
118412012-01-04 Yao Qi <yao@codesourcery.com>
11842
11843 * tracepoint.c (trace_vdebug): Differentiate debug message
11844 between gdbserver and IPA.
11845
f72429c5
YQ
118462012-01-03 Yao Qi <yao@codesourcery.com>
11847
11848 * tracepoint.c (tracepoint_was_hit): Don't collect for
11849 static tracepoint.
11850
12c3e59c
JB
118512012-01-02 Joel Brobecker <brobecker@adacore.com>
11852
11853 * terminal.h: Reformat copyright header.
11854
67827812
JB
118552012-01-02 Joel Brobecker <brobecker@adacore.com>
11856
11857 * server.c (gdbserver_version): Update copyright year.
11858 * gdbreplay.c (gdbreplay_version): Likewise.
11859
3e52c33d
JK
118602011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
11861
11862 * linux-low.c (linux_create_inferior): Put empty if clause for write.
11863
11864 Revert:
11865 2011-12-18 Hui Zhu <teawater@gmail.com>
11866 * linux-low.c (linux_create_inferior): Save return value to ret.
11867
66f1260e
HZ
118682011-12-18 Hui Zhu <teawater@gmail.com>
11869
11870 * linux-low.c (linux_create_inferior): Save return value to ret.
11871
e77616d7
DE
118722011-12-16 Doug Evans <dje@google.com>
11873
e7b06c57
DE
11874 * linux-low.c (linux_create_inferior): If stdio connection,
11875 redirect stdin from /dev/null, stdout to stderr.
11876 * remote-utils.c (remote_is_stdio): New static global.
11877 (remote_connection_is_stdio): New function.
11878 (remote_prepare): Handle stdio connection.
11879 (remote_open): Ditto.
11880 (remote_close): Don't close stdin for stdio connections.
11881 (read_prim,write_prim): New functions. Replace all calls to
11882 read/write to these.
11883 * server.c (main): Watch for "-" argument. Move call to
11884 remote_prepare before start_inferior.
11885 * server.h (STDIO_CONNECTION_NAME): New macro.
11886 (remote_connection_is_stdio): Declare.
11887
e77616d7
DE
11888 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
11889 in debugging output.
11890
82067193
YQ
118912011-12-15 Yao Qi <yao@codesourcery.com>
11892
11893 * tracepoint.c: Include sys/syscall.h.
11894 (gdb_ust_thread): Remove preprocessor conditional.
11895
82bfbe7e
PA
118962011-12-14 Pedro Alves <pedro@codesourcery.com>
11897
11898 * linux-low.c (linux_detach_one_lwp): Call
11899 the_low_target.prepare_to_resume before detaching.
11900
712c6575
YQ
119012011-12-14 Yao Qi <yao@codesourcery.com>
11902
11903 * tracepoint.c (gdb_ust_thread): Don't ignore return value
11904 of write.
11905
d54d1edf
YQ
119062011-12-14 Yao Qi <yao@codesourcery.com>
11907
11908 * i386-low.c (i386_low_stopped_data_address): Initialize local
11909 variable `control'.
11910
6210a125
PA
119112011-12-13 Pedro Alves <pedro@codesourcery.com>
11912
11913 PR remote/13492
11914
11915 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
11916 DR_CONTROL unless necessary. Extend comments.
11917 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
11918 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
11919
2ece8244
YQ
119202011-12-13 Yao Qi <yao@codesourcery.com>
11921
11922 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
11923 macros.
11924 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
11925
784867a5
JK
119262011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
11927
11928 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
11929 Print new debug message for such case.
11930
6bf36717
JK
119312011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
11932
11933 Fix overlapping memcpy.
11934 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
11935 the read_inferior_memory transfer.
11936 (delete_fast_tracepoint_jump): New variable buf. Use it for the
11937 write_inferior_memory transfer.
11938 (set_fast_tracepoint_jump): New variable buf. Use it for the
11939 read_inferior_memory and write_inferior_memory transfers.
11940 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
11941 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
11942 Use it for the write_inferior_memory transfer.
11943 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
11944 buffers.
11945
50275556
MR
119462011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
11947
11948 * linux-low.c (fetch_register, store_register): Make code
11949 consistent, fix formatting.
11950
7325beb4
MR
119512011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
11952
11953 * linux-low.c (usr_store_inferior_registers): Factor out code
11954 to handle individual registers into...
11955 (store_register): ... this new function.
11956
c642a434
UW
119572011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
11958
11959 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
11960 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
11961 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
11962 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
11963 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
11964 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
11965 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
11966 (srv_xmlfiles): Add new XML files.
11967
11968 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
11969 and <sys/uio.h>.
11970 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
11971 (init_registers_s390_linux32v1): Add prototype.
11972 (init_registers_s390_linux32v2): Likewise.
11973 (init_registers_s390_linux64v1): Likewise.
11974 (init_registers_s390_linux64v2): Likewise.
11975 (init_registers_s390x_linux64v1): Likewise.
11976 (init_registers_s390x_linux64v2): Likewise.
11977 (s390_num_regs): Increment to 52.
11978 (s390_regmap): Add orig_r2 register.
11979 (s390_num_regs_3264): Increment to 68.
11980 (s390_regmap_3264): Add orig_r2 register.
11981 (s390_collect_ptrace_register): Handle orig_r2 register.
11982 (s390_supply_ptrace_register): Likewise.
11983 (s390_fill_last_break): New function.
11984 (s390_store_last_break): Likewise.
11985 (s390_fill_system_call): New function.
11986 (s390_store_system_call): Likewise.
11987 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
11988 register sets.
11989 (s390_check_regset): New function.
11990 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
11991 NT_S390_SYSTEM_CALL regsets and use appropriate description.
11992 Update target_regsets for available register sets.
11993
2268b414
JK
119942011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
11995 Jan Kratochvil <jan.kratochvil@redhat.com>
11996
11997 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
11998 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
11999 New.
12000 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
12001 * linux-low.h (struct process_info_private): New member r_debug.
12002 * server.c (handle_qxfer_libraries): Call
12003 the_target->qxfer_libraries_svr4.
12004 (handle_qxfer_libraries_svr4): New function.
12005 (qxfer_packets): New entry "libraries-svr4".
12006 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
12007 * target.h (struct target_ops): New member qxfer_libraries_svr4.
12008 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
12009 PACKET_qXfer_libraries_svr4.
12010
d6db1fab
UW
120112011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
12012
12013 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
12014 PSW address/mask between 8-byte and 16-byte formats.
12015 (s390_supply_ptrace_register): Likewise.
12016 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
12017 basic addressing mode bit.
12018
242f5f1c
SS
120192011-11-24 Stan Shebs <stan@codesourcery.com>
12020
12021 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
12022
f196051f
SS
120232011-11-17 Stan Shebs <stan@codesourcery.com>
12024
12025 * tracepoint.c (struct tracepoint): New field traceframe_usage.
12026 (tracing_start_time): New global.
12027 (tracing_stop_time): New global.
12028 (tracing_user_name): New global.
12029 (tracing_notes): New global.
12030 (tracing_stop_note): New global.
12031 (cmd_qtstart): Set traceframe_usage, start_time.
12032 (stop_tracing): Set stop_time.
12033 (cmd_qtstatus): Report additional status.
12034 (cmd_qtp): New function.
12035 (handle_tracepoint_query): Call it.
12036 (cmd_qtnotes): New function.
12037 (handle_tracepoint_general_set): Call it.
12038 (get_timestamp): Rename from tsv_get_timestamp.
12039
405f8e94
SS
120402011-11-14 Stan Shebs <stan@codesourcery.com>
12041 Kwok Cheung Yeung <kcy@codesourcery.com>
12042
12043 * linux-x86-low.c (small_jump_insn): New.
12044 (i386_install_fast_tracepoint_jump_pad): Add arguments for
12045 trampoline and error message, build a trampoline and issue a small
12046 jump instruction to it.
12047 (x86_install_fast_tracepoint_jump_pad): Add arguments for
12048 trampoline and error message.
12049 (x86_get_min_fast_tracepoint_insn_len): New.
12050 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
12051 * linux-low.h (struct linux_target_ops): Add arguments to
12052 install_fast_tracepoint_jump_pad operation, add new operation.
12053 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
12054 arguments.
12055 (linux_get_min_fast_tracepoint_insn_len): New function.
12056 (linux_target_op): Add new operation.
12057 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
12058 (gdb_trampoline_buffer_end): Ditto.
12059 (gdb_trampoline_buffer_error): Ditto.
12060 (struct ipa_sym_addresses): Add fields for new IPA variables.
12061 (symbol_list): Add entries for new IPA variables.
12062 (struct tracepoint): Add fields to hold the address range of the
12063 trampoline used by the tracepoint.
12064 (trampoline_buffer_head): New static variable.
12065 (trampoline_buffer_tail): Ditto.
12066 (claim_trampoline_space): New function.
12067 (have_fast_tracepoint_trampoline_buffer): New function.
12068 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
12069 structure.
12070 (install_fast_tracepoint): Ditto, also add error buffer argument.
12071 (cmd_qtminftpilen): New function.
12072 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
12073 (fast_tracepoint_from_trampoline_address): New function.
12074 (fast_tracepoint_collecting): Handle trampoline as part of jump
12075 pad space.
12076 (set_trampoline_buffer_space): New function.
12077 (initialize_tracepoint): Initialize new IPA variables.
12078 * target.h (struct target_ops): Add arguments to
12079 install_fast_tracepoint_jump_pad operation, add new
12080 get_min_fast_tracepoint_insn_len operation.
12081 (target_get_min_fast_tracepoint_insn_len): New.
12082 (install_fast_tracepoint_jump_pad): Add arguments.
12083 * server.h (IPA_BUFSIZ): Define.
12084 * linux-i386-ipa.c: Include extra header files.
12085 (initialize_fast_tracepoint_trampoline_buffer): New function.
12086 (initialize_low_tracepoint): Call it.
12087 * server.h (set_trampoline_buffer_space): Declare.
12088 (claim_trampoline_space): Ditto.
12089 (have_fast_tracepoint_trampoline_buffer): Ditto.
12090
1e4d1764
YQ
120912011-11-14 Yao Qi <yao@codesourcery.com>
12092
12093 * server.c (handle_query): Handle InstallInTrace for qSupported.
12094 * tracepoint.c (add_tracepoint): Sort list.
12095 (install_tracepoint, download_tracepoint): New.
12096 (cmd_qtdp): Call them to install and download tracepoints.
12097 (sort_tracepoints): Removed.
12098 (cmd_qtstart): Update.
12099
5c73ff4e
YQ
121002011-11-14 Yao Qi <yao@codesourcery.com>
12101
12102 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
12103 * mem-break.h: Declare.
12104 * tracepoint.c (cmd_qtstart): Move some code to ...
12105 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
12106 New.
12107 (download_tracepoints): Move some code to ...
12108 (download_tracepoint_1): ... here. New.
12109
86a30030
YQ
121102011-11-08 Yao Qi <yao@codesourcery.com>
12111
12112 * remote-utils.c (relocate_instruction): A comment fix.
12113
8d26e50c
JB
121142011-11-07 Joel Brobecker <brobecker@adacore.com>
12115
12116 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
12117 (i386_dr_low_get_control, i386_dr_low_get_status): Use
12118 dr_status_mirror and dr_control_mirror from debug_reg_state.
12119 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
12120 (i386_initial_stuff): Remove use of deleted globals.
12121 (i386_get_thread_context, i386_set_thread_context,
12122 i386_thread_added): Use dr_status_mirror and dr_control_mirror
12123 from debug_reg_state.
12124
a59306a3
YQ
121252011-11-05 Yao Qi <yao@codesourcery.com>
12126
12127 * tracepoint.c (gdb_collect): Loop over tracepoints of same
12128 address as TPOINT's.
12129
3065dfb6
SS
121302011-11-02 Stan Shebs <stan@codesourcery.com>
12131
12132 * tracepoint.c (agent_mem_read_string): New function.
12133 (eval_agent_expr): Call it for tracenz.
12134 * server.c (handle_query): Report support for tracenz.
12135
fd0d8c7c
YQ
121362011-11-02 Yao Qi <yao@codesourcery.com>
12137
12138 * tracepoint.c (cmd_qtstart): Remove unused local variables.
12139
609086b1
YQ
121402011-11-02 Yao Qi <yao@codesourcery.com>
12141
12142 * target.h: Fix a typo in comment.
12143
b9fd1791
PA
121442011-10-31 Pedro Alves <pedro@codesourcery.com>
12145
12146 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
12147 clobber the breakpoints' shadows with fast tracepoint jumps.
12148 * mem-break.h (check_mem_write): Add `myaddr' parameter.
12149 * target.c (write_inferior_memory): Also pass MYADDR down to
12150 check_mem_write.
12151
03583c20
UW
121522011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
12153
12154 * configure.ac: Check support for personality routine.
12155 * configure: Regenerate.
12156 * config.in: Likewise.
12157 * linux-low.c: Include <sys/personality.h>.
12158 Define ADDR_NO_RANDOMIZE if necessary.
12159 (linux_create_inferior): Disable address space randomization when
12160 forking inferior, if requested.
12161 (linux_supports_disable_randomization): New function.
12162 (linux_target_ops): Install it.
12163 * server.h (disable_randomization): Declare.
12164 * server.c (disable_randomization): New global variable.
12165 (handle_general_set): Handle QDisableRandomization.
12166 (handle_query): Likewise for qSupported.
12167 (main): Support --disable-randomization and --no-disable-randomization
12168 command line arguments.
12169 * target.h (struct target_ops): Add supports_disable_randomization.
12170 (target_supports_disable_randomization): New macro.
12171
723b724b
MF
121722011-09-29 Mike Frysinger <vapier@gentoo.org>
12173
12174 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
12175 ifdef check.
12176 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
12177 [!PT_GETDSBT] (target_loadmap): New definition.
12178 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
12179 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
12180 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
12181 and PT_GETDSBT to LINUX_LOADMAP.
12182 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
12183 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
12184
55329a5c 121852011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
12186
12187 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
12188 (arm_linux_hwbp_cap): New static variable.
12189 (arm_linux_get_hwbp_cap): Replace by ...
12190 (arm_linux_init_hwbp_cap): ... this new function.
12191 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
12192 (arm_linux_get_hw_watchpoint_count): Likewise.
12193 (arm_linux_get_hw_watchpoint_max_length): Likewise.
12194 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
12195 (arm_prepare_to_resume): Use perror_with_name instead of error.
12196
55329a5c 121972011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
12198
12199 * linux-arm-low.c: Include <signal.h>.
12200 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
12201 (struct arm_linux_hwbp_cap): New data type.
12202 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
12203 (struct arm_linux_hw_breakpoint): New data type.
12204 (MAX_BPTS, MAX_WPTS): Define.
12205 (struct arch_process_info, struct arch_lwp_info): New data types.
12206 (arm_linux_get_hwbp_cap): New function.
12207 (arm_linux_get_hw_breakpoint_count): Likewise.
12208 (arm_linux_get_hw_watchpoint_count): Likewise.
12209 (arm_linux_get_hw_watchpoint_max_length): Likewise.
12210 (arm_hwbp_control_initialize): Likewise.
12211 (arm_hwbp_control_is_enabled): Likewise.
12212 (arm_hwbp_control_is_initialized): Likewise.
12213 (arm_hwbp_control_disable): Likewise.
12214 (arm_linux_hw_breakpoint_equal): Likewise.
12215 (arm_linux_hw_point_initialize): Likewise.
12216 (struct update_registers_data): New data structure.
12217 (update_registers_callback: New function.
12218 (arm_insert_point): Likewise.
12219 (arm_remove_point): Likewise.
12220 (arm_stopped_by_watchpoint): Likewise.
12221 (arm_stopped_data_address): Likewise.
12222 (arm_new_process): Likewise.
12223 (arm_new_thread): Likewise.
12224 (arm_prepare_to_resume): Likewise.
12225 (the_low_target): Register arm_insert_point, arm_remove_point,
12226 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
12227 arm_new_thread, and arm_prepare_to_resume.
12228
6b9801d4
SS
122292011-09-15 Stan Shebs <stan@codesourcery.com>
12230
12231 * server.h (struct emit_ops): Add compare-goto fields.
12232 * tracepoint.c (gdb_agent_op_sizes): New table.
12233 (emit_eq_goto): New function.
12234 (emit_ne_goto): New function.
12235 (emit_lt_goto): New function.
12236 (emit_le_goto): New function.
12237 (emit_gt_goto): New function.
12238 (emit_ge_goto): New function.
12239 (is_goto_target): New function.
12240 (compile_bytecodes): Recognize special cases of compare-goto
12241 combinations and call specialized emitters for them.
12242 * linux-x86-low.c (amd64_emit_eq_goto): New function.
12243 (amd64_emit_ne_goto): New function.
12244 (amd64_emit_lt_goto): New function.
12245 (amd64_emit_le_goto): New function.
12246 (amd64_emit_gt_goto): New function.
12247 (amd64_emit_ge_goto): New function.
12248 (amd64_emit_ops): Add the new functions.
12249 (i386_emit_eq_goto): New function.
12250 (i386_emit_ne_goto): New function.
12251 (i386_emit_lt_goto): New function.
12252 (i386_emit_le_goto): New function.
12253 (i386_emit_gt_goto): New function.
12254 (i386_emit_ge_goto): New function.
12255 (i386_emit_ops): Add the new functions.
12256
bf15cbda
SS
122572011-09-08 Stan Shebs <stan@codesourcery.com>
12258
12259 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
12260 (i386_emit_epilogue): Restore %ebx.
12261
943ca1dd
JZ
122622011-08-31 Jie Zhang <jzhang918@gmail.com>
12263
12264 * server.c (step_thread): Remove definition.
12265 (process_serial_event): Don't handle Hs.
12266 * server.h (step_thread): Remove declaration.
12267 * target.c (set_desired_inferior): Remove use of step_thread.
12268
e3deef73
LM
122692011-08-24 Luis Machado <lgustavo@codesourcery.com>
12270
12271 * linux-low.c: Include linux-procfs.h.
12272 (linux_attach_lwp_1): Update comments.
12273 (linux_attach): Scan for existing threads when attaching to a
12274 process that is the tgid.
12275 * Makefile.in: Update dependencies.
12276
13da1c97
LM
122772011-08-24 Luis Machado <lgustavo@codesourcery.com>
12278
12279 * configure.srv: Add linux-procfs.o dependencies.
12280
881127c9
YQ
122812011-08-14 Yao Qi <yao@codesourcery.com>
12282
12283 * target.h (struct target_ops): Fix indent.
12284 * win32-low.c (win32_target_ops): Fix comment.
12285
58dbd541
YQ
122862011-08-14 Andrew Jenner <andrew@codesourcery.com>
12287 Yao Qi <yao@codesourcery.com>
12288
12289 * Makefile.in (clean): Remove tic6x-*.c files.
12290 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
12291 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
12292 (tic6x-c64xp-linux.c): Likewise.
12293 * configure.srv: Add support for tic6x-*-uclinux.
12294 * linux-tic6x-low.c: New.
12295 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
12296
78d85199
YQ
122972011-08-14 Andrew Stubbs <ams@codesourcery.com>
12298 Yao Qi <yao@codesourcery.com>
12299
12300 * target.h (struct target_ops): Add read_loadmap.
12301 * linux-low.c (struct target_loadseg): New type.
12302 (struct target_loadmap): New type.
12303 (linux_read_loadmap): New function.
12304 (linux_target_ops): Add linux_read_loadmap.
12305 * server.c (handle_query): Support qXfer:fdpic:read packet.
43aaf8b6
PA
12306 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
12307 to NULL.
78d85199 12308
a959a88d
EZ
123092011-08-05 Eli Zaretskii <eliz@gnu.org>
12310
12311 * win32-low.c: Include <stdint.h>.
12312
1ced966e
PA
123132011-07-22 Pedro Alves <pedro@codesourcery.com>
12314
12315 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
12316 to the inferior here.
12317 (i386_remove_aligned_watchpoint): Ditto.
12318 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
12319 fit part of the watchpoint in the debug registers.
12320 (i386_update_inferior_debug_regs): New.
12321 (i386_low_insert_watchpoint): Work on a local mirror of the debug
12322 registers, and only update the inferior on success.
12323 (i386_low_remove_watchpoint): Ditto.
12324
d26e3629
KY
123252011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
12326
12327 * linux-low.c (compare_ints, unique, list_threads, show_process,
12328 linux_core_of_thread): Delete.
12329 (linux_target_ops): Change linux_core_of_thread to
12330 linux_common_core_of_thread.
12331 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
12332 * utils.c (malloc_failure): Change type of argument.
12333 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
12334 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
12335 common/linux-osdata.c, common/ptid.c and common/buffer.c.
12336 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
12337 (IPA_OBJS): Add common-utils-ipa.o.
12338 (ptid_h, linux_osdata_h): New macros.
12339 (server_h): Add common/common-utils.h, common/xml-utils.h,
12340 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
12341 common/ptid.h.
12342 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
12343 ptid.o, buffer.o): New rules.
12344 (linux-low.o): Add common/linux-osdata.h as a dependency.
12345 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
12346 * configure.ac: Add AC_HEADER_DIRENT check.
12347 * config.in: Regenerate.
12348 * configure: Regenerate.
12349 * remote-utils.c (xml_escape_text): Delete.
12350 (buffer_grow, buffer_free, buffer_init, buffer_finish,
12351 buffer_xml_printf): Move to common/buffer.c.
12352 * server.c (main): Remove call to initialize_inferiors.
12353 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
12354 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
12355 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
12356 internal_error, gdb_assert, gdb_assert_fail): Delete.
12357 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
12358 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
12359 common/buffer.h.
12360 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
12361 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
12362 initialize_inferiors): Delete.
12363
2275a1a7
PA
123642011-07-20 Pedro Alves <pedro@codesourcery.com>
12365
12366 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
12367 symbol error.
12368
0a5b1e09
PA
123692011-05-31 Pedro Alves <pedro@codesourcery.com>
12370
12371 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
12372 assertion.
12373 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
12374
6938fd34
YQ
123752011-05-26 Yao Qi <yao@codesourcery.com>
12376
12377 * Makefile.in (thread-db.o): Track dependence to
12378 common/gdb_thread_db.h.
12379 * thread-db.c: include gdb_thread_db.h from right place.
12380
b481f9e0
TT
123812011-05-16 Adrian Cornish <gnu@bluedreamer.com>
12382
12383 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
12384 __FILE__ and __LINE__ to internal_error.
12385
98a5dd13
DE
123862011-05-13 Doug Evans <dje@google.com>
12387
12388 * thread-db.c (try_thread_db_load_from_sdir): New function.
12389 (try_thread_db_load_from_dir): New function.
12390 (thread_db_load_search): Handle $sdir, ignore $pdir.
12391 Remove trying of system directories if search of
12392 libthread-db-search-path fails, that is now done via $sdir.
12393
d248b706
KY
123942011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
12395
12396 * server.c (handle_query): Add EnableDisableTracepoints to the list
12397 of supported features.
43aaf8b6 12398 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
d248b706 12399 tracepoints.
43aaf8b6
PA
12400 (cmd_qtenable_disable): New.
12401 (cmd_qtstart): Install tracepoints even if disabled.
12402 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
12403 receiving a QTEnable or QTDisable packet.
12404 (gdb_collect): Skip data collection if fast tracepoint is disabled.
12405 (ust_marker_to_static_tracepoint): Do not ignore disabled static
12406 tracepoints.
12407 (gdb_probe): Skip data collection if static tracepoint is disabled.
d248b706 12408
84e578fb
DE
124092011-05-10 Doug Evans <dje@google.com>
12410
12411 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
12412
71f55dd8
DE
124132011-05-04 Doug Evans <dje@google.com>
12414
12415 * linux-low.c (linux_join): Skip process lookup.
12416 * spu-low.c (spu_join): Ditto.
12417 * server.c (join_inferiors_callback): Delete.
12418 (process_serial_event): For 'D' packet (detach) call join_inferior
12419 directly.
12420
4d393d60
JM
124212011-05-04 Joseph Myers <joseph@codesourcery.com>
12422
12423 * README: Don't mention xscale*-*-linux*.
12424 * configure.srv (xscale*-*-linux*): Don't handle target.
12425
b00ad6ff
NF
124262011-04-27 Nathan Froyd <froydnj@codesourcery.com>
12427
12428 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
12429 casting pointers.
12430 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
12431 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
12432 (i386_emit_void_call_2): Likewise.
12433
af96c192
YQ
124342011-04-26 Yao Qi <yao@codesourcery.com>
12435
43aaf8b6
PA
12436 * linux-low.c: Move common macros to linux-ptrace.h.
12437 Include linux-ptrace.h.
af96c192
YQ
12438 * Makefile.in (linux_ptrace_h): New.
12439 (linux-low.o): Depends on linux-ptrace.h.
12440
03f2bd59
JK
124412011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
12442
12443 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
12444 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
12445 (remote_prepare): New function with most of the TCP code from ...
12446 (remote_open): ... here. Detect PORT here unconditionally. Move also
12447 setting transport_is_reliable.
12448 * server.c (run_once): New variable.
12449 (gdbserver_usage): Document it.
12450 (main): Set run_once for `--once'. Call remote_prepare. Exit after
12451 the first run if RUN_ONCE.
12452 * server.h (run_once, remote_prepare): New declarations.
12453
7a9dd1b2
TT
124542011-04-19 Tom Tromey <tromey@redhat.com>
12455
12456 * win32-low.c (handle_load_dll): Remove duplicate "the".
12457
81239425
PM
124582011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
12459
12460 Remove support for old Cygwin 1.5 versions.
12461 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
12462 function to avoid warning.
12463 (win32_add_one_solib): Use cygwin_conv_path function to avoid
12464 warning.
12465
9e0627f1
PM
124662011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
12467
12468 * gdbserver/server.h (Macro _): Define it if not available.
12469
588eebee
MS
124702011-03-14 Michael Snyder <msnyder@vmware.com>
12471
348af9f7 12472 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 12473
43f70d4c
JB
124742011-03-10 Joel Brobecker <brobecker@adacore.com>
12475
12476 * Makefile.in (maintainer-clean realclean distclean): Remove
12477 "make ... subdir_do" command.
12478
348af9f7
MS
124792011-03-10 Michael Snyder <msnyder@vmware.com>
12480
12481 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
12482
12483 * server.c (handle_v_run): Free alloced buffer on early return.
12484
e637a4f5
YQ
124852011-03-09 Yao Qi <yao@codesourcery.com>
12486
12487 Revert:
12488 2011-03-04 Yao Qi <yao@codesourcery.com>
12489
12490 * Makefile.in: Remove GNU make feature --directory.
12491
12492 2011-03-05 Yao Qi <yao@codesourcery.com>
12493
12494 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
12495 (subdir_do): New make target. Copied from gdb/Makefile.
12496 (maintainer-clean, realclean, distclean, clean): Call corresponding
12497 make targets in common/Makefile.
12498
12499 2011-02-11 Yao Qi <yao@codesourcery.com>
12500
12501 * configure.ac: Call AC_PROG_RANLIB.
12502 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
12503 * configure: Regenerate.
12504
e6edda56
JK
125052011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
12506
12507 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
12508
e5141119
JB
125092011-03-06 Yao Qi <yao@codesourcery.com>
12510
12511 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
12512
64794aa4
JB
125132011-03-05 Yao Qi <yao@codesourcery.com>
12514
12515 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
12516 (subdir_do): New make target. Copied from gdb/Makefile.
12517 (maintainer-clean, realclean, distclean, clean): Call corresponding
12518 make targets in common/Makefile.
12519
7a762829
YQ
125202011-03-04 Yao Qi <yao@codesourcery.com>
12521
12522 * Makefile.in: Remove GNU make feature --directory.
12523
348af9f7
MS
125242011-03-04 Michael Snyder <msnyder@vmware.com>
12525
12526 * server.c (queue_stop_reply): Call xmalloc not malloc.
12527
125282011-03-02 Michael Snyder <msnyder@vmware.com>
12529
12530 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
12531
9f72fee2
MS
125322011-02-28 Michael Snyder <msnyder@vmware.com>
12533
588eebee
MS
12534 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
12535 (cmd_qtframe): Ditto.
12536 (cmd_qtbuffer): Ditto.
12537 (cmd_bigqtbuffer): Ditto.
12538
9f72fee2
MS
12539 * utils.c (decimal2str): Initialize 'width' to nine, then
12540 don't mess with it.
12541
8040bd49
UW
125422011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
12543
12544 * hostio.c (require_data): Free *data, not data.
12545
7e52cbd0
JK
125462011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
12547
12548 * hostio.c (require_data): Use free, not xfree.
12549
9130f83e
MS
125502011-02-27 Michael Snyder <msnyder@vmware.com>
12551
4b812f4e
MS
12552 * server.c (handle_query): Discard unused value.
12553
9130f83e
MS
12554 * hostio.c (require_data): Free malloc memory before returning
12555 error.
12556
69d37113
MS
125572011-02-26 Michael Snyder <msnyder@vmware.com>
12558
12559 * linux-low.c (list_threads): Call closedir for dirent.
12560
35f5825a
MS
125612011-02-27 Michael Snyder <msnyder@vmware.com>
12562
2a589cef
MS
12563 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
12564 a case statement falls through.
12565
0adea5f7
MS
12566 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
12567
35f5825a
MS
12568 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
12569 in comparison.
12570
238f1c74
MS
125712011-02-26 Michael Snyder <msnyder@vmware.com>
12572
12573 * utils.c (decimal2str): Eliminate dead code and dead param.
12574 (pulongest): Drop dead param from call to decimal2str.
12575 (plongest): Ditto.
12576
633ff500
JB
125772011-02-24 Joel Brobecker <brobecker@adacore.com>
12578
12579 Revert the following patch (not approved yet):
12580 2011-02-21 Hui Zhu <teawater@gmail.com>
12581 * tracepoint.c (tp_printf): New function.
12582 (eval_agent_expr): Handle gdb_agent_op_printf.
12583
f9c6ff72
HZ
125842011-02-21 Hui Zhu <teawater@gmail.com>
12585
12586 * tracepoint.c (tp_printf): New function.
12587 (eval_agent_expr): Handle gdb_agent_op_printf.
12588
94d5e490
TT
125892011-02-18 Tom Tromey <tromey@redhat.com>
12590
12591 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
12592 (tracepoint.o): Likewise.
12593 * tracepoint.c (enum gdb_agent_op): Use ax.def.
12594 (gdb_agent_op_names): Likewise.
12595
c7f96d2b
TT
125962011-02-18 Tom Tromey <tromey@redhat.com>
12597
12598 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
12599 gdb_agent_op_rot>: New constants.
12600 (gdb_agent_op_names): Add pick and roll.
12601 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
12602 cases.
12603
0feedb2c
JK
126042011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
12605
12606 * aclocal.m4: Regenerated with aclocal-1.11.1.
12607
b3b9301e
PA
126082011-02-14 Pedro Alves <pedro@codesourcery.com>
12609
12610 * server.c (handle_qxfer_traceframe_info): New.
12611 (qxfer_packets): Register "traceframe-info".
12612 (handle_query): Report support for qXfer:traceframe-info:read+.
12613 * tracepoint.c (match_blocktype): New.
12614 (traceframe_find_block_type): Rename to ...
12615 (traceframe_walk_blocks): ... this. Add callback filter argument,
12616 and use it.
12617 (traceframe_find_block_type): New, reimplemented on top of
12618 traceframe_walk_blocks.
12619 (build_traceframe_info_xml): New.
12620 (traceframe_read_info): New.
12621 * server.h (traceframe_read_info): Declare.
12622
4f3e6fb7
YQ
126232011-02-11 Yao Qi <yao@codesourcery.com>
12624
12625 * configure.ac: Call AC_PROG_RANLIB.
12626 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
12627 * configure: Regenerate.
12628
764880b7
PA
126292011-02-07 Pedro Alves <pedro@codesourcery.com>
12630
12631 * server.c (gdb_read_memory): Change return semantics to allow
12632 partial transfers.
12633 (handle_search_memory_1): Adjust.
12634 (process_serial_event) <'m' packet>: Handle partial transfers.
12635 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
12636
1c79eb8a
PA
126372011-01-28 Pedro Alves <pedro@codesourcery.com>
12638
12639 * regcache.c (init_register_cache): Initialize
12640 regcache->register_status.
12641 (free_register_cache): Release regcache->register_status.
12642 (regcache_cpy): Copy register_status.
12643 (registers_to_string): Print 'x's for unavailable registers.
12644 (supply_register): Mark the register's status valid or
12645 unavailable, depending on whether a buffer was passed in or not.
12646 (supply_register_zeroed): New.
12647 (supply_regblock): Mark the registers' status valid or
12648 unavailable, depending on whether a buffer was passed in or not.
12649 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
12650 (struct regcache): New `register_status' field.
12651 (supply_register_zeroed): Declare.
12652 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
12653 supply_register_zeroed, rather than passing a NULL buffer to
12654 supply_register.
12655 * tracepoint.c (fetch_traceframe_registers): Update comment.
12656
85724a0e
PA
126572011-01-28 Pedro Alves <pedro@codesourcery.com>
12658
12659 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
12660 buffer explicit.
12661
d08aafef
PA
126622011-01-25 Pedro Alves <pedro@codesourcery.com>
12663
12664 * server.h (decode_xfer_write): Change prototype.
12665 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
12666 and don't extract the annex here.
12667 * server.c (decode_xfer_read): Remove `annex' parameter,
12668 and don't extract the annex here.
12669 (decode_xfer): New.
12670 (struct qxfer): New.
12671 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
12672 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
12673 (handle_qxfer_statictrace): New functions, abstracted out from
12674 handle_query, and made to use the struct qxfer interface.
12675 (handle_threads_qxfer_proper): Rename to ...
12676 (handle_qxfer_threads_proper): ... this.
12677 (handle_threads_qxfer): Rename to ...
12678 (handle_qxfer_threads): ... this. Adjust.
12679 (qxfer_packets): New array.
12680 (handle_qxfer): New function.
12681 (handle_query): Use handle_qxfer.
12682
493e2a69
MS
126832011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
12684
12685 * gdbreplay.c: Shorten lines of >= 80 columns.
12686 * linux-low.c: Ditto.
12687 * linux-ppc-low.c: Ditto.
12688 * linux-s390-low.c: Ditto.
12689 * linux-sparc-low.c: Ditto.
12690 * linux-x86-low.c: Ditto.
12691 * linux-xtensa-low.c: Ditto.
12692 * mem-break.c: Ditto.
12693 * nto-low.c: Ditto.
12694 * regcache.h: Ditto.
12695 * remote-utils.c: Ditto.
12696 * server.c: Ditto.
12697 * server.h: Ditto.
12698 * thread-db.c: Ditto.
12699 * tracepoint.c: Ditto.
12700 * utils.c: Ditto.
12701 * win32-low.h: Ditto.
12702
44944448
JB
127032011-01-05 Joel Brobecker <brobecker@adacore.com>
12704
12705 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
12706 update.
12707
71ce852c
JB
127082011-01-01 Joel Brobecker <brobecker@adacore.com>
12709
12710 * server.c (gdbserver_version): Update copyright year in version
12711 output.
12712 * gdbreplay.c (gdbreplay_version): Ditto.
12713
eb826dc6
MF
127142010-12-29 Jie Zhang <jie.zhang@analog.com>
12715
12716 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
12717 * linux-bfin-low.c: New file.
12718 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
12719 PT_DATA_ADDR for BFIN targets.
12720 * Makefile.in (SFILES): Add linux-bfin-low.c.
12721 (clean): Remove reg-bfin.c.
12722 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
12723 * README: Mention supported Blackfin targets.
12724
39ab222a
MF
127252010-12-23 Mike Frysinger <vapier@gentoo.org>
12726
12727 * .gitignore: New file.
12728
a1f2ce7d
MF
127292010-11-16 Mike Frysinger <vapier@gentoo.org>
12730
12731 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
12732
f474844c
JZ
127332010-10-22 Jie Zhang <jie@codesourcery.com>
12734
12735 * Makefile.in: Add FLAGS_TO_PASS variable.
12736 (install): Remove dependency of install-only and recursively
12737 invoke make for install-only.
12738
f1048712
DE
127392010-10-04 Doug Evans <dje@google.com>
12740
12741 * Makefile.in (uninstall): Use $(DESTDIR).
12742
b53a1623
PA
127432010-09-24 Pedro Alves <pedro@codesourcery.com>
12744
e6ee044d
PA
12745 PR gdb/11842
12746
b53a1623
PA
12747 * linux-x86-low.c (compat_siginfo_from_siginfo)
12748 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
12749 si_code is < 0. Check for si_code == SI_TIMER before checking for
12750 si_code < 0.
12751
fa1bd1e4
JB
127522010-09-13 Joel Brobecker <brobecker@adacore.com>
12753
12754 * lynx-i386-low.c: New file.
12755 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
12756
47fac8f8
JB
127572010-09-13 Joel Brobecker <brobecker@adacore.com>
12758
12759 * lynx-low.c (ptrace_request_to_str): Remove handling for
12760 request values that have been removed in LynxOS 5.x.
12761
1adfc54d
JB
127622010-09-13 Joel Brobecker <brobecker@adacore.com>
12763
12764 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
12765 <ptrace.h>
12766
c2a66c29
NS
127672010-09-09 Nathan Sidwell <nathan@codesourcery.com>
12768
12769 * configure.ac: Add --enable-inprocess-agent option.
12770 * configure: Rebuilt.
12771
32fcada3
YQ
127722010-09-06 Yao Qi <yao@codesourcery.com>
12773
12774 * linux-low.c (linux_kill): Remove unused variable.
12775 (linux_stabilize_threads): Likewise.
12776 * server.c (start_inferior): Likewise.
12777 (queue_stop_reply_callback): Likewise.
12778 * tracepoint.c (do_action_at_tracepoint): Likewise.
12779
0cccb683
YQ
127802010-09-06 Yao Qi <yao@codesourcery.com>
12781
12782 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
12783 on return.
12784
423ec54c
JK
127852010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
12786
12787 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
12788
12ac6819
PA
127892010-09-06 Pedro Alves <pedro@codesourcery.com>
12790
12791 * Makefile.in (install-only): Replace $IPA_DEPFILES with
12792 "$(IPA_DEPFILES)".
12793
8ed54b31
JB
127942010-09-01 Joel Brobecker <brobecker@adacore.com>
12795
12796 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
12797 gdbserver/lynx-ppc-low.c: New files.
12798 * Makefile.in (lynx_low_h): New variable.
12799 (lynx-low.o, lynx-ppc-low.o): New rules.
12800 * configure.ac: On LynxOS, link with -lnetinet.
12801 * configure.srv: Add handling of powerpc-*-lynxos* targets.
12802 * configure: regenerate.
12803
bb0116a4
JB
128042010-09-01 Joel Brobecker <brobecker@adacore.com>
12805
12806 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
12807 * configure.ac: Add check for vasprintf and vsnprintf.
12808 * configure, config.in: Regenerate.
12809 * server.h (vasprintf, vsnprintf): Add conditional declarations.
12810
a778ab81 128112010-09-01 Joel Brobecker <brobecker@adacore.com>
12812
12813 * gdbreplay.c: Move include of alloca.h up, next to include of
12814 malloc.h.
12815 * server.h: Add include of malloc.h.
12816 * mem-break.c: Remove include of malloc.h.
12817 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
12818
8b034a19 128192010-09-01 Joel Brobecker <brobecker@adacore.com>
12820
12821 * Makefile.in (memmem.o): Build with -Wno-error.
12822
128232010-09-01 Joel Brobecker <brobecker@adacore.com>
12824
12825 * utils.c (xsnprintf): Make non-static.
12826 * server.h: Add xsnprintf declaration.
12827 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
12828 replace calls to snprintf by calls to xsnprintf throughout.
12829
128302010-09-01 Joel Brobecker <brobecker@adacore.com>
12831
12832 * configure.ac: Add configure check for alloca.
12833 * configure, config.in: Regenerate.
12834 * server.h: Include alloca.h if it exists.
12835 * gdbreplay.c: Include alloca.h if it exists.
12836
1a981360
PA
128372010-08-28 Pedro Alves <pedro@codesourcery.com>
12838
12839 * linux-low.c (__SIGRTMIN): Define if not already defined.
12840 (linux_create_inferior): Check for __ANDROID__ rather than
12841 __SIGRTMIN.
12842 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
12843 are already deferred.
12844 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
12845 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
12846 stopped and already has a pending signal to report.
12847 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
12848 a pending signal to report or is moving out of a jump pad.
12849 (linux_init_signals): Check for __ANDROID__ rather than
12850 __SIGRTMIN.
12851
b4d51a55
PA
128522010-08-28 Pedro Alves <pedro@codesourcery.com>
12853
12854 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
12855 debug_threads check. Avoid a linear search when not doing debug
12856 output.
12857
ec48365d
PA
128582010-08-27 Pedro Alves <pedro@codesourcery.com>
12859
12860 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
12861 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
12862 (struct file_handler) <fd>: Change type to gdb_fildes_t.
12863 (process_event): Change local fd's type to gdb_fildes_t.
12864 (create_file_handler): Adjust prototype.
12865 (delete_file_handler): Adjust prototype.
12866 (handle_file_event): Adjust prototype. Use pfildes.
12867 (create_file_event): Adjsut prototype.
12868 * remote-utils.c (remote_desc, listen_desc): Change type to
12869 gdb_fildes_t.
12870 * server.h: New gdb_fildes_t typedef.
12871 [USE_WIN32API]: Include winsock2.h.
12872 (delete_file_handler, add_file_handler): Adjust prototypes.
12873 (pfildes): Declare.
12874 * utils.c (pfildes): New.
12875
854d88f0
PA
128762010-08-27 Pedro Alves <pedro@codesourcery.com>
12877
12878 * configure.ac (build_warnings): Add -Wno-char-subscripts.
12879 * configure: Regenerate.
12880
0146f85b
PA
128812010-08-27 Pedro Alves <pedro@codesourcery.com>
12882
12883 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
12884 (linux_done_accessing_memory): ... this.
12885 (linux_target_ops): Adjust.
12886 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
12887 * nto-low.c (nto_target_ops): Adjust comment.
12888 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
12889 * spu-low.c (spu_target_ops): Adjust comment.
12890 * target.h (target_ops): Rename unprepare_to_access_memory field
12891 to done_accessing_memory.
12892 (unprepare_to_access_memory): Rename to ...
12893 (done_accessing_memory): ... this.
12894
90d74c30
PA
128952010-08-26 Pedro Alves <pedro@codesourcery.com>
12896
12897 * linux-low.c (linux_prepare_to_access_memory): New.
12898 (linux_unprepare_to_access_memory): New.
12899 (linux_target_ops): Install them.
12900 * server.c (read_memory): Rename to ...
12901 (gdb_read_memory): ... this. Use
12902 prepare_to_access_memory/prepare_to_access_memory.
12903 (write_memory): Rename to ...
12904 (gdb_write_memory): ... this. Use
12905 prepare_to_access_memory/prepare_to_access_memory.
12906 (handle_search_memory_1): Adjust.
12907 (process_serial_event): Adjust.
12908 * target.h (struct target_ops): New fields
12909 prepare_to_access_memory and unprepare_to_access_memory.
12910 (prepare_to_access_memory, unprepare_to_access_memory): New.
12911 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
12912 prepare_to_access_memory/prepare_to_access_memory.
12913 * nto-low.c (nto_target_ops): Adjust.
12914 * spu-low.c (spu_target_ops): Adjust.
12915 * win32-low.c (win32_target_ops): Adjust.
12916
fd467969
PA
129172010-08-26 Pedro Alves <pedro@codesourcery.com>
12918
12919 * Makefile.in (WARN_CFLAGS): Get it from configure.
12920 (WERROR_CFLAGS): New.
12921 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
12922 * configure.ac: Introduce --enable-werror, which adds -Werror to
12923 the compiler command line. Enabled by default. Disable with
12924 --disable-werror. Add -Wdeclaration-after-statement
12925 Wpointer-arith and -Wformat-nonliteral to warning flags.
12926 * configure: Regenerate.
12927
331e2f5f
PA
129282010-08-26 Pedro Alves <pedro@codesourcery.com>
12929
12930 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
12931
e581f2b4
PA
129322010-08-26 Pedro Alves <pedro@codesourcery.com>
12933
12934 * gdbreplay.c (remote_error): New.
12935 (gdbchar): New.
12936 (expect): Use gdbchar. Check for error reading from GDB.
12937 Clarify sync error output.
12938 (play): Check for errors writing to GDB.
12939 * linux-low.c (sigchld_handler): Really ignore `write' errors.
12940 * remote-utils.c (getpkt): Check for errors writing to the remote
12941 descriptor.
12942
3c11dd79
PA
129432010-08-25 Pedro Alves <pedro@codesourcery.com>
12944
12945 * linux-low.c (linux_wait_1): Move non-debugging code out of
12946 `debug_threads' control.
12947
d20a8ad9
PA
129482010-08-25 Pedro Alves <pedro@codesourcery.com>
12949
12950 * linux-low.c (linux_wait_1): Don't set last_status here.
12951 * server.c (push_event, queue_stop_reply_callback): Assert we're
12952 not pushing a TARGET_WAITKIND_IGNORE event.
12953 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
12954 (myresume, handle_target_event): Set the thread's last_resume_kind
12955 and last_status from the target returned status.
12956
964e4306
PA
129572010-08-25 Pedro Alves <pedro@codesourcery.com>
12958
12959 PR threads/10729
12960
12961 * linux-x86-low.c (update_debug_registers_callback): New.
12962 (i386_dr_low_set_addr): Use it.
12963 (i386_dr_low_get_addr): New.
12964 (i386_dr_low_set_control): Use update_debug_registers_callback.
12965 (i386_dr_low_get_control): New.
12966 (i386_dr_low_get_status): Adjust.
12967 * linux-low.c (linux_stop_lwp): New.
12968 * linux-low.h (linux_stop_lwp): Declare.
12969
12970 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
12971 argument instead of a i386_debug_reg_state.
12972 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
12973 a i386_debug_reg_state.
12974 (i386_insert_aligned_watchpoint): Adjust.
12975 (i386_remove_aligned_watchpoint): Adjust.
12976 (i386_low_stopped_data_address): Read the debug registers from the
12977 inferior instead of from the mirrors.
12978 * i386-low.h (struct i386_debug_reg_state): Extend comment.
12979 (i386_dr_low_get_addr): Declare.
12980 (i386_dr_low_get_control): Declare.
12981 (i386_dr_low_get_status): Change prototype.
12982
12983 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
12984 (i386_dr_low_get_addr): New.
12985 (i386_dr_low_get_control): New.
12986 (i386_dr_low_get_status): Adjust prototype. Return
12987 dr_status_mirror.
12988 (i386_initial_stuff): Clear dr_status_mirror and
12989 dr_control_mirror.
12990 (i386_get_thread_context): Adjust.
12991 (i386_set_thread_context): Adjust.
12992 (i386_thread_added): Adjust.
12993
5f21a75b
PA
129942010-08-24 Pedro Alves <pedro@codesourcery.com>
12995
12996 * linux-low.h (linux_thread_area): Delete declaration.
12997
3e4c1235
TS
129982010-08-11 Thomas Schwinge <thomas@codesourcery.com>
12999
13000 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
13001 after its termination.
13002
1971b033
PA
130032010-08-09 Pedro Alves <pedro@codesourcery.com>
13004
13005 * linux-low.c (gdb_wants_lwp_stopped): Delete.
13006 (gdb_wants_all_stopped): Delete.
13007 (linux_wait_1): Don't call them.
13008 * server.c (handle_v_cont): Tag all threads as want-stopped.
13009 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
13010 stopped as "client-wants-stopped".
13011
310444ac
PA
130122010-07-31 Pedro Alves <pedro@codesourcery.com>
13013
13014 * Makefile.in (signals_h): New.
13015 (server_h): Depend on it.
13016 (server.o): Don't depend on $(signals_def).
13017 (signals.o): Depend on $(signals_def).
13018
a19cae16
JK
130192010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
13020
13021 * Makefile.in (signals_def): New.
13022 (server_h): Append include/gdb/signals.h and signals_def.
13023 (server.o): Append signals_def.
13024
30d50328
JK
130252010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
13026
13027 * server.c (handle_target_event): Use target_signal_to_host for
13028 resume_info.sig initialization.
13029 * target.h (struct thread_resume) <sig>: New comment.
13030
5c3216e2
OS
130312010-07-20 Ozkan Sezer <sezeroz@gmail.com>
13032
c6f46ca0
OS
13033 * server.c (handle_query): strcpy() the returned string from paddress()
13034 instead of sprintf().
5c3216e2
OS
13035 * utils.c (paddress): Return phex_nz().
13036
6bd31874
JB
130372010-07-07 Joel Brobecker <brobecker@adacore.com>
13038
13039 * server.c (handle_v_cont): Call mourn_inferior if process
13040 just exited.
13041 (myresume): Likewise.
13042
0fb4aa4b
PA
130432010-07-01 Pedro Alves <pedro@codesourcery.com>
13044
13045 Static tracepoints, and integration with UST.
13046
13047 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
13048 * mem-break.c (uninsert_all_breakpoints)
13049 (reinsert_all_breakpoints): New.
13050 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
13051 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
13052 (gdb_agent_ust_loaded, helper_thread_id)
13053 (gdb_agent_helper_thread_id): New macros.
13054 (struct ipa_sym_addresses): Add addr_ust_loaded,
13055 addr_helper_thread_id, addr_cmd_buf.
13056 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
13057 (in_process_agent_loaded_ust): New.
13058 (write_e_ust_not_loaded): New.
13059 (maybe_write_ipa_ust_not_loaded): New.
13060 (struct collect_static_trace_data_action): New.
13061 (enum tracepoint_type) <static_tracepoint>: New.
13062 (struct tracepoint) <handle>: Mention static tracepoints.
13063 (struct static_tracepoint_ctx): New.
13064 (CMD_BUF_SIZE): New.
13065 (add_tracepoint_action): Handle static tracepoint actions.
13066 (unprobe_marker_at): New.
13067 (clear_installed_tracepoints): Handle static tracepoints.
13068 (cmd_qtdp): Handle static tracepoints.
13069 (probe_marker_at): New.
13070 (cmd_qtstart): Handle static tracepoints.
13071 (response_tracepoint): Handle static tracepoints.
13072 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
13073 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
13074 (get_context_regcache): Handle static tracepoints.
13075 (do_action_at_tracepoint): Handle static tracepoint actions.
13076 (traceframe_find_block_type): Handle static trace data blocks.
13077 (traceframe_read_sdata): New.
13078 (download_tracepoints): Download static tracepoint actions.
13079 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
13080 (GDB_PROBE_NAME): New.
13081 (ust_ops): New.
13082 (GET_UST_SYM): New.
13083 (USTF): New.
13084 (dlsym_ust): New.
13085 (ust_marker_to_static_tracepoint): New.
13086 (gdb_probe): New.
13087 (collect_ust_data_at_tracepoint): New.
13088 (gdb_ust_probe): New.
13089 (UNIX_PATH_MAX, SOCK_DIR): New.
13090 (gdb_ust_connect_sync_socket): New.
13091 (resume_thread, stop_thread): New.
13092 (run_inferior_command): New.
13093 (init_named_socket): New.
13094 (gdb_ust_socket_init): New.
13095 (cstr_to_hexstr): New.
13096 (next_st): New.
13097 (first_marker, next_marker): New.
13098 (response_ust_marker): New.
13099 (cmd_qtfstm, cmd_qtsstm): New.
13100 (unprobe_marker_at, probe_marker_at): New.
13101 (cmd_qtstmat, gdb_ust_thread): New.
13102 (gdb_ust_init): New.
13103 (initialize_tracepoint_ftlib): Call gdb_ust_init.
13104 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
13105 (ST_REGENTRY): New.
13106 (x86_64_st_collect_regmap): New.
13107 (X86_64_NUM_ST_COLLECT_GREGS): New.
13108 (AMD64_RIP_REGNUM): New.
13109 (supply_static_tracepoint_registers): New.
13110 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
13111 (ST_REGENTRY): New.
13112 (i386_st_collect_regmap): New.
13113 (i386_NUM_ST_COLLECT_GREGS): New.
13114 (supply_static_tracepoint_registers): New.
13115 * server.c (handle_query): Handle qXfer:statictrace:read.
13116 <qSupported>: Report support for StaticTracepoints, and
13117 qXfer:statictrace:read features.
13118 * server.h (traceframe_read_sdata)
13119 (supply_static_tracepoint_registers): Declare.
13120 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
13121 (unpack_varlen_hex): Include in IPA build.
13122 * Makefile.in (ustlibs, ustinc): New.
13123 (IPA_OBJS): Add remote-utils-ipa.o.
13124 ($(IPA_LIB)): Link -ldl and -lpthread.
13125 (UST_CFLAGS): New.
13126 (IPAGENT_CFLAGS): Add UST_CFLAGS.
13127 * config.in, configure: Regenerate.
13128
9e4344e5
PA
131292010-06-20 Ian Lance Taylor <iant@google.com>
13130 Pedro Alves <pedro@codesourcery.com>
13131
13132 * linux-x86-low.c (always_true): Delete.
13133 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
13134 trying to fool the compiler with always_true.
13135
c6beb2cb
PA
131362010-06-20 Pedro Alves <pedro@codesourcery.com>
13137
13138 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
13139 conditions in gdbserver.
13140
d2ed6730
UW
131412010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
13142
13143 * spu-low.c (spu_read_memory): Wrap around local store limit.
13144 (spu_write_memory): Likewise.
13145
4e29fb54
PA
131462010-06-15 Pedro Alves <pedro@codesourcery.com>
13147
13148 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
13149 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
13150 LONGEST uses.
13151 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
13152 uses.
13153 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
13154 uses with LONGEST uses.
13155
6a271cae
PA
131562010-06-14 Stan Shebs <stan@codesourcery.com>
13157 Pedro Alves <pedro@codesourcery.com>
13158
13159 Bytecode compiler.
13160
13161 * linux-x86-low.c: Include limits.h.
13162 (add_insns): New.
13163 (always_true): New.
13164 (EMIT_ASM): New.
13165 (EMIT_ASM32): New.
13166 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
13167 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
13168 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
13169 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
13170 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
13171 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
13172 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
13173 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
13174 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
13175 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
13176 (amd64_emit_void_call_2): New.
13177 (amd64_emit_ops): New.
13178 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
13179 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
13180 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
13181 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
13182 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
13183 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
13184 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
13185 (i386_emit_call, i386_emit_reg, i386_emit_pop)
13186 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
13187 (i386_emit_stack_adjust, i386_emit_int_call_1)
13188 (i386_emit_void_call_2): New.
13189 (i386_emit_ops): New.
13190 (x86_emit_ops): New.
13191 (the_low_target): Install x86_emit_ops.
13192 * server.h (struct emit_ops): New.
13193 (get_raw_reg_func_addr): Declare.
13194 (current_insn_ptr, emit_error): Declare.
13195 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
13196 (set_trace_state_variable_value): New defines.
13197 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
13198 addr_get_trace_state_variable_value and
13199 addr_set_trace_state_variable_value.
13200 (symbol_list): New fields for get_raw_reg,
13201 get_trace_state_variable_value and set_trace_state_variable_value.
13202 (condfn): New typedef.
13203 (struct tracepoint): New field `compiled_cond'.
13204 (do_action_at_tracepoint): Clear compiled_cond.
13205 (get_trace_state_variable_value, set_trace_state_variable_value):
13206 Export in the IPA.
13207 (condition_true_at_tracepoint): If there's a compiled condition,
13208 run that.
13209 (current_insn_ptr, emit_error): New globals.
13210 (struct bytecode_address): New.
13211 (get_raw_reg_func_addr): New.
13212 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
13213 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
13214 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
13215 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
13216 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
13217 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
13218 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
13219 (compile_tracepoint_condition, compile_bytecodes): New.
13220 * target.h (emit_ops): Forward declare.
13221 (struct target_ops): New field emit_ops.
13222 (target_emit_ops): New.
13223 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
13224 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
13225 * linux-low.c (linux_emit_ops): New.
13226 (linux_target_ops): Install it.
13227 * linux-low.h (struct linux_target_ops): New field emit_ops.
13228
92b72907
UW
132292010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
13230
13231 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
13232 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
13233
fa593d66
PA
132342010-06-01 Pedro Alves <pedro@codesourcery.com>
13235 Stan Shebs <stan@codesourcery.com>
13236
13237 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
13238 (all): Depend on $(extra_libraries).
13239 (install-only): Install the IPA.
13240 (IPA_OBJS, IPA_LIB): New.
13241 (clean): Remove the IPA lib.
13242 (IPAGENT_CFLAGS): New.
13243 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
13244 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
13245 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
13246 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
13247 * configure.ac: Check for atomic builtins support in the compiler.
13248 (IPA_DEPFILES, extra_libraries): Define.
13249 * configure.srv (ipa_obj): Add description.
13250 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
13251 (i[34567]86-*-linux*): Set ipa_obj.
13252 (x86_64-*-linux*): Set ipa_obj.
13253 * linux-low.c (stabilizing_threads): New.
13254 (supports_fast_tracepoints): New.
13255 (linux_detach): Stabilize threads before detaching.
13256 (handle_tracepoints): Handle internal tracing breakpoints. Assert
13257 the lwp is either not stabilizing, or is moving out of a jump pad.
13258 (linux_fast_tracepoint_collecting): New.
13259 (maybe_move_out_of_jump_pad): New.
13260 (enqueue_one_deferred_signal): New.
13261 (dequeue_one_deferred_signal): New.
13262 (linux_wait_for_event_1): If moving out of a jump pad, defer
13263 pending signals to later.
13264 (linux_stabilize_threads): New.
13265 (linux_wait_1): Check if threads need moving out of jump pads, and
13266 do it if so.
13267 (stuck_in_jump_pad_callback): New.
13268 (move_out_of_jump_pad_callback): New.
13269 (lwp_running): New.
13270 (linux_resume_one_lwp): Handle moving out of jump pads.
13271 (linux_set_resume_request): Dequeue deferred signals.
13272 (need_step_over_p): Also step over fast tracepoint jumps.
13273 (start_step_over): Also uninsert fast tracepoint jumps.
13274 (finish_step_over): Also reinsert fast tracepoint jumps.
13275 (linux_install_fast_tracepoint_jump): New.
13276 (linux_target_ops): Install linux_stabilize_threads and
13277 linux_install_fast_tracepoint_jump_pad.
13278 * linux-low.h (linux_target_ops) <get_thread_area,
13279 install_fast_tracepoint_jump_pad>: New fields.
13280 (struct lwp_info) <collecting_fast_tracepoint,
13281 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
13282 (linux_get_thread_area): Declare.
13283 * linux-x86-low.c (jump_insn): New.
13284 (x86_get_thread_area): New.
13285 (append_insns): New.
13286 (push_opcode): New.
13287 (amd64_install_fast_tracepoint_jump_pad): New.
13288 (i386_install_fast_tracepoint_jump_pad): New.
13289 (x86_install_fast_tracepoint_jump_pad): New.
13290 (the_low_target): Install x86_get_thread_area and
13291 x86_install_fast_tracepoint_jump_pad.
13292 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
13293 (struct fast_tracepoint_jump): New.
13294 (fast_tracepoint_jump_insn): New.
13295 (fast_tracepoint_jump_shadow): New.
13296 (find_fast_tracepoint_jump_at): New.
13297 (fast_tracepoint_jump_here): New.
13298 (delete_fast_tracepoint_jump): New.
13299 (set_fast_tracepoint_jump): New.
13300 (uninsert_fast_tracepoint_jumps_at): New.
13301 (reinsert_fast_tracepoint_jumps_at): New.
13302 (set_breakpoint_at): Use write_inferior_memory.
13303 (uninsert_raw_breakpoint): Use write_inferior_memory.
13304 (check_mem_read): Mask out fast tracepoint jumps.
13305 (check_mem_write): Mask out fast tracepoint jumps.
13306 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
13307 (set_fast_tracepoint_jump): Declare.
13308 (delete_fast_tracepoint_jump)
13309 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
13310 (reinsert_fast_tracepoint_jumps_at): Declare.
13311 * regcache.c: Don't compile many functions when building the
13312 in-process agent library.
13313 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
13314 the register buffer in the heap.
13315 (free_register_cache): If the register buffer isn't owned by the
13316 regcache, don't free it.
13317 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
13318 pre-existing register caches.
13319 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
13320 type.
13321 (convert_ascii_to_int): : Constify `from' parameter type.
13322 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
13323 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
13324 the needed buffer in-place.
13325 (relocate_instruction): New.
13326 * server.c (handle_query) <qSymbols>: If the target supports
13327 tracepoints, give it a chance of looking up symbols. Report
13328 support for fast tracepoints.
13329 (handle_status): Stabilize threads.
13330 (process_serial_event): Adjust.
13331 * server.h (struct fast_tracepoint_jump): Forward declare.
13332 (struct process_info) <fast_tracepoint_jumps>: New field.
13333 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
13334 (decode_X_packet, decode_M_packet): Adjust.
13335 (relocate_instruction): Declare.
13336 (in_process_agent_loaded): Declare.
13337 (tracepoint_look_up_symbols): Declare.
13338 (struct fast_tpoint_collect_status): Declare.
13339 (fast_tracepoint_collecting): Declare.
13340 (force_unlock_trace_buffer): Declare.
13341 (handle_tracepoint_bkpts): Declare.
13342 (initialize_low_tracepoint)
13343 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
13344 * target.h (struct target_ops) <stabilize_threads,
13345 install_fast_tracepoint_jump_pad>: New fields.
13346 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
13347 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
13348 [HAVE_STDINT_H]: Include stdint.h.
13349 (trace_debug_1): Rename to ...
13350 (trace_vdebug): ... this.
13351 (trace_debug): Rename to ...
13352 (trace_debug_1): ... this. Add `level' parameter.
13353 (trace_debug): New.
13354 (ATTR_USED, ATTR_NOINLINE): New.
13355 (IP_AGENT_EXPORT): New.
13356 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
13357 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
13358 (about_to_request_buffer_space, trace_buffer_is_full)
13359 (stopping_tracepoint, expr_eval_result, error_tracepoint)
13360 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
13361 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
13362 (traceframe_write_count, traceframes_created)
13363 (trace_state_variables)
13364 New renaming defines.
13365 (struct ipa_sym_addresses): New.
13366 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
13367 (symbol_list): New.
13368 (ipa_sym_addrs): New.
13369 (all_tracepoint_symbols_looked_up): New.
13370 (in_process_agent_loaded): New.
13371 (write_e_ipa_not_loaded): New.
13372 (maybe_write_ipa_not_loaded): New.
13373 (tracepoint_look_up_symbols): New.
13374 (debug_threads) [IN_PROCESS_AGENT]: New.
13375 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
13376 (UNKNOWN_SIDE_EFFECTS): New.
13377 (stop_tracing): New.
13378 (flush_trace_buffer): New.
13379 (stop_tracing_bkpt): New.
13380 (flush_trace_buffer_bkpt): New.
13381 (read_inferior_integer): New.
13382 (read_inferior_uinteger): New.
13383 (read_inferior_data_pointer): New.
13384 (write_inferior_data_pointer): New.
13385 (write_inferior_integer): New.
13386 (write_inferior_uinteger): New.
13387 (struct collect_static_trace_data_action): Delete.
13388 (enum tracepoint_type): New.
13389 (struct tracepoint) <type>: New field `type'.
43aaf8b6
PA
13390 <actions_str, step_actions, step_actions_str>: Only include in
13391 GDBserver.
fa593d66
PA
13392 <orig_size, obj_addr_on_target, adjusted_insn_addr>
13393 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
13394 (tracepoints): Use IP_AGENT_EXPORT.
13395 (last_tracepoint): Don't include in the IPA.
13396 (stopping_tracepoint): Use IP_AGENT_EXPORT.
13397 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
13398 (alloced_trace_state_variables): New.
13399 (trace_state_variables): Use IP_AGENT_EXPORT.
13400 (traceframe_t): Delete unused variable.
13401 (circular_trace_buffer): Don't include in the IPA.
13402 (trace_buffer_start): Delete.
13403 (struct trace_buffer_control): New.
13404 (trace_buffer_free): Delete.
13405 (struct ipa_trace_buffer_control): New.
13406 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
13407 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
13408 New.
13409 (trace_buffer_ctrl): New.
13410 (TRACE_BUFFER_CTRL_CURR): New.
13411 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
13412 Reimplement as macros.
13413 (trace_buffer_wrap): Delete.
13414 (traceframe_write_count, traceframe_read_count)
13415 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
13416 (struct tracepoint_hit_ctx) <type>: New field.
13417 (struct fast_tracepoint_ctx): New.
13418 (memory_barrier): New.
13419 (cmpxchg): New.
13420 (record_tracepoint_error): Update atomically in the IPA.
13421 (clear_inferior_trace_buffer): New.
13422 (about_to_request_buffer_space): New.
13423 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
13424 updating the same buffer.
13425 (add_tracepoint): Default the tracepoint's type to trap
13426 tracepoint, and orig_size to -1.
13427 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
13428 internal variables.
13429 (create_trace_state_variable): New parameter `gdb'. Handle it.
13430 (clear_installed_tracepoints): Clear fast tracepoint jumps.
13431 (cmd_qtdp): Handle fast tracepoints.
13432 (cmd_qtdv): Adjust.
13433 (max_jump_pad_size): New.
13434 (gdb_jump_pad_head): New.
13435 (get_jump_space_head): New.
13436 (claim_jump_space): New.
13437 (sort_tracepoints): New.
13438 (MAX_JUMP_SIZE): New.
13439 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
13440 IPA.
13441 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
13442 support. Upload fast traceframes, and delete internal IPA
13443 breakpoints.
13444 (stop_tracing_handler): New.
13445 (flush_trace_buffer_handler): New.
13446 (cmd_qtstop): Upload fast tracepoints.
13447 (response_tracepoint): Handle fast tracepoints.
13448 (tracepoint_finished_step): Upload fast traceframes. Set the
13449 tracepoint hit context's tracepoint type.
13450 (handle_tracepoint_bkpts): New.
13451 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
13452 type. Add comment about fast tracepoints.
13453 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
13454 non-existing action_str field.
13455 (get_context_regcache): Handle fast tracepoints.
13456 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
13457 to the regcache.
13458 (fast_tracepoint_from_jump_pad_address): New.
13459 (fast_tracepoint_from_ipa_tpoint_address): New.
13460 (collecting_t): New.
13461 (force_unlock_trace_buffer): New.
13462 (fast_tracepoint_collecting): New.
13463 (collecting): New.
13464 (gdb_collect): New.
13465 (write_inferior_data_ptr): New.
13466 (target_tp_heap): New.
13467 (target_malloc): New.
13468 (download_agent_expr): New.
13469 (UALIGN): New.
13470 (download_tracepoints): New.
13471 (download_trace_state_variables): New.
13472 (upload_fast_traceframes): New.
13473 (IPA_FIRST_TRACEFRAME): New.
13474 (IPA_NEXT_TRACEFRAME_1): New.
13475 (IPA_NEXT_TRACEFRAME): New.
13476 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
13477 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
13478 (gdb_jump_pad_buffer_end): New.
13479 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
13480 (initialize_tracepoint): Adjust.
13481 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
13482 buffer. Initialize the low module.
13483 * utils.c (PREFIX, TOOLNAME): New.
13484 (malloc_failure): Use PREFIX.
13485 (error): In the IPA, an error causes an exit.
13486 (fatal, warning): Use PREFIX.
13487 (internal_error): Use TOOLNAME.
13488 (NUMCELLS): Increase to 10.
13489 * configure, config.in: Regenerate.
13490
d149dd1d
PA
134912010-06-01 Pedro Alves <pedro@codesourcery.com>
13492
13493 * server.c (handle_query) <qSupported>: Do two passes over the
13494 qSupported string to avoid nesting strtok.
13495
f6528abd
JK
134962010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
13497
13498 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
13499 (CDEPS): New.
13500 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
13501 -Wl,--dynamic-list.
13502 * configure: Regenerate.
13503 * proc-service.list: New.
13504
ca2a87a0
JK
135052010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
13506
13507 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
13508 New comment.
13509
363a6e9f
OS
135102010-05-26 Ozkan Sezer <sezeroz@gmail.com>
13511
13512 * gdbreplay.c (remote_open): Check error return from socket() call by
13513 its equality to -1 not by it being negative.
13514 * remote-utils.c (remote_open): Likewise.
13515
d23b6cb1
PA
135162010-05-23 Pedro Alves <pedro@codesourcery.com>
13517
13518 * config.h: Regenerate.
13519
28d3cf85
MK
135202010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
13521
13522 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
13523 doesn't provide PTRACE_GET_THREAD_AREA.
13524
fea36a59
MK
135252010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
13526
13527 * linux-m68k-low.c: Include <asm/ptrace.h>
13528 (ps_get_thread_area): Implement.
13529
24b066ba
DE
135302010-05-03 Doug Evans <dje@google.com>
13531
13532 * event-loop.c (struct callback_event): New struct.
13533 (callback_list): New global.
13534 (append_callback_event, delete_callback_event): New functions.
13535 (process_callback): New function.
13536 (start_event_loop): Call it.
13537 * remote-utils.c (NOT_SCHEDULED): Define.
13538 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
13539 moved out of readchar.
13540 (readchar): Rewrite. Call reschedule before returning.
13541 (reset_readchar): New function.
13542 (remote_close): Call it.
13543 (process_remaining, reschedule): New functions.
13544 * server.h (callback_handler_func): New typedef.
13545 (append_callback_event, delete_callback_event): Declare.
13546
9836d6ea
PA
135472010-05-03 Pedro Alves <pedro@codesourcery.com>
13548
13549 * proc-service.c (ps_pglobal_lookup): Use
13550 thread_db_look_up_one_symbol.
13551 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
13552 parameter. Use it instead of all_symbols_looked_up.
13553 * server.h (struct process_info) <all_symbols_looked_up>: Delete
13554 field.
13555 (all_symbols_looked_up): Don't declare.
13556 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
13557 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
13558 field.
13559 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
13560 Set all_symbols_looked_up here.
13561 (thread_db_look_up_one_symbol): New.
13562 (thread_db_get_tls_address): Adjust.
13563 (thread_db_load_search, try_thread_db_load_1): Always allocate the
13564 thread_db object on the heap, and tentatively set it in the
13565 process structure.
13566 (thread_db_init): Don't set all_symbols_looked_up here.
13567 * linux-low.h (thread_db_look_up_one_symbol): Declare.
13568
7984d532
PA
135692010-05-03 Pedro Alves <pedro@codesourcery.com>
13570
13571 * linux-low.c (linux_kill, linux_detach): Adjust.
13572 (status_pending_p_callback): Remove redundant statement. Check
13573 for !TARGET_WAITIKIND_IGNORE, instead of
13574 TARGET_WAITKIND_STOPPED.
13575 (handle_tracepoints): Make sure LWP is locked. Adjust.
13576 (linux_wait_for_event_1): Adjust.
13577 (linux_cancel_breakpoints): New.
13578 (unsuspend_one_lwp): New.
13579 (unsuspend_all_lwps): New.
13580 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
13581 (send_sigstop_callback): Change return type to int, add new
13582 `except' parameter and handle it.
13583 (suspend_and_send_sigstop_callback): New.
13584 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
13585 pass them down. If SUSPEND, also increment the lwp's suspend
13586 count.
13587 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
13588 (need_step_over_p): Don't consider suspended LWPs.
13589 (start_step_over): Adjust.
13590 (proceed_one_lwp): Change return type to int, add new `except'
13591 parameter and handle it.
13592 (unsuspend_and_proceed_one_lwp): New.
13593 (proceed_all_lwps): Use find_inferior instead of
13594 for_each_inferior.
13595 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
13596 also decrement the suspend count of LWPs. Pass `except' down,
13597 instead of hacking its suspend count.
13598 (linux_pause_all): Add `freeze' parameter. Adjust.
13599 (linux_unpause_all): New.
13600 (linux_target_ops): Install linux_unpause_all.
13601 * server.c (handle_status): Adjust.
13602 * target.h (struct target_ops): New fields `unpause_all' and
13603 `cancel_breakpoints'. Add new parameter to `pause_all'.
13604 (pause_all): Add new `freeze' parameter.
13605 (unpause_all): New.
13606 (cancel_breakpoints): New.
13607 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
13608 cancel breakpoints.
13609 (cmd_qtstart): Pause threads.
13610 (stop_tracing): Pause threads, and cancel breakpoints.
13611 * win32-low.c (win32_target_ops): Adjust.
13612
e471f25b
PA
136132010-05-03 Pedro Alves <pedro@codesourcery.com>
13614
13615 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
13616 the inferior right away from here...
13617 (linux_wait_1): ... to here, and adjust to check the thread's
13618 last_resume_kind instead of the lwp's step or stop_expected flags.
13619
1915ef4f
PA
136202010-05-02 Pedro Alves <pedro@codesourcery.com>
13621
13622 * README: Use consistent `GDB' and `GDBserver' spellings.
13623
f9e39928
PA
136242010-05-02 Pedro Alves <pedro@codesourcery.com>
13625
13626 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
13627 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
13628 (linux_detach_one_lwp): Assume the lwp is stopped.
13629 (any_thread_of): Delete.
13630 (linux_detach): Stop all lwps here. Don't blindly delete all
13631 breakpoints.
13632 (delete_lwp_callback): New.
13633 (linux_mourn): Delete all lwps of the process that is gone.
13634 (linux_wait_1): Don't delete the last lwp of the process here.
13635 * mem-break.h (mark_breakpoints_out): Declare.
13636 * mem-break.c (mark_breakpoints_out): New.
13637 (free_all_breakpoints): Use it.
13638 * server.c (handle_target_event): If the process is gone, mark
13639 breakpoints out.
13640 * thread-db.c (struct thread_db) <create_bp>: New field.
13641 (thread_db_enable_reporting): Fix prototype. Store a thread event
13642 breakpoint reference in the thread_db struct.
13643 (thread_db_load_search): Clear the thread_db object.
13644 (try_thread_db_load_1): Ditto.
13645 (switch_to_process): New.
13646 (disable_thread_event_reporting): Use it.
13647 (remove_thread_event_breakpoints): New.
13648 (thread_db_detach, thread_db_mourn): Use it.
13649
1e7fc18c
PA
136502010-05-01 Pedro Alves <pedro@codesourcery.com>
13651
13652 * linux-low.c (linux_enable_event_reporting): New.
13653 (linux_wait_for_event_1, handle_extended_wait): Use it.
13654
02fc4de7
PA
136552010-04-30 Pedro Alves <pedro@codesourcery.com>
13656
13657 * linux-low.c (linux_kill_one_lwp, linux_kill)
13658 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
13659 (send_sigstop): Take an lwp_info as parameter instead. Queue a
13660 SIGSTOP even if the LWP is stopped.
13661 (send_sigstop_callback): New.
13662 (stop_all_lwps): Use send_sigstop_callback instead.
13663 (linux_resume_one_thread): Adjust.
13664 (proceed_one_lwp): Still proceed an LWP that the client has
13665 requested to stop, if we haven't reported it as stopped yet. Make
13666 sure that LWPs the client want stopped, have a pending SIGSTOP.
13667
bc3b5632
DE
136682010-04-26 Doug Evans <dje@google.com>
13669
ae1ada35
DE
13670 * server.c (handle_general_set): Make static.
13671
bc3b5632
DE
13672 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
13673 Print received char after testing for error/eof instead of before.
13674 (input_interrupt): Tweak comment.
13675
65730243
DE
136762010-04-23 Doug Evans <dje@google.com>
13677
13678 * server.c (start_inferior): Print inferior argv if --debug.
13679
a8ae7dc0
AR
136802010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
13681
13682 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
13683 * nto-x86-low.c: Include server.h
13684
1c07cc19
PM
136852010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
13686
13687 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
13688 be consistent with other sources of this directory.
13689 (init_registers_amd64): Correct name of source file of this function
13690 in the comment.
13691
e0a61e09
PM
136922010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
13693
13694 * configure.srv (x86_64-*-mingw*): New configuration for Windows
13695 64-bit executables.
13696
54709339
PM
136972010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
13698
13699 * win32-i386-low.c: Add 64-bit support.
13700 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
13701 (init_registers_amd64): Declare.
13702 (mappings): Add 64-bit version of array.
13703 (init_windows_x86): New function.
13704 (the_low_target): Change init_arch field to init_windows_x86.
13705
e8f0053d
PM
137062010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
13707
13708 * win32-low.c: Adapt to support also 64-bit architecture.
13709 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
13710 (get_image_name): Use SIZE_T type for local variable `done'.
13711 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
13712 (toolhelp_get_dll_name): Idem.
13713 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
13714 Use uintptr_t typecast to avoid warning.
13715 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
13716 (handle_exception): Use phex_nz to avoid warning.
13717 (win32_wait): Remove unused local variable `process'.
13718
c481e77e
PM
137192010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
13720
13721 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
13722 `amd64-avx.o'.
13723
12ea4b69
PM
137242010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
13725
13726 * configure.ac: Use `ws2_32' library for srv_mingw.
13727 * configure: Regenerate.
13728 * gdbreplay.c: Include winsock2.h instead of winsock.h.
13729 * remote-utils.c: Likewise.
13730
f6d1620c
L
137312010-04-17 H.J. Lu <hongjiu.lu@intel.com>
13732
13733 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
13734 if __x86_64__ is defined.
13735
8e642873
PM
137362010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
13737
13738 * configure: Regenerate.
13739
711e434b
PM
137402010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
13741
13742 * server.c (handle_query): Handle 'qGetTIBAddr' query.
13743 * target.h (target_ops): New get_tib_address field.
13744 * win32-low.h (win32_thread_info): Add thread_local_base field.
13745 * win32-low.c (child_add_thread): Add tlb argument.
13746 Set thread_local_base field to TLB.
13747 (get_child_debug_event): Adapt to child_add_thread change.
13748 (win32_get_tib_address): New function.
13749 (win32_target_ops): Set get_tib_address field to
13750 win32_get_tib_address.
13751 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
13752
505106cd
PA
137532010-04-12 Pedro Alves <pedro@codesourcery.com>
13754
505106cd
PA
13755 * linux-low.c (linux_mourn): Also remove the process.
13756 * server.c (handle_target_event): Don't remove the process here.
13757 * nto-low.c (nto_mourn): New.
13758 (nto_target_ops): Install it.
13759 * spu-low.c (spu_mourn): New.
13760 (spu_target_ops): Install it.
13761 * win32-low.c (win32_mourn): New.
13762 (win32_target_ops): Install it.
13763
e8470a06
PA
137642010-04-12 Pedro Alves <pedro@codesourcery.com>
13765
13766 * server.h (buffer_xml_printf): Remove redundant `;'.
13767
45ba0d02
PA
137682010-04-12 Pedro Alves <pedro@codesourcery.com>
13769
13770 * regcache.c (set_register_cache): Invalidate regcaches before
13771 changing the register cache layout.
13772 (regcache_invalidate_one): Allow a NULL regcache.
13773 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
13774 regcaches before changing the register cache layout or the target
13775 regsets.
13776
59e04013
L
137772010-04-12 H.J. Lu <hongjiu.lu@intel.com>
13778
13779 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
13780 variable warning on Linux/x86-64.
13781
8336d594
PA
137822010-04-11 Pedro Alves <pedro@codesourcery.com>
13783
13784 GDBserver disconnected tracing support.
13785
13786 * linux-low.c (linux_remove_process): Delete.
13787 (add_lwp): Don't set last_resume_kind here.
13788 (linux_kill): Use `mourn'.
13789 (linux_detach): Use `thread_db_detach', and `mourn'.
13790 (linux_mourn): New.
13791 (linux_attach_lwp_1): Adjust comment.
13792 (linux_attach): last_resume_kind moved the thread_info; adjust.
13793 (status_pending_p_callback): Adjust.
13794 (linux_wait_for_event_1): Adjust.
13795 (count_events_callback, select_singlestep_lwp_callback)
13796 (select_event_lwp_callback, cancel_breakpoints_callback)
13797 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
13798 (proceed_one_lwp): Adjust.
13799 (linux_async): Add debug output.
13800 (linux_thread_stopped): New.
13801 (linux_pause_all): New.
13802 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
13803 linux_pause_all.
13804 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
13805 (thread_db_free): Delete declaration.
13806 (thread_db_detach, thread_db_mourn): Declare.
13807 * thread-db.c (thread_db_init): Use thread_db_mourn.
13808 (thread_db_free): Delete, split in two.
13809 (disable_thread_event_reporting): New.
13810 (thread_db_detach): New.
13811 (thread_db_mourn): New.
13812
13813 * server.h (struct thread_info) <last_resume_kind>: New field.
13814 <attached>: Add comment.
13815 <gdb_detached>: New field.
13816 (handler_func): Change return type to int.
13817 (handle_serial_event, handle_target_event): Ditto.
13818 (gdb_connected): Declare.
13819 (tracing): Delete.
13820 (disconnected_tracing): Declare.
13821 (stop_tracing): Declare.
13822
13823 * server.c (handle_query) <qSupported>: Report support for
13824 disconnected tracing.
13825 (queue_stop_reply_callback): Account for running threads.
13826 (gdb_wants_thread_stopped): New.
13827 (gdb_wants_all_threads_stopped): New.
13828 (gdb_reattached_process): New.
13829 (handle_status): Clear the `gdb_detached' flag of all processes.
13830 In all-stop, stop all threads.
13831 (main): Be sure to leave tfind mode. Handle disconnected tracing.
13832 (process_serial_event): If the remote connection breaks, or if an
13833 exit was forced with "monitor exit", force an event loop exit.
13834 Handle disconnected tracing on detach.
13835 (handle_serial_event): Adjust.
13836 (handle_target_event): If GDB isn't connected, forward events back
13837 to the inferior, unless the last process exited, in which case,
13838 exit gdbserver. Adjust interface.
13839
13840 * remote-utils.c (remote_open): Don't block in accept. Instead
13841 register an event loop source on the listen socket file
13842 descriptor. Refactor bits into ...
13843 (listen_desc): ... this new global.
13844 (gdb_connected): ... this new function.
13845 (enable_async_notification): ... this new function.
13846 (handle_accept_event): ... this new function.
13847 (remote_close): Clear remote_desc.
13848
13849 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
13850
13851 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
13852 New fields.
13853 (mourn_inferior): Define.
13854 (target_process_qsupported): Avoid the dangling else problem.
13855 (thread_stopped): Define.
13856 (pause_all): Define.
13857 (target_waitstatus_to_string): Declare.
13858 * target.c (target_waitstatus_to_string): New.
13859
13860 * tracepoint.c (tracing): Make extern.
13861 (disconnected_tracing): New.
13862 (stop_tracing): Make extern. Handle tracing stops due to GDB
13863 disconnecting.
13864 (cmd_qtdisconnected): New.
13865 (cmd_qtstatus): Report disconnected tracing status in trace reply.
13866 (handle_tracepoint_general_set): Handle QTDisconnected.
13867
13868 * event-loop.c (event_handler_func): Change return type to int.
13869 (process_event): Bail out if the event handler wants the event
13870 loop to stop.
13871 (handle_file_event): Ditto.
13872 (start_event_loop): Bail out if the event handler wants the event
13873 loop to stop.
13874
13875 * nto-low.c (nto_target_ops): Adjust.
13876 * spu-low.c (spu_wait): Don't remove the process here.
13877 (spu_target_ops): Adjust.
13878 * win32-low.c (win32_wait): Don't remove the process here.
13879 (win32_target_ops): Adjust.
13880
5d267c4c
PA
138812010-04-11 Pedro Alves <pedro@codesourcery.com>
13882
13883 * regcache.c (realloc_register_cache): Invalidate inferior's
13884 regcache before recreating it.
13885
623ccd72
PA
138862010-04-09 Pedro Alves <pedro@codesourcery.com>
13887
13888 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
13889
219f2f23
PA
138902010-04-09 Stan Shebs <stan@codesourcery.com>
13891 Pedro Alves <pedro@codesourcery.com>
13892
13893 * server.h (LONGEST): New.
13894 (struct thread_info) <while_stepping>: New field.
13895 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
13896 Declare.
13897 (initialize_tracepoint, handle_tracepoint_general_set)
13898 (handle_tracepoint_query, tracepoint_finished_step)
13899 (tracepoint_was_hit, release_while_stepping_state_list):
13900 (current_traceframe): Declare.
13901 * server.c (handle_general_set): Handle tracepoint packets.
13902 (read_memory): New.
13903 (write_memory): New.
13904 (handle_search_memory_1): Use read_memory.
13905 (handle_query): Report support for conditional tracepoints, trace
13906 state variables, and tracepoint sources. Handle tracepoint
13907 queries.
13908 (main): Initialize the tracepoints module.
13909 (process_serial_event): Handle traceframe reads/writes.
13910
13911 * linux-low.c (handle_tracepoints): New.
13912 (linux_wait_1): Call it.
13913 (linux_resume_one_lwp): Handle while-stepping.
13914 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
13915 (linux_target_ops): Install them.
13916 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
13917 New field.
13918 * linux-x86-low.c (x86_supports_tracepoints): New.
13919 (the_low_target). Install it.
13920
13921 * mem-break.h (delete_breakpoint): Declare.
13922 * mem-break.c (delete_breakpoint): Make external.
13923
13924 * target.h (struct target_ops): Add `supports_tracepoints',
13925 `read_pc', and `write_pc' fields.
13926 (target_supports_tracepoints): Define.
13927 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
13928 (phex_nz): New.
13929
13930 * regcache.h (struct regcache) <registers_owned>: New field.
13931 (init_register_cache, regcache_cpy): Declare.
13932 (regcache_read_pc, regcache_write_pc): Declare.
13933 (register_cache_size): Declare.
13934 (supply_regblock): Declare.
13935 * regcache.c (init_register_cache): New.
13936 (new_register_cache): Use it.
13937 (regcache_cpy): New.
13938 (register_cache_size): New.
13939 (supply_regblock): New.
13940 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 13941
219f2f23
PA
13942 * tracepoint.c: New.
13943
13944 * Makefile.in (OBS): Add tracepoint.o.
13945 (tracepoint.o): New rule.
13946
3a13a53b
L
139472010-04-08 H.J. Lu <hongjiu.lu@intel.com>
13948
13949 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
13950 (i386-mmx.o): New.
13951 (i386-mmx.c): Likewise.
13952 (i386-mmx-linux.o): Likewise.
13953 (i386-mmx-linux.c): Likewise.
13954
13955 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
13956 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
13957 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
13958 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
13959
13960 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
13961 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
13962 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
13963
1570b33e
L
139642010-04-07 H.J. Lu <hongjiu.lu@intel.com>
13965
13966 * Makefile.in (clean): Updated.
13967 (i386-avx.o): New.
13968 (i386-avx.c): Likewise.
13969 (i386-avx-linux.o): Likewise.
13970 (i386-avx-linux.c): Likewise.
13971 (amd64-avx.o): Likewise.
13972 (amd64-avx.c): Likewise.
13973 (amd64-avx-linux.o): Likewise.
13974 (amd64-avx-linux.c): Likewise.
13975
13976 * configure.srv (srv_i386_regobj): Add i386-avx.o.
13977 (srv_i386_linux_regobj): Add i386-avx-linux.o.
13978 (srv_amd64_regobj): Add amd64-avx.o.
13979 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
13980 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
13981 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
13982 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
13983 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
13984 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
13985 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
13986
13987 * i387-fp.c: Include "i386-xstate.h".
13988 (i387_xsave): New.
13989 (i387_cache_to_xsave): Likewise.
13990 (i387_xsave_to_cache): Likewise.
13991 (x86_xcr0): Likewise.
13992
13993 * i387-fp.h (i387_cache_to_xsave): Likewise.
13994 (i387_xsave_to_cache): Likewise.
13995 (x86_xcr0): Likewise.
13996
13997 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
13998 * linux-crisv32-low.c (target_regsets): Likewise.
13999 * linux-m68k-low.c (target_regsets): Likewise.
14000 * linux-mips-low.c (target_regsets): Likewise.
14001 * linux-ppc-low.c (target_regsets): Likewise.
14002 * linux-s390-low.c (target_regsets): Likewise.
14003 * linux-sh-low.c (target_regsets): Likewise.
14004 * linux-sparc-low.c (target_regsets): Likewise.
14005 * linux-xtensa-low.c (target_regsets): Likewise.
14006
14007 * linux-low.c: Include <sys/uio.h>.
14008 (regsets_fetch_inferior_registers): Support nt_type.
14009 (regsets_store_inferior_registers): Likewise.
14010 (linux_process_qsupported): New.
14011 (linux_target_ops): Add linux_process_qsupported.
14012
14013 * linux-low.h (regset_info): Add nt_type.
14014 (linux_target_ops): Add process_qsupported.
14015
14016 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
14017 and <sys/uio.h>.
14018 (init_registers_i386_avx_linux): New.
14019 (init_registers_amd64_avx_linux): Likewise.
14020 (xmltarget_i386_linux_no_xml): Likewise.
14021 (xmltarget_amd64_linux_no_xml): Likewise.
14022 (PTRACE_GETREGSET): Likewise.
14023 (PTRACE_SETREGSET): Likewise.
14024 (x86_fill_xstateregset): Likewise.
14025 (x86_store_xstateregset): Likewise.
14026 (use_xml): Likewise.
14027 (x86_linux_update_xmltarget): Likewise.
14028 (x86_linux_process_qsupported): Likewise.
14029 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
14030 (x86_arch_setup): Don't call init_registers_amd64_linux nor
14031 init_registers_i386_linux here. Call
14032 x86_linux_update_xmltarget.
14033 (the_low_target): Add x86_linux_process_qsupported.
14034
14035 * server.c (handle_query): Call target_process_qsupported.
14036
14037 * target.h (target_ops): Add process_qsupported.
14038 (target_process_qsupported): New.
14039
fc7238bb
PA
140402010-04-03 Pedro Alves <pedro@codesourcery.com>
14041
14042 * inferiors.c (add_thread): Set last_status kind to
14043 TARGET_WAITKIND_IGNORE.
14044 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
14045 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
14046 (linux_wait_1): Move `thread' local definition to block that uses
14047 it. Don't NULL initialize `event_child'.
14048 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
14049 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
14050 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
14051
bdabb078
PA
140522010-04-01 Pedro Alves <pedro@codesourcery.com>
14053
14054 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
14055 an extended waitstatus, or by a watchpoint.
14056 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
14057 thread was stepping or has been stopped by a watchpoint.
14058
d3bbe7a0
PA
140592010-04-01 Pedro Alves <pedro@codesourcery.com>
14060
14061 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
14062 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
14063 of another, then delete the previous, and validate all
14064 breakpoints.
14065 (validate_inserted_breakpoint): New.
14066 (delete_disabled_breakpoints): New.
14067 (validate_breakpoints): New.
14068 (check_mem_read): Validate breakpoints before trusting their
14069 shadow. Delete disabled breakpoints.
14070 (check_mem_write): Validate breakpoints before trusting they
14071 should be inserted. Delete disabled breakpoints.
14072 * mem-break.h (validate_breakpoints):
14073 * server.c (handle_query): Validate breakpoints when we see a
14074 qSymbol query.
14075
8b07ae33
PA
140762010-04-01 Pedro Alves <pedro@codesourcery.com>
14077
14078 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
14079 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
14080 if we could tell there's a GDB breakpoint at stop_pc.
14081 (need_step_over_p): Don't do a step over if we find a GDB
14082 breakpoint at the resume PC.
14083
14084 * mem-break.c (struct raw_breakpoint): New.
14085 (enum bkpt_type): New type `gdb_breakpoint'.
14086 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
14087 fields. New field `raw'.
14088 (find_raw_breakpoint_at): New.
14089 (set_raw_breakpoint_at): Handle refcounting. Create a raw
14090 breakpoint instead.
14091 (set_breakpoint_at): Adjust.
14092 (delete_raw_breakpoint): New.
14093 (release_breakpoint): New.
14094 (delete_breakpoint): Rename to...
14095 (delete_breakpoint_1): ... this. Add proc parameter. Use
14096 release_breakpoint. Return ENOENT.
14097 (delete_breakpoint): Reimplement.
14098 (find_breakpoint_at): Delete.
14099 (find_gdb_breakpoint_at): New.
14100 (delete_breakpoint_at): Delete.
14101 (set_gdb_breakpoint_at): New.
14102 (delete_gdb_breakpoint_at): New.
14103 (gdb_breakpoint_here): New.
14104 (set_reinsert_breakpoint): Use release_breakpoint.
14105 (uninsert_breakpoint): Rename to ...
14106 (uninsert_raw_breakpoint): ... this.
14107 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
14108 (reinsert_raw_breakpoint): Change parameter type to
14109 raw_breakpoint.
14110 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
14111 instead.
14112 (check_breakpoints): Adjust. Use release_breakpoint.
14113 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
14114 (breakpoint_inserted_here): Ditto.
14115 (check_mem_read): Adjust to iterate over raw breakpoints instead.
14116 Don't trust the breakpoint's shadow if it is not inserted.
14117 (check_mem_write): Adjust to iterate over raw breakpoints instead.
14118 (delete_all_breakpoints): Adjust.
14119 (free_all_breakpoints): Mark all breakpoints as uninserted, and
14120 use delete_breakpoint_1.
14121
14122 * mem-break.h (breakpoints_supported): Delete declaration.
14123 (set_gdb_breakpoint_at): Declare.
14124 (gdb_breakpoint_here): Declare.
14125 (delete_breakpoint_at): Delete.
14126 (delete_gdb_breakpoint_at): Declare.
14127
14128 * server.h (struct raw_breakpoint): Forward declare.
14129 (struct process_info): New field `raw_breakpoints'.
14130
14131 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
14132 breakpoints.
14133
6bf5e0ba
PA
141342010-03-24 Pedro Alves <pedro@codesourcery.com>
14135
14136 * linux-low.c (status_pending_p_callback): Fix comment.
14137 (linux_wait_for_event_1): Move most of the internal breakpoint
14138 handling from here...
14139 (linux_wait_1): ... to here.
14140 (count_events_callback): New.
14141 (select_singlestep_lwp_callback): New.
14142 (select_event_lwp_callback): New.
14143 (cancel_breakpoints_callback): New.
14144 (select_event_lwp): New.
14145 (linux_wait_1): Simplify internal breakpoint handling. Give equal
14146 priority to all LWPs that have had events that should be reported
14147 to the client. Cancel breakpoints when about to reporting the
14148 event to the client, not while stopping lwps. No longer cancel
14149 finished single-steps here.
14150 (cancel_finished_single_step): Delete.
14151 (cancel_finished_single_steps): Delete.
14152
414a389f
PA
141532010-03-24 Pedro Alves <pedro@codesourcery.com>
14154
14155 * mem-break.c (enum bkpt_type): New.
14156 (struct breakpoint): New field `type'.
14157 (set_breakpoint_at): Change return type to struct breakpoint
14158 pointer. Set type to `other_breakpoint' by default.
14159 (delete_breakpoint): Rewrite, supporting more than one breakpoint
14160 in the breakpoint list.
14161 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
14162 (reinsert_breakpoint): Rename to ...
14163 (reinsert_raw_breakpoint): ... this.
14164 (reinsert_breakpoints_at): Adjust.
14165 * mem-break.h (struct breakpoint): Declare.
14166 (set_breakpoint_at): Change return type to struct breakpoint
14167 pointer.
14168
2280c721
PA
141692010-03-24 Pedro Alves <pedro@codesourcery.com>
14170
14171 * server.c (handle_query): Assign, not compare.
14172
d50171e4
PA
141732010-03-24 Pedro Alves <pedro@codesourcery.com>
14174
14175 Teach linux gdbserver to step-over-breakpoints.
14176
14177 * linux-low.c (can_hardware_single_step): New.
14178 (supports_breakpoints): New.
14179 (handle_extended_wait): If stopping threads, read the stop pc of
14180 the new cloned LWP.
14181 (get_pc): New.
14182 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
14183 low target doesn't support retrieving the PC.
14184 (add_lwp): Set last_resume_kind to resume_continue.
14185 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
14186 (linux_attach): Don't clear stop_expected. Set the lwp's
14187 last_resume_kind to resume_stop.
14188 (linux_detach_one_lwp): Don't check for removed breakpoints.
14189 (check_removed_breakpoint): Delete.
14190 (status_pending_p): Rename to ...
14191 (status_pending_p_callback): ... this. Don't check for removed
14192 breakpoints. Don't consider threads that are stopped from GDB's
14193 perspective.
14194 (linux_wait_for_lwp): Always read the stop_pc here.
14195 (cancel_breakpoint): New.
14196 (step_over_bkpt): New global.
14197 (linux_wait_for_event_1): Implement stepping over breakpoints.
14198 (gdb_wants_lwp_stopped): New.
14199 (gdb_wants_all_stopped): New.
14200 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
14201 single-step traps here. Store the thread's last reported target
14202 wait status.
14203 (send_sigstop): Don't clear stop_expected. Always set it,
14204 instead.
14205 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
14206 (cancel_finished_single_step): New.
14207 (cancel_finished_single_steps): New.
14208 (wait_for_sigstop): Don't cancel finished single-step traps here.
14209 (linux_resume_one_lwp): Don't check for removed breakpoints.
14210 Don't set `step' on non-hardware step archs.
14211 (linux_set_resume_request): Ignore resume_stop requests if already
14212 stopping or stopped. Set the lwp's last_resume_kind.
14213 (resume_status_pending_p): Don't check for removed breakpoints.
14214 (need_step_over_p): New.
14215 (start_step_over): New.
14216 (finish_step_over): New.
14217 (linux_resume_one_thread): Always queue a sigstop for resume_stop
14218 requests. Clear the thread's last reported target waitstatus.
14219 Don't use the `suspended' flag. Don't consider pending breakpoints.
14220 (linux_resume): Start a step-over if necessary.
14221 (proceed_one_lwp): New.
14222 (proceed_all_lwps): New.
14223 (unstop_all_lwps): New.
14224 * linux-low.h (struct lwp_info): Rewrite comment for the
14225 `suspended' flag. Add the `stop_pc' field. Delete the
14226 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
14227 Add `'last_resume_kind' and `need_step_over' fields.
14228 * inferiors.c (struct thread_info): Delete, moved elsewhere.
14229 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
14230 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
14231 (set_raw_breakpoint_at): New.
14232 (set_breakpoint_at): Rewrite to use it.
14233 (reinsert_breakpoint_handler): Delete.
14234 (set_reinsert_breakpoint): New.
14235 (reinsert_breakpoint_by_bp): Delete.
14236 (delete_reinsert_breakpoints): New.
14237 (uninsert_breakpoint): Rewrite.
14238 (uninsert_breakpoints_at): New.
14239 (reinsert_breakpoint): Rewrite.
14240 (reinsert_breakpoints_at): New.
14241 (check_breakpoints): Rewrite.
14242 (breakpoint_here): New.
14243 (breakpoint_inserted_here): New.
14244 (check_mem_read): Adjust.
14245 * mem-break.h (breakpoints_supported, breakpoint_here)
14246 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
14247 (reinsert_breakpoint_by_bp): Delete declaration.
14248 (delete_reinsert_breakpoints): Declare.
14249 (reinsert_breakpoint): Delete declaration.
14250 (reinsert_breakpoints_at): Declare.
14251 (uninsert_breakpoint): Delete declaration.
14252 (uninsert_breakpoints_at): Declare.
14253 (check_breakpoints): Adjust prototype.
14254 * server.h: Adjust include order.
14255 (struct thread_info): Declare here. Add a `last_status' field.
14256
30ba68cb
MS
142572010-03-23 Michael Snyder <msnyder@vmware.com>
14258
14259 * server.c (crc32): New function.
14260 (handle_query): Add handling for 'qCRC:' request.
14261
b9a881c2
PA
142622010-03-23 Pedro Alves <pedro@codesourcery.com>
14263
14264 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
14265 lwp had been stopped by a watchpoint.
14266
e92d13d5
PA
142672010-03-16 Pedro Alves <pedro@codesourcery.com>
14268
14269 * server.h (internal_error): Declare.
14270 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
14271 * utils.c (internal_error): New function.
14272
64daa791
AS
142732010-03-15 Andreas Schwab <schwab@redhat.com>
14274
14275 * configure.srv: Fix typo setting srv_regobj.
14276
f52cd8cd
PA
142772010-03-15 Pedro Alves <pedro@codesourcery.com>
14278
14279 * linux-low.c (fetch_register): Avoid passing a non string literal
14280 format to `error'.
14281 (usr_store_inferior_registers): Ditto.
14282
93ae6fdc
PA
142832010-03-14 Pedro Alves <pedro@codesourcery.com>
14284
14285 * linux-low.c (linux_write_memory): Bail out early if peeking
14286 memory failed.
14287
c3adc08c
PA
142882010-03-14 Pedro Alves <pedro@codesourcery.com>
14289
14290 * linux-low.h (struct lwp_info): New fields
14291 `stopped_by_watchpoint' and `stopped_data_address'.
14292 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
14293 here, and cache them in the lwp object.
14294 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
14295 directly.
14296 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
14297 field.
14298 (linux_stopped_by_watchpoint): Rewrite.
14299 (linux_stopped_data_address): Rewrite.
14300
bce522a2
PA
143012010-03-06 Simo Melenius <simo.melenius@iki.fi>
14302
14303 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
14304 switching the current inferior, not before.
14305
90884b2b
L
143062010-03-01 H.J. Lu <hongjiu.lu@intel.com>
14307
14308 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
14309 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
14310 i386-linux.c and amd64-linux.c.
14311 (reg-i386.o): Removed.
14312 (reg-i386.c): Likewise.
14313 (reg-i386-linux.o): Likewise.
14314 (reg-i386-linux.c): Likewise.
14315 (reg-x86-64.o): Likewise.
14316 (reg-x86-64.c): Likewise.
14317 (reg-x86-64-linux.o): Likewise.
14318 (reg-x86-64-linux.c): Likewise.
14319 (i386.o): New.
14320 (i386.c): Likewise.
14321 (i386-linux.o): Likewise.
14322 (i386-linux.c): Likewise.
14323 (amd64.o): Likewise.
14324 (amd64.c): Likewise.
14325 (amd64-linux.o): Likewise.
14326 (amd64-linux.c): Likewise.
14327
14328 * configure.srv (srv_i386_regobj): New.
14329 (srv_i386_linux_regobj): Likewise.
14330 (srv_amd64_regobj): Likewise.
14331 (srv_amd64_linux_regobj): Likewise.
14332 (srv_i386_32bit_xmlfiles): Likewise.
14333 (srv_i386_64bit_xmlfiles): Likewise.
14334 (srv_i386_xmlfiles): Likewise.
14335 (srv_amd64_xmlfiles): Likewise.
14336 (srv_i386_linux_xmlfiles): Likewise.
14337 (srv_amd64_linux_xmlfiles): Likewise.
14338 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
14339 srv_xmlfiles to $srv_i386_xmlfiles.
14340 (i[34567]86-*-mingw32ce*): Likewise.
14341 (i[34567]86-*-mingw*): Likewise.
14342 (i[34567]86-*-nto*): Likewise.
14343 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
14344 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
14345 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
14346 (x86_64-*-linux*): Likewise.
14347
14348 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
14349 (init_registers_amd64_linux): New.
14350 (x86_arch_setup): Replace init_registers_x86_64_linux with
14351 init_registers_amd64_linux.
14352
193f13e6
MK
143532010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
14354
14355 * configure.ac: Check for libdl. If it is not available link against
14356 static libthread_db.
14357 * configure: Regenerate.
14358
85d721b8
PA
143592010-02-22 Pedro Alves <pedro@codesourcery.com>
14360
14361 PR9605
14362
14363 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
14364 handing a read watchpoint.
14365 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
14366
6076632b
DE
143672010-02-12 Doug Evans <dje@google.com>
14368
14369 * linux-low.c (linux_supports_tracefork_flag): Document.
14370 (linux_look_up_symbols): Add comment.
14371
3327ccf7
L
143722010-02-03 H.J. Lu <hongjiu.lu@intel.com>
14373
14374 * regcache.c (supply_register): Clear regcache if buf is NULL.
14375
0718675c 143762010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 14377 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
14378
14379 * inferiors.c (find_inferior): Add function documentation.
14380 (unloaded_dll): Handle the case where the unloaded dll has not
14381 been previously registered in the dll list.
14382
177321bd
DJ
143832010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
14384
14385 * linux-arm-low.c (thumb_breakpoint_len): Delete.
14386 (thumb2_breakpoint): New.
14387 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
14388
2b009048
DJ
143892010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
14390
14391 * linux-low.c (get_stop_pc): Check for SIGTRAP.
14392 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
14393 breakpoints.
14394
3be029c7
PA
143952010-01-21 Pedro Alves <pedro@codesourcery.com>
14396
14397 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
14398
18f5de3b
JK
143992010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
14400
14401 * linux-s390-low.c (s390_collect_ptrace_register)
14402 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
14403
3743bb4f
DE
144042010-01-21 Doug Evans <dje@google.com>
14405
14ce3065
DE
14406 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
14407 (PTRACE_ARG4_TYPE): New macro.
14408 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
14409 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
14410 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
14411 (usr_store_inferior_registers): Ditto.
14412 (linux_read_memory, linux_write_memory): Ditto.
14413 (linux_test_for_tracefork): Ditto.
14414
3743bb4f
DE
14415 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
14416 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
14417
8b315be5
PA
144182010-01-21 Pedro Alves <pedro@codesourcery.com>
14419
14420 * proc-service.c (ps_lgetregs): Don't refetch registers from the
14421 target.
14422
85492558
PA
144232010-01-21 Pedro Alves <pedro@codesourcery.com>
14424
14425 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
14426 prototype to take a regcache. Adjust.
14427
442ea881
PA
144282010-01-20 Pedro Alves <pedro@codesourcery.com>
14429
14430 * regcache.h (struct thread_info): Forward declare.
14431 (struct regcache): New.
14432 (new_register_cache): Adjust prototype.
14433 (get_thread_regcache): Declare.
14434 (free_register_cache): Adjust prototype.
14435 (registers_to_string, registers_from_string): Ditto.
14436 (supply_register, supply_register_by_name, collect_register)
14437 (collect_register_as_string, collect_register_by_name): Ditto.
14438 * regcache.c (struct inferior_regcache_data): Delete.
14439 (get_regcache): Rename to ...
14440 (get_thread_regcache): ... this. Adjust. Switch inferior before
14441 fetching registers.
14442 (regcache_invalidate_one): Adjust.
14443 (regcache_invalidate): Fix prototype.
14444 (new_register_cache): Return the new register cache.
14445 (free_register_cache): Change prototype.
14446 (realloc_register_cache): Adjust.
14447 (registers_to_string): Change prototype to take a regcache. Adjust.
14448 (registers_from_string): Ditto.
14449 (register_data): Ditto.
14450 (supply_register): Ditto.
14451 (supply_register_by_name): Ditto.
14452 (collect_register): Ditto.
14453 (collect_register_as_string): Ditto.
14454 (collect_register_by_name): Ditto.
14455 * server.c (process_serial_event): Adjust.
14456 * linux-low.h (regset_fill_func, regset_store_func): Change
14457 prototype.
14458 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
14459 Change prototype.
14460 * linux-low.c (get_stop_pc): Adjust.
14461 (check_removed_breakpoint): Adjust.
14462 (linux_wait_for_event): Adjust.
14463 (linux_resume_one_lwp): Adjust.
14464 (fetch_register): Add regcache parameter. Adjust.
14465 (usr_store_inferior_registers): Ditto.
14466 (regsets_fetch_inferior_registers): Ditto.
14467 (regsets_store_inferior_registers): Ditto.
14468 (linux_fetch_registers, linux_store_registers): Ditto.
14469 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
14470 regcache. Adjust.
43aaf8b6
PA
14471 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
14472 Ditto.
442ea881
PA
14473 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
14474 prototype to take a regcache.
14475 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
14476 * remote-utils.c (convert_ascii_to_int, outreg)
14477 (prepare_resume_reply): Change prototype to take a regcache.
14478 Adjust.
14479 * target.h (struct target_ops) <fetch_registers, store_registers>:
14480 Change prototype to take a regcache.
14481 (fetch_inferior_registers, store_inferior_registers): Change
14482 prototype to take a regcache. Adjust.
14483 * proc-service.c (ps_lgetregs): Adjust.
14484 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
14485 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
14486 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
14487 take a regcache. Adjust.
14488 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
14489 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
14490 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
14491 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
14492 * linux-cris-low.c (cris_get_pc, cris_set_pc)
14493 (cris_cannot_fetch_register):
14494 (cris_breakpoint_at): Change prototype to take a regcache.
14495 Adjust.
14496 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
14497 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
14498 to take a regcache. Adjust.
14499 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
14500 Adjust.
14501 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
14502 take a regcache. Adjust.
14503 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
14504 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
14505 (m68k_set_pc): Change prototype to take a regcache. Adjust.
14506 * linux-mips-low.c (mips_get_pc):
14507 (mips_set_pc): Change prototype to take a regcache. Adjust.
14508 (mips_reinsert_addr): Adjust.
14509 (mips_collect_register): Change prototype to take a regcache.
14510 Adjust.
14511 (mips_supply_register):
14512 (mips_collect_register_32bit, mips_supply_register_32bit)
14513 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
14514 (mips_store_fpregset): Ditto.
43aaf8b6
PA
14515 * linux-ppc-low.c (ppc_supply_ptrace_register)
14516 (ppc_supply_ptrace_register): Ditto.
442ea881
PA
14517 (parse_spufs_run): Adjust.
14518 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
14519 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
14520 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
14521 take a regcache. Adjust.
14522 * linux-s390-low.c (s390_collect_ptrace_register)
14523 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
14524 (s390_set_pc): Change prototype to take a regcache. Adjust.
14525 (s390_arch_setup): Adjust.
14526 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
14527 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
14528 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
14529 (sparc_fill_gregset, sparc_store_gregset_from_stack)
14530 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
14531 regcache. Adjust.
14532 (sparc_breakpoint_at): Adjust.
14533 * linux-xtensa-low.c (xtensa_fill_gregset):
14534 (xtensa_store_gregset):
14535 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
14536 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
14537 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
14538 prototype to take a regcache. Adjust.
14539 * win32-arm-low.c (arm_fetch_inferior_register)
14540 (arm_store_inferior_register): Change prototype to take a
14541 regcache. Adjust.
14542 * win32-i386-low.c (i386_fetch_inferior_register)
14543 (i386_store_inferior_register): Change prototype to take a
14544 regcache. Adjust.
14545 * win32-low.c (child_fetch_inferior_registers)
14546 (child_store_inferior_registers): Change prototype to take a
14547 regcache. Adjust.
14548 (win32_wait): Adjust.
14549 (win32_fetch_inferior_registers): Change prototype to take a
14550 regcache. Adjust.
14551 (win32_store_inferior_registers): Adjust.
14552 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
14553 store_inferior_register>: Change prototype to take a regcache.
14554
60c3d7b0
DE
145552010-01-20 Doug Evans <dje@google.com>
14556
14557 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
14558 #ifdef.
14559 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 14560 (W_STOPCODE): Provide definition if missing.
60c3d7b0 14561
dc146f7c
VP
145622010-01-13 Vladimir Prus <vladimir@codesourcery.com>
14563
14564 * linux-low.c (linux_core_of_thread): New.
14565 (compare_ints, show_process, list_threads): New.
14566 (linux_qxfer_osdata): Report threads and cores.
14567 (linux_target_op): Register linux_core_of_thread.
14568 * remote-utils.c (prepare_resume_reply): Report the core.
14569 (buffer_xml_printf): Support %d specifier.
14570 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
14571 New.
14572 (handle_query): Handle qXfer:threads. Announce availability
14573 thereof.
14574 * target.h (struct target_ops): New field core_of_thread.
14575
7803799a
UW
145762010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
14577
14578 * Makefile.in (clean): Remove new generated files.
14579 (reg-s390.o, reg-s390.c): Remove rules.
14580 (reg-s390x.o, reg-s390x.c): Likewise.
14581 (s390-linux32.o, s390-linux32.c): Add rules.
14582 (s390-linux64.o, s390-linux64.c): Likewise.
14583 (s390x-linux64.o, s390x-linux64.c): Likewise.
14584 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
14585 * linux-s390-low.c: Include <elf.h>.
14586 (HWCAP_S390_HIGH_GPRS): Define if undefined.
14587 (init_registers_s390): Remove prototype.
14588 (init_registers_s390x): Likewise.
14589 (init_registers_s390_linux32): Add prototype.
14590 (init_registers_s390_linux64): Likewise.
14591 (init_registers_s390x_linux64): Likewise.
14592 (s390_num_regs_3264): New define.
14593 (s390_regmap_3264): New global variable.
14594 (s390_cannot_fetch_register): Remove obsolete check.
14595 (s390_cannot_store_register): Likewise.
14596 (s390_collect_ptrace_register): Handle upper/lower register halves.
14597 (s390_supply_ptrace_register): Likewise.
14598 (s390_fill_gregset): Update to register number changes.
14599 (s390_get_hwcap): New routine.
14600 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
14601 Install appropriate regmap and register set.
14602
6e7ffa39
JB
146032010-01-01 Joel Brobecker <brobecker@adacore.com>
14604
14605 * server.c (gdbserver_version): Update copyright year to 2010.
14606 * gdbreplay.c (gdbreplay_version): Likewise.
14607
957f3f49
DE
146082009-12-28 Doug Evans <dje@google.com>
14609
14610 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
14611 elf/external.h. Include <elf.h> instead but only if necessary.
14612
ca5c370d
PA
146132009-12-28 Pedro Alves <pedro@codesourcery.com>
14614
14615 * linux-low.c (linux_remove_process): Remove `detaching'
14616 parameter. Don't release/detach from thread_db here.
14617 (linux_kill): Release/detach from thread_db here, ...
14618 (linux_detach): ... and here, before actually detaching.
14619 (linux_wait_1): ... and here, when a process exits.
14620 * thread-db.c (any_thread_of): New.
14621 (thread_db_free): Switch the current inferior to a thread of the
14622 passed in process.
14623
4ee62156
DE
146242009-12-21 Doug Evans <dje@google.com>
14625
d90e6a88
DE
14626 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
14627
c5f62d5f
DE
14628 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
14629 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
14630 warning ifndef __NR_tkill. Move setting of errno there too.
14631 Delete unnecessary resetting of errno after syscall.
14632 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
14633
10e86dd7
DE
14634 * configure.ac: Check for dladdr.
14635 * config.in: Regenerate.
14636 * configure: Regenerate.
14637 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
14638 (try_thread_db_load): Update.
14639
4ee62156
DE
14640 * linux-low.c (my_waitpid): Delete unnecessary prototype.
14641
00f515da
DE
146422009-12-18 Doug Evans <dje@google.com>
14643
e9464885
DE
14644 * event-loop.c: Include unistd.h if it exists.
14645
07d4f67e
DE
14646 * linux-low.c (my_waitpid): Move definition away from being in
14647 between linux_tracefork_child/linux_test_for_tracefork.
14648
00f515da
DE
14649 * gdb_proc_service.h (psaddr_t): Fix type.
14650 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
14651 signature to match glibc.
14652
1de1badb
DE
146532009-12-16 Doug Evans <dje@google.com>
14654
14655 * linux-low.c (linux_read_memory): Fix argument to read.
14656
aeeb81d1
PA
146572009-11-26 Pedro Alves <pedro@codesourcery.com>
14658
14659 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
14660 events, don't leave current_inferior pointing at null.
14661
10357975
PA
146622009-11-26 Pedro Alves <pedro@codesourcery.com>
14663
14664 * win32-low.c (LOG): Delete.
14665 (OUTMSG): Output to stderr.
14666 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
14667 on compile time LOG macro.
14668 (win32_wait): Fix debug output.
14669
cf6e3471
PA
146702009-11-26 Pedro Alves <pedro@codesourcery.com>
14671
14672 * win32-low.c (win32_add_one_solib): If the dll name is
14673 "ntdll.dll", prepend the system directory to the dll path.
14674
0c85e18e
MK
146752009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
14676
14677 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
14678
9ac544ce 146792009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 14680 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
14681
14682 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
14683 * configure.ac: Check for __mcoldfire__ and set
14684 gdb_cv_m68k_is_coldfire.
14685 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
14686 reg-cf.o and reg-m68k.o.
14687 * configure: Regenerated.
14688
fd7dd3e6
PA
146892009-11-16 Pedro Alves <pedro@codesourcery.com>
14690
14691 * linux-low.c (linux_remove_process): Add `detaching' parameter.
14692 Pass it to thread_db_free.
14693 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
14694 proper `detaching' argument to linux_remove_process.
14695 * linux-low.h (thread_db_free): Add `detaching' parameter.
14696 * thread-db.c (thread_db_init): Pass false as `detaching' argument
14697 to thread_db_free.
14698 (thread_db_free): Add `detaching' parameter. Only
14699 call td_ta_clear_event if detaching from process.
14700
75aa492e
MK
147012009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
14702
14703 * thread-db.c (thread_db_free): Fix typo.
14704
21e1bee4
PP
147052009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
14706
14707 PR gdb/10838
14708 * thread-db.c (thread_db_free): Call td_ta_clear_event.
14709
8838b45e
NS
147102009-11-03 Nathan Sidwell <nathan@codesourcery.com>
14711
14712 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
14713 with an i686 compiler.
14714 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
14715 needed.
14716 * configure: Rebuilt.
14717
8a35fb51
SL
147182009-10-29 Sandra Loosemore <sandra@codesourcery.com>
14719
14720 PR gdb/10783
14721
14722 * server.c (handle_search_memory_1): Correct read_addr initialization
14723 in loop for searching subsequent chunks.
14724
96f15937
PP
147252009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
14726
14727 * configure.ac: New --with-libthread-db option.
14728 * thread-db.c: Allow direct dependence on libthread_db.
14729 (thread_db_free): Adjust.
14730 * config.in: Regenerate.
14731 * configure: Likewise.
889bf7c5 14732
5f7d1694
PP
147332009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
14734
14735 PR gdb/10757
14736 * thread-db.c (attach_thread): New function.
14737 (maybe_attach_thread): Return success/failure.
14738 (find_new_threads_callback): Adjust.
889bf7c5
PA
14739 (thread_db_find_new_threads): Loop until no new threads.
14740
88e3b899
PA
147412009-10-13 Pedro Alves <pedro@codesourcery.com>
14742
14743 * proc-service.c (ps_lgetregs): Formatting.
14744
cdbfd419
PP
147452009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
14746
14747 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
14748 * configure.ac: Adjust.
14749 * linux-low.h (struct process_info_private): Move members to struct
14750 thread_db.
14751 (thread_db_free, thread_db_handle_monitor_command): New prototype.
14752 * linux-low.c (linux_remove_process): Adjust.
14753 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
14754 * server.c (handle_query): Move code ...
14755 (handle_monitor_command): ... here. New function.
14756 * target.h (struct target_ops): New member.
14757 * thread-db.c (struct thread_db): New.
14758 (libthread_db_search_path): New variable.
14759 (thread_db_create_event, thread_db_enable_reporting)
14760 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
14761 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
14762 (try_thread_db_load_1, dladdr_to_soname): New functions.
14763 (try_thread_db_load, thread_db_load_search): New functions.
14764 (thread_db_init): Search for libthread_db.
14765 (thread_db_free): New function.
14766 (thread_db_handle_monitor_command): Likewise.
14767 * config.in: Regenerate.
14768 * configure: Regenerate.
889bf7c5 14769
4168d2d6
UW
147702009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
14771
14772 * spu-low.c (spu_kill): Wait for inferior to terminate.
14773 Call clear_inferiors.
14774 (spu_detach): Call clear_inferiors.
14775
81ecdfbb
RW
147762009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
14777
14778 * aclocal.m4: Regenerate.
14779 * config.in: Likewise.
14780 * configure: Likewise.
14781
0b9ff2c0
UW
147822009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
14783
14784 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
14785 (parse_spufs_run): New function.
14786 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
14787 (ppc_breakpoint_at): Handle SPU breakpoints.
14788
efcbbd14
UW
147892009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
14790
14791 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
14792 (SPUFS_MAGIC): Define.
14793 (spu_enumerate_spu_ids): New function.
14794 (linux_qxfer_spu): New function.
14795 (linux_target_ops): Install linux_qxfer_spu.
14796
f4d9bade
UW
147972009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
14798
14799 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
14800 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
14801 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
14802 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
14803 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
14804 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
14805 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
14806 (init_registers_powerpc_cell32l): Add prototype.
14807 (init_registers_powerpc_cell64l): Likewise.
14808 (ppc_arch_setup): Detect Cell/B.E. architecture.
14809
96e946ca
RW
148102009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
14811
14812 * Makefile.in (datarootdir): New variable.
14813
58d6951d
DJ
148142009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
14815
14816 * linux-low.c (linux_write_memory): Update debugging output.
14817 * Makefile.in (clean): Add new descriptions.
14818 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
14819 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
14820 * configure.srv: Add new files for arm*-*-linux*.
14821 * linux-arm-low.c: Add new declarations.
14822 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
14823 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
14824 (HWCAP_VFPv3D16): New.
14825 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
14826 instead of __IWMMXT__.
14827 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
14828 (arm_arch_setup): New.
14829 (target_regsets): Remove #ifdef. Add VFP regset.
14830 (the_low_target): Use arm_arch_setup.
14831
12b42a12
DJ
148322009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
14833
14834 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
14835 the main thread again.
14836
ac8c974e
AR
148372009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
14838
14839 Adding Neutrino gdbserver.
14840 * configure: Regenerated.
14841 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
14842 * configure.srv (i[34567]86-*-nto*): New target.
14843 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
14844 * remote-utils.c [__QNX__]: Include sys/iomgr.h
14845 (nto_comctrl) [__QNX__]: New function.
14846 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
14847
4424e0c3 148482009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
14849
14850 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
14851 srv_tgtobj.
14852
912cf4ba
PA
148532009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
14854 Pedro Alves <pedro@codesourcery.com>
14855
14856 * win32-i386-low.c (i386_get_thread_context): Handle systems that
14857 don't support CONTEXT_EXTENDED_REGISTERS.
14858 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
14859 (the_low_target): Install them.
14860 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
14861 failing with ERROR_PIPE_NOT_CONNECTED.
14862
aa5ca48f
DE
148632009-06-30 Doug Evans <dje@google.com>
14864 Pierre Muller <muller@ics.u-strasbg.fr>
14865
14866 Add h/w watchpoint support to x86-linux, win32-i386.
14867 * Makefile.in (SFILES): Add i386-low.c
14868 (i386_low_h): Define.
14869 (i386-low.o): Add dependencies.
14870 (linux-x86-low.o): Add i386-low.h dependency.
14871 (win32-i386-low.o): Ditto.
14872 * i386-low.c: New file.
14873 * i386-low.h: New file.
14874 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
14875 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
14876 * linux-low.c (linux_add_process): Initialize arch_private.
14877 (linux_remove_process): Free arch_private.
14878 (add_lwp): Initialize arch_private.
14879 (delete_lwp): Free arch_private.
14880 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
14881 provided.
14882 * linux-low.h (process_info_private): New member arch_private.
14883 (lwp_info): New member arch_private.
14884 (linux_target_ops): New members new_process, new_thread,
14885 prepare_to_resume.
14886 (ptid_of): New macro.
14887 * linux-x86-low.c: Include stddef.h, i386-low.h.
14888 (arch_process_info): New struct.
14889 (arch_lwp_info): New struct.
14890 (x86_linux_dr_get, x86_linux_dr_set): New functions.
14891 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
14892 (i386_dr_low_get_status): New function.
14893 (x86_insert_point, x86_remove_point): New functions.
14894 (x86_stopped_by_watchpoint): New function.
14895 (x86_stopped_data_address): New function.
14896 (x86_linux_new_process, x86_linux_new_thread): New functions.
14897 (x86_linux_prepare_to_resume): New function.
14898 (the_low_target): Add entries for insert_point, remove_point,
14899 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
14900 prepare_to_resume.
14901 * server.c (debug_hw_points): New global.
14902 (monitor_show_help): Document set debug-hw-points.
14903 (handle_query): Process "set debug-hw-points".
14904 * server.h (debug_hw_points): Declare.
14905 (paddress): Declare.
14906 * utils.c (NUMCELLS, CELLSIZE): New macros.
14907 (get_sell, xsnprintf, paddress): New functions.
14908 * win32-arm-low.c (the_low_target): Add entries for insert_point,
14909 remove_point, stopped_by_watchpoint, stopped_data_address.
14910 * win32-i386-low.c: Include i386-low.h.
14911 (debug_reg_state): Replaces dr.
14912 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
14913 (i386_dr_low_get_status): New function.
14914 (i386_insert_point, i386_remove_point): New functions.
14915 (i386_stopped_by_watchpoint): New function.
14916 (i386_stopped_data_address): New function.
14917 (i386_initial_stuff): Update.
14918 (get_thread_context,set_thread_context,i386_thread_added): Update.
14919 (the_low_target): Add entries for insert_point,
14920 remove_point, stopped_by_watchpoint, stopped_data_address.
14921 * win32-low.c (win32_insert_watchpoint): New function.
14922 (win32_remove_watchpoint): New function.
14923 (win32_stopped_by_watchpoint): New function.
14924 (win32_stopped_data_address): New function.
14925 (win32_target_ops): Add entries for insert_watchpoint,
14926 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
14927 * win32-low.h (win32_target_ops): New members insert_point,
14928 remove_point, stopped_by_watchpoint, stopped_data_address.
14929
d993e290
PA
149302009-06-25 Pedro Alves <pedro@codesourcery.com>
14931
14932 * server.c (process_serial_event): Re-return unsupported, not
14933 error, if the type isn't recognized. Re-allow supporting only
14934 insert or remove packets. Also call require_running for
14935 breakpoints. Add missing break statement to default case. Tidy.
14936 * target.h (struct target_ops): Rename insert_watchpoint to
14937 insert_point, and remove_watchpoint to remove_point.
14938
14939 * linux-low.h (struct linux_target_ops): Likewise.
14940 * linux-low.c (linux_insert_watchpoint): Rename to ...
14941 (linux_insert_point): ... this. Adjust.
14942 (linux_remove_watchpoint): Rename to ...
14943 (linux_remove_point): ... this. Adjust.
14944 (linux_target_ops): Adjust.
14945 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
14946 (cris_insert_point): ... this.
14947 (cris_remove_watchpoint): Rename to ...
14948 (cris_remove_point): ... this.
14949 (the_low_target): Adjust.
14950
0f54c268
PM
149512009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
14952
14953 * server.c (handle_v_kill): Pass signal_pid to
14954 kill_inferior if multi_process is zero.
14955
c6314022
AR
149562009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
14957
14958 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
14959 * target.h (target_ops): Comment for *_watchpoint to make it clear
14960 the functions can get types '0' and '1'.
14961
4463ce24
AR
149622009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
14963
14964 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
14965 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
14966 * regcache.c (get_regcache): Likewise.
14967 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
14968 * win32-low.c (child_fetch_inferior_registers): Remove check for
14969 regno 0.
14970
cf8fd78b
PA
149712009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
14972 Pedro Alves <pedro@codesourcery.com>
14973
14974 * target.h (struct target_ops) <supports_multi_process>: New
14975 callback.
14976 (target_supports_multi_process): New.
14977 * server.c (handle_query): Even if GDB reports support, only
14978 enable multi-process if the target also supports it. Report
14979 multi-process support only if the target backend supports it.
14980 * linux-low.c (linux_supports_multi_process): New function.
14981 (linux_target_ops): Install it as target_supports_multi_process
14982 callback.
14983
47c0c975
DE
149842009-05-24 Doug Evans <dje@google.com>
14985
e09875d4
DE
14986 Global renaming of find_thread_pid to find_thread_ptid.
14987 * server.h (find_thread_ptid): Renamed from find_thread_pid.
14988 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
14989 All callers updated.
14990
e27d73f6
DE
14991 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
14992 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
14993 directly.
14994
47c0c975
DE
14995 * linux-low.c (get_stop_pc): Print pc if debug_threads.
14996 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
14997 (linux_resume_one_lwp): Ditto.
14998
2acc282a
DE
149992009-05-23 Doug Evans <dje@google.com>
15000
15001 * linux-low.c (linux_resume_one_lwp): Change type of first arg
15002 from struct inferior_list_entry * to struct lwp_info *.
15003 All callers updated.
15004
9f1036c1
DE
150052009-05-13 Doug Evans <dje@google.com>
15006
15007 * linux-x86-low.c: Don't include assert.h.
15008 (x86_siginfo_fixup): Use fatal, not assert.
15009 (x86_arch_setup): Fix comment.
15010
d0722149
DE
150112009-05-12 Doug Evans <dje@google.com>
15012
15013 Biarch support for i386/amd64 gdbserver.
15014 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
15015 Add linux-x86-low.c.
15016 (linux-i386-low.o, linux-x86-64-low.o): Delete.
15017 (linux-x86-low.o): Add.
15018 * linux-x86-64-low.c: Delete.
15019 * linux-i386-low.c: Delete.
15020 * linux-x86-low.c: New file.
15021 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
15022 linux-x86-low.o.
15023 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
15024 linux-x86-low.o.
15025 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
15026 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
15027 (linux_child_pid_to_exec_file): New function.
15028 (elf_64_header_p, elf_64_file_p): New functions.
15029 (siginfo_fixup): New function.
15030 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
15031 give target a chance to convert layout.
15032 * linux-low.h (linux_target_ops): New member siginfo_fixup.
15033 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
15034
fdeb2a12
DE
150352009-05-07 Doug Evans <dje@google.com>
15036
15037 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
15038 (regsets_store_inferior_registers): Ditto.
15039
a6dbe5df
PA
150402009-05-06 Pedro Alves <pedro@codesourcery.com>
15041
15042 PR server/10048
15043
15044 * linux-low.c (must_set_ptrace_flags): Delete.
15045 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
15046 of the global.
15047 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
15048 `lwp->must_set_ptrace_flags' instead.
ba42693b 15049 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
15050 (linux_wait_1): ... not here.
15051
5091eb23
DE
150522009-04-30 Doug Evans <dje@google.com>
15053
9f767825
DE
15054 * inferiors.c (started_inferior_callback): New function.
15055 (attached_inferior_callback): New function.
15056 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
15057 * server.c (print_started_pid, print_attached_pid): New functions.
15058 (detach_or_kill_for_exit): New function.
15059 (main): Call it instead of for_each_inferior (kill_inferior_callback).
15060 * server.h (have_started_inferiors_p): Declare.
15061 (have_attached_inferiors_p): Declare.
15062
5091eb23
DE
15063 * inferiors.c (remove_process): Fix memory leak, free process.
15064 * linux-low.c (linux_remove_process): New function.
15065 (linux_kill): Call it instead of remove_process.
15066 (linux_detach, linux_wait_1): Ditto.
15067
155c8968
PA
150682009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
15069
15070 * configure.srv: Add x86 Windows CE target.
15071
7fe519cb
UW
150722009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
15073
15074 * inferiors.c (get_thread_process): Make global.
15075 * server.h (get_thread_process): Add prototype.
15076 * thread-db.c (find_one_thread): Use get_thread_process
15077 instead of current_process.
15078 (thread_db_get_tls_address): Do not crash if called when
15079 thread layer is not yet initialized.
15080
5472f405
UW
150812009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
15082
15083 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
15084 * spu-low.c (current_tid): Rename to ...
15085 (current_ptid): ... this.
15086 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
15087 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
15088 ptid_get_lwp (current_ptid) instead of current_tid.
15089 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
15090 instead of current_tid. Use find_process_pid to verify pid
15091 argument is valid. Pass proper argument to remove_process.
15092 (spu_thread_alive): Compare current_ptid instead of current_tid.
15093 (spu_resume): Likewise.
15094
55ac2b99
PA
150952009-04-02 Pedro Alves <pedro@codesourcery.com>
15096
15097 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
15098 variable.
15099
95954743
PA
151002009-04-01 Pedro Alves <pedro@codesourcery.com>
15101
15102 Implement the multiprocess extensions, and add linux multiprocess
15103 support.
15104
15105 * server.h (ULONGEST): Declare.
15106 (struct ptid, ptid_t): New.
15107 (minus_one_ptid, null_ptid): Declare.
15108 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
15109 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
15110 (struct inferior_list_entry): Change `id' type from unsigned from
15111 to ptid_t.
15112 (struct sym_cache, struct breakpoint, struct
15113 process_info_private): Forward declare.
15114 (struct process_info): Declare.
15115 (current_process): Declare.
15116 (all_processes): Declare.
15117 (initialize_inferiors): Declare.
15118 (add_thread): Adjust to use ptid_t.
15119 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
15120 (add_process, remove_process, find_thread_pid): Declare.
15121 (find_inferior_id): Adjust to use ptid_t.
15122 (cont_thread, general_thread, step_thread): Change type to ptid_t.
15123 (multi_process): Declare.
15124 (push_event): Adjust to use ptid_t.
15125 (read_ptid, write_ptid): Declare.
15126 (prepare_resume_reply): Adjust to use ptid_t.
15127 (clear_symbol_cache): Declare.
15128 * inferiors.c (all_processes): New.
15129 (null_ptid, minus_one_ptid): New.
15130 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
15131 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
15132 (add_thread): Change unsigned long to ptid. Remove gdb_id
15133 parameter. Adjust.
15134 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
15135 (gdb_id_to_thread): Rename to ...
15136 (find_thread_pid): ... this. Change unsigned long to ptid.
15137 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
15138 (loaded_dll, pull_pid_from_list): Adjust.
15139 (add_process, remove_process, find_process_pid)
15140 (get_thread_process, current_process, initialize_inferiors): New.
15141 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
15142 (struct target_waitstatus) <related_pid>: Ditto.
15143 (struct target_ops) <kill, detach>: Add `pid' argument. Change
15144 return type to int.
15145 (struct target_ops) <join>: Add `pid' argument.
15146 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
15147 (struct target_ops) <wait>: Add `ptid' field. Change return type
15148 to ptid.
15149 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
15150 (mywait): Add `ptid' argument. Change return type to ptid_t.
15151 (target_pid_to_str): Declare.
15152 * target.c (set_desired_inferior): Adjust to use ptids.
15153 (mywait): Add new `ptid' argument. Adjust.
15154 (target_pid_to_str): New.
15155 * mem-break.h (free_all_breakpoints): Declare.
15156 * mem-break.c (breakpoints): Delelete.
15157 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
15158 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
15159 to use per-process breakpoint list.
15160 (free_all_breakpoints): New.
15161 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
15162 (symbol_cache, all_symbols_looked_up): Delete.
15163 (hexchars): New.
15164 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
15165 read_ptid): New.
15166 (prepare_resume_reply): Change ptid argument's type from unsigned
15167 long to ptid_t. Adjust. Implement W;process and X;process.
15168 (free_sym_cache, clear_symbol_cache): New.
15169 (look_up_one_symbol): Adjust to per-process symbol cache. *
15170 * server.c (cont_thread, general_thread, step_thread): Change type
15171 to ptid_t.
15172 (attached): Delete.
15173 (multi_process): New.
15174 (last_ptid): Change type to ptid_t.
15175 (struct vstop_notif) <ptid>: Change type to ptid_t.
15176 (queue_stop_reply, push_event): Change `ptid' argument's type to
15177 ptid_t.
15178 (discard_queued_stop_replies): Add `pid' argument.
15179 (start_inferior): Adjust to use ptids. Adjust to mywait interface
15180 changes. Don't reference the `attached' global.
15181 (attach_inferior): Adjust to mywait interface changes.
15182 (handle_query): Adjust to use ptids. Parse GDB's qSupported
15183 features. Handle and report "multiprocess+". Handle
15184 "qAttached:PID".
15185 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
15186 changes.
15187 (handle_v_kill): New.
15188 (handle_v_stopped): Adjust to use target_pid_to_str.
15189 (handle_v_requests): Allow multiple attaches and runs when
15190 multiprocess extensions are in effect. Handle "vKill".
15191 (myresume): Adjust to use ptids.
15192 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
15193 (handle_status): Adjust to discard_queued_stop_replies interface
15194 change.
15195 (first_thread_of, kill_inferior_callback)
15196 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
15197 (main): Call initialize_inferiors. Adjust to use ptids, killing
15198 and detaching from all inferiors. Handle multiprocess packet
15199 variants.
15200 * linux-low.h: Include gdb_proc_service.h.
15201 (struct process_info_private): New.
15202 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
15203 <lwpid_of>: Use ptid_get_lwp.
15204 (get_lwp_thread): Adjust.
15205 (struct lwp_info): Add `dead' member.
15206 (find_lwp_pid): Declare.
15207 * linux-low.c (thread_db_active): Delete.
15208 (new_inferior): Adjust comment.
15209 (inferior_pid): Delete.
15210 (linux_add_process): New.
15211 (handle_extended_wait): Adjust.
15212 (add_lwp): Change unsigned long to ptid.
15213 (linux_create_inferior): Add process to processes table. Adjust
15214 to use ptids. Don't set new_inferior here.
15215 (linux_attach_lwp): Rename to ...
15216 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
15217 it. Adjust to use ptids.
15218 (linux_attach_lwp): New.
15219 (linux_attach): Add process to processes table. Don't set
15220 new_inferior here.
15221 (struct counter): New.
15222 (second_thread_of_pid_p, last_thread_of_process_p): New.
15223 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
15224 multiple processes.
15225 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
15226 processes. Remove process from process table.
15227 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
15228 to multiple processes.
15229 (any_thread_of): New.
15230 (linux_detach): Add `pid' argument, and handle it. Remove process
15231 from processes table.
15232 (linux_join): Add `pid' argument. Handle it.
15233 (linux_thread_alive): Change unsighed long argument to ptid_t.
15234 Consider dead lwps as not being alive.
15235 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
15236 threads we're not interested in.
15237 (same_lwp, find_lwp_pid): New.
15238 (linux_wait_for_lwp): Change `pid' argument's type from int to
15239 ptid_t. Adjust.
15240 (linux_wait_for_event): Rename to ...
15241 (linux_wait_for_event_1): ... this. Change `pid' argument's type
15242 from int to ptid_t. Adjust.
15243 (linux_wait_for_event): New.
15244 (linux_wait_1): Add `ptid' argument. Change return type to
15245 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
15246 that exit from the process table.
15247 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
15248 Adjust.
15249 (mark_lwp_dead): New.
15250 (wait_for_sigstop): Adjust to use ptids. If a process exits while
15251 stopping all threads, mark its main lwp as dead.
15252 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
15253 ptids.
15254 (fetch_register, usr_store_inferior_registers)
15255 (regsets_fetch_inferior_registers)
15256 (regsets_store_inferior_registers, linux_read_memory)
15257 (linux_write_memory): Inline `inferior_pid'.
15258 (linux_look_up_symbols): Adjust to use per-process
15259 `thread_db_active'.
15260 (linux_request_interrupt): Adjust to use ptids.
15261 (linux_read_auxv): Inline `inferior_pid'.
15262 (initialize_low): Don't reference thread_db_active.
15263 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
15264 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
15265 (ps_getpid): Return the pid of the current inferior.
15266 * thread-db.c (proc_handle, thread_agent): Delete.
15267 (thread_db_create_event, thread_db_enable_reporting): Adjust to
15268 per-process data.
15269 (find_one_thread): Change argument type to ptid_t. Adjust to
15270 per-process data.
15271 (maybe_attach_thread): Adjust to per-process data and ptids.
15272 (thread_db_find_new_threads): Ditto.
15273 (thread_db_init): Ditto.
15274 * spu-low.c (spu_create_inferior, spu_attach): Add process to
15275 processes table. Adjust to use ptids.
15276 (spu_kill, spu_detach): Adjust interface. Remove process from
15277 processes table.
15278 (spu_join, spu_thread_alive): Adjust interface.
15279 (spu_wait): Adjust interface. Remove process from processes
15280 table. Adjust to use ptids.
15281 * win32-low.c (current_inferior_tid): Delete.
15282 (current_inferior_ptid): New.
15283 (debug_event_ptid): New.
15284 (thread_rec): Take a ptid. Adjust.
15285 (child_add_thread): Add `pid' argument. Adjust to use ptids.
15286 (child_delete_thread): Ditto.
15287 (do_initial_child_stuff): Add `attached' argument. Add process to
15288 processes table.
15289 (child_fetch_inferior_registers, child_store_inferior_registers):
15290 Adjust.
15291 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
15292 (win32_attach): Pass 1 to do_initial_child_stuff.
15293 (win32_kill): Adjust interface. Remove process from processes
15294 table.
15295 (win32_detach): Ditto.
15296 (win32_join): Adjust interface.
15297 (win32_thread_alive): Take a ptid.
15298 (win32_resume): Adjust to use ptids.
15299 (get_child_debug_event): Ditto.
15300 (win32_wait): Adjust interface. Remove exiting process from
15301 processes table.
15302
bd99dc85
PA
153032009-04-01 Pedro Alves <pedro@codesourcery.com>
15304
15305 Non-stop mode support.
15306
15307 * server.h (non_stop): Declare.
15308 (gdb_client_data, handler_func): Declare.
15309 (delete_file_handler, add_file_handler, start_event_loop):
15310 Declare.
15311 (handle_serial_event, handle_target_event, push_event)
15312 (putpkt_notif): Declare.
15313 * target.h (enum resume_kind): New.
15314 (struct thread_resume): Replace `step' field by `kind' field.
15315 (TARGET_WNOHANG): Define.
15316 (struct target_ops) <wait>: Add `options' argument.
15317 <supports_non_stop, async, start_non_stop>: New fields.
15318 (target_supports_non_stop, target_async): New.
15319 (start_non_stop): Declare.
15320 (mywait): Add `options' argument.
15321 * target.c (mywait): Add `options' argument. Print child exit
15322 notifications here.
15323 (start_non_stop): New.
15324 * server.c (non_stop, own_buf, mem_buf): New globals.
15325 (struct vstop_notif): New.
15326 (notif_queue): New global.
15327 (queue_stop_reply, push_event, discard_queued_stop_replies)
15328 (send_next_stop_reply): New.
15329 (start_inferior): Adjust to use resume_kind. Adjust to mywait
15330 interface changes.
15331 (attach_inferior): In non-stop mode, don't wait for the target
15332 here.
15333 (handle_general_set): Handle QNonStop.
15334 (handle_query): When handling qC, return the current general
15335 thread, instead of the first thread of the list.
15336 (handle_query): If the backend supports non-stop mode, include
15337 QNonStop+ in the qSupported query response.
15338 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
15339 and non-stop mode.
15340 (handle_v_attach, handle_v_run): Handle non-stop mode.
15341 (handle_v_stopped): New.
15342 (handle_v_requests): Report support for vCont;t. Handle vStopped.
15343 (myresume): Adjust to use resume_kind. Handle non-stop.
15344 (queue_stop_reply_callback): New.
15345 (handle_status): Handle non-stop mode.
15346 (main): Clear non_stop flag on reconnection. Use the event-loop.
15347 Refactor serial protocol handling from here ...
15348 (process_serial_event): ... to this new function. When GDB
15349 selects any thread, select one here. In non-stop mode, wait until
15350 GDB acks all pending events before exiting.
15351 (handle_serial_event, handle_target_event): New.
15352 * remote-utils.c (remote_open): Install remote_desc in the event
15353 loop.
15354 (remote_close): Remove remote_desc from the event loop.
15355 (putpkt_binary): Rename to...
15356 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
15357 (putpkt_binary): New as wrapper around putpkt_binary_1.
15358 (putpkt_notif): New.
15359 (prepare_resume_reply): In non-stop mode, don't change the
15360 general_thread.
15361 * event-loop.c: New.
15362 * Makefile.in (OBJ): Add event-loop.o.
15363 (event-loop.o): New rule.
15364
15365 * linux-low.h (pid_of): Moved here.
15366 (lwpid_of): New.
15367 (get_lwp_thread): Use lwpid_of.
15368 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
15369 * linux-low.c (pid_of): Delete.
15370 (inferior_pid): Use lwpid_of.
15371 (linux_event_pipe): New.
15372 (target_is_async_p): New.
15373 (delete_lwp): New.
15374 (handle_extended_wait): Use lwpid_of.
15375 (add_lwp): Don't set lwpid field.
15376 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
15377 (linux_kill_one_lwp): If killing a running lwp, stop it first.
15378 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
15379 (linux_detach_one_lwp): If detaching from a running lwp, stop it
15380 first. Adjust to linux_wait_for_event interface changes. Use
15381 lwpid_of.
15382 (linux_detach): Don't delete the main lwp here.
15383 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
15384 (status_pending_p): Don't consider explicitly suspended lwps.
15385 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
15386 pointer. Add OPTIONS argument. Change return type to int. Use
15387 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
15388 (linux_wait_for_event): Take an integer pid instead of a lwp_info
15389 pointer. Add status pointer argument. Return a pid instead of a
15390 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
15391 changes. In non-stop mode, don't switch to a random thread.
15392 (linux_wait): Rename to...
15393 (linux_wait_1): ... this. Add target_options argument, and handle
15394 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
15395 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
15396 clean exit and signal exit code. Don't stop all threads in
15397 non-stop mode. In all-stop mode, only stop all threads when
15398 reporting a stop to GDB. Handle explicit thread stop requests.
15399 (async_file_flush, async_file_mark): New.
15400 (linux_wait): New.
15401 (send_sigstop): Use lwpid_of.
15402 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
15403 interface changes. In non-stop mode, don't switch to a random
15404 thread.
15405 (linux_resume_one_lwp): Use lwpid_of.
15406 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
15407 (linux_resume_one_thread): ... this. Handle resume_stop. In
15408 non-stop mode, don't look for pending flag in all threads.
15409 (resume_status_pending_p): Don't consider explicitly suspended
15410 threads.
15411 (my_waitpid): Reimplement. Emulate __WALL.
15412 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
15413 Use lwpid_of.
15414 (sigchld_handler, linux_supports_non_stop, linux_async)
15415 (linux_start_non_stop): New.
15416 (linux_target_ops): Register linux_supports_non_stop, linux_async
15417 and linux_start_non_stop.
15418 (initialize_low): Install SIGCHLD handler.
15419 * thread-db.c (thread_db_create_event, find_one_thread)
15420 (thread_db_get_tls_address): Use lwpid_of.
15421 * win32-low.c (win32_detach): Adjust to use resume_kind.
15422 (win32_wait): Add `options' argument.
15423 * spu-low.c (spu_resume): Adjust to use resume_kind.
15424 (spu_wait): Add `options' argument.
15425
5b1c542e
PA
154262009-04-01 Pedro Alves <pedro@codesourcery.com>
15427
15428 Decouple target code from remote protocol.
15429
15430 * target.h (enum target_waitkind): New.
15431 (struct target_waitstatus): New.
15432 (struct target_ops) <wait>: Return an unsigned long. Take a
15433 target_waitstatus pointer instead of a char pointer.
15434 (mywait): Likewise.
15435 * target.c (mywait): Change prototype to return an unsigned long.
15436 Take a target_waitstatus pointer instead of a char pointer. Adjust.
15437 * server.h (thread_from_wait, old_thread_from_wait): Delete
15438 declarations.
15439 (prepare_resume_reply): Change prototype to take a
15440 target_waitstatus.
15441 * server.c (thread_from_wait, old_thread_from_wait): Delete.
15442 (last_status, last_ptid): New.
15443 (start_inferior): Remove "statusptr" argument. Adjust. Return a
15444 pid instead of a signal.
15445 (attach_inferior): Remove "status" and "signal" parameters.
15446 Adjust.
15447 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
15448 not as an address.
15449 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
15450 (handle_v_requests, myresume): Remove "status" and "signal"
15451 parameters. Adjust.
15452 (handle_status): New.
15453 (main): Delete local `status'. Adjust.
15454 * remote-utils.c: Include target.h.
15455 (prepare_resume_reply): Change prototype to take a
15456 target_waitstatus. Adjust.
15457
15458 * linux-low.c (linux_wait): Adjust to new target_ops->wait
15459 interface.
15460 * spu-low.c (spu_wait): Adjust.
15461 * win32-low.c (enum target_waitkind, struct target_waitstatus):
15462 Delete.
15463 (win32_wait): Adjust.
15464
2bd7c093
PA
154652009-04-01 Pedro Alves <pedro@codesourcery.com>
15466
15467 * target.h (struct thread_resume): Delete leave_stopped member.
15468 (struct target_ops): Add a `n' argument to the `resume' callback.
15469 * server.c (start_inferior): Adjust.
15470 (handle_v_cont, myresume): Adjust.
15471 * linux-low.c (check_removed_breakpoint): Adjust to resume
15472 interface change, and to removed leave_stopped field.
15473 (resume_ptr): Delete.
15474 (struct thread_resume_array): New.
15475 (linux_set_resume_request): Add new `arg' parameter. Adjust to
15476 resume interface change.
15477 (linux_continue_one_thread, linux_queue_one_thread)
15478 (resume_status_pending_p): Check if the resume field is NULL
15479 instead of checking the leave_stopped member.
15480 (linux_resume): Adjust to the target resume interface change.
15481 * spu-low.c (spu_resume): Adjust to the target resume interface
15482 change.
15483 * win32-low.c (win32_detach, win32_resume): Ditto.
15484
c35fafde
PA
154852009-04-01 Pedro Alves <pedro@codesourcery.com>
15486
15487 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
15488 flag.
15489 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
15490 pending.
15491 (linux_continue_one_thread): Only preserve the stepping flag if
15492 there's a pending breakpoint.
15493
0a59d50b
PA
154942009-03-31 Pedro Alves <pedro@codesourcery.com>
15495
15496 * server.c (main): After the inferior having exited, call
15497 remote_close before exiting gdbserver.
15498
f04c6d38
TJB
154992009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
15500
15501 Fix size of FPSCR in Power 7 processors.
15502 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
15503 (PPC_FEATURE_HAS_DFP): New #define.
15504 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
15505 size of the FPSCR.
15506
78e5cee6
PA
155072009-03-23 Pedro Alves <pedro@codesourcery.com>
15508
15509 * server.c (handle_query) Whitespace and formatting.
15510
1b3f6016
PA
155112009-03-22 Pedro Alves <pedro@codesourcery.com>
15512
15513 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
15514 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
15515 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
15516 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
15517 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
15518 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
15519 Makefile.in, configure.ac: Fix whitespace throughout.
15520 * configure: Regenerate.
15521
a07b2135
PA
155222009-03-22 Pedro Alves <pedro@codesourcery.com>
15523
15524 * inferiors.c (find_inferior): Make it safe for the callback
15525 function to delete the currently iterated inferior.
15526
67cc2626
PA
155272009-03-22 Pedro Alves <pedro@codesourcery.com>
15528
15529 * Makefile.in (linuw_low_h): Move higher.
15530 (thread-db.o): Depend on $(linux_low_h).
15531
54a0b537
PA
155322009-03-17 Pedro Alves <pedro@codesourcery.com>
15533
15534 Rename "process" to "lwp" throughout.
15535
15536 * linux-low.c (all_processes): Rename to...
15537 (all_lwps): ... this.
15538 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
15539 (add_process): Rename to ...
15540 (add_lwp): ... this. Adjust.
15541 (linux_create_inferior): Adjust.
15542 (linux_attach_lwp): Adjust.
15543 (linux_attach): Adjust.
15544 (linux_kill_one_process): Rename to ...
15545 (linux_kill_one_lwp): ... this. Adjust.
15546 (linux_kill): Adjust.
15547 (linux_detach_one_process): Rename to ...
15548 (linux_detach_one_lwp): ... this. Adjust.
15549 (linux_detach): Adjust.
15550 (check_removed_breakpoint): Adjust.
15551 (status_pending_p): Adjust.
15552 (linux_wait_for_process): Rename to ...
15553 (linux_wait_for_lwp): ... this. Adjust.
15554 (linux_wait_for_event): Adjust.
15555 (send_sigstop): Adjust.
15556 (wait_for_sigstop): Adjust.
15557 (stop_all_processes): Rename to ...
15558 (stop_all_lwps): ... this.
15559 (linux_resume_one_process): Rename to ...
15560 (linux_resume_one_lwp): ... this. Adjust.
15561 (linux_set_resume_request, linux_continue_one_thread)
15562 (linux_queue_one_thread, resume_status_pending_p)
15563 (usr_store_inferior_registers, regsets_store_inferior_registers)
15564 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
15565 Adjust.
15566 * linux-low.h (get_process): Rename to ...
15567 (get_lwp): ... this. Adjust.
15568 (get_thread_process): Rename to ...
15569 (get_thread_lwp): ... this. Adjust.
15570 (get_process_thread): Rename to ...
15571 (get_lwp_thread): ... this. Adjust.
15572 (struct process_info): Rename to ...
15573 (struct lwp_info): ... this.
15574 (all_processes): Rename to ...
15575 (all_lwps): ... this.
15576 * proc-service.c (ps_lgetregs): Adjust.
15577 * thread-db.c (thread_db_create_event, find_one_thread)
15578 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
15579
0b16c5cf
PA
155802009-03-14 Pedro Alves <pedro@codesourcery.com>
15581
15582 * server.c (handle_query): Handle "qAttached".
15583
32de4b9d
NS
155842009-03-13 Nathan Sidwell <nathan@codesourcery.com>
15585
15586 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
15587 GPLv3, update license URL.
15588
2aecd87f
DE
155892009-03-01 Doug Evans <dje@google.com>
15590
93efd302 15591 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
15592 (server_h): Add gdb_signals.h.
15593 (signals.o): Update.
15594 * server.h (target_signal_from_host,target_signal_to_host_p)
15595 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
15596
86b1f9c5
PM
155972009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
15598
15599 * remote-utils.c (getpkt): Also generate remote-debug
15600 information if noack_mode is set.
15601
4aa995e1
PA
156022009-02-06 Pedro Alves <pedro@codesourcery.com>
15603
15604 * server.c (handle_query): Report qXfer:siginfo:read and
15605 qXfer:siginfo:write as supported and handle them.
15606 * target.h (struct target_ops) <qxfer_siginfo>: New field.
15607 * linux-low.c (linux_xfer_siginfo): New.
15608 (linux_target_ops): Set it.
15609
62709adf
PA
156102009-01-26 Pedro Alves <pedro@codesourcery.com>
15611
15612 * server.c (gdbserver_usage): Mention --remote-debug.
15613 (main): Accept '--remote-debug' switch.
15614
aef93bd7
DE
156152009-01-18 Doug Evans <dje@google.com>
15616
15617 * regcache.c (new_register_cache): No need to check result of xcalloc.
15618 * server.c (handle_search_memory): Back out calls to xmalloc,
15619 result is checked and error is returned to user upon failure.
15620 (handle_query): Ditto. Add more checks for result of malloc.
15621 (handle_v_cont): Check result of malloc, report error back to
15622 user upon failure.
15623 (handle_v_run): Ditto. Call freeargv.
15624 * server.h (freeargv): Declare.
15625 * utils.c (freeargv): New fn.
15626
54363045
DE
156272009-01-15 Doug Evans <dje@google.com>
15628
f626972c
DE
15629 * gdbreplay.c (perror_with_name): Make arg const char *.
15630 * server.h (target_signal_to_name): Make return type const char *.
0842e787 15631 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 15632 * utils.c (perror_with_name): Make arg const char *.
54363045 15633
18aae699
PA
156342009-01-14 Pedro Alves <pedro@codesourcery.com>
15635
15636 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
15637 when handling a EXIT_PROCESS_DEBUG_EVENT.
15638
ff703abe
JB
156392009-01-06 Joel Brobecker <brobecker@adacore.com>
15640
15641 * gdbreplay.c (gdbreplay_version): Update copyright year.
15642 * server.c (gdbserver_version): Likewise.
15643
f21cc1a2 156442009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
15645
15646 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 15647 (handle_extended_wait): Improve comment.
0e21c1ec 15648
bca929d3
DE
156492008-12-13 Doug Evans <dje@google.com>
15650
15651 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
15652 * server.h (ATTR_MALLOC): New macro.
15653 (xmalloc,xcalloc,xstrdup): Declare.
15654 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
15655 * inferiors.c: Ditto.
15656 * linux-low.c: Ditto.
15657 * mem-break.c: Ditto.
15658 * regcache.c: Ditto.
15659 * remote-utils.c: Ditto.
15660 * server.c: Ditto.
15661 * target.c: Ditto.
15662 * win32-low.c: Ditto.
15663
97438e3f
DE
156642008-12-12 Doug Evans <dje@google.com>
15665
896c7fbb
DE
15666 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
15667 in debugging printf.
15668
97438e3f
DE
15669 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
15670
e3b886f8
DE
156712008-12-09 Doug Evans <dje@google.com>
15672
15673 * linux-low.h (struct process_info): Delete member tid, unused.
15674 * thread-db.c (find_one_thread): Update.
15675 (maybe_attach_thread): Update.
15676
07e059b5
VP
156772008-12-02 Pedro Alves <pedro@codesourcery.com>
15678
889bf7c5
PA
15679 * target.h (struct target_ops): Add qxfer_osdata member.
15680 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
15681 and dirent.h.
15682 (linux_qxfer_osdata): New functions.
15683 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
15684 callback.
15685 * server.c (handle_query): Handle "qXfer:osdata:read:".
15686 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
15687 (buffer_xml_printf): New functions.
15688 * server.h (struct buffer): New.
15689 (buffer_grow_str, buffer_grow_str0): New macros.
15690 (buffer_grow, buffer_free, buffer_init, buffer_finish)
15691 (buffer_xml_printf): Declare.
07e059b5 15692
4cab47ab
DE
156932008-11-24 Doug Evans <dje@google.com>
15694
15695 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
15696
f142445f
DJ
156972008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
15698
15699 * server.c (handle_v_run): Always use the supplied argument list.
15700
d0107bb6 157012008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 15702
d0107bb6
BW
15703 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
15704 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 15705
2c4ad781
TJB
157062008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
15707
15708 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
15709 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
15710 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
15711 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
15712 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
15713 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
15714 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
15715 XML target descriptions.
15716 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
15717 when inferior is running on an ISA 2.05 or later processor. Add
15718 special case to return offset for full 64-bit slot of FPSCR when
15719 in 32-bits.
15720
dfb64f85
DJ
157212008-11-14 Daniel Gutson <dgutson@codesourcery.com>
15722
15723 * Makefile.in (SFILES, clean): Added sparc64 files.
15724 (reg-sparc64.o, reg-sparc64.c): New.
15725 * configure.srv (sparc*-*-linux*): New configuration.
15726 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
15727 syscall arguments for SPARC.
15728 (regsets_store_inferior_registers): Likewise.
15729 * linux-sparc-low.c: New file.
15730
66b6e1dd
DE
157312008-10-21 Doug Evans <dje@google.com>
15732
15733 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
15734 (READLINE_DIR,READLINE_DEP): Delete.
15735 (INTERNAL_CFLAGS): Update.
15736 (LINTFLAGS): Update.
15737
9b710a42
PA
157382008-10-10 Pedro Alves <pedro@codesourcery.com>
15739
15740 * server.c (handle_v_run): If GDB didn't specify an argv, use the
15741 whole argv from the last run, not just argv[0].
15742
5822d809
PA
157432008-09-08 Pedro Alves <pedro@codesourcery.com>
15744
15745 * regcache.c (new_register_cache): Return NULL if the register
15746 cache size isn't known yet.
15747 (free_register_cache): Avoid dereferencing a NULL regcache.
15748
74aac56f
DJ
157492008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
15750
15751 * configure.srv: Merge MIPS and MIPS64.
15752
400b20f5
MR
157532008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
15754
15755 * Makefile.in (uninstall): Apply $(EXEEXT) too.
15756
677c5bb1
LM
157572008-08-18 Luis Machado <luisgpm@br.ibm.com>
15758
15759 * Makefile.in: Add required vsx dependencies.
15760
15761 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
15762 Declare init_registers_powerpc_vsx32l.
15763 Declare init_registers_powerpc_vsx64l.
15764 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
15765 (ppc_arch_setup): Check for VSX in hwcap.
15766 (ppc_fill_vsxregset): New function.
15767 (ppc_store_vsxregset): New function.
15768 Add new VSX entry in regset_info target_regsets.
15769
15770 * configure.srv: Add new VSX dependencies.
15771
a6f3e723
SL
157722008-08-12 Pedro Alves <pedro@codesourcery.com>
15773
15774 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
15775 (remote_open): Set or clear transport_is_reliable.
15776 (putpkt_binary): Don't expect acks in noack mode.
15777 (getpkt): Don't send ack/nac in noack mode.
15778 * server.c (handle_general_set): Handle QStartNoAckMode.
15779 (handle_query): If connected by tcp pass QStartNoAckMode+ in
15780 qSupported.
15781 (main): Reset noack_mode on every connection.
15782 * server.h (noack_mode): Declare.
15783
a417dc56
RW
157842008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
15785
15786 * Makefile.in (GDBREPLAY_OBS): New variable.
15787 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
15788
3221518c
UW
157892008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
15790 Daniel Jacobowitz <dan@codesourcery.com>
15791
15792 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
15793 (usr_store_inferior_registers): Likewise.
15794 (regsets_store_inferior_registers): Likewise.
15795
ec56be1b
PA
157962008-07-31 Rolf Jansen <rj@surtec.com>
15797 Pedro Alves <pedro@codesourcery.com>
15798
15799 * configure.ac: Check for memmem declaration.
15800 * server.c [HAVE_MALLOC_H]: Include malloc.h.
15801 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
15802 (disable_packet_qfThreadInfo): Unconditionally compile.
15803 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
15804 * configure, config.in: Regenerate.
15805
2fe5e3ff
DE
158062008-07-28 Doug Kwan <dougkwan@google.com>
15807
15808 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
15809 (linux_write_memory): Remove declaration of errno.
15810
836acd6d
UW
158112008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
15812
15813 * linux-low.c (handle_extended_wait): Do not use "status"
15814 variable uninitialized.
15815
aeba519e
PA
158162008-07-07 Pedro Alves <pedro@codesourcery.com>
15817
15818 * server.c (handle_v_attach): Inhibit reporting dll changes.
15819
db42f210
PA
158202008-06-27 Pedro Alves <pedro@codesourcery.com>
15821
15822 * remote-utils.c (prepare_resume_reply): If requested, don't
15823 output "thread:TID" in the T stop reply.
15824
15825 * server.c (disable_packet_vCont, disable_packet_Tthread)
15826 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
15827 (handle_query): If requested, disable support for qC, qfThreadInfo
15828 and qsThreadInfo.
15829 (handle_v_requests): If requested, disable support for vCont.
15830 (gdbserver_show_disableable): New.
15831 (main): Handle --disable-packet and --disable-packet=LIST.
15832
15833 * server.h (disable_packet_vCont, disable_packet_Tthread)
15834 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
15835
8e4c5421
CD
158362008-06-20 Carlos O'Donell <carlos@codesourcery.com>
15837
15838 * server.c (gdbserver_usage): Mention --version.
15839
6e23a804
DJ
158402008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
15841
15842 * Makefile.in (gdbreplay.o): New rule.
15843
90aa6a40
JM
158442008-06-06 Joseph Myers <joseph@codesourcery.com>
15845
15846 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
15847 message, not gdbserver.
15848
c16158bc 158492008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
15850 Nathan Sidwell <nathan@codesourcery.com>
15851 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
15852
15853 * acinclude.m4: Include ../../config/acx.m4.
15854 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
15855 * configure, config.in: Regenerate.
15856 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
15857 * server.c (gdbserver_version): Print PKGVERSION.
15858 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
15859 (main): Adjust gdbserver_usage calls.
15860 * gdbreplay.c (version, host_name): Add declarations.
15861 (gdbreplay_version, gdbreplay_usage): New.
15862 (main): Accept --version and --help options.
15863
aeb75bf5
DJ
158642008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
15865
15866 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
15867 (arm_breakpoint_at): Handle Thumb.
15868 (the_low_target): Add comment.
15869
76b233dd
UW
158702008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
15871
15872 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
15873
08388c79
DE
158742008-05-09 Doug Evans <dje@google.com>
15875
a3c83fae
DE
15876 * server.h (decode_search_memory_packet): Declare.
15877 * remote-utils.c (decode_search_memory_packet): New fn.
15878 * server.c (handle_search_memory_1): New fn.
08388c79
DE
15879 (handle_search_memory): New fn.
15880 (handle_query): Process qSearch:memory packets.
15881
bb9c3d36
UW
158822008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
15883
15884 * regcache.c (registers_length): Remove.
15885 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
15886 full register packet.
15887 * regcache.h (registers_length): Remove prototype.
15888 * server.h (PBUFSIZ): Define to 16384.
15889
7284e1be
UW
158902008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
15891
15892 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
15893 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
15894 powerpc-64l.o, and powerpc-altivec64l.o.
15895 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
15896 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
15897 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
15898 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
15899 rs6000/power-linux.xml, and rs6000/power64-linux.xml
15900 to srv_xmlfiles.
15901
15902 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
15903 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
15904 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
15905 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
15906 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
15907 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
15908 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
15909 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
15910 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
15911 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
15912 (clean): Update.
15913
15914 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
15915 (init_registers_powerpc_32l): ... this new prototype.
15916 (init_registers_powerpc_32): Remove, replace by ...
15917 (init_registers_powerpc_altivec32l): ... this new prototype.
15918 (init_registers_powerpc_e500): Remove, replace by ...
15919 (init_registers_powerpc_e500l): ... this new prototype.
15920 (init_registers_ppc64): Remove, replace by ...
15921 (init_registers_powerpc_64l): ... this new prototype.
15922 (init_registers_powerpc_64): Remove, replace by ...
15923 (init_registers_powerpc_altivec64l): ... this new prototype.
15924 (ppc_num_regs): Set to 73.
15925 (PT_ORIG_R3, PT_TRAP): Define if necessary.
15926 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
15927 (ppc_cannot_store_register): Handle orig_r3 and trap.
15928 (ppc_arch_setup): Update init_registers_... calls.
15929 (ppc_fill_gregset): Handle orig_r3 and trap.
15930
15931 * inferiors.c (clear_inferiors): Reset current_inferior.
15932
fdc59709
PB
159332008-04-23 Paolo Bonzini <bonzini@gnu.org>
15934
889bf7c5
PA
15935 * acinclude.m4: Add override.m4.
15936 * configure: Regenerate.
fdc59709 15937
c9b2f845
UW
159382008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
15939
15940 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
15941 initial call to init_register_ppc64.
15942
550512b8
UW
159432008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
15944
43aaf8b6
PA
15945 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
15946 single powerpc*-*-linux* case.
550512b8
UW
15947 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
15948
b6430ec3
UW
159492008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
15950
15951 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 15952 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
15953 from reg_xmlfiles.
15954 * linux-ppc-low.c: Include <elf.h>.
15955 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
15956 (ppc_hwcap): New global variable.
15957 (ppc_regmap): Remove __SPE__ #ifdef sections.
15958 (ppc_regmap_e500): New global variable.
15959 (ppc_cannot_store_register): Update __SPE__ special case.
15960 (ppc_get_hwcap): New function.
15961 (ppc_arch_setup): Use it to determine whether inferior supports
15962 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
15963 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
15964 Do not access registers if target does not support AltiVec.
15965 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
15966 Do not access registers if target does not support SPE.
15967 (target_regsets): Unconditionally include AltiVec and SPE regsets.
15968
52fa2412
UW
159692008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
15970
15971 * linux-low.c (disabled_regsets, num_regsets): New.
15972 (use_regsets_p): Delete.
15973 (linux_wait_for_process): Clear disabled_regsets.
15974 (regsets_fetch_inferior_registers): Check and set it.
15975 (regsets_store_inferior_registers): Likewise.
15976 (linux_fetch_registers, linux_store_registers): Do not use
15977 use_regsets_p.
15978 (initialize_low): Allocate disabled_regsets.
15979
e28b3332
DJ
159802008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
15981
15982 * Makefile.in (LIBOBJS): New.
15983 (OBS): Use LIBOBJS.
15984 (memmem.o): New rule.
15985 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
15986 * configure: Regenerated.
15987
4536995d
UW
159882008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
15989
15990 * server.c (handle_query): Never return "unsupported" for
15991 qXfer:features:read queries.
15992
221c031f
UW
159932008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
15994
15995 * server.c (get_features_xml): Fix inverted condition.
15996 (handle_query): Always support qXfer:feature:read.
15997
ccd213ac
DJ
159982008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
15999
16000 * server.c (wrapper_argv): New.
16001 (start_inferior): Handle wrapper_argv. If set, expect an extra
16002 trap.
16003 (gdbserver_usage): Document --wrapper.
16004 (main): Parse --wrapper.
16005
6fe305f7
UW
160062008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
16007
16008 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
16009 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
16010 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
16011 (ppc_set_pc): Likewise.
16012 (ppc_arch_setup): New function.
16013 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
16014 of collect_register.
889bf7c5 16015 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 16016
5b0a002e
UW
160172008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
16018
16019 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
16020 instead of linux-ppc64-low.o.
16021 * linux-ppc64-low.c: Remove file.
16022 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
16023 (linux-ppc64-low.o): Remove rule.
16024
16025 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
16026 (init_registers_powerpc_64): Likewise.
16027 (ppc_regmap): Conditionally define depending on __powerpc64__.
16028 (ppc_cannot_store_register): Do not special-case "fpscr" when
16029 compiled on __powerpc64__.
16030 (ppc_collect_ptrace_register): New function.
16031 (ppc_supply_ptrace_register): New function.
16032 (ppc_breakpoint): Change type to "unsigned int".
16033 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
16034 (the_low_target): Conditionally provide initializers for the
889bf7c5 16035 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
16036 collect_ptrace_register and supply_ptrace_register members.
16037
9b4b61c8
UW
160382008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
16039
16040 * regcache.h (gdbserver_xmltarget): Add extern declaration.
16041 * server.c (gdbserver_xmltarget): Define.
16042 (get_features_xml): Use it to replace "target.xml" and arch_string.
16043
16044 * configure.srv: Remove srv_xmltarget. Add XML files that were
16045 mentioned there to srv_xmlfiles instead. Remove conditional tests
16046 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
16047 srv_xmlfiles and srv_regobj to include all possible choices.
16048 * configure.ac (srv_xmltarget): Remove.
16049 (srv_xmlfiles): Do not add "target.xml".
16050 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
16051 checks for supplementary target information.
16052 * configure: Regenerate.
16053 * Makefile.in (XML_TARGET): Remove.
16054 (target.xml): Remove rule.
16055 (clean): Do not clean up target.xml.
16056 (.PRECIOUS): Do not mention target.xml.
16057
16058 * target.h (struct target_ops): Remove arch_string member.
16059 * linux-low.c (linux_arch_string): Remove.
16060 (linux_target_ops): Remove arch_string initializer.
16061 * linux-low.h (struct linux_target_ops): Remove arch_string member.
16062 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
16063 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
16064 * spu-low.c (spu_arch_string): Remove.
16065 (spu_target_ops): Remove arch_string initializer.
16066 * win32-low.c (win32_arch_string): Remove.
16067 (win32_target_ops): Remove arch_string initializer.
16068 * win32-low.h (struct win32_target_ops): Remove arch_string member.
16069 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
16070 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
16071
ee1a7ae4
UW
160722008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
16073
16074 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
16075 by collect_ptrace_register and supply_ptrace_register hooks.
16076 * linux-low.c (fetch_register): Use supply_ptrace_register callback
16077 instead of checking for the_low_target.left_pad_xfer.
16078 (usr_store_inferior_registers): Use collect_ptrace_register callback
16079 instead of checking for the_low_target.left_pad_xfer.
16080
16081 * linux-s390-low.c (s390_collect_ptrace_register): New function.
16082 (s390_supply_ptrace_register): Likewise.
16083 (s390_fill_gregset): Call s390_collect_ptrace_register.
16084 (the_low_target): Update.
16085
16086 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
16087 (ppc_supply_ptrace_register): Likewise.
16088 (the_low_target): Update.
16089
16090 * linux-i386-low.c (the_low_target): Update.
16091 * linux-x86-64-low.c (the_low_target): Update.
16092
d61ddec4
UW
160932008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
16094
16095 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
16096 reg-s390.o and reg-s390x.o.
16097
16098 * linux-low.c (new_inferior): New global variable.
16099 (linux_create_inferior, linux_attach): Set it.
16100 (linux_wait_for_process): Call the_low_target.arch_setup after the
16101 target has stopped for the first time.
16102 (initialize_low): Do not call the_low_target.arch_setup.
16103
16104 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
16105 (s390_set_pc): Likewise.
16106 (s390_arch_setup): New function.
16107 (the_low_target): Use s390_arch_setup as arch_setup routine.
16108
16109 * regcache.c (realloc_register_cache): New function.
16110 (set_register_cache): Call it for each existing regcache.
16111
d05b4ac3
UW
161122008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
16113
16114 * server.h (init_registers): Remove prototype.
16115
16116 * linux-low.h (struct linux_target_ops): Add arch_setup field.
16117 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
16118 instead of init_registers ().
16119 * linux-arm-low.c (init_registers_arm): Add prototype.
16120 (init_registers_arm_with_iwmmxt): Likewise.
16121 (the_low_target): Add initializer for arch_setup field.
16122 * linux-cris-low.c (init_registers_cris): Add prototype.
16123 (the_low_target): Add initializer for arch_setup field.
16124 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
16125 (the_low_target): Add initializer for arch_setup field.
16126 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
16127 (the_low_target): Add initializer for arch_setup field.
16128 * linux-ia64-low.c (init_registers_ia64): Add prototype.
16129 (the_low_target): Add initializer for arch_setup field.
16130 * linux-m32r-low.c (init_registers_m32r): Add prototype.
16131 (the_low_target): Add initializer for arch_setup field.
16132 * linux-m68k-low.c (init_registers_m68k): Add prototype.
16133 (the_low_target): Add initializer for arch_setup field.
16134 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
16135 (init_registers_mips64_linux): Likewise.
16136 (the_low_target): Add initializer for arch_setup field.
16137 * linux-ppc-low.c (init_registers_ppc): Add prototype.
16138 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
16139 (the_low_target): Add initializer for arch_setup field.
16140 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
16141 (init_registers_powerpc_64): Likewise.
16142 (the_low_target): Add initializer for arch_setup field.
16143 * linux-s390-low.c (init_registers_s390): Add prototype.
16144 (init_registers_s390x): Likewise.
16145 (the_low_target): Add initializer for arch_setup field.
16146 * linux-sh-low.c (init_registers_sh): Add prototype.
16147 (the_low_target): Add initializer for arch_setup field.
16148 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
16149 (the_low_target): Add initializer for arch_setup field.
16150 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
16151 (the_low_target): Add initializer for arch_setup field.
16152
16153 * win32-low.h (struct win32_target_ops): Add arch_setup field.
16154 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
16155 instead of init_registers ().
16156 * win32-arm-low.c (init_registers_arm): Add prototype.
16157 (the_low_target): Add initializer for arch_setup field.
16158 * win32-i386-low.c (init_registers_i386): Add prototype.
16159 (the_low_target): Add initializer for arch_setup field.
16160
16161 * spu-low.c (init_registers_spu): Add prototype.
16162 (initialize_low): Call initialie_registers_spu () instead of
16163 initialize_registers ().
16164
fd96d250
PA
161652008-02-19 Pedro Alves <pedro@codesourcery.com>
16166
16167 * server.c (handle_v_requests): When handling the vRun and vAttach
16168 packets, if already debugging a process, don't kill it. Return an
16169 error instead.
16170
d41b6bb4
DJ
161712008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
16172
16173 * server.c (handle_query): Correct length check.
16174
5ac588cf
PA
161752008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
16176
16177 * win32-low.c (do_initial_child_stuff): Add process handle
16178 parameter. Set current_process_handle and current_process_id from the
16179 parameters. Clear globals.
16180 (win32_create_inferior): Don't set current_process_handle and
16181 current_process_id here. Instead pass them on the call to
16182 do_initial_child_stuff.
16183 (win32_attach): Likewise.
16184 (win32_clear_inferiors): New.
16185 (win32_kill): Don't close the current process handle or the
16186 current thread handle here. Instead call win32_clear_inferiors.
16187 (win32_detach): Don't open a new handle to the process. Call
16188 win32_clear_inferiors.
16189 (win32_join): Don't rely on current_process_handle; open a new
16190 handle using the process id.
16191 (win32_wait): Call win32_clear_inferiors when the inferior process
16192 has exited.
16193
ecd7ecbc
DJ
161942008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
16195
16196 * server.c (monitor_show_help): Add "exit".
16197
1525d545
MG
161982008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
16199
ecd7ecbc 16200 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
16201 (clean): Add reg-xtensa.c.
16202 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
16203 * configure.srv (xtensa*-*-linux*) New target.
16204 * linux-xtensa-low.c: New.
16205 * xtensa-xtregs.c: New.
1525d545 16206
59a016f0
PA
162072008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
16208
16209 * hostio.c: Don't include errno.h.
16210 (errno_to_fileio_errno): Move to hostio-errno.
16211 * hostio.c: (hostio_error): Remove the error parameter. Defer the
16212 error number outputting to the target->hostio_last_error callback.
16213 (hostio_packet_error): Use FILEIO_EINVAL directly.
16214 (handle_open, handle_pread, hostio_error, handle_unlink): Update
16215 calls to hostio_error.
16216 * hostio-errno.c: New.
16217 * server.h (hostio_last_error_from_errno): Declare.
16218 * target.h (target_ops): Add hostio_last_error member.
16219 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
16220 as hostio_last_error handler.
889bf7c5 16221 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
16222 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
16223 (wince_hostio_last_error): New functions.
16224 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
16225 as hostio_last_error handler.
16226 (win32_target_ops) [!_WIN32_WCE]: Register
16227 hostio_last_error_from_errno as hostio_last_error handler.
16228 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
16229 (hostio-errno.o): New rule.
16230 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
16231 * configure.srv (srv_hostio_err_objs): New variable. Default to
16232 hostio-errno.o.
16233 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
16234 * configure: Regenerate.
16235
2d717e4f
DJ
162362008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
16237
16238 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
16239 (linux_kill, linux_detach): Clean up the process list.
16240 * remote-utils.c (remote_open): Improve port number parsing.
16241 (putpkt_binary, input_interrupt): Only send interrupts if the target
16242 is running.
16243 * server.c (extended_protocol): Make static.
16244 (attached): Define earlier.
16245 (exit_requested, response_needed, program_argv): New variables.
16246 (target_running): New.
16247 (start_inferior): Clear attached here.
16248 (attach_inferior): Set attached here.
16249 (require_running): Define.
16250 (handle_query): Use require_running and target_running. Implement
16251 "monitor exit".
16252 (handle_v_attach, handle_v_run): New.
16253 (handle_v_requests): Use require_running. Handle vAttach and vRun.
16254 (gdbserver_usage): Update.
16255 (main): Redo argument parsing. Handle --debug and --multi. Handle
16256 --attach along with other options or after the port. Save
16257 program_argv. Support no initial program. Resynchronize
16258 communication with GDB after an error. Handle "monitor exit".
16259 Use require_running and target_running. Always allow the extended
16260 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
16261 restart in extended mode.
16262 * README: Refer to the GDB manual. Update --attach usage.
16263
7407e2de
AS
162642007-12-20 Andreas Schwab <schwab@suse.de>
16265
16266 * linux-low.c (STACK_SIZE): Define.
16267 (linux_tracefork_child): Use it. Use __clone2 on ia64.
16268 (linux_test_for_tracefork): Likewise.
16269
b65d95c5
DJ
162702007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
16271
16272 * linux-low.c (linux_wait_for_event): Update messages. Do not
16273 reinsert auto-delete breakpoints.
16274 * mem-break.c (struct breakpoint): Change return type of handler to
16275 int.
16276 (set_breakpoint_at): Update handler type.
16277 (reinsert_breakpoint_handler): Return 1 instead of calling
16278 delete_breakpoint.
16279 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
16280 setting a new one.
16281 (check_breakpoints): Delete auto-delete breakpoints and return 2.
16282 * mem-break.h (set_breakpoint_at): Update handler type.
16283 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
16284 * win32-low.c (auto_delete_breakpoint): New.
16285 (get_child_debug_event): Use it.
16286
4e799345
DJ
162872007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
16288
16289 * configure.ac: Check for pread and pwrite.
16290 * hostio.c (handle_pread): Fall back to lseek and read.
16291 (handle_pwrite): Fall back to lseek and write.
16292 * config.in, configure: Regenerated.
16293
27524b67
DJ
162942007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
16295
16296 * server.c (myresume): Add own_buf argument.
16297 (main): Update calls.
16298
a20d5e98
DJ
162992007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
16300
16301 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
16302 * remote-utils.c (remote_open): Do not call disable_async_io.
16303 (block_async_io): Delete.
16304 (unblock_async_io): Make static.
16305 (initialize_async_io): New.
16306 * server.c (handle_v_cont): Handle async I/O here.
16307 (myresume): Likewise. Move other common resume tasks here...
16308 (main): ... from here. Call initialize_async_io. Disable async
16309 I/O before the main loop.
16310 * server.h (initialize_async_io): Declare.
16311 (block_async_io, unblock_async_io): Delete prototypes.
16312 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
16313
b79d787e
DJ
163142007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
16315
16316 * remote-utils.c (readchar): Allow binary data in received messages.
16317
d97903b2
PA
163182007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
16319
16320 * win32-low.c (attaching): New global.
16321 (win32_create_inferior): Clear the `attaching' global.
16322 (win32_attach): Set the `attaching' global.
16323 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
16324 attaching. Only set a breakpoint at the entry point if not
16325 attaching.
16326
311de423
PA
163272007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
16328
16329 * server.c (main): Don't report dll events on the initial
16330 connection on attaches.
16331
6c2d16d2
PA
163322007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
16333
16334 * server.c (main): Relax numerical bases supported for the pid of
16335 the --attach command line argument.
16336
5ca906e6
PA
163372007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
16338
16339 * win32-low.c (win32_attach): Call OpenProcess before
16340 DebugActiveProcess, not after. Add last error output to error
16341 call.
16342
9c6c8194
PA
163432007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
16344
16345 * win32-low.c (win32_get_thread_context)
16346 (win32_set_thread_context): New functions.
16347 (thread_rec): Use win32_get_thread_context.
16348 (continue_one_thread, win32_resume): Use win32_set_thread_context.
16349 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
16350 field.
16351
4d5d1aaa
PA
163522007-12-03 Leo Zayas
16353 Pedro Alves <pedro_alves@portugalmail.pt>
16354
16355 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
16356 global variables.
16357 (child_add_thread): Minor cleanup.
16358 (child_continue): Resume artificially suspended threads before
16359 calling ContinueDebugEvent.
16360 (suspend_one_thread): New.
16361 (fake_breakpoint_event): New.
16362 (get_child_debug_event): Change return type to int. Check here if
16363 gdb sent an interrupt request. If a soft interrupt was requested,
16364 fake a breakpoint event. Return 0 if there is no event to handle,
16365 and 1 otherwise.
16366 (win32_wait): Don't check here if gdb sent an interrupt request.
16367 Ensure there is a valid event to handle.
16368 (win32_request_interrupt): Add soft interruption method as last
16369 resort.
16370
c436e841
PA
163712007-12-03 Leo Zayas
16372 Pedro Alves <pedro_alves@portugalmail.pt>
16373
16374 * win32-low.h (win32_thread_info): Add descriptions to the
16375 structure members. Replace `suspend_count' counter by a
16376 `suspended' flag.
16377 * win32-low.c (thread_rec): Update condition of when to get the
16378 context from the inferior. Rely on ContextFlags being set if it
16379 has already been retrieved. Only suspend the inferior thread if
16380 we haven't already. Warn if that fails.
16381 (continue_one_thread): s/suspend_count/suspended/. Only call
16382 ResumeThread once. Warn if that fails.
16383
e7b5fa67
PA
163842007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
16385
16386 * win32-low.c (win32_wait): Don't read from the inferior when it
16387 has already exited.
16388
a385171d
PA
163892007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
16390
16391 * Makefile.in (win32_low_h): New variable.
16392 (win32-low.o): Add dependency on $(win32_low_h).
16393 (win32-arm-low.o, win32-i386-low.o): New rules.
16394
f80c84b3
DJ
163952007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
16396
16397 * hostio.c: Correct copyright year.
16398
a6b151f1
DJ
163992007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
16400
16401 * Makefile.in (OBS): Add hostio.o.
16402 (hostio.o): New rule.
16403 * server.h (handle_vFile): Declare.
16404 * hostio.c: New file.
16405 * server.c (handle_v_requests): Take packet_len and new_packet_len
16406 for binary packets. Call handle_vFile.
16407 (main): Update call to handle_v_requests.
16408
f9387fc3
DJ
164092007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
16410
16411 * linux-low.c: Include <sched.h>.
16412
51c2684e
DJ
164132007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
16414
16415 * linux-low.c (linux_tracefork_grandchild): New.
16416 (linux_tracefork_child): Use clone.
16417 (linux_test_for_tracefork): Use clone; allocate and free a stack.
16418
75f83163
JB
164192007-10-31 Joel Brobecker <brobecker@adacore.com>
16420
16421 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
16422
da5898ce
DJ
164232007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
16424
16425 * linux-low.c (handle_extended_wait): Handle unexpected signals.
16426
24a09b5f
DJ
164272007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
16428
16429 * inferiors.c (change_inferior_id): Delete.
16430 (add_pid_to_list, pull_pid_from_list): New.
16431 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
16432 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
16433 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
16434 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
16435 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
16436 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
16437 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
16438 (using_threads): Always set to 1.
16439 (handle_extended_wait): New.
16440 (add_process): Do not set TID.
16441 (linux_create_inferior): Set must_set_ptrace_flags.
16442 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
16443 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
16444 (linux_thread_alive): Rename TID argument to LWPID.
16445 (linux_wait_for_process): Handle unknown processes. Do not use TID.
16446 (linux_wait_for_event): Do not use TID or check using_threads. Update
16447 call to dead_thread_notify. Call handle_extended_wait.
16448 (linux_create_inferior): Use PTRACE_SETOPTIONS.
16449 (send_sigstop): Delete sigstop_sent.
16450 (wait_for_sigstop): Avoid TID.
16451 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
16452 (linux_test_for_tracefork): New.
16453 (linux_lookup_signals): Use thread_db_active and
16454 linux_supports_tracefork_flag.
16455 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
16456 * linux-low.h (get_process_thread): Avoid TID.
16457 (struct process_ifo): Move thread_known and tid to the end. Remove
16458 sigstop_sent.
16459 (linux_attach_lwp, thread_db_init): Update prototypes.
16460 * server.h (change_inferior_id): Delete prototype.
16461 (add_pid_to_list, pull_pid_from_list): New prototypes.
16462 * thread-db.c (thread_db_use_events): New.
16463 (find_first_thread): Rename to...
16464 (find_one_thread): ...this. Update callers and messages. Do not
16465 call fatal. Check thread_db_use_events. Do not call
16466 change_inferior_id or new_thread_notify.
16467 (maybe_attach_thread): Update. Do not call new_thread_notify.
16468 (thread_db_init): Set thread_db_use_events. Check use_events.
16469 * utils.c (fatal, warning): Correct message prefix.
16470
30ed0a8f
DJ
164712007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
16472
16473 * Makefile.in (clean): Remove new files.
16474 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
16475 (powerpc-64.o, powerpc-64.c): New rules.
16476 * configure.srv: Use alternate register sets for powerpc64-*-linux*
16477 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
16478 with SPE.
16479 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
16480 SPE targets.
16481 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
16482 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
16483 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
16484 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
16485 (target_regsets): Add AltiVec and SPE register sets.
16486 * configure.ac: Check for AltiVec and SPE.
16487 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
16488 (ppc_fill_vrregset, ppc_store_vrregset): New.
16489 (target_regsets): Add AltiVec register set.
16490 * configure: Regenerated.
16491
fd462a61
DJ
164922007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
16493
16494 * linux-low.c (O_LARGEFILE): Define.
16495 (linux_read_memory): Use /proc/PID/mem.
16496 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
16497 * configure, config.in: Regenerated.
16498
69f223ed
DJ
164992007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
16500
16501 * linux-low.c (linux_wait_for_event): Do not pass signals while
16502 single-stepping.
16503
aec18585
PA
165042007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
16505
16506 * win32-low.c (create_process): New.
16507 (win32_create_inferior): Use create_process instead of
16508 CreateProcess. If create_process failed retry appending an ".exe"
16509 suffix. Store the GetLastError result immediatelly after
16510 create_process calls and use it on the call to error.
16511
34d86ddd
PA
165122007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
16513
16514 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
16515
5a0e3bd0
JB
165162007-08-23 Joel Brobecker <brobecker@adacore.com>
16517
16518 * configure.ac: Switch license to GPLv3.
16519
f88c79e6
MS
165202007-08-01 Michael Snyder <msnyder@access-company.com>
16521
16522 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
16523
6b3d9b83
PA
165242007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
16525
16526 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
16527 typedef.
16528 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
16529 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
16530 CloseToolhelp32Snapshot.
16531 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
16532 CloseToolhelp32Snapshot.
16533
c588c53c
MS
165342007-07-27 Michael Snyder <michael.snyder@access-company.com>
16535
16536 * server.c (main): Check for inferior exit before main loop.
16537
aa0403d9
PA
165382007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
16539
16540 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
16541 instead of on tmp_desc.
16542
255e7678
DJ
165432007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
16544 Daniel Jacobowitz <dan@codesourcery.com>
16545
16546 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
16547 (add_thread): Minor cleanups.
16548 (clear_inferiors): Move lower in the file. Clear the DLL
16549 list.
16550 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
16551 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
16552 (xml_escape_text): New.
16553 * server.c (handle_query): Handle qXfer:libraries:read. Report it
16554 for qSupported.
16555 (handle_v_cont): Report errors.
16556 (gdbserver_version): Update.
16557 (main): Correct size of own_buf. Do not report initial DLL events.
16558 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
16559 (unloaded_dll, xml_escape_text): New.
16560 * win32-low.c (enum target_waitkind): Update comments.
16561 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
16562 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
16563 (win32_EnumProcessModules, win32_GetModuleInformation)
16564 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
16565 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
16566 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
16567 (win32_Module32First, win32_Module32Next, load_toolhelp)
16568 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
16569 (get_child_debug_event): Handle DLL events.
16570 (win32_wait): Likewise.
16571
0d37add9
DJ
165722007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
16573
16574 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
16575 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
16576
45e2715e
PA
165772007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
16578
16579 * win32-low.c (handle_output_debug_string): Ignore event if not
16580 waiting.
16581
c5674cf1
PA
165822007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
16583
16584 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
16585
2bbe3cc1
DJ
165862007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
16587
16588 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
16589
ae13219e
DJ
165902007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
16591
16592 * inferiors.c (change_inferior_id): Add comment.
16593 * linux-low.c (check_removed_breakpoint): Add an early
16594 prototype. Improve debug output.
16595 (linux_attach): Doc update.
16596 (linux_detach_one_process, linux_detach): Clean up before releasing
16597 each process.
16598 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
16599 * linux-low.h (struct process_info): Doc improvement.
16600 * mem-break.c (delete_all_breakpoints): New.
16601 * mem-break.h (delete_all_breakpoints): New prototype.
16602 * thread-db.c (find_first_thread): New.
16603 (thread_db_create_event): Call it instead of
16604 thread_db_find_new_threads. Clean up unused variables.
16605 (maybe_attach_thread): Remove first thread handling.
16606 (thread_db_find_new_threads): Use find_first_thread.
16607 (thread_db_get_tls_address): Likewise.
16608
4105de34
DJ
166092007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
16610
16611 * thread-db.c (thread_db_find_new_threads): Add prototype.
16612 (thread_db_create_event): Check for the main thread before adding
16613 a new thread.
16614 (maybe_attach_thread): Only enable event reporting if TID == 0.
16615 (thread_db_get_tls_address): Check for new threads.
16616
2b876972
DJ
166172007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
16618
16619 * linux-low.c (linux_create_inferior): Try execv before execvp.
16620 * spu-low.c (spu_create_inferior): Likewise.
16621
7a245884
DJ
166222007-06-13 Mike Frysinger <vapier@gentoo.org>
16623
16624 * linux-low.c (linux_create_inferior): Change execv to execvp.
16625 * spu-low.c (spu_create_inferior): Likewies.
16626
117ce543
DJ
166272007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
16628
16629 * Makefile.in (clean): Clean new files instead of deleted ones.
16630 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
16631 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
16632 rules.
16633 * configure.srv: Specify XML files and new regformats for MIPS and
16634 MIPS64 GNU/Linux.
16635 * linux-mips-low.c (mips_num_regs): Set to only used registers.
16636 (mips_regmap): Do not fetch $0. Remove unused registers. Add
16637 an entry for the restart register.
16638 (mips_cannot_fetch_register, mips_cannot_store_register)
16639 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
16640 register names to match the XML descriptions.
16641 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
16642 restart register instead of $0.
16643
0e7f50da
UW
166442007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
16645 Markus Deuling <deuling@de.ibm.com>
16646
16647 * remote-utils.c (decode_xfer_write): New function.
16648 * server.h (decode_xfer_write): Add prototype.
16649 * server.c (handle_query): Add PACKET_LEN argument. Support
16650 qXfer:spu:read and qXfer:spu:write packets.
16651 (main): Pass packet_len to handle_query.
16652 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
16653 * target.h (target_ops): Add qxfer_spu.
16654
374c1d38
UW
166552007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
16656
16657 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
16658 accessing non-seekable spufs files.
16659
bb63802a
UW
166602007-05-16 Markus Deuling <deuling@de.ibm.com>
16661
889bf7c5 16662 * server.c (handle_query): Add reply for qC packet.
bb63802a 16663
7390519e
PA
166642007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16665 Leo Zayas <lerele@champenstudios@com>
16666
16667 * server.h (check_remote_input_interrupt_request): New function.
16668 * remote_utils.c (INVALID_DESCRIPTOR): New define.
16669 (remote_desc): Initialize with INVALID_DESCRIPTOR.
16670 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
16671 (check_remote_input_interrupt_request): New function.
16672 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 16673 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
16674 winapi_GenerateConsoleCtrlEvent): New typedefs.
16675 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
16676 to 250 ms.
16677 (win32_wait): Check for remote interrupt request
16678 with check_remote_input_interrupt_request.
16679 (win32_request_interrupt): New function.
16680 (win32_target_op): Set request_interrupt to win32_request_interrupt.
16681
34b34921
PA
166822007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16683
16684 * win32-low.c (debug_registers_changed,
16685 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
16686 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
16687 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
16688 (thread_rec): Get context using the low target.
16689 (child_add_thread): Call thread_added on the low target,
16690 which does the same thing.
16691 (regptr): Delete.
16692 (do_initial_child_stuff): Remove debug registers references.
16693 Set context using the low target. Resume threads after
16694 setting the contexts.
16695 (child_continue): Remove dead variable. Remove debug
16696 registers references.
16697 (child_fetch_inferior_registers): Go through the low target.
16698 (do_child_store_inferior_registers): Remove.
16699 (child_store_inferior_registers): Go through the low target.
16700 (win32_resume): Remove debug registers references.
16701 Set context using the low target.
16702 (handle_exception): Change return type to void. Don't record
16703 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
16704 first chance exception.
889bf7c5 16705 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
16706 goto loop. Always return after waiting for debug event.
16707 (win32_wait): Convert to switch statement. Handle spurious
16708 events.
16709
16710 * win32-i386-low.c (debug_registers_changed,
16711 debug_registers_used): New.
16712 (initial_stuff): Rename to ...
16713 (i386_initial_stuff): ... this. Clear debug registers
16714 state variables.
16715 (store_debug_registers): Delete.
16716 (i386_get_thread_context): New.
16717 (load_debug_registers): Delete.
16718 (i386_set_thread_context): New.
16719 (i386_thread_added): New.
16720 (single_step): Rename to ...
16721 (i386_single_step): ... this.
16722 (do_fetch_inferior_registers): Rename to ...
16723 (i386_fetch_inferior_register): ... this.
16724 (i386_store_inferior_register): New.
16725 (the_low_target): Adapt to new interface.
16726
16727 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
16728 (arm_get_thread_context): New.
16729 (arm_set_thread_context): New.
16730 (regptr): New.
16731 (do_fetch_inferior_registers): Rename to ...
16732 (arm_fetch_inferior_register): ... this.
16733 (arm_store_inferior_register): New.
16734 (arm_wince_breakpoint): Reimplement as unsigned long.
16735 (arm_wince_breakpoint_len): Define.
16736 (the_low_target): Adapt to new interface.
16737
16738 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
16739 load_debug_registers. Add get_thread_context, set_thread_context,
16740 thread_added and store_inferior_register. Rename
16741 fetch_inferior_registers to fetch_inferior_register.
16742 (regptr): Remove declaration.
16743
dd6953e1
PA
167442007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16745
16746 * linux-low.c (linux_detach): Change return type to int. Return 0.
16747 * spu-low.c (spu_detach): Likewise.
16748
444d6139
PA
167492007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16750
16751 * target.h (target_ops): Change return type of detach to int.
16752 Add join.
16753 (join_inferior): New.
16754 * server.c (main): Don't skip detach support on mingw32.
16755 If the inferior doesn't support detaching return error.
16756 Call join_inferior instead of using waitpid.
16757 * linux-low.c (linux_join): New.
16758 (linux_target_op): Add linux_join.
16759 * spu-low.c (spu_join): New.
16760 (spu_target_ops): Add spu_join.
16761 * win32-low.c (win32_detach): Adapt to new interface.
16762 Reopen current_process_handle before detaching. Issue a child
16763 resume before detaching.
16764 (win32_join): New.
16765 (win32_target_op): Add win32_join.
16766
1d5315fe
PA
167672007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16768
16769 * win32-low.c (win32-attach): Fix return value.
16770 * target.h (target_ops): Describe ATTACH return values.
16771
bf914831
PA
167722007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16773
16774 * win32-low.c (GETPROCADDRESS): Define.
16775 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
16776 (winapi_DebugSetProcessKillOnExit): Likewise.
16777 (win32_create_inferior): Force usage of ansi CreateProcessA.
16778 (win32_attach): Use GETPROCADDRESS.
16779 (win32_detach): Likewise.
16780
f72f3e60
PA
167812007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16782
16783 * win32-low.c (win32_wait): Don't use WSTOPSIG.
16784
ed50f18f
PA
167852007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
16786
16787 * win32-low.c: Commit leftover changes from 2007-03-29.
16788
0c2ead7e
DJ
167892007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
16790
16791 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
16792 fields short instead of int. Add explicit padding.
16793 (i387_cache_to_fsave): Remove unnecessary casts.
16794 (i387_fsave_to_cache): Doc fix.
16795 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
16796
73725ff3
DJ
167972007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
16798
16799 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
16800 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
16801
d99f33d8
PA
168022007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
16803
16804 * configure.srv (arm*-*-mingw32ce*): Move near the other
16805 arm targets.
16806
68070c10
PA
168072007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
16808
2482afc6 16809 * configure.ac: Add errno checking.
68070c10
PA
16810 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
16811 sys/file.h and malloc.h.
16812 (AC_CHECK_DECLS): Add perror.
16813 (srv_mingwce): Handle.
2482afc6 16814 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
16815 win32-i386-low.o to srv_tgtobj.
16816 (i[34567]86-*-mingw*): Likewise.
16817 (arm*-*-mingw32ce*): Add case.
16818 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
16819 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
16820 [__MINGW32CE__] (strerror): New function.
16821 [__MINGW32CE__] (errno): Define to GetLastError.
16822 [__MINGW32CE__] (COUNTOF): New macro.
16823 (remote_open): Remove extra close call.
16824 * mem-break.c (delete_breakpoint_at): New function.
16825 * mem-break.h (delete_breakpoint_at): Declare.
16826 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
16827 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
16828 [USE_WIN32API] (read, write): Add char* casts.
16829 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
16830 * server.h: Include wincecompat.h on Windows CE.
16831 [HAVE_ERRNO_H]: Check.
16832 (perror): Declare if not declared.
16833 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
16834 (perror_with_name): Remove errno declaration.
16835 * wincecompat.h: New.
16836 * wincecompat.c: New.
16837 * win32-low.h: New.
16838 * win32-arm-low.c: New.
16839 * win32-i386-low.c: New.
16840 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
16841 (OUTMSG2): Make it safe.
16842 (_T): New macro.
16843 (COUNTOF): New macro.
16844 (NUM_REGS): Get it from the low target.
16845 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
16846 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
16847 (thread_rec): Let low target handle debug registers.
16848 (child_add_thread): Likewise.
16849 (child_init_thread_list): Likewise.
16850 (continue_one_thread): Likewise.
16851 (regptr): New.
16852 (do_child_fetch_inferior_registers): Move to ...
16853 * win32-i386-low.c: ... here, and rename to ...
16854 (do_fetch_inferior_registers): ... this.
889bf7c5 16855 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
16856 Go through the low target.
16857 (do_child_store_inferior_registers): Use regptr.
16858 (strwinerror): New function.
16859 (win32_create_inferior): Handle Windows CE.
16860 Use strwinerror instead of strerror on Windows error
16861 codes. Add program to the error output.
16862 Don't close the main thread handle on Windows CE.
16863 (win32_attach): Use coredll.dll on Windows CE.
16864 (win32_kill): Close current process and current
16865 thread handles.
16866 (win32_detach): Use coredll.dll on Windows CE.
16867 (win32_resume): Let low target handle debug registers, and
16868 step request.
16869 (handle_exception): Add/Remove initial breakpoint. Avoid
16870 non-existant WSTOPSIG on Windows CE.
16871 (win32_read_inferior_memory): Cast to remove warning.
16872 (win32_arch_string): Go through the low target.
16873 (initialize_low): Call set_breakpoint_data with the low
16874 target's breakpoint.
16875 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
16876 FOP_REGNUM, mappings): Move to ...
16877 * win32-i386-low.c: ... here.
16878 * win32-low.c (win32_thread_info): Move to ...
16879 * win32-low.h: ... here.
16880 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
16881 win32-arm-low.c and wincecompat.c.
16882 (all:): Add $EXEEXT.
16883 (install-only:): Likewise.
16884 (gdbserver:): Likewise.
16885 (gdbreplay:): Likewise.
16886 * config.in: Regenerate.
16887 * configure: Regenerate.
16888
41093d81
PA
168892007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
16890
16891 * win32-low.c: Rename typedef thread_info to
16892 win32_thread_info throughout.
16893
544afa54
PA
168942007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
16895
16896 * win32-i386-low.c: Rename to ...
16897 * win32-low.c: ... this.
16898 * configure.srv: Replace win32-i386-low.o with win32-low.o.
16899 * Makefile.in: Likewise.
16900
bce7165d
PA
169012007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
16902
16903 * remote-utils.c (monitor_output): Constify msg parameter.
16904 * server.h (monitor_output): Likewise.
16905 * win32-i386-low.c (handle_output_debug_string): New.
16906 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
16907 handle_output_debug_string.
16908 (get_child_debug_event): Likewise.
16909
506c7aa0
DJ
169102007-03-27 Mat Hostetter <mat@lcs.mit.edu>
16911
16912 * server.c (main): Correct strtoul check.
16913
42c81e2a
DJ
169142007-03-27 Jon Ringle <jon@ringle.org>
16915
16916 * linux-low.c: Check __ARCH_HAS_MMU__ also.
16917
9453113a
DJ
169182007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
16919
16920 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
16921
64a69107
DJ
169222007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
16923
16924 * terminal.h: Check HAVE_SGTTY_H.
16925
169262007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
16927
16928 * remote-utils.c (remote_open): Print out the assigned port number.
16929
c74d0ad8
DJ
169302007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
16931
16932 * remote-utils.c (monitor_output): New function.
16933 * server.c (debug_threads): Define here.
16934 (monitor_show_help): New function.
16935 (handle_query): Handle qRcmd.
16936 (main): Do not handle 'd' packet.
16937 * server.h (debug_threads, remote_debug, monitor_output): Declare.
16938 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
16939 of debug_threads.
16940
de7c3b4a
PA
169412007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
16942
16943 * Makefile.in (EXEEXT): New.
16944 (clean): Use $(EXEEXT).
16945
ef57601b
PA
169462007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
16947
16948 * target.h (target_ops): Rename send_signal to request_interrupt,
16949 and remove enum target_signal parameter.
16950 * linux-low.c (linux_request_interrupt): Rename from
16951 linux_send_signal, and always send SIGINT.
16952 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
16953 and always send SIGINT.
16954 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
16955 of send_signal.
16956 (input_interrupt): Likewise.
16957
820f2bda
PA
169582007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
16959
16960 * server.c (get_features_xml): Check if target implemented
16961 arch_string.
16962 * win32-i386-low.c (win32_arch_string): New.
16963 (win32_target_ops): Add win32_arch_string as arch_string member.
16964
ab39bf24
UW
169652007-02-22 Markus Deuling <deuling@de.ibm.com>
16966
16967 * spu-low.c (spu_arch_string): New.
16968 (spu_target_ops): Add spu_arch_string.
16969
61ff6e04
DJ
169702007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
16971
16972 * remote-utils.c: Remove HAVE_TERMINAL_H check.
16973 * configure.ac: Do not check for terminal.h.
16974 * configure, config.in: Regenerated.
16975
fb1e4ffc
DJ
169762007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
16977
16978 * Makefile.in (OBS): Add $(XML_BUILTIN).
16979 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
16980 (clean): Update.
16981 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
16982 (arm-with-iwmmxt.c): New.
16983 * config.in, configure: Regenerate.
16984 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
16985 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
16986 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
16987 (arm*-*-linux*): Add iWMMXt and regset support.
16988 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
16989 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
16990 (arm_store_wmmxregset, target_regsets): New.
16991 * server.c (get_features_xml): Take annex argument. Check builtin
16992 XML documents.
16993 (handle_query): Handle multiple annexes.
16994
0f48aa01
DJ
169952007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
16996
16997 * remote-utils.c [USE_WIN32API] (read, write): Define.
16998 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
16999 write.
17000
23181151
DJ
170012007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
17002
17003 * linux-i386-low.c (the_low_target): Set arch_string.
17004 * linux-x86-64-low.c (the_low_target): Likewise.
17005 * linux-low.c (linux_arch_string): New.
17006 (linux_target_ops): Add it.
17007 * linux-low.h (struct linux_target_ops): Add arch_string.
17008 * server.c (write_qxfer_response): Use const void * for DATA.
17009 (get_features_xml): New.
17010 (handle_query): Handle qXfer:features:read. Report it for qSupported.
17011 * target.h (struct target_ops): Add arch_string method.
17012
9d606399
DJ
170132007-01-03 Denis Pilat <denis.pilat@st.com>
17014 Daniel Jacobowitz <dan@codesourcery.com>
17015
17016 * linux-low.c (linux_kill): Handle being called with no threads.
17017 * win32-i386-low.c (win32_kill): Likewise.
17018 (get_child_debug_event): Clear current_process_handle.
17019
170202006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
17021 Daniel Jacobowitz <dan@codesourcery.com>
17022
17023 * remote-utils.c (remote_open): Check the type of specified
17024 serial port devices before opening them.
17025 * server.c (main): Kill the inferior if an error occurs during
17026 the first remote_open.
17027
a5e13d24
DJ
170282006-12-05 Markus Deuling <deuling@de.ibm.com>
17029
17030 * README: Update supported targets.
17031
186947f7
DJ
170322006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
17033
17034 * Makefile.in (clean): Remove reg-mips64.c.
17035 (reg-mips64.c, reg-mips64.o): New rules.
17036 * configure.srv: Handle mips64. Include regset support for mips.
17037 * linux-mips-low.c (union mips_register): New.
17038 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
17039 (mips_breakpoint, mips_breakpoint_at): Use int.
17040 (mips_collect_register, mips_supply_register)
17041 (mips_collect_register_32bit, mips_supply_register_32bit)
17042 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
17043 (mips_store_fpregset, target_regsets): New.
17044 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
17045
a13e2c95
UW
170462006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
17047
17048 * configure.srv: Add target "spu*-*-*".
17049 * Makefile.in (clean): Remove reg-spu.c.
17050 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
17051 * spu-low.c: New file.
17052
cb7283db
DJ
170532006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
17054
17055 * configure.ac: Correct td_thr_tls_get_addr test.
17056 * configure: Regenerated.
17057
89be2091
DJ
170582006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
17059
17060 * linux-low.c (linux_wait_for_event): Reformat. Use the
17061 pass_signals array.
17062 * remote-utils.c (decode_address_to_semicolon): New.
17063 * server.c (pass_signals, handle_general_set): New.
17064 (handle_query): Mention QPassSignals for qSupported.
17065 (main): Call handle_general_set.
17066 * server.h (pass_signals, decode_address_to_semicolon): New.
17067
000ef4f0
DJ
170682006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
17069
17070 * server.c (handle_query): Correct error handling for read_auxv.
17071
b7149293
UW
170722005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
17073
17074 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
17075 and srv_linux_thread_db to yes.
17076 * linux-s390-low.c (s390_fill_gregset): New function.
17077 (target_regsets): Define data structure.
17078
dae5f5cf
DJ
170792006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
17080
17081 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
17082 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
17083 * config.in, configure: Regenerated.
17084 * inferiors.c (gdb_id_to_thread): New function.
17085 (gdb_id_to_thread_id): Use it.
17086 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
17087 * linux-low.h (struct process_info): Add th member.
17088 (thread_db_get_tls_address): New prototype.
17089 * remote-utils.c (decode_address): Make non-static.
17090 * server.c (handle_query): Handle qGetTLSAddr.
17091 * server.h (gdb_id_to_thread, decode_address): New prototypes.
17092 * target.h (struct target_ops): Add get_tls_address.
17093 * thread-db.c (maybe_attach_thread): Save the thread handle.
17094 (thread_db_get_tls_address): New.
17095
32ca6d61
DJ
170962006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
17097
17098 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
17099 (linux_resume_one_process): Take a siginfo_t *. Update all
17100 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
17101 (struct pending_signals): Add a siginfo_t.
17102 (linux_wait_for_process): Always set last_status.
17103 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
17104 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
17105 * linux-low.h (struct process_info): Add last_status.
17106
5ffff7c1
DJ
171072006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
17108
17109 * remote-utils.c (try_rle): New function.
17110 (putpkt_binary): Use it.
17111
8695c747
DJ
171122006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
17113
17114 * Makefile.in (clean): Clean reg-x86-64-linux.c.
17115 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
17116 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
17117 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
17118 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
17119 point registers.
17120
290fadea
RS
171212006-08-08 Richard Sandiford <richard@codesourcery.com>
17122
17123 * server.c (terminal_fd): New variable.
17124 (old_foreground_pgrp): Likewise.
17125 (restore_old_foreground_pgrp): New function.
17126 (start_inferior): Record the terminal file descriptor in terminal_fd
17127 and its original foreground group in old_foreground_pgrp. Register
17128 restore_old_foreground_pgrp with atexit().
17129
9f2e1e63
DJ
171302006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
17131
17132 * server.c (handle_query): Correct qPart to qXfer.
17133
b80864fb
DJ
171342006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
17135
17136 * configure.ac: Check for more headers which are missing on
17137 Windows. Automatically supply -lwsock32 and USE_WIN32API.
17138 * configure.srv: Add Cygwin and mingw32.
17139 * remote-utils.c: Don't include headers unconditionally which
17140 are missing on mingw32. Include <winsock.h> for mingw32.
17141 (remote_open): Adjust for mingw32 support. Flush
17142 standard error after writing to it.
17143 (remote_close, putpkt_binary, input_interrupt, block_async_io)
17144 (unblock_async_io, enable_async_io, disable_async_io)
17145 (readchar, getpkt): Update for Winsock support.
17146 (prepare_resume_reply): Expect a protocol signal number.
17147 * server.c: Disable <sys/wait.h> on mingw32.
17148 (start_inferior): Adjust for mingw32 support. Flush
17149 standard error after writing to it.
17150 (attach_inferior): Likewise. Use protocol signal
17151 numbers.
17152 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
17153 and names.
17154 * win32-i386-low.c: New file.
17155 * Makefile.in (XM_CLIBS): Set.
17156 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
17157 (win32-i386-low.o): New dependency rule.
17158 * linux-low.c (linux_wait): Use target signal numbers.
17159 * target.h (struct target_ops): Doc fix.
17160 * server.h (target_signal_to_name): New prototype.
17161 * gdbreplay.c: Don't include headers unconditionally which
17162 are missing on mingw32. Include <winsock.h> for mingw32.
17163 (remote_close, remote_open): Adjust for Winsock support.
17164 * configure, config.in: Regenerated.
17165
0876f84a
DJ
171662006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
17167
17168 * server.c (decode_xfer_read, write_qxfer_response): New.
17169 (handle_query): Take a packet length argument. Handle
17170 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
17171 the qSupported response.
17172 (main): Update call to handle_query.
17173
01f9e8fa
DJ
171742006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
17175
17176 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
17177 (putpkt_binary): Renamed from putpkt and adjusted for binary
17178 data.
17179 (putpkt): New wrapper for putpkt_binary.
17180 (readchar): Don't mask off the high bit.
17181 (decode_X_packet): New function.
17182 * server.c (main): Call putpkt_binary if a handler sets the packet
17183 length. Save the length of the incoming packet. Handle 'X'.
17184 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
17185
be2a5f71
DJ
171862006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
17187
17188 * server.c (handle_query): Handle qSupported.
17189
ea025f5f
DJ
171902006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
17191
17192 * remote-utils.c (all_symbols_looked_up): New variable.
17193 (look_up_one_symbol): Check it.
17194 * server.h (look_up_one_symbol): New declaration.
17195 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
17196
9308fc88
DJ
171972006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
17198
17199 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 17200 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
17201 (PTRACE_GET_THREAD_AREA): Define.
17202 (ps_get_thread_area): New function.
17203
52fb6437
NS
172042006-05-09 Nathan Sidwell <nathan@codesourcery.com>
17205
17206 * configure.srv (m68k*-*-uclinux*): New target.
17207 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
17208 (linux_resume_one_process): Remove extraneous cast.
17209 (linux_read_offsets): New.
17210 (linux_target_op): Add linux_read_offsets on mmuless systems.
17211 * server.c (handle_query): Add qOffsets logic.
17212 * target.h (struct target_ops): Add read_offsets.
17213
21b0f40c
DJ
172142006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
17215
17216 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
17217 (PTRACE_GET_THREAD_AREA): Define.
17218 (ps_get_thread_area): New function.
17219 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
17220 (linux-x86-64-low.o): Update.
17221
0050a760
DJ
172222006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
17223
17224 * configure.ac: Remove checks for prfpregset_t.
17225 * gdb_proc_service.h: New file.
17226 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
17227 new "gdb_proc_service.h".
17228 * proc-service.c: Likewise.
17229 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
17230 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
17231 * Makefile.in (gdb_proc_service_h): Updated.
17232 * configure, config.in: Regenerated.
17233
b92a518e
DJ
172342006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
17235
17236 * remote-utils.c (prepare_resume_reply): Move declaration
17237 of gdb_id_from_wait to the top of the block.
17238
545587ee
DJ
172392006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
17240
17241 * linux-low.c (regsets_store_inferior_registers): Read the regset
17242 from the target before filling it.
17243
9db87ebd
DJ
172442006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
17245
17246 * server.c (attach_inferior): Return SIGTRAP for a successful
17247 attach.
17248
dd24457d
DJ
172492006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
17250
17251 * Makefile.in (OBS): Add version.o.
17252 (STAGESTUFF): Delete.
17253 (version.o): Add dependencies.
17254 (version.c): Replace rule.
17255 (clean): Remove version.c.
17256 * server.c (gdbserver_version): New.
17257 (gdbserver_usage): Use printf.
17258 (main): Handle --version and --help.
17259 * server.h (version, host_name): Add declarations.
17260
6f0f660e
EZ
172612005-12-23 Eli Zaretskii <eliz@gnu.org>
17262
889bf7c5
PA
17263 * linux-arm-low.c:
17264 * linux-arm-low.c:
17265 * inferiors.c:
17266 * i387-fp.h:
17267 * i387-fp.c:
17268 * gdbreplay.c:
17269 * regcache.c:
17270 * proc-service.c:
17271 * mem-break.h:
17272 * mem-break.c:
17273 * linux-x86-64-low.c:
17274 * linux-sh-low.c:
17275 * linux-s390-low.c:
17276 * linux-ppc64-low.c:
17277 * linux-ppc-low.c:
17278 * linux-mips-low.c:
17279 * linux-m68k-low.c:
17280 * linux-m32r-low.c:
17281 * linux-low.h:
17282 * linux-low.c:
17283 * linux-ia64-low.c:
17284 * linux-i386-low.c:
17285 * linux-crisv32-low.c:
17286 * thread-db.c:
17287 * terminal.h:
17288 * target.h:
17289 * target.c:
17290 * server.h:
17291 * server.c:
17292 * remote-utils.c:
17293 * regcache.h:
17294 * utils.c:
17295 * Makefile.in:
17296 * configure.ac:
6f0f660e
EZ
17297 * gdbserver.1: Add (C) after Copyright. Update the FSF
17298 address.
17299
9d1fb177
DJ
173002005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
17301
17302 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
17303 (arm_breakpoint_at): Recognize both breakpoints.
17304 (the_low_target): Use the correct breakpoint instruction.
17305
011a70c2
DJ
173062005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
17307
17308 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
17309 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
17310 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
17311 (the_low_target): Update.
17312
7fb85e41
AS
173132005-10-25 Andreas Schwab <schwab@suse.de>
17314
17315 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
17316
17317 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
17318 (ia64_num_regs): Reduce to 462.
17319
3db0444b
DJ
173202005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
17321
17322 * acinclude.m4: Correct quoting.
17323 * aclocal.m4: Regenerated.
17324
17325 Suggested by SZOKOVACS Robert <szo@ies.hu>:
17326 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
17327 (thread_db_init): Call thread_db_err_str.
17328 * configure.ac: Check for TD_VERSION.
17329 * config.in, configure: Regenerated.
17330
bee0189a
DJ
173312005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
17332
17333 * server.h (error, fatal, warning): Add ATTR_FORMAT.
17334
e9d25b98
DJ
173352005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
17336
17337 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
17338 is not available. Define HAVE_PTRACE_GETREGS if it is.
17339 * config.in, configure: Regenerated.
17340 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
17341 * linux-i386-low.c, linux-m68k-low.c: Update to use
17342 HAVE_PTRACE_GETREGS.
17343 * linux-low.c (regsets_fetch_inferior_registers)
17344 (regsets_store_inferior_registers): Only return 0 if we processed
17345 GENERAL_REGS.
17346 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
17347 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
17348
a06660f7
DJ
173492005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
17350
17351 * inferiors.c (struct thread_info): Add gdb_id.
17352 (add_thread): Add gdb_id argument.
17353 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
17354 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
17355 calls to add_thread.
17356 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
17357 * server.c (handle_query): Use thread_to_gdb_id.
17358 (handle_v_cont, main): Use gdb_id_to_thread_id.
17359 * server.h (add_thread): Update prototype.
17360 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
17361 prototypes.
17362
5a1f5858
DJ
173632005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
17364
17365 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
17366 left-padded registers.
17367 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
17368 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
17369
e122f1f5
SE
173702005-07-01 Steve Ellcey <sje@cup.hp.com>
17371
17372 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
17373 * configure: Regenerate.
17374 * config.in: Regenerate.
17375 * server.h (NEED_DECLARATION_STRERROR):
17376 Replace with !HAVE_DECL_STRERROR.
17377
d592fa2f
DJ
173782005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
17379
17380 * linux-low.c (linux_wait, linux_send_signal): Don't test
17381 an unsigned long variable for > 0 if it could be MAX_ULONG.
17382 * server.c (myresume): Likewise.
17383 * target.c (set_desired_inferior): Likewise.
17384
ccbd4912
MK
173852005-06-13 Mark Kettenis <kettenis@gnu.org>
17386
17387 * configure.ac: Simplify and improve check for socklen_t.
17388 * configure, config.in: Regenerate.
17389
f450004a
DJ
173902005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
17391
17392 * acconfig.h: Remove.
17393 * configure.ac: Add a test for socklen_t. Use three-argument
17394 AC_DEFINE throughout.
17395 * config.in: Regenerated using autoheader 2.59.
17396 * configure: Regenerated.
17397
17398 * gdbreplay.c (socklen_t): Provide a default.
17399 (remote_open): Use socklen_t.
17400 * remote-utils.c (socklen_t): Provide a default.
17401 (remote_open): Use socklen_t.
17402 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
17403 unsigned char.
17404
17405 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
17406 char for buffers.
17407 * linux-low.c (linux_read_memory, linux_write_memory)
17408 (linux_read_auxv): Likewise.
17409 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
17410 (check_mem_write): Likewise.
17411 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
17412 Likewise.
17413 * regcache.c (struct inferior_rgcache_data, registers_to_string)
17414 (registers_from_string, register_data): Likewise.
17415 * server.c (handle_query, main): Likewise.
17416 * server.h (convert_ascii_to_int, convert_int_to_ascii)
17417 (decode_M_packet): Likewise.
17418 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
17419 * target.h (struct target_ops): Update read_memory, write_memory,
17420 and read_auxv.
17421 (read_inferior_memory, write_inferior_memory): Update.
17422 * linux-low.h (struct linux_target_ops): Change type of breakpoint
17423 to unsigned char *.
17424 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
17425 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
17426 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
17427 linux-s390-low.c, linux-sh-low.c: Update for changes in
17428 read_inferior_memory and the_low_target->breakpoint.
17429
eee84df1
DJ
174302005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
17431
17432 * Makefile.in (SFILES): Add linux-ppc64-low.c.
17433 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
17434 * configure.srv: Add powerpc64-*-linux*.
17435 * linux-ppc64-low.c: New file.
17436
45b134e5
OF
174372005-05-23 Orjan Friberg <orjanf@axis.com>
17438
17439 * linux-cris-low.c: New file with support for CRIS.
17440 * linux-crisv32-low.c: Ditto for CRISv32.
17441 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
17442 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 17443 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
17444 reg-crisv32.o, and reg-crisv32.c to make rules.
17445 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
17446 recognized targets.
17447
48d93c75
UW
174482005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
17449
17450 * linux-low.c (fetch_register): Ensure buffer size is a multiple
17451 of sizeof (PTRACE_XFER_TYPE).
17452 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
17453
e013ee27
OF
174542005-05-12 Orjan Friberg <orjanf@axis.com>
17455
889bf7c5 17456 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
17457 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
17458 pointers for hardware watchpoint support.
17459 * linux-low.h (struct linux_target_ops): Ditto.
17460 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
17461 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
17462 to linux_target_ops.
17463 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
17464 reply packet.
17465 * server.c (main): Recognize 'Z' and 'z' packets.
17466
b0ded00b
UW
174672005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
17468
17469 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
17470 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
17471 (the_low_target): Add new members.
17472
8643e2ad
DJ
174732005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
17474
17475 * proc-service.c (ps_lgetregs): Search all_processes instead of
17476 all_threads.
17477
fc620387
DJ
174782005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
17479
17480 * server.c (start_inferior): Change return type to int.
17481 (attach_inferior): Change sigptr to int *.
17482 (handle_v_cont, handle_v_requests): Change signal to int *.
17483 (main): Change signal to int.
17484
174852005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
17486
17487 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
17488 * configure.srv: Add m32r*-*-linux*.
17489 * linux-m32r-low.c: New file.
17490
e0e76420
DJ
174912005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
17492
17493 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
17494
a1928bad
DJ
174952005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
17496
17497 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
17498 Take unsigned long arguments for PIDs.
17499 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
17500 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
17501 (wait_for_sigstop, linux_resume_one_process)
17502 (regsets_fetch_inferior_registers, linux_send_signal)
17503 (linux_read_auxv): Likewise. Update the types of variables holding
17504 PIDs. Update format string specifiers.
17505 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
17506 * remote-utils.c (prepare_resume_reply): Likewise.
17507 * server.c (cont_thread, general_thread, step_thread)
17508 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
17509 unsigned long.
17510 (handle_query): Update format specifiers.
17511 (handle_v_cont, main): Use strtoul for thread IDs.
17512 * server.h (struct inferior_list_entry): Use unsigned long for ID.
17513 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
17514 (general_thread, step_thread, thread_from_wait)
17515 (old_thread_from_wait): Update.
17516 * target.h (struct thread_resume): Use unsigned long for THREAD.
17517 (struct target_ops): Use unsigned long for arguments to attach and
17518 thread_alive.
17519
dcdb98d2
DJ
175202005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
17521
17522 * acinclude.m4: Include bfd/bfd.m4 directly.
17523 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
17524 <agriffis@toolchain.org>.
17525 * aclocal.m4, configure: Regenerated.
17526
bec39cab
AC
175272005-01-07 Andrew Cagney <cagney@gnu.org>
17528
17529 * configure.ac: Rename configure.in, require autoconf 2.59.
17530 * configure: Re-generate.
17531
434c4c77
DJ
175322004-12-08 Daniel Jacobowitz <dan@debian.org>
17533
17534 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
17535 LIBS when finished.
17536 * aclocal.m4: Regenerated.
17537 * configure: Regenerated.
17538
db1d3e1b
AS
175392004-11-21 Andreas Schwab <schwab@suse.de>
17540
17541 * linux-m68k-low.c (m68k_num_gregs): Define.
17542 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
17543 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
17544 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
17545 (m68k_breakpoint_at): New. Add to the_low_target.
17546
17547 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
17548 srv_linux_thread_db to yes.
17549
43360365
JB
175502004-10-20 Joel Brobecker <brobecker@gnat.com>
17551
17552 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
17553 (ARCH_SET_FS): Likewise.
17554 (ARCH_GET_FS): Likewise.
17555 (ARCH_GET_GS): Likewise.
17556
fd500816
DJ
175572004-10-16 Daniel Jacobowitz <dan@debian.org>
17558
17559 * linux-i386-low.c (ps_get_thread_area): New.
17560 * linux-x86-64-low.c (ps_get_thread_area): New.
17561 * linux-low.c: Include <sys/syscall.h>.
17562 (linux_kill_one_process): Don't kill the first thread here.
17563 (linux_kill): Kill the first thread here.
17564 (kill_lwp): New function.
17565 (send_sigstop, linux_send_signal): Use it.
17566 * proc-service.c: Clean up #ifdefs.
17567 (fpregset_info): Delete.
17568 (ps_lgetregs): Update and enable implementation.
17569 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
17570 implementations.
17571 * remote-utils.c (struct sym_cache, symbol_cache): New.
17572 (input_interrupt): Print a clearer message.
17573 (async_io_enabled): New variable.
17574 (enable_async_io, disable_async_io): Use it. Update comments.
17575 (look_up_one_symbol): Use the symbol cache.
17576 * thread-db.c (thread_db_look_up_symbols): New function.
17577 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
17578
f6de3c42
DJ
175792004-10-16 Daniel Jacobowitz <dan@debian.org>
17580
17581 * configure.in: Test for -rdynamic.
17582 * configure: Regenerated.
17583 * Makefile (INTERNAL_LDFLAGS): New.
17584 (gdbserver, gdbreplay): Use it.
17585
2c0fc042
AC
175862004-09-02 Andrew Cagney <cagney@gnu.org>
17587
17588 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
17589
075b3282
DJ
175902004-03-23 Daniel Jacobowitz <drow@mvista.com>
17591
17592 * linux-low.c (linux_wait): Clear all_processes list also.
17593
fa6a77dc
DJ
175942004-03-12 Daniel Jacobowitz <drow@mvista.com>
17595
17596 * linux-low.c: Include <errno.h>. Remove extern declaration of
17597 errno.
17598
6d782a97
DJ
175992004-03-12 Daniel Jacobowitz <drow@mvista.com>
17600
17601 * gdbreplay.c, server.h, utils.c: Update copyright years.
17602
3a7fb99b
DJ
176032004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
17604
17605 * server.c (main): Print child status or termination signal from
17606 variable 'signal', not 'sig'.
17607
c3e735a6
DJ
176082004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
17609
17610 * linux-low.c (linux_read_memory): Change return type to
17611 int. Check for and return error from ptrace().
17612 * target.c (read_inferior_memory): Change return type to int. Pass
17613 back return status from the_target->read_memory().
17614 * target.h (struct target_ops): Adapt *read_memory() prototype.
17615 Update comment.
17616 (read_inferior_memory): Adapt prototype.
17617 * server.c (main): Return an error packet if
17618 read_inferior_memory() returns an error.
17619
a59d1c82
DJ
176202004-03-04 Daniel Jacobowitz <drow@mvista.com>
17621
17622 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
17623 Unify with other clean targets.
17624
dc3f8883
DJ
176252004-02-29 Daniel Jacobowitz <drow@mvista.com>
17626
17627 * server.c (handle_v_cont): Call set_desired_inferior.
17628
89a208da
DJ
176292004-02-29 Daniel Jacobowitz <drow@mvista.com>
17630
17631 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
17632
62ea82f5
DJ
176332004-02-29 Daniel Jacobowitz <drow@mvista.com>
17634
17635 * linux-low.c (linux_wait): Unblock async I/O.
17636 (linux_resume): Block and enable async I/O.
17637 * remote-utils.c (block_async_io, unblock_async_io): New functions.
17638 * server.h (block_async_io, unblock_async_io): Add prototypes.
17639
6910d122
DJ
176402004-02-29 Daniel Jacobowitz <drow@mvista.com>
17641
17642 * remote-utils.c (remote_open): Print a status notice after
17643 opening a TCP port.
17644 * server.c (attach_inferior): Print a status notice after
17645 attaching.
17646
176472004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
17648
17649 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
17650
c89dc5d4
DJ
176512004-02-26 Daniel Jacobowitz <drow@mvista.com>
17652
17653 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
17654 error packet.
17655 * server.c, target.h: Update copyright years.
17656
4b8dad4a
RM
176572004-02-25 Roland McGrath <roland@redhat.com>
17658
17659 * target.h (struct target_ops): New member `read_auxv'.
17660 * server.c (handle_query): Handle qPart:auxv:read: query using that.
17661 * linux-low.c (linux_read_auxv): New function.
17662 (linux_target_ops): Initialize `read_auxv' member to that.
17663
d7446758
JB
176642004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
17665
17666 Committed by Jim Blandy <jimb@redhat.com>.
17667
17668 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 17669 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
17670 instead of GPR_SIZE to distiguish s390 and s390x targets.
17671
5544ad89
DJ
176722004-01-31 Daniel Jacobowitz <drow@mvista.com>
17673
17674 * linux-low.c: Update copyright year.
17675 (check_removed_breakpoint): Clear pending_is_breakpoint.
17676 (linux_set_resume_request, linux_queue_one_thread)
17677 (resume_status_pending_p): New functions.
17678 (linux_continue_one_thread): Use process->resume.
17679 (linux_resume): Only resume threads if there are no pending events.
17680 * linux-low.h (struct process_info): Add resume request
17681 pointer.
17682
2a68b70e
DJ
176832004-01-30 Daniel Jacobowitz <drow@mvista.com>
17684
17685 * regcache.c (new_register_cache): Clear the allocated register
17686 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
17687
64386c31
DJ
176882003-10-13 Daniel Jacobowitz <drow@mvista.com>
17689
17690 * linux-low.c (linux_resume): Take a struct thread_resume *
17691 argument.
17692 (linux_wait): Update call.
17693 (resume_ptr): New static variable.
17694 (linux_continue_one_thread): Renamed from
17695 linux_continue_one_process. Use resume_ptr.
17696 (linux_resume): Use linux_continue_one_thread.
17697 * server.c (handle_v_cont, handle_v_requests): New functions.
17698 (myresume): New function.
17699 (main): Handle 'v' case.
17700 * target.h (struct thread_resume): New type.
17701 (struct target_ops): Change argument of "resume" to struct
17702 thread_resume *.
17703 (myresume): Delete macro.
17704
c938e9b0
L
177052003-08-08 H.J. Lu <hongjiu.lu@intel.com>
17706
17707 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
17708 (uninstall): Support DESTDIR.
17709
7f313d07
BC
17710Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
17711
17712 * configure.srv: Add xscale*linux copy of arm*linux entry.
17713
3b2fc2ea
DJ
177142003-07-24 Daniel Jacobowitz <drow@mvista.com>
17715
17716 * linux-arm-low.c (arm_reinsert_addr): New function.
17717 (the_low_target): Add arm_reinsert_addr.
17718
1c0a559e
MK
177192003-07-08 Mark Kettenis <kettenis@gnu.org>
17720
17721 * mem-break.c: Remove whitespace at end of file.
17722
43d5792c
DJ
177232003-06-28 Daniel Jacobowitz <drow@mvista.com>
17724
17725 * configure.in: Check whether we need to prototype strerror.
17726 * server.h: Optionally prototype strerror.
17727 * gdbreplay.c (perror_with_name): Use strerror.
17728 * linux-low.c (linux_attach_lwp): Use strerror.
17729 * utils.c (perror_with_name): Use strerror.
17730 * config.in, configure: Regenerated.
17731
c8a86edf
DJ
177322003-06-28 Daniel Jacobowitz <drow@mvista.com>
17733
17734 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
17735 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
17736
73d37363
DJ
177372003-06-20 Daniel Jacobowitz <drow@mvista.com>
17738
17739 * Makefile.in (SFILES): Update.
17740 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
17741 low-sun3.c: Remove files.
17742
6ad8ae5c
DJ
177432003-06-17 Daniel Jacobowitz <drow@mvista.com>
17744
17745 * linux-low.c: Move comment to linux_thread_alive where it belonged.
17746 (linux_detach_one_process, linux_detach): New functions.
17747 (linux_target_ops): Add linux_detach.
17748 * server.c (main): Handle 'D' packet.
17749 * target.h (struct target_ops): Add "detach" member.
17750 (detach_inferior): Define.
17751
1581182a
MK
177522003-06-13 Mark Kettenis <kettenis@gnu.org>
17753
17754 From Kelley Cook <kelleycook@wideopenwest.com>:
17755 * configure.srv: Accept i[34567]86 variants.
17756
e5379b03
DJ
177572003-06-05 Daniel Jacobowitz <drow@mvista.com>
17758
17759 * linux-low.c (linux_wait_for_event): Correct comment typos.
17760 (linux_resume_one_process): Call check_removed_breakpoint.
17761 (linux_send_signal): New function.
17762 (linux_target_ops): Add linux_send_signal.
17763 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
17764 of kill.
17765 * target.h (struct target_ops): Add send_signal.
17766
2ff29de4
JB
177672003-05-29 Jim Blandy <jimb@redhat.com>
17768
17769 * linux-low.c (usr_store_inferior_registers): Transfer buf in
17770 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
17771 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
17772 away part of the register's value.
17773
254787d4
DJ
177742003-03-26 Daniel Jacobowitz <drow@mvista.com>
17775
17776 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
17777 (linux_wait_for_event, linux_init_signals): Likewise.
17778
94e10508
DJ
177792003-03-17 Daniel Jacobowitz <drow@mvista.com>
17780
17781 * configure.in: Check for stdlib.h.
17782 * configure: Regenerated.
17783 * config.in: Regenerated.
17784
4c0711e0
DJ
177852003-01-04 Andreas Schwab <schwab@suse.de>
17786
17787 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
17788
ef66e766
AC
177892003-01-02 Andrew Cagney <ac131313@redhat.com>
17790
17791 * Makefile.in: Remove obsolete code.
17792
a1358604
DJ
177932002-11-20 Daniel Jacobowitz <drow@mvista.com>
17794
17795 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
17796 defined(PT_FPR0_HI).
17797
23ce3b1c
DJ
177982002-11-17 Stuart Hughes <seh@zee2.com>
17799
17800 * linux-arm-low.c (arm_num_regs): Increase.
17801 (arm_regmap): Include status register.
17802
178032002-11-17 Daniel Jacobowitz <drow@mvista.com>
17804
17805 * linux-low.c (register_addr): Remove incorrect -1 check.
17806
a9fa9f7d
DJ
178072002-08-29 Daniel Jacobowitz <drow@mvista.com>
17808
17809 * linux-low.c (linux_create_inferior): Call setpgid. Return
17810 the new PID.
17811 (unstopped_p, linux_signal_pid): Remove.
17812 (linux_target_ops): Remove linux_signal_pid.
17813 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
17814 global instead of target method.
17815 * target.h (struct target_ops): Remove signal_pid. Update comment
17816 for create_inferior.
17817 * server.c (signal_pid): New variable.
17818 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 17819 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
17820 (attach_inferior): Set signal_pid.
17821
17574093
DJ
178222002-08-23 Daniel Jacobowitz <drow@mvista.com>
17823
17824 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
17825
178262002-08-20 Jim Blandy <jimb@redhat.com>
17827
17828 * Makefile.in (LDFLAGS): Allow the configure script to establish a
17829 default for this.
17830
178312002-08-01 Andrew Cagney <cagney@redhat.com>
17832
17833 * Makefile.in: Make chill references obsolete.
17834
178352002-07-24 Kevin Buettner <kevinb@redhat.com>
17836
17837 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
17838 * configure: Regenerate.
17839 * config.in: Regenerate.
17840
178412002-07-09 David O'Brien <obrien@FreeBSD.org>
17842
17843 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
17844 (perror_with_name, remote_close, remote_open, expect, play): Static.
17845
178462002-07-04 Michal Ludvig <mludvig@suse.cz>
17847
4b8dad4a 17848 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
17849 byte offsets instead of an array of indexes.
17850 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
17851
178522002-06-13 Daniel Jacobowitz <drow@mvista.com>
17853
17854 * regcache.c: Add comment.
17855
178562002-06-11 Daniel Jacobowitz <drow@mvista.com>
17857
17858 * thread-db.c: New file.
17859 * proc-service.c: New file.
17860 * acinclude.m4: New file.
17861 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
17862 proc-service.o, and thread-db.o.
17863 (linux-low.o): Add USE_THREAD_DB.
17864 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
17865 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
17866 * aclocal.m4: Regenerated.
17867 * config.in: Regenerated.
17868 * configure: Regenerated.
17869 * configure.in: Check for proc_service.h, sys/procfs.h,
17870 thread_db.h, and linux/elf.h headrs.
17871 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
17872 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
17873 Check for -lthread_db and thread support.
17874 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
17875 PowerPC, and SuperH.
17876 * i387-fp.c: Constify arguments.
17877 * i387-fp.h: Likewise.
17878 * inferiors.c: (struct thread_info): Renamed from
17879 `struct inferior_info'. Remove PID member. Use generic inferior
17880 list header. All uses updated.
17881 (inferiors, signal_pid): Removed.
17882 (all_threads): New variable.
17883 (get_thread): Define.
17884 (add_inferior_to_list): New function.
17885 (for_each_inferior): New function.
17886 (change_inferior_id): New function.
17887 (add_inferior): Removed.
17888 (remove_inferior): New function.
17889 (add_thread): New function.
17890 (free_one_thread): New function.
17891 (remove_thread): New function.
17892 (clear_inferiors): Use for_each_inferior and free_one_thread.
17893 (find_inferior): New function.
17894 (find_inferior_id): New function.
17895 (inferior_target_data): Update argument type.
17896 (set_inferior_target_data): Likewise.
17897 (inferior_regcache_data): Likewise.
17898 (set_inferior_regcache_data): Likewise.
17899 * linux-low.c (linux_bp_reinsert): Remove.
17900 (all_processes, stopping_threads, using_thrads)
17901 (struct pending_signals, debug_threads, pid_of): New.
17902 (inferior_pid): Replace with macro.
17903 (struct inferior_linux_data): Remove.
17904 (get_stop_pc, add_process): New functions.
17905 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
17906 Use add_process and add_thread.
17907 (linux_attach_lwp): New function, based on old linux_attach. Use
17908 add_process and add_thread. Set stop_expected for new threads.
17909 (linux_attach): New function.
17910 (linux_kill_one_process): New function.
17911 (linux_kill): Kill all LWPs.
17912 (linux_thread_alive): Use find_inferior_id.
17913 (check_removed_breakpoints, status_pending_p): New functions.
17914 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
17915 Update. Use WNOHANG. Wait for cloned processes also. Update process
17916 struct for the found process.
17917 (linux_wait_for_event): New function.
17918 (linux_wait): Use it. Support LWPs.
17919 (send_sigstop, wait_for_sigstop, stop_all_processes)
17920 (linux_resume_one_process, linux_continue_one_process): New functions.
17921 (linux_resume): Support LWPs.
17922 (REGISTER_RAW_SIZE): Remove.
17923 (fetch_register): Use register_size instead. Call supply_register.
17924 (usr_store_inferior_registers): Likewise. Call collect_register.
17925 Fix recursive case.
17926 (regsets_fetch_inferior_registers): Improve error message.
17927 (regsets_store_inferior_registers): Add debugging.
17928 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
17929 (unstopped_p, linux_signal_pid): New functions.
17930 (linux_target_ops): Add linux_signal_pid.
17931 (linux_init_signals): New function.
17932 (initialize_low): Call it. Initialize using_threads.
17933 * regcache.c (inferior_regcache_data): Add valid
17934 flag.
17935 (get_regcache): Fetch registers lazily. Add fetch argument
17936 and update all callers.
17937 (regcache_invalidate_one, regcache_invalidate): New
17938 functions.
17939 (new_register_cache): Renamed from create_register_cache.
17940 Return the new regcache.
17941 (free_register_cache): Change argument to a void *.
17942 (registers_to_string, registers_from_string): Call get_regcache
17943 with fetch flag set.
17944 (register_data): Make static. Pass fetch flag to get_regcache.
17945 (supply_register): Call get_regcache with fetch flag clear.
17946 (collect_register): Call get_regcache with fetch flag set.
17947 (collect_register_as_string): New function.
17948 * regcache.h: Update.
17949 * remote-utils.c (putpkt): Flush after debug output and use
17950 stderr.
17951 Handle input interrupts while waiting for an ACK.
17952 (input_interrupt): Use signal_pid method.
17953 (getpkt): Flush after debug output and use stderr.
17954 (outreg): Use collect_register_as_string.
17955 (new_thread_notify, dead_thread_notify): New functions.
17956 (prepare_resume_reply): Check using_threads. Set thread_from_wait
17957 and general_thread.
17958 (look_up_one_symbol): Flush after debug output.
17959 * server.c (step_thread, server_waiting): New variables.
17960 (start_inferior): Don't use signal_pid. Update call to mywait.
17961 (attach_inferior): Update call to mywait.
17962 (handle_query): Handle qfThreadInfo and qsThreadInfo.
17963 (main): Don't fetch/store registers explicitly. Use
17964 set_desired_inferior. Support proposed ``Hs'' packet. Update
17965 calls to mywait.
17966 * server.h: Update.
17967 (struct inferior_list, struct_inferior_list_entry): New.
17968 * target.c (set_desired_inferior): New.
17969 (write_inferior_memory): Constify.
17970 (mywait): New function.
17971 * target.h: Update.
17972 (struct target_ops): New signal_pid method.
17973 (mywait): Removed macro, added prototype.
17974
17975 * linux-low.h (regset_func): Removed.
17976 (regset_fill_func, regset_store_func): New.
17977 (enum regset_type): New.
17978 (struct regset_info): Add type field. Use new operation types.
17979 (struct linux_target_ops): stop_pc renamed to get_pc.
17980 Add decr_pc_after_break and breakpoint_at.
17981 (get_process, get_thread_proess, get_process_thread)
17982 (strut process_info, all_processes, linux_attach_lwp)
17983 (thread_db_init): New.
17984
17985 * linux-arm-low.c (arm_get_pc, arm_set_pc,
17986 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
17987 (the_low_target): Add new members.
17988 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
17989 (i386_store_fpxregset): Constify.
17990 (target_regsets): Add new kind identifier.
17991 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
17992 (i386_set_pc): Add debugging.
17993 (i386_breakpoint_at): New function.
17994 (the_low_target): Add new members.
17995 * linux-mips-low.c (mips_get_pc, mips_set_pc)
17996 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
17997 (mips_breakpoint_at): New.
17998 (the_low_target): Add new members.
17999 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
18000 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
18001 (the_low_target): Add new members.
18002 * linux-sh-low.c (sh_get_pc, sh_set_pc)
18003 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
18004 (the_low_target): Add new members.
18005 * linux-x86-64-low.c (target_regsets): Add new kind
18006 identifier.
18007
180082002-05-15 Daniel Jacobowitz <drow@mvista.com>
18009
18010 From Martin Pool <mbp@samba.org>:
18011 * server.c (gdbserver_usage): New function.
18012 (main): Call it.
18013
180142002-05-14 Daniel Jacobowitz <drow@mvista.com>
18015
18016 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
18017 stop_at -> stop_pc.
18018
180192002-05-04 Andrew Cagney <ac131313@redhat.com>
18020
18021 * Makefile.in: Remove obsolete code.
18022
180232002-04-24 Michal Ludvig <mludvig@suse.cz>
18024
18025 * linux-low.c (regsets_fetch_inferior_registers),
18026 (regsets_store_inferior_registers): Removed cast to int from
18027 ptrace() calls.
18028 * regcache.h: Added declaration of struct inferior_info.
18029
180302002-04-20 Daniel Jacobowitz <drow@mvista.com>
18031
18032 * inferiors.c (struct inferior_info): Add regcache_data.
18033 (add_inferior): Call create_register_cache.
18034 (clear_inferiors): Call free_register_cache.
18035 (inferior_regcache_data, set_inferior_regcache_data): New functions.
18036 * regcache.c (struct inferior_regcache_data): New.
18037 (registers): Remove.
18038 (get_regcache): New function.
18039 (create_register_cache, free_register_cache): New functions.
18040 (set_register_cache): Don't initialize the register cache here.
18041 (registers_to_string, registers_from_string, register_data): Call
18042 get_regcache.
18043 * regcache.h: Add prototypes.
18044 * server.h: Likewise.
18045
180462002-04-20 Daniel Jacobowitz <drow@mvista.com>
18047
18048 * mem-break.c: New file.
18049 * mem-break.h: New file.
18050 * Makefile.in: Add mem-break.o rule; update server.h
18051 dependencies.
18052 * inferiors.c (struct inferior_info): Add target_data
18053 member.
18054 (clear_inferiors): Free target_data member if set.
18055 (inferior_target_data, set_inferior_target_data): New functions.
18056 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
18057 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
18058 * linux-low.c (linux_bp_reinsert): New variable.
18059 (struct inferior_linux_data): New.
18060 (linux_create_inferior): Use set_inferior_target_data.
18061 (linux_attach): Likewise. Call add_inferior.
18062 (linux_wait_for_one_inferior): New function.
18063 (linux_wait): Call it.
18064 (linux_write_memory): Add const.
18065 (initialize_low): Call set_breakpoint_data.
18066 * linux-low.h (struct linux_target_ops): Add breakpoint
18067 handling members.
18068 * server.c (attach_inferior): Remove extra add_inferior
18069 call.
18070 * server.h: Include mem-break.h. Update inferior.c
18071 prototypes.
18072 * target.c (read_inferior_memory)
18073 (write_inferior_memory): New functions.
18074 * target.h (read_inferior_memory)
18075 (write_inferior_memory): Change macros to prototypes.
18076 (struct target_ops): Update comments. Add const to write_memory
18077 definition.
18078
180792002-04-11 Daniel Jacobowitz <drow@mvista.com>
18080
18081 * linux-low.c (usr_store_inferior_registers): Support
18082 registers which are allowed to fail to store.
18083 * linux-low.h (linux_target_ops): Likewise.
18084 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
18085 (ppc_cannot_store_register): FPSCR may not be storable.
18086
180872002-04-09 Daniel Jacobowitz <drow@mvista.com>
18088
18089 * server.h: Include <string.h> if HAVE_STRING_H.
18090 * ChangeLog: Correct paths in last ChangeLog entry.
18091
180922002-04-09 Daniel Jacobowitz <drow@mvista.com>
18093
18094 * linux-low.h: Remove obsolete prototypes.
18095 (struct linux_target_ops): New.
18096 (extern the_low_target): New.
18097 * linux-low.c (num_regs, regmap): Remove declarations.
18098 (register_addr): Use the_low_target explicitly.
18099 (fetch_register): Likewise.
18100 (usr_fetch_inferior_registers): Likewise.
18101 (usr_store_inferior_registers): Likewise.
18102 * linux-arm-low.c (num_regs): Remove.
18103 (arm_num_regs): Define.
18104 (arm_regmap): Renamed from regmap, made static.
18105 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
18106 made static.
18107 (arm_cannot_store_register): Renamed from cannot_store_register,
18108 made static.
18109 (the_low_target): New.
18110 * linux-i386-low.c (num_regs): Remove.
18111 (i386_num_regs): Define.
18112 (i386_regmap): Renamed from regmap, made static.
18113 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
18114 made static.
18115 (i386_cannot_store_register): Renamed from cannot_store_register,
18116 made static.
18117 (the_low_target): New.
18118 * linux-ia64-low.c (num_regs): Remove.
18119 (ia64_num_regs): Define.
18120 (ia64_regmap): Renamed from regmap, made static.
18121 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
18122 made static.
18123 (ia64_cannot_store_register): Renamed from cannot_store_register,
18124 made static.
18125 (the_low_target): New.
18126 * linux-m68k-low.c (num_regs): Remove.
18127 (m68k_num_regs): Define.
18128 (m68k_regmap): Renamed from regmap, made static.
18129 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
18130 made static.
18131 (m68k_cannot_store_register): Renamed from cannot_store_register,
18132 made static.
18133 (the_low_target): New.
18134 * linux-mips-low.c (num_regs): Remove.
18135 (mips_num_regs): Define.
18136 (mips_regmap): Renamed from regmap, made static.
18137 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
18138 made static.
18139 (mips_cannot_store_register): Renamed from cannot_store_register,
18140 made static.
18141 (the_low_target): New.
18142 * linux-ppc-low.c (num_regs): Remove.
18143 (ppc_num_regs): Define.
18144 (ppc_regmap): Renamed from regmap, made static.
18145 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
18146 made static.
18147 (ppc_cannot_store_register): Renamed from cannot_store_register,
18148 made static.
18149 (the_low_target): New.
18150 * linux-s390-low.c (num_regs): Remove.
18151 (s390_num_regs): Define.
18152 (s390_regmap): Renamed from regmap, made static.
18153 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
18154 made static.
18155 (s390_cannot_store_register): Renamed from cannot_store_register,
18156 made static.
18157 (the_low_target): New.
18158 * linux-sh-low.c (num_regs): Remove.
18159 (sh_num_regs): Define.
18160 (sh_regmap): Renamed from regmap, made static.
18161 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
18162 made static.
18163 (sh_cannot_store_register): Renamed from cannot_store_register,
18164 made static.
18165 (the_low_target): New.
18166 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
18167 (the_low_target): New.
18168
181692002-04-09 Daniel Jacobowitz <drow@mvista.com>
18170
18171 * Makefile.in: Add stamp-h target.
18172 * configure.in: Create stamp-h.
18173 * configure: Regenerated.
18174
181752002-04-09 Daniel Jacobowitz <drow@mvista.com>
18176
18177 * inferiors.c: New file.
18178 * target.c: New file.
18179 * target.h: New file.
18180 * Makefile.in: Add target.o and inferiors.o. Update
18181 dependencies.
18182 * linux-low.c (inferior_pid): New static variable,
18183 moved from server.c.
18184 (linux_create_inferior): Renamed from create_inferior.
18185 Call add_inferior. Return 0 on success instead of a PID.
18186 (linux_attach): Renamed from myattach.
18187 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
18188 (linux_thread_alive): Renamed from mythread_alive.
18189 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
18190 child dies.
18191 (linux_resume): Renamed from myresume. Add missing ``return 0''.
18192 (regsets_store_inferior_registers): Correct error message.
18193 Add missing ``return 0''.
18194 (linux_fetch_registers): Renamed from fetch_inferior_registers.
18195 (linux_store_registers): Renamed from store_inferior_registers.
18196 (linux_read_memory): Renamed from read_inferior_memory.
18197 (linux_write_memory): Renamed from write_inferior_memory.
18198 (linux_target_ops): New structure.
18199 (initialize_low): Call set_target_ops ().
18200 * remote-utils.c (unhexify): New function.
18201 (hexify): New function.
18202 (input_interrupt): Send signals to ``signal_pid''.
18203 * server.c (inferior_pid): Remove.
18204 (start_inferior): Update create_inferior call.
18205 (attach_inferior): Call add_inferior.
18206 (handle_query): New function.
18207 (main): Call handle_query for `q' packets.
18208 * server.h: Include "target.h". Remove obsolete prototypes.
18209 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
18210
182112002-04-09 Daniel Jacobowitz <drow@mvista.com>
18212
18213 * Makefile.in: Add WARN_CFLAGS. Update configury
18214 dependencies.
18215 * configure.in: Check for <string.h>
18216 * configure: Regenerate.
18217 * config.in: Regenerate.
18218 * gdbreplay.c: Include needed system headers.
18219 (remote_open): Remove strchr prototype.
18220 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
18221 * regcache.c (supply_register): Change buf argument to const void *.
18222 (supply_register_by_name): Likewise.
18223 (collect_register): Change buf argument to void *.
18224 (collect_register_by_name): Likewise.
18225 * regcache.h: Add missing prototypes.
18226 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
18227 * server.c (handle_query): New function.
18228 (attached): New static variable, moved out of main.
18229 (main): Quiet longjmp clobber warnings.
18230 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
18231 * utils.c (error): Remove NORETURN.
18232 (fatal): Likewise.
This page took 2.767722 seconds and 4 git commands to generate.