gdbserver: turn target op 'attach' into a method
[deliverable/binutils-gdb.git] / gdbserver / ChangeLog
CommitLineData
ef03dad8
TBA
12020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2
3 Turn process_stratum_target's attach 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 (myattach): Update the macro.
9
10 Update the derived classes and callers below.
11
12 * linux-low.cc (linux_target_ops): Update.
13 (linux_attach): Turn into ...
14 (linux_process_target::attach): ... this.
15 * linux-low.h (class linux_process_target): Update.
16 * lynx-low.cc (lynx_target_ops): Update.
17 (lynx_attach): Turn into ...
18 (lynx_process_target::attach): ... this.
19 * lynx-low.h (class lynx_process_target): Update.
20 * nto-low.cc (nto_target_ops): Update.
21 (nto_attach): Turn into ...
22 (nto_process_target::attach): ... this.
23 * nto-low.h (class nto_process_target): Update.
24 * win32-low.cc (win32_target_ops): Update.
25 (win32_attach): Turn into ...
26 (win32_process_target::attach): ... this.
27 * win32-low.h (class win32_process_target): Update.
28
6dee9afb
TBA
292020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
30
31 Turn process_stratum_target's post_create_inferior op into a method
32 of process_target.
33
34 * target.h (struct process_stratum_target): Remove the target op.
35 (class process_target): Add the target op.
36 (target_post_create_inferior): Update the macro.
37 * target.cc (process_target::post_create_inferior): Define.
38
39 Update the derived classes and callers below.
40
41 * linux-low.cc (linux_target_ops): Update.
42 (linux_post_create_inferior): Turn into ...
43 (linux_process_target::post_create_inferior): ... this.
44 * linux-low.h (class linux_process_target): Update.
45 * lynx-low.cc (lynx_target_ops): Update.
46 * nto-low.cc (nto_target_ops): Update.
47 * win32-low.cc (win32_target_ops): Update.
48
15295543
TBA
492020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
50
51 Turn process_stratum_target's create_inferior op into a method of
52 process_target.
53
54 * target.h (struct process_stratum_target): Remove the target op.
55 (class process_target): Add the target op.
56 (create_inferior): Rename the macro to ...
57 (target_create_inferior): ... this.
58
59 Update the derived classes and callers below.
60
61 * server.cc (handle_v_run): Update.
62 (captured_main): Update.
63 (process_serial_event): Update.
64 * linux-low.cc (linux_target_ops): Update.
65 (linux_create_inferior): Turn into ...
66 (linux_process_target::create_inferior): ... this.
67 * linux-low.h (class linux_process_target): Update.
68 * lynx-low.cc (lynx_target_ops): Update.
69 (lynx_create_inferior): Turn into ...
70 (lynx_process_target::create_inferior): ... this.
71 * lynx-low.h (class lynx_process_target): Update.
72 * nto-low.cc (nto_target_ops): Update.
73 (nto_create_inferior): Turn into ...
74 (nto_process_target::create_inferior): ... this.
75 * nto-low.h (class nto_process_target): Update.
76 * win32-low.cc (win32_target_ops): Update.
77 (win32_create_inferior): Turn into ...
78 (win32_process_target::create_inferior): ... this.
79 * win32-low.h (class win32_process_target): Update.
80
5ef9273d
TBA
812020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
82
83 * target.h (class process_target): New class definition.
84 (struct process_stratum_target) <pt>: New field with type
85 'process_target*'.
86 * linux-low.h (class linux_process_target): Define as a derived
87 class of 'process_target'.
88 * linux-low.cc (linux_target_ops): Add a linux_process_target*
89 as the 'pt' field.
90 * lynx-low.h (class lynx_process_target): Define as a derived
91 class of 'process_target'.
92 * lynx-low.cc (lynx_target_ops): Add a lynx_process_target*
93 as the 'pt' field.
94 * nto-low.h (class nto_process_target): Define as a derived
95 class of 'process_target'.
96 * nto-low.cc (nto_target_ops): Add an nto_process_target*
97 as the 'pt' field.
98 * win32-low.h (class win32_process_target): Define as a derived
99 class of 'process_target'.
100 * win32-low.cc (win32_target_ops): Add a win32_process_target*
101 as the 'pt' field.
102
9f1528a1
AB
1032020-02-19 Andrew Burgess <andrew.burgess@embecosm.com>
104
105 * configure: Regenerate.
106
bf84f706
MR
1072020-02-19 Maciej W. Rozycki <macro@wdc.com>
108 Andrew Burgess <andrew.burgess@embecosm.com>
109
110 * linux-riscv-low.cc: New file.
111 * Makefile.in (SFILES): Add linux-riscv-low.cc, arch/riscv.c,
112 and nat/riscv-linux-tdesc.c.
113 * configure.srv <riscv*-*-linux*> (srv_tgtobj)
114 (srv_linux_regsets, srv_linux_usrregs, srv_linux_thread_db):
115 Define.
116
1a627e7e
TT
1172020-02-14 Tom Tromey <tom@tromey.com>
118
119 * acinclude.m4: Don't include acx_configure_dir.m4.
120 * Makefile.in (LIBIBERTY_BUILDDIR, GNULIB_BUILDDIR): Update.
121 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): Remove.
122 (all, install-only, uninstall, clean-info, clean)
123 (maintainer-clean): Don't recurse.
124 (subdir_do, all-lib): Remove.
125 ($(LIBGNU) $(LIBIBERTY) $(GNULIB_H)): Remove rule.
126 (GNULIB_H): Remove.
127 (generated_files): Update.
128 ($(GNULIB_BUILDDIR)/Makefile): Remove rule.
129 * configure: Rebuild.
130 * configure.ac: Don't configure gnulib or libiberty.
131 (GNULIB): Update.
132
a9b34532
EZ
1332020-02-14 Eli Zaretskii <eliz@gnu.org>
134
135 * win32-low.c (create_process): Prepend PROGRAM to ARGS when
136 preparing the command line for CreateProcess.
137 (win32_create_inferior): Reflect the program name in debugging
138 output that shows the process and its command line.
139
feacfcac
SM
1402020-02-13 Simon Marchi <simon.marchi@efficios.com>
141
142 * Makefile.in: Rename source files from .c to .cc.
143 * %.c: Rename to %.cc.
144 * configure.ac: Rename server.c to server.cc.
145 * configure: Re-generate.
146
06b3c5bd
SM
1472020-02-13 Simon Marchi <simon.marchi@efficios.com>
148
149 * Makefile.in: Rename gdbsupport source files from .c to .cc.
150
052793ad
HD
1512020-02-12 Hannes Domani <ssbssa@yahoo.de>
152
153 * win32-low.c (win32_create_inferior): Set signal_pid.
154
f20e3e82
MR
1552020-02-12 Maciej W. Rozycki <macro@wdc.com>
156 Pedro Alves <palves@redhat.com>
157
158 Skip building gdbserver in a cross-configuration.
159 * configure.srv: Set $gdbserver_host depending on whether $target
160 is $host. Use $gdbserver_host instead of $host.
161
8ddd8e0e
SM
1622020-02-11 Simon Marchi <simon.marchi@efficios.com>
163
164 * configure: Re-generate.
165
898e7f60
SM
1662020-02-11 Simon Marchi <simon.marchi@efficios.com>
167
168 * configure: Re-generate.
169
58df732b
SM
1702020-02-11 Simon Marchi <simon.marchi@efficios.com>
171
172 * acinclude.m4: Update warning.m4 path.
173
7928d571
HD
1742020-02-09 Hannes Domani <ssbssa@yahoo.de>
175
176 * win32-low.c (win32_clear_inferiors): Reset siginfo_er.
177 (handle_exception): Set siginfo_er.
178 (win32_xfer_siginfo): New function.
179
919adfe8
TT
1802020-02-07 Tom Tromey <tom@tromey.com>
181 Pedro Alves <palves@redhat.com>
182
183 * README: Update build documentation.
184 * configure.srv: Set UNSUPPORTED if host is unsupported. Check
185 host, not target.
186 * configure.ac: Update paths.
187 * configure: Rebuild.
188 * acinclude.m4: Update paths.
189 * Makefile.in: Update include paths.
190 (depcomp, INCLUDE_DIR, INCGNU, INCSUPPORT, INCLUDE_CFLAGS)
191 (SFILES, XML_DIR, n, $(GNULIB_BUILDDIR)/Makefile, config.status)
192 (version-generated.c, stamp-xml, regdat_sh, arch/%-ipa.o)
193 (gdbsupport/%-ipa.o, %-ipa.o, arch/%.o, gdbsupport/%.o, %.o)
194 (%-generated.c): Update paths.
195 * Move entire directory from ../gdb/gdbserver.
196
287c844a
MR
1972020-01-29 Maciej W. Rozycki <macro@wdc.com>
198
199 * configure.srv <i[34567]86-*-mingw*>: Fix whitespace damage.
200
548a204f
PFC
2012020-01-29 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
202
203 * configure.srv (powerpc*-*-linux*): Use srv_tgtobj in second
204 assignment instead of srv_linux_obj.
205
a2236a08
HD
2062020-01-28 Hannes Domani <ssbssa@yahoo.de>
207
208 * server.c (handle_qxfer_libraries): Write segment-address with
209 paddress.
210
bdaed379
HD
2112020-01-24 Hannes Domani <ssbssa@yahoo.de>
212
213 * Makefile.in (install-strip): New target.
214 (install_sh, INSTALL_STRIP_PROGRAM, STRIP): New variables.
215 * aclocal.m4: Regenerate.
216 * configure: Regenerate.
217 * configure.ac: Add AM_PROG_INSTALL_STRIP.
218
42cd72aa
MR
2192020-01-24 Maciej W. Rozycki <macro@wdc.com>
220
221 * Makefile.in (SFILES): Adjust paths to point to real files.
222 (OBS): Move waitstatus.o to target/waitstatus.o.
223 (TAGS): Transform paths appropriately.
224 (%.o): Rename to...
225 (nat/%.o): ... this pattern rule.
226 (%.o): Rename to...
227 (target/%.o): ... this pattern rule.
228 * configure.srv: Adjust paths throughout to include nat/ prefix
229 with the revant files.
230 * configure.ac: Add `nat' and `target' to CONFIG_SRC_SUBDIR.
231 * configure: Regenerate.
232
42ba50ec
MR
2332020-01-24 Maciej W. Rozycki <macro@wdc.com>
234
235 * Makefile.in (TAGS): Remove config files from the recipe.
236
05ea2a05
TT
2372020-01-14 Tom Tromey <tom@tromey.com>
238
239 * configure: Rebuild.
240 * configure.ac: Remove any checks that were added to common.m4.
241 * acinclude.m4: Include lib-ld.m4, lib-prefix.m4, and
242 lib-link.m4.
243
01027315
TT
2442020-01-14 Tom Tromey <tom@tromey.com>
245
246 * server.h: Include config.h.
247 * gdbreplay.c: Include config.h.
248 * configure: Rebuild.
249 * configure.ac: Don't source common.host.
250 * acinclude.m4: Update path.
251 * Makefile.in (INCSUPPORT): New variable.
252 (INCLUDE_CFLAGS): Add INCSUPPORT.
253 (SFILES): Update paths.
254 (version-generated.c): Update path to create-version.sh.
255 (gdbsupport/%-ipa.o, gdbsupport/%.o): Update paths.
256
b2ceabe8
TT
2572020-01-14 Tom Tromey <tom@tromey.com>
258
259 * configure.ac (LIBS): Use WIN32APILIBS.
260 (USE_WIN32API): Don't define.
261 * configure: Rebuild.
262
25c51f71
TT
2632020-01-14 Tom Tromey <tom@tromey.com>
264
265 * configure: Rebuild.
266
c0bd321d
SM
2672020-01-13 Simon Marchi <simon.marchi@efficios.com>
268
269 * Makefile.in (%-generated.c): Remove rule for files from
270 regformats/i386.
271
bb564c58
SM
2722020-01-13 Simon Marchi <simon.marchi@efficios.com>
273
274 * configure: Re-generate.
275
6e37c371
SM
2762020-01-13 Simon Marchi <simon.marchi@efficios.com>
277
278 * tracepoint.h (IP_AGENT_EXPORT_FUNC) [!IN_PROCESS_AGENT]:
279 Define to static.
280 * tracepoint.c (stop_tracing, flush_trace_buffer,
281 about_to_request_buffer_space, get_trace_state_variable_value,
282 set_trace_state_variable_value, gdb_collect): Add declaration.
283
df4a0200
SM
2842020-01-13 Simon Marchi <simon.marchi@efficios.com>
285
286 * linux-x86-low.c (x86_linux_regs_info, amd64_emit_eq_goto,
287 amd64_emit_ne_goto, amd64_emit_lt_goto, amd64_emit_le_goto,
288 amd64_emit_gt_goto, amd64_emit_ge_goto, amd64_emit_ge_goto,
289 i386_emit_eq_goto, i386_emit_ne_goto, i386_emit_lt_goto,
290 i386_emit_le_goto, i386_emit_gt_goto, i386_emit_ge_goto): Make
291 static.
292
89e94ec9
SM
2932020-01-13 Simon Marchi <simon.marchi@efficios.com>
294
295 * inferiors.c: Include gdbsupport/common-inferior.h.
296
2552728a
SM
2972020-01-13 Simon Marchi <simon.marchi@efficios.com>
298
299 * hostio-errno.c: Include hostio.h.
300
4025fa09
SM
3012020-01-13 Simon Marchi <simon.marchi@efficios.com>
302
303 * Makefile.in (%-generated.c): Make $(regdat_sh) a regular
304 prerequisite.
305
c0b0a142
SM
3062020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
307
308 * linux-arm-tdesc.c: Include linux-arm-tdesc.h.
309 * linux-arm-tdesc.h: Include arch/arm.h.
310
bb1183e2
SM
3112020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
312
313 * linux-aarch64-low.c (aarch64_write_goto_address): Make static.
314
f5df0b5f
SM
3152020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
316
317 * linux-aarch32-tdesc.c: Include linux-aarch32-tdesc.h.
318 * linux-aarch64-tdesc.c: Include linux-aarch64-tdesc.h.
319
5b6d1e4f
PA
3202020-01-10 Pedro Alves <palves@redhat.com>
321
322 * fork-child.c (post_fork_inferior): Pass target down to
323 startup_inferior.
324 * inferiors.c (switch_to_thread): Add process_stratum_target
325 parameter.
326 * lynx-low.c (lynx_target_ops): Now a process_stratum_target.
327 * nto-low.c (nto_target_ops): Now a process_stratum_target.
328 * linux-low.c (linux_target_ops): Now a process_stratum_target.
329 * remote-utils.c (prepare_resume_reply): Pass the target to
330 switch_to_thread.
331 * target.c (the_target): Now a process_stratum_target.
332 (done_accessing_memory): Pass the target to switch_to_thread.
333 (set_target_ops): Ajust to use process_stratum_target.
334 * target.h (struct target_ops): Rename to ...
335 (struct process_stratum_target): ... this.
336 (the_target, set_target_ops): Adjust.
337 (prepare_to_access_memory): Adjust comment.
338 * win32-low.c (child_xfer_memory): Adjust to use
339 process_stratum_target.
340 (win32_target_ops): Now a process_stratum_target.
341
559e7e50
EZ
3422020-01-06 Eli Zaretskii <eliz@gnu.org>
343 Pedro Alves <palves@redhat.com>
344
345 * win32-low.c (get_child_debug_event): Extract the fatal exception
346 from the exit status and convert to the equivalent Posix signal
347 number.
348 (win32_wait): Allow TARGET_WAITKIND_SIGNALLED status as well.
349 * Makefile.in (OBS, SFILES): Add gdb_wait.[co].
350
48189bec
HD
3512020-01-01 Hannes Domani <ssbssa@yahoo.de>
352
353 * Makefile.in: Use INSTALL_PROGRAM_ENV.
354
5dd8bf88
JB
3552020-01-01 Joel Brobecker <brobecker@adacore.com>
356
357 * server.c (gdbserver_version): Change copyright year to 2020.
358 * gdbreplay.c (gdbreplay_version): Likewise.
359
0ad6b8ee
CB
3602019-12-19 Christian Biesinger <cbiesinger@google.com>
361
362 * configure: Regenerate.
363 * configure.ac: Quote variable arguments of test.
364
1ee7b812
BE
3652019-12-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
366
367 * Makefile.in: Fix build with GNU Make 3.81
368
d9fa87f4
TT
3692019-12-16 Tom Tromey <tromey@adacore.com>
370
371 * server.c (get_exec_file): Constify result.
372
ab7d13f0
CB
3732019-12-10 Christian Biesinger <cbiesinger@google.com>
374
375 * Makefile.in: Add safe-strerror.c to gdbreplay and IPA, and change
376 UNDO_GNULIB_CFLAGS to undo strerror_r instead of strerror.
377 * config.in: Regenerate.
378 * configure: Regenerate.
379 * configure.ac: Don't check for strerror.
380 * linux-i386-ipa.c (initialize_fast_tracepoint_trampoline_buffer):
381 Call safe_strerror instead of strerror.
382 * server.h (strerror): Remove this now-unnecessary declaration.
383 * tracepoint.c (init_named_socket): Call safe_strerror instead of
384 strerror.
385 (gdb_agent_helper_thread): Likewise.
386 * utils.c (perror_with_name): Likewise.
387
4da8c3a8
TT
3882019-11-26 Tom Tromey <tom@tromey.com>
389
390 * configure, config.in: Rebuild.
391
21987b9c
TT
3922019-11-26 Tom Tromey <tom@tromey.com>
393
394 * remote-utils.c (block_unblock_async_io): Use gdb_sigmask.
395 * linux-low.c (linux_wait_for_event_filtered, linux_async): Use
396 gdb_sigmask.
397 * configure, config.in: Rebuild.
398
5e030278
TT
3992019-11-26 Tom Tromey <tom@tromey.com>
400
401 * Makefile.in (PTHREAD_CFLAGS, PTHREAD_LIBS): New variables.
402 (INTERNAL_CFLAGS_BASE): Use PTHREAD_CFLAGS.
403 (GDBSERVER_LIBS): Use PTHREAD_LIBS.
404 * acinclude.m4: Include ax_pthread.m4.
405 * config.in, configure: Rebuild.
406
6d91ce9a
CB
4072019-11-26 Christian Biesinger <cbiesinger@google.com>
408
409 * debug.c (debug_set_output): Call safe_strerror instead of
410 strerror.
411 * linux-low.c (attach_proc_task_lwp_callback): Likewise.
412 (linux_kill_one_lwp): Likewise.
413 (linux_detach_one_lwp): Likewise.
414 (linux_wait_for_event_filtered): Likewise.
415 (store_register): Likewise.
416 * lynx-low.c (lynx_attach): Likewise.
417 * mem-break.c (insert_memory_breakpoint): Likewise.
418 (remove_memory_breakpoint): Likewise.
419 (delete_fast_tracepoint_jump): Likewise.
420 (set_fast_tracepoint_jump): Likewise.
421 (uninsert_fast_tracepoint_jumps_at): Likewise.
422 (reinsert_fast_tracepoint_jumps_at): Likewise.
423 * nto-low.c (nto_xfer_memory): Likewise.
424 (nto_resume): Likewise.
425
6cdd651f
LM
4262019-11-20 Luis Machado <luis.machado@linaro.org>
427
428 * linux-aarch64-low.c (is_sve_tdesc): Check against target feature
429 instead of register count.
430 * tdesc.c (tdesc_contains_feature): New function.
431 * tdesc.h (tdesc_contains_feature): New prototype.
432
cd850b40
CB
4332019-11-15 Christian Biesinger <cbiesinger@google.com>
434
435 * Makefile.in: Add safe-strerror.c.
436 * configure: Regenerate.
437 * configure.ac: Don't source common.host.
438
5abebf3c
CB
4392019-11-15 Christian Biesinger <cbiesinger@google.com>
440
441 * config.in: Regenerate.
442 * configure: Regenerate.
443
e06f3d6e
AB
4442019-11-12 Andrew Burgess <andrew.burgess@embecosm.com>
445
446 * ax.c (ax_printf): Handle size_t_arg.
447
ca3a04f6
CB
4482019-11-06 Christian Biesinger <cbiesinger@google.com>
449
450 * linux-tdep.c (linux_info_proc): Use strtok_r instead of strtok.
451 * mi/mi-main.c (output_cores): Likewise.
452 * nat/linux-osdata.c (linux_xfer_osdata_cpus): Likewise.
453 (linux_xfer_osdata_modules): Likewise.
454 * remote.c (register_remote_support_xml): Likewise.
455 * sparc64-tdep.c (adi_is_addr_mapped): Likewise.
456 * xml-syscall.c (syscall_create_syscall_desc): Likewise.
457
e48f6033
CB
4582019-11-01 Christian Biesinger <cbiesinger@google.com>
459
460 * configure: Regenerate.
461 * configure.ac: Remove check for strerror_r.
462
e7e97a2e
CB
4632019-10-31 Christian Biesinger <cbiesinger@google.com>
464
465 * config.in: Regenerate.
466 * configure: Regenerate.
467 * configure.ac: Also check for strerror_r.
468
75cafaa6
CB
4692019-10-31 Christian Biesinger <cbiesinger@google.com>
470
471 * ax.h (debug_agent): Remove duplicate declaration.
472
30baf67b
TV
4732019-10-26 Tom de Vries <tdevries@suse.de>
474
475 * linux-aarch64-low.c: Fix typos in comments.
476 * linux-arm-low.c: Same.
477 * linux-low.c: Same.
478 * linux-ppc-low.c: Same.
479 * proc-service.c: Same.
480 * regcache.h: Same.
481 * server.c: Same.
482 * tracepoint.c: Same.
483 * win32-low.c: Same.
484
52c64cf7
TT
4852019-10-25 Tom Tromey <tromey@adacore.com>
486
487 * utils.c (xstrdup): Remove.
488
c12d372d
TT
4892019-10-23 Tom Tromey <tom@tromey.com>
490
491 * configure, config.in: Rebuild.
492
4d0b984b
TT
4932019-10-23 Tom Tromey <tom@tromey.com>
494
495 * configure: Rebuild.
496 * acinclude.m4: Use m4_include, not sinclude.
497
c5adaa19
TT
4982019-10-17 Tom Tromey <tromey@adacore.com>
499
500 * configure: Rebuild.
501 * configure.ac: Use AC_CONFIG_HEADERS. Create stamp-h there, not
502 in AC_CONFIG_FILES invocation.
503 * Makefile.in (stamp-h, Makefile): Use new-style config.status
504 invocation.
505
fec4e896
CB
5062019-10-16 Christian Biesinger <cbiesinger@google.com>
507
508 * server.c: Include xml-builtin.h.
509 (get_xml_features): Don't declare xml_builtins here.
510
00975ff6
AB
5112019-10-15 Andrew Burgess <andrew.burgess@embecosm.com>
512
513 * Makefile.in: Remove references to vec-ipa.o.
514
0dc32745
AB
5152019-10-15 Andrew Burgess <andrew.burgess@embecosm.com>
516
517 * Makefile.in: Remove references to vec.c.
518
3e6ec53a
CB
5192019-10-02 Christian Biesinger <cbiesinger@google.com>
520
521 * server.c (server_waiting): Change to bool.
522 (extended_protocol): Likewise.
523 (response_needed): Likewise.
524 (exit_requested): Likewise.
525 (run_once): Likewise.
526 (report_no_resumed): Likewise.
527 (non_stop): Likewise.
528 (disable_packet_vCont): Likewise.
529 (disable_packet_Tthread): Likewise.
530 (disable_packet_qC): Likewise.
531 (disable_packet_qfThreadInfo): Likewise.
532 (handle_general_set): Update.
533 (handle_detach): Update.
534 (handle_monitor_command): Update.
535 (handle_query): Update.
536 (captured_main): Update.
537 (process_serial_event): Update.
538 * server.h (server_waiting): Change to bool.
539 (disable_packet_vCont): Likewise.
540 (disable_packet_Tthread): Likewise.
541 (disable_packet_qC): Likewise.
542 (disable_packet_qfThreadInfo): Likewise.
543 (run_once): Likewise.
544 (non_stop): Likewise.
545 * target.c (target_stop_and_wait): Update.
546
80fd2826
TT
5472019-10-02 Tom Tromey <tromey@adacore.com>
548
549 * Makefile.in (SFILES): Add common-inferior.c.
550 (OBS): Add common-inferior.o.
551 * server.c (startup_with_shell): Don't define.
552
46f29a9a
AB
5532019-10-02 Andrew Burgess <andrew.burgess@embecosm.com>
554
555 * linux-low.c (linux_low_read_btrace): Update for change to
556 std::vector.
557
f9d949fb
CB
5582019-09-20 Christian Biesinger <cbiesinger@google.com>
559
560 * debug.c (debug_threads): Remove comment in favor of the header.
561 * debug.h (using_threads): Add declaration.
562 (debug_threads): Add comment.
563 * linux-aarch64-low.c: Include debug.h and remove declaration of
564 debug_threads.
565 * nto-low.c: Likewise.
566 * remote-utils.c: Likewise.
567 * thread-db.c: Likewise.
568
abf516c6
UW
5692019-09-20 Ulrich Weigand <uweigand@de.ibm.com>
570
571 * configure.srv (ipa_ppc_linux_regobj): Remove powerpc-cell32l-ipa.o
572 and powerpc-cell64l-ipa.o.
573 (powerpc*-*-linux*): Remove powerpc-cell32l.o and powerpc-cell64l.o
574 from srv_regobj. Remove rs6000/powerpc-cell32l.xml and
575 rs6000/powerpc-cell64l.xml from srv_xmlfiles.
576 (spu*-*-*): Remove.
577
578 * spu-low.c: Remove file.
579
580 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Remove.
581 (parse_spufs_run): Remove.
582 (ppc_get_pc): Remove Cell/B.E. support.
583 (ppc_set_pc): Likewise.
584 (ppc_breakpoint_at): Likewise.
585 (ppc_arch_setup): Likewise.
586 (ppc_get_ipa_tdesc_idx): Do not handle tdesc_powerpc_cell64l or
587 tdesc_powerpc_cell32l.
588 (initialize_low_arch): Do not call init_registers_powerpc_cell64l
589 or init_registers_powerpc_cell32l.
590 * linux-ppc-ipa.c (get_ipa_tdesc): Do not handle PPC_TDESC_CELL.
591 (initialize_low_tracepoint): Do not call init_registers_powerpc_cell64l
592 or init_registers_powerpc_cell32l.
593 * linux-ppc-tdesc-init.h (PPC_TDESC_CELL): Mark as unused.
594 (init_registers_powerpc_cell32l): Remove prototype.
595 (init_registers_powerpc_cell64l): Likewise.
596
597 * target.h (struct target_ops): Remove qxfer_spu member.
598 * server.c (handle_qxfer_spu): Remove.
599 (qxfer_packets): Remove entry for "spu".
600 (handle_query): No longer support qXfer:spu:read or qXfer:spu:write.
601 * linux-low.c (SPUFS_MAGIC): Remove.
602 (spu_enumerate_spu_ids): Remove.
603 (linux_qxfer_spu): Remove.
604 (linux_target_ops): Remove qxfer_spu member.
605 * lynx-low.c (lynx_target_ops): Remove qxfer_spu member.
606 * nto-low.c (nto_target_ops): Remove qxfer_spu member.
607 * win32-low.c (win32_target_ops): Remove qxfer_spu member.
608
2d41fa11
SDJ
6092019-08-23 Sergio Durigan Junior <sergiodj@redhat.com>
610
611 * Makefile.in (SFILES): Add 'gdbsupport/gdb-dlfcn.c'.
612 (OBS): Add 'gdbsupport/gdb-dlfcn.o'.
613 * config.in: Regenerate.
614 * configure: Regenerate.
615
d59b55f0
TT
6162019-08-15 Tom Tromey <tromey@adacore.com>
617
618 * target.c (target_write_memory): Use gdb::byte_vector.
619
4196ab2a
TT
6202019-08-15 Tom Tromey <tromey@adacore.com>
621
622 * tracepoint.c (write_inferior_data_pointer)
623 (write_inferior_integer, write_inferior_int8)
624 (write_inferior_uinteger, m_tracepoint_action_download)
625 (r_tracepoint_action_download, x_tracepoint_action_download)
626 (l_tracepoint_action_download, clear_inferior_trace_buffer)
627 (download_agent_expr, download_tracepoint_1)
628 (download_trace_state_variables, upload_fast_traceframes): Update.
629 * server.c (gdb_write_memory): Update.
630 * remote-utils.c (relocate_instruction): Update.
631 * proc-service.c (ps_pdwrite): Update.
632 * mem-break.c (remove_memory_breakpoint)
633 (delete_fast_tracepoint_jump, set_fast_tracepoint_jump)
634 (uninsert_fast_tracepoint_jumps_at)
635 (reinsert_fast_tracepoint_jumps_at): Update.
636 * linux-x86-low.c (append_insns)
637 (i386_install_fast_tracepoint_jump_pad)
638 (amd64_write_goto_address, i386_write_goto_address): Update.
639 * linux-s390-low.c (append_insns, s390_write_goto_address):
640 Update.
641 * linux-ppc-low.c (ppc_relocate_instruction)
642 (ppc_install_fast_tracepoint_jump_pad, emit_insns)
643 (ppc_write_goto_address): Update.
644 * linux-aarch64-low.c (append_insns): Update.
645 * target.h (struct target_ops): Update.
646 (write_inferior_memory): Don't declare.
647 * target.c (target_write_memory): Rename from
648 write_inferior_memory. Remove old target_write_memory.
649
c6778d00
TT
6502019-08-15 Tom Tromey <tromey@adacore.com>
651
652 * target.c (write_inferior_memory): Use std::vector.
653
404f2902
FCE
6542019-08-06 Frank Ch. Eigler <fche@redhat.com>
655
656 PR build/24886
657 * configure.ac: Drop enable-libmcheck support.
658 * configure, config.in: Rebuild.
659 * acinclude.m4: Don't include it.
660
4c5aa8e0
AH
6612019-07-19 Alan Hayward <alan.hayward@arm.com>
662
663 * configure.srv: Remove Arm xml files.
664
7cc17433
AH
6652019-07-19 Alan Hayward <alan.hayward@arm.com>
666
667 * configure.srv: Add new files. Remove xml generated files.
668 * linux-aarch32-low.c (initialize_low_arch_aarch32): Don't init
669 registers.
670 * linux-aarch32-low.h (tdesc_arm_with_neon): Remove.
671 * linux-aarch32-tdesc.c: New file.
672 * linux-aarch32-tdesc.h: New file.
673 * linux-aarch64-low.c (aarch64_arch_setup): Call aarch32_linux_read_description.
674 * linux-arm-low.c (init_registers_arm, tdesc_arm)
675 (init_registers_arm_with_iwmmxt, tdesc_arm_with_iwmmxt)
676 (init_registers_arm_with_vfpv2, tdesc_arm_with_vfpv2)
677 (init_registers_arm_with_vfpv3, tdesc_arm_with_vfpv3): Remove.
678 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
679 (arm_store_vfpregset): Call arm_linux_get_tdesc_fp_type.
680 (arm_read_description): Call arm_linux_read_description.
681 (initialize_low_arch): Don't init registers.
682 * linux-arm-tdesc.c: New file.
683 * linux-arm-tdesc.h: New file.
684
166a82be
AH
6852019-07-10 Alan Hayward <alan.hayward@arm.com>
686
687 * linux-arm-low.c (arm_fill_wmmxregset, arm_store_wmmxregset):
688 Move counter inside for.
689 (arm_read_description): Check ptrace earlier.
690 (arm_arch_setup): Call arm_linux_init_hwbp_cap here.
691
268a13a5
TT
6922019-07-09 Tom Tromey <tom@tromey.com>
693
694 * configure: Rebuild.
695 * configure.ac: Change common to gdbsupport.
696 * acinclude.m4: Change common to gdbsupport.
697 * Makefile.in (SFILES, OBS, GDBREPLAY_OBS, IPA_OBJS)
698 (version-generated.c, gdbsupport/%-ipa.o, gdbsupport/%.o): Change
699 common to gdbsupport.
700 * ax.c, event-loop.c, fork-child.c, gdb_proc_service.h,
701 gdbreplay.c, gdbthread.h, hostio-errno.c, hostio.c, i387-fp.c,
702 inferiors.c, inferiors.h, linux-aarch64-tdesc-selftest.c,
703 linux-amd64-ipa.c, linux-i386-ipa.c, linux-low.c,
704 linux-tic6x-low.c, linux-x86-low.c, linux-x86-tdesc-selftest.c,
705 linux-x86-tdesc.c, lynx-i386-low.c, lynx-low.c, mem-break.h,
706 nto-x86-low.c, regcache.c, regcache.h, remote-utils.c, server.c,
707 server.h, spu-low.c, symbol.c, target.h, tdesc.c, tdesc.h,
708 thread-db.c, tracepoint.c, win32-i386-low.c, win32-low.c: Change
709 common to gdbsupport.
710
350fab54
AH
7112019-07-04 Alan Hayward <alan.hayward@arm.com>
712
713 * linux-aarch32-low.c (arm_read_description, arm_regsets): Use new
714 defines.
715 * linux-arm-low.c (arm_read_description, arm_regsets): Likewise.
716
2b40fda7
AH
7172019-07-04 Alan Hayward <alan.hayward@arm.com>
718
719 * configure.srv: Remove legacy xml.
720 * linux-aarch64-low.c (initialize_low_arch): Remove
721 initialize_low_tdesc call.
722 * linux-aarch64-tdesc-selftest.c: Remove file.
723 * linux-aarch64-tdesc.h (initialize_low_tdesc): Remove.
724 * linux-x86-low.c (initialize_low_arch): Remove
725 initialize_low_tdesc call.
726 * linux-x86-tdesc-selftest.c: Remove file.
727 * linux-x86-tdesc.h (initialize_low_tdesc): Remove.
728
7d10623d
TV
7292019-06-20 Tom de Vries <tdevries@suse.de>
730
731 * linux-s390-ipa.c (get_ipa_tdesc)[!__s390x__]: Use
732 s390_te_linux64_ft_collect_regmap for S390_TDESC_GS.
733
8d6a48df
TV
7342019-06-19 Tom de Vries <tdevries@suse.de>
735
736 * debug.h (debug_write): Change return type to ssize_t.
737 * debug.c (debug_write): Same.
738
73cc7272
TT
7392019-06-14 Tom Tromey <tom@tromey.com>
740
741 * configure.ac: Use new path to gnulib.
742 * configure: Rebuild.
743 * Makefile.in (INCGNU, $(GNULIB_BUILDDIR)/Makefile): Use new path
744 to gnulib.
745
08f10e02
TT
7462019-06-11 Tom Tromey <tom@tromey.com>
747
748 * Makefile.in (SFILES): Add alloc.c.
749 (OBS): Add alloc.o.
750 (IPA_OBJS): Add alloc-ipa.o.
751 (alloc-ipa.o): New target.
752 (%.o: ../%.c): New pattern rule.
753
422186a9
TT
7542019-06-10 Tom Tromey <tromey@adacore.com>
755
756 * remote-utils.c (look_up_one_symbol, relocate_instruction): Don't
757 end warning with a newline.
758 * linux-s390-low.c (s390_get_wordsize): Don't end warning with a
759 newline.
760 * thread-db.c (attach_thread): Don't end warning with a newline.
761 (thread_db_notice_clone): Likewise.
762 * tracepoint.c (gdb_agent_helper_thread): Don't end warning with a
763 newline.
764 * linux-x86-low.c (x86_get_min_fast_tracepoint_insn_len): Don't
765 end warning with a newline.
766
b02f78f9
PA
7672019-06-04 Pedro Alves <palves@redhat.com>
768
769 * server.c (captured_main): Use make_unique_xstrdup.
770
88ed7edb
TT
7712019-06-02 Tom Tromey <tom@tromey.com>
772
773 * gdbreplay.c (fromhex): Remove.
774 * Makefile.in (GDBREPLAY_OBS): Add rsp-low.o.
775
33a6bc35
TT
7762019-05-29 Tom Tromey <tromey@adacore.com>
777
778 * configure: Rebuild.
779
e90a813d
KB
7802019-05-06 Kevin Buettner <kevinb@redhat.com>
781
782 * linux-x86-low.c (x86_fill_gregset): Don't compile 64-bit
783 sign extension code on 32-bit builds.
784
353ea2d1
EZ
7852019-05-03 Eli Zaretskii <eliz@gnu.org>
786
787 * remote-utils.c:
788 * gdbreplay.c [USE_WIN32API]: Remove the _WIN32_WINNT override.
789
b494cdff
TT
7902019-04-19 Tom Tromey <tom@tromey.com>
791
792 * server.c (struct vstop_notif): Derive from notif_event.
793 <base>: Remove.
794 (queue_stop_reply): Update.
795 (remove_all_on_match_ptid): Change type. Rewrite.
796 (discard_queued_stop_replies): Rewrite.
797 (in_queued_stop_replies_ptid): Change type.
798 (in_queued_stop_replies): Rewrite.
799 (notif_stop): Update.
800 (queue_stop_reply_callback): Update.
801 (captured_main): Don't call initialize_notif.
802 (push_stop_notification): Update.
803 * notif.c (notif_write_event, handle_notif_ack)
804 (notif_event_enque, notif_push): Update.
805 (notif_event_xfree, initialize_notif): Remove.
806 * notif.h (struct notif_event): Include <list>, not
807 "common/queue.h".
808 (struct notif_server) <queue>: Now a std::list.
809 (notif_event_p): Remove typedef.
810 (initialize_notif): Don't declare.
811 (struct notif_event): Add virtual destructor.
812
a7e559cc
AH
8132019-04-17 Alan Hayward <alan.hayward@arm.com>
814
815 * ax.c (ax_vdebug): Call debug_printf.
816 * debug.c (debug_write): New function.
817 * debug.h (debug_write): New declaration.
818 * linux-low.c (sigchld_handler): Call debug_write.
819
aeb2e706
AH
8202019-04-17 Alan Hayward <alan.hayward@arm.com>
821
822 * debug.c (debug_set_output): New function.
823 (debug_vprintf): Send output to debug_file.
824 (debug_flush): Likewise.
825 * debug.h (debug_set_output): New declaration.
826 * server.c (handle_monitor_command): Add debug-file option.
827 (captured_main): Likewise.
828
c1bc0935
AH
8292019-04-17 Alan Hayward <alan.hayward@arm.com>
830
831 * debug.c (remote_debug): Add definition.
832 * debug.h (remote_debug): Add declaration.
833 * hostio.c (remote_debug): Remove declaration.
834 * remote-utils.c (struct ui_file): Likewise.
835 (remote_debug): Likewise.
836 * remote-utils.h (remote_debug): Likewise,
837 * server.c (remote_debug): Remove definition.
838
3f52fdbc
KB
8392019-04-10 Kevin Buettner <kevinb@redhat.com>
840
841 * linux-x86-low.c (x86_fill_gregset): Sign extend EAX value
842 when using a 64-bit gdbserver.
843
b0319eaa
TT
8442019-04-09 Tom Tromey <tromey@adacore.com>
845
846 * linux-low.c (select_event_lwp): Use find_thread_in_random.
847
eedc3f4f
TT
8482019-04-08 Tom Tromey <tom@tromey.com>
849
850 * linux-low.c (linux_detach_one_lwp): Replace throw_exception with
851 throw.
852 (linux_resume_one_lwp): Likewise.
853
230d2906
TT
8542019-04-08 Tom Tromey <tom@tromey.com>
855
856 * gdbreplay.c: Update.
857 * linux-low.c: Update.
858 * server.c: Update.
859
a70b8144
TT
8602019-04-08 Tom Tromey <tom@tromey.com>
861
862 * server.c: Use C++ exception handling.
863 * linux-low.c: Use C++ exception handling.
864 * gdbreplay.c: Use C++ exception handling.
865
3d6e9d23
TT
8662019-04-08 Tom Tromey <tom@tromey.com>
867
868 * server.c (handle_btrace_general_set, handle_qxfer_btrace)
869 (handle_qxfer_btrace_conf, detach_or_kill_for_exit_cleanup)
870 (captured_main, main): Update.
871 * gdbreplay.c (main): Update.
872
0570503d
PFC
8732019-04-05 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
874
875 * linux-low.c (linux_get_auxv): Remove static. Return auxv entry
876 value in argument pointer, return 1 if the entry is found and 0
877 otherwise. Move comment.
878 (linux_get_hwcap, linux_get_hwcap2): Use modified linux_get_auxv.
879 * linux-low.h (linux_get_auxv): Declare.
880 * linux-ppc-low.c (is_elfv2_inferior): Use linux_get_auxv.
881
227a9e65
TT
8822019-04-05 Tom Tromey <tromey@adacore.com>
883
884 * server.c (gdbserver_usage): Use upper-case for metasyntactic
885 variables.
886
69f4c9cc
AH
8872019-03-28 Alan Hayward <alan.hayward@arm.com>
888
889 * linux-low.c (AT_HWCAP2): Add define if not already included.
890
974c89e0
AH
8912019-03-26 Alan Hayward <alan.hayward@arm.com>
892
893 * linux-aarch64-low.c (aarch64_get_hwcap): Remove function.
894 (aarch64_arch_setup): Call linux_get_hwcap.
895 * linux-arm-low.c (arm_get_hwcap): Remove function.
896 (arm_read_description): Call linux_get_hwcap.
897 * linux-low.c (linux_get_auxv): New function.
898 (linux_get_hwcap): Likewise.
899 (linux_get_hwcap2): Likewise.
900 * linux-low.h (linux_get_hwcap): New declaration.
901 (linux_get_hwcap2): Likewise.
902 * linux-ppc-low.c (ppc_get_auxv): Remove function.
903 (ppc_arch_setup): Call linux_get_hwcap.
904 * linux-s390-low.c (s390_get_hwcap): Remove function.
905 (s390_arch_setup): Call linux_get_hwcap.
906
1ef53e6b
AH
9072019-03-22 Alan Hayward <alan.hayward@arm.com>
908 Jiong Wang <jiong.wang@arm.com>
909
910 * linux-aarch64-low.c (aarch64_store_pauthregset): New function.
911 * linux-low.c (regsets_store_inferior_registers): Allow optional reads
912 to fail.
913 * linux-low.h (enum regset_type): Add OPTIONAL_REGS.
914
ee4fbcfa
AH
9152019-03-22 Alan Hayward <alan.hayward@arm.com>
916 Jiong Wang <jiong.wang@arm.com>
917
918 * linux-aarch64-low.c (AARCH64_HWCAP_PACA): New define.
919 (aarch64_get_hwcap): New function.
920 (aarch64_arch_setup): Read APIA hwcap.
921
6dc0ebde
AH
9222019-03-22 Alan Hayward <alan.hayward@arm.com>
923 Jiong Wang <jiong.wang@arm.com>
924
925 * linux-aarch64-ipa.c (get_ipa_tdesc): Add pauth param.
926 (initialize_low_tracepoint): Likewise.
927 * linux-aarch64-low.c (aarch64_arch_setup): Likewise.
928 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Likewise.
929 * linux-aarch64-tdesc.c (struct target_desc): Likewise.
930 (aarch64_linux_read_description): Likewise.
931 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Likewise.
932
1163a4b7
JB
9332019-03-12 John Baldwin <jhb@FreeBSD.org>
934
935 * linux-x86-tdesc.c (i386_linux_read_description): Update call to
936 i386_create_target_description for 'segments' parameter.
937 * lynx-i386-low.c (lynx_i386_arch_setup): Likewise.
938 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
939 * win32-i386-low.c (i386_arch_setup): Likewise.
940
d3a70e03
TT
9412019-03-12 Tom Tromey <tromey@adacore.com>
942
943 * linux-low.c (iterate_over_lwps): Update.
944
37991b4f
TT
9452019-03-06 Tom Tromey <tom@tromey.com>
946
947 * server.c (detach_or_kill_for_exit_cleanup): Remove parameter.
948 (captured_main): Use SCOPE_EXIT.
949
45950eb6
SDJ
9502019-03-04 Sergio Durigan Junior <sergiodj@redhat.com>
951
952 * configure.srv: Use '$enable_unittest' instead of '$development'
953 when checking whether to fill 'srv_regobj' on 'aarch64*-*-linux*'
954 case.
955
43ac54fc
TT
9562019-02-27 Tom Tromey <tromey@adacore.com>
957
958 * gdbreplay.c (logchar): Handle \r\n.
959
df0da8a2
AH
9602019-02-07 Alan Hayward <alan.hayward@arm.com>
961
962 * linux-low.c (linux_attach): Add process before lwp.
963 * server.c (attach_inferior): Check if already attached.
964
1a5c2598
TT
9652019-02-07 Tom Tromey <tom@tromey.com>
966
967 * x86-tdesc.h: Rename include guard.
968 * x86-low.h: Add include guard.
969 * wincecompat.h: Rename include guard.
970 * win32-low.h: Add include guard.
971 * utils.h: Rename include guard.
972 * tracepoint.h: Rename include guard.
973 * tdesc.h: Rename include guard.
974 * target.h: Rename include guard.
975 * server.h: Rename include guard.
976 * remote-utils.h: Rename include guard.
977 * regcache.h: Rename include guard.
978 * nto-low.h: Rename include guard.
979 * notif.h: Add include guard.
980 * mem-break.h: Rename include guard.
981 * lynx-low.h: Add include guard.
982 * linux-x86-tdesc.h: Add include guard.
983 * linux-s390-tdesc.h: Add include guard.
984 * linux-ppc-tdesc-init.h: Add include guard.
985 * linux-low.h: Add include guard.
986 * linux-aarch64-tdesc.h: Add include guard.
987 * linux-aarch32-low.h: Add include guard.
988 * inferiors.h: Rename include guard.
989 * i387-fp.h: Rename include guard.
990 * hostio.h: Rename include guard.
991 * gdbthread.h: Rename include guard.
992 * gdb_proc_service.h: Rename include guard.
993 * event-loop.h: Rename include guard.
994 * dll.h: Rename include guard.
995 * debug.h: Rename include guard.
996 * ax.h: Rename include guard.
997
956cc47c
SN
9982018-01-30 Szabolcs Nagy <szabolcs.nagy@arm.com>
999
1000 PR gdb/23985
1001 * Makefile.in (IPAGENT_CFLAGS): Add UNDO_GNULIB_CFLAGS.
1002 (UNDO_GNULIB_CFLAGS): Undo gnulib replacements.
1003
a0707f3c
TT
10042019-01-25 Tom Tromey <tom@tromey.com>
1005
1006 * Makefile.in (INCLUDE_CFLAGS): Don't add -I for common.
1007
0747795c
TT
10082019-01-25 Tom Tromey <tom@tromey.com>
1009
1010 * win32-low.c: Fix common/ includes.
1011 * win32-i386-low.c: Fix common/ includes.
1012 * tracepoint.c: Fix common/ includes.
1013 * thread-db.c: Fix common/ includes.
1014 * target.h: Fix common/ includes.
1015 * symbol.c: Fix common/ includes.
1016 * spu-low.c: Fix common/ includes.
1017 * server.h: Fix common/ includes.
1018 * server.c: Fix common/ includes.
1019 * remote-utils.c: Fix common/ includes.
1020 * regcache.h: Fix common/ includes.
1021 * regcache.c: Fix common/ includes.
1022 * nto-x86-low.c: Fix common/ includes.
1023 * notif.h: Fix common/ includes.
1024 * mem-break.h: Fix common/ includes.
1025 * lynx-low.c: Fix common/ includes.
1026 * lynx-i386-low.c: Fix common/ includes.
1027 * linux-x86-tdesc-selftest.c: Fix common/ includes.
1028 * linux-x86-low.c: Fix common/ includes.
1029 * linux-low.c: Fix common/ includes.
1030 * inferiors.h: Fix common/ includes.
1031 * i387-fp.c: Fix common/ includes.
1032 * hostio.c: Fix common/ includes.
1033 * hostio-errno.c: Fix common/ includes.
1034 * gdbthread.h: Fix common/ includes.
1035 * gdbreplay.c: Fix common/ includes.
1036 * fork-child.c: Fix common/ includes.
1037 * event-loop.c: Fix common/ includes.
1038 * ax.c:
1039 (enum gdb_agent_op): Fix common/ includes.
1040
be6d4f74
TT
10412019-01-21 Tom Tromey <tom@tromey.com>
1042
1043 * tracepoint.c: Fix includes.
1044 * remote-utils.c: Fix includes.
1045 * linux-x86-low.c: Fix includes.
1046
66d91b39
JB
10472019-01-01 Joel Brobecker <brobecker@adacore.com>
1048
1049 * gdbreplay.c (gdbreplay_version): Update copyright year in
1050 version message.
1051 * server.c (gdbserver_version): Likewise.
1052
754e3168
AH
10532018-12-05 Alan Hayward <alan.hayward@arm.com>
1054
1055 * linux-low.c (add_lwp): Switch ordering.
1056
d105de22
TT
10572018-11-29 Tom Tromey <tom@tromey.com>
1058
1059 * win32-low.c (win32_join): Take pid, not process.
1060 * target.h (struct target_ops) <join>: Change argument type.
1061 (join_inferior): Change argument name.
1062 * spu-low.c (spu_join): Take pid, not process.
1063 * server.c (handle_detach): Preserve pid before destroying
1064 process.
1065 * lynx-low.c (lynx_join): Take pid, not process.
1066 * linux-low.c (linux_join): Take pid, not process.
1067
50138245
AH
10682018-11-23 Alan Hayward <alan.hayward@arm.com>
1069
1070 * linux-aarch64-low.c (aarch64_cannot_store_register): Remove.
1071 (aarch64_cannot_fetch_register): Likewise.
1072 (struct linux_target_ops): Update references.
1073
64f57f3d
PFC
10742018-10-31 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1075
1076 * linux-ppc-low.c: Include nat/linux-ptrace.h.
1077
8d619c01
EBM
10782018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1079
1080 * configure.srv (ipa_ppc_linux_regobj): Add
1081 powerpc-isa207-htm-vsx32l-ipa.o and
1082 powerpc-isa207-htm-vsx64l-ipa.o.
1083 (powerpc*-*-linux*): Add powerpc-isa207-htm-vsx32l.o and
1084 powerpc-isa207-htm-vsx64l.o to srv_regobj. Add
1085 rs6000/power-htm-spr.xml, rs6000/power-htm-core.xml,
1086 rs6000/power64-htm-core.xml, rs6000/power-htm-fpu.xml,
1087 rs6000/power-htm-altivec.xml, rs6000/power-htm-vsx.xml,
1088 rs6000/power-htm-ppr.xml, rs6000/power-htm-dscr.xml,
1089 rs6000/power-htm-tar.xml, rs6000/powerpc-isa207-htm-vsx32l.xml,
1090 and rs6000/powerpc-isa207-htm-vsx64l.xml to srv_xmlfiles.
1091 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
1092 <PPC_TDESC_ISA207_HTM_VSX>: New enum value.
1093 (init_registers_powerpc_isa207_htm_vsx32l)
1094 (init_registers_powerpc_isa207_htm_vsx64l): Declare.
1095 * linux-ppc-low.c (ppc_fill_tm_sprregset, ppc_store_tm_sprregset)
1096 (ppc_store_tm_cgprregset, ppc_store_tm_cfprregset)
1097 (ppc_store_tm_cvrregset, ppc_store_tm_cvsxregset)
1098 (ppc_store_tm_cpprregset, ppc_store_tm_cdscrregset)
1099 (ppc_store_tm_ctarregset): New functions.
1100 (ppc_regsets): Add entries for HTM regsets.
1101 (ppc_arch_setup): Set htm in features struct when needed. Set
1102 sizes for the HTM regsets.
1103 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_HTM_VSX.
1104 (initialize_low_arch): Call
1105 init_registers_powerpc_isa207_htm_vsx32l and
1106 init_registers_powerpc_isa207_htm_vsx64l.
1107 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
1108 PPC_TDESC_ISA207_HTM_VSX.
1109 (initialize_low_tracepoint): Call
1110 init_registers_powerpc_isa207_htm_vsx32l and
1111 init_registers_powerpc_isa207_htm_vsx64l.
1112
232bfb86
EBM
11132018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1114
1115 * configure.srv (powerpc*-*-linux*): Add rs6000/power-ebb.xml and
1116 rs6000/power-linux-pmu.xml to srv_xmlfiles.
1117 * linux-ppc-low.c (ppc_store_ebbregset, ppc_fill_pmuregset)
1118 (ppc_store_pmuregset): New functions.
1119 (ppc_regsets): Add entries for ebb and pmu regsets.
1120 (ppc_arch_setup): Set isa207 in features struct if the ebb and
1121 pmu regsets are available. Set sizes for these regsets.
1122
f2cf6173
EBM
11232018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1124
1125 * configure.srv (ipa_ppc_linux_regobj): Add
1126 powerpc-isa207-vsx64l-ipa.o and powerpc-isa207-vsx32l-ipa.o.
1127 (powerpc*-*-linux*): Add powerpc-isa207-vsx32l.o and
1128 powerpc-isa207-vsx64l.o to srv_regobj, add rs6000/power-tar.xml,
1129 rs6000/powerpc-isa207-vsx32l.xml, and
1130 rs6000/powerpc-isa207-vsx64l.xml to srv_xmlfiles.
1131 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
1132 <PPC_TDESC_ISA207_VSX>: New enum value.
1133 (init_registers_powerpc_isa207_vsx32l): Declare.
1134 (init_registers_powerpc_isa207_vsx64l): Declare.
1135 * linux-ppc-low.c (ppc_fill_tarregset): New function.
1136 (ppc_store_tarregset): New function.
1137 (ppc_regsets): Add entry for the TAR regset.
1138 (ppc_arch_setup): Set isa207 in features struct when needed. Set
1139 size for the TAR regsets.
1140 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_VSX.
1141 (initialize_low_arch): Call init_registers_powerpc_isa207_vsx32l
1142 and init_registers_powerpc_isa207_vsx64l.
1143 * linux-ppc-ipa.c (get_ipa_tdesc): Handle PPC_TDESC_ISA207_VSX.
1144 (initialize_low_tracepoint): Call
1145 init_registers_powerpc_isa207_vsx32l and
1146 init_registers_powerpc_isa207_vsx64l.
1147
7ca18ed6
EBM
11482018-10-26 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
1149 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1150
1151 * configure.srv (ipa_ppc_linux_regobj): Add
1152 powerpc-isa205-ppr-dscr-vsx32l-ipa.o and
1153 powerpc-isa205-ppr-dscr-vsx64l-ipa.o.
1154 (powerpc*-*-linux*): Add powerpc-isa205-ppr-dscr-vsx32l.o and
1155 powerpc-isa205-ppr-dscr-vsx64l.o to srv_regobj, add
1156 rs6000/power-dscr.xml, rs6000/power-ppr.xml,
1157 rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml and
1158 rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml to srv_xmlfiles.
1159 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
1160 <PPC_TDESC_ISA205_PPR_DSCR_VSX>: New enum value.
1161 (init_registers_powerpc_isa205_ppr_dscr_vsx32l)
1162 (init_registers_powerpc_isa205_ppr_dscr_vsx64l): Declare.
1163 * linux-ppc-low.c: Include "elf/common.h" and <sys/uio.h>.
1164 (ppc_hwcap): Add comment.
1165 (ppc_hwcap2): New global.
1166 (ppc_check_regset, ppc_fill_pprregset, ppc_store_pprregset)
1167 (ppc_fill_dscrregset, ppc_store_dscrregset): New functions.
1168 (ppc_regsets): Add entries for the DSCR and PPR regsets.
1169 (ppc_arch_setup): Get AT_HWCAP2. Set ppr_dscr in features struct
1170 when needed. Set sizes for the the DSCR and PPR regsets.
1171 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA205_PPR_DSCR_VSX.
1172 (initialize_low_arch): Call
1173 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
1174 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
1175 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
1176 PPC_TDESC_ISA205_PPR_DSCR_VSX.
1177 (initialize_low_tracepoint): Call
1178 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
1179 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
1180
5c849b22
PFC
11812018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1182
1183 * linux-ppc-low.c (ppc_fill_vrregset): Remove memset calls.
1184
8ecfd7bd
SDJ
11852018-10-10 Sergio Durigan Junior <sergiodj@redhat.com>
1186 Simon Marchi <simark@simark.ca>
1187
1188 * acinclude.m4: Include "../selftest.m4".
1189 * configure: Regenerate.
1190 * configure.ac: Use "GDB_AC_SELFTEST".
1191 * configure.srv: Use "$enable_unittests" instead of
1192 "$development" when checking whether unit tests have been
1193 enabled.
1194 * server.c (captured_main): Update message informing that
1195 selftests have been disabled.
1196
96643e35
TT
11972018-10-04 Tom Tromey <tom@tromey.com>
1198
1199 * configure: Rebuild.
1200
da4ae14a
TT
12012018-10-04 Tom Tromey <tom@tromey.com>
1202
1203 * server.c (handle_status): Rename inner "thread".
1204 (process_serial_event): Declare "res" in 'm' case.
1205 * linux-low.c (last_thread_of_process_p, find_lwp_pid)
1206 (iterate_over_lwps): Rename inner "thread".
1207 (linux_qxfer_libraries_svr4): Rename inner "len".
1208 * gdbthread.h (find_thread_in_random): Rename inner "thread".
1209
7c619dbd
GB
12102018-10-01 Gary Benson <gbenson@redhat.com>
1211
1212 * gdb_proc_service.h: Moved common code to
1213 common/gdb_proc_service.h.
1214
3795e814
GB
12152018-10-01 Gary Benson <gbenson@redhat.com>
1216
1217 * gdb_proc_service.h: Synchronize comments and whitespace with
1218 GDB's version of this file.
1219
49b036f1
TT
12202018-09-25 Tom Tromey <tom@tromey.com>
1221
1222 * configure: Rebuild.
1223 * configure.ac (WARN_CFLAGS): Don't remove -Wmissing-prototypes.
1224
8ff03f0b
SM
12252018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
1226
1227 * Makefile.in (gdbserver$(EXEEXT)): Sort OBS.
1228 (gdbreplay$(EXEEXT)): Sort GDBREPLAY_OBS.
1229 ($(IPA_LIB)): Sort IPA_OBJS.
1230
a1cd91dc
SM
12312018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
1232
1233 * Makefile.in: Remove references to $(ADD_DEPS).
1234
752312ba
TT
12352018-09-16 Tom Tromey <tom@tromey.com>
1236
1237 * remote-utils.c (remote_open): Use GNU style for metasyntactic
1238 variables.
1239 * gdbreplay.c (gdbreplay_usage): Use GNU style for metasyntactic
1240 variables.
1241
f1628857
TT
12422018-09-05 Tom Tromey <tom@tromey.com>
1243
1244 * configure: Rebuild.
1245
ad202fcc
SM
12462018-08-28 Simon Marchi <simon.marchi@polymtl.ca>
1247
1248 PR build/23399
1249 * tracepoint.c (IPA_SYM_STRUCT_NAME): Define.
1250
d3d8724a
TT
12512018-08-27 Tom Tromey <tom@tromey.com>
1252
1253 PR build/23087:
1254 * configure: Rebuild.
1255
b4f183d2
TT
12562018-08-27 Tom Tromey <tom@tromey.com>
1257
1258 * linux-s390-low.c (s390_emit_ext, s390_emit_litpool)
1259 (s390_emit_const, s390_emit_reg, s390_emit_zero_ext)
1260 (s390_emit_stack_adjust, s390_emit_set_r2, s390x_emit_ext)
1261 (s390x_emit_const, s390x_emit_reg, s390x_emit_zero_ext)
1262 (s390x_emit_stack_adjust): Add casts to unsigned char.
1263
4e2aa472
SM
12642018-08-22 Simon Marchi <simon.marchi@ericsson.com>
1265
1266 PR gdb/23374
1267 PR gdb/23375
1268 * server.h (struct client_state) <disable_randomization>:
1269 Initialize to 1.
1270
cf4088a9
SM
12712018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
1272
1273 * linux-mips-low.c (mips_collect_ptrace_register): Remove unused
1274 variable.
1275 (mips_supply_ptrace_register): Likewise.
1276
a0de763e
TT
12772018-07-22 Tom Tromey <tom@tromey.com>
1278
1279 * configure: Rebuild.
1280
b0a7723d
TT
12812018-07-22 Tom Tromey <tom@tromey.com>
1282
1283 * win32-low.c (win32_create_inferior): Remove unused variables.
1284 * gdbreplay.c (remote_open): Remove unused variable.
1285 * remote-utils.c (remote_prepare): Remove unused variable.
1286 * x86-tdesc.h (X86_TDESC_H): Define.
1287 (amd64_expedite_regs): Define conditionally.
1288 (i386_expedite_regs): Mark ATTRIBUTE_UNUSED.
1289 * linux-x86-tdesc.c (i386_tdescs): Move inside #if.
1290 * remote-utils.c (readchar): Remove unused variable.
1291
a780ef4f
PA
12922018-07-13 Pedro Alves <palves@redhat.com>
1293
1294 * linux-low.c (linux_kill): Change parameter to process_info
1295 pointer instead of pid. Adjust.
1296 * lynx-low.c (lynx_kill): Likewise.
1297 * nto-low.c (nto_kill): Likewise.
1298 * spu-low.c (spu_kill): Likewise.
1299 * win32-low.c (win32_kill): Likewise.
1300 * server.c (handle_v_kill, kill_inferior_callback)
1301 (detach_or_kill_for_exit): Adjust.
1302 * target.c (kill_inferior): Change parameter to process_info
1303 pointer instead of pid. Adjust.
1304 * target.h (struct target_ops) <kill>: Change parameter to
1305 process_info pointer instead of pid. Adjust all implementations
1306 and callers.
1307 (kill_inferior): Likewise.
1308
ef2ddb33
PA
13092018-07-13 Pedro Alves <palves@redhat.com>
1310
1311 * linux-low.c (linux_detach, linux_join): Change parameter to
1312 process_info pointer instead of pid. Adjust.
1313 * lynx-low.c (lynx_detach, lynx_join): Likewise.
1314 * nto-low.c (nto_detach): Likewise.
1315 * spu-low.c (spu_detach, spu_join): Likewise.
1316 * win32-low.c (win32_detach, win32_join): Likewise.
1317 * server.c (handle_detach, detach_or_kill_for_exit): Adjust.
1318 * target.h (struct target_ops) <detach, join>: Change parameter to
1319 process_info pointer instead of pid. Adjust all implementations
1320 and callers.
1321 (detach_inferior, join_inferior): Rename 'pid' parameter to
1322 'proc'.
1323
c7ab0aef
SDJ
13242018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
1325 Jan Kratochvil <jan.kratochvil@redhat.com>
1326 Paul Fertser <fercerpav@gmail.com>
1327 Tsutomu Seki <sekiriki@gmail.com>
1328
1329 * Makefile.in (SFILES): Add '$(srcdir)/common/netstuff.c'.
1330 (OBS): Add 'common/netstuff.o'.
1331 (GDBREPLAY_OBS): Likewise.
1332 * gdbreplay.c: Include 'wspiapi.h' and 'netstuff.h'.
1333 (remote_open): Implement support for IPv6
1334 connections.
1335 * remote-utils.c: Include 'netstuff.h', 'filestuff.h'
1336 and 'wspiapi.h'.
1337 (handle_accept_event): Accept connections from IPv6 sources.
1338 (remote_prepare): Handle IPv6-style hostnames; implement
1339 support for IPv6 connections.
1340 (remote_open): Implement support for printing connections from
1341 IPv6 sources.
1342
31445d10
PA
13432018-07-11 Pedro Alves <palves@redhat.com>
1344
1345 PR gdb/23377
1346 * mem-break.c (any_persistent_commands): Add process_info
1347 parameter and use it instead of relying on the current process.
1348 Change return type to bool.
1349 * mem-break.h (any_persistent_commands): Add process_info
1350 parameter and change return type to bool.
1351 * server.c (handle_detach): Remove require_running_or_return call.
1352 Look up the process_info for the process we're about to detach.
1353 If not found, return back error to GDB. Adjust
1354 any_persistent_commands call to pass down a process pointer.
1355
cb197132
PA
13562018-07-11 Pedro Alves <palves@redhat.com>
1357
1358 * i387-fp.c (i387_cache_to_fsave, cache_to_fxsave)
1359 (i387_cache_to_xsave): Use regcache_raw_get_unsigned_by_name
1360 instead of collect_register_by_name.
1361 * regcache.c (regcache_raw_get_unsigned_by_name): New.
1362 * regcache.h (regcache_raw_get_unsigned_by_name): New.
1363
1b919490
VB
13642018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
1365 Pedro Alves <palves@redhat.com>
1366
1367 * linux-low.c (initialize_low): Call linux_proc_init_warnings.
1368
d7e15655
TT
13692018-07-03 Tom Tromey <tom@tromey.com>
1370
1371 * linux-low.c: Update.
1372 * lynx-low.c: Update.
1373 * mem-break.c: Update.
1374 * nto-low.c: Update.
1375 * remote-utils.c: Update.
1376 * server.c: Update.
1377 * spu-low.c: Update.
1378 * target.c: Update.
1379 * win32-low.c: Update.
1380
26a57c92
TT
13812018-07-03 Tom Tromey <tom@tromey.com>
1382
1383 * server.c: Update.
1384
0e998d96
TT
13852018-07-03 Tom Tromey <tom@tromey.com>
1386
1387 * linux-low.c: Update.
1388
cc6bcb54
TT
13892018-07-03 Tom Tromey <tom@tromey.com>
1390
1391 * target.c: Update.
1392
e38504b3
TT
13932018-07-03 Tom Tromey <tom@tromey.com>
1394
1395 * linux-low.c: Update.
1396 * linux-mips-low.c: Update.
1397 * lynx-low.c: Update.
1398 * nto-low.c: Update.
1399 * remote-utils.c: Update.
1400 * server.c: Update.
1401 * spu-low.c: Update.
1402 * target.c: Update.
1403 * thread-db.c: Update.
1404
e99b03dc
TT
14052018-07-03 Tom Tromey <tom@tromey.com>
1406
1407 * linux-low.c: Update.
1408 * linux-mips-low.c: Update.
1409 * lynx-low.c: Update.
1410 * mem-break.c: Update.
1411 * nto-low.c: Update.
1412 * remote-utils.c: Update.
1413 * server.c: Update.
1414 * spu-low.c: Update.
1415 * target.c: Update.
1416 * tracepoint.c: Update.
1417
f2907e49
TT
14182018-07-03 Tom Tromey <tom@tromey.com>
1419
1420 * linux-low.c: Update.
1421 * linux-ppc-low.c: Update.
1422 * linux-x86-low.c: Update.
1423 * proc-service.c: Update.
1424 * server.c: Update.
1425 * spu-low.c: Update.
1426 * thread-db.c: Update.
1427 * win32-low.c: Update.
1428
fd79271b
TT
14292018-07-03 Tom Tromey <tom@tromey.com>
1430
1431 * linux-low.c: Update.
1432 * lynx-low.c: Update.
1433 * nto-low.c: Update.
1434 * remote-utils.c: Update.
1435 * spu-low.c: Update.
1436 * thread-db.c: Update.
1437 * win32-low.c: Update.
1438
c0867626
SDJ
14392018-06-29 Joel Brobecker <brobecker@adacore.com>
1440
1441 * linux-x86-tdesc.c (amd64_linux_read_description): Add missing
1442 parameter in call to 'amd64_create_target_description'.
1443
2512d7ef
JK
14442018-06-28 Jan Kratochvil <jan.kratochvil@redhat.com>
1445
1446 * x86-tdesc.h: Remove executable permission flag.
1447
d0ac1c44
SM
14482018-06-19 Simon Marchi <simon.marchi@ericsson.com>
1449
1450 * configure.ac: Remove AC_PREREQ, add missing quoting.
1451 * configure: Re-generate.
1452 * config.in: Re-generate.
1453 * aclocal.m4: Re-generate.
1454
c4eb05ff
SM
14552018-06-18 Simon Marchi <simon.marchi@ericsson.com>
1456
1457 * tracepoint.h (current_traceframe): Remove declaration.
1458
02895270
AH
14592018-06-18 Alan Hayward <alan.hayward@arm.com>
1460
1461 * linux-aarch64-low.c (is_sve_tdesc): New function.
1462 (aarch64_sve_regs_copy_to_regcache): Likewise.
1463 (aarch64_sve_regs_copy_from_regcache): Likewise.
1464 (aarch64_regs_info): Add SVE checks.
1465 (initialize_low_arch): Initialize SVE.
1466
e9902bfc
AH
14672018-06-18 Alan Hayward <alan.hayward@arm.com>
1468
1469 * Makefile.in: Add aarch64-sve-linux-ptrace.c.
1470
fefa175e
AH
14712018-06-11 Alan Hayward <alan.hayward@arm.com>
1472
1473 * linux-aarch64-ipa.c (get_ipa_tdesc): Add null VQ param.
1474 (initialize_low_tracepoint): Likewise
1475 * linux-aarch64-low.c (aarch64_arch_setup): Get VQ.
1476 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Add null VQ
1477 param.
1478 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add VQ
1479 checks.
1480 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Add VQ.
1481
b91ad3ff
AH
14822018-06-11 Alan Hayward <alan.hayward@arm.com>
1483
1484 * server.h (PBUFSIZ): Increase size
1485
f868386e
AH
14862018-06-11 Alan Hayward <alan.hayward@arm.com>
1487
1488 * regcache.c (regcache::raw_compare): New function.
1489 * regcache.h (regcache::raw_compare): New declaration.
1490
9c861883
AH
14912018-06-11 Alan Hayward <alan.hayward@arm.com>
1492
1493 * regcache.c (new_register_cache): Use new.
1494 (free_register_cache): Use delete.
1495 (register_data): Use const.
1496 (supply_register): Move body inside regcache.
1497 (regcache::raw_supply): New override function.
1498 (collect_register): Move body inside regcache.
1499 (regcache::raw_collect): New override function.
1500 (regcache::get_register_status): New override function.
1501 * regcache.h (struct regcache): Inherit from reg_buffer_common.
1502
40591844
TT
15032018-06-09 Tom Tromey <tom@tromey.com>
1504
1505 * event-loop.c (gdb_event, gdb_event_p): Remove typedefs. Don't
1506 declare queue.
1507 (event_queue): Use std::queue.
1508 (gdb_event_xfree): Remove.
1509 (initialize_event_loop, process_event, wait_for_event): Update.
1510
6341380d
SC
15112018-06-08 Stan Cox <scox@redhat.com>
1512
1513 * win32-low.c (win32_create_inferior): last_ptid and last_status
1514 moved to client_state.
1515
03349c93
PA
15162018-06-08 Pedro Alves <palves@redhat.com>
1517
1518 * Makefile.in (GDBREPLAY_OBS): Add common/cleanups.o,
1519 common/common-exceptions.o, common/common-utils.o,
1520 common/errors.o, common/print-utils.o and utils.o.
1521 * gdbreplay.c: Include "common-defs.h" instead of the two
1522 'config.h's here. Don't include stdio.h, errno.h, stdlib.h,
1523 string.h or alloca.h.
1524 (perror_with_name): Delete.
1525 (remote_open): Use xstrdup instead of strdup.
1526 (main): Rename to ...
1527 (captured_main): ... this.
1528 (main): New.
1529
8dcc53b3
TT
15302018-06-08 Tom Tromey <tom@tromey.com>
1531
1532 * linux-low.c (linux_low_read_btrace): Update.
1533
c12a5089
SC
15342018-06-04 Stan Cox <scox@redhat.com>
1535
1536 * server.h (struct client_state): New.
1537 * server.c (cont_thread, general_thread, multi_process)
1538 (report_fork_events, report_vfork_events, report_exec_events)
1539 (report_thread_events, swbreak_feature, hwbreak_feature)
1540 (vCont_supported, disable_randomization, pass_signals)
1541 (program_signals, program_signals_p, last_status, last_ptid, own_buf):
1542 Moved to client_state.
1543 * remote-utils.c (remote_debug, noack_mode)
1544 (transport_is_reliable): Moved to client_state.
1545 * tracepoint.c (current_traceframe): Moved to client_state.
1546
1547 Update all callers.
1548 * server.c, remote-utils.c, tracepoint.c, fork-child.c,
1549 linux-low.c, remote-utils.h, target.c: Use client_state.
1550
122394f1
AH
15512018-05-31 Alan Hayward <alan.hayward@arm.com>
1552
1553 * configure.srv: Add new c/h file.
1554
95228a0d
AH
15552018-05-31 Alan Hayward <alan.hayward@arm.com>
1556
1557 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add
1558 null VQ.
1559
d8dab6c3
MR
15602018-05-25 Maciej W. Rozycki <macro@mips.com>
1561
1562 * gdb.arch/mips-fpregset-core.exp: New test.
1563 * gdb.arch/mips-fpregset-core.c: New test source.
1564
81e25b7c
EK
15652018-05-23 Erik Kurzinger <ekurzinger@nvidia.com>
1566
1567 PR server/23198
1568 * hostio.c (require_int): Do not report overflow for integers
1569 between 0xfffffff and 0x7fffffff.
1570
7e947ad3
MR
15712018-05-22 Maciej W. Rozycki <macro@mips.com>
1572
1573 * linux-mips-low.c [HAVE_PTRACE_GETREGS] (mips_collect_register)
1574 (mips_supply_register): Move outside HAVE_PTRACE_GETREGS.
1575 (mips_collect_ptrace_register, mips_supply_ptrace_register): New
1576 functions.
1577 (the_low_target): Wire them.
1578
1d75a658
PFC
15792018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1580
1581 * linux-ppc-low.c (ppc_fill_vrregset): Add vscr_offset variable.
1582 Set vscr_offset to 0 in little-endian mode and 12 in big-endian
1583 mode. Call collect_register_by_name with vscr using
1584 vscr_offset. Zero-pad vscr and vrsave fields in collector buffer.
1585 (ppc_store_vrregset): Add and set vscr_offset variable as in
1586 ppc_fill_vrregset. Call supply_register_by_name with vscr using
1587 vscr_offset.
1588
d078308a
PFC
15892018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1590
1591 * linux-ppc-low.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
1592 (ppc_arch_setup): Change SIZEOF_VRREGS and SIZEOF_VSXREGS to
1593 PPC_LINUX_SIZEOF_VRREGSET and PPC_LINUX_SIZEOF_VSXREGSET.
1594
7273b5fc
PFC
15952018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1596
1597 * linux-ppc-low.c (ppc_fill_vsxregset): Remove ppc_hwcap check.
1598 (ppc_store_vsxregset): Likewise.
1599 (ppc_fill_vrregset): Likewise.
1600 (ppc_store_vrregset): Likewise.
1601 (ppc_fill_evrregset): Likewise.
1602 (ppc_store_evrregset): Likewise.
1603 (ppc_regsets): Set VSX/VR/EVR regset sizes to 0.
1604 (ppc_arch_setup): Iterate through ppc_regsets and set sizes when
1605 needed.
1606
2e077f5e
PFC
16072018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1608
1609 * linux-ppc-low.c (ppc_arch_setup): Remove code for getting the
1610 wordsize of the inferior. Call ppc_linux_target_wordsize.
1611
bd64614e
PFC
16122018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1613
1614 * configure.srv (srv_tgtobj): Add arch/ppc-linux-common.o.
1615 * Makefile.in (SFILES): Add arch/ppc-linux-common.c.
1616 * linux-ppc-tdesc.h: Rename to linux-ppc-tdesc-init.h.
1617 * linux-ppc-tdesc-init.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
1618 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
1619 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
1620 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
1621 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
1622 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
1623 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
1624 (tdesc_powerpc_e500l): Remove.
1625 * linux-ppc-ipa.c: Include arch/ppc-linux-tdesc.h and
1626 linux-ppc-tdesc-init.h. Don't include linux-ppc-tdesc.h.
1627 * linux-ppc-low.c: Include arch/ppc-linux-common.h,
1628 arch/ppc-linux-tdesc.h, and linux-ppc-tdesc-init.h. Don't include
1629 linux-ppc-tdesc.h.
1630 (ppc_arch_setup): Remove target description matching code. Fill a
1631 ppc_linux_features struct and call ppc_linux_match_description
1632 with it.
1633
75d74cca
MR
16342018-05-22 Maciej W. Rozycki <macro@mips.com>
1635
1636 * linux-mips-low.c (mips_cannot_fetch_register): Return 1 if the
1637 width of the requested register exceeds the width of the
1638 `ptrace' data type.
1639 (mips_cannot_store_register): Likewise.
1640
e4439e43
MR
16412018-05-21 Maciej W. Rozycki <macro@mips.com>
1642
1643 * linux-mips-low.c (mips_fetch_register): New function. Update
1644 preceding comment.
1645 (mips_store_gregset): Supply 0 rather than $restart for $zero.
1646 (the_low_target): Wire `mips_fetch_register'.
1647
55271bf9
JB
16482018-05-10 Joel Brobecker <brobecker@adacore.com>
1649
1650 * lynx-i386-low.c (LYNXOS_178): New macro.
1651 [LYNXOS_178] (usr_fcontext_t): Provide a definition that matches
1652 the layout on LynxOS-178.
1653 (lynx_i386_fill_fpregset, lynx_i386_store_fpregset): Do not
1654 handle floating point registers that are not supported by
1655 LynxOS-178.
1656
1a34f210
TT
16572018-05-10 Tom Tromey <tom@tromey.com>
1658
1659 * configure: Rebuild.
1660
190852c8
JB
16612018-05-10 Joel Brobecker <brobecker@adacore.com>
1662
1663 PR server/23158:
1664 * tdesc.h (init_target_desc) <expedite_regs>: New parameter.
1665 * tdesc.c (init_target_desc) <expedite_regs>: New parameter.
1666 Use it to set the expedite_regs field in the given tdesc.
1667 * x86-tdesc.h: New file.
1668 * linux-aarch64-tdesc.c (aarch64_linux_read_description):
1669 Adjust following the addition of the new expedite_regs parameter
1670 to init_target_desc.
1671 * linux-tic6x-low.c (tic6x_read_description): Likewise.
1672 * linux-x86-tdesc.c: #include "x86-tdesc.h".
1673 (i386_linux_read_description, amd64_linux_read_description):
1674 Adjust following the addition of the new expedite_regs parameter
1675 to init_target_desc.
1676 * lynx-i386-low.c: #include "x86-tdesc.h".
1677 (lynx_i386_arch_setup): Adjust following the addition of the new
1678 expedite_regs parameter to init_target_desc.
1679 * nto-x86-low.c: #include "x86-tdesc.h".
1680 (nto_x86_arch_setup): Adjust following the addition of the new
1681 expedite_regs parameter to init_target_desc.
1682 * win32-i386-low.c: #include "x86-tdesc.h".
1683 (i386_arch_setup): Adjust following the addition of the new
1684 expedite_regs parameter to init_target_desc.
1685
7dbac825
JB
16862018-05-10 Joel Brobecker <brobecker@adacore.com>
1687
1688 PR server/23158:
1689 * win32-low.c (win32_create_inferior): Add call to my_wait
1690 setting last_status global.
1691
906994d9
JB
16922018-05-10 Joel Brobecker <brobecker@adacore.com>
1693
1694 PR server/23158:
1695 * win32-low.c (create_process): Only call gdb_tilde_expand if
1696 inferior_cwd is not NULL.
1697
8ee22052
AB
16982018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
1699
1700 * i387-fp.c (i387_cache_to_xsave): Only write x87 control
1701 registers to the cache if their values have changed.
1702 (i387_xsave_to_cache): Provide default values for x87 control
1703 registers when these features are available, but disabled.
1704 * regcache.c (supply_register_by_name_zeroed): New function.
1705 * regcache.h (supply_register_by_name_zeroed): Declare new
1706 function.
1707
aff689d3
TT
17082018-05-07 Tom Tromey <tom@tromey.com>
1709
1710 * configure: Rebuild.
1711
85e26832
TT
17122018-05-04 Tom Tromey <tom@tromey.com>
1713
1714 * configure: Rebuild.
1715
a3b60e45
JK
17162018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
1717 Pedro Alves <palves@redhat.com>
1718
1719 * linux-aarch64-low.c (aarch64_stopped_data_address):
1720 Likewise.
1721
632e107b
TT
17222018-04-27 Tom Tromey <tom@tromey.com>
1723
1724 * configure: Rebuild.
1725
458412c3
TT
17262018-04-23 Tom Tromey <tom@tromey.com>
1727
1728 * configure: Rebuild.
1729
f31c089e
SM
17302018-04-19 Simon Marchi <simon.marchi@ericsson.com>
1731
1732 * Makefile.in (depcomp): Add "..".
1733 (all_deps_files): New and use it.
1734
b319b098
AH
17352018-04-18 Alan Hayward <alan.hayward@arm.com>
1736
1737 * configure.srv (aarch64*-*-linux*): Don't include xml.
1738 (i[34567]86-*-cygwin*): Likewise.
1739 (i[34567]86-*-linux*): Likewise.
1740 (i[34567]86-*-lynxos*): Likewise.
1741 (i[34567]86-*-mingw32ce*): Likewise.
1742 (i[34567]86-*-mingw*): Likewise.
1743 (i[34567]86-*-nto*): Likewise.
1744 (tic6x-*-uclinux): Likewise.
1745 (x86_64-*-linux*): Likewise.
1746 (x86_64-*-mingw*): Likewise.
1747 (x86_64-*-cygwin*): Likewise.
1748
3b74854b
AH
17492018-04-18 Alan Hayward <alan.hayward@arm.com>
1750
1751 * tdesc.c: Remove xml parameter.
1752
e98577a9
AH
17532018-04-18 Alan Hayward <alan.hayward@arm.com>
1754
1755 * server.c (get_features_xml): Remove cast.
1756 * tdesc.c (void target_desc::accept): Fill in function.
1757 (tdesc_get_features_xml): Remove old xml creation.
1758 (print_xml_feature::visit_pre): Add xml vistor.
1759 * tdesc.h (struct target_desc): Make xmltarget mutable.
1760 (tdesc_get_features_xml): Remove declaration.
1761
d278f585
AH
17622018-04-18 Alan Hayward <alan.hayward@arm.com>
1763
1764 * tdesc.c (tdesc_architecture_name): Add new function.
1765 (tdesc_osabi_name): Likewise.
1766 (tdesc_get_features_xml): Use new functions.
1767
eee8a18d
AH
17682018-04-18 Alan Hayward <alan.hayward@arm.com>
1769
1770 * tdesc.c (tdesc_create_flags): Remove.
1771 (tdesc_add_flag): Likewise.
1772 (tdesc_named_type): Likewise.
1773 (tdesc_create_union): Likewise.
1774 (tdesc_create_struct): Likewise.
1775 (tdesc_create_vector): Likewise.
1776 (tdesc_add_bitfield): Likewise.
1777 (tdesc_add_field): Likewise.
1778 (tdesc_set_struct_size): Likewise.
1779
82ec9bc7
AH
17802018-04-18 Alan Hayward <alan.hayward@arm.com>
1781
1782 * tdesc.c (~target_desc): Remove implictly deleted items.
1783 (init_target_desc): Iterate all features.
1784 (tdesc_get_features_xml): Use vector.
1785 (tdesc_create_feature): Create feature.
1786 * tdesc.h (tdesc_feature) Remove
1787 (target_desc): Add features.
1788
ea3e7d71
AH
17892018-04-18 Alan Hayward <alan.hayward@arm.com>
1790
1791 * Makefile.in: Add common/tdesc.c
1792 * tdesc.c (init_target_desc): init all reg_defs from register
1793 vector.
1794 (tdesc_create_reg): Create tdesc_reg.
1795 * tdesc.h (tdesc_feature): Add register vector.
1796
17d08cd4
SM
17972018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
1798
1799 * tdesc.h (struct target_desc) <features>: Change type to
1800 std::vector<std::string>.
1801 * tdesc.c (target_desc::~target_desc): Adjust to std::vector
1802 changes.
1803 (tdesc_get_features_xml): Likewise.
1804 (tdesc_create_feature): Likewise.
1805
5cd3e386
AH
18062018-03-26 Alan Hayward <alan.hayward@arm.com>
1807
1808 * regcache.c (find_register_by_number): Return a ref.
1809 (find_regno): Use references.
1810 (register_size): Likewise.
1811 (register_data): Likewise.
1812 * tdesc.c (target_desc::~target_desc): Remove free calls.
1813 (target_desc::operator==): Use std::vector compare.
1814 (init_target_desc): Use reference.
1815 (tdesc_create_reg): Use reg constructors.
1816 * tdesc.h (struct target_desc): Replace pointer with object.
1817
dff7492c
AH
18182018-03-23 Alan Hayward <alan.hayward@arm.com>
1819
1820 * regcache.c (find_register_by_number): Make static.
1821 (find_regno): Use find_register_by_number
1822 * regcache.h (struct reg): Remove declaration.
1823
d80e5242
AH
18242018-03-23 Alan Hayward <alan.hayward@arm.com>
1825
1826 * tdesc.c (target_desc::~target_desc): Move to here.
1827 (target_desc::operator==): Likewise.
1828 * tdesc.h (target_desc::~target_desc): Move from here.
1829 (target_desc::operator==): Likewise.
1830
f69c5afb
AA
18312018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
1832
1833 * linux-s390-low.c (s390_get_wordsize): Correct brace style.
1834
ce29f843
AA
18352018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1836
1837 * linux-s390-ipa.c (get_ipa_tdesc): Add handling for
1838 S390_TDESC_GS.
1839 * linux-s390-low.c (s390_get_ipa_tdesc_idx): Likewise.
1840 (initialize_low_tracepoint): Call init_registers_s390x_gs_linux64
1841 and init_registers_s390_gs_linux64.
1842
c49bd90b
AA
18432018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1844
1845 * linux-s390-low.c (s390_fill_gs): Remove function.
1846 (s390_fill_gsbc): Remove function.
1847 (s390_regsets): Set fill functions for the guarded storage regsets
1848 to NULL.
1849
7edb9bd3
AA
18502018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1851
1852 * linux-s390-low.c (s390_get_hwcap): Replace tdesc parameter by
1853 the word size. Add comment.
1854 (s390_get_wordsize): New function.
1855 (s390_arch_setup): No longer select a temporary tdesc to fetch the
1856 pswm with it. Instead, use s390_get_wordsize to determine the
1857 word size first and derive the correct tdesc from that directly.
1858
39be3c7e
SM
18592018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
1860
1861 * Makefile.in: Include silent-rules.mk.
1862 (srcdir, abs_top_srcdir, abs_srcdir, VPATH): Move up.
1863 (COMPILE): Add ECHO_CXX.
1864 (gdbserver$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
1865 (gdbreplay$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
1866 ($(IPA_LIB)): Add SILENCE and ECHO_CXXLD.
1867 (version-generated.c): Add ECHO_GEN.
1868 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN_GENERATED.
1869 (IPAGENT_COMPILE): Add ECHO_CXX.
1870 (%-generated.c): Add ECHO_REGDAT.
1871
3ae9ce5d
TT
18722018-03-14 Tom Tromey <tom@tromey.com>
1873
1874 PR cli/14977:
1875 * ax.c (ax_printf): Special case for NULL.
1876
e6a58aa8
SM
18772018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
1878
1879 * linux-low.c (linux_qxfer_libraries_svr4): Use
1880 xml_escape_text_append.
1881
f6e8a41e
SM
18822018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
1883
1884 * linux-low.c (linux_qxfer_libraries_svr4): Use std::string.
1885
b9671caf
SM
18862018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
1887
1888 * server.c (handle_general_set): Remove unnecessary xstrdup.
1889
e80aaf61
SM
18902018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
1891
1892 * server.c (parse_debug_format_options): Adjust to
1893 delim_string_to_char_ptr_vec changes.
1894 * thread-db.c (thread_db_load_search): Adjust to
1895 dirnames_to_char_ptr_vec changes.
1896
b1223e78
MM
18972018-03-01 Markus Metzger <markus.t.metzger@intel.com>
1898
1899 * target.h (target_enable_btrace, target_disable_btrace)
1900 (target_read_btrace, target_read_btrace_conf): Turn macro into
1901 inline function. Throw error if target method is not defined.
1902 * server.c (handle_qxfer_btrace handle_qxfer_btrace_conf): Remove
1903 check for btrace target method. Be prepared to handle exceptions
1904 from btrace target methods.
1905
81561546
SDJ
19062018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
1907
1908 * server.c (captured_main): Change order of error message printed
1909 when the current working directory cannot be found.
1910
25e3c82c
SDJ
19112018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
1912
1913 * server.c: Include "filenames.h" and "pathstuff.h".
1914 (program_name): Delete variable.
1915 (program_path): New anonymous class.
1916 (get_exec_wrapper): Use "program_path" instead of
1917 "program_name".
1918 (handle_v_run): Likewise.
1919 (captured_main): Likewise.
1920 (process_serial_event): Likewise.
1921
b4987c95
SDJ
19222018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
1923
1924 * Makefile.in (SFILES): Add "$(srcdir)/common/pathstuff.c".
1925 (OBJS): Add "pathstuff.o".
1926 * server.c (current_directory): New global variable.
1927 (captured_main): Initialize "current_directory".
1928
f46cd62a
AH
19292018-02-26 Alan Hayward <alan.hayward@arm.com>
1930
1931 * tdesc.c: Use common/tdesc.h.
1932 * tdesc.h: Likewise.
1933
a543c5ca
AH
19342018-02-20 Alan Hayward <alan.hayward@arm.com>
1935 Simon Marchi <simon.marchi@ericsson.com>
1936
1937 * Makefile.in: Switch order of make rules.
1938
b5884fa7
AH
19392018-02-19 Alan Hayward <alan.hayward@arm.com>
1940
1941 * Makefile.in: Add common directory in build.
1942 * configure.ac: Add common reference.
1943 * configure: Regenerate.
1944
de6242d3
MM
19452018-02-09 Markus Metzger <markus.t.metzger@intel.com>
1946
1947 * linux-low.c (linux_target_ops): Remove linux_supports_btrace.
1948 * nto-low.c (nto_target_ops): Remove NULL for supports_btrace.
1949 * spu-low.c (spu_target_ops): Likewise.
1950 * win32-low.c (win32_target_ops): Likewise.
1951 * server.c (supported_btrace_packets): Report packets unconditionally.
1952 * target.h (target_ops) <supports_btrace>: Remove.
1953 (target_supports_btrace): Remove.
1954
9ee23a85
MM
19552018-02-09 Markus Metzger <markus.t.metzger@intel.com>
1956
1957 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt)
1958 (handle_btrace_disable): Change return type to void. Use exceptions
1959 to report errors.
1960 (handle_btrace_general_set): Catch exception and copy message to
1961 return message.
1962
8ce47547
TT
19632018-02-08 Tom Tromey <tom@tromey.com>
1964
1965 * linux-low.c (install_software_single_step_breakpoints): Use
1966 make_scoped_restore.
1967 * inferiors.c (make_cleanup_restore_current_thread): Remove.
1968 (do_restore_current_thread_cleanup): Remove.
1969 * gdbthread.h (make_cleanup_restore_current_thread): Don't
1970 declare.
1971
45dd3607
TT
19722018-02-08 Tom Tromey <tom@tromey.com>
1973
1974 * mem-break.c (set_raw_breakpoint_at): Use
1975 gdb::unique_xmalloc_ptr.
1976
e671cd59
PA
19772018-01-30 Pedro Alves <palves@redhat.com>
1978
1979 PR gdb/13211
1980 * target.c (target_terminal::terminal_state): Rename to ...
1981 (target_terminal::m_terminal_state): ... this.
1982
a0aad537
JC
19832018-01-19 James Clarke <jrtc27@jrtc27.com>
1984
1985 * linux-low.c (handle_extended_wait): Surround call to
1986 thread_db_notice_clone with #ifdef USE_THREAD_DB.
1987
4d9b86e1
SM
19882018-01-17 Simon Marchi <simon.marchi@ericsson.com>
1989
1990 * linux-low.c (attach_proc_task_lwp_callback): Adjust to
1991 linux_ptrace_attach_fail_reason_string now returning an
1992 std::string.
1993 (linux_attach): Likewise.
1994 * thread-db.c (attach_thread): Likewise.
1995
f517c180
EA
19962018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
1997
1998 PR gdb/21559
1999 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
2000 checking for fs_base/gs_base fields in struct user_regs_struct.
2001 * configure: Regenerate.
2002
9a70f35c
YQ
20032018-01-16 Yao Qi <yao.qi@linaro.org>
2004
2005 PR gdb/18749
2006 * linux-low.c (fetch_register): Call supply_register instead of
2007 error.
2008
605fd3c6
YQ
20092018-01-08 Yao Qi <yao.qi@linaro.org>
2010 Simon Marchi <simon.marchi@ericsson.com>
2011
2012 * Makefile.in (OBS): Remove selftest.o.
2013 * configure.ac: Set srv_selftest_objs if $development is true.
2014 (GDBSERVER_DEPFILES): Append $srv_selftest_objs.
2015 * configure: Re-generated.
2016 * server.c (captured_main): Wrap variable selftest_filter with
2017 GDB_SELF_TEST.
2018
2cc05030
SM
20192018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
2020
2021 * server.c (parse_debug_format_options): Return std::string.
2022 (handle_monitor_command, captured_main): Adjust.
2023
e379cee6
PA
20242018-01-05 Pedro Alves <palves@redhat.com>
2025
2026 PR gdb/18653
2027 * server.c (captured_main): Pass quiet=false to
2028 save_original_signals_state.
2029
82e1e79a
JB
20302018-01-01 Joel Brobecker <brobecker@adacore.com>
2031
2032 * gdbreplay.c (gdbreplay_version): Update copyright year in
2033 version message.
2034 * server.c (gdbserver_version): Likewise.
2035
8e481c3b
TT
20362017-12-08 Tom Tromey <tom@tromey.com>
2037
2038 * ax.c (ax_printf): Update.
2039
a8806230
YQ
20402017-12-07 Yao Qi <yao.qi@linaro.org>
2041
2042 * linux-aarch64-ipa.c (initialize_low_tracepoint): Call
2043 aarch64_linux_read_description.
2044 * linux-amd64-ipa.c (idx2mask): New array.
2045 (get_ipa_tdesc): Move idx2mask out.
2046 (initialize_low_tracepoint): Initialize target descriptions.
2047 * linux-i386-ipa.c (idx2mask): New array.
2048 (get_ipa_tdesc): Move idx2mask out.
2049 (initialize_low_tracepoint): Initialize target descriptions.
2050
d4a0e8b5
SM
20512017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
2052
2053 * tdesc.c (struct tdesc_type): Change return type.
2054 (tdesc_add_flag): Change parameter type.
2055 (tdesc_add_bitfield): Likewise.
2056 (tdesc_add_field): Likewise.
2057 (tdesc_set_struct_size): Likewise.
2058
798a7429
SM
20592017-12-05 Simon Marchi <simon.marchi@ericsson.com>
2060
2061 * regcache.c (registers_to_string): Remove unused variable.
2062
c0e15c9b
SM
20632017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2064
2065 * inferiors.c (for_each_inferior_with_data): Remove.
2066 * inferiors.h (for_each_inferior_with_data): Remove.
2067 * server.c (handle_qxfer_threads_worker): Change parameter type.
2068 (handle_qxfer_threads_proper): Use for_each_thread.
2069
f0045347
SM
20702017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2071
2072 * inferiors.c (for_each_inferior): Remove.
2073 (clear_inferiors): Use for_each_thread.
2074 * inferiors.h (for_each_inferior): Remove.
2075 * linux-low.c (linux_wait_for_event_filtered): Use
2076 for_each_thread.
2077 (linux_stabilize_threads): Likewise.
2078 * regcache.c (regcache_release): Likewise.
2079 * server.c (gdb_wants_all_threads_stopped): Likewise.
2080 (clear_pending_status_callback): Remove.
2081 (handle_status): Use for_each_thread.
2082 (captured_main): Likewise.
2083 * win32-low.c (child_init_thread_list): Likewise.
2084 (win32_clear_inferiors): Likewise.
2085 (fake_breakpoint_event): Likewise.
2086
9521758b
SM
20872017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2088
2089 * inferiors.h (find_inferior): Remove.
2090 * inferiors.c (find_inferior): Remove.
2091
8f86d7aa
SM
20922017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2093
2094 * linux-low.c (resume_status_pending_p): Update comment.
2095 (need_step_over_p): Update comment.
2096
e2b44075
SM
20972017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2098
2099 * linux-low.c (proceed_one_lwp): Return void, change parameter
2100 type.
2101 (unsuspend_and_proceed_one_lwp): Likewise.
2102 (proceed_all_lwps): Use for_each_thread.
2103 (unstop_all_lwps): Likewise.
2104
c80825ff
SM
21052017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2106
2107 * linux-low.c (linux_resume_one_thread): Return void, take
2108 parameter directly.
2109 (linux_resume): Use for_each_thread.
2110
df3e4dbe
SM
21112017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2112
2113 * linux-low.c (send_sigstop_callback): Return void, change
2114 parameter type. Rename to...
2115 (send_sigstop): ... this.
2116 (suspend_and_send_sigstop_callback): Return void, change parameter
2117 type. Rename to...
2118 (suspend_and_send_sigstop): ... this.
2119 (stop_all_lwps): Use for_each_thread.
2120
5a6b0a41
SM
21212017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2122
2123 * linux-low.c (lwp_running): Return bool, remove unused
2124 argument.
2125 (linux_stabilize_threads): Use find_thread.
2126
39a64da5
SM
21272017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2128
2129 * linux-low.c (select_singlestep_lwp_callback): Remove.
2130 (count_events_callback): Remove.
2131 (select_event_lwp_callback): Remove.
2132 (select_event_lwp): Use find_thread/for_each_thread.
2133
a1385b7b
SM
21342017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2135
2136 * linux-low.c (not_stopped_callback): Return bool, take filter
2137 argument directly.
2138 (linux_wait_for_event_filtered): Use find_thread.
2139 (linux_wait_1): Likewise.
2140
454296a2
SM
21412017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2142
2143 * linux-low.c (same_lwp): Remove.
2144 (find_lwp_pid): Use find_thread.
2145
6b2a85da
SM
21462017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2147
2148 * linux-low.c (delete_lwp_callback): Remove.
2149 (linux_mourn): Use for_each_thread.
2150
798a38e8
SM
21512017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2152
2153 * linux-low.c (linux_detach_lwp_callback): Return void, remove
2154 args parameter, don't check for pid.
2155 (linux_detach): Use for_each_thread.
2156
e4eb0dec
SM
21572017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2158
2159 * linux-low.c (struct counter): Remove.
2160 (second_thread_of_pid_p): Remove.
2161 (last_thread_of_process_p): Use find_thread.
2162
83e1b6c1
SM
21632017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2164
2165 * inferiors.c (find_inferior_in_random): Remove.
2166 * inferiors.h (find_inferior_in_random): Remove.
2167 * linux-low.c (status_pending_p_callback): Return bool, accept
2168 parameter ptid directly.
2169 (linux_wait_for_event_filtered): Use find_thread_in_random.
2170 (linux_wait_1): Likewise.
2171
8dc7b443
SM
21722017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2173
2174 * inferiors.c (find_inferior_id): Remove.
2175 (find_thread_ptid): Move implemention from find_inferior_id to
2176 here.
2177 * inferiors.h (find_inferior_id): Remove.
2178 * server.c (handle_status): Use find_thread_ptid.
2179 (process_serial_event): Likewise.
2180 * thread-db.c (find_one_thread): Likewise.
2181 (thread_db_thread_handle): Likewise.
2182 * win32-low.c (thread_rec): Likewise.
2183 (child_delete_thread): Likewise.
2184 (win32_thread_alive): Likewise.
2185 (get_child_debug_event): Likewise.
2186
da25033c
SM
21872017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2188
2189 * linux-mips-low.c (update_watch_registers_callback): Return
2190 void, remove pid_p parameter, don't check for pid.
2191 (mips_insert_point, mips_remove_point): Use for_each_thread.
2192
c91bb56b
SM
21932017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2194
2195 * lynx.low (lynx_delete_thread_callback): Remove.
2196 (lynx_mourn): Use for_each_thread.
2197
634a3254
SM
21982017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2199
2200 * regcache.c (regcache_invalidate_one): Remove.
2201 (regcache_invalidate_pid): use for_each_thread.
2202
41272101
TT
22032017-11-26 Tom Tromey <tom@tromey.com>
2204
2205 * linux-low.c (linux_create_inferior): Update.
2206
f5291a6f
UW
22072017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
2208
2209 * spu-low.c (spu_create_inferior): Fix typo in argument name.
2210
6654d750
AH
22112017-11-24 Alan Hayward <alan.hayward@arm.com>
2212
2213 * configure.srv: Add linux-aarch64-tdesc-selftest.o.
2214 * linux-aarch64-low.c (initialize_low_arch): Call init func.
2215 * linux-aarch64-tdesc-selftest.c: New file.
2216 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
2217
22182017-11-24 Alan Hayward <alan.hayward@arm.com>
2219
2220 * configure.srv: Add new file.
2221 * linux-aarch64-low.c (initialize_low_arch): Call init func.
2222 * linux-aarch64-tdesc-selftest.c: New file.
2223 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
2224
49bdb7ee
AH
22252017-11-24 Alan Hayward <alan.hayward@arm.com>
2226
2227 * linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init.
2228 * linux-aarch64-low.c (initialize_low_arch): Remove init.
2229 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
2230
d6d7ce56
AH
22312017-11-24 Alan Hayward <alan.hayward@arm.com>
2232
2233 * configure.srv: Add new files.
2234 * linux-aarch64-ipa.c (get_ipa_tdesc): Call
2235 aarch64_linux_read_description.
2236 * linux-aarch64-low.c (aarch64_linux_read_description):
2237 Merge with aarch64_arch_setup.
2238 (aarch64_arch_setup): Call aarch64_linux_read_description.
2239 * linux-aarch64-tdesc.c: New file.
2240 * linux-aarch64-tdesc.h: New file.
2241
506fe5f4
YQ
22422017-11-24 Yao Qi <yao.qi@linaro.org>
2243
2244 * configure.srv: Set $srv_regobj for tic6x-linux.
2245 * linux-tic6x-low.c: Include "arch/tic6x.h" and "tdesc.h".
2246 (tic6x_read_description): Move some code to tic6x_arch_setup.
2247 (tic6x_tdesc_test): New function.
2248 (initialize_low_arch): Call selftests::register_test.
2249
29f9a567
YQ
22502017-11-22 Yao Qi <yao.qi@linaro.org>
2251
2252 * remote-utils.c (prepare_resume_reply): Use memcpy.
2253
578290ec
SM
22542017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2255
2256 * linux-low.c (kill_one_lwp_callback): Return void, take
2257 argument directly, don't filter on pid.
2258 (linux_kill): Use for_each_thread.
2259
eca55aec
SM
22602017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2261
2262 * linux-low.c (need_step_over_p): Return bool, remove dummy
2263 argument.
2264 (linux_resume, proceed_all_lwps): Use find_thread.
2265
25c28b4d
SM
22662017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2267
2268 * linux-low.c (resume_status_pending_p): Return bool, remove
2269 flag_p argument.
2270 (linux_resume): Use find_thread.
2271
5fdda392
SM
22722017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2273
2274 * linux-low.c (struct thread_resume_array): Remove.
2275 (linux_set_resume_request): Return void, take arguments
2276 directly.
2277 (linux_resume): Use for_each_thread.
2278
fcb056a5
SM
22792017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2280
2281 * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
2282 return bool, remove data argument.
2283 (linux_stabilize_threads): Use find_thread.
2284
139720c5
SM
22852017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2286
2287 * linux-low.c (unsuspend_one_lwp): Remove.
2288 (unsuspend_all_lwps): Use for_each_thread, inline code from
2289 unsuspend_one_lwp.
2290
6d1e5673
SM
22912017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2292
2293 * gdbthread.h (find_thread): Add overload with ptid_t filter.
2294 * linux-low.c (struct iterate_over_lwps_args): Remove.
2295 (iterate_over_lwps_filter): Remove.
2296 (iterate_over_lwps): Use find_thread.
2297
bbf550d5
SM
22982017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2299
2300 * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
2301 (linux_handle_new_gdb_connection): Use for_each_thread, inline
2302 code from reset_lwp_ptrace_options_callback.
2303
00192f77
SM
23042017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2305
2306 * linux-arm-low.c (struct update_registers_data): Remove.
2307 (update_registers_callback): Return void, take arguments
2308 directly, don't check thread's pid.
2309 (arm_insert_point, arm_remove_point): Use for_each_thread.
2310
2bee2b6c
SM
23112017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2312
2313 * win32-low.c (continue_one_thread): Return void, take argument
2314 directly.
2315 (child_continue): Use for_each_thread.
2316
0b360f19
SM
23172017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2318
2319 * win32-i386-low.c (update_debug_registers_callback): Rename
2320 to ...
2321 (update_debug_registers): ... this, return void, remove pid_p arg.
2322 (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
2323
f27866ba
SM
23242017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
2325
2326 * inferiors.h (struct process_info): Add constructor, initialize
2327 fields..
2328 <syscalls_to_catch>: Change type to std::vector<int>.
2329 * inferiors.c (add_process): Allocate process_info with new.
2330 (remove_process): Free process_info with delete.
2331 * linux-low.c (handle_extended_wait): Adjust.
2332 (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
2333 * server.c (handle_general_set): Adjust.
2334
e849ea89
PA
23352017-11-16 Pedro Alves <palves@redhat.com>
2336
2337 * remote-utils.c (remote_close): Block SIGIO signals instead of
2338 uninstalling the SIGIO handler.
2339
1d0aa65c
AH
23402017-11-16 Alan Hayward <alan.hayward@arm.com>
2341
2342 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
2343
3491a34c
YQ
23442017-11-16 Yao Qi <yao.qi@linaro.org>
2345
2346 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
2347 (tic6x_store_gregset): Likewise.
2348 (tic6x_usrregs_info): Move it up.
2349
a602f924
AH
23502017-11-15 Alan Hayward <alan.hayward@arm.com>
2351
2352 * Makefile.in: Update arch rules.
2353 * configure.srv: Explicitly mark arch/ files.
2354
5616b6c3
AS
23552017-11-13 Andreas Schwab <schwab@suse.de>
2356
2357 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
2358 function.
2359 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2360
d1928160
PA
23612017-11-06 Pedro Alves <palves@redhat.com>
2362
2363 * config.in, configure: Regenerate.
2364
bac608e7
SM
23652017-10-27 Simon Marchi <simon.marchi@ericsson.com>
2366
2367 * target.c (struct thread_search): Remove.
2368 (thread_search_callback): Remove.
2369 (prepare_to_access_memory): Use for_each_thread instead of
2370 find_inferior. Inline code from thread_search_callback.
2371
eaddb425
SM
23722017-10-27 Simon Marchi <simon.marchi@ericsson.com>
2373
2374 * server.c (struct visit_actioned_threads_data): Remove.
2375 (visit_actioned_threads): Change prototype to take arguments
2376 directly.
2377 (resume): Use find_thread instead of find_inferior.
2378
99078d34
SM
23792017-10-27 Simon Marchi <simon.marchi@ericsson.com>
2380
2381 * server.c (queue_stop_reply_callback): Change prototype, return
2382 void.
2383 (find_status_pending_thread_callback): Remove.
2384 (handle_status): Replace find_inferior with find_thread and
2385 for_each_thread.
2386
cc628f3d
AH
23872017-10-25 Alan Hayward <alan.hayward@arm.com>
2388
2389 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
2390 with REGNO.
2391 (aarch64_store_gregset): Likewise.
2392 (aarch64_fill_fpregset): Likewise.
2393 (aarch64_store_fpregset): Likewise.
2394
4d3bb80e
SM
23952017-10-21 Simon Marchi <simon.marchi@ericsson.com>
2396
2397 * gdbthread.h (find_thread, for_each_thread): New functions.
2398 * inferiors.c (thread_of_pid): Remove.
2399 (find_any_thread_of_pid): Use find_thread.
2400 * linux-low.c (num_lwps): Use for_each_thread.
2401
7a7cdfa0
YQ
24022017-10-17 Yao Qi <yao.qi@linaro.org>
2403
2404 * Makefile.in: Remove one rule.
2405 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
2406
e675d170
YQ
24072017-10-17 Yao Qi <yao.qi@linaro.org>
2408
2409 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
2410 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
2411
7eb4e0f9
YQ
24122017-10-17 Yao Qi <yao.qi@linaro.org>
2413
2414 * configure.srv: Rename arm.o with arch/arm.o.
2415
60d6cfc9
YQ
24162017-10-17 Yao Qi <yao.qi@linaro.org>
2417
2418 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
2419 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
2420 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
2421 (arch-i386.o, arch-amd64.o): Remove rules.
2422 (arch/%.o): New rule.
2423 Update POSTCOMPILE and COMPILE.pre.
2424 * configure.ac: Invoke AC_CONFIG_COMMANDS.
2425 * configure: Re-generated.
2426 * configure.srv: Replace arch-i386.o with arch/i386.o.
2427 Replace arch-amd64.o with arch/amd64.o.
2428
5bfda255
YQ
24292017-10-16 Yao Qi <yao.qi@linaro.org>
2430
2431 * configure: Regenerated.
2432
9c80ecd6
SM
24332017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
2434
2435 * inferiors.h: (struct inferior_list): Remove.
2436 (struct inferior_list_entry); Remove.
2437 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
2438 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
2439 get_first_inferior): Remove.
2440 (for_each_inferior, for_each_inferior_with_data, find_inferior,
2441 find_inferior_id, find_inferior_in_random): Change signature.
2442 * inferiors.c (all_threads): Change type to
2443 std::list<thread_info *>.
2444 (get_thread): Remove macro.
2445 (find_inferior, find_inferior_id): Change signature, implement
2446 using find_thread.
2447 (find_inferior_in_random): Change signature, implement using
2448 find_thread_in_random.
2449 (for_each_inferior, for_each_inferior_with_data): Change
2450 signature, implement using for_each_thread.
2451 (add_inferior_to_list, remove_inferior): Remove.
2452 (add_thread, get_first_thread, thread_of_pid,
2453 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
2454 (get_first_inferior, one_inferior_p, clear_inferior_list):
2455 Remove.
2456 (clear_inferiors, get_thread_process): Update.
2457 * gdbthread.h: Include <list>.
2458 (struct thread_info) <entry>: Remove field.
2459 <id>: New field.
2460 (all_threads): Change type to std::list<thread_info *>.
2461 (get_first_inferior): Add doc.
2462 (find_thread, for_each_thread, find_thread_in_random): New
2463 functions.
2464 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
2465 * linux-arm-low.c (update_registers_callback): Update.
2466 * linux-low.c (second_thread_of_pid_p): Update.
2467 (kill_one_lwp_callback, linux_detach_lwp_callback,
2468 delete_lwp_callback, status_pending_p_callback, same_lwp,
2469 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
2470 iterate_over_lwps, not_stopped_callback,
2471 resume_stopped_resumed_lwps, count_events_callback,
2472 select_singlestep_lwp_callback, select_event_lwp_callback,
2473 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
2474 suspend_and_send_sigstop_callback, wait_for_sigstop,
2475 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
2476 lwp_running, linux_set_resume_request, resume_status_pending_p,
2477 need_step_over_p, start_step_over, linux_resume_one_thread,
2478 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
2479 reset_lwp_ptrace_options_callback): Update.
2480 * linux-mips-low.c (update_watch_registers_callback): Update.
2481 * regcache.c (regcache_invalidate_one, regcache_invalidate):
2482 Update.
2483 (free_register_cache_thread_one): Remove.
2484 (regcache_release): Update.
2485 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
2486 handle_qxfer_threads_worker): Update.
2487 (handle_query): Update, use list iterator.
2488 (visit_actioned_threads, handle_pending_status,
2489 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
2490 clear_pending_status_callback, set_pending_status_callback,
2491 find_status_pending_thread_callback, handle_status,
2492 process_serial_event): Update.
2493 * target.c (thread_search_callback): Update.
2494 * thread-db.c (thread_db_get_tls_address): Update.
2495 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
2496 Update.
2497 * win32-i386-low.c (update_debug_registers_callback): Update.
2498 * win32-low.c (delete_thread_info, child_delete_thread,
2499 continue_one_thread, suspend_one_thread,
2500 get_child_debug_event): Adjust.
2501
9179355e
SM
25022017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
2503
2504 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
2505 * inferiors.h: Include <list>.
2506 (struct process_info) <entry>: Remove field.
2507 <pid>: New field.
2508 (pid_of): Change macro to function.
2509 (ptid_of, lwpid_of): Remove macro.
2510 (all_processes): Change type to std::list<process_info *>.
2511 (ALL_PROCESSES): Remove macro.
2512 (for_each_process, find_process): New function.
2513 * inferiors.c (all_processes): Change type to
2514 std::list<process_info *>.
2515 (find_thread_process): Adjust.
2516 (add_process): Likewise.
2517 (remove_process): Likewise.
2518 (find_process_pid): Likewise.
2519 (get_first_process): Likewise.
2520 (started_inferior_callback): Remove.
2521 (have_started_inferiors_p): Adjust.
2522 (attached_inferior_callback): Remove.
2523 (have_attached_inferiors_p): Adjust.
2524 * linux-low.c (check_zombie_leaders): Likewise.
2525 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
2526 (x86_linux_update_xmltarget): Adjust.
2527 * server.c (handle_query): Likewise.
2528 (gdb_reattached_process): Remove.
2529 (handle_status): Adjust.
2530 (kill_inferior_callback): Likewise.
2531 (detach_or_kill_inferior): Remove.
2532 (print_started_pid): Likewise.
2533 (print_attached_pid): Likewise.
2534 (detach_or_kill_for_exit): Update.
2535 (process_serial_event): Likewise.
2536 * linux-arm-low.c (arm_new_fork): Likewise.
2537
c9cb8905
SM
25382017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
2539
2540 * dll.h: Include <list>.
2541 (struct dll_info): Add constructor.
2542 <entry>: Remove field.
2543 (all_dlls): Change type to std::list<dll_info>.
2544 * dll.c: Include <algorithm>.
2545 (get_dll): Remove macro.
2546 (all_dlls): Change type to std::list<dll_info *>.
2547 (free_one_dll): Remove.
2548 (match_dll): Likewise.
2549 (loaded_dll): Adjust.
2550 (unloaded_dll): Adjust to all_dlls type change, use
2551 std::find_if. Inline code from match_dll.
2552 (clear_dlls): Adjust to all_dlls type change.
2553 * server.c (emit_dll_description): Remove.
2554 (handle_qxfer_libraries): Adjust to all_dlls type change,
2555 integrate emit_dll_description's functionality.
2556
04ec7890
SM
25572017-10-12 Simon Marchi <simon.marchi@ericsson.com>
2558
2559 * linux-low.h (struct linux_target_ops) <delete_process>: New
2560 field.
2561 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
2562 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
2563 (struct linux_target_ops): Add delete_process callback.
2564 * linux-arm-low.c (arm_delete_process): New.
2565 (struct linux_target_ops): Add delete_process callback.
2566 * linux-bfin-low.c (struct linux_target_ops): Likewise.
2567 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
2568 * linux-m32r-low.c (struct linux_target_ops): Likewise.
2569 * linux-mips-low.c (mips_linux_delete_process): New.
2570 (struct linux_target_ops): Add delete_process callback.
2571 * linux-ppc-low.c (struct linux_target_ops): Likewise.
2572 * linux-s390-low.c (struct linux_target_ops): Likewise.
2573 * linux-sh-low.c (struct linux_target_ops): Likewise.
2574 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
2575 * linux-tile-low.c (struct linux_target_ops): Likewise.
2576 * linux-x86-low.c (x86_linux_delete_process): New.
2577 (struct linux_target_ops): Add delete_process callback.
2578 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
2579
466eecee
SM
25802017-10-12 Simon Marchi <simon.marchi@ericsson.com>
2581
2582 * linux-aarch64-low.c (the_low_target): Add thread delete
2583 callback.
2584 * linux-arm-low.c (arm_delete_thread): New function.
2585 (the_low_target): Add thread delete callback.
2586 * linux-bfin-low.c (the_low_target): Likewise.
2587 * linux-crisv32-low.c (the_low_target): Likewise.
2588 * linux-low.c (delete_lwp): Invoke delete_thread callback if
2589 set.
2590 * linux-low.h (struct linux_target_ops) <delete_thread>: New
2591 field.
2592 * linux-m32r-low.c (the_low_target): Add thread delete callback.
2593 * linux-mips-low.c (mips_linux_delete_thread): New function.
2594 (the_low_target): Add thread delete callback.
2595 * linux-ppc-low.c (the_low_target): Likewise.
2596 * linux-s390-low.c (the_low_target): Likewise.
2597 * linux-sh-low.c (the_low_target): Likewise.
2598 * linux-tic6x-low.c (the_low_target): Likewise.
2599 * linux-tile-low.c (the_low_target): Likewise.
2600 * linux-x86-low.c (the_low_target): Likewise.
2601 * linux-xtensa-low.c (the_low_target): Likewise.
2602
b79f7801
YZ
26032017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
2604
2605 * win32-low.c: Include "common-inferior.h".
2606
bc3b087d
SDJ
26072017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
2608
2609 * inferiors.c (set_inferior_cwd): New function.
2610 * server.c (handle_general_set): Handle QSetWorkingDir packet.
2611 (handle_query): Inform that QSetWorkingDir is supported.
2612 * win32-low.c (create_process): Pass the inferior's cwd to
2613 CreateProcess.
2614
d092c5a2
SDJ
26152017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
2616
2617 * inferiors.c (current_inferior_cwd): New global variable.
2618 (get_inferior_cwd): New function.
2619 * inferiors.h (struct process_info) <cwd>: New field.
2620
7da0a886
SDJ
26212017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
2622
2623 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
2624 (OBS): Add gdb_tilde_expand.o.
2625
289a6840
SM
26262017-10-02 Simon Marchi <simon.marchi@ericsson.com>
2627
2628 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
2629 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
2630
256642e8
PA
26312017-09-29 Pedro Alves <palves@redhat.com>
2632
2633 * ax.c (gdb_parse_agent_expr): Constify.
2634 * ax.h (gdb_parse_agent_expr): Constify.
2635 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
2636 Constify.
2637 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
2638 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
2639 * remote-utils.h (read_ptid): Constify.
2640 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
2641 (process_point_options, process_serial_event): Constify.
2642 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
2643 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
2644 (cmd_qtbuffer): Constify.
2645
5b9ca4d4
PA
26462017-09-29 Pedro Alves <palves@redhat.com>
2647
2648 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
2649 fails.
2650
94c207e0
PA
26512017-09-29 Pedro Alves <palves@redhat.com>
2652
2653 * linux-low.c (handle_extended_wait): Pass parent thread instead
2654 of process to thread_db_notice_clone.
2655 * linux-low.h (thread_db_notice_clone): Replace parent process
2656 parameter with parent thread parameter.
2657 * thread-db.c (find_one_thread): Add comment.
2658 (thread_db_notice_clone): Replace parent process parameter with
2659 parent thread parameter. Temporarily switch to the parent thread.
2660
75352e28
SDJ
26612017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
2662
2663 * gdbthread.h: Include "common-gdbthread.h".
2664 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
2665 "if" when validating the ptid.
2666 * remote-utils.c: Include "gdbthread.h".
2667 (prepare_resume_reply): Use "switch_to_thread".
2668 * target.c (done_accessing_memory): Likewise.
2669
ad339634
AA
26702017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
2671
2672 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
2673 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
2674 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
2675 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
2676 s390x-gs-linux64-ipa.o to ipa_obj.
2677 * linux-s390-low.c (HWCAP_S390_GS): New define.
2678 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
2679 New functions.
2680 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
2681 (s390_arch_setup): Check for guarded-storage support and choose
2682 appropriate tdesc.
2683 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
2684 init_registers_s390x_gs_linux64.
2685 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
2686 enum value.
2687 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
2688 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
2689
cc4d742f
SM
26902017-09-22 Simon Marchi <simon.marchi@ericsson.com>
2691
2692 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
2693
f6327dcb
KB
26942017-09-21 Kevin Buettner <kevinb@redhat.com>
2695
2696 * linux-low.h (struct lwp_info): Add new field, thread_handle.
2697 (thread_db_thread_handle): Declare.
2698 * linux-low.c (linux_target_ops): Initialize thread_handle.
2699 * server.c (handle_qxfer_threads_worker): Add support for
2700 "handle" attribute.
2701 * target.h (struct target_ops): Add new function pointer,
2702 thread_handle.
2703 (target_thread_handle): Define.
2704 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
2705 field in lwp.
2706 (thread_db_thread_handle): New function.
2707
86299109
KB
27082017-09-21 Kevin Buettner <kevinb@redhat.com>
2709
2710 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
2711 * linux-low.h (thread_db_notice_clone): Declare.
2712 * thread-db.c (thread_db_notice_clone): New function.
2713
f557a88a
PA
27142017-09-21 Pedro Alves <palves@redhat.com>
2715
2716 * server.c (gdb_read_memory, handle_status, process_serial_event)
2717 (handle_serial_event, handle_target_event): Adjust to
2718 set_desired_thread prototype change.
2719 * target.c (set_desired_thread): Remove 'use_general' parameter
2720 and adjust.
2721 * target.h (set_desired_thread): Remove 'use_general' parameter.
2722
223ffa71
TT
27232017-09-20 Tom Tromey <tom@tromey.com>
2724
2725 * target.c (target_terminal::terminal_state): Define.
2726 (target_terminal::init): Rename from target_terminal_init.
2727 (target_terminal::inferior): Rename from
2728 target_terminal_inferior.
2729 (target_terminal::ours): Rename from target_terminal_ours.
2730 (target_terminal::ours_for_output, target_terminal::info): New.
2731
04fd3ba9
SM
27322017-09-16 Simon Marchi <simon.marchi@ericsson.com>
2733
2734 * server.c (accumulate_file_name_length): Remove.
2735 (emit_dll_description): Adjust to std::string change.
2736 (handle_qxfer_libraries): Use std::string to hold document.
2737
5e187554
SM
27382017-09-16 Simon Marchi <simon.marchi@ericsson.com>
2739
2740 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
2741 return type of xml_escape_text.
2742 * server.c (emit_dll_description): Likewise.
2743
1526853e
SM
27442017-09-16 Simon Marchi <simon.marchi@ericsson.com>
2745
2746 * server.c (captured_main): Accept argument for --selftest.
2747 Update run_tests call.
2748 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
2749 when registering selftests.
2750
c4dfafab
SDJ
27512017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
2752
2753 * regcache.c (get_thread_regcache): Update code to use "std::vector"
2754 instead of "VEC" for "target_desc.reg_defs".
2755 (regcache_cpy): Likewise.
2756 (registers_to_string): Likewise.
2757 (registers_from_string): Likewise.
2758 (find_regno): Likewise.
2759 (supply_regblock): Likewise.
2760 (regcache_raw_read_unsigned): Likewise.
2761 * tdesc.c (init_target_desc): Likewise.
2762 (tdesc_create_reg): Likewise.
2763 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
2764 (struct target_desc) <reg_defs>: Convert to "std::vector".
2765 (target_desc): Do not initialize "reg_defs".
2766 (~target_desc): Update code to use "std::vector" instead of "VEC"
2767 for "target_desc.reg_defs".
2768 (operator==): Likewise.
2769
124aceb4
SM
27702017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2771
2772 * inferiors.h (thread_to_gdb_id): Remove.
2773 * inferiors.c (thread_to_gdb_id): Remove.
2774 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
2775 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
2776 lynx_store_registers, lynx_read_memory, lynx_write_memory):
2777 Likewise.
2778 * nto-low.c (nto_fetch_registers, nto_store_registers,
2779 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
2780
96cde54f
SM
27812017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2782
2783 * inferiors.h (gdb_id_to_thread_id): Remove.
2784 * inferiors.c (gdb_id_to_thread_id): Remove.
2785 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
2786 removal. Move pid declaration closer to where it's used.
2787
e8ca139e
SM
27882017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2789
2790 * server.c (handle_detach): New function.
2791 (process_serial_event): Move code out, call handle_detach.
2792
f8a4e119
SM
27932017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2794
2795 * server.c (require_running): Rename to ...
2796 (require_running_or_return): ... this ...
2797 (require_running_or_break): ... and this.
2798 (handle_query, process_serial_event): Adjust.
2799
0eb0a407
SM
28002017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2801
2802 * linux-low.c (linux_set_resume_request): Remove unused
2803 variables.
2804
785922a5
SM
28052017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2806
2807 * server.c (first_thread_of): Remove.
2808 (process_serial_event): Replace usage of first_thread_of with
2809 find_any_thread_of_pid.
2810 * tracepoint.c (same_process_p): Remove.
2811 (gdb_agent_about_to_close): Replace usage of same_process_p with
2812 find_any_thread_of_pid.
2813 * linux-x86-low.c (same_process_callback): Remove.
2814 (x86_arch_setup_process_callback): Replace usage of
2815 same_process_callback with find_any_thread_of_pid.
2816 * thread-db.c (any_thread_of): Remove.
2817 (switch_to_process): Replace usage of any_thread_of with
2818 find_any_thread_of_pid.
2819 * inferiors.c (thread_pid_matches_callback): Remove.
2820 (find_thread_process): Adjust to use find_any_thread_of_pid.
2821
a059f00c
SDJ
28222017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
2823
2824 * regcache.c (get_thread_regcache): Guard calls to "memset"
e79be6e5 2825 with "!VEC_empty".
a059f00c 2826
cc397f3a
SDJ
28272017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
2828
2829 * linux-low.c (handle_extended_wait): Use
2830 "allocate_target_description" instead of "XNEW".
2831 * linux-x86-low.c (initialize_low_arch): Likewise.
2832
22916b07
YQ
28332017-09-05 Yao Qi <yao.qi@linaro.org>
2834
2835 * configure.srv (srv_i386_regobj): Remove.
2836 (srv_amd64_regobj): Remove.
2837 (srv_regobj): Set it to "" for x86 non-linux targets.
2838 * linux-x86-tdesc.c (i386_linux_read_description):
2839 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
2840 (init_registers_i386): Remove the declaration.
2841 (tdesc_i386): Remove the declaration.
2842 (lynx_i386_arch_setup): Call i386_create_target_description.
2843 * nto-x86-low.c: Likewise.
2844 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
2845 [!__x86_64__]: include arch/i386.h.
2846 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
2847
38602d55
YQ
28482017-09-05 Yao Qi <yao.qi@linaro.org>
2849
2850 * configure.srv (srv_amd64_linux_xmlfiles): Remove
2851 i386/amd64-XXX-linux from it.
2852
44b886ff
YQ
28532017-09-05 Yao Qi <yao.qi@linaro.org>
2854
2855 * configure.srv: Empty srv_amd64_linux_regobj if $development is
2856 false.
2857 (ipa_amd64_linux_regobj): Remove.
2858 (ipa_x32_linux_regobj): Remove.
2859
b4570e4b
YQ
28602017-09-05 Yao Qi <yao.qi@linaro.org>
2861
2862 * Makefile.in (arch-amd64.o): New rule.
2863 * configure.srv: Append arch-amd64.o.
2864 * linux-amd64-ipa.c: Include common/x86-xstate.h.
2865 (get_ipa_tdesc): Call amd64_linux_read_description.
2866 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
2867 and init_registers_amd64_XXX.
2868 * linux-x86-low.c (x86_linux_read_description): Call
2869 amd64_linux_read_description.
2870 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
2871 (initialize_low_arch): Don't call init_registers_x32_XXX and
2872 init_registers_amd64_XXX.
2873 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
2874 and tdesc_amd64_XXX.
2875 [__x86_64__] (amd64_tdesc_test): New function.
2876 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
2877 and init_registers_amd64_XXX.
2878 * linux-x86-tdesc.c: Include arch/amd64.h.
2879 (xcr0_to_tdesc_idx): New function.
2880 (i386_linux_read_description): New function.
2881 (amd64_get_ipa_tdesc_idx): New function.
2882 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
2883 (amd64_get_ipa_tdesc): Declare.
2884
d1f28ea2
YQ
28852017-09-05 Yao Qi <yao.qi@linaro.org>
2886
2887 * configure.srv (srv_i386_linux_xmlfiles): Remove
2888 i386/i386-XXX-linux.xml from it.
2889
25a93583
YQ
28902017-09-05 Yao Qi <yao.qi@linaro.org>
2891
2892 * configure.srv: Set srv_i386_linux_regobj empty if $development
2893 is false.
2894 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
2895 initialize_low_tdesc.
2896 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
2897 with #if initialize_low_tdesc.
2898 * linux-x86-tdesc-selftest.c: New file.
2899 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
2900
5f035c07
YQ
29012017-09-05 Yao Qi <yao.qi@linaro.org>
2902
2903 * Makefile.in (arch-i386.o): New rule.
2904 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
2905 (x86_64-*-linux*): Likewise.
2906 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
2907 include arch/i386.h.
2908 (i386_linux_read_description): Remove code and call
2909 i386_create_target_description.
2910 * tdesc.c (allocate_target_description): New function.
2911 * tdesc.h (set_tdesc_architecture): Remove declaration.
2912 (set_tdesc_osabi): Likewise.
2913
0abe8a89
YQ
29142017-09-05 Yao Qi <yao.qi@linaro.org>
2915
2916 * linux-x86-tdesc.c: Don't include <inttypes.h>.
2917 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
2918 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
2919 .xmltarget.
2920 * server.c (get_features_xml): Call tdesc_get_features_xml.
2921 * tdesc.c (set_tdesc_architecture): New function.
2922 (set_tdesc_osabi): New function.
2923 (tdesc_get_features_xml): New function.
2924 (tdesc_create_feature): Add an argument.
2925 * tdesc.h (struct target_desc) <features>: New field.
2926 <arch, osabi>: New field.
2927 (~target_desc): xfree features, arch, and osabi.
2928 (target_desc::oerator==): Don't compare .xmltarget.
2929 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
2930 (set_tdesc_osabi): Likewise.
2931 (tdesc_get_features_xml): Likewise.
2932
0a188386
YQ
29332017-09-05 Yao Qi <yao.qi@linaro.org>
2934
2935 * linux-x86-tdesc.c: Include selftest.h.
2936 (i386_tdesc_test): New function.
2937 (initialize_low_tdesc): Call selftests::register_test.
2938 * tdesc.h: Include regdef.h.
2939 (target_desc): Override operator == and !=.
2940
f49ff000
YQ
29412017-09-05 Yao Qi <yao.qi@linaro.org>
2942
2943 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
2944 (ipa_obj): Likewise.
2945 * linux-i386-ipa.c: Include common/x86-xstate.h
2946 (get_ipa_tdesc): Call i386_linux_read_description.
2947 (initialize_low_tracepoint): Don't call init_registers_XXX
2948 functions, call initialize_low_tdesc instead.
2949 * linux-x86-low.c (x86_linux_read_description): Call
2950 i386_linux_read_description.
2951 (initialize_low_arch): Don't call init_registers_i386_XXX
2952 functions, call initialize_low_tdesc.
2953 * linux-x86-tdesc.c: New file.
2954 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
2955 (i386_get_ipa_tdesc_idx): Declare.
2956 (i386_get_ipa_tdesc): Declare.
2957 (initialize_low_tdesc): Declare.
2958
2b68ef2f
YQ
29592017-09-05 Yao Qi <yao.qi@linaro.org>
2960
2961 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
2962 instead of 0.
2963
f7000548
YQ
29642017-09-05 Yao Qi <yao.qi@linaro.org>
2965
2966 * Makefile.in (IPA_OBJS): Add vec-ipa.o
2967 * regcache.c (get_thread_regcache): Use VEC_length.
2968 (init_register_cache): Likewise.
2969 (regcache_cpy): Likewise.
2970 (registers_to_string): Iterate reg_defs via VEC_iterate.
2971 (find_regno): Likewise.
2972 (find_register_by_number): Use VEC_index.
2973 (register_size): Call find_register_by_number.
2974 (register_data): Call find_register_by_number.
2975 (supply_regblock): Use VEC_length.
2976 (regcache_raw_read_unsigned): Likewise.
2977 * tdesc.c (init_target_desc): Iterate reg_defs via
2978 VEC_iterate.
2979 (default_description): Update initializer.
2980 (copy_target_description): Don't update field num_registers.
2981 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
2982 <num_registers>: Remove.
2983
50a421ac
SM
29842017-09-04 Simon Marchi <simon.marchi@ericsson.com>
2985
2986 * Makefile.in (.SECONDARY): Define target.
2987
23fdd69e
SM
29882017-09-03 Simon Marchi <simon.marchi@ericsson.com>
2989
2990 * linux-low.c (linux_wait_1): Adjust.
2991 * server.c (queue_stop_reply_callback): Adjust.
2992
0a2dde4a
SDJ
29932017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
2994
2995 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
2996 QEnvironmentUnset and QEnvironmentReset packets.
2997 (handle_query): Inform remote that QEnvironmentHexEncoded,
2998 QEnvironmentUnset and QEnvironmentReset are supported.
2999
6afd337d
SM
30002017-08-25 Simon Marchi <simon.marchi@ericsson.com>
3001
3002 * inferiors.h (inferior_target_data): Rename to ...
3003 (thread_target_data): ... this.
3004 (inferior_regcache_data): Rename to ...
3005 (thread_regcache_data): ... this.
3006 (set_inferior_regcache_data): Rename to ...
3007 (set_thread_regcache_data): ... this.
3008 * inferiors.c (inferior_target_data): Rename to ...
3009 (thread_target_data): ... this.
3010 (inferior_regcache_data): Rename to ...
3011 (thread_regcache_data): ... this.
3012 (set_inferior_regcache_data): Rename to ...
3013 (set_thread_regcache_data): ... this.
3014 (free_one_thread): Update.
3015 * linux-low.h (get_thread_lwp): Update.
3016 * regcache.c (get_thread_regcache): Update.
3017 (regcache_invalidate_thread): Update.
3018 (free_register_cache_thread): Update.
3019 * win32-i386-low.c (update_debug_registers_callback): Update.
3020 (win32_get_current_dr): Update.
3021 * win32-low.c (thread_rec): Update.
3022 (delete_thread_info): Update.
3023 (continue_one_thread): Update.
3024 (suspend_one_thread): Update.
3025
a160cc46
SM
30262017-08-24 Simon Marchi <simon.marchi@ericsson.com>
3027
3028 * inferiors.c (set_inferior_target_data): Remove.
3029 * inferiors.h (set_inferior_target_data): Remove.
3030
6d580b63
YQ
30312017-08-18 Yao Qi <yao.qi@linaro.org>
3032
3033 * Makefile.in (OBS): Add selftest.o.
3034 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
3035 * configure, config.in: Re-generated.
3036 * server.c: Include common/sefltest.h.
3037 (captured_main): Handle option --selftest.
3038
f5a29eb0
YQ
30392017-08-09 Yao Qi <yao.qi@linaro.org>
3040
3041 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
3042 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
3043 i386-avx-mpx.o and i386-mmx.o.
3044 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
3045 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
3046 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
3047 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
3048 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
3049 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
3050 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
3051 i386/amd64-avx-mpx.xml.
3052
57757c2f
YQ
30532017-08-09 Yao Qi <yao.qi@linaro.org>
3054
3055 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
3056 and x32-avx-avx512.o.
3057 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
3058 i386/x32-avx-avx512.xml.
3059
229d26fc
SM
30602017-07-26 Simon Marchi <simon.marchi@ericsson.com>
3061
3062 * tracepoint.h (enum class fast_tpoint_collect_result): New
3063 enumeration.
3064 (fast_tracepoint_collecting): Change return type to
3065 fast_tpoint_collect_result.
3066 * tracepoint.c (fast_tracepoint_collecting): Likewise.
3067 * linux-low.h: Include tracepoint.h.
3068 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
3069 fast_tpoint_collect_result.
3070 * linux-low.c (handle_tracepoints): Adjust.
3071 (linux_fast_tracepoint_collecting): Change return type to
3072 fast_tpoint_collect_result.
3073 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
3074 linux_wait_1, stuck_in_jump_pad_callback,
3075 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
3076 proceed_one_lwp): Adjust to type change.
3077
2e1e43e1
YQ
30782017-07-10 Yao Qi <yao.qi@linaro.org>
3079
3080 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
3081
adc764e7
YQ
30822017-06-29 Yao Qi <yao.qi@linaro.org>
3083
3084 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
3085 Remove.
3086 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
3087
a206891a
SM
30882017-06-20 Simon Marchi <simon.marchi@ericsson.com>
3089
3090 * Makefile.in (IPA_OBJS): Sort and format one item per line.
3091
9a6c7d9c
SDJ
30922017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
3093
3094 * linux-low.c (linux_create_inferior): Adjust code to access the
3095 environment information via 'gdb_environ' class.
3096 * lynx-low.c (lynx_create_inferior): Likewise.
3097 * server.c (our_environ): Make it an instance of 'gdb_environ'.
3098 (get_environ): Return a pointer to 'our_environ'.
3099 (captured_main): Initialize 'our_environ'.
3100 * server.h (get_environ): Adjust prototype.
3101 * spu-low.c (spu_create_inferior): Adjust code to access the
3102 environment information via 'gdb_environ' class.
3103
ae3e2ccf
SM
31042017-06-17 Simon Marchi <simon.marchi@ericsson.com>
3105
3106 * linux-low.c (linux_read_memory, linux_write_memory): Remove
3107 usage of "register" keyword.
3108
3e019bdc
SM
31092017-06-17 Simon Marchi <simon.marchi@ericsson.com>
3110
3111 * configure: Re-generate.
3112
8465943a
SM
31132017-06-17 Simon Marchi <simon.marchi@ericsson.com>
3114
3115 * configure: Re-generate.
3116
cf0dd6f0
SM
31172017-06-17 Simon Marchi <simon.marchi@ericsson.com>
3118
3119 * Makefile.in (COMPILE.pre): Add "-x c++".
3120
9845682b
SDJ
31212017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
3122
3123 * fork-child.c: Conditionally include <signal.h>.
3124
aefd8b33
SDJ
31252017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
3126
3127 * server.c (handle_general_set): Handle new packet
3128 "QStartupWithShell".
3129 (handle_query): Add "QStartupWithShell" to the list of supported
3130 packets.
3131 (gdbserver_usage): Add help text explaining the
3132 new "--startup-with-shell" and "--no-startup-with-shell" CLI
3133 options.
3134 (captured_main): Recognize and act upon the presence of the new
3135 CLI options.
3136
2090129c
SDJ
31372017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
3138 Pedro Alves <palves@redhat.com>
3139
3140 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
3141 * configure: Regenerate.
3142 * configure.srv (srv_linux_obj): Add "fork-child.o" and
3143 "fork-inferior.o".
3144 (i[34567]86-*-lynxos*): Likewise.
3145 (spu*-*-*): Likewise.
3146 * fork-child.c: New file.
3147 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
3148 and "environ.h".
3149 (linux_ptrace_fun): New function.
3150 (linux_create_inferior): Adjust function prototype to reflect
3151 change on "target.h". Adjust function code to use
3152 "fork_inferior".
3153 (linux_request_interrupt): Delete "signal_pid".
3154 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
3155 (lynx_ptrace_fun): New function.
3156 (lynx_create_inferior): Adjust function prototype to reflect
3157 change on "target.h". Adjust function code to use
3158 "fork_inferior".
3159 * nto-low.c (nto_create_inferior): Adjust function prototype and
3160 code to reflect change on "target.h". Update comments.
3161 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
3162 "common-terminal.h" and "environ.h".
3163 (terminal_fd): Moved to fork-child.c.
3164 (old_foreground_pgrp): Likewise.
3165 (restore_old_foreground_pgrp): Likewise.
3166 (last_status): Make it global.
3167 (last_ptid): Likewise.
3168 (our_environ): New variable.
3169 (startup_with_shell): Likewise.
3170 (program_name): Likewise.
3171 (program_argv): Rename to...
3172 (program_args): ...this.
3173 (wrapper_argv): New variable.
3174 (start_inferior): Delete function.
3175 (get_exec_wrapper): New function.
3176 (get_exec_file): Likewise.
3177 (get_environ): Likewise.
3178 (prefork_hook): Likewise.
3179 (post_fork_inferior): Likewise.
3180 (postfork_hook): Likewise.
3181 (postfork_child_hook): Likewise.
3182 (handle_v_run): Update code to deal with arguments coming from the
3183 remote host. Update calls from "start_inferior" to
3184 "create_inferior".
3185 (captured_main): Likewise. Initialize environment variable. Call
3186 "have_job_control".
3187 * server.h (post_fork_inferior): New prototype.
3188 (get_environ): Likewise.
3189 (last_status): Declare.
3190 (last_ptid): Likewise.
3191 (signal_pid): Likewise.
3192 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
3193 (spu_ptrace_fun): New function.
3194 (spu_create_inferior): Adjust function prototype to reflect change
3195 on "target.h". Adjust function code to use "fork_inferior".
3196 * target.c (target_terminal_init): New function.
3197 (target_terminal_inferior): Likewise.
3198 (target_terminal_ours): Likewise.
3199 * target.h: Include <vector>.
3200 (struct target_ops) <create_inferior>: Update prototype.
3201 (create_inferior): Update macro.
3202 * utils.c (gdb_flush_out_err): New function.
3203 * win32-low.c (win32_create_inferior): Adjust function prototype
3204 and code to reflect change on "target.h".
3205
043a4934
SDJ
32062017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
3207
3208 * inferiors.c (switch_to_thread): New function.
3209
15652511
SDJ
32102017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
3211
3212 * Makefile.in (SFILE): Add "common/job-control.c".
3213 (OBS): Add "job-control.o".
3214
21ea5acd
SDJ
32152017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
3216
3217 * Makefile: Remove "@host_makefile_frag@".
3218
e13cb306
PA
32192017-05-05 Pedro Alves <palves@redhat.com>
3220
3221 * configure: Regenerate.
3222
c94fee56
SDJ
32232017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
3224
3225 * configure: Regenerate.
3226
a0ff9e1a
SM
32272017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
3228
3229 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
3230 software_single_step change of return type to
3231 std::vector<CORE_ADDR>.
3232 * linux-low.c (install_software_single_step_breakpoints):
3233 Likewise.
3234 * linux-low.h (install_software_single_step_breakpoints):
3235 Likewise.
3236
be628ab8
SDJ
32372017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
3238
3239 * remote-utils.c: Include "gdb_termios.h" instead of
3240 "terminal.h".
3241 * terminal.h: Delete file.
3242
7c5ded6a
SDJ
32432017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
3244
3245 * server.c: Include <vector>.
3246 <program_argv, wrapper_argv>: Convert to std::vector.
3247 (start_inferior): Rewrite function to use C++.
3248 (handle_v_run): Likewise. Update code that calculates the argv
3249 based on the vRun packet; use C++.
3250 (captured_main): Likewise.
3251
436252de
SM
32522017-04-06 Simon Marchi <simon.marchi@ericsson.com>
3253
3254 * server.c (handle_v_cont): Initialize thread_resume::thread
3255 with null_ptid.
3256
9bf2a700
PA
32572017-04-05 Pedro Alves <palves@redhat.com>
3258
3259 * configure: Regenerate.
3260
a121b7c1
PA
32612017-04-05 Pedro Alves <palves@redhat.com>
3262
3263 * gdbreplay.c (sync_error): Constify.
3264 * linux-x86-low.c (push_opcode): Constify.
3265
21c8a587
PA
32662017-04-05 Pedro Alves <palves@redhat.com>
3267
3268 * win32-low.c (get_child_debug_event)
3269 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
3270 Report TARGET_WAITKIND_SPURIOUS instead.
3271
fb32b4f7
PA
32722017-04-05 Pedro Alves <palves@redhat.com>
3273
e79be6e5
SM
3274 * remote-utils.c (remote_prepare, remote_open): Constify.
3275 * remote-utils.h (remote_prepare, remote_open): Constify.
3276 * server.c (captured_main): Constify 'port' handling.
fb32b4f7 3277
65dd1e59
SM
32782017-04-04 Simon Marchi <simon.marchi@ericsson.com>
3279
3280 * Makefile.in (clean): Clear .deps.
3281
8fa5b777
SM
32822017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
3283
3284 * .gitignore: Remove generated files, replace with wildcard.
3285 * (clean): Replace removal of generated files with wildcard.
3286 (version.c): Replace with...
3287 (version-generated.c): ...this.
3288 (xml-builtin.c): Replace with...
3289 (xml-builtin-generated.c): ...this.
3290 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
3291 (%.c: *regformats*): Replace with...
3292 (%-generated.c: *regformats*): ...this.
3293
a12e714b
MF
32942017-03-27 Max Filippov <jcmvbkbc@gmail.com>
3295
3296 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
3297 (xtensa_fill_gregset): Call collect_register_by_name for
3298 threadptr register.
3299 (xtensa_store_gregset): Call supply_register_by_name for
3300 threadptr register.
3301
1a09b50a
MF
33022017-03-27 Max Filippov <jcmvbkbc@gmail.com>
3303
3304 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
3305 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
3306 (xtensa_store_gregset): Call supply_register for all registers in
3307 a0_regnum..a0_regnum + C0_NREGS range.
3308
1a01e7c6
SM
33092017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3310
3311 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
3312 (ax-ipa.o: ax.c): Remove.
3313 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
3314 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
3315 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
3316 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
3317 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
3318
36bc18a8
SM
33192017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3320
3321 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
3322 (print-utils-ipa.o: ../common/print-utils.c): Remove.
3323 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
3324 (errors-ipa.o: ../common/errors.c): Remove.
3325 (format-ipa.o: ../common/format.c): Remove.
3326 (common-utils-ipa.o: ../common/common-utils.c): Remove.
3327
a8ebe3d5
SM
33282017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3329
3330 * Makefile.in (%-ipa.o: %.c): New rule.
3331 (tracepoint-ipa.o: tracepoint.c): Remove.
3332 (utils-ipa.o: utils.c): Remove.
3333 (remote-utils-ipa.o: remote-utils.c): Remove.
3334 (regcache-ipa.o: regcache.c): Remove.
3335 (i386-linux-ipa.o: i386-linux.c): Remove.
3336 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
3337 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
3338 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
3339 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
3340 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
3341 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
3342 (amd64-linux-ipa.o: amd64-linux.c): Remove.
3343 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
3344 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
3345 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
3346 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
3347 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
3348 (aarch64-ipa.o: aarch64.c): Remove.
3349 (s390-linux32-ipa.o: s390-linux32.c): Remove.
3350 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
3351 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
3352 (s390-linux64-ipa.o: s390-linux64.c): Remove.
3353 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
3354 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
3355 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
3356 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
3357 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
3358 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
3359 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
3360 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
3361 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
3362 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
3363 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
3364 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
3365 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
3366 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
3367 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
3368 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
3369 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
3370 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
3371 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
3372 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
3373 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
3374 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
3375 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
3376 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
3377 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
3378 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
3379 (tdesc-ipa.o: tdesc.c): Remove.
3380 (x32-linux-ipa.o: x32-linux.c): Remove.
3381 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
3382 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
3383
50cfacb7
SM
33842017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3385
3386 * Makefile.in (%.o: ../arch/%.c): New rule.
3387 (arm.o: ../arch/arm.c): Remove.
3388 (arm-linux.o: ../arch/arm-linux.c): Remove.
3389 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
3390 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
3391
c5a22423
SM
33922017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3393
3394 * Makefile.in (%.o: ../nat/%.c): New rule.
3395 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
3396 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
3397 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
3398 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
3399 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
3400 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
3401 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
3402 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
3403 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
3404 (linux-personality.o: ../nat/linux-personality.c): Remove.
3405 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
3406 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
3407 (x86-linux.o: ../nat/x86-linux.c): Remove.
3408 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
3409 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
3410
6bda016b
SM
34112017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3412
3413 * Makefile.in (%.o: ../common/%.c): New rule.
3414 (signals.o: ../common/signals.c): Remove.
3415 (print-utils.o: ../common/print-utils.c): Remove.
3416 (rsp-low.o: ../common/rsp-low.c): Remove.
3417 (common-utils.o: ../common/common-utils.c): Remove.
3418 (posix-strerror.o: ../common/posix-strerror.c): Remove.
3419 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
3420 (vec.o: ../common/vec.c): Remove.
3421 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
3422 (xml-utils.o: ../common/xml-utils.c): Remove.
3423 (ptid.o: ../common/ptid.c): Remove.
3424 (buffer.o: ../common/buffer.c): Remove.
3425 (format.o: ../common/format.c): Remove.
3426 (filestuff.o: ../common/filestuff.c): Remove.
3427 (agent.o: ../common/agent.c): Remove.
3428 (errors.o: ../common/errors.c): Remove.
3429 (environ.o: ../common/environ.c): Remove.
3430 (common-debug.o: ../common/common-debug.c): Remove.
3431 (cleanups.o: ../common/cleanups.c): Remove.
3432 (common-exceptions.o: ../common/common-exceptions.c): Remove.
3433 (fileio.o: ../common/fileio.c): Remove.
3434 (common-regcache.o: ../common/common-regcache.c): Remove.
3435 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
3436 (new-op.o: ../common/new-op.c): Remove.
3437 (btrace-common.o: ../common/btrace-common.c): Remove.
3438
21122961
SM
34392017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3440
3441 * Makefile.in (%.o: ../target/%.c): New rule.
3442 (waitstatus.o: ../target/waitstatus.c): Remove.
3443
c362e621
SM
34442017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3445
3446 * Makefile.in
3447 (%.c: ../regformats/%.dat,
3448 (%.c: ../regformats/arm/%.dat,
3449 (%.c: ../regformats/i386/%.dat,
3450 (%.c: ../regformats/rs6000/%.dat): New rules.
3451 (aarch64.c): Remove.
3452 (reg-arm.c): Remove.
3453 (arm-with-iwmmxt.c): Remove.
3454 (arm-with-vfpv2.c): Remove.
3455 (arm-with-vfpv3.c): Remove.
3456 (arm-with-neon.c): Remove.
3457 (reg-bfin.c): Remove.
3458 (reg-cris.c): Remove.
3459 (reg-crisv32.c): Remove.
3460 (i386.c): Remove.
3461 (i386-linux.c): Remove.
3462 (i386-avx.c): Remove.
3463 (i386-avx-linux.c): Remove.
3464 (i386-avx-avx512.c): Remove.
3465 (i386-avx-avx512-linux.c): Remove.
3466 (i386-mpx.c): Remove.
3467 (i386-mpx-linux.c): Remove.
3468 (i386-avx-mpx-avx512-pku.c): Remove.
3469 (i386-avx-mpx-avx512-pku-linux.c): Remove.
3470 (i386-avx-mpx.c): Remove.
3471 (i386-avx-mpx-linux.c): Remove.
3472 (i386-mmx.c): Remove.
3473 (i386-mmx-linux.c): Remove.
3474 (reg-ia64.c): Remove.
3475 (reg-m32r.c): Remove.
3476 (reg-m68k.c): Remove.
3477 (reg-cf.c): Remove.
3478 (mips-linux.c): Remove.
3479 (mips-dsp-linux.c): Remove.
3480 (mips64-linux.c): Remove.
3481 (mips64-dsp-linux.c): Remove.
3482 (nios2-linux.c): Remove.
3483 (powerpc-32.c): Remove.
3484 (powerpc-32l.c): Remove.
3485 (powerpc-altivec32l.c): Remove.
3486 (powerpc-cell32l.c): Remove.
3487 (powerpc-vsx32l.c): Remove.
3488 (powerpc-isa205-32l.c): Remove.
3489 (powerpc-isa205-altivec32l.c): Remove.
3490 (powerpc-isa205-vsx32l.c): Remove.
3491 (powerpc-e500l.c): Remove.
3492 (powerpc-64l.c): Remove.
3493 (powerpc-altivec64l.c): Remove.
3494 (powerpc-cell64l.c): Remove.
3495 (powerpc-vsx64l.c): Remove.
3496 (powerpc-isa205-64l.c): Remove.
3497 (powerpc-isa205-altivec64l.c): Remove.
3498 (powerpc-isa205-vsx64l.c): Remove.
3499 (s390-linux32.c): Remove.
3500 (s390-linux32v1.c): Remove.
3501 (s390-linux32v2.c): Remove.
3502 (s390-linux64.c): Remove.
3503 (s390-linux64v1.c): Remove.
3504 (s390-linux64v2.c): Remove.
3505 (s390-te-linux64.c): Remove.
3506 (s390-vx-linux64.c): Remove.
3507 (s390-tevx-linux64.c): Remove.
3508 (s390x-linux64.c): Remove.
3509 (s390x-linux64v1.c): Remove.
3510 (s390x-linux64v2.c): Remove.
3511 (s390x-te-linux64.c): Remove.
3512 (s390x-vx-linux64.c): Remove.
3513 (s390x-tevx-linux64.c): Remove.
3514 (tic6x-c64xp-linux.c): Remove.
3515 (tic6x-c64x-linux.c): Remove.
3516 (tic6x-c62x-linux.c): Remove.
3517 (reg-sh.c): Remove.
3518 (reg-sparc64.c): Remove.
3519 (reg-spu.c): Remove.
3520 (amd64.c): Remove.
3521 (amd64-linux.c): Remove.
3522 (amd64-avx.c): Remove.
3523 (amd64-avx-linux.c): Remove.
3524 (amd64-avx-avx512.c): Remove.
3525 (amd64-avx-avx512-linux.c): Remove.
3526 (amd64-mpx.c): Remove.
3527 (amd64-mpx-linux.c): Remove.
3528 (amd64-avx-mpx-avx512-pku.c): Remove.
3529 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
3530 (amd64-avx-mpx.c): Remove.
3531 (amd64-avx-mpx-linux.c): Remove.
3532 (x32.c): Remove.
3533 (x32-linux.c): Remove.
3534 (x32-avx.c): Remove.
3535 (x32-avx-linux.c): Remove.
3536 (x32-avx-avx512.c): Remove.
3537 (x32-avx-avx512-linux.c): Remove.
3538 (reg-xtensa.c): Remove.
3539 (reg-tilegx.c): Remove.
3540 (reg-tilegx32.c): Remove.
3541
1672e0d9
SDJ
35422017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
3543
3544 * Makefile.in (SFILES): Add "common/environ.c".
3545 (OBJS): Add "common/environ.h".
3546
239b6d10
WT
35472017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
3548
3549 * configure.ac: Check if the fs_base and gs_base members of
3550 `struct user_regs_struct' exist.
3551 * config.in: Regenerated.
3552 * configure: Likewise.
3553
694b382c
AT
35542017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
3555
3556 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
3557 target_read_memory.
3558 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
3559 (get_next_pcs_syscall_next_pc): Likewise.
3560
7dc53023
LM
35612016-12-23 Luis Machado <lgustavo@codesourcery.com>
3562
3563 * win32-i386-low.c: Fix incorrect reference to a couple source files.
3564 * nto-x86-low.c: Likewise.
3565
ad02e4fe
SM
35662016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
3567
3568 * Makefile.in: Include disable-implicit-rules.mk.
3569
dcb07cfa
PA
35702016-11-23 Pedro Alves <palves@redhat.com>
3571
3572 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
3573 (debug_vprintf): Use std::chrono::steady_clock instead of
3574 gettimeofday. Use '.' instead of ':'.
3575 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
3576 (get_timestamp): Use std::chrono::steady_clock instead of
3577 gettimeofday.
3578
8629c02c
SM
35792016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
3580
3581 * Makefile.in: Fix whitespace formatting.
3582
b593ecca
SM
35832016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
3584
3585 * Makefile.in (SFILES, OBS): Flatten list and order
3586 alphabetically.
3587
9986ba08
PA
35882016-11-23 Pedro Alves <palves@redhat.com>
3589
3590 * event-loop.c (handle_file_event): Use warning.
3591 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
3592 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
3593 Use warning.
3594
4eefa7bc
PA
35952016-11-23 Pedro Alves <palves@redhat.com>
3596
3597 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
3598 output.
3599 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
3600 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
3601 debug_printf and debug_flush for debug output.
3602 * server.c (handle_general_set): Likewise.
3603 * thread-db.c (try_thread_db_load): Use debug_printf for debug
3604 output.
3605
5443506e
SM
36062016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
3607
3608 * Makefile.in (.c.o): Replace rule with ...
3609 (%.o: %.c): ... this one.
3610
3b165252
SM
36112016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
3612
3613 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
3614 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
3615 make.
3616 * configure.ac: Remove checks for the make program.
3617 * configure: Re-generate.
3618
0bcda685
PA
36192016-10-28 Pedro Alves <palves@redhat.com>
3620
3621 * Makefile.in (CXX_DIALECT): Get from configure.
3622 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
3623 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
3624 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
3625 * config.in: Regenerate.
3626 * configure: Regenerate.
3627
c3805894
YQ
36282016-10-27 Yao Qi <yao.qi@linaro.org>
3629
3630 * linux-low.c (linux_supports_range_stepping): Return true if
3631 can_software_single_step return true.
3632
89342618
YQ
36332016-10-27 Yao Qi <yao.qi@linaro.org>
3634
3635 * inferiors.c (find_inferior_in_random): New function.
3636 * inferiors.h (find_inferior_in_random): Declare.
3637 * linux-low.c (linux_wait_for_event_filtered): Call
3638 find_inferior_in_random instead of find_inferior.
3639
e3652c84
YQ
36402016-10-27 Yao Qi <yao.qi@linaro.org>
3641
3642 * linux-low.c (linux_wait_1): If single-step breakpoints are
3643 inserted, remove them.
3644
5a04c4cf
PA
36452016-10-26 Pedro Alves <palves@redhat.com>
3646
3647 * linux-low.c (handle_extended_wait): Link parent/child fork
3648 threads.
3649 (linux_wait_1): Unlink them.
3650 (linux_set_resume_request): Ignore resume requests for
3651 already-resumed and unhandled fork child threads.
3652 * linux-low.h (struct lwp_info) <fork_relative>: New field.
3653 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
3654 New functions.
3655 (handle_v_requests) <vCont>: Don't call require_running.
3656 * server.h (in_queued_stop_replies): New declaration.
3657
cb93dc7f
YQ
36582016-10-24 Yao Qi <yao.qi@linaro.org>
3659
3660 PR server/20733
3661 * linux-aarch64-low.c (append_insns): Cast the return value to
3662 'uint32_t *'.
3663
a1078bea
YQ
36642016-10-10 Yao Qi <yao.qi@linaro.org>
3665
3666 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
3667
1fb77080
SDJ
36682016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
3669
3670 * target.c (target_supports_multi_process): New function, moved
3671 from...
3672 * target.h (target_supports_multi_process): ... here. Remove
3673 macro.
3674
39b5a3b9
TT
36752016-10-05 Tom Tromey <tom@tromey.com>
3676
3677 PR remote/20655:
3678 * tracepoint.c (handle_tracepoint_bkpts): Check
3679 ipa_error_tracepoint, not ipa_stopping_tracepoint.
3680
c1d0b70a
YQ
36812016-10-05 Yao Qi <yao.qi@linaro.org>
3682
3683 * configure.srv: Update the path of arm-*.xml files.
3684
0a69eedb
YQ
36852016-10-05 Terry Guo <terry.guo@arm.com>
3686 Yao Qi <yao.qi@linaro.org>
3687
3688 * Makefile.in: Adjust the path of rules.
3689 * configure.srv: Update the path of xml files.
3690 * regformats/arm-with-iwmmxt.dat: Regenerated.
3691 * regformats/arm-with-neon.dat: Likewise.
3692 * regformats/arm-with-vfpv2.dat: Likewise.
3693 * regformats/arm-with-vfpv3.dat Likewise.
3694
17e16485
YQ
36952016-09-30 Yao Qi <yao.qi@linaro.org>
3696
3697 PR gdbserver/20627
3698 * target.c (target_stop_and_wait): Don't call
3699 target_continue_no_signal, use resume_stop instead.
3700
edeeb602
YQ
37012016-09-26 Yao Qi <yao.qi@linaro.org>
3702
3703 * linux-low.c (linux_wait_1): Call debug_exit.
3704
503b1c39
PA
37052016-09-23 Pedro Alves <palves@redhat.com>
3706
3707 * Makefile.in (SFILES): Add common/new-op.c.
3708 (OBS): Add common/new-op.o.
3709 (new-op.o): New rule.
3710
74172ecf
SM
37112016-09-21 Simon Marchi <simon.marchi@ericsson.com>
3712
3713 * .gitinore: Ignore more files.
3714
fc6cda2e
YQ
37152016-09-21 Yao Qi <yao.qi@linaro.org>
3716
3717 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
3718 23.
3719
bc1e6c81
SDJ
37202016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
3721
3722 * server.c (start_inferior): Call target_mourn_inferior instead of
3723 mourn_inferior; pass ptid_t argument to it.
3724 (resume): Likewise.
3725 (handle_target_event): Likewise.
3726 * target.c (target_mourn_inferior): New function.
3727 * target.h (mourn_inferior): Delete macro.
3728
0e00e962
AA
37292016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
3730
3731 * linux-low.c (lwp_is_stepping): New function.
3732
1d8cb77d
CL
37332016-09-06 Carl Love <cel@us.ibm.com>
3734
3735 * server.c (start_inferior): Fixed comment, requested comment change
3736 didn't get updated correctly. Removed reference to ptrace () call as
3737 it is only true on Linux systems.
3738
7313bced
CL
37392016-09-06 Carl Love <cel@us.ibm.com>
3740
3741 * server.c (start_inferior): Do not call
3742 function target_post_create_inferior () if the
3743 inferior process has already exited.
3744
cf6de44d
PA
37452016-09-05 Pedro Alves <palves@redhat.com>
3746
3747 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
3748 (COMPILE.pre, CC_LD): Use CXX directly.
3749 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
3750 * acinclude.m4: Don't include build-with-cxx.m4.
3751 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
3752 * configure: Regenerate.
3753
c1da6748
AT
37542016-09-02 Akash Trehan <akash.trehan123@gmail.com>
3755
3756 PR gdb/19495
3757 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
3758 call writing data to own_buf.
3759
f2b9e3df
SDJ
37602016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
3761
3762 * target.c (mywait): Call target_wait instead of
3763 the_target->wait.
3764 (target_wait): New function.
3765
049a8570
SDJ
37662016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
3767
3768 * server.c (start_inferior): New variable 'ptid'. Replace calls
3769 to the_target->resume by target_continue{,_no_signal}, depending
3770 on the case.
3771 * target.c (target_stop_and_wait): Call target_continue_no_signal
3772 instead of the_target->resume.
3773 (target_continue): New function.
3774
3aa5cfa0
AT
37752016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
3776
3777 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
3778
754653a7
AZ
37792016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
3780
3781 PR server/20491
3782 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
3783 ps_prochandle.
3784 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
3785 * linux-arm-low.c (ps_get_thread_area): Likewise.
3786 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
3787 * linux-m68k-low.c (ps_get_thread_area): Likewise.
3788 * linux-mips-low.c (ps_get_thread_area): Likewise.
3789 * linux-nios2-low.c (ps_get_thread_area): Likewise.
3790 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
3791 * linux-x86-low.c (ps_get_thread_area): Likewise.
3792 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
3793
ed036b40
PA
37942016-08-19 Pedro Alves <palves@redhat.com>
3795
3796 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
3797
c8ef42ee
PA
37982016-08-19 Pedro Alves <palves@redhat.com>
3799
3800 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
3801 comment. Use memcpy instead of casting through unsigned long.
3802
9c235a72
PA
38032016-08-19 Pedro Alves <palves@redhat.com>
3804
3805 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
3806 allocating around 0x80000000.
3807
201506da
PA
38082016-08-19 Pedro Alves <palves@redhat.com>
3809
3810 PR gdb/20415
3811 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
3812 (x32-avx512-linux-ipa.o): New rules.
3813 * configure.ac (x86_64-*-linux*): New x32 check.
3814 * configure.srv (ipa_x32_linux_regobj): New.
3815 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
3816 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
3817 descriptions.
3818 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
3819 descriptions.
3820 * configure: Regenerate.
3821
f348d89a
PA
38222016-08-09 Pedro Alves <palves@redhat.com>
3823
3824 PR gdb/18653
3825 * Makefile.in (OBS): Add signals-state-save-restore.o.
3826 (signals-state-save-restore.o): New rule.
3827 * config.in: Regenerate.
3828 * configure: Regenerate.
3829 * linux-low.c: Include "signals-state-save-restore.h".
3830 (linux_create_inferior): Call
3831 restore_original_signals_state.
3832 * server.c: Include "dispositions-save-restore.h".
3833 (captured_main): Call save_original_signals_state.
3834
1baf5149
PA
38352016-08-05 Pedro Alves <palves@redhat.com>
3836
3837 * configure: Regenerate.
3838
fcd4a73d
YQ
38392016-08-04 Yao Qi <yao.qi@linaro.org>
3840
3841 * linux-low.c (regsets_fetch_inferior_registers): Check
3842 errno is ESRCH or not.
3843
979659d0
YQ
38442016-08-02 Yao Qi <yao.qi@linaro.org>
3845
3846 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
3847 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
3848 (thread_db_load_search): Update.
3849 (try_thread_db_load_1): Don't look for td_ta_event_addr,
3850 td_ta_set_event and td_ta_event_getmsg.
3851
6598661d
PA
38522016-07-26 Pedro Alves <palves@redhat.com>
3853
3854 PR server/20414
3855 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
3856 of unsigned long for 64-bit registers and use uint32_t instead of
3857 unsigned int for 32-bit registers.
3858
9cf12d57
PA
38592016-07-26 Pedro Alves <palves@redhat.com>
3860
3861 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
3862 to 'ptrace'.
3863
305450ed
TT
38642016-07-21 Tom Tromey <tom@tromey.com>
3865
3866 * configure: Rebuild.
3867
2583da7c
YQ
38682016-07-21 Yao Qi <yao.qi@linaro.org>
3869
3870 * mem-break.c (find_gdb_breakpoint): Cast bp to
3871 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
3872
21536b36
YQ
38732016-07-21 Yao Qi <yao.qi@linaro.org>
3874
3875 * server.c (handle_v_requests): Support s and S actions
3876 if target_supports_software_single_step return true.
3877
8901d193
YQ
38782016-07-21 Yao Qi <yao.qi@linaro.org>
3879
3880 * linux-low.c (resume_stopped_resumed_lwps): If resume request
3881 is resume_step, call maybe_hw_step.
3882 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
3883 and unstop them.
3884 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
3885 breakpoints or not.
3886 (proceed_one_lwp): If resume request is resume_step, install
3887 reinsert breakpoints and call maybe_hw_step.
3888
0e9a339e
YQ
38892016-07-21 Yao Qi <yao.qi@linaro.org>
3890
3891 * linux-low.c (proceed_one_lwp): Declare.
3892 (linux_resume_one_thread): Remove local variable 'step'.
3893 Lift code enqueue signal. Call proceed_one_lwp instead of
3894 linux_resume_one_lwp.
3895
4281b351
YQ
38962016-07-21 Yao Qi <yao.qi@linaro.org>
3897
3898 * linux-low.c (linux_resume_one_thread): Call
3899 enqueue_pending_signal.
3900
984a2c04
YQ
39012016-07-21 Yao Qi <yao.qi@linaro.org>
3902
3903 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
3904 * inferiors.c (do_restore_current_thread_cleanup): New function.
3905 (make_cleanup_restore_current_thread): Likewise.
3906 * linux-low.c (install_software_single_step_breakpoints): Call
3907 make_cleanup_restore_current_thread. Switch current_thread to
3908 thread.
3909
bec903c9
YQ
39102016-07-21 Yao Qi <yao.qi@linaro.org>
3911
3912 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
3913 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
3914 (clone_one_breakpoint): Likewise.
3915 (delete_reinsert_breakpoints): Change parameter to thread.
3916 Callers updated.
3917 (has_reinsert_breakpoints): Likewise.
3918 (uninsert_reinsert_breakpoints): Likewise.
3919 (reinsert_reinsert_breakpoints): Likewise.
3920 * mem-break.h (set_reinsert_breakpoint): Update declaration.
3921 (delete_reinsert_breakpoints): Likewise.
3922 (reinsert_reinsert_breakpoints): Likewise.
3923 (uninsert_reinsert_breakpoints): Likewise.
3924 (has_reinsert_breakpoints): Likewise.
3925
63c40ec7
YQ
39262016-07-21 Yao Qi <yao.qi@linaro.org>
3927
3928 * inferiors.c (get_thread_process): Make parameter const.
3929 * inferiors.h (get_thread_process): Update declaration.
3930 * mem-break.c (clone_all_breakpoints): Remove all parameters.
3931 Add new parameters child_thread and parent_thread. Callers
3932 updated.
3933 * mem-break.h (clone_all_breakpoints): Update declaration.
3934
9aa76cd0
YQ
39352016-07-21 Yao Qi <yao.qi@linaro.org>
3936
3937 * mem-break.c (struct breakpoint) <cond_list>: Remove.
3938 <command_list, handler>: Remove.
3939 (struct gdb_breakpoint): New.
3940 (struct other_breakpoint): New.
3941 (struct reinsert_breakpoint): New.
3942 (is_gdb_breakpoint): New function.
3943 (any_persistent_commands): Update command_list if
3944 is_gdb_breakpoint returns true.
3945 (set_breakpoint): Create breakpoints according to their types.
3946 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
3947 (set_gdb_breakpoint_1): Likewise.
3948 (set_gdb_breakpoint): Likewise.
3949 (clear_breakpoint_conditions): Change parameter type to
3950 'struct gdb_breakpoint *'.
3951 (clear_breakpoint_commands): Likewise.
3952 (clear_breakpoint_conditions_and_commands): Likewise.
3953 (add_condition_to_breakpoint): Likewise.
3954 (add_breakpoint_condition): Likewise.
3955 (add_commands_to_breakpoint): Likewise.
3956 (check_breakpoints): Check other_breakpoint.
3957 (clone_one_breakpoint): Clone breakpopint according to its type.
3958 * mem-break.h (struct gdb_breakpoint): Declare.
3959 (set_gdb_breakpoint): Update declaration.
3960 (clear_breakpoint_conditions_and_commands): Likewise.
3961 (add_breakpoint_condition): Likewise.
3962 (add_breakpoint_commands): Likewise.
3963 * server.c (process_point_options): Change parameter type to
3964 'struct gdb_breakpoint *'.
3965
811f8301
YQ
39662016-07-21 Yao Qi <yao.qi@linaro.org>
3967
3968 * mem-break.c (set_breakpoint_at): Rename it to ...
3969 (set_breakpoint_type_at): ... it.
3970 (set_breakpoint_at): Call set_breakpoint_type_at.
3971 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
3972 * mem-break.h (set_breakpoint_at): Update comments.
3973
b1c51e36
CLT
39742016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
3975
3976 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
3977 to buf parameter.
3978 (nios2_store_gregset): Likewise.
3979
ced2dffb
PA
39802016-07-01 Pedro Alves <palves@redhat.com>
3981 Antoine Tremblay <antoine.tremblay@ericsson.com>
3982
3983 * linux-low.c: Change interface to take the target lwp_info
3984 pointer directly and return void. Handle detaching from a zombie
3985 thread.
3986 (linux_detach_lwp_callback): New function.
3987 (linux_detach): Detach from the leader thread after detaching from
3988 the clone threads.
3989
2ac09a5b
YQ
39902016-06-28 Yao Qi <yao.qi@linaro.org>
3991
3992 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
3993 for variable new_offset.
3994 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
3995 (aarch64_ftrace_insn_reloc_cb): Likewise.
3996 (aarch64_ftrace_insn_reloc_tb): Likewise.
3997 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
3998 PRIx64 instead of PRIx32.
3999
79e7fd4f
YQ
40002016-06-28 Yao Qi <yao.qi@linaro.org>
4001
4002 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
4003 (the_low_target): Install arm_get_syscall_trapinfo.
4004
061fc021
YQ
40052016-06-28 Yao Qi <yao.qi@linaro.org>
4006
4007 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
4008 function.
4009 (the_low_target): Install aarch64_get_syscall_trapinfo.
4010
4cc32bec
YQ
40112016-06-28 Yao Qi <yao.qi@linaro.org>
4012
4013 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
4014 Callers updated.
4015 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
4016 Remove parameter sysno.
4017 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
4018 sysret.
4019
782c1122
AA
40202016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
4021
4022 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
4023 (s390_emit_ne_goto): Likewise.
4024 (s390_emit_lt_goto): Likewise.
4025 (s390_emit_le_goto): Likewise.
4026 (s390_emit_gt_goto): Likewise.
4027 (s390_emit_ge_goto): Likewise.
4028 (s390x_emit_eq_goto): Likewise.
4029 (s390x_emit_ne_goto): Likewise.
4030 (s390x_emit_lt_goto): Likewise.
4031 (s390x_emit_le_goto): Likewise.
4032 (s390x_emit_gt_goto): Likewise.
4033 (s390x_emit_ge_goto): Likewise.
4034 (s390_emit_ops_impl): Mark variable static.
4035 (s390x_emit_ops): Likewise.
4036
2e7b624b
YQ
40372016-06-17 Yao Qi <yao.qi@linaro.org>
4038
4039 * linux-low.c (handle_extended_wait): Call
4040 uninsert_reinsert_breakpoints for the parent process. Remove
4041 reinsert breakpoints from the child process. Reinsert them to
4042 the parent process when vfork is done.
4043 * mem-break.c (uninsert_reinsert_breakpoints): New function.
4044 (reinsert_reinsert_breakpoints): New function.
4045 * mem-break.h (uninsert_reinsert_breakpoints): Declare
4046 (reinsert_reinsert_breakpoints): Declare.
4047
8a81c5d7
YQ
40482016-06-17 Yao Qi <yao.qi@linaro.org>
4049
4050 * linux-low.c (handle_extended_wait): If the parent is doing
4051 step-over, remove the reinsert breakpoints from the forked child.
4052
f50bf8e5
YQ
40532016-06-17 Yao Qi <yao.qi@linaro.org>
4054
4055 * linux-low.c (unsuspend_all_lwps): Declare.
4056 (linux_low_filter_event): If thread exited, call finish_step_over.
4057 If step-over is finished, unsuspend other threads.
4058
8376a3cb
YQ
40592016-06-17 Yao Qi <yao.qi@linaro.org>
4060
4061 * linux-low.c (linux_resume_one_lwp_throw): Assert
4062 has_reinsert_breakpoints returns false.
4063 * mem-break.c (delete_disabled_breakpoints): Assert
4064 bp type isn't reinsert_breakpoint.
4065
f79b145d
YQ
40662016-06-17 Yao Qi <yao.qi@linaro.org>
4067
4068 * linux-low.c (maybe_hw_step): New function.
4069 (linux_resume_one_lwp_throw): Call maybe_hw_step.
4070 (finish_step_over): Switch current_thread to lwp temporarily,
4071 and assert has_reinsert_breakpoints returns true.
4072 (proceed_one_lwp): Call maybe_hw_step.
4073 * mem-break.c (has_reinsert_breakpoints): New function.
4074 * mem-break.h (has_reinsert_breakpoints): Declare.
4075
0ae534d2
JT
40762016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
4077
4078 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
4079
fcdad592
YQ
40802016-05-17 Yao Qi <yao.qi@linaro.org>
4081
4082 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
4083 instead of find_inferior.
4084
9e784964
YQ
40852016-05-05 Yao Qi <yao.qi@linaro.org>
4086
4087 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
4088 Initialize res to zero.
4089
cf2ebb6e
YQ
40902016-05-05 Yao Qi <yao.qi@linaro.org>
4091
4092 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
4093 to uint32_t.
4094
c1aebf87
UW
40952016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
4096
4097 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
4098 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
4099 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
4100
35fd2deb 41012016-04-28 Par Olsson <par.olsson@windriver.com>
cbe14bcf 4102 Simon Marchi <simon.marchi@ericsson.com>
35fd2deb
PO
4103
4104 * tracepoint.c (write_inferior_int8): New function.
4105 (cmd_qtenable_disable): Write enable flag using
4106 write_inferior_int8.
4107
484b3c32
YQ
41082016-04-25 Yao Qi <yao.qi@linaro.org>
4109
4110 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
4111 (need_step_over_p): Return zero if the LWP has pending signals
4112 can be delivered on software single step target.
4113
85ba7d86
YQ
41142016-04-25 Yao Qi <yao.qi@linaro.org>
4115
4116 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
4117 return instead of error.
4118
3539aa13
YQ
41192016-04-22 Yao Qi <yao.qi@linaro.org>
4120
4121 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
4122 to 23.
4123
5b061e98
YQ
41242016-04-22 Yao Qi <yao.qi@linaro.org>
4125
4126 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
4127 signal when stepping over breakpoint with software single
4128 step.
4129
3451269c
PA
41302016-04-21 Pedro Alves <palves@redhat.com>
4131
4132 * linux-s390-low.c (s390_collect_ptrace_register)
4133 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
4134 add casts.
4135 (s390_check_regset): Use void * instead of gdb_byte *.
4136
a2358508
PA
41372016-04-20 Pedro Alves <palves@redhat.com>
4138
4139 * configure: Renegerate.
4140
6885166d
YQ
41412016-04-20 Yao Qi <yao.qi@linaro.org>
4142
4143 * linux-aarch32-low.c: Include "arch/arm-linux.h".
4144 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
4145 number 16.
4146 (arm_store_gregset): Likewise.
4147
2b863f51
WT
41482016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
4149
4150 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
4151 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
4152 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
4153 (amd64-avx-mpx-linux.c): New rules.
4154 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
4155 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
4156 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
4157 (srv_amd64_regobj): Add amd64-avx-mpx.o.
4158 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
4159 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
4160 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
4161 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
4162 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
4163 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
4164 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
4165 * linux-x86-low.c (x86_linux_read_description): Add case for
4166 X86_XSTATE_AVX_MPX_MASK.
4167 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
4168 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
4169 init_registers_i386_avx_mpx_linux.
4170 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
4171 (initialize_low_tracepoint): Call
4172 init_registers_i386_avx_mpx_linux.
4173 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
4174 (initialize_low_tracepoint): Call
4175 init_registers_amd64_avx_mpx_linux.
4176 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
4177 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
4178 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
4179 declarations.
4180
9b30624b
PA
41812016-04-18 Pedro Alves <palves@redhat.com>
4182
4183 * configure: Regenerate.
4184
45e3745e
AT
41852016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
4186
4187 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
4188 (aarch64_emit_sub): Likewise.
4189
2afc13ff
PA
41902016-04-12 Pedro Alves <palves@redhat.com>
4191
4192 * utils.c (prepare_to_throw_exception): Delete.
4193
6e774b13
SM
41942016-04-05 Simon Marchi <simon.marchi@ericsson.com>
4195
4196 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
4197
4dca19f8
MK
41982016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
4199
4200 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
4201
d0a9981f
MK
42022016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
4203
4204 * linux-aarch64-ipa.c: Add <elf.h> include.
4205 * linux-ppc-ipa.c: Add <elf.h> include.
4206 * linux-s390-ipa.c: Add <elf.h> include.
4207
252db07e
MK
42082016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
4209
4210 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
4211 (get_raw_reg_ptr): Likewise.
4212 (get_trace_state_variable_value_ptr): Likewise.
4213 (set_trace_state_variable_value_ptr): Likewise.
4214 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
4215 char *.
4216
14e2b6d9
MK
42172016-03-31 Wei-cheng Wang <cole945@gmail.com>
4218 Marcin Kościelnicki <koriakin@0x04.net>
4219
4220 PR/17221
4221 * linux-ppc-low.c (emit_insns): New function.
4222 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
4223 (ppc_emit_prologue): New function.
4224 (ppc_emit_epilogue): New function.
4225 (ppc_emit_add): New function.
4226 (ppc_emit_sub): New function.
4227 (ppc_emit_mul): New function.
4228 (ppc_emit_lsh): New function.
4229 (ppc_emit_rsh_signed): New function.
4230 (ppc_emit_rsh_unsigned): New function.
4231 (ppc_emit_ext): New function.
4232 (ppc_emit_zero_ext): New function.
4233 (ppc_emit_log_not): New function.
4234 (ppc_emit_bit_and): New function.
4235 (ppc_emit_bit_or): New function.
4236 (ppc_emit_bit_xor): New function.
4237 (ppc_emit_bit_not): New function.
4238 (ppc_emit_equal): New function.
4239 (ppc_emit_less_signed): New function.
4240 (ppc_emit_less_unsigned): New function.
4241 (ppc_emit_ref): New function.
4242 (ppc_emit_const): New function.
4243 (ppc_emit_reg): New function.
4244 (ppc_emit_pop): New function.
4245 (ppc_emit_stack_flush): New function.
4246 (ppc_emit_swap): New function.
4247 (ppc_emit_stack_adjust): New function.
4248 (ppc_emit_call): New function.
4249 (ppc_emit_int_call_1): New function.
4250 (ppc_emit_void_call_2): New function.
4251 (ppc_emit_if_goto): New function.
4252 (ppc_emit_goto): New function.
4253 (ppc_emit_eq_goto): New function.
4254 (ppc_emit_ne_goto): New function.
4255 (ppc_emit_lt_goto): New function.
4256 (ppc_emit_le_goto): New function.
4257 (ppc_emit_gt_goto): New function.
4258 (ppc_emit_ge_goto): New function.
4259 (ppc_write_goto_address): New function.
4260 (ppc_emit_ops_impl): New static variable.
4261 (ppc64v1_emit_prologue): New function.
4262 (ppc64v2_emit_prologue): New function.
4263 (ppc64_emit_epilogue): New function.
4264 (ppc64_emit_add): New function.
4265 (ppc64_emit_sub): New function.
4266 (ppc64_emit_mul): New function.
4267 (ppc64_emit_lsh): New function.
4268 (ppc64_emit_rsh_signed): New function.
4269 (ppc64_emit_rsh_unsigned): New function.
4270 (ppc64_emit_ext): New function.
4271 (ppc64_emit_zero_ext): New function.
4272 (ppc64_emit_log_not): New function.
4273 (ppc64_emit_bit_and): New function.
4274 (ppc64_emit_bit_or): New function.
4275 (ppc64_emit_bit_xor): New function.
4276 (ppc64_emit_bit_not): New function.
4277 (ppc64_emit_equal): New function.
4278 (ppc64_emit_less_signed): New function.
4279 (ppc64_emit_less_unsigned): New function.
4280 (ppc64_emit_ref): New function.
4281 (ppc64_emit_const): New function.
4282 (ppc64v1_emit_reg): New function.
4283 (ppc64v2_emit_reg): New function.
4284 (ppc64_emit_pop): New function.
4285 (ppc64_emit_stack_flush): New function.
4286 (ppc64_emit_swap): New function.
4287 (ppc64v1_emit_call): New function.
4288 (ppc64v2_emit_call): New function.
4289 (ppc64v1_emit_int_call_1): New function.
4290 (ppc64v2_emit_int_call_1): New function.
4291 (ppc64v1_emit_void_call_2): New function.
4292 (ppc64v2_emit_void_call_2): New function.
4293 (ppc64_emit_if_goto): New function.
4294 (ppc64_emit_eq_goto): New function.
4295 (ppc64_emit_ne_goto): New function.
4296 (ppc64_emit_lt_goto): New function.
4297 (ppc64_emit_le_goto): New function.
4298 (ppc64_emit_gt_goto): New function.
4299 (ppc64_emit_ge_goto): New function.
4300 (ppc64v1_emit_ops_impl): New static variable.
4301 (ppc64v2_emit_ops_impl): New static variable.
4302 (ppc_emit_ops): New function.
4303 (linux_low_target): Wire in ppc_emit_ops.
4304
a2174ba4
MK
43052016-03-31 Wei-cheng Wang <cole945@gmail.com>
4306 Marcin Kościelnicki <koriakin@0x04.net>
4307
4308 PR/17221
4309 * Makefile.in: Add powerpc-*-ipa.o
4310 * configure.srv: Add ipa_obj for powerpc*-linux.
4311 * linux-ppc-ipa.c: New file.
4312 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
4313 includes.
4314 (PPC_FIELD): New macro.
4315 (PPC_SEXT): New macro.
4316 (PPC_OP6): New macro.
4317 (PPC_BO): New macro.
4318 (PPC_LI): New macro.
4319 (PPC_BD): New macro.
4320 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
4321 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
4322 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
4323 (ppc_get_thread_area): New function.
4324 (is_elfv2_inferior): New function.
4325 (gen_ds_form): New function.
4326 (GEN_STD): New macro.
4327 (GEN_STDU): New macro.
4328 (GEN_LD): New macro.
4329 (GEN_LDU): New macro.
4330 (gen_d_form): New function.
4331 (GEN_ADDI): New macro.
4332 (GEN_ADDIS): New macro.
4333 (GEN_LI): New macro.
4334 (GEN_LIS): New macro.
4335 (GEN_ORI): New macro.
4336 (GEN_ORIS): New macro.
4337 (GEN_LWZ): New macro.
4338 (GEN_STW): New macro.
4339 (GEN_STWU): New macro.
4340 (gen_xfx_form): New function.
4341 (GEN_MFSPR): New macro.
4342 (GEN_MTSPR): New macro.
4343 (GEN_MFCR): New macro.
4344 (GEN_MTCR): New macro.
4345 (GEN_SYNC): New macro.
4346 (GEN_LWSYNC): New macro.
4347 (gen_x_form): New function.
4348 (GEN_OR): New macro.
4349 (GEN_MR): New macro.
4350 (GEN_LWARX): New macro.
4351 (GEN_STWCX): New macro.
4352 (GEN_CMPW): New macro.
4353 (gen_md_form): New function.
4354 (GEN_RLDICL): New macro.
4355 (GEN_RLDICR): New macro.
4356 (gen_i_form): New function.
4357 (GEN_B): New macro.
4358 (GEN_BL): New macro.
4359 (gen_b_form): New function.
4360 (GEN_BNE): New macro.
4361 (GEN_LOAD): New macro.
4362 (GEN_STORE): New macro.
4363 (gen_limm): New function.
4364 (gen_atomic_xchg): New function.
4365 (gen_call): New function.
4366 (ppc_relocate_instruction): New function.
4367 (ppc_install_fast_tracepoint_jump_pad): New function.
4368 (ppc_get_min_fast_tracepoint_insn_len): New function.
4369 (ppc_get_ipa_tdesc_idx): New function.
4370 (the_low_target): Wire in the new functions.
4371 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
4372 tdescs.
4373 * linux-ppc-tdesc.h: New file.
4374
a13c4696
MK
43752016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
4376
4377 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
4378 (alloc_jump_pad_buffer): New function.
4379 * linux-amd64-ipa.c: Add <sys/mman.h> include.
4380 (alloc_jump_pad_buffer): New function.
4381 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
4382 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
4383 (alloc_jump_pad_buffer): New function.
4384 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
4385 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
4386 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
4387 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
4388
1cda1512
MK
43892016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
4390
4391 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
4392 * linux-amd64-ipa.c: Likewise.
4393 * linux-i386-ipa.c: Likewise.
4394 * linux-s390-ipa.c: Likewise.
4395 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
4396 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
4397 set_trace_state_variable_value_ptr.
4398 (struct ipa_sym_addresses): Likewise.
4399 (symbol_list): Likewise.
4400 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
4401 accessing gdb_collect directly.
4402 (gdb_collect_ptr_type): New typedef.
4403 (get_raw_reg_ptr_type): New typedef.
4404 (get_trace_state_variable_value_ptr_type): New typedef.
4405 (set_trace_state_variable_value_ptr_type): New typedef.
4406 (gdb_collect_ptr): New global.
4407 (get_raw_reg_ptr): New global.
4408 (get_trace_state_variable_value_ptr): New global.
4409 (set_trace_state_variable_value_ptr): New global.
4410 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
4411 accessing get_raw_reg directly.
4412 (get_get_tsv_func_addr): Likewise for
4413 get_trace_state_variable_value_ptr.
4414 (get_set_tsv_func_addr): Likewise for
4415 set_trace_state_variable_value_ptr.
4416 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
4417
72fb5488
SM
44182016-03-30 Simon Marchi <simon.marchi@ericsson.com>
4419
4420 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
4421
28170b88
MK
44222016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
4423
4424 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
4425 packets.
4426 (relocate_instruction): Remove own_buf.
4427 * server.c (own_buf): Make global.
4428 (handle_v_requests): Make global.
4429 * server.h (own_buf): New declaration.
4430 (handle_v_requests): New prototype.
4431
f39e8743
MK
44322016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
4433
4434 PR 18377
4435 * linux-s390-low.c (add_insns): New function.
4436 (s390_emit_prologue): New function.
4437 (s390_emit_epilogue): New function.
4438 (s390_emit_add): New function.
4439 (s390_emit_sub): New function.
4440 (s390_emit_mul): New function.
4441 (s390_emit_lsh): New function.
4442 (s390_emit_rsh_signed): New function.
4443 (s390_emit_rsh_unsigned): New function.
4444 (s390_emit_ext): New function.
4445 (s390_emit_log_not): New function.
4446 (s390_emit_bit_and): New function.
4447 (s390_emit_bit_or): New function.
4448 (s390_emit_bit_xor): New function.
4449 (s390_emit_bit_not): New function.
4450 (s390_emit_equal): New function.
4451 (s390_emit_less_signed): New function.
4452 (s390_emit_less_unsigned): New function.
4453 (s390_emit_ref): New function.
4454 (s390_emit_if_goto): New function.
4455 (s390_emit_goto): New function.
4456 (s390_write_goto_address): New function.
4457 (s390_emit_litpool): New function.
4458 (s390_emit_const): New function.
4459 (s390_emit_call): New function.
4460 (s390_emit_reg): New function.
4461 (s390_emit_pop): New function.
4462 (s390_emit_stack_flush): New function.
4463 (s390_emit_zero_ext): New function.
4464 (s390_emit_swap): New function.
4465 (s390_emit_stack_adjust): New function.
4466 (s390_emit_set_r2): New function.
4467 (s390_emit_int_call_1): New function.
4468 (s390_emit_void_call_2): New function.
4469 (s390_emit_eq_goto): New function.
4470 (s390_emit_ne_goto): New function.
4471 (s390_emit_lt_goto): New function.
4472 (s390_emit_le_goto): New function.
4473 (s390_emit_gt_goto): New function.
4474 (s390_emit_ge_goto): New function.
4475 (s390x_emit_prologue): New function.
4476 (s390x_emit_epilogue): New function.
4477 (s390x_emit_add): New function.
4478 (s390x_emit_sub): New function.
4479 (s390x_emit_mul): New function.
4480 (s390x_emit_lsh): New function.
4481 (s390x_emit_rsh_signed): New function.
4482 (s390x_emit_rsh_unsigned): New function.
4483 (s390x_emit_ext): New function.
4484 (s390x_emit_log_not): New function.
4485 (s390x_emit_bit_and): New function.
4486 (s390x_emit_bit_or): New function.
4487 (s390x_emit_bit_xor): New function.
4488 (s390x_emit_bit_not): New function.
4489 (s390x_emit_equal): New function.
4490 (s390x_emit_less_signed): New function.
4491 (s390x_emit_less_unsigned): New function.
4492 (s390x_emit_ref): New function.
4493 (s390x_emit_if_goto): New function.
4494 (s390x_emit_const): New function.
4495 (s390x_emit_call): New function.
4496 (s390x_emit_reg): New function.
4497 (s390x_emit_pop): New function.
4498 (s390x_emit_stack_flush): New function.
4499 (s390x_emit_zero_ext): New function.
4500 (s390x_emit_swap): New function.
4501 (s390x_emit_stack_adjust): New function.
4502 (s390x_emit_int_call_1): New function.
4503 (s390x_emit_void_call_2): New function.
4504 (s390x_emit_eq_goto): New function.
4505 (s390x_emit_ne_goto): New function.
4506 (s390x_emit_lt_goto): New function.
4507 (s390x_emit_le_goto): New function.
4508 (s390x_emit_gt_goto): New function.
4509 (s390x_emit_ge_goto): New function.
4510 (s390_emit_ops): New function.
4511 (struct linux_target_ops): Fill in emit_ops hook.
4512
abd9baf9
MK
45132016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
4514
4515 PR 18377
4516 * Makefile.in: Add s390 IPA files.
4517 * configure.srv: Build IPA for s390.
4518 * linux-s390-ipa.c: New file.
4519 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
4520 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
4521 (tdesc_s390_linux32): Likewise.
4522 (init_registers_s390_linux32v1): Likewise.
4523 (tdesc_s390_linux32v1): Likewise.
4524 (init_registers_s390_linux32v2): Likewise.
4525 (tdesc_s390_linux32v2): Likewise.
4526 (init_registers_s390_linux64): Likewise.
4527 (tdesc_s390_linux64): Likewise.
4528 (init_registers_s390_linux64v1): Likewise.
4529 (tdesc_s390_linux64v1): Likewise.
4530 (init_registers_s390_linux64v2): Likewise.
4531 (tdesc_s390_linux64v2): Likewise.
4532 (init_registers_s390_te_linux64): Likewise.
4533 (tdesc_s390_te_linux64): Likewise.
4534 (init_registers_s390_vx_linux64): Likewise.
4535 (tdesc_s390_vx_linux64): Likewise.
4536 (init_registers_s390_tevx_linux64): Likewise.
4537 (tdesc_s390_tevx_linux64): Likewise.
4538 (init_registers_s390x_linux64): Likewise.
4539 (tdesc_s390x_linux64): Likewise.
4540 (init_registers_s390x_linux64v1): Likewise.
4541 (tdesc_s390x_linux64v1): Likewise.
4542 (init_registers_s390x_linux64v2): Likewise.
4543 (tdesc_s390x_linux64v2): Likewise.
4544 (init_registers_s390x_te_linux64): Likewise.
4545 (tdesc_s390x_te_linux64): Likewise.
4546 (init_registers_s390x_vx_linux64): Likewise.
4547 (tdesc_s390x_vx_linux64): Likewise.
4548 (init_registers_s390x_tevx_linux64): Likewise.
4549 (tdesc_s390x_tevx_linux64): Likewise.
4550 (have_hwcap_s390_vx): New static variable.
4551 (s390_arch_setup): Fill have_hwcap_s390_vx.
4552 (s390_get_thread_area): New function.
4553 (s390_ft_entry_gpr_esa): New const.
4554 (s390_ft_entry_gpr_zarch): New const.
4555 (s390_ft_entry_misc): New const.
4556 (s390_ft_entry_fr): New const.
4557 (s390_ft_entry_vr): New const.
4558 (s390_ft_main_31): New const.
4559 (s390_ft_main_64): New const.
4560 (s390_ft_exit_fr): New const.
4561 (s390_ft_exit_vr): New const.
4562 (s390_ft_exit_misc): New const.
4563 (s390_ft_exit_gpr_esa): New const.
4564 (s390_ft_exit_gpr_zarch): New const.
4565 (append_insns): New function.
4566 (s390_relocate_instruction): New function.
4567 (s390_install_fast_tracepoint_jump_pad): New function.
4568 (s390_get_min_fast_tracepoint_insn_len): New function.
4569 (s390_get_ipa_tdesc_idx): New function.
4570 (struct linux_target_ops): Wire in the above functions.
4571 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
4572 * linux-s390-tdesc.h: New file.
4573
a4105d04
MK
45742016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
4575
4576 * linux-s390-low.c (s390_supports_tracepoints): New function.
4577 (struct linux_target_ops): Fill supports_tracepoints hook.
4578
35ac8b3e
YQ
45792016-03-18 Yao Qi <yao.qi@linaro.org>
4580
4581 * linux-low.c (lwp_signal_can_be_delivered): New function.
4582 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
4583
94610ec4
YQ
45842016-03-18 Yao Qi <yao.qi@linaro.org>
4585
4586 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
4587 0 if signal is enqueued. Remove 'signal' from one debugging
4588 message. Move one debugging message to some lines below.
4589 Remove code setting 'signal' to 0.
4590
80aea927
YQ
45912016-03-18 Yao Qi <yao.qi@linaro.org>
4592
4593 * linux-low.c (linux_low_filter_event): Remove redundant
4594 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
4595
b04fd3be
MK
45962016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
4597
4598 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
4599 (struct linux_target_ops): Wire in the above.
4600
c40c8d4b
YQ
46012016-03-03 Yao Qi <yao.qi@linaro.org>
4602
4603 * linux-low.c: Update comments to start_step_over.
4604
0f8288ae
YQ
46052016-03-03 Yao Qi <yao.qi@linaro.org>
4606
4607 PR server/19736
4608 * linux-low.c (handle_extended_wait): Set child suspended
4609 if event_lwp->bp_reinsert isn't zero.
4610
fdbd04a8
YQ
46112016-03-02 Yao Qi <yao.qi@linaro.org>
4612
4613 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
4614 enqueue_pending_signal.
4615
6896a8fa
MK
46162016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
4617
4618 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
4619 is actually loaded.
4620
ab503087
MK
46212016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
4622
4623 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
4624 (s390_regmap_3264) [!__s390x__]: New global.
4625 (s390_collect_ptrace_register): Skip map entries containing -1.
4626 (s390_supply_ptrace_register): Ditto.
4627 (s390_fill_gprs_high): New function.
4628 (s390_store_gprs_high): New function.
4629 (s390_regsets): Add NT_S390_HIGH_GPRS.
4630 (s390_get_hwcap): Enable on 31-bit.
4631 (have_hwcap_s390_high_gprs): Enable on 31-bit.
4632 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
4633 Detect NT_S390_HIGH_GPRS.
4634 (s390_usrregs_info_3264): Enable on 31-bit.
4635 (s390_regs_info): Enable regs_info_3264 on 31-bit.
4636 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
4637
ae91f625
MK
46382016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
4639
4640 PR gdb/13808
4641 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
4642 * configure.srv: Ditto.
4643 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
4644 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
4645 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
4646 (init_registers_amd64_linux): Remove prototype.
4647 (tdesc_amd64_linux): Remove declaration.
4648 (get_ipa_tdesc): New function.
4649 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
4650 initialize remaining tdescs.
4651 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
4652 (init_registers_i386_linux): Remove prototype.
4653 (tdesc_i386_linux): Remove declaration.
4654 (get_ipa_tdesc): New function.
4655 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
4656 initialize remaining tdescs.
4657 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
4658 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
4659 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
4660 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
4661 (x86_get_ipa_tdesc_idx): New function.
4662 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
4663 * linux-x86-tdesc.h: New file.
4664 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
4665 (target_get_ipa_tdesc_idx): New macro.
4666 * tracepoint.c (ipa_tdesc_idx): New macro.
4667 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
4668 (symbol_list): Add ipa_tdesc_idx.
4669 (cmd_qtstart): Write ipa_tdesc_idx in the target.
4670 (ipa_tdesc): Remove.
4671 (ipa_tdesc_idx): New variable.
4672 (get_context_regcache): Use get_ipa_tdesc.
4673 (gdb_collect): Ditto.
4674 (gdb_probe): Ditto.
4675 * tracepoint.h (get_ipa_tdesc): New prototype.
4676 (ipa_tdesc): Remove.
4677
e7ad2f14
PA
46782016-02-24 Pedro Alves <palves@redhat.com>
4679
4680 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
4681 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
4682 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
4683 Factor out common code between the USE_SIGTRAP_SIGINFO and
4684 !USE_SIGTRAP_SIGINFO blocks.
4685 (linux_low_filter_event): Call save_stop_reason instead of
4686 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
4687 Update comments.
4688 (linux_wait_1): Update comments.
4689
657f9cde
WW
46902016-02-24 Wei-cheng Wang <cole945@gmail.com>
4691
4692 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
4693 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
4694 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
4695 ppc_insert_point, ppc_remove_point.
4696
b00b61e1
MK
46972016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
4698
4699 * linux-s390-low.c (s390_supports_z_point_type): New function.
4700 (struct linux_target_ops): Wire s390_supports_z_point_type in.
4701
553cb527
YQ
47022016-02-16 Yao Qi <yao.qi@linaro.org>
4703
4704 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
4705 PC. Get pc from regcache_read_pc.
4706
a5652c21
YQ
47072016-02-12 Yao Qi <yao.qi@linaro.org>
4708
4709 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
4710 or linux_get_pc_32bit.
4711 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
4712
ed443b61
YQ
47132016-02-12 Yao Qi <yao.qi@linaro.org>
4714
4715 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
4716 arm_linux_get_next_pcs_fixup.
4717
020ecd38
MK
47182016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
4719
4720 * tracepoint.c (x_tracepoint_action_download): Change
4721 write_inferior_data_ptr to write_inferior_data_pointer.
4722 (cmd_qtstart): Likewise.
4723 (write_inferior_data_ptr): Remove.
4724 (download_agent_expr): Change write_inferior_data_ptr to
4725 write_inferior_data_pointer.
4726 (download_tracepoint_1): Likewise.
4727 (download_tracepoint): Likewise.
4728 (download_trace_state_variables): Likewise.
4729
7cae9051
WW
47302016-02-11 Wei-cheng Wang <cole945@gmail.com>
4731 Marcin Kościelnicki <koriakin@0x04.net>
4732
4733 * tracepoint.c (struct tracepoint_action_ops): Remove.
4734 (struct tracepoint_action): Remove ops.
4735 (m_tracepoint_action_download, r_tracepoint_action_download)
4736 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
4737 size and offset accordingly.
4738 (m_tracepoint_action_ops, r_tracepoint_action_ops)
4739 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
4740 (tracepoint_action_send, tracepoint_action_download): New functions.
4741 Helpers for trace action handlers.
4742 (add_tracepoint_action): Remove setup actions ops.
4743 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
4744
9f6a71b4
YQ
47452016-02-10 Yao Qi <yao.qi@linaro.org>
4746
4747 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
4748
1e94266c
SM
47492016-02-09 Simon Marchi <simon.marchi@ericsson.com>
4750
4751 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
4752 to AC_OUTPUT.
4753 * configure: Regenerate.
4754
8adce034
SM
47552016-02-09 Simon Marchi <simon.marchi@ericsson.com>
4756
4757 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
4758 void * to gdb_byte *.
4759 * linux-low.c (siginfo_fixup): Likewise.
4760 (linux_xfer_siginfo): Likewise.
4761 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
4762 Likewise.
4763 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
4764
93813b37
WT
47652016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
4766
4767 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
4768 to srv_tgtobj.
4769 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
4770 to srv_tgtobj.
4771 * linux-x86-low.c [__x86_64__]: Include
4772 "nat/amd64-linux-siginfo.h".
4773 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
4774 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
4775 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
4776 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
4777 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
4778 (cpt_si_fd, si_timerid, si_overrun): Move from
4779 nat/amd64-linux-siginfo.c.
4780 * Makefile.in (amd64-linux-siginfo.o:): New rule.
4781
8424cc97
SM
47822016-01-28 Simon Marchi <simon.marchi@ericsson.com>
4783
4784 * server.c (skip_to_semicolon): Remove.
4785 (process_point_options): Use strchrnul instead of
4786 skip_to_semicolon.
4787
4d18591b
YQ
47882016-01-26 Yao Qi <yao.qi@linaro.org>
4789
4790 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
4791 * linux-low.c (install_software_single_step_breakpoints): Don't
4792 call regcache_read_pc.
4793 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
4794 argument pc.
4795
d8020970
YQ
47962016-01-26 Yao Qi <yao.qi@linaro.org>
4797
4798 * linux-low.c (install_software_single_step_breakpoints): Call
4799 regcache_read_pc instead of get_pc.
4800
8b207339
YQ
48012016-01-26 Yao Qi <yao.qi@linaro.org>
4802
4803 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
4804 (unblock_async_io): Rename to ...
4805 (block_unblock_async_io): ... it. New function.
4806 (enable_async_io): Don't install SIGIO handler. Unblock it
4807 instead.
4808 (disable_async_io): Don't ignore SIGIO. Block it instead.
4809 (initialize_async_io): Install SIGIO handler. Don't call
4810 unblock_async_io.
4811
18879fef
YQ
48122016-01-26 Yao Qi <yao.qi@linaro.org>
4813
4814 * remote-utils.c (getpkt): If the buffer isn't empty, and the
4815 first character is '\003', call *the_target->request_interrupt.
4816
a0f8e08a
YQ
48172016-01-25 Yao Qi <yao.qi@linaro.org>
4818
4819 * remote-utils.c (new_thread_notify): Remove.
4820 (dead_thread_notify): Likewise.
4821 * remote-utils.h (new_thread_notify): Remove declaration.
4822 (dead_thread_notify): Likewise.
4823
cc5fd9ab
MK
48242016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
4825
4826 * gdb.trace/pending.exp: Fix expected message on continue.
4827
99e8eb11
MK
48282016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
4829
4830 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
4831 it works properly on big-endian machines where sizeof (CORE_ADDR)
4832 != sizeof (void *).
4833
a994041d
PA
48342016-01-21 Pedro Alves <palves@redhat.com>
4835
4836 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
4837 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
4838 * configure: Regenerate.
4839
f7a6a40d
YQ
48402016-01-21 Yao Qi <yao.qi@linaro.org>
4841
4842 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
4843 is_thumb and set it according to CPSR saved on the stack.
4844 (get_next_pcs_syscall_next_pc): Pass is_thumb to
4845 arm_sigreturn_next_pc.
4846
6f69e520
YQ
48472016-01-18 Yao Qi <yao.qi@linaro.org>
4848
4849 * linux-low.c (linux_set_pc_64bit): New function.
4850 (linux_get_pc_64bit): New function.
4851 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
4852 Declare.
4853 * linux-sparc-low.c (debug_threads): Remove declaration.
4854 (sparc_get_pc): Remove.
4855 (the_low_target): Use linux_get_pc_64bit instead of
4856 sparc_get_pc.
4857 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
4858 (the_low_target): Use linux_get_pc_64bit and
4859 linux_set_pc_64bit.
4860
276d4552
YQ
48612016-01-18 Yao Qi <yao.qi@linaro.org>
4862
4863 * linux-arm-low.c (debug_threads): Remove declaration.
4864 (arm_get_pc, arm_set_pc): Remove.
4865 (the_low_target): Use linux_get_pc_32bit and
4866 linux_set_pc_32bit.
4867 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
4868 (the_low_target): Use linux_get_pc_32bit and
4869 linux_set_pc_32bit.
4870 * linux-cris-low.c (debug_threads): Remove declaration.
4871 (cris_get_pc, cris_set_pc,): Remove.
4872 (the_low_target): Use linux_get_pc_32bit and
4873 linux_set_pc_32bit.
4874 * linux-crisv32-low.c (debug_threads): Remove declaration.
4875 (cris_get_pc, cris_set_pc): Remove.
4876 (the_low_target): Use linux_get_pc_32bit and
4877 linux_set_pc_32bit.
4878 * linux-low.c: Include inttypes.h.
4879 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
4880 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
4881 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
4882 (the_low_target): Use linux_get_pc_32bit and
4883 linux_set_pc_32bit.
4884 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
4885 (the_low_target): Use linux_get_pc_32bit and
4886 linux_set_pc_32bit.
4887 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
4888 (the_low_target): Use linux_get_pc_32bit and
4889 linux_set_pc_32bit.
4890 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
4891 (the_low_target): Use linux_get_pc_32bit and
4892 linux_set_pc_32bit.
4893 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
4894 (the_low_target): Use linux_get_pc_32bit and
4895 linux_set_pc_32bit.
4896
eb0edac8
GB
48972016-01-18 Gary Benson <gbenson@redhat.com>
4898
4899 * configure.ac (AC_FUNC_FORK): New check.
4900 * config.in: Regenerate.
4901 * configure: Likewise.
4902
1b451dda
YQ
49032016-01-14 Yao Qi <yao.qi@linaro.org>
4904
4905 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
4906 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
4907 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
4908 arm_get_next_pcs_ctor.
4909
82075af2
JS
49102016-01-12 Josh Stone <jistone@redhat.com>
4911 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4912
4913 * inferiors.h: Include "gdb_vecs.h".
4914 (struct process_info): Add syscalls_to_catch.
4915 * inferiors.c (remove_process): Free syscalls_to_catch.
4916 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
4917 syscall_return stops.
4918 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
4919 * server.c (handle_general_set): Handle QCatchSyscalls.
4920 (handle_query): Report support for QCatchSyscalls.
4921 * target.h (struct target_ops): Add supports_catch_syscall.
4922 (target_supports_catch_syscall): New macro.
4923 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
4924 (struct lwp_info): Add syscall_state.
4925 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
4926 Maintain syscall_state and syscalls_to_catch across exec.
4927 (get_syscall_trapinfo): New function, proxy to the_low_target.
4928 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
4929 (linux_low_filter_event): Toggle syscall_state entry/return for
4930 syscall traps, and set it ignored for all others.
4931 (gdb_catching_syscalls_p): New function.
4932 (gdb_catch_this_syscall_p): New function.
4933 (linux_wait_1): Handle SYSCALL_SIGTRAP.
4934 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
4935 (linux_supports_catch_syscall): New function.
4936 (linux_target_ops): Install it.
4937 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
4938 (the_low_target): Install it.
4939
8f13a3ce
MF
49402016-01-12 Mike Frysinger <vapier@gentoo.org>
4941
4942 * acinclude.m4: Include new ../warning.m4 file.
4943 * configure: Regenerated.
4944 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
4945
5b3da067
MF
49462016-01-12 Mike Frysinger <vapier@gentoo.org>
4947
4948 * ax.c (is_goto_target): Mark static.
4949 * linux-low.c (register_addr): Likewise.
4950 (linux_fetch_registers, linux_store_registers): Likewise.
4951 * mem-break.c (any_persistent_commands): Fix old prototype.
4952 (add_commands_to_breakpoint): Mark static.
4953 * regcache.c (find_register_by_name): Delete unused func.
4954 * remote-utils.c (hex_or_minus_one): Mark static.
4955 * server.c (monitor_show_help): Mark static.
4956 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
4957 handle_v_requests): Likewise.
4958
bc504a31
PA
49592016-01-12 Pedro Alves <palves@redhat.com>
4960
4961 Remove use of the registered trademark symbol throughout.
4962
5a0dd67a
YQ
49632016-01-08 Yao Qi <yao.qi@linaro.org>
4964
4965 * remote-utils.c (getpkt): If c is '\003', call target hook
4966 request_interrupt.
4967
b2ca446f
YQ
49682016-01-06 Yao Qi <yao.qi@linaro.org>
4969
4970 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
4971 linux-aarch32-low.c.
4972 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4973 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
4974 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
4975 (thumb2_breakpoint): Declare.
4976 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
4977 linux-aarch32-low.h.
4978 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4979 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
4980 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
4981
edd88788
JB
49822016-01-01 Joel Brobecker <brobecker@adacore.com>
4983
4984 * gdbreplay.c (gdbreplay_version): Change copyright year in
4985 version message.
4986 * server.c (gdbserver_version): Likewise.
4987
65da7f14
PP
49882015-12-28 Patrick Palka <patrick@parcs.ath.cx>
4989
4990 * server.c (crc32_table): Delete.
4991 (crc32): Use libiberty's xcrc32 function.
4992
4abd5ed2
JB
49932015-12-22 Joel Brobecker <brobecker@adacore.com>
4994
4995 * lynx-low.c (lynx_delete_thread_callback): New function.
4996 (lynx_mourn): Properly delete our process and all of its
4997 threads. Remove call to clear_inferiors.
4998
0e50fe5c
JB
49992015-12-22 Joel Brobecker <brobecker@adacore.com>
5000
5001 * target.c (thread_search_callback): Add check that
5002 the thread_stopped target callback is not NULL before
5003 calling it.
5004
35adc03f
YQ
50052015-12-21 Yao Qi <yao.qi@linaro.org>
5006
5007 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
5008 arm breakpoint.
5009
bd2b2909
AT
50102015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
5011
5012 * server.c (handle_query): Call target_supports_software_single_step.
5013
7fe5e27e
AT
50142015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
5015
5016 * linux-low.c (single_step): New function.
5017 (linux_resume_one_lwp_throw): Call single_step.
5018 (start_step_over): Likewise.
5019
d9311bfa
AT
50202015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
5021
5022 * Makefile.in (SFILES): Append arch/arm-linux.c,
5023 arch/arm-get-next-pcs.c.
5024 (arm-linux.o): New rule.
5025 (arm-get-next-pcs.o): New rule.
5026 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
5027 arm-linux.o.
5028 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
5029 to linux-aarch32-low.c.
5030 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
5031 (arm_breakpoint_len, thumb_breakpoint): Likewise.
5032 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
5033 (thumb2_breakpoint_len): Likewise.
5034 (arm_is_thumb_mode): Make non-static.
5035 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
5036 from linux-aarch32-low.c.
5037 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
5038 (arm_breakpoint_len, thumb_breakpoint): Likewise.
5039 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
5040 (thumb2_breakpoint_len): Likewise.
5041 (arm_is_thumb_mode): New declaration.
5042 * linux-arm-low.c: Include arch/arm-linux.h
5043 aarch/arm-get-next-pcs.h, sys/syscall.h.
5044 (get_next_pcs_ops): New struct.
5045 (get_next_pcs_addr_bits_remove): New function.
5046 (get_next_pcs_is_thumb): New function.
5047 (get_next_pcs_read_memory_unsigned_integer): Likewise.
5048 (arm_sigreturn_next_pc): Likewise.
5049 (get_next_pcs_syscall_next_pc): Likewise.
5050 (arm_gdbserver_get_next_pcs): Likewise.
5051 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
5052 Initialize.
5053 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
5054 * server.h: Include gdb_vecs.h.
5055
68ce2059
AT
50562015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
5057
5058 * Makefile.in (SFILES): Append common/common-regcache.c.
5059 (OBS): Append common-regcache.o.
5060 (common-regcache.o): New rule.
5061 * regcache.c (init_register_cache): Initialize cache to
5062 REG_UNAVAILABLE.
5063 (regcache_raw_read_unsigned): New function.
5064 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
5065 register_status enum.
5066
fa5308bd
AT
50672015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
5068
5069 * linux-aarch64-low.c (the_low_targets): Rename
5070 breakpoint_reinsert_addr to get_next_pcs.
5071 * linux-arm-low.c (the_low_targets): Likewise.
5072 * linux-bfin-low.c (the_low_targets): Likewise.
5073 * linux-cris-low.c (the_low_targets): Likewise.
5074 * linux-crisv32-low.c (the_low_targets): Likewise.
5075 * linux-low.c (can_software_single_step): Likewise.
5076 (install_software_single_step_breakpoints): New function.
5077 (start_step_over): Use install_software_single_step_breakpoints.
5078 * linux-low.h: New CORE_ADDR vector.
5079 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
5080 get_next_pcs.
5081 * linux-mips-low.c (the_low_targets): Likewise.
5082 * linux-nios2-low.c (the_low_targets): Likewise.
5083 * linux-sparc-low.c (the_low_targets): Likewise.
5084
4a6ed09b
PA
50852015-12-17 Pedro Alves <palves@redhat.com>
5086
5087 * linux-low.c (linux_kill_one_lwp): Remove references to
5088 LinuxThreads.
5089 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
5090 to 'kill'.
5091 (linux_init_signals): Delete.
5092 (initialize_low): Adjust.
5093 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
5094
7544db95
PA
50952015-12-16 Pedro Alves <palves@redhat.com>
5096
5097 * configure.ac (compiler warning flags): When testing a
5098 -Wno-foo option, check whether -Wfoo works instead.
5099 * configure: Regenerate.
5100
8020350c
DB
51012015-12-11 Don Breazeal <donb@codesourcery.com>
5102
5103 * server.c (process_serial_event): Don't exit from gdbserver
5104 in remote mode if there are still active inferiors.
5105
db91f502
YQ
51062015-12-11 Yao Qi <yao.qi@linaro.org>
5107
5108 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
5109 arm_breakpoint_at if the process is 32-bit.
5110
b37a6290
YQ
51112015-12-11 Yao Qi <yao.qi@linaro.org>
5112
5113 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
5114 arm breakpoint.
5115
17b1509a
YQ
51162015-12-07 Yao Qi <yao.qi@linaro.org>
5117
5118 * configure.srv: Append arm.o to srv_tgtobj for
5119 aarch64*-*-linux* target.
5120 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
5121 from linux-arm-low.c.
5122 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
5123 (arm_breakpoint_len, thumb_breakpoint): Likewise.
5124 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
5125 (thumb2_breakpoint_len): Likewise.
5126 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
5127 (arm_breakpoint_kinds): Likewise.
5128 (arm_breakpoint_kind_from_pc): Likewise.
5129 (arm_sw_breakpoint_from_kind): Likewise.
5130 (arm_breakpoint_kind_from_current_state): Likewise.
5131 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
5132 (arm_sw_breakpoint_from_kind): Declare.
5133 (arm_breakpoint_kind_from_current_state): Declare.
5134 (arm_breakpoint_at): Declare.
5135 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
5136 arm_sw_breakpoint_from_kind if process is 32-bit.
5137 (aarch64_breakpoint_kind_from_pc): New function.
5138 (aarch64_breakpoint_kind_from_current_state): New function.
5139 (the_low_target): Initialize fields breakpoint_kind_from_pc
5140 and breakpoint_kind_from_current_state.
5141 * linux-arm-low.c (arm_breakpoint_kinds): Move to
5142 linux-aarch32-low.c.
5143 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
5144 (arm_breakpoint, arm_breakpoint_len): Likewise.
5145 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
5146 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
5147 (arm_is_thumb_mode): Likewise.
5148 (arm_breakpoint_at): Likewise.
5149 (arm_breakpoint_kind_from_pc): Likewise.
5150 (arm_sw_breakpoint_from_kind): Likewise.
5151 (arm_breakpoint_kind_from_current_state): Likewise.
5152
5153 Revert:
5154 2015-08-04 Yao Qi <yao.qi@linaro.org>
5155
5156 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
5157 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
5158 * server.c (extended_protocol): Remove "static".
5159 * server.h (extended_protocol): Declare it.
5160
ece66d65
JS
51612015-12-04 Josh Stone <jistone@redhat.com>
5162
5163 * target.h (struct target_ops) <arch_setup>: Rename to ...
5164 (struct target_ops) <post_create_inferior>: ... this.
5165 (target_arch_setup): Rename to ...
5166 (target_post_create_inferior): ... this, calling post_create_inferior.
5167 * server.c (start_inferior): Update target_arch_setup calls to
5168 target_post_create_inferior.
5169 * linux-low.c (linux_low_ptrace_options): Forward declare.
5170 (linux_arch_setup): Update its comment for general use.
5171 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
5172 (struct linux_target_ops): Use linux_post_create_inferior.
5173 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
5174 to post_create_inferior.
5175 * nto-low.c (struct nto_target_ops): Likewise.
5176 * spu-low.c (struct spu_target_ops): Likewise.
5177 * win32-low.c (struct win32_target_ops): Likewise.
5178
e58c48b4
AT
51792015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
5180
5181 * linux-arm-low.c: Remove duplicate arch/arm.h include.
5182
fbec8956
AT
51832015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
5184
5185 * linux-arm-low.c (arm_reinsert_addr): Remove function.
5186 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
5187 * linux-cris-low.c (cris_reinsert_addr> Remove function.
5188 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
5189 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
5190 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
5191 * linux-mips-low.c (mips_reinsert_addr): Remove function.
5192 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
5193 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
5194 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
5195 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
5196 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
5197
9b4c5f87
AT
51982015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
5199
5200 * linux-low.c (linux_look_up_symbols): Don't call
5201 linux_supports_traceclone.
5202 * linux-low.h (thread_db_init): Remove use_events argument.
5203 * thread-db.c (thread_db_use_event): Remove global variable.
5204 (struct thread_db) <td_thr_event_enable_p>: Remove field.
5205 (struct thread_db) <td_create_bp>: Remove field.
5206 (thread_db_create_event): Remove function.
5207 (thread_db_enable_reporting): Likewise.
5208 (find_one_thread): Don't check for thread_db_use_events.
5209 (attach_thread): Likewise.
5210 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
5211 (try_thread_db_load_1): Don't check for thread_db_use_events.
5212 (thread_db_init): Remove use_events argument and thread events
5213 handling.
5214 (remove_thread_event_breakpoints): Remove function.
5215 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
5216
7d00775e
AT
52172015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
5218
5219 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
5220 New function.
5221 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5222 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
5223 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5224 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
5225 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
5226 Initialize.
5227 * linux-crisv32-low.c (cris_supports_hardware_single_step):
5228 New function.
5229 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5230 * linux-low.c (can_hardware_single_step): Use
5231 supports_hardware_single_step.
5232 (can_software_single_step): New function.
5233 (start_step_over): Call can_software_single_step.
5234 (linux_supports_hardware_single_step): New function.
5235 (struct target_ops) <supports_software_single_step>: Initialize.
5236 * linux-low.h (struct linux_target_ops)
5237 <supports_hardware_single_step>: Initialize.
5238 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
5239 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5240 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
5241 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
5242 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
5243 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5244 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
5245 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5246 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
5247 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
5248 Initialize.
5249 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
5250 (struct linux_target_ops) <tile_supports_hardware_single_step>:
5251 Initialize.
5252 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
5253 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5254 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
5255 New function.
5256 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5257 * target.h (struct target_ops): <supports_software_single_step>:
5258 New field.
5259 (target_supports_software_single_step): New macro.
5260
2d97cd35
AT
52612015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
5262
5263 * linux-low.c (linux_wait_1): Fix pc advance condition.
5264 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
5265 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
5266
769ef81f
AT
52672015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
5268
5269 * linux-arm-low.c (arm_is_thumb_mode): New function.
5270 (arm_breakpoint_at): Use arm_is_thumb_mode.
5271 (arm_breakpoint_kind_from_current_state): New function.
5272 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
5273 Initialize.
5274 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
5275 (linux_breakpoint_kind_from_current_state): New function.
5276 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
5277 * linux-low.h (struct linux_target_ops)
5278 <breakpoint_kind_from_current_state>: New field.
5279 * target.h (struct target_ops): Likewise.
5280 (target_breakpoint_kind_from_current_state): New macro.
5281
1bebeeca
PA
52822015-11-30 Pedro Alves <palves@redhat.com>
5283
5284 * linux-low.c (linux_resume): Wake up the event loop before
5285 returning.
5286
a67a9fae
PA
52872015-11-30 Pedro Alves <palves@redhat.com>
5288
5289 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
5290 check.
5291 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
5292 to -1.
5293 * target.c (struct thread_search): New structure.
5294 (thread_search_callback): New function.
5295 (prev_general_thread): New global.
5296 (prepare_to_access_memory, done_accessing_memory): New functions.
5297 * target.h (prepare_to_access_memory, done_accessing_memory):
5298 Replace macros with function declarations.
5299
f2faf941
PA
53002015-11-30 Pedro Alves <palves@redhat.com>
5301
5302 PR 14618
5303 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
5304 report TARGET_WAITKIND_NO_RESUMED.
5305 * remote-utils.c (prepare_resume_reply): Handle
5306 TARGET_WAITKIND_NO_RESUMED.
5307 * server.c (report_no_resumed): New global.
5308 (handle_query) <qSupported>: Handle "no-resumed+". Report
5309 "no-resumed+" support.
5310 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
5311 return error if the client doesn't support no-resumed events.
5312 (push_stop_notification): New function.
5313 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
5314 events if the client supports them.
5315
a681f9c9
PA
53162015-11-30 Pedro Alves <palves@redhat.com>
5317
5318 * linux-low.c (thread_still_has_status_pending_p): Don't check
5319 vCont;t here.
5320 (lwp_resumed): New function.
5321 (status_pending_p_callback): Return early if the LWP is not
5322 supposed to be resumed.
5323
65706a29
PA
53242015-11-30 Pedro Alves <palves@redhat.com>
5325
5326 * linux-low.c (handle_extended_wait): Assert that the LWP's
5327 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
5328 thread create events, leave the new child's status pending.
5329 (linux_low_filter_event): If GDB wants to hear about thread exit
5330 events, leave the LWP marked dead and don't delete it.
5331 (linux_wait_for_event_filtered): Don't check for thread exit.
5332 (filter_exit_event): New function.
5333 (linux_wait_1): Use it, when returning an exit event.
5334 (linux_resume_one_lwp_throw): Assert that the LWP's
5335 waitstatus is TARGET_WAITKIND_IGNORE.
5336 * remote-utils.c (prepare_resume_reply): Handle
5337 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
5338 * server.c (report_thread_events): New global.
5339 (handle_general_set): Handle QThreadEvents.
5340 (handle_query) <qSupported>: Handle and report QThreadEvents+;
5341 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
5342 TARGET_WAITKIND_THREAD_EXITED.
5343 * server.h (report_thread_events): Declare.
5344
56cf4bed
PA
53452015-11-30 Pedro Alves <palves@redhat.com>
5346
5347 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
5348 the thread's last_resume_kind was resume_stop.
5349
500c1d85
PA
53502015-11-30 Pedro Alves <palves@redhat.com>
5351
5352 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
5353 before returning.
5354
de979965
PA
53552015-11-30 Pedro Alves <palves@redhat.com>
5356
5357 * server.c (handle_v_requests): Handle vCtrlC.
5358
34c65914
PA
53592015-11-30 Pedro Alves <palves@redhat.com>
5360
5361 * gdbthread.h (find_any_thread_of_pid): Declare.
5362 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
5363 functions.
5364 * server.c (handle_query): If current_thread is NULL, look for
5365 another thread of the selected process.
5366
79efa585 53672015-11-26 Daniel Colascione <dancol@dancol.org>
01a49af8 5368 Simon Marchi <simon.marchi@ericsson.com>
79efa585
SM
5369
5370 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
5371 * server.c (handle_qxfer_threads_worker): Refactor to include thread
5372 name in reply.
5373 * target.h (struct target_ops) <thread_name>: New field.
5374 (target_thread_name): New macro.
5375
80d82c19
JB
53762015-11-23 Joel Brobecker <brobecker@adacore.com>
5377
5378 * regcache.h (regcache_invalidate_pid): Add declaration.
5379 * regcache.c (regcache_invalidate_pid): New function, extracted
5380 from regcache_invalidate.
5381 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
5382 Add trivial documentation comment.
5383 * lynx-low.c: Use regcache_invalidate_pid instead of
5384 regcache_invalidate.
5385
64da5dd5
JB
53862015-11-23 Joel Brobecker <brobecker@adacore.com>
5387
5388 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
5389 and Elf64_auxv_t if the target is Android.
5390
37ce4055
DE
53912015-11-22 Doug Evans <xdje42@gmail.com>
5392
5393 * target.h: #include <sys/types.h>.
5394
06e03fff
PA
53952015-11-19 Pedro Alves <palves@redhat.com>
5396
5397 * linux-low.c (linux_process_qsupported): Change prototype.
5398 Adjust.
5399 * linux-low.h (struct linux_target_ops) <process_qsupported>:
5400 Change prototype.
5401 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
5402 and adjust to loop over all features.
5403 * server.c (handle_query) <qSupported>: Adjust to call
5404 target_process_qsupported once, passing it a vector of unprocessed
5405 features.
5406 * target.h (struct target_ops) <process_qsupported>: Change
5407 prototype.
5408 (target_process_qsupported): Adjust.
5409
9a084706
PA
54102015-11-19 Pedro Alves <palves@redhat.com>
5411
5412 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
5413 mode.
5414 * configure: Regenerate.
5415
dad44a1f
PA
54162015-11-19 Pedro Alves <palves@redhat.com>
5417
5418 * configure: Regenerate.
5419
231c0592
YQ
54202015-11-19 Yao Qi <yao.qi@linaro.org>
5421
5422 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
5423 type to uint32_t.
5424
6c1c9a8b
YQ
54252015-11-19 Yao Qi <yao.qi@linaro.org>
5426
5427 * linux-aarch64-low.c (enum aarch64_operand_type): New.
5428 (struct aarch64_operand): Move enum out.
5429
9caa3311
YQ
54302015-11-19 Yao Qi <yao.qi@linaro.org>
5431
5432 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
5433 struct user_fpsimd_state *.
5434 (aarch64_store_fpregset): Likewise.
5435
6a69a054
YQ
54362015-11-19 Yao Qi <yao.qi@linaro.org>
5437
5438 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
5439 struct user_pt_regs *.
5440 (aarch64_store_gregset): Likewise.
5441
1798301e
PA
54422015-11-18 Pedro Alves <palves@redhat.com>
5443
5444 * Makefile.in (all_object_files): Add $IPA_OBJS.
5445
ce7715e2
PA
54462015-11-17 Pedro Alves <palves@redhat.com>
5447
5448 * win32-low.c (win32_resume): Use gdb_signal_from_host,
5449 GDB_SIGNAL_0 and gdb_signal_to_string.
5450
c0879059
PA
54512015-11-17 Pedro Alves <palves@redhat.com>
5452
5453 * win32-low.c (handle_output_debug_string): Remove parameter.
5454 (win32_kill): Remove our_status local and adjust call to
5455 handle_output_debug_string.
5456 (get_child_debug_event): Adjust call to
5457 handle_output_debug_string.
5458
1996e237
SM
54592015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5460
5461 * linux-mips-low.c (mips_fill_gregset): Add cast.
5462 (mips_store_gregset): Likewise.
5463 (mips_fill_fpregset): Likewise.
5464 (mips_store_fpregset): Likewise.
5465
cbec665b
SM
54662015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5467
5468 * linux-mips-low.c (mips_add_watchpoint): Rename private to
5469 priv.
5470
eb3e3c67
SM
54712015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5472
5473 * linux-mips-low.c (mips_linux_new_thread): Change type of
5474 watch_type to enum target_hw_bp_type.
5475
171de4b8
SM
54762015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5477
5478 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
5479 Change return type to arm_hwbp_type.
5480
04248ead
SM
54812015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5482
5483 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
5484 (arm_store_gregset): Likewise.
5485 * linux-arm-low.c (arm_get_hwcap): Likewise.
5486 (arm_read_description): Likewise.
5487
04b3479c
SM
54882015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5489
5490 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
5491
2bc84e8a
SM
54922015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5493
5494 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
5495 (ppc_fill_vsxregset): Likewise.
5496 (ppc_store_vsxregset): Likewise.
5497 (ppc_fill_vrregset): Likewise.
5498 (ppc_store_vrregset): Likewise.
5499 (ppc_fill_evrregset): Likewise.
5500 (ppc_store_evrregset): Likewise.
5501
e6c5bb05
SM
55022015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5503
5504 * linux-ppc-low.c (ppc_usrregs_info): Remove
5505 forward-declaration.
5506 (ppc_arch_setup): Move lower in file.
5507
7ea45d72
SM
55082015-10-30 Simon Marchi <simon.marchi@ericsson.com>
5509
5510 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
5511 (ps_pdwrite): Likewise.
5512
69291610
HW
55132015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
5514
5515 * linux-arm-low.c (arm_new_thread): Move pointer dereference
5516 to after assert checks.
5517
b42945fd
SM
55182015-10-29 Simon Marchi <simon.marchi@ericsson.com>
5519
5520 * proc-service.c (ps_pdread): Add/adjust casts.
5521 (ps_pdwrite): Add/adjust casts.
5522
d6f85c84
SM
55232015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
5524
5525 * server.c (handle_search_memory_1): Cast return value of
5526 memmem.
5527
f98cd059
SM
55282015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
5529
5530 * server.c (write_qxfer_response): Change type of data to
5531 gdb_byte *.
5532
d2412fa5
PA
55332015-10-29 Pedro Alves <palves@redhat.com>
5534
5535 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
5536
c17414a2
PA
55372015-10-29 Pedro Alves <palves@redhat.com>
5538
5539 * tracepoint.c (clear_installed_tracepoints): Add casts.
5540
e053fbc4
PA
55412015-10-29 Pedro Alves <palves@redhat.com>
5542
5543 * server.c (handle_v_cont, process_serial_event): Add enum
5544 gdb_signal casts to signal parsing code.
5545
add67df8
PA
55462015-10-29 Pedro Alves <palves@redhat.com>
5547
5548 * linux-low.h (NULL_REGSET): Define.
5549 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
5550 * linux-arm-low.c (arm_regsets): Likewise.
5551 * linux-crisv32-low.c (cris_regsets): Likewise.
5552 * linux-m68k-low.c (m68k_regsets): Likewise.
5553 * linux-mips-low.c (mips_regsets): Likewise.
5554 * linux-nios2-low.c (nios2_regsets): Likewise.
5555 * linux-ppc-low.c (ppc_regsets): Likewise.
5556 * linux-s390-low.c (s390_regsets): Likewise.
5557 * linux-sh-low.c (sh_regsets): Likewise.
5558 * linux-sparc-low.c (sparc_regsets): Likewise.
5559 * linux-tic6x-low.c (tic6x_regsets): Likewise.
5560 * linux-tile-low.c (tile_regsets): Likewise.
5561 * linux-x86-low.c (x86_regsets): Likewise.
5562 * linux-xtensa-low.c (xtensa_regsets): Likewise.
5563
50bc912a
PA
55642015-10-29 Pedro Alves <palves@redhat.com>
5565
5566 * linux-low.h (NULL_REGSET): Define.
5567 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
5568 * linux-arm-low.c (arm_regsets): Likewise.
5569 * linux-crisv32-low.c (cris_regsets): Likewise.
5570 * linux-m68k-low.c (m68k_regsets): Likewise.
5571 * linux-mips-low.c (mips_regsets): Likewise.
5572 * linux-nios2-low.c (nios2_regsets): Likewise.
5573 * linux-ppc-low.c (ppc_regsets): Likewise.
5574 * linux-s390-low.c (s390_regsets): Likewise.
5575 * linux-sh-low.c (sh_regsets): Likewise.
5576 * linux-sparc-low.c (sparc_regsets): Likewise.
5577 * linux-tic6x-low.c (tic6x_regsets): Likewise.
5578 * linux-tile-low.c (tile_regsets): Likewise.
5579 * linux-x86-low.c (x86_regsets): Likewise.
5580 * linux-xtensa-low.c (xtensa_regsets): Likewise.
5581
682b2546
DE
55822015-10-26 Doug Evans <dje@google.com>
5583
5584 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
5585
963843d4
DE
55862015-10-26 Doug Evans <dje@google.com>
5587
5588 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
5589
d41401ac
DE
55902015-10-26 Doug Evans <dje@google.com>
5591
5592 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
5593 for debug_printf.
5594 (attach_thread, find_new_threads_callback): Ditto.
5595
3db28855
AT
55962015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
5597
5598 * mem-break.h (set_breakpoint_data): Remove.
5599
fb78e89c
AT
56002015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
5601
5602 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
5603 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
5604 (initialize_low): Remove set_breakpoint_data call.
5605 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
5606 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
5607 (initialize_low): Remove set_breakpoint_data call.
5608 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
5609 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
5610 (initialize_low): Remove set_breakpoint_data call.
5611
2e6ee069
AT
56122015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
5613
5614 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
5615 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
5616 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
5617 * target.h (target_breakpoint_kind_from_pc): New macro.
5618
1652a986
AT
56192015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
5620
5621 * linux-low.c (default_breakpoint_kind_from_pc): New function.
5622 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
5623 the default breakpoint kind.
5624
abeead09
AT
56252015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5626
5627 * linux-arm-low.c (arm_supports_z_point_type): Add software
5628 breakpoint support.
5629
b0b4b501
AT
56302015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5631
5632 * linux-arm-low.c: Refactor breakpoint definitions.
5633 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
5634 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
5635
8689682c
AT
56362015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5637
5638 * Makefile.in: Add arm.c/o.
5639 * configure.srv: Likewise.
5640 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
5641 (arm_breakpoint_kind_from_pc): New function.
5642 (arm_sw_breakpoint_from_kind): Return proper kind.
5643 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
5644
27165294
AT
56452015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5646
5647 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
5648 removal.
5649 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
5650 (struct raw_breakpoint) <size>: Remove.
5651 (struct raw_breakpoint) <kind>: Add.
5652 (bp_size): New function.
5653 (bp_opcode): Likewise.
5654 (find_raw_breakpoint_at): Adjust for kind.
5655 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
5656 (remove_memory_breakpoint): Adjust for kind call bp_size.
5657 (set_raw_breakpoint_at): Adjust for kind.
5658 (set_breakpoint): Likewise.
5659 (set_breakpoint_at): Call breakpoint_kind_from_pc.
5660 (delete_raw_breakpoint): Adjust for kind.
5661 (delete_breakpoint): Likewise.
5662 (find_gdb_breakpoint): Likewise.
5663 (set_gdb_breakpoint_1): Likewise.
5664 (set_gdb_breakpoint): Likewise.
5665 (delete_gdb_breakpoint_1): Likewise.
5666 (delete_gdb_breakpoint): Likewise.
5667 (uninsert_raw_breakpoint): Likewise.
5668 (reinsert_raw_breakpoint): Likewise.
5669 (set_breakpoint_data): Remove.
5670 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
5671 (check_mem_read): Adjust for kind call bp_size.
5672 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
5673 (clone_one_breakpoint): Adjust for kind.
5674 * mem-break.h (set_gdb_breakpoint): Likewise.
5675 (delete_gdb_breakpoint): Likewise.
5676 * server.c (process_serial_event): Likewise.
5677
dd373349
AT
56782015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5679
5680 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
5681 (struct linux_target_ops) <breakpoint>: Remove.
5682 (struct linux_target_ops) <breakpoint_len>: Remove.
5683 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5684 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5685 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
5686 (arm_sw_breakpoint_from_kind): New function.
5687 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
5688 (struct linux_target_ops) <breakpoint>: Remove.
5689 (struct linux_target_ops) <breakpoint_len>: Remove.
5690 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5691 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5692 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
5693 (struct linux_target_ops) <breakpoint>: Remove.
5694 (struct linux_target_ops) <breakpoint_len>: Remove.
5695 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5696 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5697 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
5698 (struct linux_target_ops) <breakpoint>: Remove.
5699 (struct linux_target_ops) <breakpoint_len>: Remove.
5700 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5701 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5702 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
5703 and sw_breakpoint_from_kind to increment the pc.
5704 (linux_breakpoint_kind_from_pc): New function.
5705 (linux_sw_breakpoint_from_kind): New function.
5706 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
5707 (initialize_low): Call breakpoint_kind_from_pc and
5708 sw_breakpoint_from_kind to replace breakpoint_data/len.
5709 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
5710 New field.
5711 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
5712 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
5713 (struct linux_target_ops) <breakpoint>: Remove.
5714 (struct linux_target_ops) <breakpoint_len>: Remove.
5715 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5716 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5717 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
5718 (struct linux_target_ops) <breakpoint>: Remove.
5719 (struct linux_target_ops) <breakpoint_len>: Remove.
5720 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5721 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5722 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
5723 (struct linux_target_ops) <breakpoint>: Remove.
5724 (struct linux_target_ops) <breakpoint_len>: Remove.
5725 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5726 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5727 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
5728 (struct linux_target_ops) <breakpoint>: Remove.
5729 (struct linux_target_ops) <breakpoint_len>: Remove.
5730 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5731 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5732 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
5733 (struct linux_target_ops) <breakpoint>: Remove.
5734 (struct linux_target_ops) <breakpoint_len>: Remove.
5735 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5736 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5737 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
5738 (struct linux_target_ops) <breakpoint>: Remove.
5739 (struct linux_target_ops) <breakpoint_len>: Remove.
5740 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5741 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5742 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
5743 (struct linux_target_ops) <breakpoint>: Remove.
5744 (struct linux_target_ops) <breakpoint_len>: Remove.
5745 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5746 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5747 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
5748 (struct linux_target_ops) <breakpoint>: Remove.
5749 (struct linux_target_ops) <breakpoint_len>: Remove.
5750 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5751 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5752 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
5753 (struct linux_target_ops) <breakpoint>: Remove.
5754 (struct linux_target_ops) <breakpoint_len>: Remove.
5755 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5756 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5757 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
5758 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
5759 (struct linux_target_ops) <breakpoint>: Remove.
5760 (struct linux_target_ops) <breakpoint_len>: Remove.
5761 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5762 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5763 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
5764 (struct linux_target_ops) <breakpoint>: Remove.
5765 (struct linux_target_ops) <breakpoint_len>: Remove.
5766 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5767 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5768
4cd98a19
AT
57692015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5770
5771 * linux-cris-low.c (cris_get_pc): Remove void arg.
5772
774ee6d2
AR
57732015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
5774
5775 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
5776 variable name.
5777
833dcd29
AR
57782015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
5779
5780 * inferiors.c (thread_pid_matches_callback): New function.
5781 (find_thread_process): New function.
5782 (remove_thread): Reset current_thread.
5783 (remove_process): Assert threads have been removed first.
5784
8d689ee5
YQ
57852015-10-15 Yao Qi <yao.qi@linaro.org>
5786
5787 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
5788 if it is 3.
5789 (aarch64_remove_point): Likewise.
5790 * regcache.c (regcache_register_size): New function.
5791
1c2e1515
YQ
57922015-10-12 Yao Qi <yao.qi@linaro.org>
5793
5794 * linux-aarch64-low.c: Update all callers as emit_load_store
5795 is renamed to aarch64_emit_load_store.
5796
e1c587c3
YQ
57972015-10-12 Yao Qi <yao.qi@linaro.org>
5798
5799 * linux-aarch64-low.c: Update all callers of function renaming
5800 from emit_insn to aarch64_emit_insn.
5801
b6542f81
YQ
58022015-10-12 Yao Qi <yao.qi@linaro.org>
5803
5804 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
5805 arch/aarch64-insn.h.
5806 (struct aarch64_memory_operand): Likewise.
5807 (ENCODE): Likewise.
5808 (emit_insn): Move to arch/aarch64-insn.c.
5809 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
5810 (emit_load_store): Move to arch/aarch64-insn.c.
5811 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
5812 (can_encode_int32): Remove.
5813
246994ce
YQ
58142015-10-12 Yao Qi <yao.qi@linaro.org>
5815
5816 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
5817 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
5818 (aarch64_relocate_instruction): Likewise.
5819 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
5820 (struct aarch64_insn_visitor): Likewise.
5821
0badd99f
YQ
58222015-10-12 Yao Qi <yao.qi@linaro.org>
5823
5824 * linux-aarch64-low.c (struct aarch64_insn_data): New.
5825 (struct aarch64_insn_visitor): New.
5826 (struct aarch64_insn_relocation_data): New.
5827 (aarch64_ftrace_insn_reloc_b): New function.
5828 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
5829 (aarch64_ftrace_insn_reloc_cb): Likewise.
5830 (aarch64_ftrace_insn_reloc_tb): Likewise.
5831 (aarch64_ftrace_insn_reloc_adr): Likewise.
5832 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
5833 (aarch64_ftrace_insn_reloc_others): Likewise.
5834 (visitor): New.
5835 (aarch64_relocate_instruction): Use visitor.
5836
dfaffe9d
YQ
58372015-10-12 Yao Qi <yao.qi@linaro.org>
5838
5839 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
5840 int. Add argument buf.
5841 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
5842 aarch64_relocate_instruction.
5843
70b439f0
YQ
58442015-10-12 Yao Qi <yao.qi@linaro.org>
5845
5846 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
5847 argument insn. Remove local variable insn. Don't call
5848 target_read_uint32.
5849 (aarch64_install_fast_tracepoint_jump_pad): Call
5850 target_read_uint32.
5851
7781c06f
YQ
58522015-09-30 Yao Qi <yao.qi@linaro.org>
5853
5854 * linux-aarch64-low.c (emit_movk): Shorten a long line.
5855 (emit_load_store_pair): Likewise.
5856
9a3c8263
SM
58572015-09-25 Simon Marchi <simon.marchi@ericsson.com>
5858
5859 * dll.c (match_dll): Add cast(s).
5860 (unloaded_dll): Likewise.
5861 * linux-low.c (second_thread_of_pid_p): Likewise.
5862 (delete_lwp_callback): Likewise.
5863 (count_events_callback): Likewise.
5864 (select_event_lwp_callback): Likewise.
5865 (linux_set_resume_request): Likewise.
5866 * server.c (accumulate_file_name_length): Likewise.
5867 (emit_dll_description): Likewise.
5868 (handle_qxfer_threads_worker): Likewise.
5869 (visit_actioned_threads): Likewise.
5870 * thread-db.c (any_thread_of): Likewise.
5871 * tracepoint.c (same_process_p): Likewise.
5872 (match_blocktype): Likewise.
5873 (build_traceframe_info_xml): Likewise.
5874
224c3ddb
SM
58752015-09-25 Simon Marchi <simon.marchi@ericsson.com>
5876
5877 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
5878 assignment.
5879 (gdb_unparse_agent_expr): Likewise.
5880 * hostio.c (require_data): Likewise.
5881 (handle_pread): Likewise.
5882 * linux-low.c (disable_regset): Likewise.
5883 (fetch_register): Likewise.
5884 (store_register): Likewise.
5885 (get_dynamic): Likewise.
5886 (linux_qxfer_libraries_svr4): Likewise.
5887 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
5888 (set_fast_tracepoint_jump): Likewise.
5889 (uninsert_fast_tracepoint_jumps_at): Likewise.
5890 (reinsert_fast_tracepoint_jumps_at): Likewise.
5891 (validate_inserted_breakpoint): Likewise.
5892 (clone_agent_expr): Likewise.
5893 * regcache.c (init_register_cache): Likewise.
5894 * remote-utils.c (putpkt_binary_1): Likewise.
5895 (decode_M_packet): Likewise.
5896 (decode_X_packet): Likewise.
5897 (look_up_one_symbol): Likewise.
5898 (relocate_instruction): Likewise.
5899 (monitor_output): Likewise.
5900 * server.c (handle_search_memory): Likewise.
5901 (handle_qxfer_exec_file): Likewise.
5902 (handle_qxfer_libraries): Likewise.
5903 (handle_qxfer): Likewise.
5904 (handle_query): Likewise.
5905 (handle_v_cont): Likewise.
5906 (handle_v_run): Likewise.
5907 (captured_main): Likewise.
5908 * target.c (write_inferior_memory): Likewise.
5909 * thread-db.c (try_thread_db_load_from_dir): Likewise.
5910 * tracepoint.c (init_trace_buffer): Likewise.
5911 (add_tracepoint_action): Likewise.
5912 (add_traceframe): Likewise.
5913 (add_traceframe_block): Likewise.
5914 (cmd_qtdpsrc): Likewise.
5915 (cmd_qtdv): Likewise.
5916 (cmd_qtstatus): Likewise.
5917 (response_source): Likewise.
5918 (response_tsv): Likewise.
5919 (cmd_qtnotes): Likewise.
5920 (gdb_collect): Likewise.
5921 (initialize_tracepoint): Likewise.
5922
afbe19f8
PL
59232015-09-21 Pierre Langlois <pierre.langlois@arm.com>
5924
5925 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
5926 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
5927 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
5928 <NOP>: New.
5929 (enum aarch64_condition_codes): New enum.
5930 (w0): New static global.
5931 (fp): Likewise.
5932 (lr): Likewise.
5933 (struct aarch64_memory_operand) <type>: New
5934 MEMORY_OPERAND_POSTINDEX type.
5935 (postindex_memory_operand): New helper function.
5936 (emit_ret): New function.
5937 (emit_load_store_pair): New function, factored out of emit_stp
5938 with support for MEMORY_OPERAND_POSTINDEX.
5939 (emit_stp): Rewrite using emit_load_store_pair.
5940 (emit_ldp): New function.
5941 (emit_load_store): Likewise.
5942 (emit_ldr): Mention post-index instruction in comment.
5943 (emit_ldrh): New function.
5944 (emit_ldrb): New function.
5945 (emit_ldrsw): Mention post-index instruction in comment.
5946 (emit_str): Likewise.
5947 (emit_subs): New function.
5948 (emit_cmp): Likewise.
5949 (emit_and): Likewise.
5950 (emit_orr): Likewise.
5951 (emit_orn): Likewise.
5952 (emit_eor): Likewise.
5953 (emit_mvn): Likewise.
5954 (emit_lslv): Likewise.
5955 (emit_lsrv): Likewise.
5956 (emit_asrv): Likewise.
5957 (emit_mul): Likewise.
5958 (emit_sbfm): Likewise.
5959 (emit_sbfx): Likewise.
5960 (emit_ubfm): Likewise.
5961 (emit_ubfx): Likewise.
5962 (emit_csinc): Likewise.
5963 (emit_cset): Likewise.
5964 (emit_nop): Likewise.
5965 (emit_ops_insns): New helper function.
5966 (emit_pop): Likewise.
5967 (emit_push): Likewise.
5968 (aarch64_emit_prologue): New function.
5969 (aarch64_emit_epilogue): Likewise.
5970 (aarch64_emit_add): Likewise.
5971 (aarch64_emit_sub): Likewise.
5972 (aarch64_emit_mul): Likewise.
5973 (aarch64_emit_lsh): Likewise.
5974 (aarch64_emit_rsh_signed): Likewise.
5975 (aarch64_emit_rsh_unsigned): Likewise.
5976 (aarch64_emit_ext): Likewise.
5977 (aarch64_emit_log_not): Likewise.
5978 (aarch64_emit_bit_and): Likewise.
5979 (aarch64_emit_bit_or): Likewise.
5980 (aarch64_emit_bit_xor): Likewise.
5981 (aarch64_emit_bit_not): Likewise.
5982 (aarch64_emit_equal): Likewise.
5983 (aarch64_emit_less_signed): Likewise.
5984 (aarch64_emit_less_unsigned): Likewise.
5985 (aarch64_emit_ref): Likewise.
5986 (aarch64_emit_if_goto): Likewise.
5987 (aarch64_emit_goto): Likewise.
5988 (aarch64_write_goto_address): Likewise.
5989 (aarch64_emit_const): Likewise.
5990 (aarch64_emit_call): Likewise.
5991 (aarch64_emit_reg): Likewise.
5992 (aarch64_emit_pop): Likewise.
5993 (aarch64_emit_stack_flush): Likewise.
5994 (aarch64_emit_zero_ext): Likewise.
5995 (aarch64_emit_swap): Likewise.
5996 (aarch64_emit_stack_adjust): Likewise.
5997 (aarch64_emit_int_call_1): Likewise.
5998 (aarch64_emit_void_call_2): Likewise.
5999 (aarch64_emit_eq_goto): Likewise.
6000 (aarch64_emit_ne_goto): Likewise.
6001 (aarch64_emit_lt_goto): Likewise.
6002 (aarch64_emit_le_goto): Likewise.
6003 (aarch64_emit_gt_goto): Likewise.
6004 (aarch64_emit_ge_got): Likewise.
6005 (aarch64_emit_ops_impl): New static global variable.
6006 (aarch64_emit_ops): New target function, return
6007 &aarch64_emit_ops_impl.
6008 (struct linux_target_ops): Install it.
6009
bb903df0
PL
60102015-09-21 Pierre Langlois <pierre.langlois@arm.com>
6011
6012 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
6013 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
6014 aarch64-ipa.o.
6015 * linux-aarch64-ipa.c: New file.
6016 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
6017 and endian.h.
6018 (aarch64_get_thread_area): New target method.
6019 (extract_signed_bitfield): New helper function.
6020 (aarch64_decode_ldr_literal): New function.
6021 (enum aarch64_opcodes): New enum.
6022 (struct aarch64_register): New struct.
6023 (struct aarch64_operand): New struct.
6024 (x0): New static global.
6025 (x1): Likewise.
6026 (x2): Likewise.
6027 (x3): Likewise.
6028 (x4): Likewise.
6029 (w2): Likewise.
6030 (ip0): Likewise.
6031 (sp): Likewise.
6032 (xzr): Likewise.
6033 (aarch64_register): New helper function.
6034 (register_operand): Likewise.
6035 (immediate_operand): Likewise.
6036 (struct aarch64_memory_operand): New struct.
6037 (offset_memory_operand): New helper function.
6038 (preindex_memory_operand): Likewise.
6039 (enum aarch64_system_control_registers): New enum.
6040 (ENCODE): New macro.
6041 (emit_insn): New helper function.
6042 (emit_b): New function.
6043 (emit_bcond): Likewise.
6044 (emit_cb): Likewise.
6045 (emit_tb): Likewise.
6046 (emit_blr): Likewise.
6047 (emit_stp): Likewise.
6048 (emit_ldp_q_offset): Likewise.
6049 (emit_stp_q_offset): Likewise.
6050 (emit_load_store): Likewise.
6051 (emit_ldr): Likewise.
6052 (emit_ldrsw): Likewise.
6053 (emit_str): Likewise.
6054 (emit_ldaxr): Likewise.
6055 (emit_stxr): Likewise.
6056 (emit_stlr): Likewise.
6057 (emit_data_processing_reg): Likewise.
6058 (emit_data_processing): Likewise.
6059 (emit_add): Likewise.
6060 (emit_sub): Likewise.
6061 (emit_mov): Likewise.
6062 (emit_movk): Likewise.
6063 (emit_mov_addr): Likewise.
6064 (emit_mrs): Likewise.
6065 (emit_msr): Likewise.
6066 (emit_sevl): Likewise.
6067 (emit_wfe): Likewise.
6068 (append_insns): Likewise.
6069 (can_encode_int32_in): New helper function.
6070 (aarch64_relocate_instruction): New function.
6071 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
6072 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
6073 (struct linux_target_ops): Install aarch64_get_thread_area,
6074 aarch64_install_fast_tracepoint_jump_pad and
6075 aarch64_get_min_fast_tracepoint_insn_len.
6076
787749ea
PL
60772015-09-21 Pierre Langlois <pierre.langlois@arm.com>
6078
6079 * Makefile.in (aarch64-insn.o): New rule.
6080 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
6081
9812b2e6
YQ
60822015-09-21 Yao Qi <yao.qi@linaro.org>
6083
6084 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
6085
18fe412b
YQ
60862015-09-21 Yao Qi <yao.qi@linaro.org>
6087
6088 * tracepoint.c (max_jump_pad_size): Remove.
6089
a0cc84cd
YQ
60902015-09-18 Yao Qi <yao.qi@linaro.org>
6091
6092 * linux-aarch64-low.c: Don't include sys/uio.h.
6093 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
6094
d78908cf
WW
60952015-09-16 Wei-cheng Wang <cole945@gmail.com>
6096
6097 * tracepoint.c (eval_result_type): Change prototype.
6098 (condition_true_at_tracepoint): Fix argument to compiled_cond.
6099
d57e0d50
PA
61002015-09-15 Pedro Alves <palves@redhat.com>
6101
6102 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
6103 Check whether to report exec events instead of checking whether
6104 multiprocess is enabled.
6105
5a676acc
PA
61062015-09-15 Pedro Alves <palves@redhat.com>
6107
6108 PR remote/18965
6109 * remote-utils.c (prepare_resume_reply): Merge
6110 TARGET_WAITKIND_VFORK_DONE switch case with the
6111 TARGET_WAITKIND_FORKED case.
6112
7c5d0fad
YQ
61132015-09-15 Yao Qi <yao.qi@linaro.org>
6114
6115 * server.c (handle_query): Check string comparison using
6116 "else if" instead of "if".
6117
750ce8d1
YQ
61182015-09-15 Yao Qi <yao.qi@linaro.org>
6119
6120 * server.c (vCont_supported): New global variable.
6121 (handle_query): Set vCont_supported to 1 if "vContSupported+"
6122 matches. Append ";vContSupported+" to own_buf.
6123 (handle_v_requests): Append ";s;S" to own_buf if target supports
6124 hardware single step or vCont_supported is false.
6125 (capture_main): Set vCont_supported to zero.
6126
70b90b91
YQ
61272015-09-15 Yao Qi <yao.qi@linaro.org>
6128
6129 * linux-low.c (linux_supports_conditional_breakpoints): Rename
6130 it to ...
6131 (linux_supports_hardware_single_step): ... New function.
6132 (linux_target_ops): Update.
6133 * lynx-low.c (lynx_target_ops): Set field
6134 supports_hardware_single_step to target_can_do_hardware_single_step.
6135 * nto-low.c (nto_target_ops): Likewise.
6136 * spu-low.c (spu_target_ops): Likewise.
6137 * win32-low.c (win32_target_ops): Likewise.
6138 * target.c (target_can_do_hardware_single_step): New function.
6139 * target.h (struct target_ops) <supports_conditional_breakpoints>:
6140 Remove. <supports_hardware_single_step>: New field.
6141 (target_supports_conditional_breakpoints): Remove.
6142 (target_supports_hardware_single_step): New macro.
6143 (target_can_do_hardware_single_step): Declare.
6144 * server.c (handle_query): Use target_supports_hardware_single_step
6145 instead of target_supports_conditional_breakpoints.
6146
ade90bde
YQ
61472015-09-15 Yao Qi <yao.qi@linaro.org>
6148
6149 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
6150 function.
6151 (struct linux_target_ops the_low_target): Install
6152 aarch64_linux_siginfo_fixup.
6153
94585166
DB
61542015-09-11 Don Breazeal <donb@codesourcery.com>
6155 Luis Machado <lgustavo@codesourcery.com>
6156
6157 * linux-low.c (linux_mourn): Static declaration.
6158 (linux_arch_setup): Move in front of
6159 handle_extended_wait.
6160 (linux_arch_setup_thread): New function.
6161 (handle_extended_wait): Handle exec events. Call
6162 linux_arch_setup_thread. Make event_lwp argument a
6163 pointer-to-a-pointer.
6164 (check_zombie_leaders): Do not check stopped threads.
6165 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
6166 (linux_low_filter_event): Add lwp and thread for exec'ing
6167 non-leader thread if leader thread has been deleted.
6168 Refactor code into linux_arch_setup_thread and call it.
6169 Pass child lwp pointer by reference to handle_extended_wait.
6170 (linux_wait_for_event_filtered): Update comment.
6171 (linux_wait_1): Prevent clobbering exec event status.
6172 (linux_supports_exec_events): New function.
6173 (linux_target_ops) <supports_exec_events>: Initialize new member.
6174 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
6175 new member.
6176 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
6177 * server.c (report_exec_events): New global variable.
6178 (handle_query): Handle qSupported query for exec-events feature.
6179 (captured_main): Initialize report_exec_events.
6180 * server.h (report_exec_events): Declare new global variable.
6181 * target.h (struct target_ops) <supports_exec_events>: New
6182 member.
6183 (target_supports_exec_events): New macro.
6184 * win32-low.c (win32_target_ops) <supports_exec_events>:
6185 Initialize new member.
6186
0568462b
MM
61872015-09-09 Markus Metzger <markus.t.metzger@intel.com>
6188
6189 * linux-low.c (linux_low_enable_btrace): Remove.
6190 (linux_target_ops): Replace linux_low_enable_btrace with
6191 linux_enable_btrace.
6192
39edd165
YQ
61932015-09-03 Yao Qi <yao.qi@linaro.org>
6194
6195 * linux-aarch64-low.c (aarch64_insert_point): Call
6196 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
6197 returns true.
6198
1db33b5a
UW
61992015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
6200
6201 * linux-low.c (check_stopped_by_breakpoint): Use
6202 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
6203
ab290430
PA
62042015-08-27 Pedro Alves <palves@redhat.com>
6205
6206 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
6207
8d749320
SM
62082015-08-26 Simon Marchi <simon.marchi@ericsson.com>
6209
6711b7f8
SM
6210 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
6211 the XNEW-family equivalent.
8d749320
SM
6212 (compile_bytecodes): Likewise.
6213 * dll.c (loaded_dll): Likewise.
6214 * event-loop.c (append_callback_event): Likewise.
6215 (create_file_handler): Likewise.
6216 (create_file_event): Likewise.
6217 * hostio.c (handle_open): Likewise.
6218 * inferiors.c (add_thread): Likewise.
6219 (add_process): Likewise.
6220 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
6221 * linux-arm-low.c (arm_new_process): Likewise.
6222 (arm_new_thread): Likewise.
6223 * linux-low.c (add_to_pid_list): Likewise.
6224 (linux_add_process): Likewise.
6225 (handle_extended_wait): Likewise.
6226 (add_lwp): Likewise.
6227 (enqueue_one_deferred_signal): Likewise.
6228 (enqueue_pending_signal): Likewise.
6229 (linux_resume_one_lwp_throw): Likewise.
6230 (linux_resume_one_thread): Likewise.
6231 (linux_read_memory): Likewise.
6232 (linux_write_memory): Likewise.
6233 * linux-mips-low.c (mips_linux_new_process): Likewise.
6234 (mips_linux_new_thread): Likewise.
6235 (mips_add_watchpoint): Likewise.
6236 * linux-x86-low.c (initialize_low_arch): Likewise.
6237 * lynx-low.c (lynx_add_process): Likewise.
6238 * mem-break.c (set_raw_breakpoint_at): Likewise.
6239 (set_breakpoint): Likewise.
6240 (add_condition_to_breakpoint): Likewise.
6241 (add_commands_to_breakpoint): Likewise.
6242 (clone_agent_expr): Likewise.
6243 (clone_one_breakpoint): Likewise.
6244 * regcache.c (new_register_cache): Likewise.
6245 * remote-utils.c (look_up_one_symbol): Likewise.
6246 * server.c (queue_stop_reply): Likewise.
6247 (start_inferior): Likewise.
6248 (queue_stop_reply_callback): Likewise.
6249 (handle_target_event): Likewise.
6250 * spu-low.c (fetch_ppc_memory): Likewise.
6251 (store_ppc_memory): Likewise.
6252 * target.c (set_target_ops): Likewise.
6253 * thread-db.c (thread_db_load_search): Likewise.
6254 (try_thread_db_load_1): Likewise.
6255 * tracepoint.c (add_tracepoint): Likewise.
6256 (add_tracepoint_action): Likewise.
6257 (create_trace_state_variable): Likewise.
6258 (cmd_qtdpsrc): Likewise.
6259 (cmd_qtro): Likewise.
6260 (add_while_stepping_state): Likewise.
6261 * win32-low.c (child_add_thread): Likewise.
6262 (get_image_name): Likewise.
6263
ed8b7b42
YQ
62642015-08-25 Yao Qi <yao.qi@linaro.org>
6265
6266 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
6267
db3cb7cb
YQ
62682015-08-25 Yao Qi <yao.qi@linaro.org>
6269
6270 * Makefile.in (aarch64-linux.o): New rule.
6271 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
6272 srv_tgtobj.
6273 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
6274 (aarch64_init_debug_reg_state): Make it extern.
6275 (aarch64_linux_prepare_to_resume): Remove.
6276
f6011a1c
YQ
62772015-08-25 Yao Qi <yao.qi@linaro.org>
6278
6279 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
6280 lwp_arch_private_info and ptid_of_lwp.
6281
88e2cf7e
YQ
62822015-08-25 Yao Qi <yao.qi@linaro.org>
6283
6284 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
6285 Find proc_info by find_process_pid. All callers updated.
6286
5e35436e
YQ
62872015-08-25 Yao Qi <yao.qi@linaro.org>
6288
6289 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
6290 Remove.
6291 (debug_reg_change_callback): Remove.
6292 (aarch64_notify_debug_reg_change): Remove.
6293
4a8a7965
YQ
62942015-08-25 Yao Qi <yao.qi@linaro.org>
6295
6296 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
6297 Call current_lwp_ptid.
6298
32a271ee
YQ
62992015-08-25 Yao Qi <yao.qi@linaro.org>
6300
6301 * linux-aarch64-low.c (debug_reg_change_callback): Use
6302 debug_printf.
6303
0d51c8d7
YQ
63042015-08-25 Yao Qi <yao.qi@linaro.org>
6305
6306 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
6307
31a43dd5
YQ
63082015-08-25 Yao Qi <yao.qi@linaro.org>
6309
6310 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
6311
8ee52567
YQ
63122015-08-25 Yao Qi <yao.qi@linaro.org>
6313
6314 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
6315 the code.
6316
ff3f0f45
YQ
63172015-08-25 Yao Qi <yao.qi@linaro.org>
6318
6319 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
6320 Remove.
6321 (debug_reg_change_callback): Remove argument entry and add argument
6322 lwp. Remove local variable thread. Don't print thread id in the
6323 debugging output. Don't check whether pid of thread equals to pid.
6324 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
6325 iterate_over_lwps instead find_inferior.
6326
3d40fbb5
PA
63272015-08-24 Pedro Alves <palves@redhat.com>
6328
6329 * inferiors.c (get_first_process): New function.
6330 * inferiors.h (get_first_process): New declaration.
6331 * remote-utils.c (read_ptid): Default to the first process in the
6332 list, instead of to the current thread's process.
6333
438e1e42
PA
63342015-08-24 Pedro Alves <palves@redhat.com>
6335
6336 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
6337 * event-loop.c: Likewise.
6338 * remote-utils.c: Likewise.
6339 * tracepoint.c: Likewise.
6340
a8c6d4fc
PA
63412015-08-24 Pedro Alves <palves@redhat.com>
6342
6343 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
6344 ptid_get_lwp.
6345
99b0bb12
PA
63462015-08-21 Pedro Alves <palves@redhat.com>
6347
6348 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
6349 instead of literal 1.
6350
f8904751
PA
63512015-08-21 Pedro Alves <palves@redhat.com>
6352
6353 * tdesc.c (default_description): Explicitly zero-initialize.
6354
465a859e
PA
63552015-08-21 Pedro Alves <palves@redhat.com>
6356
6357 PR gdb/18749
6358 * inferiors.c (remove_thread): Discard any pending stop reply for
6359 this thread.
6360 * server.c (remove_all_on_match_pid): Rename to ...
6361 (remove_all_on_match_ptid): ... this. Work with a filter ptid
6362 instead of a pid.
6363 (discard_queued_stop_replies): Change parameter to a ptid. Now
6364 extern.
6365 (handle_v_kill, kill_inferior_callback, captured_main)
6366 (process_serial_event): Adjust.
6367 * server.h (discard_queued_stop_replies): Declare.
6368
f0db101d
PA
63692015-08-21 Pedro Alves <palves@redhat.com>
6370
6371 * linux-low.c (wait_for_sigstop): Always switch to no thread
6372 selected if the previously current thread dies.
6373 * lynx-low.c (lynx_request_interrupt): Use the first thread's
6374 process instead of the current thread's.
6375 * remote-utils.c (input_interrupt): Don't check if there's no
6376 current thread.
6377 * server.c (gdb_read_memory, gdb_write_memory): If setting the
6378 current thread to the general thread fails, error out.
6379 (handle_qxfer_auxv, handle_qxfer_libraries)
6380 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
6381 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
6382 (handle_query): Check if there's a thread selected instead of
6383 checking whether there's any thread in the thread list.
6384 (handle_qxfer_threads, handle_qxfer_btrace)
6385 (handle_qxfer_btrace_conf): Don't error out early if there's no
6386 thread in the thread list.
6387 (handle_v_cont, myresume): Don't set the current thread to the
6388 continue thread.
6389 (process_serial_event) <Hg handling>: Also set thread_id if the
6390 previous general thread is still alive.
6391 (process_serial_event) <g/G handling>: If setting the current
6392 thread to the general thread fails, error out.
6393 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
6394 thread's lwp instead of the current thread's.
6395 * target.c (set_desired_thread): If the desired thread was not
6396 found, leave the current thread pointing to NULL. Return an int
6397 (boolean) indicating success.
6398 * target.h (set_desired_thread): Change return type to int.
6399
40045d91
MF
64002015-08-20 Max Filippov <jcmvbkbc@gmail.com>
6401
6402 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
6403 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
6404 #includes.
6405 (ps_get_thread_area): New function.
6406
45face3b
GB
64072015-08-19 Gary Benson <gbenson@redhat.com>
6408
6409 * hostio.c (handle_pread): Do not attempt to read more data
6410 than hostio_reply_with_data can fit in a packet.
6411
16d5f642
JB
64122015-08-18 Joel Brobecker <brobecker@adacore.com>
6413
6414 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
6415
a738da3a
MF
64162015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
6417
6418 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
6419
33ebda9d
PA
64202015-08-06 Pedro Alves <palves@redhat.com>
6421
6422 * tracepoint.c (expr_eval_result): Now an int.
6423
a44892be
PA
64242015-08-06 Pedro Alves <palves@redhat.com>
6425
6426 * gdbthread.h (struct regcache): Forward declare.
6427 (struct thread_info) <regcache_data>: Now a struct regcache
6428 pointer.
6429 * inferiors.c (inferior_regcache_data)
6430 (set_inferior_regcache_data): Now work with struct regcache
6431 pointers.
6432 * inferiors.h (struct regcache): Forward declare.
6433 (inferior_regcache_data, set_inferior_regcache_data): Now work
6434 with struct regcache pointers.
6435 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
6436 (free_register_cache_thread): Remove struct regcache pointer
6437 casts.
6438
608a1e46
PA
64392015-08-06 Pedro Alves <palves@redhat.com>
6440
6441 * server.c (captured_main): On error, print the exception message
6442 to stderr, and if run_once is set, throw a quit.
6443
f0ce0d3a
PA
64442015-08-06 Pedro Alves <palves@redhat.com>
6445
6446 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
6447 the current thread.
6448
bf47e248
PA
64492015-08-06 Pedro Alves <palves@redhat.com>
6450
6451 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
6452 reading beyond the passed in buffer length.
6453
b6b9ffcc
PL
64542015-08-06 Pierre Langlois <pierre.langlois@arm.com>
6455
6456 * tracepoint.c (symbol_list) <required>: Remove.
6457
863d01bd
PA
64582015-08-06 Pedro Alves <palves@redhat.com>
6459
6460 * linux-low.c (handle_extended_wait): Set the fork child's suspend
6461 count if stopping and suspending threads.
6462 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
6463 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
6464 (linux_detach): Complete an ongoing step-over.
6465 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
6466 throughout.
6467 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
6468 (linux_wait_1): If passing a signal to the inferior after
6469 finishing a step-over, unsuspend and re-resume all lwps. If we
6470 see a single-step event but the thread should be continuing, don't
6471 pass the trap to gdb.
6472 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
6473 internal_error instead of gdb_assert.
6474 (enqueue_pending_signal): New function.
6475 (check_ptrace_stopped_lwp_gone): Add debug output.
6476 (start_step_over): Use internal_error instead of gdb_assert.
6477 (complete_ongoing_step_over): New function.
6478 (linux_resume_one_thread): Don't resume a suspended thread.
6479 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
6480 it stepping.
6481
00db26fa
PA
64822015-08-06 Pedro Alves <palves@redhat.com>
6483
6484 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
6485 (linux_thread_alive): Use lwp_is_marked_dead.
6486 (extended_event_reported): Delete.
6487 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
6488 instead of extended_event_reported.
6489 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
6490 as well.
6491 (lwp_is_marked_dead): New function.
6492 (lwp_running): Use lwp_is_marked_dead.
6493 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
6494 comment.
6495
ad071a30
PA
64962015-08-06 Pedro Alves <palves@redhat.com>
6497
6498 * linux-low.c (linux_wait_1): Move fork event output out of the
6499 !report_to_gdb check. Pass event_child->waitstatus to
6500 target_waitstatus_to_string instead of ourstatus.
6501
524b57e6
YQ
65022015-08-04 Yao Qi <yao.qi@linaro.org>
6503
6504 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
6505 if current_thread is 32 bit.
6506
6085d6f6
YQ
65072015-08-04 Yao Qi <yao.qi@linaro.org>
6508
6509 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
6510 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
6511 * server.c (extended_protocol): Remove "static".
6512 * server.h (extended_protocol): Declare it.
6513
8a7e4587
YQ
65142015-08-04 Yao Qi <yao.qi@linaro.org>
6515
6516 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
6517 both aarch64 and aarch32.
6518 (aarch64_set_pc): Likewise.
6519
3b53ae99
YQ
65202015-08-04 Yao Qi <yao.qi@linaro.org>
6521
6522 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
6523 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
6524 arm-with-neon.xml to srv_xmlfiles.
6525 * linux-aarch64-low.c: Include linux-aarch32-low.h.
6526 (is_64bit_tdesc): New function.
6527 (aarch64_linux_read_description): New function.
6528 (aarch64_arch_setup): Call aarch64_linux_read_description.
6529 (regs_info): Rename to regs_info_aarch64.
6530 (aarch64_regs_info): Return right regs_info.
6531 (initialize_low_arch): Call initialize_low_arch_aarch32.
6532
bd9e6534
YQ
65332015-08-04 Yao Qi <yao.qi@linaro.org>
6534
6535 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
6536 * linux-aarch32-low.c: New file.
6537 * linux-aarch32-low.h: New file.
6538 * linux-arm-low.c (arm_fill_gregset): Move it to
6539 linux-aarch32-low.c.
6540 (arm_store_gregset): Likewise.
6541 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
6542 (arm_store_vfpregset): Call arm_store_vfpregset_num.
6543 (arm_arch_setup): Check if PTRACE_GETREGSET works.
6544 (regs_info): Rename to regs_info_arm.
6545 (arm_regs_info): Return regs_info_aarch32 if
6546 have_ptrace_getregset is 1 and target description is
6547 arm_with_neon or arm_with_vfpv3.
6548 (initialize_low_arch): Don't call init_registers_arm_with_neon.
6549 Call initialize_low_arch_aarch32 instead.
6550
ded48a5e
YQ
65512015-08-04 Yao Qi <yao.qi@linaro.org>
6552
6553 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
6554 * linux-low.c: ... here.
6555 * linux-low.h (have_ptrace_getregset): Declare it.
6556
96e9210f
PA
65572015-08-04 Pedro Alves <palves@redhat.com>
6558
6559 * thread-db.c (struct thread_db): Use new typedefs.
6560 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
6561 CHK calls.
6562 (disable_thread_event_reporting): Cast result of dlsym to
6563 destination function pointer type.
6564 (thread_db_mourn): Use td_ta_delete_ftype.
6565
af60a1ef
SL
65662015-08-03 Sandra Loosemore <sandra@codesourcery.com>
6567
6568 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
6569 arch variant.
6570 (CDX_BREAKPOINT): Define for R2.
6571 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
6572 (the_low_target): Add comments.
6573
e8b41681
YQ
65742015-07-30 Yao Qi <yao.qi@linaro.org>
6575
6576 * linux-arm-low.c (arm_hwcap): Remove it.
6577 (arm_read_description): New local variable arm_hwcap. Don't
6578 set arm_hwcap to zero.
6579
89abb039
YQ
65802015-07-30 Yao Qi <yao.qi@linaro.org>
6581
6582 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
6583 Use regcache->tdesc instead.
6584 (arm_store_wmmxregset): Likewise.
6585 (arm_fill_vfpregset): Likewise.
6586 (arm_store_vfpregset): Likewise.
6587
deca266c
YQ
65882015-07-30 Yao Qi <yao.qi@linaro.org>
6589
6590 * linux-arm-low.c: Include arch/arm.h.
6591 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
6592 (arm_store_gregset): Likewise.
6593
aa58a496
SM
65942015-07-29 Simon Marchi <simon.marchi@ericsson.com>
6595
6596 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
6597 ptrace's 4th parameter.
6598
50904b25
YQ
65992015-07-27 Yao Qi <yao.qi@linaro.org>
6600
6601 * configure.srv (case aarch64*-*-linux*): Don't set
6602 srv_linux_usrregs.
6603
5826e159
PA
66042015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
6605
6606 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
6607 sys/ptrace.h.
6608 * linux-arm-low.c: Likewise.
6609 * linux-cris-low.c: Likewise.
6610 * linux-crisv32-low.c: Likewise.
6611 * linux-low.c: Likewise.
6612 * linux-m68k-low.c: Likewise.
6613 * linux-mips-low.c: Likewise.
6614 * linux-nios2-low.c: Likewise.
6615 * linux-s390-low.c: Likewise.
6616 * linux-sparc-low.c: Likewise.
6617 * linux-tic6x-low.c: Likewise.
6618 * linux-tile-low.c: Likewise.
6619 * linux-x86-low.c: Likewise.
6620
54019719
PA
66212015-07-24 Pedro Alves <palves@redhat.com>
6622
6623 * config.in: Regenerate.
6624 * configure: Regenerate.
6625
eb7aa561
PA
66262015-07-24 Pedro Alves <palves@redhat.com>
6627
6628 * acinclude.m4: Include ../ptrace.m4.
6629 * configure.ac: Call GDB_AC_PTRACE.
6630 * config.in, configure: Regenerate.
6631
55d7b841
YQ
66322015-07-24 Yao Qi <yao.qi@linaro.org>
6633
6634 * linux-low.c (linux_create_inferior): Remove setting to
6635 proc->priv->new_inferior.
6636 (linux_attach): Likewise.
6637 (linux_low_filter_event): Likewise.
6638 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
6639
c06cbd92
YQ
66402015-07-24 Yao Qi <yao.qi@linaro.org>
6641
6642 * linux-low.c (linux_arch_setup): New function.
6643 (linux_low_filter_event): If proc->tdesc is NULL and
6644 proc->attached is true, call the_low_target.arch_setup.
6645 Otherwise, keep status pending, and return.
6646 (linux_resume_one_lwp_throw): Don't call get_pc if
6647 thread->while_stepping isn't NULL. Don't call
6648 get_thread_regcache if proc->tdesc is NULL.
6649 (need_step_over_p): Return 0 if proc->tdesc is NULL.
6650 (linux_target_ops): Install arch_setup.
6651 * server.c (start_inferior): Call the_target->arch_setup.
6652 * target.h (struct target_ops) <arch_setup>: New field.
6653 (target_arch_setup): New marco.
6654 * lynx-low.c (lynx_target_ops): Update.
6655 * nto-low.c (nto_target_ops): Update.
6656 * spu-low.c (spu_target_ops): Update.
6657 * win32-low.c (win32_target_ops): Update.
6658
5ae3ebba
YQ
66592015-07-24 Yao Qi <yao.qi@linaro.org>
6660
6661 * linux-low.c (linux_add_process): Don't set
6662 proc->priv->new_inferior.
6663 (linux_create_inferior): Set proc->priv->new_inferior to 1.
6664 (linux_attach): Likewise.
6665
eb97750b
YQ
66662015-07-24 Yao Qi <yao.qi@linaro.org>
6667
6668 * server.c (start_inferior): Code refactor.
6669
51aee833
YQ
66702015-07-24 Yao Qi <yao.qi@linaro.org>
6671
6672 * server.c (process_serial_event): Set general_thread.
6673
af1b22f3
YQ
66742015-07-21 Yao Qi <yao.qi@linaro.org>
6675
6676 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
6677 aarch64_linux_get_debug_reg_capacity.
6678
554717a3
YQ
66792015-07-17 Yao Qi <yao.qi@linaro.org>
6680
6681 * Makefile.in (aarch64-linux-hw-point.o): New rule.
6682 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
6683 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
6684 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
6685 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
6686 (AARCH64_HWP_ALIGNMENT): Likewise.
6687 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
6688 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
6689 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
6690 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
6691 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
6692 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
6693 (struct aarch64_debug_reg_state): Likewise.
6694 (struct arch_lwp_info): Likewise.
6695 (aarch64_align_watchpoint): Likewise.
6696 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
6697 (aarch64_watchpoint_length): Likewise.
6698 (aarch64_point_encode_ctrl_reg): Likewise
6699 (aarch64_point_is_aligned): Likewise.
6700 (aarch64_align_watchpoint): Likewise.
6701 (aarch64_linux_set_debug_regs):
6702 (aarch64_dr_state_insert_one_point): Likewise.
6703 (aarch64_dr_state_remove_one_point): Likewise.
6704 (aarch64_handle_breakpoint): Likewise.
6705 (aarch64_handle_aligned_watchpoint): Likewise.
6706 (aarch64_handle_unaligned_watchpoint): Likewise.
6707 (aarch64_handle_watchpoint): Likewise.
6708
c67ca4de
YQ
67092015-07-17 Yao Qi <yao.qi@linaro.org>
6710
6711 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
6712 and don't aarch64_get_debug_reg_state. All callers update.
6713 (aarch64_handle_aligned_watchpoint): Likewise.
6714 (aarch64_handle_unaligned_watchpoint): Likewise.
6715 (aarch64_handle_watchpoint): Likewise.
6716 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
6717 (aarch64_remove_point): Likewise.
6718
25abf979
YQ
67192015-07-17 Yao Qi <yao.qi@linaro.org>
6720
6721 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
6722 debug_printf.
6723 (aarch64_handle_unaligned_watchpoint): Likewise.
6724
db1ff28b
JK
67252015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
6726
6727 Revert the previous 3 commits:
6728 Move gdb_regex* to common/
6729 Move linux_find_memory_regions_full & co.
6730 gdbserver build-id attribute generator
6731
700ca40f
JK
67322015-07-15 Aleksandar Ristovski <aristovski@qnx.com
6733 Jan Kratochvil <jan.kratochvil@redhat.com>
6734
6735 gdbserver build-id attribute generator.
6736 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
6737 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
6738 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
6739 (find_phdr): New.
6740 (get_dynamic): Use find_pdhr to traverse program headers.
6741 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
6742 (compare_mapping_entry_range, struct find_memory_region_callback_data)
6743 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
6744 (get_hex_build_id): New.
6745 (linux_qxfer_libraries_svr4): Add optional build-id attribute
6746 to reply XML document.
6747
9904185c
JK
67482015-07-15 Aleksandar Ristovski <aristovski@qnx.com
6749 Jan Kratochvil <jan.kratochvil@redhat.com>
6750
6751 * target.c: Include target/target-utils.h and fcntl.h.
6752 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
6753 (target_fileio_read_stralloc): New functions.
6754
6e5b4429
JK
67552015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
6756
6757 * Makefile.in (OBS): Add gdb_regex.o.
6758 (gdb_regex.o): New.
6759 * config.in: Rebuilt.
6760 * configure: Rebuilt.
6761
ddc98fbf
JK
67622015-07-15 Aleksandar Ristovski <aristovski@qnx.com
6763 Jan Kratochvil <jan.kratochvil@redhat.com>
6764
6765 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
6766 * Makefile.in (OBS): Add target-utils.o.
6767 (linux-maps.o, target-utils.o): New.
6768 * configure.srv (srv_linux_obj): Add linux-maps.o.
6769
e57bb7a0
PL
67702015-07-15 Pierre Langlois <pierre.langlois@arm.com>
6771
6772 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
6773 function, return 1.
6774 (the_low_target): Install it.
6775
586b02a9
PA
67762015-07-14 Pedro Alves <palves@redhat.com>
6777
6778 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
6779 Instead, ignore ECHILD, and throw an error for other errnos.
6780
58c1b36c
PA
67812015-07-10 Pedro Alves <palves@redhat.com>
6782
6783 * event-loop.c (struct callback_event) <data>: Change type to
6784 gdb_client_data instance instead of gdb_client_data pointer.
6785 (append_callback_event): Adjust.
6786
421530db
PL
67872015-07-10 Pierre Langlois <pierre.langlois@arm.com>
6788
6789 * linux-aarch64-low.c: Add comments for each linux_target_ops
6790 method. Remove comments already covered in target_ops and
6791 linux_target_ops definitions.
6792 (the_low_target): Add comments for each unimplemented method.
6793
c2d65f38
YQ
67942015-07-09 Yao Qi <yao.qi@linaro.org>
6795
6796 * linux-aarch64-low.c (aarch64_regmap): Remove.
6797 (aarch64_usrregs_info): Remove.
6798 (regs_info): Set field usrregs to NULL.
6799
b20a6524
MM
68002015-07-02 Markus Metzger <markus.t.metzger@intel.com>
6801
6802 * linux-low.c: Include "rsp-low.h"
6803 (linux_low_encode_pt_config, linux_low_encode_raw): New.
6804 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
6805 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
6806 (handle_btrace_enable_pt): New.
6807 (handle_btrace_general_set): Support "pt".
6808 (handle_btrace_conf_general_set): Support "pt:size".
6809
96c97461
PL
68102015-06-29 Pierre Langlois <pierre.langlois@arm.com>
6811
6812 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
6813 Z_PACKET_SW_BP.
6814
37d66942
PL
68152015-06-29 Pierre Langlois <pierre.langlois@arm.com>
6816
6817 * linux-aarch64-low.c: Remove comment about endianness.
6818 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
6819 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
6820 memcmp.
6821
dc06243f
GB
68222015-06-24 Gary Benson <gbenson@redhat.com>
6823
6824 * linux-i386-ipa.c (stdint.h): Do not include.
6825 * lynx-i386-low.c (stdint.h): Likewise.
6826 * lynx-ppc-low.c (stdint.h): Likewise.
6827 * mem-break.c (stdint.h): Likewise.
6828 * thread-db.c (stdint.h): Likewise.
6829 * tracepoint.c (stdint.h): Likewise.
6830 * win32-low.c (stdint.h): Likewise.
6831
124e13d9
SM
68322015-06-18 Simon Marchi <simon.marchi@ericsson.com>
6833
6834 * server.c (write_qxfer_response): Update call to
6835 remote_escape_output.
6836
909c2cda
JK
68372015-06-15 Aleksandar Ristovski <aristovski@qnx.com
6838 Jan Kratochvil <jan.kratochvil@redhat.com>
6839
6840 Merge multiple hex conversions.
6841 * gdbreplay.c (tohex): Rename to 'fromhex'.
6842 (logchar): Use fromhex.
6843
24c05f46
JK
68442015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
6845
6846 * server.c (handle_qxfer_libraries): Set `version' attribute for
6847 <library-list>.
6848
14d2069a
GB
68492015-06-10 Gary Benson <gbenson@redhat.com>
6850
6851 * target.h (struct target_ops) <multifs_open>: New field.
6852 <multifs_unlink>: Likewise.
6853 <multifs_readlink>: Likewise.
6854 * linux-low.c (nat/linux-namespaces.h): New include.
6855 (linux_target_ops): Initialize the_target->multifs_open,
6856 the_target->multifs_unlink and the_target->multifs_readlink.
6857 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
6858 * hostio.c (hostio_fs_pid): New static variable.
6859 (hostio_handle_new_gdb_connection): New function.
6860 (handle_setfs): Likewise.
6861 (handle_open): Use the_target->multifs_open as appropriate.
6862 (handle_unlink): Use the_target->multifs_unlink as appropriate.
6863 (handle_readlink): Use the_target->multifs_readlink as
6864 appropriate.
6865 (handle_vFile): Handle vFile:setfs packets.
6866 * server.c (handle_query): Call hostio_handle_new_gdb_connection
6867 after target_handle_new_gdb_connection.
6868
4b8b5e72
GB
68692015-06-10 Gary Benson <gbenson@redhat.com>
6870
6871 * configure.ac (AC_CHECK_FUNCS): Add setns.
6872 * config.in: Regenerate.
6873 * configure: Likewise.
6874 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
6875 (linux-namespaces.o): New rule.
6876 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
6877
3ac2e371
GB
68782015-06-09 Gary Benson <gbenson@redhat.com>
6879
6880 * hostio.c (handle_open): Process mode argument with
6881 fileio_to_host_mode.
6882
ca9b78ce
YQ
68832015-06-01 Yao Qi <yao.qi@linaro.org>
6884
6885 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
6886 * linux-x86-low.c: Likewise.
6887
bfacd19d
DB
68882015-05-28 Don Breazeal <donb@codesourcery.com>
6889
6890 * linux-low.c (handle_extended_wait): Initialize
6891 thread_info.last_resume_kind for new fork children.
6892
452003ef
PA
68932015-05-15 Pedro Alves <palves@redhat.com>
6894
6895 * target.h (target_handle_new_gdb_connection): Rewrite using if
6896 wrapped in do/while.
6897
1041a03c
JB
68982015-05-14 Joel Brobecker <brobecker@adacore.com>
6899
6900 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
6901 * configure, config.in: Regenerate.
6902 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
6903 Declare typedef.
6904
c269dbdb
DB
69052015-05-12 Don Breazeal <donb@codesourcery.com>
6906
6907 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
6908 PTRACE_EVENT_VFORK_DONE.
6909 (linux_low_ptrace_options, extended_event_reported): Add vfork
6910 events.
6911 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
6912 and "vforkdone" for RSP 'T' Stop Reply Packet.
6913 * server.h (report_vfork_events): Declare
6914 global variable.
6915
3a8a0396
DB
69162015-05-12 Don Breazeal <donb@codesourcery.com>
6917
6918 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
6919 (the_low_target) <new_fork>: Initialize new member.
6920 * linux-arm-low.c (arm_new_fork): New function.
6921 (the_low_target) <new_fork>: Initialize new member.
6922 * linux-low.c (handle_extended_wait): Call new target function
6923 new_fork.
6924 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
6925 * linux-mips-low.c (mips_add_watchpoint): New function
6926 extracted from mips_insert_point.
6927 (the_low_target) <new_fork>: Initialize new member.
6928 (mips_linux_new_fork): New function.
6929 (mips_insert_point): Call mips_add_watchpoint.
6930 * linux-x86-low.c (x86_linux_new_fork): New function.
6931 (the_low_target) <new_fork>: Initialize new member.
6932
de0d863e
DB
69332015-05-12 Don Breazeal <donb@codesourcery.com>
6934
6935 * linux-low.c (handle_extended_wait): Implement return value,
6936 rename argument 'event_child' to 'event_lwp', handle
6937 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
6938 (linux_low_ptrace_options): New function.
6939 (linux_low_filter_event): Call linux_low_ptrace_options,
6940 use different argument fo linux_enable_event_reporting,
6941 use return value from handle_extended_wait.
6942 (extended_event_reported): New function.
6943 (linux_wait_1): Call extended_event_reported and set
6944 status to report fork events.
6945 (linux_write_memory): Add pid to debug message.
6946 (reset_lwp_ptrace_options_callback): New function.
6947 (linux_handle_new_gdb_connection): New function.
6948 (linux_target_ops): Initialize new structure member.
6949 * linux-low.h (struct lwp_info) <waitstatus>: New member.
6950 * lynx-low.c: Initialize new structure member.
6951 * remote-utils.c (prepare_resume_reply): Implement stop reason
6952 "fork" for "T" stop message.
6953 * server.c (handle_query): Call handle_new_gdb_connection.
6954 * server.h (report_fork_events): Declare global flag.
6955 * target.h (struct target_ops) <handle_new_gdb_connection>:
6956 New member.
6957 (target_handle_new_gdb_connection): New macro.
6958 * win32-low.c: Initialize new structure member.
6959
ddcbc397
DB
69602015-05-12 Don Breazeal <donb@codesourcery.com>
6961
6962 * mem-break.c (APPEND_TO_LIST): Define macro.
6963 (clone_agent_expr): New function.
6964 (clone_one_breakpoint): New function.
6965 (clone_all_breakpoints): New function.
6966 * mem-break.h: Declare new functions.
6967
89245bc0
DB
69682015-05-12 Don Breazeal <donb@codesourcery.com>
6969
6970 * linux-low.c (linux_supports_fork_events): New function.
6971 (linux_supports_vfork_events): New function.
6972 (linux_target_ops): Initialize new structure members.
6973 (initialize_low): Call linux_check_ptrace_features.
6974 * lynx-low.c (lynx_target_ops): Initialize new structure
6975 members.
6976 * server.c (report_fork_events, report_vfork_events):
6977 New global flags.
6978 (handle_query): Add new features to qSupported packet and
6979 response.
6980 (captured_main): Initialize new global variables.
6981 * target.h (struct target_ops) <supports_fork_events>:
6982 New member.
6983 <supports_vfork_events>: New member.
6984 (target_supports_fork_events): New macro.
6985 (target_supports_vfork_events): New macro.
6986 * win32-low.c (win32_target_ops): Initialize new structure
6987 members.
6988
835205d0
GB
69892015-05-12 Gary Benson <gbenson@redhat.com>
6990
6991 * server.c (handle_qxfer_exec_file): Use current process
6992 if annex is empty.
6993
21e94bd9
SL
69942015-05-08 Sandra Loosemore <sandra@codesourcery.com>
6995
6996 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
6997 Remove HAVE_PTRACE_GETREGS conditionals.
6998 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
6999 instead of PTRACE_GETREGS and PTRACE_SETREGS.
7000
45614f15
YQ
70012015-05-08 Yao Qi <yao.qi@linaro.org>
7002
7003 * linux-low.c (linux_supports_conditional_breakpoints): New
7004 function.
7005 (linux_target_ops): Install new target method.
7006 * lynx-low.c (lynx_target_ops): Install NULL hook for
7007 supports_conditional_breakpoints.
7008 * nto-low.c (nto_target_ops): Likewise.
7009 * spu-low.c (spu_target_ops): Likewise.
7010 * win32-low.c (win32_target_ops): Likewise.
7011 * server.c (handle_query): Check
7012 target_supports_conditional_breakpoints.
7013 * target.h (struct target_ops) <supports_conditional_breakpoints>:
7014 New field.
7015 (target_supports_conditional_breakpoints): New macro.
7016
80ad801e
PA
70172015-05-06 Pedro Alves <palves@redhat.com>
7018
7019 PR server/18081
7020 * server.c (start_inferior): If the process exits, mourn it.
7021
819843c7
GB
70222015-04-21 Gary Benson <gbenson@redhat.com>
7023
7024 * hostio.c (fileio_open_flags_to_host): Factored out to
7025 fileio_to_host_openflags in common/fileio.c. Single use
7026 updated.
7027
a2d5a9d7
MF
70282015-04-17 Max Filippov <jcmvbkbc@gmail.com>
7029
7030 * linux-xtensa-low.c (xtensa_fill_gregset)
7031 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
7032 XCHAL_HAVE_LOOP.
7033
deb44829
MF
70342015-04-17 Max Filippov <jcmvbkbc@gmail.com>
7035
7036 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
7037 (regs_info): Replace usrregs pointer with NULL.
7038
e57f1de3
GB
70392015-04-17 Gary Benson <gbenson@redhat.com>
7040
7041 * target.h (struct target_ops) <pid_to_exec_file>: New field.
7042 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
7043 * server.c (handle_qxfer_exec_file): New function.
7044 (qxfer_packets): Add exec-file entry.
7045 (handle_query): Report qXfer:exec-file:read as supported packet.
7046
62828379
RN
70472015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
7048
7049 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
7050
b88bb450
GB
70512015-04-09 Gary Benson <gbenson@redhat.com>
7052
7053 * hostio-errno.c (errno_to_fileio_error): Remove function.
7054 Update caller to use remote_fileio_to_fio_error.
7055
c8f4bfdd
YQ
70562015-04-09 Yao Qi <yao.qi@linaro.org>
7057
7058 * linux-low.c (linux_insert_point): Call
7059 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
7060 (linux_remove_point): Call remove_memory_breakpoint if type is
7061 raw_bkpt_type_sw.
7062 * linux-x86-low.c (x86_insert_point): Don't call
7063 insert_memory_breakpoint.
7064 (x86_remove_point): Don't call remove_memory_breakpoint.
7065
41f98f02
PA
70662015-04-01 Pedro Alves <palves@redhat.com>
7067 Cleber Rosa <crosa@redhat.com>
7068
7069 * server.c (gdbserver_usage): Reorganize and extend the usage
7070 message.
7071
2bf6fb9d
PA
70722015-03-24 Pedro Alves <palves@redhat.com>
7073
7074 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
7075 output. Also dump TRAP_TRACE.
7076 (linux_low_filter_event): In debug output, distinguish a
7077 resume_stop SIGSTOP from a delayed SIGSTOP.
7078
369f6daa
GB
70792015-03-24 Gary Benson <gbenson@redhat.com>
7080
7081 * linux-x86-low.c (x86_linux_new_thread): Moved to
7082 nat/x86-linux.c.
7083 (x86_linux_prepare_to_resume): Likewise.
7084
8e5d4070
GB
70852015-03-24 Gary Benson <gbenson@redhat.com>
7086
7087 * Makefile.in (x86-linux-dregs.o): New rule.
7088 * configure.srv: Add x86-linux-dregs.o to relevant targets.
7089 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
7090 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
7091 (x86_linux_dr_get): Likewise.
7092 (x86_linux_dr_set): Likewise.
7093 (update_debug_registers_callback): Likewise.
7094 (x86_linux_dr_set_addr): Likewise.
7095 (x86_linux_dr_get_addr): Likewise.
7096 (x86_linux_dr_set_control): Likewise.
7097 (x86_linux_dr_get_control): Likewise.
7098 (x86_linux_dr_get_status): Likewise.
7099 (x86_linux_update_debug_registers): Likewise.
7100
2b95d440
GB
71012015-03-24 Gary Benson <gbenson@redhat.com>
7102
7103 * linux-x86-low.c (x86_linux_update_debug_registers):
7104 New function, factored out from...
7105 (x86_linux_prepare_to_resume): ...this.
7106
14b0bc68
GB
71072015-03-24 Gary Benson <gbenson@redhat.com>
7108
7109 * linux-x86-low.c (x86_linux_dr_get): Update comments.
7110 (x86_linux_dr_set): Likewise.
7111 (update_debug_registers_callback): Likewise.
7112 (x86_linux_dr_set_addr): Likewise.
7113 (x86_linux_dr_get_addr): Likewise.
7114 (x86_linux_dr_set_control): Likewise.
7115 (x86_linux_dr_get_control): Likewise.
7116 (x86_linux_dr_get_status): Likewise.
7117 (x86_linux_prepare_to_resume): Likewise.
7118
5dfe6ca8
GB
71192015-03-24 Gary Benson <gbenson@redhat.com>
7120
7121 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
7122 Use perror_with_name. Pass string through gettext.
7123 (x86_linux_dr_set): Likewise.
7124
d33472ad
GB
71252015-03-24 Gary Benson <gbenson@redhat.com>
7126
7127 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
7128 (x86_linux_dr_set_addr): ...this.
7129 (x86_dr_low_get_addr): Rename to...
7130 (x86_linux_dr_get_addr): ...this.
7131 (x86_dr_low_set_control): Rename to...
7132 (x86_linux_dr_set_control): ...this.
7133 (x86_dr_low_get_control): Rename to...
7134 (x86_linux_dr_get_control): ...this.
7135 (x86_dr_low_get_status): Rename to...
7136 (x86_linux_dr_get_status): ...this.
7137 (x86_dr_low): Update with new function names.
7138
4b134ca1
GB
71392015-03-24 Gary Benson <gbenson@redhat.com>
7140
7141 * Makefile.in (x86-linux.o): New rule.
7142 * configure.srv: Add x86-linux.o to relevant targets.
7143 * linux-low.c (lwp_set_arch_private_info): New function.
7144 (lwp_arch_private_info): Likewise.
7145 * linux-x86-low.c: Include nat/x86-linux.h.
7146 (arch_lwp_info): Removed structure.
7147 (update_debug_registers_callback):
7148 Use lwp_set_debug_registers_changed.
7149 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
7150 and lwp_set_debug_registers_changed.
7151 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
7152
34c703da
GB
71532015-03-24 Gary Benson <gbenson@redhat.com>
7154
7155 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
7156 * linux-arm-low.c (arm_new_thread): Likewise.
7157 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
7158 * linux-mips-low.c (mips_linux_new_thread): Likewise.
7159 * linux-x86-low.c (x86_linux_new_thread): Likewise.
7160 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
7161
cff068da
GB
71622015-03-24 Gary Benson <gbenson@redhat.com>
7163
7164 * linux-low.c (ptid_of_lwp): New function.
7165 (lwp_is_stopped): Likewise.
7166 (lwp_stop_reason): Likewise.
7167 * linux-x86-low.c (update_debug_registers_callback):
7168 Use lwp_is_stopped.
7169 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
7170 lwp_stop_reason.
7171
b2f7c7e8
GB
71722015-03-24 Gary Benson <gbenson@redhat.com>
7173
7174 * linux-low.h (linux_stop_lwp): Remove declaration.
7175
6d4ee8c6
GB
71762015-03-24 Gary Benson <gbenson@redhat.com>
7177
7178 * linux-low.h: Include nat/linux-nat.h.
7179 * linux-low.c (iterate_over_lwps_args): New structure.
7180 (iterate_over_lwps_filter): New function.
7181 (iterate_over_lwps): Likewise.
7182 * linux-x86-low.c (update_debug_registers_callback):
7183 Update signature to what iterate_over_lwps expects.
7184 Remove PID check that iterate_over_lwps now performs.
7185 (x86_dr_low_set_addr): Use iterate_over_lwps.
7186 (x86_dr_low_set_control): Likewise.
7187
70a0bb6b
GB
71882015-03-24 Gary Benson <gbenson@redhat.com>
7189
7190 * linux-x86-low.c (x86_debug_reg_state): New function.
7191 (x86_linux_prepare_to_resume): Use the above.
7192
7b669087
GB
71932015-03-24 Gary Benson <gbenson@redhat.com>
7194
7195 * linux-low.c (current_lwp_ptid): New function.
7196 * linux-x86-low.c: Include nat/linux-nat.h.
7197 (x86_dr_low_get_addr): Use current_lwp_ptid.
7198 (x86_dr_low_get_control): Likewise.
7199 (x86_dr_low_get_status): Likewise.
7200
eef49a3d
PA
72012015-03-20 Pedro Alves <palves@redhat.com>
7202
7203 * tracepoint.c (cmd_qtstatus): Make "str" const.
7204
b2333d22
PA
72052015-03-20 Pedro Alves <palves@redhat.com>
7206
7207 * server.c (handle_general_set): Make "req_str" const.
7208
23f238d3
PA
72092015-03-19 Pedro Alves <palves@redhat.com>
7210
7211 * linux-low.c (linux_resume_one_lwp): Rename to ...
7212 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
7213 instead call perror_with_name.
7214 (check_ptrace_stopped_lwp_gone): New function.
7215 (linux_resume_one_lwp): Reimplement as wrapper around
7216 linux_resume_one_lwp_throw that swallows errors if the LWP is
7217 gone.
7218
91baf43f
PA
72192015-03-19 Pedro Alves <palves@redhat.com>
7220
7221 * linux-low.c (count_events_callback, select_event_lwp_callback):
7222 No longer check whether the thread has resume_stop as last resume
7223 kind.
7224
8bf3b159
PA
72252015-03-19 Pedro Alves <palves@redhat.com>
7226
7227 * linux-low.c (count_events_callback, select_event_lwp_callback):
7228 Use the lwp's status_pending_p field, not the thread's.
7229
b90fc188
PA
72302015-03-19 Pedro Alves <palves@redhat.com>
7231
7232 * linux-low.c (select_event_lwp_callback): Update comments to
7233 no longer mention SIGTRAP.
7234
464b0089
GB
72352015-03-18 Gary Benson <gbenson@redhat.com>
7236
7237 * server.c (handle_query): Do not report vFile:fstat as supported.
7238
aa9e327f
GB
72392015-03-11 Gary Benson <gbenson@redhat.com>
7240
7241 * hostio.c (sys/types.h): New include.
7242 (sys/stat.h): Likewise.
7243 (common-remote-fileio.h): Likewise.
7244 (handle_fstat): New function.
7245 (handle_vFile): Handle vFile:fstat packets.
aa9e327f 7246
791c0056
GB
72472015-03-11 Gary Benson <gbenson@redhat.com>
7248
7249 * configure.ac (AC_CHECK_MEMBERS): Add checks for
7250 struct stat.st_blocks and struct stat.st_blksize.
7251 * configure: Regenerate.
7252 * config.in: Likewise.
7253 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
7254 (OBS): Add common-remote-fileio.o.
7255 (common-remote-fileio.o): New rule.
7256
9a9df970
PA
72572015-03-09 Pedro Alves <palves@redhat.com>
7258
7259 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
7260 'struct sockaddr' pointer in 'accept' call.
7261
9eb1356e
PA
72622015-03-09 Pedro Alves <palves@redhat.com>
7263
7264 Revert:
7265 2015-03-07 Pedro Alves <palves@redhat.com>
7266 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
7267 or <winsock2.h> here. Instead include "gdb_socket.h".
7268 (remote_open): Use union gdb_sockaddr_u.
7269 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
7270 or <winsock2.h> here. Instead include "gdb_socket.h".
7271 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
7272 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
7273 or <sys/un.h>.
7274 (init_named_socket, gdb_agent_helper_thread): Use union
7275 gdb_sockaddr_u.
7276
aac331e4
PA
72772015-03-07 Pedro Alves <palves@redhat.com>
7278
7279 * configure.ac (build_warnings): Move
7280 -Wdeclaration-after-statement to the C-specific set.
7281 * configure: Regenerate.
7282
366c75fc
PA
72832015-03-07 Pedro Alves <palves@redhat.com>
7284
7285 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
7286 or <winsock2.h> here. Instead include "gdb_socket.h".
7287 (remote_open): Use union gdb_sockaddr_u.
7288 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
7289 or <winsock2.h> here. Instead include "gdb_socket.h".
7290 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
7291 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
7292 or <sys/un.h>.
7293 (init_named_socket, gdb_agent_helper_thread): Use union
7294 gdb_sockaddr_u.
7295
492d29ea
PA
72962015-03-07 Pedro Alves <palves@redhat.com>
7297
7298 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
7299 instead.
7300
60a191ed
YQ
73012015-03-06 Yao Qi <yao.qi@linaro.org>
7302
7303 * linux-aarch64-low.c (aarch64_insert_point): Use
7304 show_debug_regs as a boolean.
7305 (aarch64_remove_point): Likewise.
7306
f5771b1d
PA
73072015-03-05 Pedro Alves <palves@redhat.com>
7308
7309 * lynx-low.c (lynx_target_ops): Install NULL hooks for
7310 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
7311 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
7312 * nto-low.c (nto_target_ops): Likewise.
7313 * spu-low.c (spu_target_ops): Likewise.
7314 * win32-low.c (win32_target_ops): Likewise.
7315
3e572f71
PA
73162015-03-04 Pedro Alves <palves@redhat.com>
7317
72f4393d 7318 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
3e572f71
PA
7319 Decide whether a breakpoint triggered based on the SIGTRAP's
7320 siginfo.si_code.
72f4393d
L
7321 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
7322 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
3e572f71
PA
7323 (linux_low_filter_event): Check for breakpoints before checking
7324 watchpoints.
7325 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
7326 siginfo.si_code.
72f4393d
L
7327 (linux_stopped_by_sw_breakpoint)
7328 (linux_supports_stopped_by_sw_breakpoint)
7329 (linux_stopped_by_hw_breakpoint)
7330 (linux_supports_stopped_by_hw_breakpoint): New functions.
7331 (linux_target_ops): Install new target methods.
3e572f71 7332
1ec68e26
PA
73332015-03-04 Pedro Alves <palves@redhat.com>
7334
7335 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
7336 * server.c (swbreak_feature, hwbreak_feature): New globals.
7337 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
7338 (captured_main): Clear swbreak_feature and hwbreak_feature.
7339 * server.h (swbreak_feature, hwbreak_feature): Declare.
7340 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
7341 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
7342 supports_stopped_by_hw_breakpoint>: New fields.
7343 (target_supports_stopped_by_sw_breakpoint)
7344 (target_stopped_by_sw_breakpoint)
7345 (target_supports_stopped_by_hw_breakpoint)
7346 (target_stopped_by_hw_breakpoint): Declare.
7347
15c66dd6
PA
73482015-03-04 Pedro Alves <palves@redhat.com>
7349
7350 enum lwp_stop_reason -> enum target_stop_reason
7351 * linux-low.c (check_stopped_by_breakpoint): Adjust.
7352 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
7353 (linux_wait_1, stuck_in_jump_pad_callback)
7354 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
7355 (linux_stopped_by_watchpoint):
7356 * linux-low.h (enum lwp_stop_reason): Delete.
7357 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
7358 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
7359
98fc70d6
YQ
73602015-03-04 Yao Qi <yao.qi@linaro.org>
7361
7362 * Makefile.in (SFILES): Add linux-aarch64-low.c.
7363
dd2ac174
GB
73642015-03-03 Gary Benson <gbenson@redhat.com>
7365
7366 * hostio.c (handle_vFile): Fix prefix lengths.
7367
d68e53f4
MM
73682015-03-03 Markus Metzger <markus.t.metzger@intel.com>
7369
7370 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
7371 ptr_bits.
7372
bf2d68ab
AA
73732015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
7374
7375 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
7376 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
7377 (clean): Add "rm -f" for above C files.
7378 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
7379 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
7380 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
7381 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
7382 * linux-s390-low.c (HWCAP_S390_VX): New macro.
7383 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
7384 (init_registers_s390x_vx_linux64)
7385 (init_registers_s390x_tevx_linux64)
7386 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
7387 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
7388 declarations.
7389 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
7390 (s390_store_vxrs_high): New functions.
7391 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
7392 NT_S390_VXRS_HIGH.
7393 (s390_arch_setup): Add logic for selecting one of the new target
7394 descriptions. Activate the new vector regsets if applicable.
7395 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
7396 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
7397 and init_registers_s390x_tevx_linux64.
7398
c966a859
PA
73992015-03-01 Pedro Alves <palves@redhat.com>
7400
7401 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
7402 parameter.
7403
4180215b
PA
74042015-02-27 Pedro Alves <palves@redhat.com>
7405
7406 * linux-x86-low.c (u_debugreg_offset): New function.
7407 (x86_linux_dr_get, x86_linux_dr_set): Use it.
7408
749bab01
PA
74092015-02-27 Pedro Alves <palves@redhat.com>
7410
7411 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
7412 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
7413 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
7414 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
7415 (ps_lsetfpregs, ps_getpid)
7416 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
7417 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
7418 (ps_lsetxregs, ps_plog): Declare.
7419
3c14e5a3
PA
74202015-02-27 Pedro Alves <palves@redhat.com>
7421
7422 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
7423 IP_AGENT_EXPORT_FUNC.
7424 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
7425 IP_AGENT_EXPORT_FUNC.
7426 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
7427 (IP_AGENT_EXPORT): Delete.
7428 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
7429 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
7430 (gdb_trampoline_buffer_error, collecting, gdb_collect)
7431 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
7432 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
7433 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
7434 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
7435 (traceframe_read_count, traceframe_write_count)
7436 (traceframes_created, trace_state_variables, get_raw_reg)
7437 (get_trace_state_variable_value, set_trace_state_variable_value)
7438 (ust_loaded, helper_thread_id, cmd_buf): Use
7439 IPA_SYM_EXPORTED_NAME.
7440 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
7441 (tracepoints) Use IP_AGENT_EXPORT_VAR.
7442 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
7443 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
7444 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
7445 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
7446 EXTERN_C_PUSH/EXTERN_C_POP.
7447 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
7448 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
7449 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
7450 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
7451 (traceframe_write_count, traceframe_read_count)
7452 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
7453 (about_to_request_buffer_space, get_trace_state_variable_value)
7454 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
7455 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
7456 EXTERN_C_PUSH/EXTERN_C_POP.
7457 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
7458 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
7459 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
7460 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
7461 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
7462 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
7463 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
7464 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
7465 Define.
7466 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
7467 (IP_AGENT_EXPORT_VAR_DECL): Define.
7468 (tracing): Declare.
7469 (gdb_agent_get_raw_reg): Declare.
7470
fe978cb0
PA
74712015-02-27 Tom Tromey <tromey@redhat.com>
7472 Pedro Alves <palves@redhat.com>
7473
7474 Rename symbols whose names are reserved C++ keywords throughout.
7475
3bc3d82a
PA
74762015-02-27 Pedro Alves <palves@redhat.com>
7477
7478 * Makefile.in (COMPILER): New, get it from autoconf.
7479 (CXX): Get from autoconf instead.
7480 (COMPILE.pre): Use COMPILER.
7481 (CC-LD): Rename to ...
7482 (CC_LD): ... this. Use COMPILER.
7483 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
7484 (CXX_FOR_TARGET): Default to g++ instead of gcc.
7485 * acinclude.m4: Include build-with-cxx.m4.
7486 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
7487 Disable -Werror by default if building in C++ mode.
7488 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
7489 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
7490 the C++ compiler. Save/restore CXXFLAGS too.
7491 * configure: Regenerate.
7492
07697489
PA
74932015-02-27 Pedro Alves <palves@redhat.com>
7494
7495 * acinclude.m4: Include libiberty.m4.
7496 * configure.ac: Call libiberty_INIT.
7497 * config.in, configure: Regenerate.
7498
9beb7c4e
PA
74992015-02-26 Pedro Alves <palves@redhat.com>
7500
7501 * linux-low.c (linux_wait_1): When incrementing the PC past a
7502 program breakpoint always use the_low_target.breakpoint_len as
7503 increment, rather than the maximum between that and
7504 the_low_target.decr_pc_after_break.
7505
8090aef2
PA
75062015-02-23 Pedro Alves <palves@redhat.com>
7507
7508 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
7509 thread was doing a step-over; always adjust the PC if
7510 we stepped over a permanent breakpoint.
7511 (linux_wait_1): If we stepped over breakpoint that was on top of a
7512 permanent breakpoint, manually advance the PC past it.
7513
bc9540e8
PA
75142015-02-23 Pedro Alves <palves@redhat.com>
7515
7516 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
7517 modes.
7518 (x86_fill_gregset, x86_store_gregset): Use it when handling
7519 $orig_eax.
7520
2db9a427
PA
75212015-02-20 Pedro Alves <palves@redhat.com>
7522
7523 * thread-db.c: Include "nat/linux-procfs.h".
7524 (thread_db_init): Skip listing new threads if the kernel supports
7525 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
7526
afa8d396
PA
75272015-02-20 Pedro Alves <palves@redhat.com>
7528
7529 * linux-low.c (status_pending_p_callback): Use ptid_match.
7530
c9587f88
AT
75312015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
7532
7533 PR breakpoints/16812
7534 * linux-low.c (wstatus_maybe_breakpoint): Remove.
7535 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
7536 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
7537
b05ec7a5
AT
75382015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
7539
7540 PR breakpoints/15956
7541 * tracepoint.c (cmd_qtinit): Add check for current_thread.
7542
d33501a5
MM
75432015-02-09 Markus Metzger <markus.t.metzger@intel.com>
7544
7545 * linux-low.c (linux_low_btrace_conf): Print size.
7546 * server.c (handle_btrace_conf_general_set): New.
7547 (hanle_general_set): Call handle_btrace_conf_general_set.
7548 (handle_query): Report Qbtrace-conf:bts:size as supported.
7549
f4abbc16
MM
75502015-02-09 Markus Metzger <markus.t.metzger@intel.com>
7551
7552 * linux-low.c (linux_low_enable_btrace): Update parameters.
7553 (linux_low_btrace_conf): New.
7554 (linux_target_ops)<to_btrace_conf>: Initialize.
7555 * server.c (current_btrace_conf): New.
7556 (handle_btrace_enable): Rename to ...
7557 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
7558 to target_enable_btrace. Update comment. Update users.
7559 (handle_qxfer_btrace_conf): New.
7560 (qxfer_packets): Add btrace-conf entry.
7561 (handle_query): Report qXfer:btrace-conf:read as supported packet.
7562 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
7563 (target_ops)<read_btrace_conf>: New.
7564 (target_enable_btrace): Update parameters.
7565 (target_read_btrace_conf): New.
7566
043c3577
MM
75672015-02-09 Markus Metzger <markus.t.metzger@intel.com>
7568
7569 * server.c (handle_btrace_general_set): Remove call to
7570 target_supports_btrace.
7571 (supported_btrace_packets): New.
7572 (handle_query): Call supported_btrace_packets.
7573 * target.h: include btrace-common.h.
7574 (btrace_target_info): Removed.
7575 (supports_btrace, target_supports_btrace): Update parameters.
7576
734b0e4b
MM
75772015-02-09 Markus Metzger <markus.t.metzger@intel.com>
7578
7579 * Makefile.in (SFILES): Add common/btrace-common.c.
7580 (OBS): Add common/btrace-common.o.
7581 (btrace-common.o): Add build rules.
7582 * linux-low: Include btrace-common.h.
7583 (linux_low_read_btrace): Use struct btrace_data. Call
7584 btrace_data_init and btrace_data_fini.
7585
d6c146e9
PA
75862015-02-06 Pedro Alves <palves@redhat.com>
7587
7588 * thread-db.c (find_new_threads_callback): Add debug output.
7589
20ba1ce6
PA
75902015-02-04 Pedro Alves <palves@redhat.com>
7591
7592 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
7593 (resume_stopped_resumed_lwps): New function.
7594 (linux_wait_for_event_filtered): Use it.
7595
8cc73a39
SDJ
75962015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
7597
7598 * Makefile.in (SFILES): Add linux-personality.c.
7599 (linux-personality.o): New rule.
7600 * configure.srv (srv_linux_obj): Add linux-personality.o to the
7601 list of objects to be built.
7602 * linux-low.c: Include nat/linux-personality.h.
7603 (linux_create_inferior): Remove code to disable address space
7604 randomization (moved to ../nat/linux-personality.c). Create
7605 cleanup to disable address space randomization.
7606
fb23d554
SDJ
76072015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
7608
7609 * Makefile.in (posix-strerror.o): New rule.
7610 (mingw-strerror.o): Likewise.
7611 * configure: Regenerated.
7612 * configure.ac: Source file ../common/common.host. Initialize new
7613 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
7614
cdf43629
YQ
76152015-01-14 Yao Qi <yao@codesourcery.com>
7616
7617 * Makefile.in (SFILES): Add nat/ppc-linux.c.
7618 (ppc-linux.o): New rule.
7619 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
7620 * configure.ac: AC_CHECK_FUNCS(getauxval).
7621 * config.in: Re-generated.
7622 * configure: Re-generated.
7623 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
7624 ppc64_64bit_inferior_p
7625
514c5338
YQ
76262015-01-14 Yao Qi <yao@codesourcery.com>
7627
7628 * linux-ppc-low.c: Include "nat/ppc-linux.h".
7629 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
7630 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
7631 (PT_ORIG_R3, PT_TRAP): Likewise.
7632 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
7633 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
7634 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
7635
3368c1e5
JB
76362015-01-10 Joel Brobecker <brobecker@adacore.com>
7637
7638 * i387-fp.c (i387_cache_to_xsave): In look over
7639 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
7640 zmmh_low_space field by use of zmmh_high_space.
7641
582511be
PA
76422015-01-09 Pedro Alves <palves@redhat.com>
7643
7644 * linux-low.c (step_over_bkpt): Move higher up in the file.
7645 (handle_extended_wait): Don't store the stop_pc here.
7646 (get_stop_pc): Adjust comments and rename to ...
7647 (check_stopped_by_breakpoint): ... this. Record whether the LWP
7648 stopped for a software breakpoint or hardware breakpoint.
7649 (thread_still_has_status_pending_p): New function.
7650 (status_pending_p_callback): Use
7651 thread_still_has_status_pending_p. If the event is no longer
7652 interesting, resume the LWP.
7653 (handle_tracepoints): Add assert.
7654 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
7655 (wstatus_maybe_breakpoint): New function.
7656 (cancel_breakpoint): Delete function.
7657 (check_stopped_by_watchpoint): New function, factored out from
7658 linux_low_filter_event.
7659 (lp_status_maybe_breakpoint): Delete function.
7660 (linux_low_filter_event): Remove filter_ptid argument.
7661 Leave thread group exits pending here. Store the LWP's stop PC.
7662 Always leave events pending.
7663 (linux_wait_for_event_filtered): Pull all events out of the
7664 kernel, and leave them all pending.
7665 (count_events_callback, select_event_lwp_callback): Consider all
7666 events.
7667 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
7668 (select_event_lwp): Only give preference to the stepping LWP in
7669 all-stop mode. Adjust comments.
7670 (ignore_event): New function.
7671 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
7672 references to cancel_breakpoints. Adjust to renames. Also give
7673 equal priority to all LWPs that have had events in non-stop mode.
7674 If reporting a software breakpoint event, unadjust the LWP's PC.
7675 (linux_wait): If linux_wait_1 returned an ignored event, retry.
7676 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
7677 Adjust.
7678 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
7679 (resume_status_pending_p): Use thread_still_has_status_pending_p.
7680 (linux_stopped_by_watchpoint): Adjust.
7681 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
7682 * linux-low.h (enum lwp_stop_reason): New.
7683 (struct lwp_info) <stop_pc>: Adjust comment.
7684 <stopped_by_watchpoint>: Delete field.
7685 <stop_reason>: New field.
7686 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
7687 * mem-break.c (software_breakpoint_inserted_here)
7688 (hardware_breakpoint_inserted_here): New function.
7689 * mem-break.h (software_breakpoint_inserted_here)
7690 (hardware_breakpoint_inserted_here): Declare.
7691 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
7692 (cancel_breakpoints): Delete.
7693 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
7694 (upload_fast_traceframes): Remove references to
7695 cancel_breakpoints.
7696
a33e3959
PA
76972015-01-09 Pedro Alves <palves@redhat.com>
7698
7699 * thread-db.c (find_new_threads_callback): Ignore thread if the
7700 kernel thread ID is -1.
7701
8784d563
PA
77022015-01-09 Pedro Alves <palves@redhat.com>
7703
7704 * linux-low.c (linux_attach_fail_reason_string): Move to
7705 nat/linux-ptrace.c, and rename.
7706 (linux_attach_lwp): Update comment.
7707 (attach_proc_task_lwp_callback): New function.
7708 (linux_attach): Adjust to rename and use
7709 linux_proc_attach_tgid_threads.
7710 (linux_attach_fail_reason_string): Delete declaration.
7711
76f2b779
JB
77122015-01-01 Joel Brobecker <brobecker@adacore.com>
7713
7714 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
7715 * server.c (gdbserver_version): Likewise.
7716
fafcc06a
SDJ
77172014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
7718
7719 * remote-utils.c: Include ctype.h.
7720 (input_interrupt): Explicitly handle the case when the char
7721 received is the NUL byte. Improve the printing of non-ASCII
7722 characters.
7723
beed38b8
JB
77242014-12-16 Joel Brobecker <brobecker@adacore.com>
7725
7726 * linux-low.c (linux_low_filter_event): Update call to
7727 linux_enable_event_reporting following the addition of
7728 a new parameter to that function.
7729
bf330350
CU
77302014-12-16 Catalin Udma <catalin.udma@freescale.com>
7731
7732 PR server/17457
7733 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
7734 (AARCH64_FPCR_REGNO): Likewise.
7735 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
7736 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
7737 (aarch64_store_fpregset): Likewise.
7738
5227d625
JB
77392014-12-15 Joel Brobecker <brobecker@adacore.com>
7740
7741 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
7742 Remove FIXME comment about assumption about N.
7743
f93b65a0
JB
77442014-12-13 Joel Brobecker <brobecker@adacore.com>
7745
7746 * configure.ac: If large-file support is disabled in GDBserver,
7747 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
7748 * configure: Regenerate.
7749
e5a9158d
AA
77502014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7751
7752 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
7753 warning upon ENODATA from ptrace.
7754 * linux-s390-low.c (s390_store_tdb): New.
7755 (s390_regsets): Add regset for NT_S390_TDB.
7756
feea5f36
AA
77572014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7758
7759 * linux-low.c (regsets_store_inferior_registers): Skip regsets
7760 without a fill_function.
7761 * linux-s390-low.c (s390_fill_last_break): Remove.
7762 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
7763 (s390_arch_setup): Use regset's size instead of fill_function for
7764 loop end condition.
7765
098dbe61
AA
77662014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7767
7768 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
7769 the regset's store function when ptrace returned an error.
7770 * regcache.c (get_thread_regcache): Invalidate register cache
7771 before fetching inferior's registers.
7772
28eef672
AA
77732014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7774
7775 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
7776 while-loop as for-loop.
7777 (regsets_store_inferior_registers): Likewise.
7778
bdca27a2
YQ
77792014-11-28 Yao Qi <yao@codesourcery.com>
7780
7781 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
7782 * config.in, configure: Re-generate.
7783 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
7784 is defined.
7785
9c232dda
YQ
77862014-11-21 Yao Qi <yao@codesourcery.com>
7787
7788 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
7789 (AC_CHECK_HEADERS): Remove malloc.h.
7790 * configure: Re-generated.
7791 * config.in: Re-generated.
7792 * server.h: Don't include alloca.h and malloc.h.
7793 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
7794 Don't include malloc.h.
7795
43968415
JB
77962014-11-17 Joel Brobecker <brobecker@adacore.com>
7797
7798 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
7799 corresponding ERRNO check in same block.
7800
40e91bc7
PA
78012014-11-12 Pedro Alves <palves@redhat.com>
7802
7803 * server.c (cont_thread): Update comment.
7804 (start_inferior, attach_inferior): No longer clear cont_thread.
7805 (handle_v_cont): No longer set cont_thread.
7806 (captured_main): Clear cont_thread each time a GDB connects.
7807
c2c118cf
PA
78082014-11-12 Pedro Alves <palves@redhat.com>
7809
7810 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
7811 thread, and don't resume all threads if the Hc thread has exited.
7812
78708b7c
PA
78132014-11-12 Pedro Alves <palves@redhat.com>
7814
7815 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
7816 the process group instead of to a specific LWP.
7817
a2abc7de
PA
78182014-10-15 Pedro Alves <palves@redhat.com>
7819
7820 PR server/17487
7821 * win32-arm-low.c (arm_set_thread_context): Remove current_event
7822 parameter.
7823 (arm_set_thread_context): Delete.
7824 (the_low_target): Adjust.
7825 * win32-i386-low.c (debug_registers_changed)
7826 (debug_registers_used): Delete.
7827 (update_debug_registers_callback): New function.
7828 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
7829 needing to update their debug registers.
7830 (win32_get_current_dr): New function.
7831 (x86_dr_low_get_addr, x86_dr_low_get_control)
7832 (x86_dr_low_get_status): Fetch the debug register from the thread
7833 record's context.
7834 (i386_initial_stuff): Adjust.
7835 (i386_get_thread_context): Remove current_event parameter. Don't
7836 clear debug_registers_changed nor copy DR values to
7837 debug_reg_state.
7838 (i386_set_thread_context): Delete.
7839 (i386_prepare_to_resume): New function.
7840 (i386_thread_added): Mark the thread as needing to update irs
7841 debug registers.
7842 (the_low_target): Remove i386_set_thread_context and install
7843 i386_prepare_to_resume.
7844 * win32-low.c (win32_get_thread_context): Adjust.
7845 (win32_set_thread_context): Use SetThreadContext
7846 directly.
7847 (win32_prepare_to_resume): New function.
7848 (win32_require_context): New function, factored out from ...
7849 (thread_rec): ... this.
7850 (continue_one_thread): Call win32_prepare_to_resume on each thread
7851 we're about to continue.
7852 (win32_resume): Call win32_prepare_to_resume on the event thread.
7853 * win32-low.h (struct win32_thread_info)
7854 <debug_registers_changed>: New field.
7855 (struct win32_target_ops): Change prototype of set_thread_context,
7856 delete set_thread_context and add prepare_to_resume.
7857 (win32_require_context): New declaration.
7858
a442d071
GB
78592014-10-08 Gary Benson <gbenson@redhat.com>
7860
7861 * server.h: Do not include common-exceptions.h.
7862
6f1947e8
GB
78632014-10-08 Gary Benson <gbenson@redhat.com>
7864
7865 * server.h: Do not include cleanups.h.
7866
63b434a4
JH
78672014-09-30 James Hogan <james.hogan@imgtec.com>
7868
7869 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
7870 mips64-dsp-linux.c.
7871
c4d9ceb6
YQ
78722014-09-23 Yao Qi <yao@codesourcery.com>
7873
7874 * linux-low.c (lp_status_maybe_breakpoint): New function.
7875 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
7876 (count_events_callback): Likewise.
7877 (select_event_lwp_callback): Likewise.
7878 (cancel_breakpoints_callback): Likewise.
7879
89a5711c
DB
78802014-09-19 Don Breazeal <donb@codesourcery.com>
7881
7882 * linux-low.c (handle_extended_wait): Call
7883 linux_ptrace_get_extended_event.
7884 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
7885 linux_is_extended_waitstatus.
7886
bffc0964
JB
78872014-09-16 Joel Brobecker <brobecker@adacore.com>
7888
7889 * Makefile.in (CPPFLAGS): Define.
7890 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
7891 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
7892
0bfdf32f
GB
78932014-09-16 Gary Benson <gbenson@redhat.com>
7894
7895 * inferiors.h (current_inferior): Renamed as...
7896 (current_thread): New variable. All uses updated.
7897 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
7898 (maybe_move_out_of_jump_pad): Likewise.
7899 (cancel_breakpoint): Likewise.
7900 (linux_low_filter_event): Likewise.
7901 (wait_for_sigstop): Likewise.
7902 (linux_resume_one_lwp): Likewise.
7903 (need_step_over_p): Likewise.
7904 (start_step_over): Likewise.
7905 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
7906 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
7907 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
7908 and save_inferior as saved_thread.
7909 * regcache.c (get_thread_regcache): Renamed saved_inferior as
7910 saved_thread.
7911 (regcache_invalidate_thread): Likewise.
7912 * remote-utils.c (prepare_resume_reply): Likewise.
7913 * thread-db.c (thread_db_get_tls_address): Likewise.
7914 (disable_thread_event_reporting): Likewise.
7915 (remove_thread_event_breakpoints): Likewise.
7916 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
7917 as saved_thread.
7918 * target.h (set_desired_inferior): Renamed as...
7919 (set_desired_thread): New declaration. All uses updated.
7920 * server.c (myresume): Updated comment to reference thread instead
7921 of inferior.
7922 (handle_serial_event): Likewise.
7923 (handle_target_event): Likewise.
7924
361c8ade
GB
79252014-09-12 Tom Tromey <tromey@redhat.com>
7926 Gary Benson <gbenson@redhat.com>
7927
7928 * regcache.h: Include common-regcache.h.
7929 (regcache_read_pc): Don't declare.
7930 * regcache.c (get_thread_regcache_for_ptid): New function.
7931
bd9269f7
GB
79322014-09-11 Tom Tromey <tromey@redhat.com>
7933 Gary Benson <gbenson@redhat.com>
7934
7935 * symbol.c: New file.
7936 * Makefile.in (SFILES): Add symbol.c.
7937 (OBS): Add symbol.o.
7938
f8c1d06b
GB
79392014-09-11 Gary Benson <gbenson@redhat.com>
7940
7941 * target.c (target_stop_ptid, target_continue_ptid): New
7942 functions.
7943
721ec300
GB
79442014-09-11 Tom Tromey <tromey@redhat.com>
7945 Gary Benson <gbenson@redhat.com>
7946
7947 * target.h: Include target/target.h.
7948 * target.c (target_read_memory, target_read_uint32)
7949 (target_write_memory): New functions.
7950
c5e92cca
GB
79512014-09-11 Gary Benson <gbenson@redhat.com>
7952
7953 * server.h (debug_hw_points): Don't declare.
7954 * server.c (debug_hw_points): Don't define. Replace all uses
7955 with show_debug_regs.
7956 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
7957 all uses with show_debug_regs.
7958
2e4bb98a
EBM
79592014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
7960
7961 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
7962 endianness into account.
7963 (ppc_supply_ptrace_register): Likewise.
7964
ac740bc7
JH
79652014-09-03 James Hogan <james.hogan@imgtec.com>
7966
7967 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
7968 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
7969
97ea6506
GB
79702014-09-03 Gary Benson <gbenson@redhat.com>
7971
7972 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
7973 ALL_DEBUG_ADDRESS_REGISTERS.
7974
df7e5265
GB
79752014-09-02 Gary Benson <gbenson@redhat.com>
7976
7977 * i386-low.h: Renamed as...
7978 * x86-low.h: New file. All type, function and variable name
7979 prefixes changed from "i386_" to "x86_". All references updated.
7980 * i386-low.c: Renamed as...
7981 * x86-low.c: New file. All type, function and variable name
7982 prefixes changed from "i386_" to "x86_". All references updated.
7983
ed859da7
GB
79842014-09-02 Gary Benson <gbenson@redhat.com>
7985
7986 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
7987 (x86_linux_new_thread): Likewise.
7988
860789c7
GB
79892014-08-29 Gary Benson <gbenson@redhat.com>
7990
7991 * server.h (setjmp.h): Do not include.
7992 (toplevel): Do not declare.
7993 (common-exceptions.h): Include.
7994 (cleanups.h): Likewise.
7995 * server.c (toplevel): Do not define.
7996 (exit_code): New static global.
7997 (detach_or_kill_for_exit_cleanup): New function.
7998 (main): New function. Original main renamed to...
7999 (captured_main): New function.
8000 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
8001
ff55e1b5
GB
80022014-08-29 Gary Benson <gbenson@redhat.com>
8003
8004 * Makefile.in (SFILES): Add common/common-exceptions.c.
8005 (OBS): Add common-exceptions.o.
8006 (common-exceptions.o): New rule.
8007 * utils.c (prepare_to_throw_exception): New function.
8008
e9bcb658
GB
80092014-08-29 Gary Benson <gbenson@redhat.com>
8010
8011 * config.in: Regenerate.
8012 * configure: Likewise.
8013
e3180625
GB
80142014-08-29 Gary Benson <gbenson@redhat.com>
8015
8016 * Makefile.in (SFILES): Add common/cleanups.c.
8017 (OBS): cleanups.o.
8018 (cleanups.o): New rule.
8019
e3d6ba5d
GB
80202014-08-29 Gary Benson <gbenson@redhat.com>
8021
8022 * utils.c (internal_vwarning): New function.
8023
7096e886
GB
80242014-08-28 Gary Benson <gbenson@redhat.com>
8025
8026 * utils.h (fatal): Remove declaration.
8027 * utils.c (fatal): Remove function.
8028
14ce3192
GB
80292014-08-28 Gary Benson <gbenson@redhat.com>
8030
8031 * tracepoint.c (gdb_agent_init): Replace fatal with
8032 perror_with_name.
8033 (initialize_tracepoint): Likewise.
8034
50278d59
GB
80352014-08-28 Gary Benson <gbenson@redhat.com>
8036
8037 * remote-utils.c (remote_prepare): Replace fatal with error.
8038
aa96c426
GB
80392014-08-28 Gary Benson <gbenson@redhat.com>
8040
8041 * linux-low.c (linux_async): Replace fatal with warning.
8042 Tidy up and return.
8043 (linux_start_non_stop): Return -1 if linux_async failed.
8044
f7160e97
GB
80452014-08-28 Gary Benson <gbenson@redhat.com>
8046
8047 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
8048 gdb_assert.
8049 (i386_dr_low_get_addr): Remove vague comment.
8050 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
8051 gdb_assert.
8052
38e08fca
GB
80532014-08-28 Gary Benson <gbenson@redhat.com>
8054
8055 * inferiors.c (get_thread_process): Replace check with gdb_assert.
8056 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
8057 internal_error.
8058 (linux_resume_one_lwp): Likewise.
8059 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
8060 gdb_assert.
8061 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
8062 with internal_error.
8063 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
8064 (init_register_cache): Replace fatal with gdb_assert_not_reached.
8065 (find_register_by_name): Replace fatal with internal_error.
8066 (find_regno): Likewise.
8067 * tdesc.c (init_target_desc): Replace check with gdb_assert.
8068 * thread-db.c (thread_db_create_event): Likewise.
8069 (thread_db_load_search): Likewise.
8070 (try_thread_db_load_1): Likewise.
8071 * tracepoint.c (get_jump_space_head): Replace fatal with
8072 internal_error.
8073 (claim_trampoline_space): Likewise.
8074 (have_fast_tracepoint_trampoline_buffer): Likewise.
8075 (cmd_qtstart): Likewise.
8076 (stop_tracing): Likewise.
8077 (fast_tracepoint_collecting): Likewise.
8078 (target_malloc): Likewise.
8079 (download_tracepoint): Likewise.
8080 (download_trace_state_variables): Replace check with gdb_assert.
8081 (upload_fast_traceframes): Replace fatal with internal_error.
8082
34abf635
GB
80832014-08-19 Tom Tromey <tromey@redhat.com>
8084 Gary Benson <gbenson@redhat.com>
8085
8086 * Makefile.in (SFILES): Add common/common-debug.c.
8087 (OBS): Add common-debug.o.
8088 (common-debug.o): New rule.
8089 * debug.h (debug_printf): Don't declare.
8090 * debug.c (debug_printf): Renamed and rewritten as...
8091 (debug_vprintf): New function.
8092
f6e94d78
GB
80932014-08-19 Gary Benson <gbenson@redhat.com>
8094
8095 * utils.h: Do not include print-utils.h.
8096
9239eeab
GB
80972014-08-19 Tom Tromey <tromey@redhat.com>
8098 Gary Benson <gbenson@redhat.com>
8099
8100 * server.h: Add static assertion.
8101 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
8102
ef87c8bb
GB
81032014-08-19 Tom Tromey <tromey@redhat.com>
8104 Gary Benson <gbenson@redhat.com>
8105
8106 * Makefile.in (SFILES): Add common/errors.c.
8107 (OBS): Add errors.o.
8108 (IPA_OBS): Add errors-ipa.o.
8109 (errors.o): New rule.
8110 (errors-ipa.o): Likewise.
8111 * utils.h (perror_with_name, error, warning): Don't declare.
8112 * utils.c (warning): Renamed and rewritten as...
8113 (vwarning): New function.
8114 (error): Renamed and rewritten as...
8115 (verror): New function.
8116 (internal_error): Renamed and rewritten as...
8117 (internal_verror): New function.
8118
bb974a24
GB
81192014-08-07 Gary Benson <gbenson@redhat.com>
8120
8121 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
8122 * configure: Regenerate.
8123 * config.in: Likewise.
8124 * server.h: Do not include errno.h.
8125 * event-loop.c: Likewise.
8126 * hostio-errno.c: Likewise.
8127 * linux-low.c: Likewise.
8128 * remote-utils.c: Likewise.
8129 * spu-low.c: Likewise.
8130 * utils.c: Likewise.
8131 * gdbreplay.c: Unconditionally include errno.h.
8132
6d3d12eb
GB
81332014-08-07 Gary Benson <gbenson@redhat.com>
8134
8135 * server.h: Do not include string.h.
8136 * event-loop.c: Likewise.
8137 * linux-low.c: Likewise.
8138 * regcache.c: Likewise.
8139 * remote-utils.c: Likewise.
8140 * spu-low.c: Likewise.
8141 * utils.c: Likewise.
8142
dccbb609
GB
81432014-08-07 Gary Benson <gbenson@redhat.com>
8144
8145 * server.h: Do not include gdb_assert.h.
8146
e76df0d0
GB
81472014-08-07 Gary Benson <gbenson@redhat.com>
8148
8149 * server.h: Do not include common-utils.h.
8150
4cb9c816
GB
81512014-08-07 Gary Benson <gbenson@redhat.com>
8152
8153 * server.h: Do not include ptid.h.
8154 * notif.h: Likewise.
8155
3995eeee
GB
81562014-08-07 Gary Benson <gbenson@redhat.com>
8157
8158 * server.h: Do not include gdb_locale.h.
8159
cb9f1a9b
GB
81602014-08-07 Gary Benson <gbenson@redhat.com>
8161
8162 * server.h: Do not include gdb/signals.h.
8163 * win32-low.c: Likewise.
8164
a5fceff8
GB
81652014-08-07 Gary Benson <gbenson@redhat.com>
8166
8167 * server.h: Do not include pathmax.h.
8168
b9391142
GB
81692014-08-07 Gary Benson <gbenson@redhat.com>
8170
8171 * server.h: Do not include libiberty.h.
8172 * linux-bfin-low.c: Likewise.
8173
0e443c87
GB
81742014-08-07 Gary Benson <gbenson@redhat.com>
8175
8176 * server.h: Do not include ansidecl.h.
8177
8ebb3f56
GB
81782014-08-07 Gary Benson <gbenson@redhat.com>
8179
8180 * linux-x86-low.c: Do not include stddef.h.
8181 * lynx-ppc-low.c: Likewise.
8182 * tracepoint.c: Likewise.
8183
8980bdf6
GB
81842014-08-07 Gary Benson <gbenson@redhat.com>
8185
8186 * server.h: Do not include stdarg.h.
8187 * nto-low.c: Likewise.
8188
d7096f71
GB
81892014-08-07 Gary Benson <gbenson@redhat.com>
8190
8191 * server.h: Do not include stdlib.h.
8192 * inferiors.c: Likewise.
8193 * linux-low.c: Likewise.
8194 * regcache.c: Likewise.
8195 * spu-low.c: Likewise.
8196 * tracepoint.c: Likewise.
8197 * utils.c: Likewise.
8198
d02f550d
GB
81992014-08-07 Gary Benson <gbenson@redhat.com>
8200
8201 * server.h: Do not include stdio.h.
8202 * linux-low.c: Likewise.
8203 * remote-utils.c: Likewise.
8204 * spu-low.c: Likewise.
8205 * utils.c: Likewise.
8206 * wincecompat.c: Likewise.
8207
87f6c4e3
GB
82082014-08-06 Gary Benson <gbenson@redhat.com>
8209
8210 * regcache.c (init_register_cache): Move conditionals inside if.
8211
7089dca4
GB
82122014-08-06 Gary Benson <gbenson@redhat.com>
8213
8214 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
8215
462f517e
GB
82162014-07-31 Gary Benson <gbenson@redhat.com>
8217
8218 * ax.h: Do not include server.h.
8219 * gdbthread.h: Likewise.
8220 * lynx-low.h: Likewise.
8221 * notif.h: Likewise.
8222
976411d6
GB
82232014-07-30 Gary Benson <gbenson@redhat.com>
8224
8225 * server.h: Include common-defs.h.
8226 Do not include config.h or build-gnulib-gdbserver/config.h.
8227
d41f6d8e
GB
82282014-07-30 Gary Benson <gbenson@redhat.com>
8229
8230 * hostio-errno.c: Move server.h to top of includes list.
8231 * inferiors.c: Likewise.
8232 * linux-x86-low.c: Likewise.
8233 * notif.c: Include server.h.
8234
314c6a35
TT
82352014-07-24 Tom Tromey <tromey@redhat.com>
8236 Gary Benson <gbenson@redhat.com>
8237
8238 * server.h (CORE_ADDR): Now unsigned.
8239
69ff6be5
PA
82402014-07-16 Pedro Alves <palves@redhat.com>
8241
8242 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
8243
ce9e3fe7
PA
82442014-07-15 Pedro Alves <palves@redhat.com>
8245
8246 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
8247 copy.
8248
e76126e8
PA
82492014-07-11 Pedro Alves <palves@redhat.com>
8250
8251 * linux-low.c (kill_wait_lwp): New function, based on
8252 kill_one_lwp_callback, but use my_waitpid directly.
8253 (kill_one_lwp_callback, linux_kill): Use it.
8254
8e9db26e
PA
82552014-06-23 Pedro Alves <palves@redhat.com>
8256
8257 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
8258 before setting DR0..DR3.
8259
698b3e08
GB
82602014-06-20 Gary Benson <gbenson@redhat.com>
8261
8262 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
8263 * configure: Regenerated.
8264 * config.in: Likewise.
8265
125f8a3d
GB
82662014-06-20 Gary Benson <gbenson@redhat.com>
8267
8268 * Makefile.in (SFILES): Update locations for files moved
8269 from common to nat.
8270 (object file files): Reordered.
8271
42995dbd
GB
82722014-06-20 Gary Benson <gbenson@redhat.com>
8273
8274 * i386-low.h (i386_dr_low_can_set_addr): Removed.
8275 (i386_dr_low_set_addr): Likewise.
8276 (i386_dr_low_get_addr): Likewise.
8277 (i386_dr_low_can_set_control): Likewise.
8278 (i386_dr_low_set_control): Likewise.
8279 (i386_dr_low_get_control): Likewise.
8280 (i386_dr_low_get_status): Likewise.
8281 (i386_get_debug_register_length): Likewise.
8282 * linux-x86-low.c (i386_dr_low_set_addr):
8283 Changed signature. Made static.
8284 (i386_dr_low_get_addr): Likewise.
8285 (i386_dr_low_set_control): Likewise.
8286 (i386_dr_low_get_control): Likewise.
8287 (i386_dr_low_get_status): Likewise.
8288 (i386_dr_low): New global variable.
8289 * win32-i386-low.c (i386_dr_low_set_addr):
8290 Changed signature. Made static.
8291 (i386_dr_low_get_addr): Likewise.
8292 (i386_dr_low_set_control): Likewise.
8293 (i386_dr_low_get_control): Likewise.
8294 (i386_dr_low_get_status): Likewise.
8295 (i386_dr_low): New global variable.
8296
e1d2394b
MS
82972014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
8298
8299 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
8300 * Makefile.in (AR, AR_FLAGS): Define.
8301 * configure: Regenerate.
8302
3a8ee006
GB
83032014-06-19 Gary Benson <gbenson@redhat.com>
8304
8305 * Makefile.in (i386-dregs.o): New rule.
8306 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
8307 * i386-low.c (target.h): Remove include.
8308 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
8309 (DR_CONTROL_SHIFT): Likewise.
8310 (DR_CONTROL_SIZE): Likewise.
8311 (DR_RW_EXECUTE): Likewise.
8312 (DR_RW_WRITE): Likewise.
8313 (DR_RW_READ): Likewise.
8314 (DR_RW_IORW): Likewise.
8315 (DR_LEN_1): Likewise.
8316 (DR_LEN_2): Likewise.
8317 (DR_LEN_4): Likewise.
8318 (DR_LEN_8): Likewise.
8319 (DR_LOCAL_ENABLE_SHIFT): Likewise.
8320 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
8321 (DR_ENABLE_SIZE): Likewise.
8322 (DR_LOCAL_SLOWDOWN): Likewise.
8323 (DR_GLOBAL_SLOWDOWN): Likewise.
8324 (DR_CONTROL_RESERVED): Likewise.
8325 (I386_DR_CONTROL_MASK): Likewise.
8326 (I386_DR_VACANT): Likewise.
8327 (I386_DR_LOCAL_ENABLE): Likewise.
8328 (I386_DR_GLOBAL_ENABLE): Likewise.
8329 (I386_DR_DISABLE): Likewise.
8330 (I386_DR_SET_RW_LEN): Likewise.
8331 (I386_DR_GET_RW_LEN): Likewise.
8332 (I386_DR_WATCH_HIT): Likewise.
8333 (i386_wp_op_t): Likewise.
8334 (i386_show_dr): Likewise.
8335 (i386_length_and_rw_bits): Likewise.
8336 (i386_insert_aligned_watchpoint): Likewise.
8337 (i386_remove_aligned_watchpoint): Likewise.
8338 (i386_handle_nonaligned_watchpoint): Likewise.
8339 i386_update_inferior_debug_regs(): Likewise.
8340 (i386_dr_insert_watchpoint): Likewise.
8341 (i386_dr_remove_watchpoint): Likewise.
8342 (i386_dr_region_ok_for_watchpoint): Likewise.
8343 (i386_dr_stopped_data_address): Likewise.
8344 (i386_dr_stopped_by_watchpoint): Likewise.
8345
8f26655c
GB
83462014-06-19 Gary Benson <gbenson@redhat.com>
8347
8348 * i386-low.c (i386_dr_show): Renamed to
8349 i386_show_dr and made static. All uses updated.
8350 (i386_dr_length_and_rw_bits): Renamed to
8351 i386_length_and_rw_bits and made static.
8352 All uses updated.
8353 (i386_dr_insert_aligned_watchpoint): Renamed to
8354 i386_insert_aligned_watchpoint and made static.
8355 All uses updated.
8356 (i386_dr_remove_aligned_watchpoint): Renamed to
8357 i386_remove_aligned_watchpoint and made static.
8358 All uses updated.
8359 (i386_dr_update_inferior_debug_regs): Renamed to
8360 i386_update_inferior_debug_regs and made static.
8361 All uses updated.
8362
b9228891
GB
83632014-06-18 Gary Benson <gbenson@redhat.com>
8364
5171def3
GB
8365 * i386-low.h (i386_dr_low_can_set_addr): New macro.
8366 (i386_dr_low_can_set_control): Likewise.
8367 (i386_get_debug_register_length): Likewise.
8368 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
8369 (i386_dr_low_can_set_control): Likewise.
8370 (i386_get_debug_register_length): Likewise.
8371
83722014-06-17 Gary Benson <gbenson@redhat.com>
8373
b9228891
GB
8374 * i386-low.h (i386-dregs.h): New include.
8375 (DR_FIRSTADDR): Now in i386-dregs.h.
8376 (DR_LASTADDR): Likewise.
8377 (DR_NADDR): Likewise.
8378 (DR_STATUS): Likewise.
8379 (DR_CONTROL): Likewise.
8380 (i386_debug_reg_state): Likewise.
8381 (i386_dr_insert_watchpoint): Likewise.
8382 (i386_dr_remove_watchpoint): Likewise.
8383 (i386_dr_region_ok_for_watchpoint): Likewise.
8384 (i386_dr_stopped_data_address): Likewise.
8385 (i386_dr_stopped_by_watchpoint): Likewise.
8386 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
8387
4be83cc2
GB
83882014-06-18 Gary Benson <gbenson@redhat.com>
8389
8390 * i386-low.h (i386_low_insert_watchpoint): Renamed to
8391 i386_dr_insert_watchpoint.
8392 (i386_low_remove_watchpoint): Renamed to
8393 i386_dr_remove_watchpoint.
8394 (i386_low_region_ok_for_watchpoint): Renamed to
8395 i386_dr_region_ok_for_watchpoint.
8396 (i386_low_stopped_data_address): Renamed to
8397 i386_dr_stopped_data_address.
8398 (i386_low_stopped_by_watchpoint): Renamed to
8399 i386_dr_stopped_by_watchpoint.
8400 * i386-low.c (i386_show_dr): Renamed to
8401 i386_dr_show and made nonstatic. All uses updated.
8402 (i386_length_and_rw_bits): Renamed to
8403 i386_dr_length_and_rw_bits and made nonstatic.
8404 All uses updated.
8405 (i386_insert_aligned_watchpoint): Renamed to
8406 i386_dr_insert_aligned_watchpoint and made nonstatic.
8407 All uses updated.
8408 (i386_remove_aligned_watchpoint): Renamed to
8409 i386_dr_remove_aligned_watchpoint and made nonstatic.
8410 All uses updated.
8411 (i386_update_inferior_debug_regs): Renamed to
8412 i386_dr_update_inferior_debug_regs and made nonstatic.
8413 All uses updated.
8414 (i386_low_insert_watchpoint): Renamed to
8415 i386_dr_insert_watchpoint. All uses updated.
8416 (i386_low_remove_watchpoint): Renamed to
8417 i386_dr_remove_watchpoint. All uses updated.
8418 (i386_low_region_ok_for_watchpoint): Renamed to
8419 i386_dr_region_ok_for_watchpoint. All uses updated.
8420 (i386_low_stopped_data_address): Renamed to
8421 i386_dr_stopped_data_address. All uses updated.
8422 (i386_low_stopped_by_watchpoint): Renamed to
8423 i386_dr_stopped_by_watchpoint. All uses updated.
8424
131aa0d4
GB
84252014-06-18 Gary Benson <gbenson@redhat.com>
8426
8427 * i386-low.c (i386_dr_low_can_set_addr): New macro.
8428 (i386_dr_low_can_set_control): Likewise.
8429 (i386_insert_aligned_watchpoint): New check.
8430
d9305f7f
GB
84312014-06-18 Gary Benson <gbenson@redhat.com>
8432
8433 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
8434 Renamed to state.
8435
e927c9fc
GB
84362014-06-18 Gary Benson <gbenson@redhat.com>
8437
8438 * i386-low.c (i386_length_and_rw_bits): Use internal_error
8439 instead of fatal and error.
8440 (i386_handle_nonaligned_watchpoint): Likewise.
8441
1b6d4134
GB
84422014-06-18 Gary Benson <gbenson@redhat.com>
8443
8444 * i386-low.c (i386_get_debug_register_length): New macro.
8445 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
8446 (i386_show_dr): Use debug_printf instead of fprintf. Use
8447 phex to format values.
8448
6e62758f
GB
84492014-06-18 Gary Benson <gbenson@redhat.com>
8450
8451 * i386-low.h: Comment changes.
8452 * i386-low.c: Likewise.
8453
fc6e2f03
GB
84542014-06-18 Gary Benson <gbenson@redhat.com>
8455
8456 * i386-low.c: Whitespace changes.
8457
f9d1eeed
TT
84582014-06-12 Tom Tromey <tromey@redhat.com>
8459
8460 * utils.c (freeargv): Remove.
8461
0b04e523
TT
84622014-06-12 Tom Tromey <tromey@redhat.com>
8463
8464 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
8465 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
8466 (parse_debug_format_options): Likewise.
8467 (gdbserver_usage): Likewise.
8468 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
8469 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
8470 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
8471 against libiberty.
8472 ($(LIBGNU)): Depend on libiberty.
8473 (all-lib): Recurse into all subdirs.
8474 (install-only): Invoke "install" target in subdirs.
8475 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
8476 targets.
8477 * configure: Rebuild.
8478 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
8479 for vasprintf, vsnprintf, or gettimeofday.
8480 * configure.srv: Don't add safe-ctype.o or lbasename.o to
8481 srv_tgtobj.
8482
270c9937
JB
84832014-06-05 Joel Brobecker <brobecker@adacore.com>
8484
8485 * development.sh: Delete.
8486 * Makefile.in (config.status): Adjust dependency on development.sh.
8487 * configure.ac: Adjust development.sh source call.
8488 * configure: Regenerate.
8489
0a261ed8
PA
84902014-06-02 Pedro Alves <palves@redhat.com>
8491
8492 * ax.c (gdb_free_agent_expr): New function.
8493 * ax.h (gdb_free_agent_expr): New declaration.
8494 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
8495 list.
8496 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
8497 static.
8498 (clear_breakpoint_conditions_and_commands): New function.
8499 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
8500 (clear_breakpoint_conditions_and_commands): New declaration.
8501
e9dae05e
RR
85022014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
8503
8504 * linux-aarch64-low.c (asm/ptrace.h): Include.
8505
5876f503
JK
85062014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
8507
8508 Fix TLS access for -static -pthread.
8509 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
8510 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
8511 (thread_db_load_search, try_thread_db_load_1): Initialize it.
8512
802e8e6d
PA
85132014-05-20 Pedro Alves <palves@redhat.com>
8514
8515 * linux-aarch64-low.c (aarch64_insert_point)
8516 (aarch64_remove_point): No longer check whether the type is
8517 supported here. Adjust to new interface.
8518 (the_low_target): Install aarch64_supports_z_point_type as
8519 supports_z_point_type method.
8520 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
8521 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
8522 instead of a Z packet char. Adjust.
8523 (arm_supports_z_point_type): New function.
8524 (arm_insert_point, arm_remove_point): Adjust to new interface.
8525 (the_low_target): Install arm_supports_z_point_type.
8526 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
8527 (cris_insert_point, cris_remove_point): Adjust to new interface.
8528 Don't check whether the type is supported here.
8529 (the_low_target): Install cris_supports_z_point_type.
8530 * linux-low.c (linux_supports_z_point_type): New function.
8531 (linux_insert_point, linux_remove_point): Adjust to new interface.
8532 * linux-low.h (struct linux_target_ops) <insert_point,
8533 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
8534 raw_breakpoint pointer parameter.
8535 <supports_z_point_type>: New method.
8536 * linux-mips-low.c (mips_supports_z_point_type): New function.
8537 (mips_insert_point, mips_remove_point): Adjust to new interface.
8538 Use mips_supports_z_point_type.
8539 (the_low_target): Install mips_supports_z_point_type.
8540 * linux-ppc-low.c (the_low_target): Install NULL as
8541 supports_z_point_type method.
8542 * linux-s390-low.c (the_low_target): Install NULL as
8543 supports_z_point_type method.
8544 * linux-sparc-low.c (the_low_target): Install NULL as
8545 supports_z_point_type method.
8546 * linux-x86-low.c (x86_supports_z_point_type): New function.
8547 (x86_insert_point): Adjust to new insert_point interface. Use
8548 insert_memory_breakpoint. Adjust to new
8549 i386_low_insert_watchpoint interface.
8550 (x86_remove_point): Adjust to remove_point interface. Use
8551 remove_memory_breakpoint. Adjust to new
8552 i386_low_remove_watchpoint interface.
8553 (the_low_target): Install x86_supports_z_point_type.
8554 * lynx-low.c (lynx_target_ops): Install NULL as
8555 supports_z_point_type callback.
8556 * nto-low.c (nto_supports_z_point_type): New.
8557 (nto_insert_point, nto_remove_point): Adjust to new interface.
8558 (nto_target_ops): Install nto_supports_z_point_type.
8559 * mem-break.c: Adjust intro comment.
8560 (struct raw_breakpoint) <raw_type, size>: New fields.
8561 <inserted>: Update comment.
8562 <shlib_disabled>: Delete field.
8563 (enum bkpt_type) <gdb_breakpoint>: Delete value.
8564 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
8565 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
8566 (raw_bkpt_type_to_target_hw_bp_type): New function.
8567 (find_enabled_raw_code_breakpoint_at): New function.
8568 (find_raw_breakpoint_at): New type and size parameters. Use them.
8569 (insert_memory_breakpoint): New function, based off
8570 set_raw_breakpoint_at.
8571 (remove_memory_breakpoint): New function.
8572 (set_raw_breakpoint_at): Reimplement.
8573 (set_breakpoint): New, based on set_breakpoint_at.
8574 (set_breakpoint_at): Reimplement.
8575 (delete_raw_breakpoint): Go through the_target->remove_point
8576 instead of assuming memory breakpoints.
8577 (find_gdb_breakpoint_at): Delete.
8578 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
8579 (find_gdb_breakpoint): New function.
8580 (set_gdb_breakpoint_at): Delete.
8581 (z_type_supported): New function.
8582 (set_gdb_breakpoint_1): New function, loosely based off
8583 set_gdb_breakpoint_at.
8584 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
8585 (delete_gdb_breakpoint_at): Delete.
8586 (delete_gdb_breakpoint_1): New function, loosely based off
8587 delete_gdb_breakpoint_at.
8588 (delete_gdb_breakpoint): New function.
8589 (clear_gdb_breakpoint_conditions): Rename to ...
8590 (clear_breakpoint_conditions): ... this. Don't handle a NULL
8591 breakpoint.
8592 (add_condition_to_breakpoint): Make static.
8593 (add_breakpoint_condition): Take a struct breakpoint pointer
8594 instead of an address. Adjust.
8595 (gdb_condition_true_at_breakpoint): Rename to ...
8596 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
8597 z_type parameter.
8598 (gdb_condition_true_at_breakpoint): Reimplement.
8599 (add_breakpoint_commands): Take a struct breakpoint pointer
8600 instead of an address. Adjust.
8601 (gdb_no_commands_at_breakpoint): Rename to ...
8602 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
8603 parameter. Return true if no breakpoint was found. Change debug
8604 output.
8605 (gdb_no_commands_at_breakpoint): Reimplement.
8606 (run_breakpoint_commands): Rename to ...
8607 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
8608 and change return type to boolean.
8609 (run_breakpoint_commands): New function.
8610 (gdb_breakpoint_here): Also check for Z1 breakpoints.
8611 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
8612 breakpoint. Go through the_target->remove_point instead of
8613 assuming memory breakpoint.
8614 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
8615 software and hardware breakpoints.
8616 (reinsert_raw_breakpoint): Go through the_target->insert_point
8617 instead of assuming memory breakpoint.
8618 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
8619 software and hardware breakpoints.
8620 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
8621 Check both software and hardware breakpoints.
8622 (validate_inserted_breakpoint): Assert the breakpoint is a
8623 software breakpoint. Set the inserted flag to -1 instead of
8624 setting shlib_disabled.
8625 (delete_disabled_breakpoints): Adjust.
8626 (validate_breakpoints): Only validate software breakpoints.
8627 Adjust to inserted flag change.
8628 (check_mem_read, check_mem_write): Skip breakpoint types other
8629 than software breakpoints. Adjust to inserted flag change.
8630 * mem-break.h (enum raw_bkpt_type): New enum.
8631 (raw_breakpoint, struct process_info): Forward declare.
8632 (Z_packet_to_target_hw_bp_type): Delete declaration.
8633 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
8634 (set_gdb_breakpoint, delete_gdb_breakpoint)
8635 (clear_breakpoint_conditions): New declarations.
8636 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
8637 (breakpoint_inserted_here): Update comment.
8638 (add_breakpoint_condition, add_breakpoint_commands): Replace
8639 address parameter with a breakpoint pointer parameter.
8640 (gdb_breakpoint_here): Update comment.
8641 (delete_gdb_breakpoint_at): Delete.
8642 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
8643 * server.c (process_point_options): Take a struct breakpoint
8644 pointer instead of an address. Adjust.
8645 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
8646 delete_gdb_breakpoint.
8647 * spu-low.c (spu_target_ops): Install NULL as
8648 supports_z_point_type method.
8649 * target.h: Include mem-break.h.
8650 (struct target_ops) <prepare_to_access_memory>: Update comment.
8651 <supports_z_point_type>: New field.
8652 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
8653 instead of a char. Also take a raw breakpoint pointer.
8654 * win32-arm-low.c (the_low_target): Install NULL as
8655 supports_z_point_type.
8656 * win32-i386-low.c (i386_supports_z_point_type): New function.
8657 (i386_insert_point, i386_remove_point): Adjust to new interface.
8658 (the_low_target): Install i386_supports_z_point_type.
8659 * win32-low.c (win32_supports_z_point_type): New function.
8660 (win32_insert_point, win32_remove_point): Adjust to new interface.
8661 (win32_target_ops): Install win32_supports_z_point_type.
8662 * win32-low.h (struct win32_target_ops):
8663 <supports_z_point_type>: New method.
8664 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
8665 instead of a char. Also take a raw breakpoint pointer.
8666
932539e3
PA
86672014-05-20 Pedro Alves <palves@redhat.com>
8668
8669 * mem-break.h: Include break-common.h.
8670 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
8671 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
8672 (Z_packet_to_target_hw_bp_type): New declaration.
8673 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
8674 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
8675 (Z_PACKET_ACCESS_WP): Delete macros.
8676 (Z_packet_to_hw_type): Delete function.
8677 * i386-low.h: Don't include break-common.h here.
8678 (Z_packet_to_hw_type): Delete declaration.
8679 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
8680 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
8681 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
8682 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
8683 * linux-aarch64-low.c: Don't include break-common.h here.
8684 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
8685 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
8686 (Z_packet_to_target_hw_bp_type): Delete function.
8687 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
8688 function.
8689 (mips_insert_point, mips_remove_point): Use
8690 Z_packet_to_target_hw_bp_type.
8691
4ff0d3d8
PA
86922014-05-20 Pedro Alves <palves@redhat.com>
8693
8694 * linux-aarch64-low.c: Include break-common.h.
8695 (enum target_point_type): Delete.
8696 (Z_packet_to_point_type): Rename to ...
8697 (Z_packet_to_target_hw_bp_type): ... this, and return a
8698 target_hw_bp_type instead.
8699 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
8700 instead of an enum target_point_type.
8701 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
8702 breakpoint type.
8703 (aarch64_dr_state_insert_one_point)
8704 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
8705 (aarch64_handle_aligned_watchpoint)
8706 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
8707 Take an enum target_hw_bp_type instead of an enum
8708 target_point_type.
8709 (aarch64_supports_z_point_type): New function.
8710 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
8711 use Z_packet_to_target_hw_bp_type.
8712
786dc519
JB
87132014-05-20 Joel Brobecker <brobecker@adacore.com>
8714
8715 * configure.ac: Only use -Werror by default when DEVELOPMENT
8716 is true.
8717 * configure: Regenerate.
8718
9e0aa64f
JK
87192014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
8720
8721 Fix gdbserver qGetTLSAddr for x86_64 -m32.
8722 * linux-x86-low.c (X86_64_USER_REGS): New.
8723 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
8724
2b577b92
YQ
87252014-04-28 Yao Qi <yao@codesourcery.com>
8726
8727 * Makefile.in (i386-avx512.c): Fix the typo of generated file
8728 name.
8729
94611da2
PA
87302014-04-25 Pedro Alves <palves@redhat.com>
8731
8732 PR server/16255
8733 * linux-low.c (linux_attach_fail_reason_string): New function.
8734 (linux_attach_lwp): Delete.
8735 (linux_attach_lwp_1): Rename to ...
8736 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
8737 argument. Remove "initial" parameter. Return int instead of
8738 void. Don't error or warn here.
8739 (linux_attach): Adjust to call linux_attach_lwp. Call error on
8740 failure to attach to the tgid. Call warning when failing to
8741 attach to an lwp.
8742 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
8743 argument. Remove "initial" parameter. Return int instead of
8744 void. Don't error or warn here.
8745 (linux_attach_fail_reason_string): New declaration.
8746 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
8747 interface change. Use linux_attach_fail_reason_string.
8748
01f9f808
MS
87492014-04-24 Michael Sturm <michael.sturm@mintel.com>
8750 Walfred Tedeschi <walfred.tedeschi@intel.com>
8751
8752 * Makefile.in: Added rules to handle new files
8753 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
8754 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
8755 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
8756 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
8757 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
8758 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
8759 x32-avx512-linux.o.
8760 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
8761 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
8762 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
8763 i386/x32-avx512.xml.
8764 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
8765 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
8766 i386/x32-avx512-linux.xml.
8767 * i387-fp.c (num_avx512_k_registers): New constant for number
8768 of K registers.
8769 (num_avx512_zmmh_low_registers): New constant for number of
8770 lower ZMM registers (0-15).
8771 (num_avx512_zmmh_high_registers): New constant for number of
8772 higher ZMM registers (16-31).
8773 (num_avx512_ymmh_registers): New contant for number of higher
8774 YMM registers (ymm16-31 added by avx521 on x86_64).
8775 (num_avx512_xmm_registers): New constant for number of higher
8776 XMM registers (xmm16-31 added by AVX512 on x86_64).
8777 (struct i387_xsave): Add space for AVX512 registers.
8778 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
8779 Add code to handle AVX512 registers.
8780 (i387_xsave_to_cache): Add code to handle AVX512 registers.
8781 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
8782 prototypei from generated file.
8783 (tdesc_amd64_avx512_linux): Likewise.
8784 (init_registers_x32_avx512_linux): Likewise.
8785 (tdesc_x32_avx512_linux): Likewise.
8786 (init_registers_i386_avx512_linux): Likewise.
8787 (tdesc_i386_avx512_linux): Likewise.
8788 (x86_64_regmap): Add AVX512 registers.
8789 (x86_linux_read_description): Add code to handle AVX512 XSTATE
8790 mask.
8791 (initialize_low_arch): Add code to initialize AVX512 registers.
8792
51aa91f9
PA
87932014-04-23 Pedro Alves <palves@redhat.com>
8794
8795 * mem-break.c (find_gdb_breakpoint_at): Make static.
8796 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
8797
a4165e94
PA
87982014-04-23 Pedro Alves <palves@redhat.com>
8799
8800 * i386-low.c: Don't include break-common.h here.
8801 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
8802 prototype to take target_hw_bp_type as argument instead of a Z
8803 packet char.
8804 * i386-low.h: Include break-common.h here.
8805 (Z_packet_to_hw_type): Declare.
8806 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
8807 prototypes.
8808 * linux-x86-low.c (x86_insert_point): Convert the packet number to
8809 a target_hw_bp_type before calling i386_low_insert_watchpoint.
8810 (x86_remove_point): Convert the packet number to a
8811 target_hw_bp_type before calling i386_low_remove_watchpoint.
8812 * win32-i386-low.c (i386_insert_point): Convert the packet number
8813 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
8814 (i386_remove_point): Convert the packet number to a
8815 target_hw_bp_type before calling i386_low_remove_watchpoint.
8816
b8acf843
PA
88172014-04-23 Pedro Alves <palves@redhat.com>
8818
8819 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
8820
d708bcd1
PA
88212014-04-10 Pedro Alves <palves@redhat.com>
8822
8823 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
8824 Check if the condition or command is NULL before checking if the
8825 breakpoint is known. On success, return true.
8826 * mem-break.h (add_breakpoint_condition): Document return.
8827 (add_breakpoint_commands): Add describing comment.
8828 * server.c (skip_to_semicolon): New function.
8829 (process_point_options): Use it.
8830
2eec7d5b
PA
88312014-04-09 Pedro Alves <palves@redhat.com>
8832
8833 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
8834 to lwpid_of.
8835
fa96cb38
PA
88362014-02-27 Pedro Alves <palves@redhat.com>
8837
8838 PR 12702
8839 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
8840 macros.
8841 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
8842 output.
8843 (last_thread_of_process_p): Take a PID argument instead of a
8844 thread pointer.
8845 (linux_wait_for_lwp): Delete.
8846 (num_lwps, check_zombie_leaders, not_stopped_callback): New
8847 functions.
8848 (linux_low_filter_event): New function, party factored out from
8849 linux_wait_for_event.
8850 (linux_wait_for_event): Rename to ...
8851 (linux_wait_for_event_filtered): ... this. Add new filter ptid
8852 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
8853 sigsuspend. Check for zombie leaders.
8854 (linux_wait_for_event): Reimplement as wrapper around
8855 linux_wait_for_event_filtered.
8856 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
8857 a normal or signal exit is seen, it's the whole process exiting.
8858 (wait_for_sigstop): No longer a for_each_inferior callback.
8859 Rewrite on top of linux_wait_for_event_filtered.
8860 (stop_all_lwps): Call wait_for_sigstop directly.
8861 * server.c (resume, handle_target_event): Handle
8862 TARGET_WAITKIND_NO_RESUMED.
8863
d763de10
JB
88642014-02-26 Joel Brobecker <brobecker@adacore.com>
8865
8866 * win32-low.c (psapi_get_dll_name,
8867 * win32_CreateToolhelp32Snapshot): Delete.
8868 (win32_CreateToolhelp32Snapshot, win32_Module32First)
8869 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
8870 Delete.
8871 (handle_load_dll): Add function description.
8872 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
8873
850a0f76
JB
88742014-02-26 Joel Brobecker <brobecker@adacore.com>
8875
8876 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
8877 Add comment.
8878 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
8879 base address when calling win32_add_one_solib.
8880 (handle_load_dll): Delete local variable load_addr.
8881 Remove 0x1000 offset applied to DLL base address when calling
8882 win32_add_one_solib.
8883 (handle_unload_dll): Add comment.
8884
f25b3fc3
JB
88852014-02-26 Joel Brobecker <brobecker@adacore.com>
8886
8887 * win32-low.c (win32_add_all_dlls): Renames
8888 win32_ensure_ntdll_loaded. Rewrite function documentation.
8889 Adjust implementation to always load all DLLs.
8890 Add 0x1000 offset to DLL base address when calling
8891 win32_add_one_solib.
8892 (child_initialization_done): New static global.
8893 (do_initial_child_stuff): Set child_initialization_done to
8894 zero during child initialization, and 1 after. Replace call
8895 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
8896 Add comment.
8897 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
8898 (handle_unload_dll): Add function documentation.
8899 (get_child_debug_event): Ignore load and unload DLL events
8900 during child initialization.
8901
d86d4aaf
DE
89022014-02-20 Doug Evans <dje@google.com>
8903
3bc32da3 8904 Remove global all_lwps.
d86d4aaf
DE
8905 * inferiors.h (ptid_of): Move here from linux-low.h.
8906 (pid_of, lwpid_of): Ditto.
8907 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
8908 parameter is a struct thread_info * now.
8909 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
8910 directly. Pass &all_threads to find_inferior instead of &all_lwps.
8911 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
8912 directly.
8913 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
8914 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
8915 * linux-arm-low.c (update_registers_callback): Update, "entry"
8916 parameter is a struct thread_info * now.
8917 Fetch lwpid from current_inferior directly.
8918 (arm_insert_point): Pass &all_threads to find_inferior instead of
8919 &all_lwps.
8920 (arm_remove_point): Ditto.
8921 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
8922 (arm_prepare_to_resume): Fetch pid from thread.
8923 (arm_read_description): Fetch lwpid from current_inferior directly.
8924 * linux-low.c (all_lwps): Delete.
8925 (delete_lwp): Delete call to remove_inferior.
8926 (handle_extended_wait): Fetch lwpid from thread.
8927 (add_lwp): Don't set lwp->entry.id. Remove call to
8928 add_inferior_to_list.
8929 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
8930 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
8931 (kill_one_lwp_callback): Ditto.
8932 (linux_kill): Don't dereference NULL pointer.
8933 Fetch ptid,lwpid from thread.
8934 (get_detach_signal): Fetch ptid from thread.
8935 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
8936 Simplify call to regcache_invalidate_thread.
8937 (delete_lwp_callback): Update, "entry" parameter is a
8938 struct thread_info * now. Fetch pid from thread.
8939 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
8940 (status_pending_p_callback): Update, "entry" parameter is a
8941 struct thread_info * now. Fetch ptid from thread.
8942 (find_lwp_pid): Update, "entry" parameter is a
8943 struct thread_info * now.
8944 (linux_wait_for_lwp): Fetch pid from thread.
8945 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
8946 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
8947 (enqueue_one_deferred_signal): Fetch lwpid from thread.
8948 (dequeue_one_deferred_signal): Ditto.
8949 (cancel_breakpoint): Fetch ptid from current_inferior.
8950 (linux_wait_for_event): Pass &all_threads to find_inferior,
8951 not &all_lwps. Fetch ptid, lwpid from thread.
8952 (count_events_callback): Update, "entry" parameter is a
8953 struct thread_info * now.
8954 (select_singlestep_lwp_callback): Ditto.
8955 (select_event_lwp_callback): Ditto.
8956 (cancel_breakpoints_callback): Ditto.
8957 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
8958 not &all_lwps.
8959 (select_event_lwp): Ditto. Fetch ptid from event_thread.
8960 (unsuspend_one_lwp): Update, "entry" parameter is a
8961 struct thread_info * now.
8962 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
8963 not &all_lwps.
8964 (linux_stabilize_threads): Ditto. And for for_each_inferior.
8965 Fetch lwpid from thread, not lwp.
8966 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
8967 Pass &all_threads to find_inferior, not &all_lwps.
8968 (send_sigstop): Fetch lwpid from thread, not lwp.
8969 (send_sigstop_callback): Update, "entry" parameter is a
8970 struct thread_info * now.
8971 (suspend_and_send_sigstop_callback): Ditto.
8972 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
8973 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
8974 struct thread_info * now.
8975 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
8976 from thread, lwp.
8977 (lwp_running): Update, "entry" parameter is a
8978 struct thread_info * now.
8979 (stop_all_lwps): Fetch ptid from thread.
8980 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
8981 (linux_resume_one_lwp): Fetch lwpid from thread.
8982 (linux_set_resume_request): Update, "entry" parameter is a
8983 struct thread_info * now. Fetch pid, lwpid from thread.
8984 (resume_status_pending_p): Update, "entry" parameter is a
8985 struct thread_info * now.
8986 (need_step_over_p): Ditto. Fetch lwpid from thread.
8987 (start_step_over): Fetch lwpid from thread.
8988 (linux_resume_one_thread): Update, "entry" parameter is a
8989 struct thread_info * now. Fetch lwpid from thread.
8990 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
8991 (proceed_one_lwp): Update, "entry" parameter is a
8992 struct thread_info * now. Fetch lwpid from thread.
8993 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
8994 struct thread_info * now.
8995 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
8996 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
8997 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
8998 directly.
8999 (regsets_store_inferior_registers): Ditto.
9000 (fetch_register, store_register): Ditto.
9001 (linux_read_memory, linux_write_memory): Ditto.
9002 (linux_request_interrupt): Ditto.
9003 (linux_read_auxv): Ditto.
9004 (linux_xfer_siginfo): Ditto.
9005 (linux_qxfer_spu): Ditto.
9006 (linux_qxfer_libraries_svr4): Ditto.
9007 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
9008 moved to inferiors.h.
9009 (get_lwp): Delete.
9010 (get_thread_lwp): Update.
9011 (struct lwp_info): Delete member "entry". Simplify comment for
9012 member "thread".
9013 (all_lwps): Delete.
9014 * linux-mips-low.c (mips_read_description): Fetch lwpid from
9015 current_inferior directly.
9016 (update_watch_registers_callback): Update, "entry" parameter is a
9017 struct thread_info * now. Fetch pid from thread.
9018 (mips_linux_prepare_to_resume): Fetch ptid from thread.
9019 (mips_insert_point): Fetch lwpid from current_inferior.
9020 Pass &all_threads to find_inferior, not &all_lwps.
9021 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
9022 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
9023 directly.
9024 (mips_stopped_data_address): Ditto.
9025 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
9026 directly.
9027 * linux-tile-low.c (tile_arch_setup): Ditto.
9028 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
9029 (update_debug_registers_callback): Update, "entry" parameter is a
9030 struct thread_info * now. Fetch pid from thread.
9031 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
9032 Pass &all_threads to find_inferior, not &all_lwps.
9033 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
9034 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
9035 Pass &all_threads to find_inferior, not &all_lwps.
9036 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
9037 (i386_dr_low_get_status): Ditto.
9038 (x86_linux_prepare_to_resume): Fetch ptid from thread.
9039 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
9040 (x86_linux_read_description): Ditto.
9041 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
9042
3b8361aa
DE
90432014-02-20 Doug Evans <dje@google.com>
9044
9045 * inferiors.c (get_first_inferior): Fix buglet.
9046
f7667f0d
DE
90472014-02-19 Doug Evans <dje@google.com>
9048
9049 * gdbthread.h (add_thread): Change result type to struct thread_info *.
9050 * inferiors.c (add_thread): Change result type to struct thread_info *.
9051 All callers updated.
9052 (add_lwp): Call add_thread here instead of in callers.
9053 All callers updated.
9054 * linux-low.h (get_lwp_thread): Rewrite.
9055 (struct lwp_info): New member "thread".
9056
b3312d80
DE
90572014-02-19 Doug Evans <dje@google.com>
9058
9059 * linux-low.c (add_lwp): Change result to struct lwp_info *.
9060 All callers updated.
9061
ecc6f45c
DE
90622014-02-19 Doug Evans <dje@google.com>
9063
9064 * inferiors.c (add_thread): Fix whitespace.
9065
649ebbca
DE
90662014-02-19 Doug Evans <dje@google.com>
9067
9068 * dll.c (clear_dlls): Replace accessing list implemention details
9069 with API function.
9070 * gdbthread.h (get_first_thread): Declare.
9071 * inferiors.c (for_each_inferior_with_data): New function.
9072 (get_first_thread): New function.
9073 (find_thread_ptid): Simplify.
9074 (get_first_inferior): New function.
9075 (clear_list): Delete.
9076 (one_inferior_p): New function.
9077 (clear_inferior_list): New function.
9078 (clear_inferiors): Update.
9079 * inferiors.h (for_each_inferior_with_data): Declare.
9080 (clear_inferior_list): Declare.
9081 (one_inferior_p): Declare.
9082 (get_first_inferior): Declare.
9083 * linux-low.c (linux_wait_for_event): Replace accessing list
9084 implemention details with API function.
9085 * server.c (target_running): Ditto.
9086 (accumulate_file_name_length): New function.
9087 (emit_dll_description): New function.
9088 (handle_qxfer_libraries): Replace accessing list implemention
9089 details with API function.
9090 (handle_qxfer_threads_worker): New function.
9091 (handle_qxfer_threads_proper): Replace accessing list implemention
9092 details with API function.
9093 (handle_query): Ditto.
9094 (visit_actioned_threads_callback_ftype): New typedef.
9095 (visit_actioned_threads_data): New struct.
9096 (visit_actioned_threads): Rewrite to be find_inferior callback.
9097 (resume): Call find_inferior.
9098 (handle_status): Replace accessing list implemention
9099 details with API function.
9100 (process_serial_event): Replace accessing list implemention details
9101 with API function.
9102 * target.c (set_desired_inferior): Replace accessing list implemention
9103 details with API function.
9104 * tracepoint.c (same_process_p): New function.
9105 (gdb_agent_about_to_close): Replace accessing list implemention
9106 details with API function.
9107 * win32-low.c (child_delete_thread): Replace accessing list
9108 implemention details with API function.
9109 (match_dll_by_basename): New function.
9110 (dll_is_loaded_by_basename): New function.
9111 (win32_ensure_ntdll_loaded): Replace accessing list implemention
9112 details call to dll_is_loaded_by_basename.
9113
80894984
DE
91142014-02-19 Doug Evans <dje@google.com>
9115
9116 * dll.h (struct dll_info): Add comment.
9117 * gdbthread.h (struct thread_info): Add comment.
9118 (current_ptid): Simplify.
9119 * inferiors.c (add_process): Update.
9120 (remove_process): Update.
9121 * inferiors.h (struct process_info): Rename member "head" to "entry".
9122 * linux-low.c (delete_lwp): Update.
9123 (add_lwp): Update.
9124 (last_thread_of_process_p): Update.
9125 (kill_one_lwp_callback, linux_kill): Update.
9126 (status_pending_p_callback): Update.
9127 (wait_for_sigstop): Update. Simplify read of ptid.
9128 (start_step_over): Update.
9129 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
9130 (get_lwp_thread): Update.
9131 (struct lwp_info): Rename member "head" to "entry".
9132 * regcache.h (inferior_list_entry): Delete.
9133 * server.c (kill_inferior_callback): Update.
9134 (detach_or_kill_inferior_callback): Update.
9135 (print_started_pid): Update.
9136 (print_attached_pid): Update.
9137 (process_serial_event): Simplify read of ptid.
9138 * thread-db.c (thread_db_create_event): Update.
9139 (thread_db_get_tls_address): Update.
9140 * win32-low.c (current_inferior_ptid): Simplify.
9141
46917d26
TT
91422014-02-19 Tom Tromey <tromey@redhat.com>
9143
9144 * target.h (struct target_ops) <supports_btrace>: Add target_ops
9145 argument.
9146 (target_supports_btrace): Update.
9147
0759a81e
YQ
91482014-02-14 Yao Qi <yao@codesourcery.com>
9149
9150 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
9151 (rsp-low-ipa.o): New target.
9152
a7191e8b
TT
91532014-02-12 Tom Tromey <tromey@redhat.com>
9154
9155 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
9156 convert_ascii_to_int.
9157 * regcache.c (registers_to_string): Likewise.
9158 * remote-utils.c (decode_M_packet): Likewise.
9159 * server.c (process_serial_event): Likewise.
9160
ff0e980e
TT
91612014-02-12 Tom Tromey <tromey@redhat.com>
9162
9163 * server.c (handle_query, handle_v_run): Use hex2bin, not
9164 unhexify.
9165 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
9166
e9371aff
TT
91672014-02-12 Tom Tromey <tromey@redhat.com>
9168
9169 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
9170 convert_int_to_ascii.
9171 * regcache.c (registers_to_string, collect_register_as_string):
9172 Likewise.
9173 * remote-utils.c (look_up_one_symbol, relocate_instruction):
9174 Likewise.
9175 * server.c (process_serial_event): Likewise.
9176 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
9177 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
9178
971dc0b8
TT
91792014-02-12 Tom Tromey <tromey@redhat.com>
9180
9181 * remote-utils.c (look_up_one_symbol, monitor_output): Use
9182 bin2hex, not hexify.
9183 * tracepoint.c (cmd_qtstatus): Likewise.
9184
0a822afb
TT
91852014-02-12 Tom Tromey <tromey@redhat.com>
9186
9187 * remote-utils.c (monitor_output): Pass explicit length to
9188 hexify.
9189
9c3d6531
TT
91902014-02-12 Tom Tromey <tromey@redhat.com>
9191
9192 * tracepoint.c: Include rsp-low.h.
9193 * server.c: Include rsp-low.h.
9194 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
9195 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
9196 declare.
9197 * remote-utils.c: Include rsp-low.h.
9198 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
9199 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
9200 (convert_int_to_ascii, convert_ascii_to_int): Move to
9201 common/rsp-low.c.
9202 * regcache.c: Include rsp-low.h.
9203 * ax.c: Include rsp-low.h.
9204 * Makefile.in (SFILES): Add common/rsp-low.c.
9205 (OBS): Add rsp-low.o.
9206 (rsp-low.o): New target.
9207
01fd3ea5
TT
92082014-02-12 Tom Tromey <tromey@redhat.com>
9209
9210 * utils.h (pulongest, plongest, phex_nz): Don't declare.
9211 Include print-utils.h.
9212 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
9213 (plongest, thirty_two, phex_nz): Remove.
9214 * Makefile.in (SFILES): Add common/print-utils.c.
9215 (OBS): Add print-utils.o.
9216 (print-utils-ipa.o): New target.
9217 (print-utils.o): New target.
9218 (IPA_OBJS): Add print-utils-ipa.o.
9219
e99dc820
TT
92202014-02-06 Tom Tromey <tromey@redhat.com>
9221
9222 * Makefile.in (SFILES): Fix indentation.
9223
ee1e2d4f
DE
92242014-02-05 Doug Evans <dje@google.com>
9225
9226 * linux-low.c (linux_wait_for_event): Improve comment.
9227 (linux_wait_1): Keep current_inferior in sync with event_child.
9228
f5a02773
DE
92292014-01-22 Doug Evans <dje@google.com>
9230
9231 * gdbthread.h (gdb_id_to_thread): Delete, unused.
9232
87ce2a04
DE
92332014-01-22 Doug Evans <dje@google.com>
9234
9235 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
9236 * configure: Regenerate.
9237 * config.in: Regenerate.
9238 * Makefile.in (SFILES): Add debug.c.
9239 (OBS): Add debug.o.
9240 * debug.c: New file.
9241 * debug.h: New file.
9242 * linux-aarch64-low.c (*): Update all debugging printfs to use
9243 debug_printf instead of fprintf.
9244 * linux-arm-low.c (*): Ditto.
9245 * linux-cris-low.c (*): Ditto.
9246 * linux-crisv32-low.c (*): Ditto.
9247 * linux-m32r-low.c (*): Ditto.
9248 * linux-sparc-low.c (*): Ditto.
9249 * linux-x86.c (*): Ditto.
9250 * linux-low.c (*): Ditto.
9251 (linux_wait_1): Add calls to debug_enter, debug_exit.
9252 (linux_wait): Remove redundant debugging printf.
9253 (stop_all_lwps): Add calls to debug_enter, debug_exit.
9254 (linux_resume, unstop_all_lwps): Ditto.
9255 * mem-break.c (*): Update all debugging printfs to use
9256 debug_printf instead of fprintf.
9257 * remote-utils.c (*): Ditto.
9258 * thread-db.c (*): Ditto.
9259 * server.c #include <ctype.h>, "gdb_vecs.h".
9260 (debug_threads): Moved to debug.c.
9261 (*): Update all debugging printfs to use debug_printf instead of
9262 fprintf.
9263 (start_inferior): Replace call to fflush with call to debug_flush.
9264 (monitor_show_help): Mention set debug-format.
9265 (parse_debug_format_options): New function.
9266 (handle_monitor_command): Handle "monitor set debug-format".
9267 (gdbserver_usage): Mention --debug-format.
9268 (main): Parse --debug-format.
9269 * server.h (debug_threads): Declaration moved to debug.h.
9270 #include "debug.h".
9271 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
9272 trace_debug_1 that uses debug_printf.
9273 (tracepoint_look_up_symbols): Update all debugging printfs to use
9274 debug_printf instead of fprintf.
9275
e671835b
BS
92762014-01-20 Baruch Siach <baruch@tkos.co.il>
9277
9278 * linux-xtensa-low.c: Include asm/ptrace.h instead of
9279 sys/ptrace.h.
9280
b5737fa9
PA
92812014-01-17 Pedro Alves <palves@redhat.com>
9282
ea38d2a9 9283 PR build/16445
c7faa97a
PA
9284 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
9285 defined after including gdb_proc_service.h.
b5737fa9 9286
40ed484e
DE
92872014-01-16 Doug Evans <dje@google.com>
9288
9289 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
9290 (match_dll): Use it.
9291
969c39fb
MM
92922014-01-16 Markus Metzger <markus.t.metzger@intel.com>
9293
9294 * target.h (target_ops) <read_btrace>: Change parameters and
9295 return type to allow error reporting.
9296 * server.c (handle_qxfer_btrace): Support delta reads. Pass
9297 trace reading errors on.
9298 * linux-low.c (linux_low_read_btrace): Pass trace reading
9299 errors on.
9300 (linux_low_disable_btrace): New.
9301
ab7f45ba
DE
93022014-01-15 Doug Evans <dje@google.com>
9303
9304 * inferiors.c (thread_id_to_gdb_id): Delete.
9305 * inferiors.h (thread_id_to_gdb_id): Delete.
9306
66af0f44
EZ
93072014-01-13 Eli Zaretskii <eliz@gnu.org>
9308
9309 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
9310 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
9311 versions.
9312
9939e131
PA
93132014-01-08 Pedro Alves <palves@redhat.com>
9314
9315 * server.c (handle_status): Don't discard previous queued stop
9316 replies or thread's pending status here.
9317 (main) <disconnection>: Do it here instead.
9318
b7ea362b
PA
93192014-01-08 Pedro Alves <palves@redhat.com>
9320
9321 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
9322 * server.c (visit_actioned_threads, handle_pending_status): New
9323 function.
9324 (handle_v_cont): Factor out parts to ...
9325 (resume): ... this new function. If in all-stop, and a thread
9326 being resumed has a pending status, report it without actually
9327 resuming.
9328 (myresume): Adjust to use the new 'resume' function.
9329 (clear_pending_status_callback, set_pending_status_callback)
9330 (find_status_pending_thread_callback): New functions.
9331 (handle_status): Handle the case of multiple threads having
9332 interesting statuses to report. Report threads' real last signal
9333 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
9334 with an interesting thread to report the status for, instead of
9335 always reporting the status of the first thread.
9336
28498c42
JB
93372014-01-01 Joel Brobecker <brobecker@adacore.com>
9338
9339 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
9340 * gdbreplay.c (gdbreplay_version): Likewise.
9341
f45c82da
YZ
93422013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
9343
9344 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
9345 iov.iov_len with the real length in use.
9346
379a5e2d
JB
93472013-12-13 Joel Brobecker <brobecker@adacore.com>
9348
9349 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
9350 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
9351 for all targets that use win32-low.c.
9352 * win32-low.c (win32_ensure_ntdll_loaded): New function.
9353 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
9354
4210d83e
PA
93552013-12-13 Pedro Alves <palves@redhat.com>
9356
9357 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
9358 if equal to TARGET_WAITKIND_LOADED.
9359 * win32-low.c (cached_status): New static global.
9360 (win32_wait): Add declaration.
9361 (do_initial_child_stuff): Flush all initial pending debug events
9362 up to the initial breakpoint.
9363 (win32_wait): If CACHED_STATUS was set, return that instead
9364 of doing a real wait. Remove the code resuming the execution
9365 of the inferior after receiving a TARGET_WAITKIND_LOADED event
9366 during the initial phase. Also remove the code changing
9367 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
9368 TARGET_WAITKIND_STOPPED.
9369
e7f0d979
YQ
93702013-12-11 Yao Qi <yao@codesourcery.com>
9371
9372 * notif.c (handle_notif_ack): Return 0 if no notification
9373 matches.
9374
ebcf782c
DE
93752013-11-20 Doug Evans <dje@google.com>
9376
9377 * linux-low.c (linux_set_resume_request): Fix comment.
9378
20ad9378
DE
93792013-11-20 Doug Evans <dje@google.com>
9380
9381 * linux-low.c (resume_status_pending_p): Tweak comment.
9382
a196ebeb
WT
93832013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
9384
9385 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
9386 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
9387 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
9388 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
9389 (srv_amd64_regobj): Add amd64-mpx.o.
9390 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
9391 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
9392 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
9393 * i387-fp.c (num_pl_bnd_register) Added constant.
9394 (num_pl_bnd_cfg_registers) Added constant.
9395 (struct i387_xsave) Added reserved area and MPX fields.
9396 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
9397 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
9398 function.
9399 (tdesc_i386_mpx_linux): Add MPX amd64 target.
9400 (init_registers_amd64_mpx_linux): Declare new function.
9401 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
9402 (x86_64_regmap): Add MPX registers.
9403 (x86_linux_read_description): Add MPX case.
9404 (initialize_low_arch): Initialize MPX targets.
9405
0080a2f6
TT
94062013-11-18 Tom Tromey <tromey@redhat.com>
9407
9408 * configure: Rebuild.
9409 * configure.ac: Don't check for stdlib.h.
9410 * gdbreplay.c: Unconditionally include stdlib.h.
9411
2978b111
TT
94122013-11-18 Tom Tromey <tromey@redhat.com>
9413
9414 * config.in: Rebuild.
9415 * configure: Rebuild.
9416 * configure.ac: Don't use AC_HEADER_DIRENT.
9417
a3d08894
TT
94182013-11-18 Tom Tromey <tromey@redhat.com>
9419
9420 * server.h: Don't check HAVE_STRING_H.
9421 * gdbreplay.c: Don't check HAVE_STRING_H.
9422 * configure: Rebuild.
9423
0a5dd17d
TT
94242013-11-18 Tom Tromey <tromey@redhat.com>
9425
9426 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
9427 LIBGNU.
9428
1bd2f0ba
TT
94292013-11-08 Tom Tromey <tromey@redhat.com>
9430
9431 * configure, config.in: Rebuild.
9432 * configure.ac: Remove unused configury.
9433
3266f10b
TT
94342013-11-08 Tom Tromey <tromey@redhat.com>
9435
9436 * acinclude.m4: Include common.m4, codeset.m4.
9437 * configure, config.in: Rebuild.
9438 * configure.ac: Use GDB_AC_COMMON.
9439
6682d959
AA
94402013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
9441
9442 * linux-s390-low.c (HWCAP_S390_TE): New define.
9443 (s390_arch_setup): Consider the TE field in the HWCAP for
9444 determining 'have_regset_tdb'.
9445
fd0a4d76
SDJ
94462013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
9447
9448 PR gdb/16014
9449 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
9450 call to sizeof.
9451
1a3d890b
PA
94522013-10-02 Pedro Alves <palves@redhat.com>
9453
9454 * server.c (process_serial_event): Don't output "GDBserver
9455 exiting" if GDB is connected through stdio.
9456 * target.c (mywait): Likewise, be silent if GDB is connected
9457 through stdio.
9458
97ad4581
JB
94592013-10-01 Joel Brobecker <brobecker@adacore.com>
9460
9461 * lynx-low.c (lynx_add_threads_after_attach): New function.
9462 (lynx_attach): Remove call to add_thread. Add call to
9463 lynx_add_threads_after_attach instead.
9464
5b4e221c
MF
94652013-09-28 Mike Frysinger <vapier@gentoo.org>
9466
9467 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
9468 * config.in, configure: Regenerated.
9469
ee47b2f8
YQ
94702013-09-18 Yao Qi <yao@codesourcery.com>
9471
9472 PR server/15959
9473 * server.c (start_inferior): Clear 'resume_info'.
9474
d6707650 94752013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 9476
d6707650
JW
9477 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
9478 for each register.
9479
9243dd0e 94802013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 9481
9243dd0e
JW
9482 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
9483 linux-tile-low.o to srv_tgtobj.
9484
c623a6ef
WN
94852013-09-16 Will Newton <will.newton@linaro.org>
9486
9487 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
9488 out regs.
9489
fb71d39e
PA
94902013-09-06 Pedro Alves <palves@redhat.com>
9491
9492 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
9493 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
9494 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
9495 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
9496 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
9497 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
9498
8e7e9910
PA
94992013-09-06 Pedro Alves <palves@redhat.com>
9500
9501 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
9502 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
9503
7c3a12ca
PA
95042013-09-06 Pedro Alves <palves@redhat.com>
9505
9506 * linux-amd64-ipa.c: Include tracepoint.h.
9507 * linux-i386-ipa.c: Include tracepoint.h.
9508
8eb3d7b6
RW
95092013-09-06 Ricard Wanderlof <ricardw@axis.com>
9510
9511 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
9512 (ps_get_thread_area): New function.
9513
eddddb9d
RW
95142013-09-06 Ricard Wanderlof <ricardw@axis.com>
9515
9516 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
9517 (initialize_low_arch): Call init_registers_crisv32 rather than
9518 init_register_crisv32.
9519
533b0600
PA
95202013-09-05 Pedro Alves <palves@redhat.com>
9521
9522 * server.h (handle_vFile, hostio_last_error_from_errno): Move
9523 to ...
9524 * hostio.h: ... this new file.
9525 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
9526 win32-low.c: Include hostio.h.
9527
0ce3d3b5
PA
95282013-09-05 Pedro Alves <palves@redhat.com>
9529
9530 * server.h (gdb_client_data, handler_func, callback_handler_func)
9531 (delete_file_handler, add_file_handler, append_callback_event)
9532 (delete_callback_event, start_event_loop, initialize_event_loop):
9533 Move to event-loop.h and include it.
9534 * event-loop.h: New file.
9535
799cdc37
PA
95362013-09-05 Pedro Alves <palves@redhat.com>
9537
9538 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
9539 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
9540 (loaded_dll, unloaded_dll): Move to ...
9541 * dll.h: ... this new file.
9542 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
9543
6a6bbd9d
PA
95442013-09-05 Pedro Alves <palves@redhat.com>
9545
9546 * server.h (current_process, get_thread_process, all_processes)
9547 (add_inferior_to_list, for_each_inferior, current_inferior)
9548 (remove_inferior, add_process, remove_process, find_process_pid)
9549 (have_started_inferiors_p, have_attached_inferiors_p)
9550 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
9551 (clear_inferiors, find_inferior, find_inferior_id)
9552 (inferior_target_data, set_inferior_target_data)
9553 (inferior_regcache_data, set_inferior_regcache_data): Move to
9554 inferiors.h, and include it.
9555 * inferiors.h: New file.
9556
f699aaba
PA
95572013-09-05 Pedro Alves <palves@redhat.com>
9558
9559 * server.h (struct emit_ops, current_insn_ptr, emit_error):
9560 Move ...
72f4393d 9561 * ax.h: ... here.
f699aaba 9562
c144c7a0
PA
95632013-09-05 Pedro Alves <palves@redhat.com>
9564
9565 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
9566 tracepoint.h.
9567 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
9568 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
9569 (handle_tracepoint_general_set, handle_tracepoint_query)
9570 (tracepoint_finished_step, tracepoint_was_hit)
9571 (release_while_stepping_state_list, current_traceframe)
9572 (in_readonly_region, traceframe_read_mem)
9573 (fetch_traceframe_registers, traceframe_read_sdata)
9574 (traceframe_read_info, struct fast_tpoint_collect_status)
9575 (fast_tracepoint_collecting, force_unlock_trace_buffer)
9576 (handle_tracepoit_bkpts, initialize_low_tracepoint)
9577 (supply_fast_tracepoint_registers)
9578 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
9579 (ipa_tdesc, claim_trampoline_space)
9580 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
9581 (agent_mem_read, agent_get_trace_state_variable_value)
9582 (agent_set_trace_state_variable_value, agent_tsv_read)
9583 (agent_mem_read_string, get_raw_reg_func_addr)
9584 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
9585 * tracepoint.h: ... this new file.
9586
ff42e6ab
PA
95872013-09-05 Pedro Alves <palves@redhat.com>
9588
9589 * server.h (perror_with_name, error, fatal, warning, paddress)
9590 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
9591 include it.
9592 * utils.h: New file.
9593
541af0f4
PA
95942013-09-05 Pedro Alves <palves@redhat.com>
9595
9596 * server.h (remote_debug, noack_mode, transport_is_reliable)
9597 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
9598 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
9599 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
9600 (write_enn, initialize_async_io, enable_async_io)
9601 (disable_async_io, check_remote_input_interrupt_request)
9602 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
9603 (dead_thread_notify, prepare_resume_reply)
9604 (decode_address_to_semicolon, decode_address, decode_m_packet)
9605 (decode_M_packet, decode_X_packet, decode_xfer_write)
9606 (decode_search_memory_packet, unhexify, hexify)
9607 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
9608 (look_up_one_symbol, relocate_instruction)
9609 (monitor_output): Move to remote-utils.h, and include it.
9610 * remote-utils.h: New file.
9611
eebdf26b
PA
96122013-09-05 Pedro Alves <palves@redhat.com>
9613
9614 * server.h (_): Delete.
9615
3aafd2ff
PA
96162013-09-02 Pedro Alves <palves@redhat.com>
9617
9618 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
9619 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
9620 allocated.
9621 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
9622
cee83bcb
PM
96232013-09-02 Pierre Muller <muller@sourceware.org>
9624
9625 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
9626 or WriteProcessMemory complete successfully and handle
9627 ERROR_PARTIAL_COPY error.
9628
9a13b2fa
PA
96292013-09-02 Pedro Alves <palves@redhat.com>
9630
9631 * server.c (gdb_read_memory): Return -1 on traceframe memory read
9632 error instead of EIO.
9633
602e3198
JK
96342013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9635
9636 PR server/15604
9637 * linux-low.c: Include filestuff.h.
9638 (linux_create_inferior) <pid == 0>: Call close_most_fds.
9639 * lynx-low.c: Include filestuff.h.
9640 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
9641 * server.c: Include filestuff.h.
9642 (main): Call notice_open_fds.
9643 * spu-low.c: Include filestuff.h.
9644 (spu_create_inferior) <pid == 0>: Call close_most_fds.
9645
96d7229d
LM
96462013-08-22 Luis Machado <lgustavo@codesourcery.com>
9647
9648 * Makefile.in: Explain why ../target and ../nat are not
9649 listed as include file search paths.
9650 (linux-waitpid.o): New object file rule.
9651 * configure.srv (srv_native_linux_obj): New variable.
9652 Replace all occurrences of linux native object files with
9653 $srv_native_linux_obj.
9654 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
9655 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
9656 (linux_enable_event_reporting): Remove declaration.
9657 (my_waitpid): Moved to common/linux-waitpid.c.
9658 (linux_wait_for_event): Pass ptid when calling
9659 linux_enable_event_reporting.
9660 (linux_supports_tracefork_flag): Remove.
9661 (linux_enable_event_reporting): Likewise.
9662 (linux_tracefork_grandchild): Remove.
9663 (STACK_SIZE): Moved to common/linux-ptrace.c.
9664 (linux_tracefork_child): Remove.
9665 (linux_test_for_tracefork): Remove.
9666 (linux_look_up_symbols): Call linux_supports_traceclone.
9667 (initialize_low): Remove call to linux_test_for_tracefork.
9668 * linux-low.h (PTRACE_TYPE_ARG3): Move to
9669 common/linux-ptrace.h.
9670 (PTRACE_TYPE_ARG4): Likewise.
9671 Include linux-ptrace.h.
9672
32940073
PA
96732013-08-21 Pedro Alves <palves@redhat.com>
9674
9675 * config.in: Renegerate.
9676
33b60d58 96772013-08-19 Luis Machado <lgustavo@codesourcery.com>
a261b8f5 9678
33b60d58
LM
9679 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
9680 (SFILES): Remove $(srcdir)/common/target-common.c and
9681 add $(srcdir)/target/waitstatus.c.
9682 (OBS): Remove target-common.o and add waitstatus.o.
9683 (server_h): Remove $(srcdir)/../common/target-common.h and
9684 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
9685 and $(srcdir)/../target/waitstatus.h.
9686 (target-common.o): Remove.
9687 (waitstatus.o): New target object file.
9688 * target.h: Do not include target-common.h and
9689 include target/resume.h, target/wait.h and
9690 target/waitstatus.h.
9691
b8e1b30e
LM
96922013-08-13 Luis Machado <lgustavo@codesourcery.com>
9693
9694 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
9695 to PTRACE_TYPE_ARG3.
9696 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
9697 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
9698 PTRACE_TYPE_ARG4.
9699 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
9700 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
9701
7a60ad40
YQ
97022013-07-27 Jie Zhang <jie@codesourcery.com>
9703 Daniel Jacobowitz <dan@codesourcery.com>
9704 Yao Qi <yao@codesourcery.com>
9705
9706 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
9707 (mips-linux-watch.o): New rule.
9708 (mips_linux_watch_h): New variable.
9709 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
9710 srv_tgtobj.
9711 * linux-mips-low.c: Include mips-linux-watch.h.
9712 (struct arch_process_info, struct arch_lwp_info): New.
9713 (update_watch_registers_callback): New function.
9714 (mips_linux_new_process, mips_linux_new_thread) New functions.
9715 (mips_linux_prepare_to_resume, mips_insert_point): New
9716 functions.
9717 (mips_remove_point, mips_stopped_by_watchpoint): New
9718 functions.
9719 (rsp_bp_type_to_target_hw_bp_type): New function.
9720 (mips_stopped_data_address): New function.
9721 (the_low_target): Add watchpoint support functions.
9722
de6f69ad
YQ
97232013-07-27 Yao Qi <yao@codesourcery.com>
9724
9725 * i386-low.c: Include break-common.h.
9726 (enum target_hw_bp_type): Remove.
9727
3360c0bf
LM
97282013-07-24 Luis Machado <lgustavo@codesourcery.com>
9729
9730 * Makefile.in (SFILES): /common/target-common.c.
9731 (OBS): Add target-common.o.
9732 (server_h): Add $(srcdir)/../common/target-common.h.
9733 (target-common.o): New target.
9734 * server.c (queue_stop_reply_callback): Free
9735 status string after use.
9736 * target.c (target_waitstatus_to_string): Remove.
9737 * target.h: Include target-common.h.
9738 (resume_kind): Likewise.
9739 (target_waitkind): Likewise.
9740 (target_waitstatus): Likewise.
9741 (TARGET_WNOHANG): Likewise.
9742
bd885420
YQ
97432013-07-04 Yao Qi <yao@codesourcery.com>
9744
9745 * Makefile.in (host_alias): Use @host_noncanonical@.
9746 (target_alias): Use @target_noncanonical@.
9747 * configure.ac: Use ACX_NONCANONICAL_TARGET and
9748 ACX_NONCANONICAL_HOST.
9749 * configure: Regenerated.
9750
9751 Revert:
9752 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
9753
9754 * configure.ac (version_host, version_target): Set and AC_SUBST them.
9755 * configure: Rebuild.
9756 * Makefile.in (version_host, version_target): Get from configure.
9757 (version.c): Use $(version_host) and $(version_target).
9758
17ef446e
PA
97592013-07-03 Pedro Alves <palves@redhat.com>
9760
9761 * Makefile.in (config.status): Depend on development.sh.
9762 * acinclude.m4: Include libmcheck.m4.
9763 * configure: Regenerate.
9764
7a9a7487
MG
97652013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
9766
9767 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
9768 attribute inside the parentheses.
9769 (winapi_DebugSetProcessKillOnExit): Ditto.
9770 (winapi_DebugBreakProcess): Ditto.
9771 (winapi_GenerateConsoleCtrlEvent): Ditto.
a261b8f5 9772
49b64de6
MG
97732013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
9774
9775 * notif.h (notif_event): Add a dummy member to avoid compiler
9776 errors.
9777
d5749ee7
PA
97782013-07-01 Pedro Alves <palves@redhat.com>
9779
9780 * hostio.c (HOSTIO_PATH_MAX): Define.
9781 (require_filename, handle_open, handle_unlink, handle_readlink):
9782 Use it.
9783
d8d2a3ee
PA
97842013-07-01 Pedro Alves <palves@redhat.com>
9785
9786 * server.h: Include "pathmax.h".
9787 * linux-low.c: Don't include sys/param.h.
9788 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
9789 MAXPATHLEN.
9790 * win32-low.c: Don't include sys/param.h.
9791 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
9792
bc7dea8d
PA
97932013-07-01 Pedro Alves <palves@redhat.com>
9794
9795 * event-loop.c: Don't check HAVE_UNISTD_H before including
9796 <unistd.h>.
9797 * gdbreplay.c: Likewise.
9798 * remote-utils.c: Likewise.
9799 * server.c: Likewise.
9800 * configure.ac: Don't check for unistd.h.
9801 * configure: Regenerate.
9802
d6c2da54
TT
98032013-06-28 Tom Tromey <tromey@redhat.com>
9804
9805 * Makefile.in (version.c): Use version.in, not
9806 common/version.in.
9807
257b6bec
MG
98082013-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
86ebe149
DK
98152013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
9816
9817 Fix trace-status to output user name without trailing colon.
9818 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
9819
f30aa5af
DK
98202013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
9821
9822 Fix trace-status to output proper start-time and stop-time.
9823 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
9824 output start time and stop time in hex as gdb expects.
9825
28a93511
YQ
98262013-06-26 Pedro Alves <pedro@codesourcery.com>
9827
9828 * tracepoint.c (build_traceframe_info_xml): Output trace state
9829 variables present in the trace buffer.
9830
01208463
TT
98312013-06-24 Tom Tromey <tromey@redhat.com>
9832
9833 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
9834 create-version.sh.
9835 (version.o): Remove.
9836 * gdbreplay.c: Include version.h.
9837 (version, host_name): Don't declare.
9838 * server.h: Include version.h.
9839 (version, host_name): Don't declare.
9840
760256f9
PA
98412013-06-12 Pedro Alves <palves@redhat.com>
9842
9843 * linux-x86-low.c (linux_is_elf64): Delete global.
9844 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
9845 with local linux_pid_exe_is_elf_64_file use.
9846
030031ee
PA
98472013-06-11 Pedro Alves <palves@redhat.com>
9848
9849 * linux-low.c (regset_disabled, disable_regset): New functions.
9850 (regsets_fetch_inferior_registers)
9851 (regsets_store_inferior_registers): Use them.
9852 (initialize_regsets_info); Don't allocate the disabled_regsets
9853 array here.
9854 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
9855 comment.
9856
5da6eb0a
PA
98572013-06-11 Pedro Alves <palves@redhat.com>
9858
9859 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
9860 xmalloc.
9861
7e5aaa09
PA
98622013-06-11 Pedro Alves <palves@redhat.com>
9863
9864 * linux-x86-low.c (initialize_low_arch): Call
9865 init_registers_x32_avx_linux.
9866
d878444c
JK
98672013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
9868
9869 Fix compatibility with Android Bionic.
9870 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
9871 it is not empty.
9872
3aee8918
PA
98732013-06-07 Pedro Alves <palves@redhat.com>
9874
5f2b57b5 9875 PR server/14823
3aee8918
PA
9876 * Makefile.in (OBS): Add tdesc.o.
9877 (IPA_OBJS): Add tdesc-ipa.o.
9878 (tdesc-ipa.o): New rule.
9879 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
9880 interface.
9881 * linux-low.c (new_inferior): Delete.
9882 (disabled_regsets, num_regsets): Delete.
9883 (linux_add_process): Adjust to set the new per-process
9884 new_inferior flag.
9885 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
9886 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
9887 was a stop. When calling arch_setup, switch the current inferior
9888 to the thread that got an event.
9889 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
9890 (regsets_fetch_inferior_registers)
9891 (regsets_store_inferior_registers): New regsets_info parameter.
9892 Adjust to use it.
9893 (linux_register_in_regsets): New regs_info parameter. Adjust to
9894 use it.
9895 (register_addr, fetch_register, store_register): New usrregs_info
9896 parameter. Adjust to use it.
9897 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
9898 parameter regs_info. Adjust to use it.
9899 (linux_fetch_registers): Get the current inferior's regs_info, and
9900 adjust to use it.
9901 (linux_store_registers): Ditto.
9902 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
9903 (initialize_low): Don't initialize the target_regsets here. Call
9904 initialize_low_arch.
9905 * linux-low.h (target_regsets): Delete declaration.
9906 (struct regsets_info): New.
9907 (struct usrregs_info): New.
9908 (struct regs_info): New.
9909 (struct process_info_private) <new_inferior>: New field.
9910 (struct linux_target_ops): Delete the num_regs, regmap, and
9911 regset_bitmap fields. New field regs_info.
9912 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
9913 * i387-fp.c (num_xmm_registers): Delete.
9914 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
9915 calls to new interface.
9916 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
9917 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
9918 Infer the number of xmm registers from the regcache's target
9919 description.
9920 * i387-fp.h (num_xmm_registers): Delete.
9921 * inferiors.c (add_thread): Don't install the thread's regcache
9922 here.
9923 * proc-service.c (gregset_info): Fetch the current inferior's
9924 regs_info. Adjust to use it.
9925 * regcache.c: Include tdesc.h.
9926 (register_bytes, reg_defs, num_registers)
9927 (gdbserver_expedite_regs): Delete.
9928 (get_thread_regcache): If the thread doesn't have a regcache yet,
9929 create one, instead of aborting gdbserver.
9930 (regcache_invalidate_one): Rename to ...
9931 (regcache_invalidate_thread): ... this.
9932 (regcache_invalidate_one): New.
9933 (regcache_invalidate): Only invalidate registers of the current
9934 process.
9935 (init_register_cache): Add target_desc parameter, and use it.
9936 (new_register_cache): Ditto. Assert the target description has a
9937 non zero registers_size.
9938 (regcache_cpy): Add assertions. Adjust.
9939 (realloc_register_cache, set_register_cache): Delete.
9940 (registers_to_string, registers_from_string): Adjust.
9941 (find_register_by_name, find_regno, find_register_by_number)
9942 (register_cache_size): Add target_desc parameter, and use it.
9943 (free_register_cache_thread, free_register_cache_thread_one)
9944 (regcache_release, register_cache_size): New.
9945 (register_size): Add target_desc parameter, and use it.
9946 (register_data, supply_register, supply_register_zeroed)
9947 (supply_regblock, supply_register_by_name, collect_register)
9948 (collect_register_as_string, collect_register_by_name): Adjust.
9949 * regcache.h (struct target_desc): Forward declare.
9950 (struct regcache) <tdesc>: New field.
9951 (init_register_cache, new_register_cache): Add target_desc
9952 parameter.
9953 (regcache_invalidate_thread): Declare.
9954 (regcache_invalidate_one): Delete declaration.
9955 (regcache_release): Declare.
9956 (find_register_by_number, register_cache_size, register_size)
9957 (find_regno): Add target_desc parameter.
9958 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
9959 declarations.
9960 * remote-utils.c: Include tdesc.h.
9961 (outreg, prepare_resume_reply): Adjust.
9962 * server.c: Include tdesc.h.
9963 (gdbserver_xmltarget): Delete declaration.
9964 (get_features_xml, process_serial_event): Adjust.
9965 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
9966 declare.
9967 (struct process_info) <tdesc>: New field.
9968 (ipa_tdesc): Declare.
9969 * tdesc.c: New file.
9970 * tdesc.h: New file.
9971 * tracepoint.c: Include tdesc.h.
9972 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
9973 (get_context_regcache): Adjust to pass ipa_tdesc down.
9974 (do_action_at_tracepoint): Adjust to get the register cache size
9975 from the context regcache's description.
9976 (traceframe_walk_blocks): Adjust to get the register cache size
9977 from the current trace frame's description.
9978 (traceframe_get_pc): Adjust to get current trace frame's
9979 description and pass it down.
9980 (gdb_collect): Adjust to get the register cache size from the
9981 IPA's description.
9982 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
9983 (gdbserver_xmltarget): Delete.
9984 (initialize_low_tracepoint): Set the ipa's target description.
9985 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
9986 (initialize_low_tracepoint): Set the ipa's target description.
9987 * linux-x86-low.c: Include tdesc.h.
9988 [__x86_64__] (is_64bit_tdesc): New.
9989 (ps_get_thread_area, x86_get_thread_area): Use it.
9990 (i386_cannot_store_register): Rename to ...
9991 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
9992 (i386_cannot_fetch_register): Rename to ...
9993 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
9994 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
9995 to new interface.
9996 (target_regsets): Rename to ...
9997 (x86_regsets): ... this.
9998 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
9999 interface.
10000 (x86_siginfo_fixup): Use is_64bit_tdesc.
10001 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
10002 (tdesc_x32_avx_linux, tdesc_x32_linux)
10003 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
10004 Declare.
10005 (x86_linux_update_xmltarget): Delete.
10006 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
10007 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
10008 (AMD64_LINUX_USER64_CS): New.
10009 (x86_linux_read_description): New, based on
10010 x86_linux_update_xmltarget.
10011 (same_process_callback): New.
10012 (x86_arch_setup_process_callback): New.
10013 (x86_linux_update_xmltarget): New.
10014 (x86_regsets_info): New.
10015 (amd64_linux_regs_info): New.
10016 (i386_linux_usrregs_info): New.
10017 (i386_linux_regs_info): New.
10018 (x86_linux_regs_info): New.
10019 (x86_arch_setup): Reimplement.
10020 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
10021 (x86_emit_ops): Ditto.
10022 (the_low_target): Adjust. Install x86_linux_regs_info,
10023 x86_cannot_fetch_register, and x86_cannot_store_register.
10024 (initialize_low_arch): New.
10025 * linux-ia64-low.c (tdesc_ia64): Declare.
10026 (ia64_fetch_register): Adjust.
10027 (ia64_usrregs_info, regs_info): New globals.
10028 (ia64_regs_info): New function.
10029 (the_low_target): Adjust.
10030 (initialize_low_arch): New function.
10031 * linux-sparc-low.c (tdesc_sparc64): Declare.
10032 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
10033 Adjust.
10034 (sparc_arch_setup): New function.
10035 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
10036 (the_low_target): Adjust.
10037 (initialize_low_arch): New function.
10038 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
10039 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
10040 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
10041 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
10042 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
10043 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
10044 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
10045 (tdesc_powerpc_isa205_vsx64l): Declare.
10046 (ppc_cannot_store_register, ppc_collect_ptrace_register)
10047 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
10048 (ppc_set_pc, ppc_get_hwcap): Adjust.
10049 (ppc_usrregs_info): Forward declare.
10050 (!__powerpc64__) ppc_regmap_adjusted: New global.
10051 (ppc_arch_setup): Adjust to the current process'es target
10052 description.
10053 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
10054 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
10055 (ppc_store_evrregset): Adjust.
10056 (target_regsets): Rename to ...
10057 (ppc_regsets): ... this, and make static.
10058 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
10059 (ppc_regs_info): New function.
10060 (the_low_target): Adjust.
10061 (initialize_low_arch): New function.
10062 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
10063 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
10064 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
10065 (tdesc_s390x_linux64v2): Declare.
10066 (s390_collect_ptrace_register, s390_supply_ptrace_register)
10067 (s390_fill_gregset, s390_store_last_break): Adjust.
10068 (target_regsets): Rename to ...
10069 (s390_regsets): ... this, and make static.
10070 (s390_get_pc, s390_set_pc): Adjust.
10071 (s390_get_hwcap): New target_desc parameter, and use it.
10072 [__s390x__] (have_hwcap_s390_high_gprs): New global.
10073 (s390_arch_setup): Adjust to set the current process'es target
10074 description. Don't adjust the regmap.
10075 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
10076 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
10077 (regs_info_3264): New globals.
10078 (s390_regs_info): New function.
10079 (the_low_target): Adjust.
10080 (initialize_low_arch): New function.
10081 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
10082 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
10083 [__mips64] (init_registers_mips_linux)
10084 (init_registers_mips_dsp_linux): Delete defines.
10085 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
10086 (have_dsp): New global.
10087 (mips_read_description): New, based on mips_arch_setup.
10088 (mips_arch_setup): Reimplement.
10089 (get_usrregs_info): New function.
10090 (mips_cannot_fetch_register, mips_cannot_store_register)
10091 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
10092 (mips_fill_fpregset, mips_store_fpregset): Adjust.
10093 (target_regsets): Rename to ...
10094 (mips_regsets): ... this, and make static.
10095 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
10096 (dsp_regs_info, regs_info): New globals.
10097 (mips_regs_info): New function.
10098 (the_low_target): Adjust.
10099 (initialize_low_arch): New function.
10100 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
10101 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
10102 Declare.
10103 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
10104 (arm_read_description): New, with bits factored from
10105 arm_arch_setup.
10106 (arm_arch_setup): Reimplement.
10107 (target_regsets): Rename to ...
10108 (arm_regsets): ... this, and make static.
10109 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
10110 (arm_regs_info): New function.
10111 (the_low_target): Adjust.
10112 (initialize_low_arch): New function.
10113 * linux-m68k-low.c (tdesc_m68k): Declare.
10114 (target_regsets): Rename to ...
10115 (m68k_regsets): ... this, and make static.
10116 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
10117 (m68k_regs_info): New function.
10118 (m68k_arch_setup): New function.
10119 (the_low_target): Adjust.
10120 (initialize_low_arch): New function.
10121 * linux-sh-low.c (tdesc_sharch): Declare.
10122 (target_regsets): Rename to ...
10123 (sh_regsets): ... this, and make static.
10124 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
10125 (sh_regs_info, sh_arch_setup): New functions.
10126 (the_low_target): Adjust.
10127 (initialize_low_arch): New function.
10128 * linux-bfin-low.c (tdesc_bfin): Declare.
10129 (bfin_arch_setup): New function.
10130 (bfin_usrregs_info, regs_info): New globals.
10131 (bfin_regs_info): New function.
10132 (the_low_target): Adjust.
10133 (initialize_low_arch): New function.
10134 * linux-cris-low.c (tdesc_cris): Declare.
10135 (cris_arch_setup): New function.
10136 (cris_usrregs_info, regs_info): New globals.
10137 (cris_regs_info): New function.
10138 (the_low_target): Adjust.
10139 (initialize_low_arch): New function.
10140 * linux-cris-low.c (tdesc_crisv32): Declare.
10141 (cris_arch_setup): New function.
10142 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
10143 (cris_regs_info): New function.
10144 (the_low_target): Adjust.
10145 (initialize_low_arch): New function.
10146 * linux-m32r-low.c (tdesc_m32r): Declare.
10147 (m32r_arch_setup): New function.
10148 (m32r_usrregs_info, regs_info): New globals.
10149 (m32r_regs_info): Adjust.
10150 (initialize_low_arch): New function.
10151 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
10152 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
10153 (tic6x_usrregs_info): Forward declare.
10154 (tic6x_read_description): New function, based on ...
10155 (tic6x_arch_setup): ... this. Reimplement.
10156 (target_regsets): Rename to ...
10157 (tic6x_regsets): ... this, and make static.
10158 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
10159 (tic6x_regs_info): New function.
10160 (the_low_target): Adjust.
10161 (initialize_low_arch): New function.
10162 * linux-xtensa-low.c (tdesc_xtensa): Declare.
10163 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
10164 (target_regsets): Rename to ...
10165 (xtensa_regsets): ... this, and make static.
10166 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
10167 globals.
10168 (xtensa_arch_setup, xtensa_regs_info): New functions.
10169 (the_low_target): Adjust.
10170 (initialize_low_arch): New function.
10171 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
10172 (nios2_arch_setup): Set the current process'es tdesc.
10173 (target_regsets): Rename to ...
10174 (nios2_regsets): ... this.
10175 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
10176 (nios2_regs_info): New function.
10177 (the_low_target): Adjust.
10178 (initialize_low_arch): New function.
a261b8f5
PA
10179 * linux-aarch64-low.c (tdesc_aarch64): Declare.
10180 (aarch64_arch_setup): Set the current process'es tdesc.
10181 (target_regsets): Rename to ...
10182 (aarch64_regsets): ... this.
10183 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
10184 (aarch64_regs_info): New function.
10185 (the_low_target): Adjust.
10186 (initialize_low_arch): New function.
3aee8918
PA
10187 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
10188 globals.
10189 (target_regsets): Rename to ...
10190 (tile_regsets): ... this.
10191 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
10192 (tile_regs_info): New function.
10193 (tile_arch_setup): Set the current process'es tdesc.
10194 (the_low_target): Adjust.
10195 (initialize_low_arch): New function.
10196 * spu-low.c (tdesc_spu): Declare.
10197 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
10198 * win32-arm-low.c (tdesc_arm): Declare.
10199 (arm_arch_setup): New function.
10200 (the_low_target): Install arm_arch_setup instead of
10201 init_registers_arm.
10202 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
10203 (init_windows_x86): Rename to ...
10204 (i386_arch_setup): ... this. Set `win32_tdesc'.
10205 (the_low_target): Adjust.
10206 * win32-low.c (win32_tdesc): New global.
10207 (child_add_thread): Don't create the thread cache here.
10208 (do_initial_child_stuff): Set the new process'es tdesc.
10209 * win32-low.h (struct target_desc): Forward declare.
10210 (win32_tdesc): Declare.
10211 * lynx-i386-low.c (tdesc_i386): Declare global.
10212 (lynx_i386_arch_setup): Set `lynx_tdesc'.
10213 * lynx-low.c (lynx_tdesc): New global.
10214 (lynx_add_process): Set the new process'es tdesc.
10215 * lynx-low.h (struct target_desc): Forward declare.
10216 (lynx_tdesc): Declare global.
10217 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
10218 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
10219 * nto-low.c (nto_tdesc): New global.
10220 (do_attach): Set the new process'es tdesc.
10221 * nto-low.h (struct target_desc): Forward declare.
10222 (nto_tdesc): Declare.
10223 * nto-x86-low.c (tdesc_i386): Declare.
10224 (nto_x86_arch_setup): Set `nto_tdesc'.
10225
b1fbec62
GB
102262013-06-04 Gary Benson <gbenson@redhat.com>
10227
10228 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
10229 to qSupported response when appropriate.
10230 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
10231 with nonzero-length annex.
10232 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
10233 arguments supplied in annex.
10234
d1ec4ce7
DE
102352013-05-31 Doug Evans <dje@google.com>
10236
ac44adcb 10237 PR server/15594
d1ec4ce7
DE
10238 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
10239 64 bits in 64-cross-32 environment.
10240
9b25f2d3
PA
102412013-05-28 Pedro Alves <palves@redhat.com>
10242
10243 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
10244 (aarch64-without-fpu.c): Delete rule.
10245 * configure.srv (aarch64*-*-linux*): Remove references to
10246 aarch64-without-fpu.o and aarch64-without-fpu.xml.
10247 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
10248 declaration.
10249
6740dc9c
PA
102502013-05-24 Pedro Alves <palves@redhat.com>
10251
10252 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
10253 instead of strchr/decode_address. Error if the range isn't split
10254 with a ','. Don't assume there's be a ':' in the action.
10255
c2d6af84
PA
102562013-05-23 Yao Qi <yao@codesourcery.com>
10257 Pedro Alves <palves@redhat.com>
10258
10259 * linux-low.c (lwp_in_step_range): New function.
10260 (linux_wait_1): If the thread was range stepping and stopped
10261 outside the stepping range, report the stop to GDB. Otherwise,
10262 continue stepping. Add range stepping debug output.
10263 (linux_set_resume_request): Copy the step range from the resume
10264 request to the lwp.
10265 (linux_supports_range_stepping): New.
10266 (linux_target_ops) <supports_range_stepping>: Set to
10267 linux_supports_range_stepping.
10268 * linux-low.h (struct linux_target_ops)
10269 <supports_range_stepping>: New field.
10270 (struct lwp_info) <step_range_start, step_range_end>: New fields.
10271 * linux-x86-low.c (x86_supports_range_stepping): New.
10272 (the_low_target) <supports_range_stepping>: Set to
10273 x86_supports_range_stepping.
10274 * server.c (handle_v_cont): Handle 'r' action.
10275 (handle_v_requests): Append ";r" if the target supports range
10276 stepping.
10277 * target.h (struct thread_resume) <step_range_start,
10278 step_range_end>: New fields.
10279 (struct target_ops) <supports_range_stepping>:
10280 New field.
10281 (target_supports_range_stepping): New macro.
10282
58794e1a
JB
102832013-05-17 Joel Brobecker <brobecker@adacore.com>
10284
10285 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
10286 confusion in comment.
10287
d631c5a7
JB
102882013-05-17 Joel Brobecker <brobecker@adacore.com>
10289
10290 * lynx-low.c (struct process_info_private): New type.
10291 (lynx_add_process): New function.
10292 (lynx_create_inferior, lynx_attach): Replace calls to
10293 add_process by calls to lynx_add_process.
10294 (lynx_resume): If PTID is null, then try using
10295 current_process()->private->last_wait_event_ptid.
10296 Add comments.
10297 (lynx_clear_inferiors): Delete. The contents of that function
10298 has been inlined in lynx_mourn;
10299 (lynx_wait_1): Save the ptid in the process's private data.
10300 (lynx_mourn): Free the process' private data. Replace call
10301 to lynx_clear_inferiors by call to clear_inferiors.
10302
96f7a20f
YQ
103032013-05-17 Yao Qi <yao@codesourcery.com>
10304
10305 * i386-low.c (i386_length_and_rw_bits): Move the comment to
10306 the right place.
10307
db0dfaa0
LM
103082013-05-16 Luis Machado <lgustavo@codesourcery.com>
10309
10310 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
10311 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
10312 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
10313 PT_TEXT_END_ADDR guards. Update comments.
10314 (linux_target_op) <read_offsets>: Conditionally define to
10315 linux_read_offsets if the target is UCLIBC and if it defines
10316 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
10317
68f5f838
SL
103182013-05-06 Sandra Loosemore <sandra@codesourcery.com>
10319 Andrew Jenner <andrew@codesourcery.com>
10320
10321 * Makefile.in (SFILES): Add linux-nios2-low.c.
10322 (clean): Add action to delete nios2-linux.c.
10323 (nios2-linux.c): New rule.
10324 * configure.srv: Add nios2*-*-linux*.
10325 * linux-nios2-low.c: New.
10326
1ebff1fd
HAQ
103272013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
10328
10329 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
10330
f6150862
HZ
103312013-04-25 Hui Zhu <hui@codesourcery.com>
10332
10333 PR gdb/15186
f6150862
HZ
10334 * ax.c (ax_printf): Add fflush.
10335
614c279d
TT
103362013-04-22 Tom Tromey <tromey@redhat.com>
10337
10338 * Makefile.in (SFILES): Add filestuff.c.
10339 (OBS): Add filestuff.o.
10340 (filestuff.o): New target.
10341 * config.in, configure: Rebuild.
10342 * configure.ac: Check for fdwalk, pipe2.
10343
7d4e5717
PA
103442013-04-17 Pedro Alves <palves@redhat.com>
10345
10346 * configure.ac (USE_THREAD_DB): Delete variable.
10347 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
10348 Don't AC_SUBST USE_THREAD_DB.
10349 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
10350 * config.in, configure: Regenerate.
10351
d5c93e41
PA
103522013-04-16 Pedro Alves <palves@redhat.com>
10353
10354 * linux-low.h (struct lwp_info) <thread_known>: Move under
10355 the USE_THREAD_DB #ifdef.
10356
04f5fe89
PA
103572013-04-16 Pedro Alves <palves@redhat.com>
10358
10359 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
10360 (linux-low.o): Delete rule.
10361 * linux-low.h: Always include "gdb_thread_db.h" instead of
10362 conditionally including thread_db.h.
10363 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
10364 HAVE_THREAD_DB_H.
10365
480b27bf
JK
103662013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
10367
10368 * Makefile.in (install-only): Fix make install regression.
10369
43662968
JK
103702013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
10371
10372 Convert man pages to texinfo, new gdbinit.5 texinfo page.
10373 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
10374 installation.
10375 * gdbserver.1: Remove.
10376
3e74e146
PA
103772013-03-22 Pedro Alves <palves@redhat.com>
10378
10379 * linux-low.c (handle_extended_wait): Don't call
10380 linux_enable_event_reporting.
10381
a8347a2a
TT
103822013-03-15 Tony Theodore <tonyt@logyst.com>
10383
10384 PR build/9098:
10385 * Makefile.in (SHELL): Use @SHELL@.
10386
eeb56fa7
SDJ
103872013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
10388
10389 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
10390 compiler warning.
10391
4fa7e2ff
JB
103922013-03-13 Joel Brobecker <brobecker@adacore.com>
10393
10394 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
10395 Remove extraneous NULL element.
10396
8ddb1965
YQ
103972013-03-13 Yao Qi <yao@codesourcery.com>
10398
10399 * tracepoint.c (traceframe_read_tsv): Look for the last matched
10400 'V' block in trace frame.
10401
9accd112
MM
104022013-03-11 Markus Metzger <markus.t.metzger@intel.com>
10403
10404 * target.h (struct target_ops): Add btrace ops.
10405 (target_supports_btrace): New macro.
10406 (target_enable_btrace): New macro.
10407 (target_disable_btrace): New macro.
10408 (target_read_btrace): New macro.
10409 * gdbthread.h (struct thread_info): Add btrace field.
10410 * server.c: Include btrace-common.h.
10411 (handle_btrace_general_set): New function.
10412 (handle_btrace_enable): New function.
10413 (handle_btrace_disable): New function.
10414 (handle_general_set): Call handle_btrace_general_set.
10415 (handle_qxfer_btrace): New function.
10416 (struct qxfer qxfer_packets[]): Add btrace entry.
10417 * inferiors.c (remove_thread): Disable btrace.
10418 * linux-low: Include linux-btrace.h.
10419 (linux_low_enable_btrace): New function.
10420 (linux_low_read_btrace): New function.
10421 (linux_target_ops): Add btrace ops.
10422 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
10423 Add srv_linux_btrace=yes.
10424 (x86_64-*-linux*): Add linux-btrace.o.
10425 Add srv_linux_btrace=yes.
10426 * configure.ac: Define HAVE_LINUX_BTRACE.
10427 * config.in: Regenerated.
10428 * configure: Regenerated.
10429
5cc22e4c
MM
104302013-03-11 Markus Metzger <markus.t.metzger@intel.com>
10431
10432 * server.c (handle_qxfer): Preserve error message if -3 is
10433 returned.
10434 (qxfer): Document the -3 return value.
10435
7c97f91e
MM
104362013-03-11 Markus Metzger <markus.t.metzger@intel.com>
10437
10438 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
10439 (linux_btrace_h): New variable.
10440 (linux-btrace.o): New rule.
10441
be9a119c 104422013-03-08 Stan Shebs <stan@codesourcery.com>
f6f899bf
HAQ
10443 Hafiz Abid Qadeer <abidh@codesourcery.com>
10444
10445 * tracepoint.c (trace_buffer_size): New global.
10446 (DEFAULT_TRACE_BUFFER_SIZE): New define.
10447 (init_trace_buffer): Change to one-argument function. Allocate
10448 trace buffer memory.
10449 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
10450 handle QTBuffer:size packet.
10451 (cmd_bigqtbuffer_size): New function.
10452 (initialize_tracepoint): Call init_trace_buffer with
10453 DEFAULT_TRACE_BUFFER_SIZE.
10454 * server.c (handle_query): Add QTBuffer:size in the
10455 supported packets.
10456
e64f7499
YQ
104572013-03-07 Yao Qi <yao@codesourcery.com>
10458
10459 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
10460 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
10461 of -1.
10462 (cmd_qtsp): Adjust condition. Do post increment.
10463 Set cur_action and cur_step_action back to 0.
10464
f0ae6fc3
PA
104652013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
10466
10467 PR server/15236
10468 * linux-low.c (linux_write_memory): Return early success if LEN is
10469 zero.
10470
b5b0b0af
CV
104712013-03-05 Corinna Vinschen <vinschen@redhat.de>
10472
334ad4a8 10473 * configure.srv: Add x86_64-*-cygwin* as target.
b5b0b0af 10474
589bc927
TT
104752013-02-28 Tom Tromey <tromey@redhat.com>
10476
10477 * configure.ac: Invoke AC_SYS_LARGEFILE.
10478 * configure, config.in: Rebuild.
10479
dfe07582
CV
104802013-02-28 Corinna Vinschen <vinschen@redhat.com>
10481
10482 * win32-low.c: Throughout, fix format strings and casts of
10483 printf-like functions to avoid type related warnings on all
10484 platforms.
10485 (get_child_debug_event): Print dwDebugEventCode as hex since
10486 that's how it's usually documented.
10487
736cd585
YQ
104882013-02-28 Yao Qi <yao@codesourcery.com>
10489
10490 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
10491 pulongest.
10492
e1f58301
JW
104932013-02-27 Jiong Wang <jiwang@tilera.com>
10494
10495 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
10496 (reg-tilegx32.c): New rule.
10497 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
10498 * linux-tile-low.c (tile_arch_setup): New function. Invoke
10499 different register info initializer according to elf class.
10500 (init_registers_tilgx32): New function. The tilegx32 register info
10501 initializer.
10502 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
10503 (tile_store_gregset): Likewise.
10504
d171ca78
YQ
105052013-02-27 Yao Qi <yao@codesourcery.com>
10506
10507 * server.c (process_point_options): Print debug message when
10508 debug_threads is true.
10509
282bbdf3
YQ
105102013-02-26 Yao Qi <yao@codesourcery.com>
10511
10512 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
10513
aca22551
PA
105142013-02-19 Pedro Alves <palves@redhat.com>
10515 Kai Tietz <ktietz@redhat.com>
10516
10517 PR gdb/15161
10518
10519 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
10520 instead of strtoul to extract address from packet.
10521 (process_serial_event) <'z'>: Likewise.
10522
4f3cee1c
YQ
105232013-02-18 Yao Qi <yao@codesourcery.com>
10524
10525 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
10526
8e1d55a3
PA
105272013-02-14 Pedro Alves <palves@redhat.com>
10528
10529 Plug memory leak.
10530
10531 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
10532 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
10533
458820da
PA
105342013-02-14 Pedro Alves <palves@redhat.com>
10535
10536 * tracepoint.c (cmd_qtdpsrc): Use savestring.
10537
baea0dae
PA
105382013-02-14 Pedro Alves <palves@redhat.com>
10539
10540 * tracepoint.c (save_string): Delete.
10541 (add_tracepoint_action): Use savestring instead of save_string.
10542
0b1afbb3
PA
105432013-02-12 Pedro Alves <palves@redhat.com>
10544
10545 * linux-xtensa-low.c: Ditto.
10546 * xtensa-xtregs.c: Ditto.
10547
8a4ac37e
PA
105482013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
10549
10550 * thread-db.c (thread_db_get_tls_address): NULL pointer check
10551 thread_db.
10552
148de6bb
MS
105532013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
10554
10555 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
10556 aarch64_num_wp_regs and aarch64_num_bp_regs to
10557 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
10558
55fac6e0
MS
105592013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
10560
10561 * linux-aarch64-low.c (ps_get_thread_area): Replace
10562 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
10563
176eb98c
MS
105642013-02-04 Jim MacArthur <jim.macarthur@arm.com>
10565 Marcus Shawcroft <marcus.shawcroft@arm.com>
10566 Nigel Stephens <nigel.stephens@arm.com>
10567 Yufeng Zhang <yufeng.zhang@arm.com>
10568
10569 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
10570 (aarch64.c, aarch64-without-fpu.c): New targets.
10571 * configure.srv (aarch64*-*-linux*): New.
10572 * linux-aarch64-low.c: New file.
10573
56f7af9c
MS
105742013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
10575
43aaf8b6 10576 * linux-low.c (handle_extended_wait, linux_create_inferior)
56f7af9c
MS
10577 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
10578 (dequeue_one_deferred_signal, linux_resume_one_thread)
10579 (fetch_register, linux_write_memory, linux_enable_event_reporting)
10580 (linux_tracefork_grandchild, linux_test_for_tracefork)
10581 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
10582 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
10583 where the argument is 0.
10584
60f662b0
YQ
105852013-01-25 Yao Qi <yao@codesourcery.com>
10586
10587 * event-loop.c: Include "queue.h".
10588 (gdb_event_p): New typedef.
10589 (struct gdb_event) <next_event>: Remove.
10590 (event_queue): Change to QUEUE(gdb_event_p).
10591 (async_queue_event): Remove.
10592 (gdb_event_xfree): New.
10593 (initialize_event_loop): New.
10594 (process_event): Use API from QUEUE.
10595 (wait_for_event): Likewise.
10596 * server.c (main): Call initialize_event_loop.
10597 * server.h (initialize_event_loop): Declare.
10598
5ae4861a
YQ
105992013-01-18 Yao Qi <yao@codesourcery.com>
10600
10601 * ax.h (struct eval_agent_expr_context): New.
10602 (gdb_eval_agent_expr): Update declaration.
10603 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
10604 TFRAME. Add new argument CTX.
10605 * server.h (struct eval_agent_expr_context): Declare.
10606 (agent_mem_read, agent_tsv_read): Update declaration.
10607 (agent_mem_read_string): Likewise.
10608 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
10609 (add_traceframe_block): Add new argument TPOINT.
10610 Increase TPOINT->traceframe_usage.
10611 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
10612 eval_tracepoint_agent_expr.
10613 (condition_true_at_tracepoint): Likewise.
10614 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
10615 (agent_mem_read_string, agent_tsv_read): Likewise.
10616
85e00e85
YQ
106172013-01-16 Yao Qi <yao@codesourcery.com>
10618
10619 * linux-low.c (linux_resume_one_lwp): Don't check
10620 'lwp->bp_reinsert != 0'.
10621
4039cf45
JB
106222013-01-07 Joel Brobecker <brobecker@adacore.com>
10623 Pedro Alves <palves@redhat.com>
10624
10625 * lynx-low.c (ptrace_request_to_str): Define a temporary
10626 macro and use it to simplify this function's implementation.
10627
9044dee2
JB
106282013-01-07 Joel Brobecker <brobecker@adacore.com>
10629
10630 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
10631 sets errno.
10632
e6352c8f
JB
106332013-01-07 Joel Brobecker <brobecker@adacore.com>
10634
10635 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
10636
50681a27
JB
106372013-01-07 Joel Brobecker <brobecker@adacore.com>
10638
10639 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
10640
3f6e77ef
JB
106412013-01-07 Joel Brobecker <brobecker@adacore.com>
10642
10643 * lynx-low.c (lynx_resume): Use the resume_info parameter
10644 to determine the ptid for the lynx_ptrace call, unless
10645 it is equal to minus_one_ptid, in which case we use the
10646 ptid of the current_inferior.
10647 (lynx_wait_1): After having received a thread create/exit
10648 event, resume the inferior's execution using the signaling
10649 thread's ptid, rather than the old ptid.
10650
7fda33ae
JB
106512013-01-07 Joel Brobecker <brobecker@adacore.com>
10652
10653 * lynx-low.c (lynx_resume): Delete variable ret.
10654
b9786c74
JB
106552013-01-01 Joel Brobecker <brobecker@adacore.com>
10656
10657 * gdbreplay.c (gdbreplay_version): Update copyright year.
10658 * server.c (gdbserver_version): Likewise.
10659
8b93d60f
JB
106602012-12-17 Joel Brobecker <brobecker@adacore.com>
10661
10662 * lynx-low.c (lynx_wait_1): Add debug trace before adding
10663 new thread.
10664
037335a7
JB
106652012-12-17 Joel Brobecker <brobecker@adacore.com>
10666
10667 * lynx-low.c (ptrace_request_to_str): Add handling for
10668 PTRACE_GETTRACESIG.
10669
52d4cbd8
JB
106702012-12-17 Joel Brobecker <brobecker@adacore.com>
10671
10672 * lynx-low.c (lynx_attach): Delete variable new_process.
10673
ab8f6ca9
JB
106742012-12-17 Joel Brobecker <brobecker@adacore.com>
10675
10676 * lynx-low.c (lynx_create_inferior): Delete variable
10677 new_process.
10678
78cbc024
JB
106792012-12-17 Joel Brobecker <brobecker@adacore.com>
10680
10681 * lynx-low.c (ptrace_request_to_str): Do not handle
10682 PTRACE_GETTHREADLIST if this macro does not exist.
10683
14a00470
YQ
106842012-12-15 Yao Qi <yao@codesourcery.com>
10685
10686 * Makefile.in (OBS): Add notif.o.
10687 * notif.c, notif.h: New.
10688 * server.c: Include "notif.h".
10689 (struct vstop_notif) <next>: Remove.
10690 <base>: New field.
10691 (queue_stop_reply): Update.
10692 (push_event, send_next_stop_reply): Remove.
10693 (discard_queued_stop_replies): Update.
10694 (notif_stop): New variable.
10695 (handle_v_stopped): Remove.
10696 (handle_v_requests): Don't call handle_v_stopped. Call
10697 handle_ack_notif instead.
10698 (queue_stop_reply_callback): Call notif_event_enque instead
10699 of queue_stop_reply.
10700 (handle_status): Don't call send_next_stop_reply, call
10701 notif_write_event instead.
10702 (kill_inferior_callback): Likewise.
10703 (detach_or_kill_inferior_callback): Likewise.
10704 (main): Call initialize_notif.
10705 (process_serial_event): Call QUEUE_is_empty.
10706 (handle_target_event): Call notif_push instead of push event.
10707 * server.h (push_event): Remove declaration.
10708
61c125b9
TT
107092012-12-10 Tom Tromey <tromey@redhat.com>
10710
10711 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
10712 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
10713 macros.
10714 (.c.o): Rewrite.
10715 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
10716 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
10717 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
10718 (amd64-linux-ipa.o, ax.o): Rewrite.
10719 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
10720 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
10721 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
10722 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
10723 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
10724 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
10725 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
10726 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
10727 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
10728 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
10729 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
10730 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
10731 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
10732 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
10733 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
10734 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
10735 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
10736 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
10737 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
10738 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
10739 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
10740 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
10741 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
10742 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
10743 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
10744 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
10745 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
10746 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
10747 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
10748 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
10749 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
10750 (reg-tilegx.o): Remove.
10751 (all_object_files): New macro.
10752 Include .deps files.
10753 * aclocal.m4, configure: Rebuild.
10754 * acinclude.m4: Include depstand.m4, lead-dot.m4.
10755 * configure.ac: Invoke ZW_CREATE_DEPDIR,
10756 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
10757
e90e9ad9
TT
107582012-12-05 Tom Tromey <tromey@redhat.com>
10759
10760 PR gdb/14917:
10761 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
10762
02d403bf 107632012-11-28 Markus Metzger <markus.t.metzger@intel.com>
945bf713
MM
10764
10765 * configure.ac: Check for linux/perf_event.h.
10766 * config.in: Regenerated.
10767 * configure: Regenerated.
10768
0270a750
PA
107692012-11-26 Maxime Villard <rustyBSD@gmx.fr>
10770
10771 * hostio.c (handle_readlink): Decrease buffer size
10772 parameter passed to readlink by one byte.
10773
8c29b58e
YQ
107742012-11-26 Yao Qi <yao@codesourcery.com>
10775
10776 * configure.ac (build_warnings): Append '-Wempty-body'.
10777 * configure: Regenerated.
10778 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
10779 body.
10780
8bdce1ff
PM
107812012-11-15 Pierre Muller <muller@sourceware.org>
10782
10783 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
10784 * config.in: Regenerate.
10785 * configure: Regenerate.
10786 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
10787 Use "gdb_wait.h" header instead of <sys/wait.h> header.
10788 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
10789 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
10790 header.
10791 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
10792 instead of <sys/wait.h> header.
10793 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
10794
02d403bf 107952012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3ba6ad0f
MM
10796
10797 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
10798 (various make rules): Remove -DGDBSERVER
10799
fbd5db48
YQ
108002012-11-09 Yao Qi <yao@codesourcery.com>
10801
10802 * spu-low.c (current_ptid): Move it to ..
10803 * gdbthread.h: ... here. New.
10804 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
10805 * server.c (myresume, process_serial_event): Likewise.
10806 * thread-db.c (thread_db_find_new_threads): Likewise.
10807 * tracepoint.c (run_inferior_command): Likewise.
10808
b3dc46ff
AB
108092012-10-01 Andrew Burgess <aburgess@broadcom.com>
10810
10811 * server.c (handle_search_memory_1): Include access length in
10812 warning message.
10813
07c04788
HPN
108142012-09-05 Michael Brandt <michael.brandt@axis.com>
10815
10816 * linux-crisv32-low.c: Fix compile errors.
10817
918d227b
YQ
108182012-09-04 Yao Qi <yao@codesourcery.com>
10819
10820 * tracepoint.c (cmd_qtsv): Adjust debug message.
10821 Don't check CUR_TPOINT.
10822
18c1b81a
YQ
108232012-08-28 Yao Qi <yao@codesourcery.com>
10824
10825 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
10826 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
10827 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
10828 Remove declarations of xmalloc, xreallloc, xstrdup and
10829 freeargv.
10830 * Makefile.in (libiberty_h): New.
10831 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
10832 (linux-bfin-low.o): Append dependency 'libiberty.h'.
10833
dc82f37b
YQ
108342012-08-23 Yao Qi <yao@codesourcery.com>
10835
10836 * server.h: Remove declaration of 'xsnprintf'.
10837
406b1477
KS
108382012-08-22 Keith Seitz <keiths@redhat.com>
10839
10840 * server.h: Include build-gnulib-gbserver/config.h.
10841 * gdbreplay.c: Likewise.
10842
e6712ff1
DE
108432012-08-08 Doug Evans <dje@google.com>
10844
10845 * Makefile.in (SFILES): Add gdb_vecs.c.
10846 (OBS): Add gdb_vecs.o.
10847 (gdb_vecs_h, host_defs_h): New variables.
10848 (thread-db.o): Add $(gdb_vecs_h) dependency.
10849 (gdb_vecs.o): New rule.
10850 * thread-db.c: #include "gdb_vecs.h".
10851 (thread_db_load_search): Use a vector to iterate over path elements.
10852 Handle text appearing after "$pdir".
10853
10854 * configure.ac: Add check for strstr.
10855 * config.in: Regenerate.
10856 * configure: Regenerate.
10857
7c3270ae
UW
108582012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
10859
10860 * hostio.c (handle_pread): If pread fails, fall back to attempting
10861 lseek/read.
10862 (handle_pwrite): Likewise for pwrite.
10863
b62e2b27
UW
108642012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
10865
10866 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
10867 between unsupported TYPE and unimplementable ADDR/LEN combination.
10868 (arm_insert_point): Act on new return value.
10869
78a99e91
PA
108702012-07-31 Pedro Alves <palves@redhat.com>
10871
10872 * server.c (process_point_options): Only skip tokens if we find
10873 one that is unrecognized. Don't treat 'X' specially while
10874 skipping unrecognized tokens.
10875
fcf303ab
UW
108762012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
10877
10878 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
10879 to 4-byte-align HW breakpoint addresses for Thumb.
10880
7255706c
YQ
108812012-07-27 Yao Qi <yao@codesourcery.com>
10882
10883 PR remote/14161.
10884
10885 * server.h: Declare gdb_agent_about_to_close.
10886 * target.c (kill_inferior): Include "agent.h".
10887 New. Send command 'kill'.
10888 * target.h (kill_inferior): Removed macro.
10889 * tracepoint.c (gdb_agent_about_to_close): New.
10890 (gdb_agent_helper_thread): Handle command 'close'.
10891 Wait endlessly until the inferior stops.
10892 Install gdb_agent_remove_socket to atexit hook.
10893 (agent_socket_name): New static variable.
10894 (gdb_agent_socket_init): Replace local variable 'name' with
10895 'agent_socket_name'.
10896 (gdb_agent_remove_socket): New.
10897
5a3f286f
YQ
108982012-07-27 Yao Qi <yao@codesourcery.com>
10899
10900 * server.c (process_point_options): Stop at 'X' when parsing.
10901
961bd387
ME
109022012-07-19 Michael Eager <eager@eagercon.com>
10903
a261b8f5 10904 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
961bd387
ME
10905 to hw_execute.
10906 * linux-x86-low.c (x86_insert_point, x86_remove_point):
10907 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
10908 hardware breakpoint.
10909
aa7c7447
JK
109102012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
10911
10912 * gdbserver/linux-low.c (initialize_low): Call
10913 linux_ptrace_init_warnings.
10914
7f216e7c
DE
109152012-07-02 Doug Evans <dje@google.com>
10916
10917 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
10918 pointer to int.
10919
d3ce09f5
SS
109202012-07-02 Stan Shebs <stan@codesourcery.com>
10921
10922 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
10923 (ax.o): Add it to build rule.
10924 (ax-ipa.o): Ditto.
10925 (OBS): Add format.o.
10926 (IPA_OBS): Add format.o.
10927 * server.c (handle_query): Claim support for breakpoint commands.
10928 (process_point_options): Add command case.
10929 (process_serial_event): Leave running if there are printfs in
10930 effect.
10931 * mem-break.h (any_persistent_commands): Declare.
10932 (add_breakpoint_commands): Declare.
10933 (gdb_no_commands_at_breakpoint): Declare.
10934 (run_breakpoint_commands): Declare.
10935 * mem-break.c (struct point_command_list): New struct.
10936 (struct breakpoint): New field command_list.
10937 (any_persistent_commands): New function.
10938 (add_commands_to_breakpoint): New function.
10939 (add_breakpoint_commands): New function.
10940 (gdb_no_commands_at_breakpoint): New function.
10941 (run_breakpoint_commands): New function.
10942 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
10943 locally.
10944 * ax.c: Include format.h.
10945 (ax_printf): New function.
10946 (gdb_eval_agent_expr): Add printf opcode.
10947
2f8f6aed
YQ
109482012-06-13 Yao Qi <yao@codesourcery.com>
10949
10950 * server.c (start_inferior): Remove duplicated writes to fields
10951 'last_resume_kind' and 'last_status' of 'current_inferior'.
10952
0c9070b3
YQ
109532012-06-12 Yao Qi <yao@codesourcery.com>
10954 Pedro Alves <palves@redhat.com>
10955
10956 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
10957 comment.
10958 * server.c (handle_v_cont): Extend comment.
10959
c52daf70
YQ
109602012-06-11 Yao Qi <yao@codesourcery.com>
10961
10962 * linux-low.c (linux_attach): Add 'static'.
10963
d38bbb0a
YQ
109642012-06-06 Yao Qi <yao@codesourcery.com>
10965
10966 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
10967
89dc0afd
JK
109682012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
10969
10970 Fix gcc -flto compilation warning.
10971 * server.c (main): Make variable multi_mode and attach volatile.
10972
75f62ce7
TJB
109732012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10974
10975 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
10976 if the platform doesn't know about it.
10977
65f479b6
PA
109782012-05-30 Jeff Kenton <jkenton@tilera.com>
10979
10980 * Makefile.in (SFILES): Add linux-tile-low.c.
10981 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
10982 * configure.srv: Handle tilegx-*-linux*.
10983 * linux-tile-low.c: New file.
10984
0c5bf5a9
JK
109852012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10986
10987 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
10988
a493e3e2
PA
109892012-05-24 Pedro Alves <palves@redhat.com>
10990
10991 PR gdb/7205
10992
43aaf8b6 10993 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
a493e3e2 10994
2ea28649
PA
109952012-05-24 Pedro Alves <palves@redhat.com>
10996
10997 PR gdb/7205
10998
10999 Replace target_signal with gdb_signal throughout.
11000
8d409d16
MR
110012012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
11002
11003 * linux-low.c (linux_store_registers): Avoid the copying sequence
11004 when no data has been retrieved by ptrace.
11005
23512c01
MGD
110062012-05-22 Will Deacon <will.deacon@arm.com>
11007
11008 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
11009 Include asm/ptrace.h.
11010 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
11011 already defined.
11012
4934b29e
MR
110132012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
11014
11015 * linux-low.c (linux_store_registers): Don't re-retrieve data
11016 with ptrace that has already been obtained from /proc. Always
11017 copy any data retrieved with ptrace to the buffer supplied.
11018
bde24c0a
PA
110192012-05-11 Yao Qi <yao@codesourcery.com>
11020 Pedro Alves <palves@redhat.com>
11021
11022 * linux-low.c (enum stopping_threads_kind): New.
11023 (stopping_threads): Change type to `enum stopping_threads_kind'.
11024 (handle_extended_wait): If stopping and suspending threads, leave
11025 the new_lwp suspended too.
11026 (linux_wait_for_event): Adjust.
11027 (stop_all_lwps): Set `stopping_threads' to
11028 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
11029 whether we're suspending threads or just stopping them. Assert no
11030 recursion happens.
11031
623b6bdf
YQ
110322012-04-29 Yao Qi <yao@codesourcery.com>
11033
11034 * server.h: Move some code to ...
11035 * gdbthread.h: ... here. New.
11036 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
11037 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
11038 (nto-low.o, win32-low.o): Likewise.
11039 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
11040 * regcache.c, remote-utils.c, server.c: Likewise.
11041 * target.c, tracepoint.c, win32-low.c: Likewise.
11042
f15f9948
TJB
110432012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
11044
11045 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
11046 (PTRACE_ARG4_TYPE): Likewise.
11047 (PTRACE_XFER_TYPE): Likewise.
11048 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
11049 ptrace to PTRACE_ARG3_TYPE.
11050 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
11051 (PTRACE_ARG4_TYPE): Likewise.
11052 (PTRACE_XFER_TYPE): Likewise.
11053 (linux_detach_one_lwp): Cast fourth argument of
11054 ptrace to long then PTRACE_ARG4_TYPE.
11055 (regsets_fetch_inferior_registers): Cast third argument of
11056 ptrace to long then PTRACE_ARG3_TYPE.
11057 (regsets_store_inferior_registers): Likewise.
11058
38ea300a
PA
110592012-04-20 Pedro Alves <palves@redhat.com>
11060
11061 * configure: Regenerate.
11062
c971b7fa
PA
110632012-04-19 Pedro Alves <palves@redhat.com>
11064
43aaf8b6 11065 * Makefile.in (GNULIB_BUILDDIR): New.
c971b7fa 11066 (LIBGNU, INCGNU, GNULIB_H): Adjust.
43aaf8b6
PA
11067 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
11068 (all, install-only, uninstall, clean-info, all-lib, clean): No
11069 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
11070 (maintainer-clean realclean distclean): Use subdir_do.
11071 (subdir_do): New.
11072 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
c971b7fa 11073 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
43aaf8b6
PA
11074 * acinclude.m4: Include acx_configure_dir.m4.
11075 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
11076 calls. Call AC_PROG_RANLIB. Configure gnulib using
11077 ACX_CONFIGURE_DIR.
11078 (GNULIB): New.
11079 (GNULIB_STDINT_H): Adjust.
11080 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
11081 * gdbreplay.c: Include build-gnulib/config.h.
11082 * server.h: Likewise.
11083 * aclocal.m4: Regenerate.
11084 * config.in: Regenerate.
11085 * configure: Regenerate.
c971b7fa 11086
809277f8
PA
110872012-04-19 Pedro Alves <palves@redhat.com>
11088
11089 * Makefile.in (LIBGNU, INCGNU): Adjust.
11090 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
11091 (all, install-only, uninstall, clean-info, all-lib, clean)
11092 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
11093 * configure.ac: Adjust AC_OUTPUT output.
11094 * aclocal.m4: Regenerate.
11095 * configure: Regenerate.
11096
fd9bb8b8
PA
110972012-04-19 Pedro Alves <palves@redhat.com>
11098
11099 * Makefile.in (generated_files): New.
11100 (server_h): Remove the explicit dependency on config.h, and depend
11101 on $generated_files.
11102
1c298c66
PA
111032012-04-19 Pedro Alves <palves@redhat.com>
11104
11105 * Makefile.in (INCGNU): Add -Ignulib.
11106
57c4b50b
PA
111072012-04-19 Pedro Alves <palves@redhat.com>
11108
11109 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
11110 (INCGNU): ... this, and spell out -I here.
11111 (GNULIB_LIB): Rename to ...
11112 (LIBGNU): ... this.
11113 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
11114
1030e047
PA
111152012-04-19 Pedro Alves <palves@redhat.com>
11116
11117 * config.in: Regenerate.
11118
447d4319
PA
111192012-04-19 Pedro Alves <palves@redhat.com>
11120
11121 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
11122 * server.h (memmem): Remove declaration.
11123 * config.in: Regenerate.
11124 * configure: Regenerate.
11125
aad9eab9
YQ
111262012-04-19 Yao Qi <yao@codesourcery.com>
11127
11128 * Makefile.in (SFILES): Add common/vec.c.
11129 (OBS): Add vec.o.
11130 (vec.o): New rule.
11131
3e10640f
YQ
111322012-04-19 Yao Qi <yao@codesourcery.com>
11133
11134 * remote-utils.c (prepare_resume_reply): Replace with macro
11135 target_core_of_thread.
11136 * server.c (handle_qxfer_threads_proper): Likewise.
11137 * target.h (traget_core_of_thread): New macro.
11138
71622373
PA
111392012-04-18 Pedro Alves <palves@redhat.com>
11140
11141 * aclocal.m4: Regenerate.
11142 * configure: Regenerate.
11143
80d26939
YQ
111442012-04-16 Yao Qi <yao@codesourcery.com>
11145
11146 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
11147 duplicated on address.
11148
42476b70
YQ
111492012-04-16 Yao Qi <yao@codesourcery.com>
11150
11151 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
11152 (struct tracepoint_action_ops) <send>: New field.
11153 (m_tracepoint_action_send, r_tracepoint_action_send): New.
11154 (agent_expr_send, x_tracepoint_action_send): New.
11155 (l_tracepoint_action_send): New.
11156 (cmd_qtdp): Download and install tracepoint
11157 according to `use_agent'.
11158 (run_inferior_command): Add one more parameter `len'.
11159 Update callers.
11160 (tracepoint_send_agent): New.
11161 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
11162
7bc83639
YQ
111632012-04-16 Yao Qi <yao@codesourcery.com>
11164
11165 * tracepoint.c (download_tracepoints): Moved to ...
11166 (cmd_qtstart): ... here.
11167
5f18041e
YQ
111682012-04-14 Yao Qi <yao@codesourcery.com>
11169
11170 * tracepoint.c: Include inttypes.h.
11171 (struct collect_memory_action): Use sized types.
11172 (struct tracepoint): Likewise.
11173 (cmd_qtdp, stop_tracing): Update print specifiers.
11174 (cmd_qtp, response_tracepoint): Likewise.
11175 (collect_data_at_tracepoint): Likewise.
11176 (collect_data_at_step): Likewise.
11177
55a8c076
YQ
111782012-04-14 Yao Qi <yao@codesourcery.com>
11179
11180 Import gnulib module inttypes.
11181 * aclocal.m4, config.in, configure: Regenerated.
11182
dc750257
YQ
111832012-04-14 Yao Qi <yao@codesourcery.com>
11184
11185 * Makefile.in (maintainer-clean, realclean, distclean): Remove
11186 Makefile and config.status at last.
11187
0ab5faf9
YQ
111882012-04-13 Yao Qi <yao@codesourcery.com>
11189
11190 * tracepoint.c: Include stdint.h unconditionally.
11191
18f5fd81
TJB
111922012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
11193
11194 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
11195 on BFD_HAVE_SYS_PROCFS_TYPE.
11196 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
11197 * configure: Regenerate.
11198 * config.in: Likewise.
11199
4d47af5c
L
112002012-04-13 H.J. Lu <hongjiu.lu@intel.com>
11201
11202 * Makefile.in (clean): Also remove x32.c x32-linux.c
11203 x32-avx.c x32-avx-linux.c.
11204 (x32.o): New target.
11205 (x32.c): Likewise.
11206 (x32-linux.o): Likewise.
11207 (x32-linux.c): Likewise.
11208 (x32-avx.o): Likewise.
11209 (x32-avx.c): Likewise.
11210 (x32-avx-linux.o): Likewise.
11211 (x32-avx-linux.c): Likewise.
11212
11213 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
11214 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
11215 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
11216 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
11217 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
11218 i386/x32-avx-linux.xml.
11219
11220 * linux-x86-low.c (init_registers_x32_linux): New prototype.
11221 (init_registers_x32_avx_linux): Likwise.
11222 (x86_linux_update_xmltarget): Call init_registers_x32_linux
11223 or init_registers_x32_avx_linux if linux_is_elf64 is false.
11224
ecedbe58
PA
112252012-04-13 Pedro Alves <palves@redhat.com>
11226
11227 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
11228 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
11229 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
11230 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
11231 the sub-make.
11232
c92b5177
L
112332012-04-12 H.J. Lu <hongjiu.lu@intel.com>
11234
11235 * linux-x86-low.c (compat_x32_clock_t): New.
11236 (compat_x32_siginfo_t): Likewise.
11237 (compat_x32_siginfo_from_siginfo): Likewise.
11238 (siginfo_from_compat_x32_siginfo): Likewise.
11239 (linux_is_elf64): Likewise.
11240 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
11241 and siginfo_from_compat_x32_siginfo for x32.
11242 (x86_arch_setup): Set linux_is_elf64.
11243
214d508e
L
112442012-04-12 H.J. Lu <hongjiu.lu@intel.com>
11245
11246 PR gdb/13969
11247 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
11248 e_machine field.
11249 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
11250 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
11251 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
11252 compatible with process.
11253
c9a1864a
YQ
112542012-04-12 Yao Qi <yao@codesourcery.com>
11255
11256 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
11257 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
11258 (install-only, install-info, clean): Handle sub dir gnulib.
11259 (all-lib, am--refresh): New targets.
11260 (memmem.o): Remove target.
11261 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
11262 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
11263 (AC_REPLACE_FUNCS): Remove memmem.
11264 Invoke gl_INIT and AM_INIT_AUTOMAKE.
11265 (AC_OUTPUT): Generate Makefile in gnulib/.
11266 * aclocal.m4, config.in, configure: Regenerated.
11267
367ba2c2
MR
112682012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
11269
11270 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
11271
9d236627
PA
112722012-04-05 Pedro Alves <palves@redhat.com>
11273
11274 -Werror=strict-aliasing
11275
11276 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
11277 pointer.
11278
111217b3
PA
112792012-04-04 Pedro Alves <palves@redhat.com>
11280
11281 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
11282 (sparc_store_gregset_from_stack, sparc_store_gregset)
11283 (sparc_breakpoint_at): Fix formatting.
11284
8365dcf5
TJB
112852012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
11286
11287 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
11288 are available.
11289 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
11290 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
11291 * config.in: Regenerate.
11292 * configure: Likewise.
11293
689cc2ae
PA
112942012-03-29 Pedro Alves <palves@redhat.com>
11295
11296 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
11297 Correct ptrace arguments.
11298
c14dfd32
PA
112992012-03-28 Pedro Alves <palves@redhat.com>
11300
11301 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
11302 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
11303 (IA64_FR1_REGNUM): New defines.
11304 (ia64_fetch_register): New.
11305 (the_low_target): Install it.
11306 * linux-low.h (struct linux_target_ops) <fetch_register>: New
11307 field.
11308 * linux-low.c (linux_fetch_registers): Try the
11309 the_low_target.fetch_register hook first.
11310
11311 * linux-arm-low.c (the_low_target): Adjust.
11312 * linux-bfin-low.c (the_low_target): Adjust.
11313 * linux-cris-low.c (the_low_target): Adjust.
11314 * linux-crisv32-low.c (the_low_target): Adjust.
11315 * linux-m32r-low.c (the_low_target): Adjust.
11316 * linux-m68k-low.c (the_low_target): Adjust.
11317 * linux-mips-low.c (the_low_target): Adjust.
11318 * linux-ppc-low.c (the_low_target): Adjust.
11319 * linux-s390-low.c (the_low_target): Adjust.
11320 * linux-sh-low.c (the_low_target): Adjust.
11321 * linux-sparc-low.c (the_low_target): Adjust.
11322 * linux-tic6x-low.c (the_low_target): Adjust.
11323 * linux-x86-low.c (the_low_target): Adjust.
11324 * linux-xtensa-low.c (the_low_target): Adjust.
11325
63c88e13
PA
113262012-03-26 Pedro Alves <palves@redhat.com>
11327
11328 * server.c (handle_qxfer_libraries): Don't bail early if
11329 the_target->qxfer_libraries_svr4 is not NULL.
11330
fb723180
PA
113312012-03-26 Pedro Alves <palves@redhat.com>
11332
11333 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
11334
0afae3cf
PA
113352012-03-23 Pedro Alves <palves@redhat.com>
11336
11337 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
11338 "library-list-svr4" element's start tag when the the DSO list is
11339 empty.
11340
485f1ee4
PA
113412012-03-23 Pedro Alves <palves@redhat.com>
11342
11343 * linux-low.c (read_one_ptr): Read the inferior's pointer through
11344 a variable whose type size is the same as the inferior's pointer
11345 size.
11346
a5362b9a
TS
113472012-03-21 Thomas Schwinge <thomas@codesourcery.com>
11348
11349 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
11350 struct siginfo.
11351 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
11352 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
11353 * linux-low.h: Include <signal.h>.
11354 (struct siginfo): Remove forward declaration.
11355 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
11356 struct siginfo.
11357
d226c142
MF
113582012-03-21 Mike Frysinger <vapier@gentoo.org>
11359
11360 * .gitignore: Ignore more files.
11361
122f36ef
PA
113622012-03-19 Pedro Alves <palves@redhat.com>
11363 Jan Kratochvil <jan.kratochvil@redhat.com>
11364
11365 * server.c (cont_thread, general_thread): Add describing comments.
11366 (start_inferior): Clear `cont_thread'.
11367 (handle_v_cont): Don't set `cont_thread' if resuming all threads
11368 of a process.
11369
fc3e5175
YQ
113702012-03-15 Yao Qi <yao@codesourcery.com>
11371
11372 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
11373 handling to ...
11374 (cmd_qtdp): ... here.
11375
8d0d92cd
YQ
113762012-03-15 Yao Qi <yao@codesourcery.com>
11377
11378 * tracepoint.c (struct tracepoint_action_ops): New.
11379 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
11380 (m_tracepoint_action_download): New.
11381 (r_tracepoint_action_download): New.
11382 (x_tracepoint_action_download): New.
11383 (l_tracepoint_action_download): New.
11384 (add_tracepoint_action): Install `action->ops' according type.
11385 (download_tracepoint_1): Move code `download' function pointer
11386 of various tracepoint_action_ops.
11387
87b0bb13
JK
113882012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
11389
11390 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
11391 linux_ptrace_attach_warnings.
11392
5f572dec
JK
113932012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
11394
11395 * Makefile.in (linux-ptrace.o): New.
11396 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
11397 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
11398 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
11399 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
11400 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
11401 of these targets.
11402 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
11403
f4647387
YQ
114042012-03-08 Yao Qi <yao@codesourcery.com>
11405 Pedro Alves <palves@redhat.com>
11406
11407 Fix PR server/13392.
11408 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
11409 offset of JMP insn.
11410 * tracepoint.c (remove_tracepoint): New.
11411 (cmd_qtdp): Call remove_tracepoint when failed to install.
11412
9b224c5e
PA
114132012-03-07 Pedro Alves <palves@redhat.com>
11414
11415 * linux-low.c (get_detach_signal): New.
11416 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
11417 Pass on pending signals to PTRACE_DETACH. Check the result of the
11418 ptrace call.
11419 * server.c (program_signals, program_signals_p): New.
11420 (handle_general_set): Handle QProgramSignals.
11421 * server.h (program_signals, program_signals_p): Declare.
11422
e237a7e2
JK
114232012-03-05 Pedro Alves <palves@redhat.com>
11424 Jan Kratochvil <jan.kratochvil@redhat.com>
11425
11426 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
11427 New comment why.
11428
5808517f
YQ
114292012-03-03 Yao Qi <yao@codesourcery.com>
11430
11431 * tracepoint.c (tracepoint_look_up_symbols): Update call to
11432 agent_look_up_symbols.
11433
58b4daa5
YQ
114342012-03-03 Yao Qi <yao@codesourcery.com>
11435
11436 * Makefile.in (linux-low.o): Keep dependence on agent.h.
11437 (linux-x86-low.o): Likewise.
11438 * server.h: Remove in_process_agent_loaded.
11439 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
11440 common/agent.c.
11441 Update callers.
11442
8ffcbaaf
YQ
114432012-03-03 Yao Qi <yao@codesourcery.com>
11444
11445 * tracepoint.c (gdb_agent_capability): New global.
11446 (in_process_agent_loaded_ust): Renamed to
11447 `in_process_agent_supports_ust'.
11448 Update callers.
11449 (in_process_agent_supports_ust): Call agent_capability_check.
11450 (clear_installed_tracepoints): Assert that agent supports
11451 agent.
11452
d1feda86
YQ
114532012-03-03 Yao Qi <yao@codesourcery.com>
11454
11455 * linux-low.c (linux_supports_agent): New.
11456 (linux_target_ops): Initialize field `supports_agent' with
11457 linux_supports_agent.
11458 * target.h (struct target_ops) <supports_agent>: New.
11459 (target_supports_agent): New macro.
11460 * server.c (handle_general_set): Handle packet 'QAgent'.
11461 (handle_query): Send `QAgent+'.
11462 * Makefile.in (server.o): Depends on agent.h.
11463
2fa291ac
YQ
114642012-03-03 Yao Qi <yao@codesourcery.com>
11465
11466 * Makefile.in (OBS): Add agent.o.
11467 Add new rule for agent.o.
11468 Track dependence of tracepoint.c on agent.h.
11469 * tracepoint.c (run_inferior_command_1):
11470 (run_inferior_command): Call agent_run_command.
11471 (gdb_ust_connect_sync_socket): Deleted. Move it to
11472 common/agent.c.
11473 (resume_thread, stop_thread): Likewise.
11474 (gdb_ust_socket_init): Renamed to ...
11475 (gdb_agent_socket_init): ... New.
11476 (gdb_ust_thread): Renamed to ...
11477 (gdb_agent_helper_thread): ... New.
11478 (gdb_ust_init): Move some code to ...
11479 (gdb_agent_init): ... here. New.
11480 [HAVE_UST]: Call gdb_ust_init.
11481 (initialize_tracepoint_ftlib): Call gdb_agent_init.
11482 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
11483 * config.in, configure: Regenerated.
11484
05044653
PA
114852012-03-02 Pedro Alves <palves@redhat.com>
11486
11487 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
11488 * linux-low.c (struct simple_pid_list): New.
11489 (stopped_pids): New a struct simple_pid_list pointer.
11490 (add_to_pid_list, pull_pid_from_list): New.
11491 (handle_extended_wait): Don't assume the first signal new children
11492 report is SIGSTOP. Adjust call to pull_pid_from_list.
11493 (linux_wait_for_lwp): Adjust.
11494
8d00225b
YQ
114952012-03-02 Yao Qi <yao@codesourcery.com>
11496
11497 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
11498 debug log.
11499
19560ba5
YQ
115002012-03-02 Yao Qi <yao@codesourcery.com>
11501
11502 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
11503 `stop_pc' and `tpoint'. Update caller.
11504
1faeff08
MR
115052012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
11506
11507 * linux-low.h (linux_target_ops): Add regset_bitmap member.
11508 * linux-low.c (use_linux_regsets): New macro.
11509 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
11510 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
11511 (linux_register_in_regsets): New function.
11512 (usr_fetch_inferior_registers): Skip registers covered by
11513 regsets.
11514 (usr_store_inferior_registers): Likewise.
11515 (usr_fetch_inferior_registers): New macro.
11516 (usr_store_inferior_registers): Likewise.
11517 (linux_fetch_registers): Handle mixed regset/non-regset targets.
11518 (linux_store_registers): Likewise.
11519 * linux-mips-low.c (init_registers_mips_dsp_linux): New
11520 prototype.
11521 (init_registers_mips64_dsp_linux): Likewise.
11522 (init_registers_mips_linux): New macro.
11523 (init_registers_mips_dsp_linux): Likewise.
11524 (mips_dsp_num_regs): Likewise.
11525 (DSP_BASE, DSP_CONTROL): New fallback macros.
11526 (mips_base_regs): New macro.
11527 (mips_regmap): Use it. Fix the size.
11528 (mips_dsp_regmap): New variable.
11529 (mips_dsp_regset_bitmap): Likewise.
11530 (mips_arch_setup): New function.
11531 (mips_cannot_fetch_register): Use the_low_target.regmap rather
11532 than mips_regmap.
11533 (mips_cannot_store_register): Likewise.
11534 (the_low_target): Update .arch_setup, .num_regs and .regmap
11535 initializers. Add .regset_bitmap initializer.
11536 * linux-arm-low.c (the_low_target): Add .regset_bitmap
11537 initializer.
11538 * linux-bfin-low.c (the_low_target): Likewise.
11539 * linux-cris-low.c (the_low_target): Likewise.
11540 * linux-crisv32-low.c (the_low_target): Likewise.
11541 * linux-ia64-low.c (the_low_target): Likewise.
11542 * linux-m32r-low.c (the_low_target): Likewise.
11543 * linux-m68k-low.c (the_low_target): Likewise.
11544 * linux-ppc-low.c (the_low_target): Likewise.
11545 * linux-s390-low.c (the_low_target): Likewise.
11546 * linux-sh-low.c (the_low_target): Likewise.
11547 * linux-sparc-low.c (the_low_target): Likewise.
11548 * linux-tic6x-low.c (the_low_target): Likewise.
11549 * linux-x86-low.c (the_low_target): Likewise.
11550 * linux-xtensa-low.c (the_low_target): Likewise.
11551 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
11552 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
11553 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
11554 srv_xmlfiles.
11555 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
11556 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
11557
c03e6ccc
YQ
115582012-02-29 Yao Qi <yao@codesourcery.com>
11559 Pedro Alves <palves@redhat.com>
11560
11561 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
11562 `step_over_finished' is true.
11563
644cebc9
PA
115642012-02-27 Pedro Alves <palves@redhat.com>
11565
11566 * linux-low.c (pid_is_stopped): Delete, moved to common/.
11567 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
11568
c14d7ab2
PA
115692012-02-27 Pedro Alves <palves@redhat.com>
11570
11571 PR server/9684
11572 * linux-low.c (pid_is_stopped): New.
11573 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
11574
412c89dd
LM
115752012-02-25 Luis Machado <lgustavo@codesourcery.com>
11576
11577 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
11578 of conditions.
11579
b745defe
MR
115802012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
11581
11582 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
11583
9f3a5c85
LM
115842012-02-24 Luis Machado <lgustavo@codesourcery>
11585
11586 * server.c (handle_query): Advertise support for target-side
11587 breakpoint condition evaluation.
11588 (process_point_options): New function.
11589 (process_serial_event): When inserting a breakpoint, check for
11590 a target-side condition that should be evaluated.
11591
11592 * mem-break.c: Include regcache.h and ax.h.
11593 (point_cond_list_t): New data structure.
11594 (breakpoint) <cond_list>: New field.
11595 (find_gdb_breakpoint_at): Make non-static.
11596 (delete_gdb_breakpoint_at): Clear any target-side
11597 conditions.
11598 (clear_gdb_breakpoint_conditions): New function.
11599 (add_condition_to_breakpoint): Likewise.
11600 (add_breakpoint_condition): Likewise.
11601 (gdb_condition_true_at_breakpoint): Likewise.
11602 (gdb_breakpoint_here): Return result directly instead
11603 of going through a local variable.
11604
11605 * mem-break.h (find_gdb_breakpoint_at): New prototype.
11606 (clear_gdb_breakpoint_conditions): Likewise.
11607 (add_breakpoint_condition): Likewise.
11608 (gdb_condition_true_at_breakpoint): Likewise.
11609
11610 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
11611 (need_step_over_p): Take target-side breakpoint condition into
11612 consideration.
11613
5e1dc496
LM
116142012-02-24 Luis Machado <lgustavo@codesourcery>
11615
11616 * server.h: Include tracepoint.h.
11617 (agent_mem_read, agent_get_trace_state_variable_value,
11618 agent_set_trace_state_variable_value,
11619 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
11620 get_set_tsv_func_addr): New prototypes.
11621
11622 * ax.h: New include file.
11623 * ax.c: New source file.
11624
11625 * tracepoint.c: Include ax.h.
11626 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
11627 agent_expr, eval_result_type): Move to ax.h.
11628 (parse_agent_expr): Rename to ...
11629 (gdb_parse_agent_expr): ... this, make it non-static and move
11630 to ax.h.
11631 (unparse_agent_expr) Rename to ...
11632 (gdb_unparse_agent_expr): ... this, make it non-static and move
11633 to ax.h.
11634 (eval_agent_expr): Rename to ...
11635 (eval_tracepoint_agent_expr): ... this.
11636 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
11637 forward declarations.
11638 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
11639 (agent_get_trace_state_variable_value): New function.
11640 (agent_set_trace_state_variable_value): New function.
11641 (cmd_qtdp): Call gdb_parse_agent_expr (...).
11642 (response_tracepoint): Call gdb_unparse_agent_expr (...).
11643 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
11644 (condition_true_at_tracepoint): Likewise.
11645 (parse_agent_expr): Rename to ...
11646 (gdb_parse_agent_expr): ... this and move to ax.c.
11647 (unparse_agent_expr): Rename to ...
11648 (gdb_unparse_agent_expr): ... this and move to ax.c.
11649 (gdb_agent_op_name): Move to ax.c.
11650 (eval_agent_expr): Rename to ...
11651 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
11652 and move to ax.c.
11653 (eval_tracepoint_agent_expr): New function.
11654 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
43aaf8b6 11655 non-static.
5e1dc496
LM
11656 (current_insn_ptr, emit_error, struct bytecode_address): Move to
11657 ax.c.
11658 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
11659 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
11660 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
11661 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
11662 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
11663 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
11664 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
11665 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
11666 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
11667 (compile_bytecodes): Remove forward declaration.
11668 (is_goto_target): Move to ax.c.
11669 (compile_bytecodes): Move to ax.c and call
11670 agent_get_trace_state_variable_value (...) and
11671 agent_set_trace_state_variable_value (...).
11672
11673 * Makefile.in: Update ax.c and IPA dependencies.
11674
277e4e52
PA
116752012-02-24 Pedro Alves <palves@redhat.com>
11676
11677 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
11678 (cmd_bigqtbuffer_circular): ... this. Only handle
11679 'QTBuffer:circular:'.
11680 (handle_tracepoint_general_set): Adjust.
11681
bf4c19f7
YQ
116822012-02-16 Yao Qi <yao@codesourcery.com>
11683
11684 * inferiors.c: Move code to ...
11685 * dll.c: .... here. New.
11686 * server.h: Declare clear_dlls.
11687 * Makefile.in (SFILES): Add dll.c.
11688 (OBS): Add dll.o
11689 (dll.o): New rule.
11690
d73f2619
YQ
116912012-02-11 Yao Qi <yao@codesourcery.com>
11692
11693 * server.c: (handle_monitor_command): Add a new parameter
11694 `own_buf'.
11695 (handle_query): Update caller.
11696
f8255c2a
JB
116972012-02-09 Joel Brobecker <brobecker@adacore.com>
11698
11699 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
11700 * configure, config.in: Regenerate.
11701 * hostio.c: Provide an alternate implementation if HAVE_READLINK
11702 is not defined.
11703
da84f473
PA
117042012-02-02 Pedro Alves <palves@redhat.com>
11705
11706 Try SIGKILL first, then PTRACE_KILL.
11707 * linux-low.c (linux_kill_one_lwp): New.
11708 (linux_kill_one_lwp): Rename to ...
11709 (kill_one_lwp_callback): ... this. Use the new
11710 linux_kill_one_lwp.
11711
e886a173
PA
117122012-02-02 Pedro Alves <palves@redhat.com>
11713
11714 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
11715 inferior.
11716
be07f1a2
PA
117172012-01-27 Pedro Alves <palves@redhat.com>
11718
11719 * linux-low.c (linux_child_pid_to_exec_file): Delete.
11720 (elf_64_file_p): Make static.
11721 (linux_pid_exe_is_elf_64_file): New.
11722 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
11723 Delete declarations.
11724 (linux_pid_exe_is_elf_64_file): Declare.
11725 * linux-x86-low.c (x86_arch_setup): Use
11726 linux_pid_exe_is_elf_64_file.
11727
d8301ad1
JK
117282012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
11729
11730 * linux-low.c (linux_wait_for_event_1): Rename to ...
11731 (linux_wait_for_event): ... here and merge it with former
11732 linux_wait_for_event - new variable wait_ptid, use it.
11733 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
11734
01b17894
PA
117352012-01-23 Pedro Alves <palves@redhat.com>
11736
11737 * server.c (main): Avoid yet another case of infinite loop while
11738 detaching/killing after a longjmp.
11739
e825046f
JK
117402012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
11741
11742 Code cleanup.
11743 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
11744
b9e7b9c3
UW
117452012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
11746
11747 * hostio.c (handle_readlink): New function.
11748 (handle_vFile): Call it to handle "vFile:readlink" packets.
11749
901f9912
UW
117502012-01-20 Pedro Alves <palves@redhat.com>
11751 Ulrich Weigand <ulrich.weigand@linaro.org>
11752
11753 * server.c (handle_v_requests): Only support vAttach and vRun to
11754 start multiple processes when in extended protocol mode.
11755
fc1ab1a0
PA
117562012-01-17 Pedro Alves <palves@redhat.com>
11757
11758 * tracepoint.c (initialize_tracepoint): Use mmap instead of
11759 memalign plus mprotect to allocate the scratch buffer.
11760
7d5d4e98
PA
117612012-01-13 Pedro Alves <palves@redhat.com>
11762
11763 * server.c (attach_inferior): Clear `cont_thread'.
11764
f128d5e9
PA
117652012-01-13 Pedro Alves <palves@redhat.com>
11766
11767 * server.c (main): Avoid infinite loop while detaching/killing
11768 after a longjmp.
11769
06db92f0
DE
117702012-01-09 Doug Evans <dje@google.com>
11771
11772 * server.c (start_inferior): Set last_ptid in --wrapper case.
11773
32d92999
YQ
117742012-01-06 Yao Qi <yao@codesourcery.com>
11775
11776 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
11777 defined.
11778 [IN_PROCESS_AGENT] (debug_agent): New global variable.
11779
5e0a92a9
YQ
117802012-01-04 Yao Qi <yao@codesourcery.com>
11781
11782 * tracepoint.c (cmd_qtdp): Print debug message
11783 for static tracepoint.
11784
ae639e8c
YQ
117852012-01-04 Yao Qi <yao@codesourcery.com>
11786
11787 * tracepoint.c (trace_vdebug): Differentiate debug message
11788 between gdbserver and IPA.
11789
f72429c5
YQ
117902012-01-03 Yao Qi <yao@codesourcery.com>
11791
11792 * tracepoint.c (tracepoint_was_hit): Don't collect for
11793 static tracepoint.
11794
12c3e59c
JB
117952012-01-02 Joel Brobecker <brobecker@adacore.com>
11796
11797 * terminal.h: Reformat copyright header.
11798
67827812
JB
117992012-01-02 Joel Brobecker <brobecker@adacore.com>
11800
11801 * server.c (gdbserver_version): Update copyright year.
11802 * gdbreplay.c (gdbreplay_version): Likewise.
11803
3e52c33d
JK
118042011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
11805
11806 * linux-low.c (linux_create_inferior): Put empty if clause for write.
11807
11808 Revert:
11809 2011-12-18 Hui Zhu <teawater@gmail.com>
11810 * linux-low.c (linux_create_inferior): Save return value to ret.
11811
66f1260e
HZ
118122011-12-18 Hui Zhu <teawater@gmail.com>
11813
11814 * linux-low.c (linux_create_inferior): Save return value to ret.
11815
e77616d7
DE
118162011-12-16 Doug Evans <dje@google.com>
11817
e7b06c57
DE
11818 * linux-low.c (linux_create_inferior): If stdio connection,
11819 redirect stdin from /dev/null, stdout to stderr.
11820 * remote-utils.c (remote_is_stdio): New static global.
11821 (remote_connection_is_stdio): New function.
11822 (remote_prepare): Handle stdio connection.
11823 (remote_open): Ditto.
11824 (remote_close): Don't close stdin for stdio connections.
11825 (read_prim,write_prim): New functions. Replace all calls to
11826 read/write to these.
11827 * server.c (main): Watch for "-" argument. Move call to
11828 remote_prepare before start_inferior.
11829 * server.h (STDIO_CONNECTION_NAME): New macro.
11830 (remote_connection_is_stdio): Declare.
11831
e77616d7
DE
11832 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
11833 in debugging output.
11834
82067193
YQ
118352011-12-15 Yao Qi <yao@codesourcery.com>
11836
11837 * tracepoint.c: Include sys/syscall.h.
11838 (gdb_ust_thread): Remove preprocessor conditional.
11839
82bfbe7e
PA
118402011-12-14 Pedro Alves <pedro@codesourcery.com>
11841
11842 * linux-low.c (linux_detach_one_lwp): Call
11843 the_low_target.prepare_to_resume before detaching.
11844
712c6575
YQ
118452011-12-14 Yao Qi <yao@codesourcery.com>
11846
11847 * tracepoint.c (gdb_ust_thread): Don't ignore return value
11848 of write.
11849
d54d1edf
YQ
118502011-12-14 Yao Qi <yao@codesourcery.com>
11851
11852 * i386-low.c (i386_low_stopped_data_address): Initialize local
11853 variable `control'.
11854
6210a125
PA
118552011-12-13 Pedro Alves <pedro@codesourcery.com>
11856
11857 PR remote/13492
11858
11859 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
11860 DR_CONTROL unless necessary. Extend comments.
11861 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
11862 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
11863
2ece8244
YQ
118642011-12-13 Yao Qi <yao@codesourcery.com>
11865
11866 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
11867 macros.
11868 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
11869
784867a5
JK
118702011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
11871
11872 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
11873 Print new debug message for such case.
11874
6bf36717
JK
118752011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
11876
11877 Fix overlapping memcpy.
11878 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
11879 the read_inferior_memory transfer.
11880 (delete_fast_tracepoint_jump): New variable buf. Use it for the
11881 write_inferior_memory transfer.
11882 (set_fast_tracepoint_jump): New variable buf. Use it for the
11883 read_inferior_memory and write_inferior_memory transfers.
11884 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
11885 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
11886 Use it for the write_inferior_memory transfer.
11887 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
11888 buffers.
11889
50275556
MR
118902011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
11891
11892 * linux-low.c (fetch_register, store_register): Make code
11893 consistent, fix formatting.
11894
7325beb4
MR
118952011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
11896
11897 * linux-low.c (usr_store_inferior_registers): Factor out code
11898 to handle individual registers into...
11899 (store_register): ... this new function.
11900
c642a434
UW
119012011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
11902
11903 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
11904 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
11905 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
11906 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
11907 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
11908 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
11909 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
11910 (srv_xmlfiles): Add new XML files.
11911
11912 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
11913 and <sys/uio.h>.
11914 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
11915 (init_registers_s390_linux32v1): Add prototype.
11916 (init_registers_s390_linux32v2): Likewise.
11917 (init_registers_s390_linux64v1): Likewise.
11918 (init_registers_s390_linux64v2): Likewise.
11919 (init_registers_s390x_linux64v1): Likewise.
11920 (init_registers_s390x_linux64v2): Likewise.
11921 (s390_num_regs): Increment to 52.
11922 (s390_regmap): Add orig_r2 register.
11923 (s390_num_regs_3264): Increment to 68.
11924 (s390_regmap_3264): Add orig_r2 register.
11925 (s390_collect_ptrace_register): Handle orig_r2 register.
11926 (s390_supply_ptrace_register): Likewise.
11927 (s390_fill_last_break): New function.
11928 (s390_store_last_break): Likewise.
11929 (s390_fill_system_call): New function.
11930 (s390_store_system_call): Likewise.
11931 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
11932 register sets.
11933 (s390_check_regset): New function.
11934 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
11935 NT_S390_SYSTEM_CALL regsets and use appropriate description.
11936 Update target_regsets for available register sets.
11937
2268b414
JK
119382011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
11939 Jan Kratochvil <jan.kratochvil@redhat.com>
11940
11941 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
11942 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
11943 New.
11944 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
11945 * linux-low.h (struct process_info_private): New member r_debug.
11946 * server.c (handle_qxfer_libraries): Call
11947 the_target->qxfer_libraries_svr4.
11948 (handle_qxfer_libraries_svr4): New function.
11949 (qxfer_packets): New entry "libraries-svr4".
11950 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
11951 * target.h (struct target_ops): New member qxfer_libraries_svr4.
11952 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
11953 PACKET_qXfer_libraries_svr4.
11954
d6db1fab
UW
119552011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
11956
11957 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
11958 PSW address/mask between 8-byte and 16-byte formats.
11959 (s390_supply_ptrace_register): Likewise.
11960 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
11961 basic addressing mode bit.
11962
242f5f1c
SS
119632011-11-24 Stan Shebs <stan@codesourcery.com>
11964
11965 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
11966
f196051f
SS
119672011-11-17 Stan Shebs <stan@codesourcery.com>
11968
11969 * tracepoint.c (struct tracepoint): New field traceframe_usage.
11970 (tracing_start_time): New global.
11971 (tracing_stop_time): New global.
11972 (tracing_user_name): New global.
11973 (tracing_notes): New global.
11974 (tracing_stop_note): New global.
11975 (cmd_qtstart): Set traceframe_usage, start_time.
11976 (stop_tracing): Set stop_time.
11977 (cmd_qtstatus): Report additional status.
11978 (cmd_qtp): New function.
11979 (handle_tracepoint_query): Call it.
11980 (cmd_qtnotes): New function.
11981 (handle_tracepoint_general_set): Call it.
11982 (get_timestamp): Rename from tsv_get_timestamp.
11983
405f8e94
SS
119842011-11-14 Stan Shebs <stan@codesourcery.com>
11985 Kwok Cheung Yeung <kcy@codesourcery.com>
11986
11987 * linux-x86-low.c (small_jump_insn): New.
11988 (i386_install_fast_tracepoint_jump_pad): Add arguments for
11989 trampoline and error message, build a trampoline and issue a small
11990 jump instruction to it.
11991 (x86_install_fast_tracepoint_jump_pad): Add arguments for
11992 trampoline and error message.
11993 (x86_get_min_fast_tracepoint_insn_len): New.
11994 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
11995 * linux-low.h (struct linux_target_ops): Add arguments to
11996 install_fast_tracepoint_jump_pad operation, add new operation.
11997 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
11998 arguments.
11999 (linux_get_min_fast_tracepoint_insn_len): New function.
12000 (linux_target_op): Add new operation.
12001 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
12002 (gdb_trampoline_buffer_end): Ditto.
12003 (gdb_trampoline_buffer_error): Ditto.
12004 (struct ipa_sym_addresses): Add fields for new IPA variables.
12005 (symbol_list): Add entries for new IPA variables.
12006 (struct tracepoint): Add fields to hold the address range of the
12007 trampoline used by the tracepoint.
12008 (trampoline_buffer_head): New static variable.
12009 (trampoline_buffer_tail): Ditto.
12010 (claim_trampoline_space): New function.
12011 (have_fast_tracepoint_trampoline_buffer): New function.
12012 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
12013 structure.
12014 (install_fast_tracepoint): Ditto, also add error buffer argument.
12015 (cmd_qtminftpilen): New function.
12016 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
12017 (fast_tracepoint_from_trampoline_address): New function.
12018 (fast_tracepoint_collecting): Handle trampoline as part of jump
12019 pad space.
12020 (set_trampoline_buffer_space): New function.
12021 (initialize_tracepoint): Initialize new IPA variables.
12022 * target.h (struct target_ops): Add arguments to
12023 install_fast_tracepoint_jump_pad operation, add new
12024 get_min_fast_tracepoint_insn_len operation.
12025 (target_get_min_fast_tracepoint_insn_len): New.
12026 (install_fast_tracepoint_jump_pad): Add arguments.
12027 * server.h (IPA_BUFSIZ): Define.
12028 * linux-i386-ipa.c: Include extra header files.
12029 (initialize_fast_tracepoint_trampoline_buffer): New function.
12030 (initialize_low_tracepoint): Call it.
12031 * server.h (set_trampoline_buffer_space): Declare.
12032 (claim_trampoline_space): Ditto.
12033 (have_fast_tracepoint_trampoline_buffer): Ditto.
12034
1e4d1764
YQ
120352011-11-14 Yao Qi <yao@codesourcery.com>
12036
12037 * server.c (handle_query): Handle InstallInTrace for qSupported.
12038 * tracepoint.c (add_tracepoint): Sort list.
12039 (install_tracepoint, download_tracepoint): New.
12040 (cmd_qtdp): Call them to install and download tracepoints.
12041 (sort_tracepoints): Removed.
12042 (cmd_qtstart): Update.
12043
5c73ff4e
YQ
120442011-11-14 Yao Qi <yao@codesourcery.com>
12045
12046 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
12047 * mem-break.h: Declare.
12048 * tracepoint.c (cmd_qtstart): Move some code to ...
12049 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
12050 New.
12051 (download_tracepoints): Move some code to ...
12052 (download_tracepoint_1): ... here. New.
12053
86a30030
YQ
120542011-11-08 Yao Qi <yao@codesourcery.com>
12055
12056 * remote-utils.c (relocate_instruction): A comment fix.
12057
8d26e50c
JB
120582011-11-07 Joel Brobecker <brobecker@adacore.com>
12059
12060 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
12061 (i386_dr_low_get_control, i386_dr_low_get_status): Use
12062 dr_status_mirror and dr_control_mirror from debug_reg_state.
12063 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
12064 (i386_initial_stuff): Remove use of deleted globals.
12065 (i386_get_thread_context, i386_set_thread_context,
12066 i386_thread_added): Use dr_status_mirror and dr_control_mirror
12067 from debug_reg_state.
12068
a59306a3
YQ
120692011-11-05 Yao Qi <yao@codesourcery.com>
12070
12071 * tracepoint.c (gdb_collect): Loop over tracepoints of same
12072 address as TPOINT's.
12073
3065dfb6
SS
120742011-11-02 Stan Shebs <stan@codesourcery.com>
12075
12076 * tracepoint.c (agent_mem_read_string): New function.
12077 (eval_agent_expr): Call it for tracenz.
12078 * server.c (handle_query): Report support for tracenz.
12079
fd0d8c7c
YQ
120802011-11-02 Yao Qi <yao@codesourcery.com>
12081
12082 * tracepoint.c (cmd_qtstart): Remove unused local variables.
12083
609086b1
YQ
120842011-11-02 Yao Qi <yao@codesourcery.com>
12085
12086 * target.h: Fix a typo in comment.
12087
b9fd1791
PA
120882011-10-31 Pedro Alves <pedro@codesourcery.com>
12089
12090 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
12091 clobber the breakpoints' shadows with fast tracepoint jumps.
12092 * mem-break.h (check_mem_write): Add `myaddr' parameter.
12093 * target.c (write_inferior_memory): Also pass MYADDR down to
12094 check_mem_write.
12095
03583c20
UW
120962011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
12097
12098 * configure.ac: Check support for personality routine.
12099 * configure: Regenerate.
12100 * config.in: Likewise.
12101 * linux-low.c: Include <sys/personality.h>.
12102 Define ADDR_NO_RANDOMIZE if necessary.
12103 (linux_create_inferior): Disable address space randomization when
12104 forking inferior, if requested.
12105 (linux_supports_disable_randomization): New function.
12106 (linux_target_ops): Install it.
12107 * server.h (disable_randomization): Declare.
12108 * server.c (disable_randomization): New global variable.
12109 (handle_general_set): Handle QDisableRandomization.
12110 (handle_query): Likewise for qSupported.
12111 (main): Support --disable-randomization and --no-disable-randomization
12112 command line arguments.
12113 * target.h (struct target_ops): Add supports_disable_randomization.
12114 (target_supports_disable_randomization): New macro.
12115
723b724b
MF
121162011-09-29 Mike Frysinger <vapier@gentoo.org>
12117
12118 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
12119 ifdef check.
12120 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
12121 [!PT_GETDSBT] (target_loadmap): New definition.
12122 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
12123 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
12124 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
12125 and PT_GETDSBT to LINUX_LOADMAP.
12126 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
12127 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
12128
55329a5c 121292011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
12130
12131 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
12132 (arm_linux_hwbp_cap): New static variable.
12133 (arm_linux_get_hwbp_cap): Replace by ...
12134 (arm_linux_init_hwbp_cap): ... this new function.
12135 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
12136 (arm_linux_get_hw_watchpoint_count): Likewise.
12137 (arm_linux_get_hw_watchpoint_max_length): Likewise.
12138 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
12139 (arm_prepare_to_resume): Use perror_with_name instead of error.
12140
55329a5c 121412011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
12142
12143 * linux-arm-low.c: Include <signal.h>.
12144 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
12145 (struct arm_linux_hwbp_cap): New data type.
12146 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
12147 (struct arm_linux_hw_breakpoint): New data type.
12148 (MAX_BPTS, MAX_WPTS): Define.
12149 (struct arch_process_info, struct arch_lwp_info): New data types.
12150 (arm_linux_get_hwbp_cap): New function.
12151 (arm_linux_get_hw_breakpoint_count): Likewise.
12152 (arm_linux_get_hw_watchpoint_count): Likewise.
12153 (arm_linux_get_hw_watchpoint_max_length): Likewise.
12154 (arm_hwbp_control_initialize): Likewise.
12155 (arm_hwbp_control_is_enabled): Likewise.
12156 (arm_hwbp_control_is_initialized): Likewise.
12157 (arm_hwbp_control_disable): Likewise.
12158 (arm_linux_hw_breakpoint_equal): Likewise.
12159 (arm_linux_hw_point_initialize): Likewise.
12160 (struct update_registers_data): New data structure.
12161 (update_registers_callback: New function.
12162 (arm_insert_point): Likewise.
12163 (arm_remove_point): Likewise.
12164 (arm_stopped_by_watchpoint): Likewise.
12165 (arm_stopped_data_address): Likewise.
12166 (arm_new_process): Likewise.
12167 (arm_new_thread): Likewise.
12168 (arm_prepare_to_resume): Likewise.
12169 (the_low_target): Register arm_insert_point, arm_remove_point,
12170 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
12171 arm_new_thread, and arm_prepare_to_resume.
12172
6b9801d4
SS
121732011-09-15 Stan Shebs <stan@codesourcery.com>
12174
12175 * server.h (struct emit_ops): Add compare-goto fields.
12176 * tracepoint.c (gdb_agent_op_sizes): New table.
12177 (emit_eq_goto): New function.
12178 (emit_ne_goto): New function.
12179 (emit_lt_goto): New function.
12180 (emit_le_goto): New function.
12181 (emit_gt_goto): New function.
12182 (emit_ge_goto): New function.
12183 (is_goto_target): New function.
12184 (compile_bytecodes): Recognize special cases of compare-goto
12185 combinations and call specialized emitters for them.
12186 * linux-x86-low.c (amd64_emit_eq_goto): New function.
12187 (amd64_emit_ne_goto): New function.
12188 (amd64_emit_lt_goto): New function.
12189 (amd64_emit_le_goto): New function.
12190 (amd64_emit_gt_goto): New function.
12191 (amd64_emit_ge_goto): New function.
12192 (amd64_emit_ops): Add the new functions.
12193 (i386_emit_eq_goto): New function.
12194 (i386_emit_ne_goto): New function.
12195 (i386_emit_lt_goto): New function.
12196 (i386_emit_le_goto): New function.
12197 (i386_emit_gt_goto): New function.
12198 (i386_emit_ge_goto): New function.
12199 (i386_emit_ops): Add the new functions.
12200
bf15cbda
SS
122012011-09-08 Stan Shebs <stan@codesourcery.com>
12202
12203 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
12204 (i386_emit_epilogue): Restore %ebx.
12205
943ca1dd
JZ
122062011-08-31 Jie Zhang <jzhang918@gmail.com>
12207
12208 * server.c (step_thread): Remove definition.
12209 (process_serial_event): Don't handle Hs.
12210 * server.h (step_thread): Remove declaration.
12211 * target.c (set_desired_inferior): Remove use of step_thread.
12212
e3deef73
LM
122132011-08-24 Luis Machado <lgustavo@codesourcery.com>
12214
12215 * linux-low.c: Include linux-procfs.h.
12216 (linux_attach_lwp_1): Update comments.
12217 (linux_attach): Scan for existing threads when attaching to a
12218 process that is the tgid.
12219 * Makefile.in: Update dependencies.
12220
13da1c97
LM
122212011-08-24 Luis Machado <lgustavo@codesourcery.com>
12222
12223 * configure.srv: Add linux-procfs.o dependencies.
12224
881127c9
YQ
122252011-08-14 Yao Qi <yao@codesourcery.com>
12226
12227 * target.h (struct target_ops): Fix indent.
12228 * win32-low.c (win32_target_ops): Fix comment.
12229
58dbd541
YQ
122302011-08-14 Andrew Jenner <andrew@codesourcery.com>
12231 Yao Qi <yao@codesourcery.com>
12232
12233 * Makefile.in (clean): Remove tic6x-*.c files.
12234 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
12235 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
12236 (tic6x-c64xp-linux.c): Likewise.
12237 * configure.srv: Add support for tic6x-*-uclinux.
12238 * linux-tic6x-low.c: New.
12239 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
12240
78d85199
YQ
122412011-08-14 Andrew Stubbs <ams@codesourcery.com>
12242 Yao Qi <yao@codesourcery.com>
12243
12244 * target.h (struct target_ops): Add read_loadmap.
12245 * linux-low.c (struct target_loadseg): New type.
12246 (struct target_loadmap): New type.
12247 (linux_read_loadmap): New function.
12248 (linux_target_ops): Add linux_read_loadmap.
12249 * server.c (handle_query): Support qXfer:fdpic:read packet.
43aaf8b6
PA
12250 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
12251 to NULL.
78d85199 12252
a959a88d
EZ
122532011-08-05 Eli Zaretskii <eliz@gnu.org>
12254
12255 * win32-low.c: Include <stdint.h>.
12256
1ced966e
PA
122572011-07-22 Pedro Alves <pedro@codesourcery.com>
12258
12259 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
12260 to the inferior here.
12261 (i386_remove_aligned_watchpoint): Ditto.
12262 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
12263 fit part of the watchpoint in the debug registers.
12264 (i386_update_inferior_debug_regs): New.
12265 (i386_low_insert_watchpoint): Work on a local mirror of the debug
12266 registers, and only update the inferior on success.
12267 (i386_low_remove_watchpoint): Ditto.
12268
d26e3629
KY
122692011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
12270
12271 * linux-low.c (compare_ints, unique, list_threads, show_process,
12272 linux_core_of_thread): Delete.
12273 (linux_target_ops): Change linux_core_of_thread to
12274 linux_common_core_of_thread.
12275 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
12276 * utils.c (malloc_failure): Change type of argument.
12277 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
12278 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
12279 common/linux-osdata.c, common/ptid.c and common/buffer.c.
12280 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
12281 (IPA_OBJS): Add common-utils-ipa.o.
12282 (ptid_h, linux_osdata_h): New macros.
12283 (server_h): Add common/common-utils.h, common/xml-utils.h,
12284 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
12285 common/ptid.h.
12286 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
12287 ptid.o, buffer.o): New rules.
12288 (linux-low.o): Add common/linux-osdata.h as a dependency.
12289 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
12290 * configure.ac: Add AC_HEADER_DIRENT check.
12291 * config.in: Regenerate.
12292 * configure: Regenerate.
12293 * remote-utils.c (xml_escape_text): Delete.
12294 (buffer_grow, buffer_free, buffer_init, buffer_finish,
12295 buffer_xml_printf): Move to common/buffer.c.
12296 * server.c (main): Remove call to initialize_inferiors.
12297 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
12298 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
12299 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
12300 internal_error, gdb_assert, gdb_assert_fail): Delete.
12301 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
12302 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
12303 common/buffer.h.
12304 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
12305 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
12306 initialize_inferiors): Delete.
12307
2275a1a7
PA
123082011-07-20 Pedro Alves <pedro@codesourcery.com>
12309
12310 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
12311 symbol error.
12312
0a5b1e09
PA
123132011-05-31 Pedro Alves <pedro@codesourcery.com>
12314
12315 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
12316 assertion.
12317 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
12318
6938fd34
YQ
123192011-05-26 Yao Qi <yao@codesourcery.com>
12320
12321 * Makefile.in (thread-db.o): Track dependence to
12322 common/gdb_thread_db.h.
12323 * thread-db.c: include gdb_thread_db.h from right place.
12324
b481f9e0
TT
123252011-05-16 Adrian Cornish <gnu@bluedreamer.com>
12326
12327 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
12328 __FILE__ and __LINE__ to internal_error.
12329
98a5dd13
DE
123302011-05-13 Doug Evans <dje@google.com>
12331
12332 * thread-db.c (try_thread_db_load_from_sdir): New function.
12333 (try_thread_db_load_from_dir): New function.
12334 (thread_db_load_search): Handle $sdir, ignore $pdir.
12335 Remove trying of system directories if search of
12336 libthread-db-search-path fails, that is now done via $sdir.
12337
d248b706
KY
123382011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
12339
12340 * server.c (handle_query): Add EnableDisableTracepoints to the list
12341 of supported features.
43aaf8b6 12342 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
d248b706 12343 tracepoints.
43aaf8b6
PA
12344 (cmd_qtenable_disable): New.
12345 (cmd_qtstart): Install tracepoints even if disabled.
12346 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
12347 receiving a QTEnable or QTDisable packet.
12348 (gdb_collect): Skip data collection if fast tracepoint is disabled.
12349 (ust_marker_to_static_tracepoint): Do not ignore disabled static
12350 tracepoints.
12351 (gdb_probe): Skip data collection if static tracepoint is disabled.
d248b706 12352
84e578fb
DE
123532011-05-10 Doug Evans <dje@google.com>
12354
12355 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
12356
71f55dd8
DE
123572011-05-04 Doug Evans <dje@google.com>
12358
12359 * linux-low.c (linux_join): Skip process lookup.
12360 * spu-low.c (spu_join): Ditto.
12361 * server.c (join_inferiors_callback): Delete.
12362 (process_serial_event): For 'D' packet (detach) call join_inferior
12363 directly.
12364
4d393d60
JM
123652011-05-04 Joseph Myers <joseph@codesourcery.com>
12366
12367 * README: Don't mention xscale*-*-linux*.
12368 * configure.srv (xscale*-*-linux*): Don't handle target.
12369
b00ad6ff
NF
123702011-04-27 Nathan Froyd <froydnj@codesourcery.com>
12371
12372 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
12373 casting pointers.
12374 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
12375 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
12376 (i386_emit_void_call_2): Likewise.
12377
af96c192
YQ
123782011-04-26 Yao Qi <yao@codesourcery.com>
12379
43aaf8b6
PA
12380 * linux-low.c: Move common macros to linux-ptrace.h.
12381 Include linux-ptrace.h.
af96c192
YQ
12382 * Makefile.in (linux_ptrace_h): New.
12383 (linux-low.o): Depends on linux-ptrace.h.
12384
03f2bd59
JK
123852011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
12386
12387 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
12388 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
12389 (remote_prepare): New function with most of the TCP code from ...
12390 (remote_open): ... here. Detect PORT here unconditionally. Move also
12391 setting transport_is_reliable.
12392 * server.c (run_once): New variable.
12393 (gdbserver_usage): Document it.
12394 (main): Set run_once for `--once'. Call remote_prepare. Exit after
12395 the first run if RUN_ONCE.
12396 * server.h (run_once, remote_prepare): New declarations.
12397
7a9dd1b2
TT
123982011-04-19 Tom Tromey <tromey@redhat.com>
12399
12400 * win32-low.c (handle_load_dll): Remove duplicate "the".
12401
81239425
PM
124022011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
12403
12404 Remove support for old Cygwin 1.5 versions.
12405 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
12406 function to avoid warning.
12407 (win32_add_one_solib): Use cygwin_conv_path function to avoid
12408 warning.
12409
9e0627f1
PM
124102011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
12411
12412 * gdbserver/server.h (Macro _): Define it if not available.
12413
588eebee
MS
124142011-03-14 Michael Snyder <msnyder@vmware.com>
12415
348af9f7 12416 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 12417
43f70d4c
JB
124182011-03-10 Joel Brobecker <brobecker@adacore.com>
12419
12420 * Makefile.in (maintainer-clean realclean distclean): Remove
12421 "make ... subdir_do" command.
12422
348af9f7
MS
124232011-03-10 Michael Snyder <msnyder@vmware.com>
12424
12425 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
12426
12427 * server.c (handle_v_run): Free alloced buffer on early return.
12428
e637a4f5
YQ
124292011-03-09 Yao Qi <yao@codesourcery.com>
12430
12431 Revert:
12432 2011-03-04 Yao Qi <yao@codesourcery.com>
12433
12434 * Makefile.in: Remove GNU make feature --directory.
12435
12436 2011-03-05 Yao Qi <yao@codesourcery.com>
12437
12438 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
12439 (subdir_do): New make target. Copied from gdb/Makefile.
12440 (maintainer-clean, realclean, distclean, clean): Call corresponding
12441 make targets in common/Makefile.
12442
12443 2011-02-11 Yao Qi <yao@codesourcery.com>
12444
12445 * configure.ac: Call AC_PROG_RANLIB.
12446 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
12447 * configure: Regenerate.
12448
e6edda56
JK
124492011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
12450
12451 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
12452
e5141119
JB
124532011-03-06 Yao Qi <yao@codesourcery.com>
12454
12455 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
12456
64794aa4
JB
124572011-03-05 Yao Qi <yao@codesourcery.com>
12458
12459 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
12460 (subdir_do): New make target. Copied from gdb/Makefile.
12461 (maintainer-clean, realclean, distclean, clean): Call corresponding
12462 make targets in common/Makefile.
12463
7a762829
YQ
124642011-03-04 Yao Qi <yao@codesourcery.com>
12465
12466 * Makefile.in: Remove GNU make feature --directory.
12467
348af9f7
MS
124682011-03-04 Michael Snyder <msnyder@vmware.com>
12469
12470 * server.c (queue_stop_reply): Call xmalloc not malloc.
12471
124722011-03-02 Michael Snyder <msnyder@vmware.com>
12473
12474 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
12475
9f72fee2
MS
124762011-02-28 Michael Snyder <msnyder@vmware.com>
12477
588eebee
MS
12478 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
12479 (cmd_qtframe): Ditto.
12480 (cmd_qtbuffer): Ditto.
12481 (cmd_bigqtbuffer): Ditto.
12482
9f72fee2
MS
12483 * utils.c (decimal2str): Initialize 'width' to nine, then
12484 don't mess with it.
12485
8040bd49
UW
124862011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
12487
12488 * hostio.c (require_data): Free *data, not data.
12489
7e52cbd0
JK
124902011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
12491
12492 * hostio.c (require_data): Use free, not xfree.
12493
9130f83e
MS
124942011-02-27 Michael Snyder <msnyder@vmware.com>
12495
4b812f4e
MS
12496 * server.c (handle_query): Discard unused value.
12497
9130f83e
MS
12498 * hostio.c (require_data): Free malloc memory before returning
12499 error.
12500
69d37113
MS
125012011-02-26 Michael Snyder <msnyder@vmware.com>
12502
12503 * linux-low.c (list_threads): Call closedir for dirent.
12504
35f5825a
MS
125052011-02-27 Michael Snyder <msnyder@vmware.com>
12506
2a589cef
MS
12507 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
12508 a case statement falls through.
12509
0adea5f7
MS
12510 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
12511
35f5825a
MS
12512 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
12513 in comparison.
12514
238f1c74
MS
125152011-02-26 Michael Snyder <msnyder@vmware.com>
12516
12517 * utils.c (decimal2str): Eliminate dead code and dead param.
12518 (pulongest): Drop dead param from call to decimal2str.
12519 (plongest): Ditto.
12520
633ff500
JB
125212011-02-24 Joel Brobecker <brobecker@adacore.com>
12522
12523 Revert the following patch (not approved yet):
12524 2011-02-21 Hui Zhu <teawater@gmail.com>
12525 * tracepoint.c (tp_printf): New function.
12526 (eval_agent_expr): Handle gdb_agent_op_printf.
12527
f9c6ff72
HZ
125282011-02-21 Hui Zhu <teawater@gmail.com>
12529
12530 * tracepoint.c (tp_printf): New function.
12531 (eval_agent_expr): Handle gdb_agent_op_printf.
12532
94d5e490
TT
125332011-02-18 Tom Tromey <tromey@redhat.com>
12534
12535 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
12536 (tracepoint.o): Likewise.
12537 * tracepoint.c (enum gdb_agent_op): Use ax.def.
12538 (gdb_agent_op_names): Likewise.
12539
c7f96d2b
TT
125402011-02-18 Tom Tromey <tromey@redhat.com>
12541
12542 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
12543 gdb_agent_op_rot>: New constants.
12544 (gdb_agent_op_names): Add pick and roll.
12545 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
12546 cases.
12547
0feedb2c
JK
125482011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
12549
12550 * aclocal.m4: Regenerated with aclocal-1.11.1.
12551
b3b9301e
PA
125522011-02-14 Pedro Alves <pedro@codesourcery.com>
12553
12554 * server.c (handle_qxfer_traceframe_info): New.
12555 (qxfer_packets): Register "traceframe-info".
12556 (handle_query): Report support for qXfer:traceframe-info:read+.
12557 * tracepoint.c (match_blocktype): New.
12558 (traceframe_find_block_type): Rename to ...
12559 (traceframe_walk_blocks): ... this. Add callback filter argument,
12560 and use it.
12561 (traceframe_find_block_type): New, reimplemented on top of
12562 traceframe_walk_blocks.
12563 (build_traceframe_info_xml): New.
12564 (traceframe_read_info): New.
12565 * server.h (traceframe_read_info): Declare.
12566
4f3e6fb7
YQ
125672011-02-11 Yao Qi <yao@codesourcery.com>
12568
12569 * configure.ac: Call AC_PROG_RANLIB.
12570 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
12571 * configure: Regenerate.
12572
764880b7
PA
125732011-02-07 Pedro Alves <pedro@codesourcery.com>
12574
12575 * server.c (gdb_read_memory): Change return semantics to allow
12576 partial transfers.
12577 (handle_search_memory_1): Adjust.
12578 (process_serial_event) <'m' packet>: Handle partial transfers.
12579 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
12580
1c79eb8a
PA
125812011-01-28 Pedro Alves <pedro@codesourcery.com>
12582
12583 * regcache.c (init_register_cache): Initialize
12584 regcache->register_status.
12585 (free_register_cache): Release regcache->register_status.
12586 (regcache_cpy): Copy register_status.
12587 (registers_to_string): Print 'x's for unavailable registers.
12588 (supply_register): Mark the register's status valid or
12589 unavailable, depending on whether a buffer was passed in or not.
12590 (supply_register_zeroed): New.
12591 (supply_regblock): Mark the registers' status valid or
12592 unavailable, depending on whether a buffer was passed in or not.
12593 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
12594 (struct regcache): New `register_status' field.
12595 (supply_register_zeroed): Declare.
12596 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
12597 supply_register_zeroed, rather than passing a NULL buffer to
12598 supply_register.
12599 * tracepoint.c (fetch_traceframe_registers): Update comment.
12600
85724a0e
PA
126012011-01-28 Pedro Alves <pedro@codesourcery.com>
12602
12603 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
12604 buffer explicit.
12605
d08aafef
PA
126062011-01-25 Pedro Alves <pedro@codesourcery.com>
12607
12608 * server.h (decode_xfer_write): Change prototype.
12609 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
12610 and don't extract the annex here.
12611 * server.c (decode_xfer_read): Remove `annex' parameter,
12612 and don't extract the annex here.
12613 (decode_xfer): New.
12614 (struct qxfer): New.
12615 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
12616 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
12617 (handle_qxfer_statictrace): New functions, abstracted out from
12618 handle_query, and made to use the struct qxfer interface.
12619 (handle_threads_qxfer_proper): Rename to ...
12620 (handle_qxfer_threads_proper): ... this.
12621 (handle_threads_qxfer): Rename to ...
12622 (handle_qxfer_threads): ... this. Adjust.
12623 (qxfer_packets): New array.
12624 (handle_qxfer): New function.
12625 (handle_query): Use handle_qxfer.
12626
493e2a69
MS
126272011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
12628
12629 * gdbreplay.c: Shorten lines of >= 80 columns.
12630 * linux-low.c: Ditto.
12631 * linux-ppc-low.c: Ditto.
12632 * linux-s390-low.c: Ditto.
12633 * linux-sparc-low.c: Ditto.
12634 * linux-x86-low.c: Ditto.
12635 * linux-xtensa-low.c: Ditto.
12636 * mem-break.c: Ditto.
12637 * nto-low.c: Ditto.
12638 * regcache.h: Ditto.
12639 * remote-utils.c: Ditto.
12640 * server.c: Ditto.
12641 * server.h: Ditto.
12642 * thread-db.c: Ditto.
12643 * tracepoint.c: Ditto.
12644 * utils.c: Ditto.
12645 * win32-low.h: Ditto.
12646
44944448
JB
126472011-01-05 Joel Brobecker <brobecker@adacore.com>
12648
12649 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
12650 update.
12651
71ce852c
JB
126522011-01-01 Joel Brobecker <brobecker@adacore.com>
12653
12654 * server.c (gdbserver_version): Update copyright year in version
12655 output.
12656 * gdbreplay.c (gdbreplay_version): Ditto.
12657
eb826dc6
MF
126582010-12-29 Jie Zhang <jie.zhang@analog.com>
12659
12660 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
12661 * linux-bfin-low.c: New file.
12662 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
12663 PT_DATA_ADDR for BFIN targets.
12664 * Makefile.in (SFILES): Add linux-bfin-low.c.
12665 (clean): Remove reg-bfin.c.
12666 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
12667 * README: Mention supported Blackfin targets.
12668
39ab222a
MF
126692010-12-23 Mike Frysinger <vapier@gentoo.org>
12670
12671 * .gitignore: New file.
12672
a1f2ce7d
MF
126732010-11-16 Mike Frysinger <vapier@gentoo.org>
12674
12675 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
12676
f474844c
JZ
126772010-10-22 Jie Zhang <jie@codesourcery.com>
12678
12679 * Makefile.in: Add FLAGS_TO_PASS variable.
12680 (install): Remove dependency of install-only and recursively
12681 invoke make for install-only.
12682
f1048712
DE
126832010-10-04 Doug Evans <dje@google.com>
12684
12685 * Makefile.in (uninstall): Use $(DESTDIR).
12686
b53a1623
PA
126872010-09-24 Pedro Alves <pedro@codesourcery.com>
12688
e6ee044d
PA
12689 PR gdb/11842
12690
b53a1623
PA
12691 * linux-x86-low.c (compat_siginfo_from_siginfo)
12692 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
12693 si_code is < 0. Check for si_code == SI_TIMER before checking for
12694 si_code < 0.
12695
fa1bd1e4
JB
126962010-09-13 Joel Brobecker <brobecker@adacore.com>
12697
12698 * lynx-i386-low.c: New file.
12699 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
12700
47fac8f8
JB
127012010-09-13 Joel Brobecker <brobecker@adacore.com>
12702
12703 * lynx-low.c (ptrace_request_to_str): Remove handling for
12704 request values that have been removed in LynxOS 5.x.
12705
1adfc54d
JB
127062010-09-13 Joel Brobecker <brobecker@adacore.com>
12707
12708 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
12709 <ptrace.h>
12710
c2a66c29
NS
127112010-09-09 Nathan Sidwell <nathan@codesourcery.com>
12712
12713 * configure.ac: Add --enable-inprocess-agent option.
12714 * configure: Rebuilt.
12715
32fcada3
YQ
127162010-09-06 Yao Qi <yao@codesourcery.com>
12717
12718 * linux-low.c (linux_kill): Remove unused variable.
12719 (linux_stabilize_threads): Likewise.
12720 * server.c (start_inferior): Likewise.
12721 (queue_stop_reply_callback): Likewise.
12722 * tracepoint.c (do_action_at_tracepoint): Likewise.
12723
0cccb683
YQ
127242010-09-06 Yao Qi <yao@codesourcery.com>
12725
12726 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
12727 on return.
12728
423ec54c
JK
127292010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
12730
12731 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
12732
12ac6819
PA
127332010-09-06 Pedro Alves <pedro@codesourcery.com>
12734
12735 * Makefile.in (install-only): Replace $IPA_DEPFILES with
12736 "$(IPA_DEPFILES)".
12737
8ed54b31
JB
127382010-09-01 Joel Brobecker <brobecker@adacore.com>
12739
12740 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
12741 gdbserver/lynx-ppc-low.c: New files.
12742 * Makefile.in (lynx_low_h): New variable.
12743 (lynx-low.o, lynx-ppc-low.o): New rules.
12744 * configure.ac: On LynxOS, link with -lnetinet.
12745 * configure.srv: Add handling of powerpc-*-lynxos* targets.
12746 * configure: regenerate.
12747
bb0116a4
JB
127482010-09-01 Joel Brobecker <brobecker@adacore.com>
12749
12750 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
12751 * configure.ac: Add check for vasprintf and vsnprintf.
12752 * configure, config.in: Regenerate.
12753 * server.h (vasprintf, vsnprintf): Add conditional declarations.
12754
a778ab81 127552010-09-01 Joel Brobecker <brobecker@adacore.com>
12756
12757 * gdbreplay.c: Move include of alloca.h up, next to include of
12758 malloc.h.
12759 * server.h: Add include of malloc.h.
12760 * mem-break.c: Remove include of malloc.h.
12761 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
12762
8b034a19 127632010-09-01 Joel Brobecker <brobecker@adacore.com>
12764
12765 * Makefile.in (memmem.o): Build with -Wno-error.
12766
127672010-09-01 Joel Brobecker <brobecker@adacore.com>
12768
12769 * utils.c (xsnprintf): Make non-static.
12770 * server.h: Add xsnprintf declaration.
12771 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
12772 replace calls to snprintf by calls to xsnprintf throughout.
12773
127742010-09-01 Joel Brobecker <brobecker@adacore.com>
12775
12776 * configure.ac: Add configure check for alloca.
12777 * configure, config.in: Regenerate.
12778 * server.h: Include alloca.h if it exists.
12779 * gdbreplay.c: Include alloca.h if it exists.
12780
1a981360
PA
127812010-08-28 Pedro Alves <pedro@codesourcery.com>
12782
12783 * linux-low.c (__SIGRTMIN): Define if not already defined.
12784 (linux_create_inferior): Check for __ANDROID__ rather than
12785 __SIGRTMIN.
12786 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
12787 are already deferred.
12788 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
12789 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
12790 stopped and already has a pending signal to report.
12791 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
12792 a pending signal to report or is moving out of a jump pad.
12793 (linux_init_signals): Check for __ANDROID__ rather than
12794 __SIGRTMIN.
12795
b4d51a55
PA
127962010-08-28 Pedro Alves <pedro@codesourcery.com>
12797
12798 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
12799 debug_threads check. Avoid a linear search when not doing debug
12800 output.
12801
ec48365d
PA
128022010-08-27 Pedro Alves <pedro@codesourcery.com>
12803
12804 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
12805 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
12806 (struct file_handler) <fd>: Change type to gdb_fildes_t.
12807 (process_event): Change local fd's type to gdb_fildes_t.
12808 (create_file_handler): Adjust prototype.
12809 (delete_file_handler): Adjust prototype.
12810 (handle_file_event): Adjust prototype. Use pfildes.
12811 (create_file_event): Adjsut prototype.
12812 * remote-utils.c (remote_desc, listen_desc): Change type to
12813 gdb_fildes_t.
12814 * server.h: New gdb_fildes_t typedef.
12815 [USE_WIN32API]: Include winsock2.h.
12816 (delete_file_handler, add_file_handler): Adjust prototypes.
12817 (pfildes): Declare.
12818 * utils.c (pfildes): New.
12819
854d88f0
PA
128202010-08-27 Pedro Alves <pedro@codesourcery.com>
12821
12822 * configure.ac (build_warnings): Add -Wno-char-subscripts.
12823 * configure: Regenerate.
12824
0146f85b
PA
128252010-08-27 Pedro Alves <pedro@codesourcery.com>
12826
12827 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
12828 (linux_done_accessing_memory): ... this.
12829 (linux_target_ops): Adjust.
12830 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
12831 * nto-low.c (nto_target_ops): Adjust comment.
12832 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
12833 * spu-low.c (spu_target_ops): Adjust comment.
12834 * target.h (target_ops): Rename unprepare_to_access_memory field
12835 to done_accessing_memory.
12836 (unprepare_to_access_memory): Rename to ...
12837 (done_accessing_memory): ... this.
12838
90d74c30
PA
128392010-08-26 Pedro Alves <pedro@codesourcery.com>
12840
12841 * linux-low.c (linux_prepare_to_access_memory): New.
12842 (linux_unprepare_to_access_memory): New.
12843 (linux_target_ops): Install them.
12844 * server.c (read_memory): Rename to ...
12845 (gdb_read_memory): ... this. Use
12846 prepare_to_access_memory/prepare_to_access_memory.
12847 (write_memory): Rename to ...
12848 (gdb_write_memory): ... this. Use
12849 prepare_to_access_memory/prepare_to_access_memory.
12850 (handle_search_memory_1): Adjust.
12851 (process_serial_event): Adjust.
12852 * target.h (struct target_ops): New fields
12853 prepare_to_access_memory and unprepare_to_access_memory.
12854 (prepare_to_access_memory, unprepare_to_access_memory): New.
12855 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
12856 prepare_to_access_memory/prepare_to_access_memory.
12857 * nto-low.c (nto_target_ops): Adjust.
12858 * spu-low.c (spu_target_ops): Adjust.
12859 * win32-low.c (win32_target_ops): Adjust.
12860
fd467969
PA
128612010-08-26 Pedro Alves <pedro@codesourcery.com>
12862
12863 * Makefile.in (WARN_CFLAGS): Get it from configure.
12864 (WERROR_CFLAGS): New.
12865 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
12866 * configure.ac: Introduce --enable-werror, which adds -Werror to
12867 the compiler command line. Enabled by default. Disable with
12868 --disable-werror. Add -Wdeclaration-after-statement
12869 Wpointer-arith and -Wformat-nonliteral to warning flags.
12870 * configure: Regenerate.
12871
331e2f5f
PA
128722010-08-26 Pedro Alves <pedro@codesourcery.com>
12873
12874 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
12875
e581f2b4
PA
128762010-08-26 Pedro Alves <pedro@codesourcery.com>
12877
12878 * gdbreplay.c (remote_error): New.
12879 (gdbchar): New.
12880 (expect): Use gdbchar. Check for error reading from GDB.
12881 Clarify sync error output.
12882 (play): Check for errors writing to GDB.
12883 * linux-low.c (sigchld_handler): Really ignore `write' errors.
12884 * remote-utils.c (getpkt): Check for errors writing to the remote
12885 descriptor.
12886
3c11dd79
PA
128872010-08-25 Pedro Alves <pedro@codesourcery.com>
12888
12889 * linux-low.c (linux_wait_1): Move non-debugging code out of
12890 `debug_threads' control.
12891
d20a8ad9
PA
128922010-08-25 Pedro Alves <pedro@codesourcery.com>
12893
12894 * linux-low.c (linux_wait_1): Don't set last_status here.
12895 * server.c (push_event, queue_stop_reply_callback): Assert we're
12896 not pushing a TARGET_WAITKIND_IGNORE event.
12897 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
12898 (myresume, handle_target_event): Set the thread's last_resume_kind
12899 and last_status from the target returned status.
12900
964e4306
PA
129012010-08-25 Pedro Alves <pedro@codesourcery.com>
12902
12903 PR threads/10729
12904
12905 * linux-x86-low.c (update_debug_registers_callback): New.
12906 (i386_dr_low_set_addr): Use it.
12907 (i386_dr_low_get_addr): New.
12908 (i386_dr_low_set_control): Use update_debug_registers_callback.
12909 (i386_dr_low_get_control): New.
12910 (i386_dr_low_get_status): Adjust.
12911 * linux-low.c (linux_stop_lwp): New.
12912 * linux-low.h (linux_stop_lwp): Declare.
12913
12914 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
12915 argument instead of a i386_debug_reg_state.
12916 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
12917 a i386_debug_reg_state.
12918 (i386_insert_aligned_watchpoint): Adjust.
12919 (i386_remove_aligned_watchpoint): Adjust.
12920 (i386_low_stopped_data_address): Read the debug registers from the
12921 inferior instead of from the mirrors.
12922 * i386-low.h (struct i386_debug_reg_state): Extend comment.
12923 (i386_dr_low_get_addr): Declare.
12924 (i386_dr_low_get_control): Declare.
12925 (i386_dr_low_get_status): Change prototype.
12926
12927 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
12928 (i386_dr_low_get_addr): New.
12929 (i386_dr_low_get_control): New.
12930 (i386_dr_low_get_status): Adjust prototype. Return
12931 dr_status_mirror.
12932 (i386_initial_stuff): Clear dr_status_mirror and
12933 dr_control_mirror.
12934 (i386_get_thread_context): Adjust.
12935 (i386_set_thread_context): Adjust.
12936 (i386_thread_added): Adjust.
12937
5f21a75b
PA
129382010-08-24 Pedro Alves <pedro@codesourcery.com>
12939
12940 * linux-low.h (linux_thread_area): Delete declaration.
12941
3e4c1235
TS
129422010-08-11 Thomas Schwinge <thomas@codesourcery.com>
12943
12944 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
12945 after its termination.
12946
1971b033
PA
129472010-08-09 Pedro Alves <pedro@codesourcery.com>
12948
12949 * linux-low.c (gdb_wants_lwp_stopped): Delete.
12950 (gdb_wants_all_stopped): Delete.
12951 (linux_wait_1): Don't call them.
12952 * server.c (handle_v_cont): Tag all threads as want-stopped.
12953 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
12954 stopped as "client-wants-stopped".
12955
310444ac
PA
129562010-07-31 Pedro Alves <pedro@codesourcery.com>
12957
12958 * Makefile.in (signals_h): New.
12959 (server_h): Depend on it.
12960 (server.o): Don't depend on $(signals_def).
12961 (signals.o): Depend on $(signals_def).
12962
a19cae16
JK
129632010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
12964
12965 * Makefile.in (signals_def): New.
12966 (server_h): Append include/gdb/signals.h and signals_def.
12967 (server.o): Append signals_def.
12968
30d50328
JK
129692010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
12970
12971 * server.c (handle_target_event): Use target_signal_to_host for
12972 resume_info.sig initialization.
12973 * target.h (struct thread_resume) <sig>: New comment.
12974
5c3216e2
OS
129752010-07-20 Ozkan Sezer <sezeroz@gmail.com>
12976
c6f46ca0
OS
12977 * server.c (handle_query): strcpy() the returned string from paddress()
12978 instead of sprintf().
5c3216e2
OS
12979 * utils.c (paddress): Return phex_nz().
12980
6bd31874
JB
129812010-07-07 Joel Brobecker <brobecker@adacore.com>
12982
12983 * server.c (handle_v_cont): Call mourn_inferior if process
12984 just exited.
12985 (myresume): Likewise.
12986
0fb4aa4b
PA
129872010-07-01 Pedro Alves <pedro@codesourcery.com>
12988
12989 Static tracepoints, and integration with UST.
12990
12991 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
12992 * mem-break.c (uninsert_all_breakpoints)
12993 (reinsert_all_breakpoints): New.
12994 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
12995 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
12996 (gdb_agent_ust_loaded, helper_thread_id)
12997 (gdb_agent_helper_thread_id): New macros.
12998 (struct ipa_sym_addresses): Add addr_ust_loaded,
12999 addr_helper_thread_id, addr_cmd_buf.
13000 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
13001 (in_process_agent_loaded_ust): New.
13002 (write_e_ust_not_loaded): New.
13003 (maybe_write_ipa_ust_not_loaded): New.
13004 (struct collect_static_trace_data_action): New.
13005 (enum tracepoint_type) <static_tracepoint>: New.
13006 (struct tracepoint) <handle>: Mention static tracepoints.
13007 (struct static_tracepoint_ctx): New.
13008 (CMD_BUF_SIZE): New.
13009 (add_tracepoint_action): Handle static tracepoint actions.
13010 (unprobe_marker_at): New.
13011 (clear_installed_tracepoints): Handle static tracepoints.
13012 (cmd_qtdp): Handle static tracepoints.
13013 (probe_marker_at): New.
13014 (cmd_qtstart): Handle static tracepoints.
13015 (response_tracepoint): Handle static tracepoints.
13016 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
13017 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
13018 (get_context_regcache): Handle static tracepoints.
13019 (do_action_at_tracepoint): Handle static tracepoint actions.
13020 (traceframe_find_block_type): Handle static trace data blocks.
13021 (traceframe_read_sdata): New.
13022 (download_tracepoints): Download static tracepoint actions.
13023 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
13024 (GDB_PROBE_NAME): New.
13025 (ust_ops): New.
13026 (GET_UST_SYM): New.
13027 (USTF): New.
13028 (dlsym_ust): New.
13029 (ust_marker_to_static_tracepoint): New.
13030 (gdb_probe): New.
13031 (collect_ust_data_at_tracepoint): New.
13032 (gdb_ust_probe): New.
13033 (UNIX_PATH_MAX, SOCK_DIR): New.
13034 (gdb_ust_connect_sync_socket): New.
13035 (resume_thread, stop_thread): New.
13036 (run_inferior_command): New.
13037 (init_named_socket): New.
13038 (gdb_ust_socket_init): New.
13039 (cstr_to_hexstr): New.
13040 (next_st): New.
13041 (first_marker, next_marker): New.
13042 (response_ust_marker): New.
13043 (cmd_qtfstm, cmd_qtsstm): New.
13044 (unprobe_marker_at, probe_marker_at): New.
13045 (cmd_qtstmat, gdb_ust_thread): New.
13046 (gdb_ust_init): New.
13047 (initialize_tracepoint_ftlib): Call gdb_ust_init.
13048 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
13049 (ST_REGENTRY): New.
13050 (x86_64_st_collect_regmap): New.
13051 (X86_64_NUM_ST_COLLECT_GREGS): New.
13052 (AMD64_RIP_REGNUM): New.
13053 (supply_static_tracepoint_registers): New.
13054 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
13055 (ST_REGENTRY): New.
13056 (i386_st_collect_regmap): New.
13057 (i386_NUM_ST_COLLECT_GREGS): New.
13058 (supply_static_tracepoint_registers): New.
13059 * server.c (handle_query): Handle qXfer:statictrace:read.
13060 <qSupported>: Report support for StaticTracepoints, and
13061 qXfer:statictrace:read features.
13062 * server.h (traceframe_read_sdata)
13063 (supply_static_tracepoint_registers): Declare.
13064 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
13065 (unpack_varlen_hex): Include in IPA build.
13066 * Makefile.in (ustlibs, ustinc): New.
13067 (IPA_OBJS): Add remote-utils-ipa.o.
13068 ($(IPA_LIB)): Link -ldl and -lpthread.
13069 (UST_CFLAGS): New.
13070 (IPAGENT_CFLAGS): Add UST_CFLAGS.
13071 * config.in, configure: Regenerate.
13072
9e4344e5
PA
130732010-06-20 Ian Lance Taylor <iant@google.com>
13074 Pedro Alves <pedro@codesourcery.com>
13075
13076 * linux-x86-low.c (always_true): Delete.
13077 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
13078 trying to fool the compiler with always_true.
13079
c6beb2cb
PA
130802010-06-20 Pedro Alves <pedro@codesourcery.com>
13081
13082 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
13083 conditions in gdbserver.
13084
d2ed6730
UW
130852010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
13086
13087 * spu-low.c (spu_read_memory): Wrap around local store limit.
13088 (spu_write_memory): Likewise.
13089
4e29fb54
PA
130902010-06-15 Pedro Alves <pedro@codesourcery.com>
13091
13092 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
13093 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
13094 LONGEST uses.
13095 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
13096 uses.
13097 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
13098 uses with LONGEST uses.
13099
6a271cae
PA
131002010-06-14 Stan Shebs <stan@codesourcery.com>
13101 Pedro Alves <pedro@codesourcery.com>
13102
13103 Bytecode compiler.
13104
13105 * linux-x86-low.c: Include limits.h.
13106 (add_insns): New.
13107 (always_true): New.
13108 (EMIT_ASM): New.
13109 (EMIT_ASM32): New.
13110 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
13111 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
13112 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
13113 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
13114 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
13115 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
13116 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
13117 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
13118 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
13119 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
13120 (amd64_emit_void_call_2): New.
13121 (amd64_emit_ops): New.
13122 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
13123 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
13124 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
13125 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
13126 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
13127 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
13128 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
13129 (i386_emit_call, i386_emit_reg, i386_emit_pop)
13130 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
13131 (i386_emit_stack_adjust, i386_emit_int_call_1)
13132 (i386_emit_void_call_2): New.
13133 (i386_emit_ops): New.
13134 (x86_emit_ops): New.
13135 (the_low_target): Install x86_emit_ops.
13136 * server.h (struct emit_ops): New.
13137 (get_raw_reg_func_addr): Declare.
13138 (current_insn_ptr, emit_error): Declare.
13139 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
13140 (set_trace_state_variable_value): New defines.
13141 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
13142 addr_get_trace_state_variable_value and
13143 addr_set_trace_state_variable_value.
13144 (symbol_list): New fields for get_raw_reg,
13145 get_trace_state_variable_value and set_trace_state_variable_value.
13146 (condfn): New typedef.
13147 (struct tracepoint): New field `compiled_cond'.
13148 (do_action_at_tracepoint): Clear compiled_cond.
13149 (get_trace_state_variable_value, set_trace_state_variable_value):
13150 Export in the IPA.
13151 (condition_true_at_tracepoint): If there's a compiled condition,
13152 run that.
13153 (current_insn_ptr, emit_error): New globals.
13154 (struct bytecode_address): New.
13155 (get_raw_reg_func_addr): New.
13156 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
13157 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
13158 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
13159 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
13160 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
13161 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
13162 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
13163 (compile_tracepoint_condition, compile_bytecodes): New.
13164 * target.h (emit_ops): Forward declare.
13165 (struct target_ops): New field emit_ops.
13166 (target_emit_ops): New.
13167 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
13168 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
13169 * linux-low.c (linux_emit_ops): New.
13170 (linux_target_ops): Install it.
13171 * linux-low.h (struct linux_target_ops): New field emit_ops.
13172
92b72907
UW
131732010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
13174
13175 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
13176 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
13177
fa593d66
PA
131782010-06-01 Pedro Alves <pedro@codesourcery.com>
13179 Stan Shebs <stan@codesourcery.com>
13180
13181 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
13182 (all): Depend on $(extra_libraries).
13183 (install-only): Install the IPA.
13184 (IPA_OBJS, IPA_LIB): New.
13185 (clean): Remove the IPA lib.
13186 (IPAGENT_CFLAGS): New.
13187 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
13188 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
13189 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
13190 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
13191 * configure.ac: Check for atomic builtins support in the compiler.
13192 (IPA_DEPFILES, extra_libraries): Define.
13193 * configure.srv (ipa_obj): Add description.
13194 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
13195 (i[34567]86-*-linux*): Set ipa_obj.
13196 (x86_64-*-linux*): Set ipa_obj.
13197 * linux-low.c (stabilizing_threads): New.
13198 (supports_fast_tracepoints): New.
13199 (linux_detach): Stabilize threads before detaching.
13200 (handle_tracepoints): Handle internal tracing breakpoints. Assert
13201 the lwp is either not stabilizing, or is moving out of a jump pad.
13202 (linux_fast_tracepoint_collecting): New.
13203 (maybe_move_out_of_jump_pad): New.
13204 (enqueue_one_deferred_signal): New.
13205 (dequeue_one_deferred_signal): New.
13206 (linux_wait_for_event_1): If moving out of a jump pad, defer
13207 pending signals to later.
13208 (linux_stabilize_threads): New.
13209 (linux_wait_1): Check if threads need moving out of jump pads, and
13210 do it if so.
13211 (stuck_in_jump_pad_callback): New.
13212 (move_out_of_jump_pad_callback): New.
13213 (lwp_running): New.
13214 (linux_resume_one_lwp): Handle moving out of jump pads.
13215 (linux_set_resume_request): Dequeue deferred signals.
13216 (need_step_over_p): Also step over fast tracepoint jumps.
13217 (start_step_over): Also uninsert fast tracepoint jumps.
13218 (finish_step_over): Also reinsert fast tracepoint jumps.
13219 (linux_install_fast_tracepoint_jump): New.
13220 (linux_target_ops): Install linux_stabilize_threads and
13221 linux_install_fast_tracepoint_jump_pad.
13222 * linux-low.h (linux_target_ops) <get_thread_area,
13223 install_fast_tracepoint_jump_pad>: New fields.
13224 (struct lwp_info) <collecting_fast_tracepoint,
13225 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
13226 (linux_get_thread_area): Declare.
13227 * linux-x86-low.c (jump_insn): New.
13228 (x86_get_thread_area): New.
13229 (append_insns): New.
13230 (push_opcode): New.
13231 (amd64_install_fast_tracepoint_jump_pad): New.
13232 (i386_install_fast_tracepoint_jump_pad): New.
13233 (x86_install_fast_tracepoint_jump_pad): New.
13234 (the_low_target): Install x86_get_thread_area and
13235 x86_install_fast_tracepoint_jump_pad.
13236 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
13237 (struct fast_tracepoint_jump): New.
13238 (fast_tracepoint_jump_insn): New.
13239 (fast_tracepoint_jump_shadow): New.
13240 (find_fast_tracepoint_jump_at): New.
13241 (fast_tracepoint_jump_here): New.
13242 (delete_fast_tracepoint_jump): New.
13243 (set_fast_tracepoint_jump): New.
13244 (uninsert_fast_tracepoint_jumps_at): New.
13245 (reinsert_fast_tracepoint_jumps_at): New.
13246 (set_breakpoint_at): Use write_inferior_memory.
13247 (uninsert_raw_breakpoint): Use write_inferior_memory.
13248 (check_mem_read): Mask out fast tracepoint jumps.
13249 (check_mem_write): Mask out fast tracepoint jumps.
13250 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
13251 (set_fast_tracepoint_jump): Declare.
13252 (delete_fast_tracepoint_jump)
13253 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
13254 (reinsert_fast_tracepoint_jumps_at): Declare.
13255 * regcache.c: Don't compile many functions when building the
13256 in-process agent library.
13257 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
13258 the register buffer in the heap.
13259 (free_register_cache): If the register buffer isn't owned by the
13260 regcache, don't free it.
13261 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
13262 pre-existing register caches.
13263 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
13264 type.
13265 (convert_ascii_to_int): : Constify `from' parameter type.
13266 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
13267 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
13268 the needed buffer in-place.
13269 (relocate_instruction): New.
13270 * server.c (handle_query) <qSymbols>: If the target supports
13271 tracepoints, give it a chance of looking up symbols. Report
13272 support for fast tracepoints.
13273 (handle_status): Stabilize threads.
13274 (process_serial_event): Adjust.
13275 * server.h (struct fast_tracepoint_jump): Forward declare.
13276 (struct process_info) <fast_tracepoint_jumps>: New field.
13277 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
13278 (decode_X_packet, decode_M_packet): Adjust.
13279 (relocate_instruction): Declare.
13280 (in_process_agent_loaded): Declare.
13281 (tracepoint_look_up_symbols): Declare.
13282 (struct fast_tpoint_collect_status): Declare.
13283 (fast_tracepoint_collecting): Declare.
13284 (force_unlock_trace_buffer): Declare.
13285 (handle_tracepoint_bkpts): Declare.
13286 (initialize_low_tracepoint)
13287 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
13288 * target.h (struct target_ops) <stabilize_threads,
13289 install_fast_tracepoint_jump_pad>: New fields.
13290 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
13291 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
13292 [HAVE_STDINT_H]: Include stdint.h.
13293 (trace_debug_1): Rename to ...
13294 (trace_vdebug): ... this.
13295 (trace_debug): Rename to ...
13296 (trace_debug_1): ... this. Add `level' parameter.
13297 (trace_debug): New.
13298 (ATTR_USED, ATTR_NOINLINE): New.
13299 (IP_AGENT_EXPORT): New.
13300 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
13301 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
13302 (about_to_request_buffer_space, trace_buffer_is_full)
13303 (stopping_tracepoint, expr_eval_result, error_tracepoint)
13304 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
13305 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
13306 (traceframe_write_count, traceframes_created)
13307 (trace_state_variables)
13308 New renaming defines.
13309 (struct ipa_sym_addresses): New.
13310 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
13311 (symbol_list): New.
13312 (ipa_sym_addrs): New.
13313 (all_tracepoint_symbols_looked_up): New.
13314 (in_process_agent_loaded): New.
13315 (write_e_ipa_not_loaded): New.
13316 (maybe_write_ipa_not_loaded): New.
13317 (tracepoint_look_up_symbols): New.
13318 (debug_threads) [IN_PROCESS_AGENT]: New.
13319 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
13320 (UNKNOWN_SIDE_EFFECTS): New.
13321 (stop_tracing): New.
13322 (flush_trace_buffer): New.
13323 (stop_tracing_bkpt): New.
13324 (flush_trace_buffer_bkpt): New.
13325 (read_inferior_integer): New.
13326 (read_inferior_uinteger): New.
13327 (read_inferior_data_pointer): New.
13328 (write_inferior_data_pointer): New.
13329 (write_inferior_integer): New.
13330 (write_inferior_uinteger): New.
13331 (struct collect_static_trace_data_action): Delete.
13332 (enum tracepoint_type): New.
13333 (struct tracepoint) <type>: New field `type'.
43aaf8b6
PA
13334 <actions_str, step_actions, step_actions_str>: Only include in
13335 GDBserver.
fa593d66
PA
13336 <orig_size, obj_addr_on_target, adjusted_insn_addr>
13337 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
13338 (tracepoints): Use IP_AGENT_EXPORT.
13339 (last_tracepoint): Don't include in the IPA.
13340 (stopping_tracepoint): Use IP_AGENT_EXPORT.
13341 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
13342 (alloced_trace_state_variables): New.
13343 (trace_state_variables): Use IP_AGENT_EXPORT.
13344 (traceframe_t): Delete unused variable.
13345 (circular_trace_buffer): Don't include in the IPA.
13346 (trace_buffer_start): Delete.
13347 (struct trace_buffer_control): New.
13348 (trace_buffer_free): Delete.
13349 (struct ipa_trace_buffer_control): New.
13350 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
13351 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
13352 New.
13353 (trace_buffer_ctrl): New.
13354 (TRACE_BUFFER_CTRL_CURR): New.
13355 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
13356 Reimplement as macros.
13357 (trace_buffer_wrap): Delete.
13358 (traceframe_write_count, traceframe_read_count)
13359 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
13360 (struct tracepoint_hit_ctx) <type>: New field.
13361 (struct fast_tracepoint_ctx): New.
13362 (memory_barrier): New.
13363 (cmpxchg): New.
13364 (record_tracepoint_error): Update atomically in the IPA.
13365 (clear_inferior_trace_buffer): New.
13366 (about_to_request_buffer_space): New.
13367 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
13368 updating the same buffer.
13369 (add_tracepoint): Default the tracepoint's type to trap
13370 tracepoint, and orig_size to -1.
13371 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
13372 internal variables.
13373 (create_trace_state_variable): New parameter `gdb'. Handle it.
13374 (clear_installed_tracepoints): Clear fast tracepoint jumps.
13375 (cmd_qtdp): Handle fast tracepoints.
13376 (cmd_qtdv): Adjust.
13377 (max_jump_pad_size): New.
13378 (gdb_jump_pad_head): New.
13379 (get_jump_space_head): New.
13380 (claim_jump_space): New.
13381 (sort_tracepoints): New.
13382 (MAX_JUMP_SIZE): New.
13383 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
13384 IPA.
13385 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
13386 support. Upload fast traceframes, and delete internal IPA
13387 breakpoints.
13388 (stop_tracing_handler): New.
13389 (flush_trace_buffer_handler): New.
13390 (cmd_qtstop): Upload fast tracepoints.
13391 (response_tracepoint): Handle fast tracepoints.
13392 (tracepoint_finished_step): Upload fast traceframes. Set the
13393 tracepoint hit context's tracepoint type.
13394 (handle_tracepoint_bkpts): New.
13395 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
13396 type. Add comment about fast tracepoints.
13397 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
13398 non-existing action_str field.
13399 (get_context_regcache): Handle fast tracepoints.
13400 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
13401 to the regcache.
13402 (fast_tracepoint_from_jump_pad_address): New.
13403 (fast_tracepoint_from_ipa_tpoint_address): New.
13404 (collecting_t): New.
13405 (force_unlock_trace_buffer): New.
13406 (fast_tracepoint_collecting): New.
13407 (collecting): New.
13408 (gdb_collect): New.
13409 (write_inferior_data_ptr): New.
13410 (target_tp_heap): New.
13411 (target_malloc): New.
13412 (download_agent_expr): New.
13413 (UALIGN): New.
13414 (download_tracepoints): New.
13415 (download_trace_state_variables): New.
13416 (upload_fast_traceframes): New.
13417 (IPA_FIRST_TRACEFRAME): New.
13418 (IPA_NEXT_TRACEFRAME_1): New.
13419 (IPA_NEXT_TRACEFRAME): New.
13420 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
13421 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
13422 (gdb_jump_pad_buffer_end): New.
13423 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
13424 (initialize_tracepoint): Adjust.
13425 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
13426 buffer. Initialize the low module.
13427 * utils.c (PREFIX, TOOLNAME): New.
13428 (malloc_failure): Use PREFIX.
13429 (error): In the IPA, an error causes an exit.
13430 (fatal, warning): Use PREFIX.
13431 (internal_error): Use TOOLNAME.
13432 (NUMCELLS): Increase to 10.
13433 * configure, config.in: Regenerate.
13434
d149dd1d
PA
134352010-06-01 Pedro Alves <pedro@codesourcery.com>
13436
13437 * server.c (handle_query) <qSupported>: Do two passes over the
13438 qSupported string to avoid nesting strtok.
13439
f6528abd
JK
134402010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
13441
13442 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
13443 (CDEPS): New.
13444 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
13445 -Wl,--dynamic-list.
13446 * configure: Regenerate.
13447 * proc-service.list: New.
13448
ca2a87a0
JK
134492010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
13450
13451 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
13452 New comment.
13453
363a6e9f
OS
134542010-05-26 Ozkan Sezer <sezeroz@gmail.com>
13455
13456 * gdbreplay.c (remote_open): Check error return from socket() call by
13457 its equality to -1 not by it being negative.
13458 * remote-utils.c (remote_open): Likewise.
13459
d23b6cb1
PA
134602010-05-23 Pedro Alves <pedro@codesourcery.com>
13461
13462 * config.h: Regenerate.
13463
28d3cf85
MK
134642010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
13465
13466 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
13467 doesn't provide PTRACE_GET_THREAD_AREA.
13468
fea36a59
MK
134692010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
13470
13471 * linux-m68k-low.c: Include <asm/ptrace.h>
13472 (ps_get_thread_area): Implement.
13473
24b066ba
DE
134742010-05-03 Doug Evans <dje@google.com>
13475
13476 * event-loop.c (struct callback_event): New struct.
13477 (callback_list): New global.
13478 (append_callback_event, delete_callback_event): New functions.
13479 (process_callback): New function.
13480 (start_event_loop): Call it.
13481 * remote-utils.c (NOT_SCHEDULED): Define.
13482 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
13483 moved out of readchar.
13484 (readchar): Rewrite. Call reschedule before returning.
13485 (reset_readchar): New function.
13486 (remote_close): Call it.
13487 (process_remaining, reschedule): New functions.
13488 * server.h (callback_handler_func): New typedef.
13489 (append_callback_event, delete_callback_event): Declare.
13490
9836d6ea
PA
134912010-05-03 Pedro Alves <pedro@codesourcery.com>
13492
13493 * proc-service.c (ps_pglobal_lookup): Use
13494 thread_db_look_up_one_symbol.
13495 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
13496 parameter. Use it instead of all_symbols_looked_up.
13497 * server.h (struct process_info) <all_symbols_looked_up>: Delete
13498 field.
13499 (all_symbols_looked_up): Don't declare.
13500 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
13501 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
13502 field.
13503 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
13504 Set all_symbols_looked_up here.
13505 (thread_db_look_up_one_symbol): New.
13506 (thread_db_get_tls_address): Adjust.
13507 (thread_db_load_search, try_thread_db_load_1): Always allocate the
13508 thread_db object on the heap, and tentatively set it in the
13509 process structure.
13510 (thread_db_init): Don't set all_symbols_looked_up here.
13511 * linux-low.h (thread_db_look_up_one_symbol): Declare.
13512
7984d532
PA
135132010-05-03 Pedro Alves <pedro@codesourcery.com>
13514
13515 * linux-low.c (linux_kill, linux_detach): Adjust.
13516 (status_pending_p_callback): Remove redundant statement. Check
13517 for !TARGET_WAITIKIND_IGNORE, instead of
13518 TARGET_WAITKIND_STOPPED.
13519 (handle_tracepoints): Make sure LWP is locked. Adjust.
13520 (linux_wait_for_event_1): Adjust.
13521 (linux_cancel_breakpoints): New.
13522 (unsuspend_one_lwp): New.
13523 (unsuspend_all_lwps): New.
13524 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
13525 (send_sigstop_callback): Change return type to int, add new
13526 `except' parameter and handle it.
13527 (suspend_and_send_sigstop_callback): New.
13528 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
13529 pass them down. If SUSPEND, also increment the lwp's suspend
13530 count.
13531 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
13532 (need_step_over_p): Don't consider suspended LWPs.
13533 (start_step_over): Adjust.
13534 (proceed_one_lwp): Change return type to int, add new `except'
13535 parameter and handle it.
13536 (unsuspend_and_proceed_one_lwp): New.
13537 (proceed_all_lwps): Use find_inferior instead of
13538 for_each_inferior.
13539 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
13540 also decrement the suspend count of LWPs. Pass `except' down,
13541 instead of hacking its suspend count.
13542 (linux_pause_all): Add `freeze' parameter. Adjust.
13543 (linux_unpause_all): New.
13544 (linux_target_ops): Install linux_unpause_all.
13545 * server.c (handle_status): Adjust.
13546 * target.h (struct target_ops): New fields `unpause_all' and
13547 `cancel_breakpoints'. Add new parameter to `pause_all'.
13548 (pause_all): Add new `freeze' parameter.
13549 (unpause_all): New.
13550 (cancel_breakpoints): New.
13551 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
13552 cancel breakpoints.
13553 (cmd_qtstart): Pause threads.
13554 (stop_tracing): Pause threads, and cancel breakpoints.
13555 * win32-low.c (win32_target_ops): Adjust.
13556
e471f25b
PA
135572010-05-03 Pedro Alves <pedro@codesourcery.com>
13558
13559 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
13560 the inferior right away from here...
13561 (linux_wait_1): ... to here, and adjust to check the thread's
13562 last_resume_kind instead of the lwp's step or stop_expected flags.
13563
1915ef4f
PA
135642010-05-02 Pedro Alves <pedro@codesourcery.com>
13565
13566 * README: Use consistent `GDB' and `GDBserver' spellings.
13567
f9e39928
PA
135682010-05-02 Pedro Alves <pedro@codesourcery.com>
13569
13570 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
13571 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
13572 (linux_detach_one_lwp): Assume the lwp is stopped.
13573 (any_thread_of): Delete.
13574 (linux_detach): Stop all lwps here. Don't blindly delete all
13575 breakpoints.
13576 (delete_lwp_callback): New.
13577 (linux_mourn): Delete all lwps of the process that is gone.
13578 (linux_wait_1): Don't delete the last lwp of the process here.
13579 * mem-break.h (mark_breakpoints_out): Declare.
13580 * mem-break.c (mark_breakpoints_out): New.
13581 (free_all_breakpoints): Use it.
13582 * server.c (handle_target_event): If the process is gone, mark
13583 breakpoints out.
13584 * thread-db.c (struct thread_db) <create_bp>: New field.
13585 (thread_db_enable_reporting): Fix prototype. Store a thread event
13586 breakpoint reference in the thread_db struct.
13587 (thread_db_load_search): Clear the thread_db object.
13588 (try_thread_db_load_1): Ditto.
13589 (switch_to_process): New.
13590 (disable_thread_event_reporting): Use it.
13591 (remove_thread_event_breakpoints): New.
13592 (thread_db_detach, thread_db_mourn): Use it.
13593
1e7fc18c
PA
135942010-05-01 Pedro Alves <pedro@codesourcery.com>
13595
13596 * linux-low.c (linux_enable_event_reporting): New.
13597 (linux_wait_for_event_1, handle_extended_wait): Use it.
13598
02fc4de7
PA
135992010-04-30 Pedro Alves <pedro@codesourcery.com>
13600
13601 * linux-low.c (linux_kill_one_lwp, linux_kill)
13602 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
13603 (send_sigstop): Take an lwp_info as parameter instead. Queue a
13604 SIGSTOP even if the LWP is stopped.
13605 (send_sigstop_callback): New.
13606 (stop_all_lwps): Use send_sigstop_callback instead.
13607 (linux_resume_one_thread): Adjust.
13608 (proceed_one_lwp): Still proceed an LWP that the client has
13609 requested to stop, if we haven't reported it as stopped yet. Make
13610 sure that LWPs the client want stopped, have a pending SIGSTOP.
13611
bc3b5632
DE
136122010-04-26 Doug Evans <dje@google.com>
13613
ae1ada35
DE
13614 * server.c (handle_general_set): Make static.
13615
bc3b5632
DE
13616 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
13617 Print received char after testing for error/eof instead of before.
13618 (input_interrupt): Tweak comment.
13619
65730243
DE
136202010-04-23 Doug Evans <dje@google.com>
13621
13622 * server.c (start_inferior): Print inferior argv if --debug.
13623
a8ae7dc0
AR
136242010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
13625
13626 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
13627 * nto-x86-low.c: Include server.h
13628
1c07cc19
PM
136292010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
13630
13631 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
13632 be consistent with other sources of this directory.
13633 (init_registers_amd64): Correct name of source file of this function
13634 in the comment.
13635
e0a61e09
PM
136362010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
13637
13638 * configure.srv (x86_64-*-mingw*): New configuration for Windows
13639 64-bit executables.
13640
54709339
PM
136412010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
13642
13643 * win32-i386-low.c: Add 64-bit support.
13644 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
13645 (init_registers_amd64): Declare.
13646 (mappings): Add 64-bit version of array.
13647 (init_windows_x86): New function.
13648 (the_low_target): Change init_arch field to init_windows_x86.
13649
e8f0053d
PM
136502010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
13651
13652 * win32-low.c: Adapt to support also 64-bit architecture.
13653 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
13654 (get_image_name): Use SIZE_T type for local variable `done'.
13655 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
13656 (toolhelp_get_dll_name): Idem.
13657 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
13658 Use uintptr_t typecast to avoid warning.
13659 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
13660 (handle_exception): Use phex_nz to avoid warning.
13661 (win32_wait): Remove unused local variable `process'.
13662
c481e77e
PM
136632010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
13664
13665 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
13666 `amd64-avx.o'.
13667
12ea4b69
PM
136682010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
13669
13670 * configure.ac: Use `ws2_32' library for srv_mingw.
13671 * configure: Regenerate.
13672 * gdbreplay.c: Include winsock2.h instead of winsock.h.
13673 * remote-utils.c: Likewise.
13674
f6d1620c
L
136752010-04-17 H.J. Lu <hongjiu.lu@intel.com>
13676
13677 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
13678 if __x86_64__ is defined.
13679
8e642873
PM
136802010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
13681
13682 * configure: Regenerate.
13683
711e434b
PM
136842010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
13685
13686 * server.c (handle_query): Handle 'qGetTIBAddr' query.
13687 * target.h (target_ops): New get_tib_address field.
13688 * win32-low.h (win32_thread_info): Add thread_local_base field.
13689 * win32-low.c (child_add_thread): Add tlb argument.
13690 Set thread_local_base field to TLB.
13691 (get_child_debug_event): Adapt to child_add_thread change.
13692 (win32_get_tib_address): New function.
13693 (win32_target_ops): Set get_tib_address field to
13694 win32_get_tib_address.
13695 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
13696
505106cd
PA
136972010-04-12 Pedro Alves <pedro@codesourcery.com>
13698
505106cd
PA
13699 * linux-low.c (linux_mourn): Also remove the process.
13700 * server.c (handle_target_event): Don't remove the process here.
13701 * nto-low.c (nto_mourn): New.
13702 (nto_target_ops): Install it.
13703 * spu-low.c (spu_mourn): New.
13704 (spu_target_ops): Install it.
13705 * win32-low.c (win32_mourn): New.
13706 (win32_target_ops): Install it.
13707
e8470a06
PA
137082010-04-12 Pedro Alves <pedro@codesourcery.com>
13709
13710 * server.h (buffer_xml_printf): Remove redundant `;'.
13711
45ba0d02
PA
137122010-04-12 Pedro Alves <pedro@codesourcery.com>
13713
13714 * regcache.c (set_register_cache): Invalidate regcaches before
13715 changing the register cache layout.
13716 (regcache_invalidate_one): Allow a NULL regcache.
13717 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
13718 regcaches before changing the register cache layout or the target
13719 regsets.
13720
59e04013
L
137212010-04-12 H.J. Lu <hongjiu.lu@intel.com>
13722
13723 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
13724 variable warning on Linux/x86-64.
13725
8336d594
PA
137262010-04-11 Pedro Alves <pedro@codesourcery.com>
13727
13728 GDBserver disconnected tracing support.
13729
13730 * linux-low.c (linux_remove_process): Delete.
13731 (add_lwp): Don't set last_resume_kind here.
13732 (linux_kill): Use `mourn'.
13733 (linux_detach): Use `thread_db_detach', and `mourn'.
13734 (linux_mourn): New.
13735 (linux_attach_lwp_1): Adjust comment.
13736 (linux_attach): last_resume_kind moved the thread_info; adjust.
13737 (status_pending_p_callback): Adjust.
13738 (linux_wait_for_event_1): Adjust.
13739 (count_events_callback, select_singlestep_lwp_callback)
13740 (select_event_lwp_callback, cancel_breakpoints_callback)
13741 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
13742 (proceed_one_lwp): Adjust.
13743 (linux_async): Add debug output.
13744 (linux_thread_stopped): New.
13745 (linux_pause_all): New.
13746 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
13747 linux_pause_all.
13748 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
13749 (thread_db_free): Delete declaration.
13750 (thread_db_detach, thread_db_mourn): Declare.
13751 * thread-db.c (thread_db_init): Use thread_db_mourn.
13752 (thread_db_free): Delete, split in two.
13753 (disable_thread_event_reporting): New.
13754 (thread_db_detach): New.
13755 (thread_db_mourn): New.
13756
13757 * server.h (struct thread_info) <last_resume_kind>: New field.
13758 <attached>: Add comment.
13759 <gdb_detached>: New field.
13760 (handler_func): Change return type to int.
13761 (handle_serial_event, handle_target_event): Ditto.
13762 (gdb_connected): Declare.
13763 (tracing): Delete.
13764 (disconnected_tracing): Declare.
13765 (stop_tracing): Declare.
13766
13767 * server.c (handle_query) <qSupported>: Report support for
13768 disconnected tracing.
13769 (queue_stop_reply_callback): Account for running threads.
13770 (gdb_wants_thread_stopped): New.
13771 (gdb_wants_all_threads_stopped): New.
13772 (gdb_reattached_process): New.
13773 (handle_status): Clear the `gdb_detached' flag of all processes.
13774 In all-stop, stop all threads.
13775 (main): Be sure to leave tfind mode. Handle disconnected tracing.
13776 (process_serial_event): If the remote connection breaks, or if an
13777 exit was forced with "monitor exit", force an event loop exit.
13778 Handle disconnected tracing on detach.
13779 (handle_serial_event): Adjust.
13780 (handle_target_event): If GDB isn't connected, forward events back
13781 to the inferior, unless the last process exited, in which case,
13782 exit gdbserver. Adjust interface.
13783
13784 * remote-utils.c (remote_open): Don't block in accept. Instead
13785 register an event loop source on the listen socket file
13786 descriptor. Refactor bits into ...
13787 (listen_desc): ... this new global.
13788 (gdb_connected): ... this new function.
13789 (enable_async_notification): ... this new function.
13790 (handle_accept_event): ... this new function.
13791 (remote_close): Clear remote_desc.
13792
13793 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
13794
13795 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
13796 New fields.
13797 (mourn_inferior): Define.
13798 (target_process_qsupported): Avoid the dangling else problem.
13799 (thread_stopped): Define.
13800 (pause_all): Define.
13801 (target_waitstatus_to_string): Declare.
13802 * target.c (target_waitstatus_to_string): New.
13803
13804 * tracepoint.c (tracing): Make extern.
13805 (disconnected_tracing): New.
13806 (stop_tracing): Make extern. Handle tracing stops due to GDB
13807 disconnecting.
13808 (cmd_qtdisconnected): New.
13809 (cmd_qtstatus): Report disconnected tracing status in trace reply.
13810 (handle_tracepoint_general_set): Handle QTDisconnected.
13811
13812 * event-loop.c (event_handler_func): Change return type to int.
13813 (process_event): Bail out if the event handler wants the event
13814 loop to stop.
13815 (handle_file_event): Ditto.
13816 (start_event_loop): Bail out if the event handler wants the event
13817 loop to stop.
13818
13819 * nto-low.c (nto_target_ops): Adjust.
13820 * spu-low.c (spu_wait): Don't remove the process here.
13821 (spu_target_ops): Adjust.
13822 * win32-low.c (win32_wait): Don't remove the process here.
13823 (win32_target_ops): Adjust.
13824
5d267c4c
PA
138252010-04-11 Pedro Alves <pedro@codesourcery.com>
13826
13827 * regcache.c (realloc_register_cache): Invalidate inferior's
13828 regcache before recreating it.
13829
623ccd72
PA
138302010-04-09 Pedro Alves <pedro@codesourcery.com>
13831
13832 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
13833
219f2f23
PA
138342010-04-09 Stan Shebs <stan@codesourcery.com>
13835 Pedro Alves <pedro@codesourcery.com>
13836
13837 * server.h (LONGEST): New.
13838 (struct thread_info) <while_stepping>: New field.
13839 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
13840 Declare.
13841 (initialize_tracepoint, handle_tracepoint_general_set)
13842 (handle_tracepoint_query, tracepoint_finished_step)
13843 (tracepoint_was_hit, release_while_stepping_state_list):
13844 (current_traceframe): Declare.
13845 * server.c (handle_general_set): Handle tracepoint packets.
13846 (read_memory): New.
13847 (write_memory): New.
13848 (handle_search_memory_1): Use read_memory.
13849 (handle_query): Report support for conditional tracepoints, trace
13850 state variables, and tracepoint sources. Handle tracepoint
13851 queries.
13852 (main): Initialize the tracepoints module.
13853 (process_serial_event): Handle traceframe reads/writes.
13854
13855 * linux-low.c (handle_tracepoints): New.
13856 (linux_wait_1): Call it.
13857 (linux_resume_one_lwp): Handle while-stepping.
13858 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
13859 (linux_target_ops): Install them.
13860 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
13861 New field.
13862 * linux-x86-low.c (x86_supports_tracepoints): New.
13863 (the_low_target). Install it.
13864
13865 * mem-break.h (delete_breakpoint): Declare.
13866 * mem-break.c (delete_breakpoint): Make external.
13867
13868 * target.h (struct target_ops): Add `supports_tracepoints',
13869 `read_pc', and `write_pc' fields.
13870 (target_supports_tracepoints): Define.
13871 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
13872 (phex_nz): New.
13873
13874 * regcache.h (struct regcache) <registers_owned>: New field.
13875 (init_register_cache, regcache_cpy): Declare.
13876 (regcache_read_pc, regcache_write_pc): Declare.
13877 (register_cache_size): Declare.
13878 (supply_regblock): Declare.
13879 * regcache.c (init_register_cache): New.
13880 (new_register_cache): Use it.
13881 (regcache_cpy): New.
13882 (register_cache_size): New.
13883 (supply_regblock): New.
13884 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 13885
219f2f23
PA
13886 * tracepoint.c: New.
13887
13888 * Makefile.in (OBS): Add tracepoint.o.
13889 (tracepoint.o): New rule.
13890
3a13a53b
L
138912010-04-08 H.J. Lu <hongjiu.lu@intel.com>
13892
13893 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
13894 (i386-mmx.o): New.
13895 (i386-mmx.c): Likewise.
13896 (i386-mmx-linux.o): Likewise.
13897 (i386-mmx-linux.c): Likewise.
13898
13899 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
13900 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
13901 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
13902 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
13903
13904 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
13905 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
13906 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
13907
1570b33e
L
139082010-04-07 H.J. Lu <hongjiu.lu@intel.com>
13909
13910 * Makefile.in (clean): Updated.
13911 (i386-avx.o): New.
13912 (i386-avx.c): Likewise.
13913 (i386-avx-linux.o): Likewise.
13914 (i386-avx-linux.c): Likewise.
13915 (amd64-avx.o): Likewise.
13916 (amd64-avx.c): Likewise.
13917 (amd64-avx-linux.o): Likewise.
13918 (amd64-avx-linux.c): Likewise.
13919
13920 * configure.srv (srv_i386_regobj): Add i386-avx.o.
13921 (srv_i386_linux_regobj): Add i386-avx-linux.o.
13922 (srv_amd64_regobj): Add amd64-avx.o.
13923 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
13924 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
13925 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
13926 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
13927 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
13928 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
13929 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
13930
13931 * i387-fp.c: Include "i386-xstate.h".
13932 (i387_xsave): New.
13933 (i387_cache_to_xsave): Likewise.
13934 (i387_xsave_to_cache): Likewise.
13935 (x86_xcr0): Likewise.
13936
13937 * i387-fp.h (i387_cache_to_xsave): Likewise.
13938 (i387_xsave_to_cache): Likewise.
13939 (x86_xcr0): Likewise.
13940
13941 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
13942 * linux-crisv32-low.c (target_regsets): Likewise.
13943 * linux-m68k-low.c (target_regsets): Likewise.
13944 * linux-mips-low.c (target_regsets): Likewise.
13945 * linux-ppc-low.c (target_regsets): Likewise.
13946 * linux-s390-low.c (target_regsets): Likewise.
13947 * linux-sh-low.c (target_regsets): Likewise.
13948 * linux-sparc-low.c (target_regsets): Likewise.
13949 * linux-xtensa-low.c (target_regsets): Likewise.
13950
13951 * linux-low.c: Include <sys/uio.h>.
13952 (regsets_fetch_inferior_registers): Support nt_type.
13953 (regsets_store_inferior_registers): Likewise.
13954 (linux_process_qsupported): New.
13955 (linux_target_ops): Add linux_process_qsupported.
13956
13957 * linux-low.h (regset_info): Add nt_type.
13958 (linux_target_ops): Add process_qsupported.
13959
13960 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
13961 and <sys/uio.h>.
13962 (init_registers_i386_avx_linux): New.
13963 (init_registers_amd64_avx_linux): Likewise.
13964 (xmltarget_i386_linux_no_xml): Likewise.
13965 (xmltarget_amd64_linux_no_xml): Likewise.
13966 (PTRACE_GETREGSET): Likewise.
13967 (PTRACE_SETREGSET): Likewise.
13968 (x86_fill_xstateregset): Likewise.
13969 (x86_store_xstateregset): Likewise.
13970 (use_xml): Likewise.
13971 (x86_linux_update_xmltarget): Likewise.
13972 (x86_linux_process_qsupported): Likewise.
13973 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
13974 (x86_arch_setup): Don't call init_registers_amd64_linux nor
13975 init_registers_i386_linux here. Call
13976 x86_linux_update_xmltarget.
13977 (the_low_target): Add x86_linux_process_qsupported.
13978
13979 * server.c (handle_query): Call target_process_qsupported.
13980
13981 * target.h (target_ops): Add process_qsupported.
13982 (target_process_qsupported): New.
13983
fc7238bb
PA
139842010-04-03 Pedro Alves <pedro@codesourcery.com>
13985
13986 * inferiors.c (add_thread): Set last_status kind to
13987 TARGET_WAITKIND_IGNORE.
13988 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
13989 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
13990 (linux_wait_1): Move `thread' local definition to block that uses
13991 it. Don't NULL initialize `event_child'.
13992 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
13993 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
13994 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
13995
bdabb078
PA
139962010-04-01 Pedro Alves <pedro@codesourcery.com>
13997
13998 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
13999 an extended waitstatus, or by a watchpoint.
14000 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
14001 thread was stepping or has been stopped by a watchpoint.
14002
d3bbe7a0
PA
140032010-04-01 Pedro Alves <pedro@codesourcery.com>
14004
14005 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
14006 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
14007 of another, then delete the previous, and validate all
14008 breakpoints.
14009 (validate_inserted_breakpoint): New.
14010 (delete_disabled_breakpoints): New.
14011 (validate_breakpoints): New.
14012 (check_mem_read): Validate breakpoints before trusting their
14013 shadow. Delete disabled breakpoints.
14014 (check_mem_write): Validate breakpoints before trusting they
14015 should be inserted. Delete disabled breakpoints.
14016 * mem-break.h (validate_breakpoints):
14017 * server.c (handle_query): Validate breakpoints when we see a
14018 qSymbol query.
14019
8b07ae33
PA
140202010-04-01 Pedro Alves <pedro@codesourcery.com>
14021
14022 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
14023 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
14024 if we could tell there's a GDB breakpoint at stop_pc.
14025 (need_step_over_p): Don't do a step over if we find a GDB
14026 breakpoint at the resume PC.
14027
14028 * mem-break.c (struct raw_breakpoint): New.
14029 (enum bkpt_type): New type `gdb_breakpoint'.
14030 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
14031 fields. New field `raw'.
14032 (find_raw_breakpoint_at): New.
14033 (set_raw_breakpoint_at): Handle refcounting. Create a raw
14034 breakpoint instead.
14035 (set_breakpoint_at): Adjust.
14036 (delete_raw_breakpoint): New.
14037 (release_breakpoint): New.
14038 (delete_breakpoint): Rename to...
14039 (delete_breakpoint_1): ... this. Add proc parameter. Use
14040 release_breakpoint. Return ENOENT.
14041 (delete_breakpoint): Reimplement.
14042 (find_breakpoint_at): Delete.
14043 (find_gdb_breakpoint_at): New.
14044 (delete_breakpoint_at): Delete.
14045 (set_gdb_breakpoint_at): New.
14046 (delete_gdb_breakpoint_at): New.
14047 (gdb_breakpoint_here): New.
14048 (set_reinsert_breakpoint): Use release_breakpoint.
14049 (uninsert_breakpoint): Rename to ...
14050 (uninsert_raw_breakpoint): ... this.
14051 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
14052 (reinsert_raw_breakpoint): Change parameter type to
14053 raw_breakpoint.
14054 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
14055 instead.
14056 (check_breakpoints): Adjust. Use release_breakpoint.
14057 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
14058 (breakpoint_inserted_here): Ditto.
14059 (check_mem_read): Adjust to iterate over raw breakpoints instead.
14060 Don't trust the breakpoint's shadow if it is not inserted.
14061 (check_mem_write): Adjust to iterate over raw breakpoints instead.
14062 (delete_all_breakpoints): Adjust.
14063 (free_all_breakpoints): Mark all breakpoints as uninserted, and
14064 use delete_breakpoint_1.
14065
14066 * mem-break.h (breakpoints_supported): Delete declaration.
14067 (set_gdb_breakpoint_at): Declare.
14068 (gdb_breakpoint_here): Declare.
14069 (delete_breakpoint_at): Delete.
14070 (delete_gdb_breakpoint_at): Declare.
14071
14072 * server.h (struct raw_breakpoint): Forward declare.
14073 (struct process_info): New field `raw_breakpoints'.
14074
14075 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
14076 breakpoints.
14077
6bf5e0ba
PA
140782010-03-24 Pedro Alves <pedro@codesourcery.com>
14079
14080 * linux-low.c (status_pending_p_callback): Fix comment.
14081 (linux_wait_for_event_1): Move most of the internal breakpoint
14082 handling from here...
14083 (linux_wait_1): ... to here.
14084 (count_events_callback): New.
14085 (select_singlestep_lwp_callback): New.
14086 (select_event_lwp_callback): New.
14087 (cancel_breakpoints_callback): New.
14088 (select_event_lwp): New.
14089 (linux_wait_1): Simplify internal breakpoint handling. Give equal
14090 priority to all LWPs that have had events that should be reported
14091 to the client. Cancel breakpoints when about to reporting the
14092 event to the client, not while stopping lwps. No longer cancel
14093 finished single-steps here.
14094 (cancel_finished_single_step): Delete.
14095 (cancel_finished_single_steps): Delete.
14096
414a389f
PA
140972010-03-24 Pedro Alves <pedro@codesourcery.com>
14098
14099 * mem-break.c (enum bkpt_type): New.
14100 (struct breakpoint): New field `type'.
14101 (set_breakpoint_at): Change return type to struct breakpoint
14102 pointer. Set type to `other_breakpoint' by default.
14103 (delete_breakpoint): Rewrite, supporting more than one breakpoint
14104 in the breakpoint list.
14105 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
14106 (reinsert_breakpoint): Rename to ...
14107 (reinsert_raw_breakpoint): ... this.
14108 (reinsert_breakpoints_at): Adjust.
14109 * mem-break.h (struct breakpoint): Declare.
14110 (set_breakpoint_at): Change return type to struct breakpoint
14111 pointer.
14112
2280c721
PA
141132010-03-24 Pedro Alves <pedro@codesourcery.com>
14114
14115 * server.c (handle_query): Assign, not compare.
14116
d50171e4
PA
141172010-03-24 Pedro Alves <pedro@codesourcery.com>
14118
14119 Teach linux gdbserver to step-over-breakpoints.
14120
14121 * linux-low.c (can_hardware_single_step): New.
14122 (supports_breakpoints): New.
14123 (handle_extended_wait): If stopping threads, read the stop pc of
14124 the new cloned LWP.
14125 (get_pc): New.
14126 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
14127 low target doesn't support retrieving the PC.
14128 (add_lwp): Set last_resume_kind to resume_continue.
14129 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
14130 (linux_attach): Don't clear stop_expected. Set the lwp's
14131 last_resume_kind to resume_stop.
14132 (linux_detach_one_lwp): Don't check for removed breakpoints.
14133 (check_removed_breakpoint): Delete.
14134 (status_pending_p): Rename to ...
14135 (status_pending_p_callback): ... this. Don't check for removed
14136 breakpoints. Don't consider threads that are stopped from GDB's
14137 perspective.
14138 (linux_wait_for_lwp): Always read the stop_pc here.
14139 (cancel_breakpoint): New.
14140 (step_over_bkpt): New global.
14141 (linux_wait_for_event_1): Implement stepping over breakpoints.
14142 (gdb_wants_lwp_stopped): New.
14143 (gdb_wants_all_stopped): New.
14144 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
14145 single-step traps here. Store the thread's last reported target
14146 wait status.
14147 (send_sigstop): Don't clear stop_expected. Always set it,
14148 instead.
14149 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
14150 (cancel_finished_single_step): New.
14151 (cancel_finished_single_steps): New.
14152 (wait_for_sigstop): Don't cancel finished single-step traps here.
14153 (linux_resume_one_lwp): Don't check for removed breakpoints.
14154 Don't set `step' on non-hardware step archs.
14155 (linux_set_resume_request): Ignore resume_stop requests if already
14156 stopping or stopped. Set the lwp's last_resume_kind.
14157 (resume_status_pending_p): Don't check for removed breakpoints.
14158 (need_step_over_p): New.
14159 (start_step_over): New.
14160 (finish_step_over): New.
14161 (linux_resume_one_thread): Always queue a sigstop for resume_stop
14162 requests. Clear the thread's last reported target waitstatus.
14163 Don't use the `suspended' flag. Don't consider pending breakpoints.
14164 (linux_resume): Start a step-over if necessary.
14165 (proceed_one_lwp): New.
14166 (proceed_all_lwps): New.
14167 (unstop_all_lwps): New.
14168 * linux-low.h (struct lwp_info): Rewrite comment for the
14169 `suspended' flag. Add the `stop_pc' field. Delete the
14170 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
14171 Add `'last_resume_kind' and `need_step_over' fields.
14172 * inferiors.c (struct thread_info): Delete, moved elsewhere.
14173 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
14174 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
14175 (set_raw_breakpoint_at): New.
14176 (set_breakpoint_at): Rewrite to use it.
14177 (reinsert_breakpoint_handler): Delete.
14178 (set_reinsert_breakpoint): New.
14179 (reinsert_breakpoint_by_bp): Delete.
14180 (delete_reinsert_breakpoints): New.
14181 (uninsert_breakpoint): Rewrite.
14182 (uninsert_breakpoints_at): New.
14183 (reinsert_breakpoint): Rewrite.
14184 (reinsert_breakpoints_at): New.
14185 (check_breakpoints): Rewrite.
14186 (breakpoint_here): New.
14187 (breakpoint_inserted_here): New.
14188 (check_mem_read): Adjust.
14189 * mem-break.h (breakpoints_supported, breakpoint_here)
14190 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
14191 (reinsert_breakpoint_by_bp): Delete declaration.
14192 (delete_reinsert_breakpoints): Declare.
14193 (reinsert_breakpoint): Delete declaration.
14194 (reinsert_breakpoints_at): Declare.
14195 (uninsert_breakpoint): Delete declaration.
14196 (uninsert_breakpoints_at): Declare.
14197 (check_breakpoints): Adjust prototype.
14198 * server.h: Adjust include order.
14199 (struct thread_info): Declare here. Add a `last_status' field.
14200
30ba68cb
MS
142012010-03-23 Michael Snyder <msnyder@vmware.com>
14202
14203 * server.c (crc32): New function.
14204 (handle_query): Add handling for 'qCRC:' request.
14205
b9a881c2
PA
142062010-03-23 Pedro Alves <pedro@codesourcery.com>
14207
14208 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
14209 lwp had been stopped by a watchpoint.
14210
e92d13d5
PA
142112010-03-16 Pedro Alves <pedro@codesourcery.com>
14212
14213 * server.h (internal_error): Declare.
14214 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
14215 * utils.c (internal_error): New function.
14216
64daa791
AS
142172010-03-15 Andreas Schwab <schwab@redhat.com>
14218
14219 * configure.srv: Fix typo setting srv_regobj.
14220
f52cd8cd
PA
142212010-03-15 Pedro Alves <pedro@codesourcery.com>
14222
14223 * linux-low.c (fetch_register): Avoid passing a non string literal
14224 format to `error'.
14225 (usr_store_inferior_registers): Ditto.
14226
93ae6fdc
PA
142272010-03-14 Pedro Alves <pedro@codesourcery.com>
14228
14229 * linux-low.c (linux_write_memory): Bail out early if peeking
14230 memory failed.
14231
c3adc08c
PA
142322010-03-14 Pedro Alves <pedro@codesourcery.com>
14233
14234 * linux-low.h (struct lwp_info): New fields
14235 `stopped_by_watchpoint' and `stopped_data_address'.
14236 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
14237 here, and cache them in the lwp object.
14238 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
14239 directly.
14240 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
14241 field.
14242 (linux_stopped_by_watchpoint): Rewrite.
14243 (linux_stopped_data_address): Rewrite.
14244
bce522a2
PA
142452010-03-06 Simo Melenius <simo.melenius@iki.fi>
14246
14247 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
14248 switching the current inferior, not before.
14249
90884b2b
L
142502010-03-01 H.J. Lu <hongjiu.lu@intel.com>
14251
14252 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
14253 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
14254 i386-linux.c and amd64-linux.c.
14255 (reg-i386.o): Removed.
14256 (reg-i386.c): Likewise.
14257 (reg-i386-linux.o): Likewise.
14258 (reg-i386-linux.c): Likewise.
14259 (reg-x86-64.o): Likewise.
14260 (reg-x86-64.c): Likewise.
14261 (reg-x86-64-linux.o): Likewise.
14262 (reg-x86-64-linux.c): Likewise.
14263 (i386.o): New.
14264 (i386.c): Likewise.
14265 (i386-linux.o): Likewise.
14266 (i386-linux.c): Likewise.
14267 (amd64.o): Likewise.
14268 (amd64.c): Likewise.
14269 (amd64-linux.o): Likewise.
14270 (amd64-linux.c): Likewise.
14271
14272 * configure.srv (srv_i386_regobj): New.
14273 (srv_i386_linux_regobj): Likewise.
14274 (srv_amd64_regobj): Likewise.
14275 (srv_amd64_linux_regobj): Likewise.
14276 (srv_i386_32bit_xmlfiles): Likewise.
14277 (srv_i386_64bit_xmlfiles): Likewise.
14278 (srv_i386_xmlfiles): Likewise.
14279 (srv_amd64_xmlfiles): Likewise.
14280 (srv_i386_linux_xmlfiles): Likewise.
14281 (srv_amd64_linux_xmlfiles): Likewise.
14282 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
14283 srv_xmlfiles to $srv_i386_xmlfiles.
14284 (i[34567]86-*-mingw32ce*): Likewise.
14285 (i[34567]86-*-mingw*): Likewise.
14286 (i[34567]86-*-nto*): Likewise.
14287 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
14288 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
14289 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
14290 (x86_64-*-linux*): Likewise.
14291
14292 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
14293 (init_registers_amd64_linux): New.
14294 (x86_arch_setup): Replace init_registers_x86_64_linux with
14295 init_registers_amd64_linux.
14296
193f13e6
MK
142972010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
14298
14299 * configure.ac: Check for libdl. If it is not available link against
14300 static libthread_db.
14301 * configure: Regenerate.
14302
85d721b8
PA
143032010-02-22 Pedro Alves <pedro@codesourcery.com>
14304
14305 PR9605
14306
14307 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
14308 handing a read watchpoint.
14309 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
14310
6076632b
DE
143112010-02-12 Doug Evans <dje@google.com>
14312
14313 * linux-low.c (linux_supports_tracefork_flag): Document.
14314 (linux_look_up_symbols): Add comment.
14315
3327ccf7
L
143162010-02-03 H.J. Lu <hongjiu.lu@intel.com>
14317
14318 * regcache.c (supply_register): Clear regcache if buf is NULL.
14319
0718675c 143202010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 14321 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
14322
14323 * inferiors.c (find_inferior): Add function documentation.
14324 (unloaded_dll): Handle the case where the unloaded dll has not
14325 been previously registered in the dll list.
14326
177321bd
DJ
143272010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
14328
14329 * linux-arm-low.c (thumb_breakpoint_len): Delete.
14330 (thumb2_breakpoint): New.
14331 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
14332
2b009048
DJ
143332010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
14334
14335 * linux-low.c (get_stop_pc): Check for SIGTRAP.
14336 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
14337 breakpoints.
14338
3be029c7
PA
143392010-01-21 Pedro Alves <pedro@codesourcery.com>
14340
14341 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
14342
18f5de3b
JK
143432010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
14344
14345 * linux-s390-low.c (s390_collect_ptrace_register)
14346 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
14347
3743bb4f
DE
143482010-01-21 Doug Evans <dje@google.com>
14349
14ce3065
DE
14350 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
14351 (PTRACE_ARG4_TYPE): New macro.
14352 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
14353 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
14354 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
14355 (usr_store_inferior_registers): Ditto.
14356 (linux_read_memory, linux_write_memory): Ditto.
14357 (linux_test_for_tracefork): Ditto.
14358
3743bb4f
DE
14359 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
14360 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
14361
8b315be5
PA
143622010-01-21 Pedro Alves <pedro@codesourcery.com>
14363
14364 * proc-service.c (ps_lgetregs): Don't refetch registers from the
14365 target.
14366
85492558
PA
143672010-01-21 Pedro Alves <pedro@codesourcery.com>
14368
14369 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
14370 prototype to take a regcache. Adjust.
14371
442ea881
PA
143722010-01-20 Pedro Alves <pedro@codesourcery.com>
14373
14374 * regcache.h (struct thread_info): Forward declare.
14375 (struct regcache): New.
14376 (new_register_cache): Adjust prototype.
14377 (get_thread_regcache): Declare.
14378 (free_register_cache): Adjust prototype.
14379 (registers_to_string, registers_from_string): Ditto.
14380 (supply_register, supply_register_by_name, collect_register)
14381 (collect_register_as_string, collect_register_by_name): Ditto.
14382 * regcache.c (struct inferior_regcache_data): Delete.
14383 (get_regcache): Rename to ...
14384 (get_thread_regcache): ... this. Adjust. Switch inferior before
14385 fetching registers.
14386 (regcache_invalidate_one): Adjust.
14387 (regcache_invalidate): Fix prototype.
14388 (new_register_cache): Return the new register cache.
14389 (free_register_cache): Change prototype.
14390 (realloc_register_cache): Adjust.
14391 (registers_to_string): Change prototype to take a regcache. Adjust.
14392 (registers_from_string): Ditto.
14393 (register_data): Ditto.
14394 (supply_register): Ditto.
14395 (supply_register_by_name): Ditto.
14396 (collect_register): Ditto.
14397 (collect_register_as_string): Ditto.
14398 (collect_register_by_name): Ditto.
14399 * server.c (process_serial_event): Adjust.
14400 * linux-low.h (regset_fill_func, regset_store_func): Change
14401 prototype.
14402 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
14403 Change prototype.
14404 * linux-low.c (get_stop_pc): Adjust.
14405 (check_removed_breakpoint): Adjust.
14406 (linux_wait_for_event): Adjust.
14407 (linux_resume_one_lwp): Adjust.
14408 (fetch_register): Add regcache parameter. Adjust.
14409 (usr_store_inferior_registers): Ditto.
14410 (regsets_fetch_inferior_registers): Ditto.
14411 (regsets_store_inferior_registers): Ditto.
14412 (linux_fetch_registers, linux_store_registers): Ditto.
14413 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
14414 regcache. Adjust.
43aaf8b6
PA
14415 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
14416 Ditto.
442ea881
PA
14417 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
14418 prototype to take a regcache.
14419 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
14420 * remote-utils.c (convert_ascii_to_int, outreg)
14421 (prepare_resume_reply): Change prototype to take a regcache.
14422 Adjust.
14423 * target.h (struct target_ops) <fetch_registers, store_registers>:
14424 Change prototype to take a regcache.
14425 (fetch_inferior_registers, store_inferior_registers): Change
14426 prototype to take a regcache. Adjust.
14427 * proc-service.c (ps_lgetregs): Adjust.
14428 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
14429 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
14430 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
14431 take a regcache. Adjust.
14432 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
14433 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
14434 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
14435 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
14436 * linux-cris-low.c (cris_get_pc, cris_set_pc)
14437 (cris_cannot_fetch_register):
14438 (cris_breakpoint_at): Change prototype to take a regcache.
14439 Adjust.
14440 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
14441 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
14442 to take a regcache. Adjust.
14443 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
14444 Adjust.
14445 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
14446 take a regcache. Adjust.
14447 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
14448 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
14449 (m68k_set_pc): Change prototype to take a regcache. Adjust.
14450 * linux-mips-low.c (mips_get_pc):
14451 (mips_set_pc): Change prototype to take a regcache. Adjust.
14452 (mips_reinsert_addr): Adjust.
14453 (mips_collect_register): Change prototype to take a regcache.
14454 Adjust.
14455 (mips_supply_register):
14456 (mips_collect_register_32bit, mips_supply_register_32bit)
14457 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
14458 (mips_store_fpregset): Ditto.
43aaf8b6
PA
14459 * linux-ppc-low.c (ppc_supply_ptrace_register)
14460 (ppc_supply_ptrace_register): Ditto.
442ea881
PA
14461 (parse_spufs_run): Adjust.
14462 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
14463 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
14464 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
14465 take a regcache. Adjust.
14466 * linux-s390-low.c (s390_collect_ptrace_register)
14467 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
14468 (s390_set_pc): Change prototype to take a regcache. Adjust.
14469 (s390_arch_setup): Adjust.
14470 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
14471 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
14472 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
14473 (sparc_fill_gregset, sparc_store_gregset_from_stack)
14474 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
14475 regcache. Adjust.
14476 (sparc_breakpoint_at): Adjust.
14477 * linux-xtensa-low.c (xtensa_fill_gregset):
14478 (xtensa_store_gregset):
14479 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
14480 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
14481 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
14482 prototype to take a regcache. Adjust.
14483 * win32-arm-low.c (arm_fetch_inferior_register)
14484 (arm_store_inferior_register): Change prototype to take a
14485 regcache. Adjust.
14486 * win32-i386-low.c (i386_fetch_inferior_register)
14487 (i386_store_inferior_register): Change prototype to take a
14488 regcache. Adjust.
14489 * win32-low.c (child_fetch_inferior_registers)
14490 (child_store_inferior_registers): Change prototype to take a
14491 regcache. Adjust.
14492 (win32_wait): Adjust.
14493 (win32_fetch_inferior_registers): Change prototype to take a
14494 regcache. Adjust.
14495 (win32_store_inferior_registers): Adjust.
14496 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
14497 store_inferior_register>: Change prototype to take a regcache.
14498
60c3d7b0
DE
144992010-01-20 Doug Evans <dje@google.com>
14500
14501 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
14502 #ifdef.
14503 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 14504 (W_STOPCODE): Provide definition if missing.
60c3d7b0 14505
dc146f7c
VP
145062010-01-13 Vladimir Prus <vladimir@codesourcery.com>
14507
14508 * linux-low.c (linux_core_of_thread): New.
14509 (compare_ints, show_process, list_threads): New.
14510 (linux_qxfer_osdata): Report threads and cores.
14511 (linux_target_op): Register linux_core_of_thread.
14512 * remote-utils.c (prepare_resume_reply): Report the core.
14513 (buffer_xml_printf): Support %d specifier.
14514 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
14515 New.
14516 (handle_query): Handle qXfer:threads. Announce availability
14517 thereof.
14518 * target.h (struct target_ops): New field core_of_thread.
14519
7803799a
UW
145202010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
14521
14522 * Makefile.in (clean): Remove new generated files.
14523 (reg-s390.o, reg-s390.c): Remove rules.
14524 (reg-s390x.o, reg-s390x.c): Likewise.
14525 (s390-linux32.o, s390-linux32.c): Add rules.
14526 (s390-linux64.o, s390-linux64.c): Likewise.
14527 (s390x-linux64.o, s390x-linux64.c): Likewise.
14528 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
14529 * linux-s390-low.c: Include <elf.h>.
14530 (HWCAP_S390_HIGH_GPRS): Define if undefined.
14531 (init_registers_s390): Remove prototype.
14532 (init_registers_s390x): Likewise.
14533 (init_registers_s390_linux32): Add prototype.
14534 (init_registers_s390_linux64): Likewise.
14535 (init_registers_s390x_linux64): Likewise.
14536 (s390_num_regs_3264): New define.
14537 (s390_regmap_3264): New global variable.
14538 (s390_cannot_fetch_register): Remove obsolete check.
14539 (s390_cannot_store_register): Likewise.
14540 (s390_collect_ptrace_register): Handle upper/lower register halves.
14541 (s390_supply_ptrace_register): Likewise.
14542 (s390_fill_gregset): Update to register number changes.
14543 (s390_get_hwcap): New routine.
14544 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
14545 Install appropriate regmap and register set.
14546
6e7ffa39
JB
145472010-01-01 Joel Brobecker <brobecker@adacore.com>
14548
14549 * server.c (gdbserver_version): Update copyright year to 2010.
14550 * gdbreplay.c (gdbreplay_version): Likewise.
14551
957f3f49
DE
145522009-12-28 Doug Evans <dje@google.com>
14553
14554 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
14555 elf/external.h. Include <elf.h> instead but only if necessary.
14556
ca5c370d
PA
145572009-12-28 Pedro Alves <pedro@codesourcery.com>
14558
14559 * linux-low.c (linux_remove_process): Remove `detaching'
14560 parameter. Don't release/detach from thread_db here.
14561 (linux_kill): Release/detach from thread_db here, ...
14562 (linux_detach): ... and here, before actually detaching.
14563 (linux_wait_1): ... and here, when a process exits.
14564 * thread-db.c (any_thread_of): New.
14565 (thread_db_free): Switch the current inferior to a thread of the
14566 passed in process.
14567
4ee62156
DE
145682009-12-21 Doug Evans <dje@google.com>
14569
d90e6a88
DE
14570 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
14571
c5f62d5f
DE
14572 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
14573 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
14574 warning ifndef __NR_tkill. Move setting of errno there too.
14575 Delete unnecessary resetting of errno after syscall.
14576 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
14577
10e86dd7
DE
14578 * configure.ac: Check for dladdr.
14579 * config.in: Regenerate.
14580 * configure: Regenerate.
14581 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
14582 (try_thread_db_load): Update.
14583
4ee62156
DE
14584 * linux-low.c (my_waitpid): Delete unnecessary prototype.
14585
00f515da
DE
145862009-12-18 Doug Evans <dje@google.com>
14587
e9464885
DE
14588 * event-loop.c: Include unistd.h if it exists.
14589
07d4f67e
DE
14590 * linux-low.c (my_waitpid): Move definition away from being in
14591 between linux_tracefork_child/linux_test_for_tracefork.
14592
00f515da
DE
14593 * gdb_proc_service.h (psaddr_t): Fix type.
14594 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
14595 signature to match glibc.
14596
1de1badb
DE
145972009-12-16 Doug Evans <dje@google.com>
14598
14599 * linux-low.c (linux_read_memory): Fix argument to read.
14600
aeeb81d1
PA
146012009-11-26 Pedro Alves <pedro@codesourcery.com>
14602
14603 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
14604 events, don't leave current_inferior pointing at null.
14605
10357975
PA
146062009-11-26 Pedro Alves <pedro@codesourcery.com>
14607
14608 * win32-low.c (LOG): Delete.
14609 (OUTMSG): Output to stderr.
14610 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
14611 on compile time LOG macro.
14612 (win32_wait): Fix debug output.
14613
cf6e3471
PA
146142009-11-26 Pedro Alves <pedro@codesourcery.com>
14615
14616 * win32-low.c (win32_add_one_solib): If the dll name is
14617 "ntdll.dll", prepend the system directory to the dll path.
14618
0c85e18e
MK
146192009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
14620
14621 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
14622
9ac544ce 146232009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 14624 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
14625
14626 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
14627 * configure.ac: Check for __mcoldfire__ and set
14628 gdb_cv_m68k_is_coldfire.
14629 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
14630 reg-cf.o and reg-m68k.o.
14631 * configure: Regenerated.
14632
fd7dd3e6
PA
146332009-11-16 Pedro Alves <pedro@codesourcery.com>
14634
14635 * linux-low.c (linux_remove_process): Add `detaching' parameter.
14636 Pass it to thread_db_free.
14637 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
14638 proper `detaching' argument to linux_remove_process.
14639 * linux-low.h (thread_db_free): Add `detaching' parameter.
14640 * thread-db.c (thread_db_init): Pass false as `detaching' argument
14641 to thread_db_free.
14642 (thread_db_free): Add `detaching' parameter. Only
14643 call td_ta_clear_event if detaching from process.
14644
75aa492e
MK
146452009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
14646
14647 * thread-db.c (thread_db_free): Fix typo.
14648
21e1bee4
PP
146492009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
14650
14651 PR gdb/10838
14652 * thread-db.c (thread_db_free): Call td_ta_clear_event.
14653
8838b45e
NS
146542009-11-03 Nathan Sidwell <nathan@codesourcery.com>
14655
14656 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
14657 with an i686 compiler.
14658 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
14659 needed.
14660 * configure: Rebuilt.
14661
8a35fb51
SL
146622009-10-29 Sandra Loosemore <sandra@codesourcery.com>
14663
14664 PR gdb/10783
14665
14666 * server.c (handle_search_memory_1): Correct read_addr initialization
14667 in loop for searching subsequent chunks.
14668
96f15937
PP
146692009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
14670
14671 * configure.ac: New --with-libthread-db option.
14672 * thread-db.c: Allow direct dependence on libthread_db.
14673 (thread_db_free): Adjust.
14674 * config.in: Regenerate.
14675 * configure: Likewise.
889bf7c5 14676
5f7d1694
PP
146772009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
14678
14679 PR gdb/10757
14680 * thread-db.c (attach_thread): New function.
14681 (maybe_attach_thread): Return success/failure.
14682 (find_new_threads_callback): Adjust.
889bf7c5
PA
14683 (thread_db_find_new_threads): Loop until no new threads.
14684
88e3b899
PA
146852009-10-13 Pedro Alves <pedro@codesourcery.com>
14686
14687 * proc-service.c (ps_lgetregs): Formatting.
14688
cdbfd419
PP
146892009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
14690
14691 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
14692 * configure.ac: Adjust.
14693 * linux-low.h (struct process_info_private): Move members to struct
14694 thread_db.
14695 (thread_db_free, thread_db_handle_monitor_command): New prototype.
14696 * linux-low.c (linux_remove_process): Adjust.
14697 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
14698 * server.c (handle_query): Move code ...
14699 (handle_monitor_command): ... here. New function.
14700 * target.h (struct target_ops): New member.
14701 * thread-db.c (struct thread_db): New.
14702 (libthread_db_search_path): New variable.
14703 (thread_db_create_event, thread_db_enable_reporting)
14704 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
14705 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
14706 (try_thread_db_load_1, dladdr_to_soname): New functions.
14707 (try_thread_db_load, thread_db_load_search): New functions.
14708 (thread_db_init): Search for libthread_db.
14709 (thread_db_free): New function.
14710 (thread_db_handle_monitor_command): Likewise.
14711 * config.in: Regenerate.
14712 * configure: Regenerate.
889bf7c5 14713
4168d2d6
UW
147142009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
14715
14716 * spu-low.c (spu_kill): Wait for inferior to terminate.
14717 Call clear_inferiors.
14718 (spu_detach): Call clear_inferiors.
14719
81ecdfbb
RW
147202009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
14721
14722 * aclocal.m4: Regenerate.
14723 * config.in: Likewise.
14724 * configure: Likewise.
14725
0b9ff2c0
UW
147262009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
14727
14728 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
14729 (parse_spufs_run): New function.
14730 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
14731 (ppc_breakpoint_at): Handle SPU breakpoints.
14732
efcbbd14
UW
147332009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
14734
14735 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
14736 (SPUFS_MAGIC): Define.
14737 (spu_enumerate_spu_ids): New function.
14738 (linux_qxfer_spu): New function.
14739 (linux_target_ops): Install linux_qxfer_spu.
14740
f4d9bade
UW
147412009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
14742
14743 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
14744 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
14745 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
14746 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
14747 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
14748 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
14749 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
14750 (init_registers_powerpc_cell32l): Add prototype.
14751 (init_registers_powerpc_cell64l): Likewise.
14752 (ppc_arch_setup): Detect Cell/B.E. architecture.
14753
96e946ca
RW
147542009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
14755
14756 * Makefile.in (datarootdir): New variable.
14757
58d6951d
DJ
147582009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
14759
14760 * linux-low.c (linux_write_memory): Update debugging output.
14761 * Makefile.in (clean): Add new descriptions.
14762 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
14763 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
14764 * configure.srv: Add new files for arm*-*-linux*.
14765 * linux-arm-low.c: Add new declarations.
14766 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
14767 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
14768 (HWCAP_VFPv3D16): New.
14769 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
14770 instead of __IWMMXT__.
14771 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
14772 (arm_arch_setup): New.
14773 (target_regsets): Remove #ifdef. Add VFP regset.
14774 (the_low_target): Use arm_arch_setup.
14775
12b42a12
DJ
147762009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
14777
14778 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
14779 the main thread again.
14780
ac8c974e
AR
147812009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
14782
14783 Adding Neutrino gdbserver.
14784 * configure: Regenerated.
14785 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
14786 * configure.srv (i[34567]86-*-nto*): New target.
14787 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
14788 * remote-utils.c [__QNX__]: Include sys/iomgr.h
14789 (nto_comctrl) [__QNX__]: New function.
14790 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
14791
4424e0c3 147922009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
14793
14794 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
14795 srv_tgtobj.
14796
912cf4ba
PA
147972009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
14798 Pedro Alves <pedro@codesourcery.com>
14799
14800 * win32-i386-low.c (i386_get_thread_context): Handle systems that
14801 don't support CONTEXT_EXTENDED_REGISTERS.
14802 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
14803 (the_low_target): Install them.
14804 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
14805 failing with ERROR_PIPE_NOT_CONNECTED.
14806
aa5ca48f
DE
148072009-06-30 Doug Evans <dje@google.com>
14808 Pierre Muller <muller@ics.u-strasbg.fr>
14809
14810 Add h/w watchpoint support to x86-linux, win32-i386.
14811 * Makefile.in (SFILES): Add i386-low.c
14812 (i386_low_h): Define.
14813 (i386-low.o): Add dependencies.
14814 (linux-x86-low.o): Add i386-low.h dependency.
14815 (win32-i386-low.o): Ditto.
14816 * i386-low.c: New file.
14817 * i386-low.h: New file.
14818 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
14819 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
14820 * linux-low.c (linux_add_process): Initialize arch_private.
14821 (linux_remove_process): Free arch_private.
14822 (add_lwp): Initialize arch_private.
14823 (delete_lwp): Free arch_private.
14824 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
14825 provided.
14826 * linux-low.h (process_info_private): New member arch_private.
14827 (lwp_info): New member arch_private.
14828 (linux_target_ops): New members new_process, new_thread,
14829 prepare_to_resume.
14830 (ptid_of): New macro.
14831 * linux-x86-low.c: Include stddef.h, i386-low.h.
14832 (arch_process_info): New struct.
14833 (arch_lwp_info): New struct.
14834 (x86_linux_dr_get, x86_linux_dr_set): New functions.
14835 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
14836 (i386_dr_low_get_status): New function.
14837 (x86_insert_point, x86_remove_point): New functions.
14838 (x86_stopped_by_watchpoint): New function.
14839 (x86_stopped_data_address): New function.
14840 (x86_linux_new_process, x86_linux_new_thread): New functions.
14841 (x86_linux_prepare_to_resume): New function.
14842 (the_low_target): Add entries for insert_point, remove_point,
14843 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
14844 prepare_to_resume.
14845 * server.c (debug_hw_points): New global.
14846 (monitor_show_help): Document set debug-hw-points.
14847 (handle_query): Process "set debug-hw-points".
14848 * server.h (debug_hw_points): Declare.
14849 (paddress): Declare.
14850 * utils.c (NUMCELLS, CELLSIZE): New macros.
14851 (get_sell, xsnprintf, paddress): New functions.
14852 * win32-arm-low.c (the_low_target): Add entries for insert_point,
14853 remove_point, stopped_by_watchpoint, stopped_data_address.
14854 * win32-i386-low.c: Include i386-low.h.
14855 (debug_reg_state): Replaces dr.
14856 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
14857 (i386_dr_low_get_status): New function.
14858 (i386_insert_point, i386_remove_point): New functions.
14859 (i386_stopped_by_watchpoint): New function.
14860 (i386_stopped_data_address): New function.
14861 (i386_initial_stuff): Update.
14862 (get_thread_context,set_thread_context,i386_thread_added): Update.
14863 (the_low_target): Add entries for insert_point,
14864 remove_point, stopped_by_watchpoint, stopped_data_address.
14865 * win32-low.c (win32_insert_watchpoint): New function.
14866 (win32_remove_watchpoint): New function.
14867 (win32_stopped_by_watchpoint): New function.
14868 (win32_stopped_data_address): New function.
14869 (win32_target_ops): Add entries for insert_watchpoint,
14870 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
14871 * win32-low.h (win32_target_ops): New members insert_point,
14872 remove_point, stopped_by_watchpoint, stopped_data_address.
14873
d993e290
PA
148742009-06-25 Pedro Alves <pedro@codesourcery.com>
14875
14876 * server.c (process_serial_event): Re-return unsupported, not
14877 error, if the type isn't recognized. Re-allow supporting only
14878 insert or remove packets. Also call require_running for
14879 breakpoints. Add missing break statement to default case. Tidy.
14880 * target.h (struct target_ops): Rename insert_watchpoint to
14881 insert_point, and remove_watchpoint to remove_point.
14882
14883 * linux-low.h (struct linux_target_ops): Likewise.
14884 * linux-low.c (linux_insert_watchpoint): Rename to ...
14885 (linux_insert_point): ... this. Adjust.
14886 (linux_remove_watchpoint): Rename to ...
14887 (linux_remove_point): ... this. Adjust.
14888 (linux_target_ops): Adjust.
14889 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
14890 (cris_insert_point): ... this.
14891 (cris_remove_watchpoint): Rename to ...
14892 (cris_remove_point): ... this.
14893 (the_low_target): Adjust.
14894
0f54c268
PM
148952009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
14896
14897 * server.c (handle_v_kill): Pass signal_pid to
14898 kill_inferior if multi_process is zero.
14899
c6314022
AR
149002009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
14901
14902 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
14903 * target.h (target_ops): Comment for *_watchpoint to make it clear
14904 the functions can get types '0' and '1'.
14905
4463ce24
AR
149062009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
14907
14908 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
14909 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
14910 * regcache.c (get_regcache): Likewise.
14911 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
14912 * win32-low.c (child_fetch_inferior_registers): Remove check for
14913 regno 0.
14914
cf8fd78b
PA
149152009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
14916 Pedro Alves <pedro@codesourcery.com>
14917
14918 * target.h (struct target_ops) <supports_multi_process>: New
14919 callback.
14920 (target_supports_multi_process): New.
14921 * server.c (handle_query): Even if GDB reports support, only
14922 enable multi-process if the target also supports it. Report
14923 multi-process support only if the target backend supports it.
14924 * linux-low.c (linux_supports_multi_process): New function.
14925 (linux_target_ops): Install it as target_supports_multi_process
14926 callback.
14927
47c0c975
DE
149282009-05-24 Doug Evans <dje@google.com>
14929
e09875d4
DE
14930 Global renaming of find_thread_pid to find_thread_ptid.
14931 * server.h (find_thread_ptid): Renamed from find_thread_pid.
14932 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
14933 All callers updated.
14934
e27d73f6
DE
14935 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
14936 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
14937 directly.
14938
47c0c975
DE
14939 * linux-low.c (get_stop_pc): Print pc if debug_threads.
14940 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
14941 (linux_resume_one_lwp): Ditto.
14942
2acc282a
DE
149432009-05-23 Doug Evans <dje@google.com>
14944
14945 * linux-low.c (linux_resume_one_lwp): Change type of first arg
14946 from struct inferior_list_entry * to struct lwp_info *.
14947 All callers updated.
14948
9f1036c1
DE
149492009-05-13 Doug Evans <dje@google.com>
14950
14951 * linux-x86-low.c: Don't include assert.h.
14952 (x86_siginfo_fixup): Use fatal, not assert.
14953 (x86_arch_setup): Fix comment.
14954
d0722149
DE
149552009-05-12 Doug Evans <dje@google.com>
14956
14957 Biarch support for i386/amd64 gdbserver.
14958 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
14959 Add linux-x86-low.c.
14960 (linux-i386-low.o, linux-x86-64-low.o): Delete.
14961 (linux-x86-low.o): Add.
14962 * linux-x86-64-low.c: Delete.
14963 * linux-i386-low.c: Delete.
14964 * linux-x86-low.c: New file.
14965 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
14966 linux-x86-low.o.
14967 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
14968 linux-x86-low.o.
14969 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
14970 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
14971 (linux_child_pid_to_exec_file): New function.
14972 (elf_64_header_p, elf_64_file_p): New functions.
14973 (siginfo_fixup): New function.
14974 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
14975 give target a chance to convert layout.
14976 * linux-low.h (linux_target_ops): New member siginfo_fixup.
14977 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
14978
fdeb2a12
DE
149792009-05-07 Doug Evans <dje@google.com>
14980
14981 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
14982 (regsets_store_inferior_registers): Ditto.
14983
a6dbe5df
PA
149842009-05-06 Pedro Alves <pedro@codesourcery.com>
14985
14986 PR server/10048
14987
14988 * linux-low.c (must_set_ptrace_flags): Delete.
14989 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
14990 of the global.
14991 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
14992 `lwp->must_set_ptrace_flags' instead.
ba42693b 14993 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
14994 (linux_wait_1): ... not here.
14995
5091eb23
DE
149962009-04-30 Doug Evans <dje@google.com>
14997
9f767825
DE
14998 * inferiors.c (started_inferior_callback): New function.
14999 (attached_inferior_callback): New function.
15000 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
15001 * server.c (print_started_pid, print_attached_pid): New functions.
15002 (detach_or_kill_for_exit): New function.
15003 (main): Call it instead of for_each_inferior (kill_inferior_callback).
15004 * server.h (have_started_inferiors_p): Declare.
15005 (have_attached_inferiors_p): Declare.
15006
5091eb23
DE
15007 * inferiors.c (remove_process): Fix memory leak, free process.
15008 * linux-low.c (linux_remove_process): New function.
15009 (linux_kill): Call it instead of remove_process.
15010 (linux_detach, linux_wait_1): Ditto.
15011
155c8968
PA
150122009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
15013
15014 * configure.srv: Add x86 Windows CE target.
15015
7fe519cb
UW
150162009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
15017
15018 * inferiors.c (get_thread_process): Make global.
15019 * server.h (get_thread_process): Add prototype.
15020 * thread-db.c (find_one_thread): Use get_thread_process
15021 instead of current_process.
15022 (thread_db_get_tls_address): Do not crash if called when
15023 thread layer is not yet initialized.
15024
5472f405
UW
150252009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
15026
15027 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
15028 * spu-low.c (current_tid): Rename to ...
15029 (current_ptid): ... this.
15030 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
15031 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
15032 ptid_get_lwp (current_ptid) instead of current_tid.
15033 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
15034 instead of current_tid. Use find_process_pid to verify pid
15035 argument is valid. Pass proper argument to remove_process.
15036 (spu_thread_alive): Compare current_ptid instead of current_tid.
15037 (spu_resume): Likewise.
15038
55ac2b99
PA
150392009-04-02 Pedro Alves <pedro@codesourcery.com>
15040
15041 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
15042 variable.
15043
95954743
PA
150442009-04-01 Pedro Alves <pedro@codesourcery.com>
15045
15046 Implement the multiprocess extensions, and add linux multiprocess
15047 support.
15048
15049 * server.h (ULONGEST): Declare.
15050 (struct ptid, ptid_t): New.
15051 (minus_one_ptid, null_ptid): Declare.
15052 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
15053 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
15054 (struct inferior_list_entry): Change `id' type from unsigned from
15055 to ptid_t.
15056 (struct sym_cache, struct breakpoint, struct
15057 process_info_private): Forward declare.
15058 (struct process_info): Declare.
15059 (current_process): Declare.
15060 (all_processes): Declare.
15061 (initialize_inferiors): Declare.
15062 (add_thread): Adjust to use ptid_t.
15063 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
15064 (add_process, remove_process, find_thread_pid): Declare.
15065 (find_inferior_id): Adjust to use ptid_t.
15066 (cont_thread, general_thread, step_thread): Change type to ptid_t.
15067 (multi_process): Declare.
15068 (push_event): Adjust to use ptid_t.
15069 (read_ptid, write_ptid): Declare.
15070 (prepare_resume_reply): Adjust to use ptid_t.
15071 (clear_symbol_cache): Declare.
15072 * inferiors.c (all_processes): New.
15073 (null_ptid, minus_one_ptid): New.
15074 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
15075 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
15076 (add_thread): Change unsigned long to ptid. Remove gdb_id
15077 parameter. Adjust.
15078 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
15079 (gdb_id_to_thread): Rename to ...
15080 (find_thread_pid): ... this. Change unsigned long to ptid.
15081 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
15082 (loaded_dll, pull_pid_from_list): Adjust.
15083 (add_process, remove_process, find_process_pid)
15084 (get_thread_process, current_process, initialize_inferiors): New.
15085 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
15086 (struct target_waitstatus) <related_pid>: Ditto.
15087 (struct target_ops) <kill, detach>: Add `pid' argument. Change
15088 return type to int.
15089 (struct target_ops) <join>: Add `pid' argument.
15090 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
15091 (struct target_ops) <wait>: Add `ptid' field. Change return type
15092 to ptid.
15093 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
15094 (mywait): Add `ptid' argument. Change return type to ptid_t.
15095 (target_pid_to_str): Declare.
15096 * target.c (set_desired_inferior): Adjust to use ptids.
15097 (mywait): Add new `ptid' argument. Adjust.
15098 (target_pid_to_str): New.
15099 * mem-break.h (free_all_breakpoints): Declare.
15100 * mem-break.c (breakpoints): Delelete.
15101 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
15102 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
15103 to use per-process breakpoint list.
15104 (free_all_breakpoints): New.
15105 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
15106 (symbol_cache, all_symbols_looked_up): Delete.
15107 (hexchars): New.
15108 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
15109 read_ptid): New.
15110 (prepare_resume_reply): Change ptid argument's type from unsigned
15111 long to ptid_t. Adjust. Implement W;process and X;process.
15112 (free_sym_cache, clear_symbol_cache): New.
15113 (look_up_one_symbol): Adjust to per-process symbol cache. *
15114 * server.c (cont_thread, general_thread, step_thread): Change type
15115 to ptid_t.
15116 (attached): Delete.
15117 (multi_process): New.
15118 (last_ptid): Change type to ptid_t.
15119 (struct vstop_notif) <ptid>: Change type to ptid_t.
15120 (queue_stop_reply, push_event): Change `ptid' argument's type to
15121 ptid_t.
15122 (discard_queued_stop_replies): Add `pid' argument.
15123 (start_inferior): Adjust to use ptids. Adjust to mywait interface
15124 changes. Don't reference the `attached' global.
15125 (attach_inferior): Adjust to mywait interface changes.
15126 (handle_query): Adjust to use ptids. Parse GDB's qSupported
15127 features. Handle and report "multiprocess+". Handle
15128 "qAttached:PID".
15129 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
15130 changes.
15131 (handle_v_kill): New.
15132 (handle_v_stopped): Adjust to use target_pid_to_str.
15133 (handle_v_requests): Allow multiple attaches and runs when
15134 multiprocess extensions are in effect. Handle "vKill".
15135 (myresume): Adjust to use ptids.
15136 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
15137 (handle_status): Adjust to discard_queued_stop_replies interface
15138 change.
15139 (first_thread_of, kill_inferior_callback)
15140 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
15141 (main): Call initialize_inferiors. Adjust to use ptids, killing
15142 and detaching from all inferiors. Handle multiprocess packet
15143 variants.
15144 * linux-low.h: Include gdb_proc_service.h.
15145 (struct process_info_private): New.
15146 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
15147 <lwpid_of>: Use ptid_get_lwp.
15148 (get_lwp_thread): Adjust.
15149 (struct lwp_info): Add `dead' member.
15150 (find_lwp_pid): Declare.
15151 * linux-low.c (thread_db_active): Delete.
15152 (new_inferior): Adjust comment.
15153 (inferior_pid): Delete.
15154 (linux_add_process): New.
15155 (handle_extended_wait): Adjust.
15156 (add_lwp): Change unsigned long to ptid.
15157 (linux_create_inferior): Add process to processes table. Adjust
15158 to use ptids. Don't set new_inferior here.
15159 (linux_attach_lwp): Rename to ...
15160 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
15161 it. Adjust to use ptids.
15162 (linux_attach_lwp): New.
15163 (linux_attach): Add process to processes table. Don't set
15164 new_inferior here.
15165 (struct counter): New.
15166 (second_thread_of_pid_p, last_thread_of_process_p): New.
15167 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
15168 multiple processes.
15169 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
15170 processes. Remove process from process table.
15171 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
15172 to multiple processes.
15173 (any_thread_of): New.
15174 (linux_detach): Add `pid' argument, and handle it. Remove process
15175 from processes table.
15176 (linux_join): Add `pid' argument. Handle it.
15177 (linux_thread_alive): Change unsighed long argument to ptid_t.
15178 Consider dead lwps as not being alive.
15179 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
15180 threads we're not interested in.
15181 (same_lwp, find_lwp_pid): New.
15182 (linux_wait_for_lwp): Change `pid' argument's type from int to
15183 ptid_t. Adjust.
15184 (linux_wait_for_event): Rename to ...
15185 (linux_wait_for_event_1): ... this. Change `pid' argument's type
15186 from int to ptid_t. Adjust.
15187 (linux_wait_for_event): New.
15188 (linux_wait_1): Add `ptid' argument. Change return type to
15189 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
15190 that exit from the process table.
15191 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
15192 Adjust.
15193 (mark_lwp_dead): New.
15194 (wait_for_sigstop): Adjust to use ptids. If a process exits while
15195 stopping all threads, mark its main lwp as dead.
15196 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
15197 ptids.
15198 (fetch_register, usr_store_inferior_registers)
15199 (regsets_fetch_inferior_registers)
15200 (regsets_store_inferior_registers, linux_read_memory)
15201 (linux_write_memory): Inline `inferior_pid'.
15202 (linux_look_up_symbols): Adjust to use per-process
15203 `thread_db_active'.
15204 (linux_request_interrupt): Adjust to use ptids.
15205 (linux_read_auxv): Inline `inferior_pid'.
15206 (initialize_low): Don't reference thread_db_active.
15207 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
15208 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
15209 (ps_getpid): Return the pid of the current inferior.
15210 * thread-db.c (proc_handle, thread_agent): Delete.
15211 (thread_db_create_event, thread_db_enable_reporting): Adjust to
15212 per-process data.
15213 (find_one_thread): Change argument type to ptid_t. Adjust to
15214 per-process data.
15215 (maybe_attach_thread): Adjust to per-process data and ptids.
15216 (thread_db_find_new_threads): Ditto.
15217 (thread_db_init): Ditto.
15218 * spu-low.c (spu_create_inferior, spu_attach): Add process to
15219 processes table. Adjust to use ptids.
15220 (spu_kill, spu_detach): Adjust interface. Remove process from
15221 processes table.
15222 (spu_join, spu_thread_alive): Adjust interface.
15223 (spu_wait): Adjust interface. Remove process from processes
15224 table. Adjust to use ptids.
15225 * win32-low.c (current_inferior_tid): Delete.
15226 (current_inferior_ptid): New.
15227 (debug_event_ptid): New.
15228 (thread_rec): Take a ptid. Adjust.
15229 (child_add_thread): Add `pid' argument. Adjust to use ptids.
15230 (child_delete_thread): Ditto.
15231 (do_initial_child_stuff): Add `attached' argument. Add process to
15232 processes table.
15233 (child_fetch_inferior_registers, child_store_inferior_registers):
15234 Adjust.
15235 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
15236 (win32_attach): Pass 1 to do_initial_child_stuff.
15237 (win32_kill): Adjust interface. Remove process from processes
15238 table.
15239 (win32_detach): Ditto.
15240 (win32_join): Adjust interface.
15241 (win32_thread_alive): Take a ptid.
15242 (win32_resume): Adjust to use ptids.
15243 (get_child_debug_event): Ditto.
15244 (win32_wait): Adjust interface. Remove exiting process from
15245 processes table.
15246
bd99dc85
PA
152472009-04-01 Pedro Alves <pedro@codesourcery.com>
15248
15249 Non-stop mode support.
15250
15251 * server.h (non_stop): Declare.
15252 (gdb_client_data, handler_func): Declare.
15253 (delete_file_handler, add_file_handler, start_event_loop):
15254 Declare.
15255 (handle_serial_event, handle_target_event, push_event)
15256 (putpkt_notif): Declare.
15257 * target.h (enum resume_kind): New.
15258 (struct thread_resume): Replace `step' field by `kind' field.
15259 (TARGET_WNOHANG): Define.
15260 (struct target_ops) <wait>: Add `options' argument.
15261 <supports_non_stop, async, start_non_stop>: New fields.
15262 (target_supports_non_stop, target_async): New.
15263 (start_non_stop): Declare.
15264 (mywait): Add `options' argument.
15265 * target.c (mywait): Add `options' argument. Print child exit
15266 notifications here.
15267 (start_non_stop): New.
15268 * server.c (non_stop, own_buf, mem_buf): New globals.
15269 (struct vstop_notif): New.
15270 (notif_queue): New global.
15271 (queue_stop_reply, push_event, discard_queued_stop_replies)
15272 (send_next_stop_reply): New.
15273 (start_inferior): Adjust to use resume_kind. Adjust to mywait
15274 interface changes.
15275 (attach_inferior): In non-stop mode, don't wait for the target
15276 here.
15277 (handle_general_set): Handle QNonStop.
15278 (handle_query): When handling qC, return the current general
15279 thread, instead of the first thread of the list.
15280 (handle_query): If the backend supports non-stop mode, include
15281 QNonStop+ in the qSupported query response.
15282 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
15283 and non-stop mode.
15284 (handle_v_attach, handle_v_run): Handle non-stop mode.
15285 (handle_v_stopped): New.
15286 (handle_v_requests): Report support for vCont;t. Handle vStopped.
15287 (myresume): Adjust to use resume_kind. Handle non-stop.
15288 (queue_stop_reply_callback): New.
15289 (handle_status): Handle non-stop mode.
15290 (main): Clear non_stop flag on reconnection. Use the event-loop.
15291 Refactor serial protocol handling from here ...
15292 (process_serial_event): ... to this new function. When GDB
15293 selects any thread, select one here. In non-stop mode, wait until
15294 GDB acks all pending events before exiting.
15295 (handle_serial_event, handle_target_event): New.
15296 * remote-utils.c (remote_open): Install remote_desc in the event
15297 loop.
15298 (remote_close): Remove remote_desc from the event loop.
15299 (putpkt_binary): Rename to...
15300 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
15301 (putpkt_binary): New as wrapper around putpkt_binary_1.
15302 (putpkt_notif): New.
15303 (prepare_resume_reply): In non-stop mode, don't change the
15304 general_thread.
15305 * event-loop.c: New.
15306 * Makefile.in (OBJ): Add event-loop.o.
15307 (event-loop.o): New rule.
15308
15309 * linux-low.h (pid_of): Moved here.
15310 (lwpid_of): New.
15311 (get_lwp_thread): Use lwpid_of.
15312 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
15313 * linux-low.c (pid_of): Delete.
15314 (inferior_pid): Use lwpid_of.
15315 (linux_event_pipe): New.
15316 (target_is_async_p): New.
15317 (delete_lwp): New.
15318 (handle_extended_wait): Use lwpid_of.
15319 (add_lwp): Don't set lwpid field.
15320 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
15321 (linux_kill_one_lwp): If killing a running lwp, stop it first.
15322 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
15323 (linux_detach_one_lwp): If detaching from a running lwp, stop it
15324 first. Adjust to linux_wait_for_event interface changes. Use
15325 lwpid_of.
15326 (linux_detach): Don't delete the main lwp here.
15327 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
15328 (status_pending_p): Don't consider explicitly suspended lwps.
15329 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
15330 pointer. Add OPTIONS argument. Change return type to int. Use
15331 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
15332 (linux_wait_for_event): Take an integer pid instead of a lwp_info
15333 pointer. Add status pointer argument. Return a pid instead of a
15334 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
15335 changes. In non-stop mode, don't switch to a random thread.
15336 (linux_wait): Rename to...
15337 (linux_wait_1): ... this. Add target_options argument, and handle
15338 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
15339 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
15340 clean exit and signal exit code. Don't stop all threads in
15341 non-stop mode. In all-stop mode, only stop all threads when
15342 reporting a stop to GDB. Handle explicit thread stop requests.
15343 (async_file_flush, async_file_mark): New.
15344 (linux_wait): New.
15345 (send_sigstop): Use lwpid_of.
15346 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
15347 interface changes. In non-stop mode, don't switch to a random
15348 thread.
15349 (linux_resume_one_lwp): Use lwpid_of.
15350 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
15351 (linux_resume_one_thread): ... this. Handle resume_stop. In
15352 non-stop mode, don't look for pending flag in all threads.
15353 (resume_status_pending_p): Don't consider explicitly suspended
15354 threads.
15355 (my_waitpid): Reimplement. Emulate __WALL.
15356 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
15357 Use lwpid_of.
15358 (sigchld_handler, linux_supports_non_stop, linux_async)
15359 (linux_start_non_stop): New.
15360 (linux_target_ops): Register linux_supports_non_stop, linux_async
15361 and linux_start_non_stop.
15362 (initialize_low): Install SIGCHLD handler.
15363 * thread-db.c (thread_db_create_event, find_one_thread)
15364 (thread_db_get_tls_address): Use lwpid_of.
15365 * win32-low.c (win32_detach): Adjust to use resume_kind.
15366 (win32_wait): Add `options' argument.
15367 * spu-low.c (spu_resume): Adjust to use resume_kind.
15368 (spu_wait): Add `options' argument.
15369
5b1c542e
PA
153702009-04-01 Pedro Alves <pedro@codesourcery.com>
15371
15372 Decouple target code from remote protocol.
15373
15374 * target.h (enum target_waitkind): New.
15375 (struct target_waitstatus): New.
15376 (struct target_ops) <wait>: Return an unsigned long. Take a
15377 target_waitstatus pointer instead of a char pointer.
15378 (mywait): Likewise.
15379 * target.c (mywait): Change prototype to return an unsigned long.
15380 Take a target_waitstatus pointer instead of a char pointer. Adjust.
15381 * server.h (thread_from_wait, old_thread_from_wait): Delete
15382 declarations.
15383 (prepare_resume_reply): Change prototype to take a
15384 target_waitstatus.
15385 * server.c (thread_from_wait, old_thread_from_wait): Delete.
15386 (last_status, last_ptid): New.
15387 (start_inferior): Remove "statusptr" argument. Adjust. Return a
15388 pid instead of a signal.
15389 (attach_inferior): Remove "status" and "signal" parameters.
15390 Adjust.
15391 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
15392 not as an address.
15393 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
15394 (handle_v_requests, myresume): Remove "status" and "signal"
15395 parameters. Adjust.
15396 (handle_status): New.
15397 (main): Delete local `status'. Adjust.
15398 * remote-utils.c: Include target.h.
15399 (prepare_resume_reply): Change prototype to take a
15400 target_waitstatus. Adjust.
15401
15402 * linux-low.c (linux_wait): Adjust to new target_ops->wait
15403 interface.
15404 * spu-low.c (spu_wait): Adjust.
15405 * win32-low.c (enum target_waitkind, struct target_waitstatus):
15406 Delete.
15407 (win32_wait): Adjust.
15408
2bd7c093
PA
154092009-04-01 Pedro Alves <pedro@codesourcery.com>
15410
15411 * target.h (struct thread_resume): Delete leave_stopped member.
15412 (struct target_ops): Add a `n' argument to the `resume' callback.
15413 * server.c (start_inferior): Adjust.
15414 (handle_v_cont, myresume): Adjust.
15415 * linux-low.c (check_removed_breakpoint): Adjust to resume
15416 interface change, and to removed leave_stopped field.
15417 (resume_ptr): Delete.
15418 (struct thread_resume_array): New.
15419 (linux_set_resume_request): Add new `arg' parameter. Adjust to
15420 resume interface change.
15421 (linux_continue_one_thread, linux_queue_one_thread)
15422 (resume_status_pending_p): Check if the resume field is NULL
15423 instead of checking the leave_stopped member.
15424 (linux_resume): Adjust to the target resume interface change.
15425 * spu-low.c (spu_resume): Adjust to the target resume interface
15426 change.
15427 * win32-low.c (win32_detach, win32_resume): Ditto.
15428
c35fafde
PA
154292009-04-01 Pedro Alves <pedro@codesourcery.com>
15430
15431 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
15432 flag.
15433 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
15434 pending.
15435 (linux_continue_one_thread): Only preserve the stepping flag if
15436 there's a pending breakpoint.
15437
0a59d50b
PA
154382009-03-31 Pedro Alves <pedro@codesourcery.com>
15439
15440 * server.c (main): After the inferior having exited, call
15441 remote_close before exiting gdbserver.
15442
f04c6d38
TJB
154432009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
15444
15445 Fix size of FPSCR in Power 7 processors.
15446 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
15447 (PPC_FEATURE_HAS_DFP): New #define.
15448 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
15449 size of the FPSCR.
15450
78e5cee6
PA
154512009-03-23 Pedro Alves <pedro@codesourcery.com>
15452
15453 * server.c (handle_query) Whitespace and formatting.
15454
1b3f6016
PA
154552009-03-22 Pedro Alves <pedro@codesourcery.com>
15456
15457 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
15458 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
15459 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
15460 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
15461 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
15462 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
15463 Makefile.in, configure.ac: Fix whitespace throughout.
15464 * configure: Regenerate.
15465
a07b2135
PA
154662009-03-22 Pedro Alves <pedro@codesourcery.com>
15467
15468 * inferiors.c (find_inferior): Make it safe for the callback
15469 function to delete the currently iterated inferior.
15470
67cc2626
PA
154712009-03-22 Pedro Alves <pedro@codesourcery.com>
15472
15473 * Makefile.in (linuw_low_h): Move higher.
15474 (thread-db.o): Depend on $(linux_low_h).
15475
54a0b537
PA
154762009-03-17 Pedro Alves <pedro@codesourcery.com>
15477
15478 Rename "process" to "lwp" throughout.
15479
15480 * linux-low.c (all_processes): Rename to...
15481 (all_lwps): ... this.
15482 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
15483 (add_process): Rename to ...
15484 (add_lwp): ... this. Adjust.
15485 (linux_create_inferior): Adjust.
15486 (linux_attach_lwp): Adjust.
15487 (linux_attach): Adjust.
15488 (linux_kill_one_process): Rename to ...
15489 (linux_kill_one_lwp): ... this. Adjust.
15490 (linux_kill): Adjust.
15491 (linux_detach_one_process): Rename to ...
15492 (linux_detach_one_lwp): ... this. Adjust.
15493 (linux_detach): Adjust.
15494 (check_removed_breakpoint): Adjust.
15495 (status_pending_p): Adjust.
15496 (linux_wait_for_process): Rename to ...
15497 (linux_wait_for_lwp): ... this. Adjust.
15498 (linux_wait_for_event): Adjust.
15499 (send_sigstop): Adjust.
15500 (wait_for_sigstop): Adjust.
15501 (stop_all_processes): Rename to ...
15502 (stop_all_lwps): ... this.
15503 (linux_resume_one_process): Rename to ...
15504 (linux_resume_one_lwp): ... this. Adjust.
15505 (linux_set_resume_request, linux_continue_one_thread)
15506 (linux_queue_one_thread, resume_status_pending_p)
15507 (usr_store_inferior_registers, regsets_store_inferior_registers)
15508 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
15509 Adjust.
15510 * linux-low.h (get_process): Rename to ...
15511 (get_lwp): ... this. Adjust.
15512 (get_thread_process): Rename to ...
15513 (get_thread_lwp): ... this. Adjust.
15514 (get_process_thread): Rename to ...
15515 (get_lwp_thread): ... this. Adjust.
15516 (struct process_info): Rename to ...
15517 (struct lwp_info): ... this.
15518 (all_processes): Rename to ...
15519 (all_lwps): ... this.
15520 * proc-service.c (ps_lgetregs): Adjust.
15521 * thread-db.c (thread_db_create_event, find_one_thread)
15522 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
15523
0b16c5cf
PA
155242009-03-14 Pedro Alves <pedro@codesourcery.com>
15525
15526 * server.c (handle_query): Handle "qAttached".
15527
32de4b9d
NS
155282009-03-13 Nathan Sidwell <nathan@codesourcery.com>
15529
15530 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
15531 GPLv3, update license URL.
15532
2aecd87f
DE
155332009-03-01 Doug Evans <dje@google.com>
15534
93efd302 15535 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
15536 (server_h): Add gdb_signals.h.
15537 (signals.o): Update.
15538 * server.h (target_signal_from_host,target_signal_to_host_p)
15539 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
15540
86b1f9c5
PM
155412009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
15542
15543 * remote-utils.c (getpkt): Also generate remote-debug
15544 information if noack_mode is set.
15545
4aa995e1
PA
155462009-02-06 Pedro Alves <pedro@codesourcery.com>
15547
15548 * server.c (handle_query): Report qXfer:siginfo:read and
15549 qXfer:siginfo:write as supported and handle them.
15550 * target.h (struct target_ops) <qxfer_siginfo>: New field.
15551 * linux-low.c (linux_xfer_siginfo): New.
15552 (linux_target_ops): Set it.
15553
62709adf
PA
155542009-01-26 Pedro Alves <pedro@codesourcery.com>
15555
15556 * server.c (gdbserver_usage): Mention --remote-debug.
15557 (main): Accept '--remote-debug' switch.
15558
aef93bd7
DE
155592009-01-18 Doug Evans <dje@google.com>
15560
15561 * regcache.c (new_register_cache): No need to check result of xcalloc.
15562 * server.c (handle_search_memory): Back out calls to xmalloc,
15563 result is checked and error is returned to user upon failure.
15564 (handle_query): Ditto. Add more checks for result of malloc.
15565 (handle_v_cont): Check result of malloc, report error back to
15566 user upon failure.
15567 (handle_v_run): Ditto. Call freeargv.
15568 * server.h (freeargv): Declare.
15569 * utils.c (freeargv): New fn.
15570
54363045
DE
155712009-01-15 Doug Evans <dje@google.com>
15572
f626972c
DE
15573 * gdbreplay.c (perror_with_name): Make arg const char *.
15574 * server.h (target_signal_to_name): Make return type const char *.
0842e787 15575 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 15576 * utils.c (perror_with_name): Make arg const char *.
54363045 15577
18aae699
PA
155782009-01-14 Pedro Alves <pedro@codesourcery.com>
15579
15580 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
15581 when handling a EXIT_PROCESS_DEBUG_EVENT.
15582
ff703abe
JB
155832009-01-06 Joel Brobecker <brobecker@adacore.com>
15584
15585 * gdbreplay.c (gdbreplay_version): Update copyright year.
15586 * server.c (gdbserver_version): Likewise.
15587
f21cc1a2 155882009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
15589
15590 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 15591 (handle_extended_wait): Improve comment.
0e21c1ec 15592
bca929d3
DE
155932008-12-13 Doug Evans <dje@google.com>
15594
15595 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
15596 * server.h (ATTR_MALLOC): New macro.
15597 (xmalloc,xcalloc,xstrdup): Declare.
15598 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
15599 * inferiors.c: Ditto.
15600 * linux-low.c: Ditto.
15601 * mem-break.c: Ditto.
15602 * regcache.c: Ditto.
15603 * remote-utils.c: Ditto.
15604 * server.c: Ditto.
15605 * target.c: Ditto.
15606 * win32-low.c: Ditto.
15607
97438e3f
DE
156082008-12-12 Doug Evans <dje@google.com>
15609
896c7fbb
DE
15610 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
15611 in debugging printf.
15612
97438e3f
DE
15613 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
15614
e3b886f8
DE
156152008-12-09 Doug Evans <dje@google.com>
15616
15617 * linux-low.h (struct process_info): Delete member tid, unused.
15618 * thread-db.c (find_one_thread): Update.
15619 (maybe_attach_thread): Update.
15620
07e059b5
VP
156212008-12-02 Pedro Alves <pedro@codesourcery.com>
15622
889bf7c5
PA
15623 * target.h (struct target_ops): Add qxfer_osdata member.
15624 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
15625 and dirent.h.
15626 (linux_qxfer_osdata): New functions.
15627 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
15628 callback.
15629 * server.c (handle_query): Handle "qXfer:osdata:read:".
15630 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
15631 (buffer_xml_printf): New functions.
15632 * server.h (struct buffer): New.
15633 (buffer_grow_str, buffer_grow_str0): New macros.
15634 (buffer_grow, buffer_free, buffer_init, buffer_finish)
15635 (buffer_xml_printf): Declare.
07e059b5 15636
4cab47ab
DE
156372008-11-24 Doug Evans <dje@google.com>
15638
15639 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
15640
f142445f
DJ
156412008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
15642
15643 * server.c (handle_v_run): Always use the supplied argument list.
15644
d0107bb6 156452008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 15646
d0107bb6
BW
15647 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
15648 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 15649
2c4ad781
TJB
156502008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
15651
15652 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
15653 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
15654 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
15655 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
15656 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
15657 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
15658 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
15659 XML target descriptions.
15660 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
15661 when inferior is running on an ISA 2.05 or later processor. Add
15662 special case to return offset for full 64-bit slot of FPSCR when
15663 in 32-bits.
15664
dfb64f85
DJ
156652008-11-14 Daniel Gutson <dgutson@codesourcery.com>
15666
15667 * Makefile.in (SFILES, clean): Added sparc64 files.
15668 (reg-sparc64.o, reg-sparc64.c): New.
15669 * configure.srv (sparc*-*-linux*): New configuration.
15670 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
15671 syscall arguments for SPARC.
15672 (regsets_store_inferior_registers): Likewise.
15673 * linux-sparc-low.c: New file.
15674
66b6e1dd
DE
156752008-10-21 Doug Evans <dje@google.com>
15676
15677 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
15678 (READLINE_DIR,READLINE_DEP): Delete.
15679 (INTERNAL_CFLAGS): Update.
15680 (LINTFLAGS): Update.
15681
9b710a42
PA
156822008-10-10 Pedro Alves <pedro@codesourcery.com>
15683
15684 * server.c (handle_v_run): If GDB didn't specify an argv, use the
15685 whole argv from the last run, not just argv[0].
15686
5822d809
PA
156872008-09-08 Pedro Alves <pedro@codesourcery.com>
15688
15689 * regcache.c (new_register_cache): Return NULL if the register
15690 cache size isn't known yet.
15691 (free_register_cache): Avoid dereferencing a NULL regcache.
15692
74aac56f
DJ
156932008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
15694
15695 * configure.srv: Merge MIPS and MIPS64.
15696
400b20f5
MR
156972008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
15698
15699 * Makefile.in (uninstall): Apply $(EXEEXT) too.
15700
677c5bb1
LM
157012008-08-18 Luis Machado <luisgpm@br.ibm.com>
15702
15703 * Makefile.in: Add required vsx dependencies.
15704
15705 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
15706 Declare init_registers_powerpc_vsx32l.
15707 Declare init_registers_powerpc_vsx64l.
15708 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
15709 (ppc_arch_setup): Check for VSX in hwcap.
15710 (ppc_fill_vsxregset): New function.
15711 (ppc_store_vsxregset): New function.
15712 Add new VSX entry in regset_info target_regsets.
15713
15714 * configure.srv: Add new VSX dependencies.
15715
a6f3e723
SL
157162008-08-12 Pedro Alves <pedro@codesourcery.com>
15717
15718 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
15719 (remote_open): Set or clear transport_is_reliable.
15720 (putpkt_binary): Don't expect acks in noack mode.
15721 (getpkt): Don't send ack/nac in noack mode.
15722 * server.c (handle_general_set): Handle QStartNoAckMode.
15723 (handle_query): If connected by tcp pass QStartNoAckMode+ in
15724 qSupported.
15725 (main): Reset noack_mode on every connection.
15726 * server.h (noack_mode): Declare.
15727
a417dc56
RW
157282008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
15729
15730 * Makefile.in (GDBREPLAY_OBS): New variable.
15731 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
15732
3221518c
UW
157332008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
15734 Daniel Jacobowitz <dan@codesourcery.com>
15735
15736 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
15737 (usr_store_inferior_registers): Likewise.
15738 (regsets_store_inferior_registers): Likewise.
15739
ec56be1b
PA
157402008-07-31 Rolf Jansen <rj@surtec.com>
15741 Pedro Alves <pedro@codesourcery.com>
15742
15743 * configure.ac: Check for memmem declaration.
15744 * server.c [HAVE_MALLOC_H]: Include malloc.h.
15745 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
15746 (disable_packet_qfThreadInfo): Unconditionally compile.
15747 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
15748 * configure, config.in: Regenerate.
15749
2fe5e3ff
DE
157502008-07-28 Doug Kwan <dougkwan@google.com>
15751
15752 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
15753 (linux_write_memory): Remove declaration of errno.
15754
836acd6d
UW
157552008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
15756
15757 * linux-low.c (handle_extended_wait): Do not use "status"
15758 variable uninitialized.
15759
aeba519e
PA
157602008-07-07 Pedro Alves <pedro@codesourcery.com>
15761
15762 * server.c (handle_v_attach): Inhibit reporting dll changes.
15763
db42f210
PA
157642008-06-27 Pedro Alves <pedro@codesourcery.com>
15765
15766 * remote-utils.c (prepare_resume_reply): If requested, don't
15767 output "thread:TID" in the T stop reply.
15768
15769 * server.c (disable_packet_vCont, disable_packet_Tthread)
15770 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
15771 (handle_query): If requested, disable support for qC, qfThreadInfo
15772 and qsThreadInfo.
15773 (handle_v_requests): If requested, disable support for vCont.
15774 (gdbserver_show_disableable): New.
15775 (main): Handle --disable-packet and --disable-packet=LIST.
15776
15777 * server.h (disable_packet_vCont, disable_packet_Tthread)
15778 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
15779
8e4c5421
CD
157802008-06-20 Carlos O'Donell <carlos@codesourcery.com>
15781
15782 * server.c (gdbserver_usage): Mention --version.
15783
6e23a804
DJ
157842008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
15785
15786 * Makefile.in (gdbreplay.o): New rule.
15787
90aa6a40
JM
157882008-06-06 Joseph Myers <joseph@codesourcery.com>
15789
15790 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
15791 message, not gdbserver.
15792
c16158bc 157932008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
15794 Nathan Sidwell <nathan@codesourcery.com>
15795 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
15796
15797 * acinclude.m4: Include ../../config/acx.m4.
15798 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
15799 * configure, config.in: Regenerate.
15800 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
15801 * server.c (gdbserver_version): Print PKGVERSION.
15802 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
15803 (main): Adjust gdbserver_usage calls.
15804 * gdbreplay.c (version, host_name): Add declarations.
15805 (gdbreplay_version, gdbreplay_usage): New.
15806 (main): Accept --version and --help options.
15807
aeb75bf5
DJ
158082008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
15809
15810 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
15811 (arm_breakpoint_at): Handle Thumb.
15812 (the_low_target): Add comment.
15813
76b233dd
UW
158142008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
15815
15816 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
15817
08388c79
DE
158182008-05-09 Doug Evans <dje@google.com>
15819
a3c83fae
DE
15820 * server.h (decode_search_memory_packet): Declare.
15821 * remote-utils.c (decode_search_memory_packet): New fn.
15822 * server.c (handle_search_memory_1): New fn.
08388c79
DE
15823 (handle_search_memory): New fn.
15824 (handle_query): Process qSearch:memory packets.
15825
bb9c3d36
UW
158262008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
15827
15828 * regcache.c (registers_length): Remove.
15829 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
15830 full register packet.
15831 * regcache.h (registers_length): Remove prototype.
15832 * server.h (PBUFSIZ): Define to 16384.
15833
7284e1be
UW
158342008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
15835
15836 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
15837 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
15838 powerpc-64l.o, and powerpc-altivec64l.o.
15839 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
15840 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
15841 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
15842 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
15843 rs6000/power-linux.xml, and rs6000/power64-linux.xml
15844 to srv_xmlfiles.
15845
15846 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
15847 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
15848 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
15849 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
15850 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
15851 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
15852 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
15853 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
15854 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
15855 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
15856 (clean): Update.
15857
15858 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
15859 (init_registers_powerpc_32l): ... this new prototype.
15860 (init_registers_powerpc_32): Remove, replace by ...
15861 (init_registers_powerpc_altivec32l): ... this new prototype.
15862 (init_registers_powerpc_e500): Remove, replace by ...
15863 (init_registers_powerpc_e500l): ... this new prototype.
15864 (init_registers_ppc64): Remove, replace by ...
15865 (init_registers_powerpc_64l): ... this new prototype.
15866 (init_registers_powerpc_64): Remove, replace by ...
15867 (init_registers_powerpc_altivec64l): ... this new prototype.
15868 (ppc_num_regs): Set to 73.
15869 (PT_ORIG_R3, PT_TRAP): Define if necessary.
15870 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
15871 (ppc_cannot_store_register): Handle orig_r3 and trap.
15872 (ppc_arch_setup): Update init_registers_... calls.
15873 (ppc_fill_gregset): Handle orig_r3 and trap.
15874
15875 * inferiors.c (clear_inferiors): Reset current_inferior.
15876
fdc59709
PB
158772008-04-23 Paolo Bonzini <bonzini@gnu.org>
15878
889bf7c5
PA
15879 * acinclude.m4: Add override.m4.
15880 * configure: Regenerate.
fdc59709 15881
c9b2f845
UW
158822008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
15883
15884 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
15885 initial call to init_register_ppc64.
15886
550512b8
UW
158872008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
15888
43aaf8b6
PA
15889 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
15890 single powerpc*-*-linux* case.
550512b8
UW
15891 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
15892
b6430ec3
UW
158932008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
15894
15895 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 15896 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
15897 from reg_xmlfiles.
15898 * linux-ppc-low.c: Include <elf.h>.
15899 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
15900 (ppc_hwcap): New global variable.
15901 (ppc_regmap): Remove __SPE__ #ifdef sections.
15902 (ppc_regmap_e500): New global variable.
15903 (ppc_cannot_store_register): Update __SPE__ special case.
15904 (ppc_get_hwcap): New function.
15905 (ppc_arch_setup): Use it to determine whether inferior supports
15906 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
15907 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
15908 Do not access registers if target does not support AltiVec.
15909 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
15910 Do not access registers if target does not support SPE.
15911 (target_regsets): Unconditionally include AltiVec and SPE regsets.
15912
52fa2412
UW
159132008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
15914
15915 * linux-low.c (disabled_regsets, num_regsets): New.
15916 (use_regsets_p): Delete.
15917 (linux_wait_for_process): Clear disabled_regsets.
15918 (regsets_fetch_inferior_registers): Check and set it.
15919 (regsets_store_inferior_registers): Likewise.
15920 (linux_fetch_registers, linux_store_registers): Do not use
15921 use_regsets_p.
15922 (initialize_low): Allocate disabled_regsets.
15923
e28b3332
DJ
159242008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
15925
15926 * Makefile.in (LIBOBJS): New.
15927 (OBS): Use LIBOBJS.
15928 (memmem.o): New rule.
15929 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
15930 * configure: Regenerated.
15931
4536995d
UW
159322008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
15933
15934 * server.c (handle_query): Never return "unsupported" for
15935 qXfer:features:read queries.
15936
221c031f
UW
159372008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
15938
15939 * server.c (get_features_xml): Fix inverted condition.
15940 (handle_query): Always support qXfer:feature:read.
15941
ccd213ac
DJ
159422008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
15943
15944 * server.c (wrapper_argv): New.
15945 (start_inferior): Handle wrapper_argv. If set, expect an extra
15946 trap.
15947 (gdbserver_usage): Document --wrapper.
15948 (main): Parse --wrapper.
15949
6fe305f7
UW
159502008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
15951
15952 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
15953 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
15954 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
15955 (ppc_set_pc): Likewise.
15956 (ppc_arch_setup): New function.
15957 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
15958 of collect_register.
889bf7c5 15959 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 15960
5b0a002e
UW
159612008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
15962
15963 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
15964 instead of linux-ppc64-low.o.
15965 * linux-ppc64-low.c: Remove file.
15966 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
15967 (linux-ppc64-low.o): Remove rule.
15968
15969 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
15970 (init_registers_powerpc_64): Likewise.
15971 (ppc_regmap): Conditionally define depending on __powerpc64__.
15972 (ppc_cannot_store_register): Do not special-case "fpscr" when
15973 compiled on __powerpc64__.
15974 (ppc_collect_ptrace_register): New function.
15975 (ppc_supply_ptrace_register): New function.
15976 (ppc_breakpoint): Change type to "unsigned int".
15977 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
15978 (the_low_target): Conditionally provide initializers for the
889bf7c5 15979 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
15980 collect_ptrace_register and supply_ptrace_register members.
15981
9b4b61c8
UW
159822008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
15983
15984 * regcache.h (gdbserver_xmltarget): Add extern declaration.
15985 * server.c (gdbserver_xmltarget): Define.
15986 (get_features_xml): Use it to replace "target.xml" and arch_string.
15987
15988 * configure.srv: Remove srv_xmltarget. Add XML files that were
15989 mentioned there to srv_xmlfiles instead. Remove conditional tests
15990 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
15991 srv_xmlfiles and srv_regobj to include all possible choices.
15992 * configure.ac (srv_xmltarget): Remove.
15993 (srv_xmlfiles): Do not add "target.xml".
15994 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
15995 checks for supplementary target information.
15996 * configure: Regenerate.
15997 * Makefile.in (XML_TARGET): Remove.
15998 (target.xml): Remove rule.
15999 (clean): Do not clean up target.xml.
16000 (.PRECIOUS): Do not mention target.xml.
16001
16002 * target.h (struct target_ops): Remove arch_string member.
16003 * linux-low.c (linux_arch_string): Remove.
16004 (linux_target_ops): Remove arch_string initializer.
16005 * linux-low.h (struct linux_target_ops): Remove arch_string member.
16006 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
16007 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
16008 * spu-low.c (spu_arch_string): Remove.
16009 (spu_target_ops): Remove arch_string initializer.
16010 * win32-low.c (win32_arch_string): Remove.
16011 (win32_target_ops): Remove arch_string initializer.
16012 * win32-low.h (struct win32_target_ops): Remove arch_string member.
16013 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
16014 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
16015
ee1a7ae4
UW
160162008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
16017
16018 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
16019 by collect_ptrace_register and supply_ptrace_register hooks.
16020 * linux-low.c (fetch_register): Use supply_ptrace_register callback
16021 instead of checking for the_low_target.left_pad_xfer.
16022 (usr_store_inferior_registers): Use collect_ptrace_register callback
16023 instead of checking for the_low_target.left_pad_xfer.
16024
16025 * linux-s390-low.c (s390_collect_ptrace_register): New function.
16026 (s390_supply_ptrace_register): Likewise.
16027 (s390_fill_gregset): Call s390_collect_ptrace_register.
16028 (the_low_target): Update.
16029
16030 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
16031 (ppc_supply_ptrace_register): Likewise.
16032 (the_low_target): Update.
16033
16034 * linux-i386-low.c (the_low_target): Update.
16035 * linux-x86-64-low.c (the_low_target): Update.
16036
d61ddec4
UW
160372008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
16038
16039 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
16040 reg-s390.o and reg-s390x.o.
16041
16042 * linux-low.c (new_inferior): New global variable.
16043 (linux_create_inferior, linux_attach): Set it.
16044 (linux_wait_for_process): Call the_low_target.arch_setup after the
16045 target has stopped for the first time.
16046 (initialize_low): Do not call the_low_target.arch_setup.
16047
16048 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
16049 (s390_set_pc): Likewise.
16050 (s390_arch_setup): New function.
16051 (the_low_target): Use s390_arch_setup as arch_setup routine.
16052
16053 * regcache.c (realloc_register_cache): New function.
16054 (set_register_cache): Call it for each existing regcache.
16055
d05b4ac3
UW
160562008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
16057
16058 * server.h (init_registers): Remove prototype.
16059
16060 * linux-low.h (struct linux_target_ops): Add arch_setup field.
16061 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
16062 instead of init_registers ().
16063 * linux-arm-low.c (init_registers_arm): Add prototype.
16064 (init_registers_arm_with_iwmmxt): Likewise.
16065 (the_low_target): Add initializer for arch_setup field.
16066 * linux-cris-low.c (init_registers_cris): Add prototype.
16067 (the_low_target): Add initializer for arch_setup field.
16068 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
16069 (the_low_target): Add initializer for arch_setup field.
16070 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
16071 (the_low_target): Add initializer for arch_setup field.
16072 * linux-ia64-low.c (init_registers_ia64): Add prototype.
16073 (the_low_target): Add initializer for arch_setup field.
16074 * linux-m32r-low.c (init_registers_m32r): Add prototype.
16075 (the_low_target): Add initializer for arch_setup field.
16076 * linux-m68k-low.c (init_registers_m68k): Add prototype.
16077 (the_low_target): Add initializer for arch_setup field.
16078 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
16079 (init_registers_mips64_linux): Likewise.
16080 (the_low_target): Add initializer for arch_setup field.
16081 * linux-ppc-low.c (init_registers_ppc): Add prototype.
16082 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
16083 (the_low_target): Add initializer for arch_setup field.
16084 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
16085 (init_registers_powerpc_64): Likewise.
16086 (the_low_target): Add initializer for arch_setup field.
16087 * linux-s390-low.c (init_registers_s390): Add prototype.
16088 (init_registers_s390x): Likewise.
16089 (the_low_target): Add initializer for arch_setup field.
16090 * linux-sh-low.c (init_registers_sh): Add prototype.
16091 (the_low_target): Add initializer for arch_setup field.
16092 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
16093 (the_low_target): Add initializer for arch_setup field.
16094 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
16095 (the_low_target): Add initializer for arch_setup field.
16096
16097 * win32-low.h (struct win32_target_ops): Add arch_setup field.
16098 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
16099 instead of init_registers ().
16100 * win32-arm-low.c (init_registers_arm): Add prototype.
16101 (the_low_target): Add initializer for arch_setup field.
16102 * win32-i386-low.c (init_registers_i386): Add prototype.
16103 (the_low_target): Add initializer for arch_setup field.
16104
16105 * spu-low.c (init_registers_spu): Add prototype.
16106 (initialize_low): Call initialie_registers_spu () instead of
16107 initialize_registers ().
16108
fd96d250
PA
161092008-02-19 Pedro Alves <pedro@codesourcery.com>
16110
16111 * server.c (handle_v_requests): When handling the vRun and vAttach
16112 packets, if already debugging a process, don't kill it. Return an
16113 error instead.
16114
d41b6bb4
DJ
161152008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
16116
16117 * server.c (handle_query): Correct length check.
16118
5ac588cf
PA
161192008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
16120
16121 * win32-low.c (do_initial_child_stuff): Add process handle
16122 parameter. Set current_process_handle and current_process_id from the
16123 parameters. Clear globals.
16124 (win32_create_inferior): Don't set current_process_handle and
16125 current_process_id here. Instead pass them on the call to
16126 do_initial_child_stuff.
16127 (win32_attach): Likewise.
16128 (win32_clear_inferiors): New.
16129 (win32_kill): Don't close the current process handle or the
16130 current thread handle here. Instead call win32_clear_inferiors.
16131 (win32_detach): Don't open a new handle to the process. Call
16132 win32_clear_inferiors.
16133 (win32_join): Don't rely on current_process_handle; open a new
16134 handle using the process id.
16135 (win32_wait): Call win32_clear_inferiors when the inferior process
16136 has exited.
16137
ecd7ecbc
DJ
161382008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
16139
16140 * server.c (monitor_show_help): Add "exit".
16141
1525d545
MG
161422008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
16143
ecd7ecbc 16144 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
16145 (clean): Add reg-xtensa.c.
16146 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
16147 * configure.srv (xtensa*-*-linux*) New target.
16148 * linux-xtensa-low.c: New.
16149 * xtensa-xtregs.c: New.
1525d545 16150
59a016f0
PA
161512008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
16152
16153 * hostio.c: Don't include errno.h.
16154 (errno_to_fileio_errno): Move to hostio-errno.
16155 * hostio.c: (hostio_error): Remove the error parameter. Defer the
16156 error number outputting to the target->hostio_last_error callback.
16157 (hostio_packet_error): Use FILEIO_EINVAL directly.
16158 (handle_open, handle_pread, hostio_error, handle_unlink): Update
16159 calls to hostio_error.
16160 * hostio-errno.c: New.
16161 * server.h (hostio_last_error_from_errno): Declare.
16162 * target.h (target_ops): Add hostio_last_error member.
16163 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
16164 as hostio_last_error handler.
889bf7c5 16165 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
16166 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
16167 (wince_hostio_last_error): New functions.
16168 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
16169 as hostio_last_error handler.
16170 (win32_target_ops) [!_WIN32_WCE]: Register
16171 hostio_last_error_from_errno as hostio_last_error handler.
16172 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
16173 (hostio-errno.o): New rule.
16174 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
16175 * configure.srv (srv_hostio_err_objs): New variable. Default to
16176 hostio-errno.o.
16177 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
16178 * configure: Regenerate.
16179
2d717e4f
DJ
161802008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
16181
16182 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
16183 (linux_kill, linux_detach): Clean up the process list.
16184 * remote-utils.c (remote_open): Improve port number parsing.
16185 (putpkt_binary, input_interrupt): Only send interrupts if the target
16186 is running.
16187 * server.c (extended_protocol): Make static.
16188 (attached): Define earlier.
16189 (exit_requested, response_needed, program_argv): New variables.
16190 (target_running): New.
16191 (start_inferior): Clear attached here.
16192 (attach_inferior): Set attached here.
16193 (require_running): Define.
16194 (handle_query): Use require_running and target_running. Implement
16195 "monitor exit".
16196 (handle_v_attach, handle_v_run): New.
16197 (handle_v_requests): Use require_running. Handle vAttach and vRun.
16198 (gdbserver_usage): Update.
16199 (main): Redo argument parsing. Handle --debug and --multi. Handle
16200 --attach along with other options or after the port. Save
16201 program_argv. Support no initial program. Resynchronize
16202 communication with GDB after an error. Handle "monitor exit".
16203 Use require_running and target_running. Always allow the extended
16204 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
16205 restart in extended mode.
16206 * README: Refer to the GDB manual. Update --attach usage.
16207
7407e2de
AS
162082007-12-20 Andreas Schwab <schwab@suse.de>
16209
16210 * linux-low.c (STACK_SIZE): Define.
16211 (linux_tracefork_child): Use it. Use __clone2 on ia64.
16212 (linux_test_for_tracefork): Likewise.
16213
b65d95c5
DJ
162142007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
16215
16216 * linux-low.c (linux_wait_for_event): Update messages. Do not
16217 reinsert auto-delete breakpoints.
16218 * mem-break.c (struct breakpoint): Change return type of handler to
16219 int.
16220 (set_breakpoint_at): Update handler type.
16221 (reinsert_breakpoint_handler): Return 1 instead of calling
16222 delete_breakpoint.
16223 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
16224 setting a new one.
16225 (check_breakpoints): Delete auto-delete breakpoints and return 2.
16226 * mem-break.h (set_breakpoint_at): Update handler type.
16227 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
16228 * win32-low.c (auto_delete_breakpoint): New.
16229 (get_child_debug_event): Use it.
16230
4e799345
DJ
162312007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
16232
16233 * configure.ac: Check for pread and pwrite.
16234 * hostio.c (handle_pread): Fall back to lseek and read.
16235 (handle_pwrite): Fall back to lseek and write.
16236 * config.in, configure: Regenerated.
16237
27524b67
DJ
162382007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
16239
16240 * server.c (myresume): Add own_buf argument.
16241 (main): Update calls.
16242
a20d5e98
DJ
162432007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
16244
16245 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
16246 * remote-utils.c (remote_open): Do not call disable_async_io.
16247 (block_async_io): Delete.
16248 (unblock_async_io): Make static.
16249 (initialize_async_io): New.
16250 * server.c (handle_v_cont): Handle async I/O here.
16251 (myresume): Likewise. Move other common resume tasks here...
16252 (main): ... from here. Call initialize_async_io. Disable async
16253 I/O before the main loop.
16254 * server.h (initialize_async_io): Declare.
16255 (block_async_io, unblock_async_io): Delete prototypes.
16256 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
16257
b79d787e
DJ
162582007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
16259
16260 * remote-utils.c (readchar): Allow binary data in received messages.
16261
d97903b2
PA
162622007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
16263
16264 * win32-low.c (attaching): New global.
16265 (win32_create_inferior): Clear the `attaching' global.
16266 (win32_attach): Set the `attaching' global.
16267 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
16268 attaching. Only set a breakpoint at the entry point if not
16269 attaching.
16270
311de423
PA
162712007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
16272
16273 * server.c (main): Don't report dll events on the initial
16274 connection on attaches.
16275
6c2d16d2
PA
162762007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
16277
16278 * server.c (main): Relax numerical bases supported for the pid of
16279 the --attach command line argument.
16280
5ca906e6
PA
162812007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
16282
16283 * win32-low.c (win32_attach): Call OpenProcess before
16284 DebugActiveProcess, not after. Add last error output to error
16285 call.
16286
9c6c8194
PA
162872007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
16288
16289 * win32-low.c (win32_get_thread_context)
16290 (win32_set_thread_context): New functions.
16291 (thread_rec): Use win32_get_thread_context.
16292 (continue_one_thread, win32_resume): Use win32_set_thread_context.
16293 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
16294 field.
16295
4d5d1aaa
PA
162962007-12-03 Leo Zayas
16297 Pedro Alves <pedro_alves@portugalmail.pt>
16298
16299 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
16300 global variables.
16301 (child_add_thread): Minor cleanup.
16302 (child_continue): Resume artificially suspended threads before
16303 calling ContinueDebugEvent.
16304 (suspend_one_thread): New.
16305 (fake_breakpoint_event): New.
16306 (get_child_debug_event): Change return type to int. Check here if
16307 gdb sent an interrupt request. If a soft interrupt was requested,
16308 fake a breakpoint event. Return 0 if there is no event to handle,
16309 and 1 otherwise.
16310 (win32_wait): Don't check here if gdb sent an interrupt request.
16311 Ensure there is a valid event to handle.
16312 (win32_request_interrupt): Add soft interruption method as last
16313 resort.
16314
c436e841
PA
163152007-12-03 Leo Zayas
16316 Pedro Alves <pedro_alves@portugalmail.pt>
16317
16318 * win32-low.h (win32_thread_info): Add descriptions to the
16319 structure members. Replace `suspend_count' counter by a
16320 `suspended' flag.
16321 * win32-low.c (thread_rec): Update condition of when to get the
16322 context from the inferior. Rely on ContextFlags being set if it
16323 has already been retrieved. Only suspend the inferior thread if
16324 we haven't already. Warn if that fails.
16325 (continue_one_thread): s/suspend_count/suspended/. Only call
16326 ResumeThread once. Warn if that fails.
16327
e7b5fa67
PA
163282007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
16329
16330 * win32-low.c (win32_wait): Don't read from the inferior when it
16331 has already exited.
16332
a385171d
PA
163332007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
16334
16335 * Makefile.in (win32_low_h): New variable.
16336 (win32-low.o): Add dependency on $(win32_low_h).
16337 (win32-arm-low.o, win32-i386-low.o): New rules.
16338
f80c84b3
DJ
163392007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
16340
16341 * hostio.c: Correct copyright year.
16342
a6b151f1
DJ
163432007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
16344
16345 * Makefile.in (OBS): Add hostio.o.
16346 (hostio.o): New rule.
16347 * server.h (handle_vFile): Declare.
16348 * hostio.c: New file.
16349 * server.c (handle_v_requests): Take packet_len and new_packet_len
16350 for binary packets. Call handle_vFile.
16351 (main): Update call to handle_v_requests.
16352
f9387fc3
DJ
163532007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
16354
16355 * linux-low.c: Include <sched.h>.
16356
51c2684e
DJ
163572007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
16358
16359 * linux-low.c (linux_tracefork_grandchild): New.
16360 (linux_tracefork_child): Use clone.
16361 (linux_test_for_tracefork): Use clone; allocate and free a stack.
16362
75f83163
JB
163632007-10-31 Joel Brobecker <brobecker@adacore.com>
16364
16365 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
16366
da5898ce
DJ
163672007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
16368
16369 * linux-low.c (handle_extended_wait): Handle unexpected signals.
16370
24a09b5f
DJ
163712007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
16372
16373 * inferiors.c (change_inferior_id): Delete.
16374 (add_pid_to_list, pull_pid_from_list): New.
16375 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
16376 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
16377 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
16378 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
16379 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
16380 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
16381 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
16382 (using_threads): Always set to 1.
16383 (handle_extended_wait): New.
16384 (add_process): Do not set TID.
16385 (linux_create_inferior): Set must_set_ptrace_flags.
16386 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
16387 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
16388 (linux_thread_alive): Rename TID argument to LWPID.
16389 (linux_wait_for_process): Handle unknown processes. Do not use TID.
16390 (linux_wait_for_event): Do not use TID or check using_threads. Update
16391 call to dead_thread_notify. Call handle_extended_wait.
16392 (linux_create_inferior): Use PTRACE_SETOPTIONS.
16393 (send_sigstop): Delete sigstop_sent.
16394 (wait_for_sigstop): Avoid TID.
16395 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
16396 (linux_test_for_tracefork): New.
16397 (linux_lookup_signals): Use thread_db_active and
16398 linux_supports_tracefork_flag.
16399 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
16400 * linux-low.h (get_process_thread): Avoid TID.
16401 (struct process_ifo): Move thread_known and tid to the end. Remove
16402 sigstop_sent.
16403 (linux_attach_lwp, thread_db_init): Update prototypes.
16404 * server.h (change_inferior_id): Delete prototype.
16405 (add_pid_to_list, pull_pid_from_list): New prototypes.
16406 * thread-db.c (thread_db_use_events): New.
16407 (find_first_thread): Rename to...
16408 (find_one_thread): ...this. Update callers and messages. Do not
16409 call fatal. Check thread_db_use_events. Do not call
16410 change_inferior_id or new_thread_notify.
16411 (maybe_attach_thread): Update. Do not call new_thread_notify.
16412 (thread_db_init): Set thread_db_use_events. Check use_events.
16413 * utils.c (fatal, warning): Correct message prefix.
16414
30ed0a8f
DJ
164152007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
16416
16417 * Makefile.in (clean): Remove new files.
16418 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
16419 (powerpc-64.o, powerpc-64.c): New rules.
16420 * configure.srv: Use alternate register sets for powerpc64-*-linux*
16421 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
16422 with SPE.
16423 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
16424 SPE targets.
16425 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
16426 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
16427 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
16428 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
16429 (target_regsets): Add AltiVec and SPE register sets.
16430 * configure.ac: Check for AltiVec and SPE.
16431 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
16432 (ppc_fill_vrregset, ppc_store_vrregset): New.
16433 (target_regsets): Add AltiVec register set.
16434 * configure: Regenerated.
16435
fd462a61
DJ
164362007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
16437
16438 * linux-low.c (O_LARGEFILE): Define.
16439 (linux_read_memory): Use /proc/PID/mem.
16440 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
16441 * configure, config.in: Regenerated.
16442
69f223ed
DJ
164432007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
16444
16445 * linux-low.c (linux_wait_for_event): Do not pass signals while
16446 single-stepping.
16447
aec18585
PA
164482007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
16449
16450 * win32-low.c (create_process): New.
16451 (win32_create_inferior): Use create_process instead of
16452 CreateProcess. If create_process failed retry appending an ".exe"
16453 suffix. Store the GetLastError result immediatelly after
16454 create_process calls and use it on the call to error.
16455
34d86ddd
PA
164562007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
16457
16458 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
16459
5a0e3bd0
JB
164602007-08-23 Joel Brobecker <brobecker@adacore.com>
16461
16462 * configure.ac: Switch license to GPLv3.
16463
f88c79e6
MS
164642007-08-01 Michael Snyder <msnyder@access-company.com>
16465
16466 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
16467
6b3d9b83
PA
164682007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
16469
16470 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
16471 typedef.
16472 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
16473 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
16474 CloseToolhelp32Snapshot.
16475 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
16476 CloseToolhelp32Snapshot.
16477
c588c53c
MS
164782007-07-27 Michael Snyder <michael.snyder@access-company.com>
16479
16480 * server.c (main): Check for inferior exit before main loop.
16481
aa0403d9
PA
164822007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
16483
16484 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
16485 instead of on tmp_desc.
16486
255e7678
DJ
164872007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
16488 Daniel Jacobowitz <dan@codesourcery.com>
16489
16490 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
16491 (add_thread): Minor cleanups.
16492 (clear_inferiors): Move lower in the file. Clear the DLL
16493 list.
16494 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
16495 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
16496 (xml_escape_text): New.
16497 * server.c (handle_query): Handle qXfer:libraries:read. Report it
16498 for qSupported.
16499 (handle_v_cont): Report errors.
16500 (gdbserver_version): Update.
16501 (main): Correct size of own_buf. Do not report initial DLL events.
16502 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
16503 (unloaded_dll, xml_escape_text): New.
16504 * win32-low.c (enum target_waitkind): Update comments.
16505 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
16506 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
16507 (win32_EnumProcessModules, win32_GetModuleInformation)
16508 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
16509 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
16510 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
16511 (win32_Module32First, win32_Module32Next, load_toolhelp)
16512 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
16513 (get_child_debug_event): Handle DLL events.
16514 (win32_wait): Likewise.
16515
0d37add9
DJ
165162007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
16517
16518 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
16519 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
16520
45e2715e
PA
165212007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
16522
16523 * win32-low.c (handle_output_debug_string): Ignore event if not
16524 waiting.
16525
c5674cf1
PA
165262007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
16527
16528 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
16529
2bbe3cc1
DJ
165302007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
16531
16532 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
16533
ae13219e
DJ
165342007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
16535
16536 * inferiors.c (change_inferior_id): Add comment.
16537 * linux-low.c (check_removed_breakpoint): Add an early
16538 prototype. Improve debug output.
16539 (linux_attach): Doc update.
16540 (linux_detach_one_process, linux_detach): Clean up before releasing
16541 each process.
16542 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
16543 * linux-low.h (struct process_info): Doc improvement.
16544 * mem-break.c (delete_all_breakpoints): New.
16545 * mem-break.h (delete_all_breakpoints): New prototype.
16546 * thread-db.c (find_first_thread): New.
16547 (thread_db_create_event): Call it instead of
16548 thread_db_find_new_threads. Clean up unused variables.
16549 (maybe_attach_thread): Remove first thread handling.
16550 (thread_db_find_new_threads): Use find_first_thread.
16551 (thread_db_get_tls_address): Likewise.
16552
4105de34
DJ
165532007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
16554
16555 * thread-db.c (thread_db_find_new_threads): Add prototype.
16556 (thread_db_create_event): Check for the main thread before adding
16557 a new thread.
16558 (maybe_attach_thread): Only enable event reporting if TID == 0.
16559 (thread_db_get_tls_address): Check for new threads.
16560
2b876972
DJ
165612007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
16562
16563 * linux-low.c (linux_create_inferior): Try execv before execvp.
16564 * spu-low.c (spu_create_inferior): Likewise.
16565
7a245884
DJ
165662007-06-13 Mike Frysinger <vapier@gentoo.org>
16567
16568 * linux-low.c (linux_create_inferior): Change execv to execvp.
16569 * spu-low.c (spu_create_inferior): Likewies.
16570
117ce543
DJ
165712007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
16572
16573 * Makefile.in (clean): Clean new files instead of deleted ones.
16574 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
16575 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
16576 rules.
16577 * configure.srv: Specify XML files and new regformats for MIPS and
16578 MIPS64 GNU/Linux.
16579 * linux-mips-low.c (mips_num_regs): Set to only used registers.
16580 (mips_regmap): Do not fetch $0. Remove unused registers. Add
16581 an entry for the restart register.
16582 (mips_cannot_fetch_register, mips_cannot_store_register)
16583 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
16584 register names to match the XML descriptions.
16585 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
16586 restart register instead of $0.
16587
0e7f50da
UW
165882007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
16589 Markus Deuling <deuling@de.ibm.com>
16590
16591 * remote-utils.c (decode_xfer_write): New function.
16592 * server.h (decode_xfer_write): Add prototype.
16593 * server.c (handle_query): Add PACKET_LEN argument. Support
16594 qXfer:spu:read and qXfer:spu:write packets.
16595 (main): Pass packet_len to handle_query.
16596 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
16597 * target.h (target_ops): Add qxfer_spu.
16598
374c1d38
UW
165992007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
16600
16601 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
16602 accessing non-seekable spufs files.
16603
bb63802a
UW
166042007-05-16 Markus Deuling <deuling@de.ibm.com>
16605
889bf7c5 16606 * server.c (handle_query): Add reply for qC packet.
bb63802a 16607
7390519e
PA
166082007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16609 Leo Zayas <lerele@champenstudios@com>
16610
16611 * server.h (check_remote_input_interrupt_request): New function.
16612 * remote_utils.c (INVALID_DESCRIPTOR): New define.
16613 (remote_desc): Initialize with INVALID_DESCRIPTOR.
16614 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
16615 (check_remote_input_interrupt_request): New function.
16616 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 16617 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
16618 winapi_GenerateConsoleCtrlEvent): New typedefs.
16619 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
16620 to 250 ms.
16621 (win32_wait): Check for remote interrupt request
16622 with check_remote_input_interrupt_request.
16623 (win32_request_interrupt): New function.
16624 (win32_target_op): Set request_interrupt to win32_request_interrupt.
16625
34b34921
PA
166262007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16627
16628 * win32-low.c (debug_registers_changed,
16629 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
16630 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
16631 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
16632 (thread_rec): Get context using the low target.
16633 (child_add_thread): Call thread_added on the low target,
16634 which does the same thing.
16635 (regptr): Delete.
16636 (do_initial_child_stuff): Remove debug registers references.
16637 Set context using the low target. Resume threads after
16638 setting the contexts.
16639 (child_continue): Remove dead variable. Remove debug
16640 registers references.
16641 (child_fetch_inferior_registers): Go through the low target.
16642 (do_child_store_inferior_registers): Remove.
16643 (child_store_inferior_registers): Go through the low target.
16644 (win32_resume): Remove debug registers references.
16645 Set context using the low target.
16646 (handle_exception): Change return type to void. Don't record
16647 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
16648 first chance exception.
889bf7c5 16649 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
16650 goto loop. Always return after waiting for debug event.
16651 (win32_wait): Convert to switch statement. Handle spurious
16652 events.
16653
16654 * win32-i386-low.c (debug_registers_changed,
16655 debug_registers_used): New.
16656 (initial_stuff): Rename to ...
16657 (i386_initial_stuff): ... this. Clear debug registers
16658 state variables.
16659 (store_debug_registers): Delete.
16660 (i386_get_thread_context): New.
16661 (load_debug_registers): Delete.
16662 (i386_set_thread_context): New.
16663 (i386_thread_added): New.
16664 (single_step): Rename to ...
16665 (i386_single_step): ... this.
16666 (do_fetch_inferior_registers): Rename to ...
16667 (i386_fetch_inferior_register): ... this.
16668 (i386_store_inferior_register): New.
16669 (the_low_target): Adapt to new interface.
16670
16671 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
16672 (arm_get_thread_context): New.
16673 (arm_set_thread_context): New.
16674 (regptr): New.
16675 (do_fetch_inferior_registers): Rename to ...
16676 (arm_fetch_inferior_register): ... this.
16677 (arm_store_inferior_register): New.
16678 (arm_wince_breakpoint): Reimplement as unsigned long.
16679 (arm_wince_breakpoint_len): Define.
16680 (the_low_target): Adapt to new interface.
16681
16682 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
16683 load_debug_registers. Add get_thread_context, set_thread_context,
16684 thread_added and store_inferior_register. Rename
16685 fetch_inferior_registers to fetch_inferior_register.
16686 (regptr): Remove declaration.
16687
dd6953e1
PA
166882007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16689
16690 * linux-low.c (linux_detach): Change return type to int. Return 0.
16691 * spu-low.c (spu_detach): Likewise.
16692
444d6139
PA
166932007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16694
16695 * target.h (target_ops): Change return type of detach to int.
16696 Add join.
16697 (join_inferior): New.
16698 * server.c (main): Don't skip detach support on mingw32.
16699 If the inferior doesn't support detaching return error.
16700 Call join_inferior instead of using waitpid.
16701 * linux-low.c (linux_join): New.
16702 (linux_target_op): Add linux_join.
16703 * spu-low.c (spu_join): New.
16704 (spu_target_ops): Add spu_join.
16705 * win32-low.c (win32_detach): Adapt to new interface.
16706 Reopen current_process_handle before detaching. Issue a child
16707 resume before detaching.
16708 (win32_join): New.
16709 (win32_target_op): Add win32_join.
16710
1d5315fe
PA
167112007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16712
16713 * win32-low.c (win32-attach): Fix return value.
16714 * target.h (target_ops): Describe ATTACH return values.
16715
bf914831
PA
167162007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16717
16718 * win32-low.c (GETPROCADDRESS): Define.
16719 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
16720 (winapi_DebugSetProcessKillOnExit): Likewise.
16721 (win32_create_inferior): Force usage of ansi CreateProcessA.
16722 (win32_attach): Use GETPROCADDRESS.
16723 (win32_detach): Likewise.
16724
f72f3e60
PA
167252007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16726
16727 * win32-low.c (win32_wait): Don't use WSTOPSIG.
16728
ed50f18f
PA
167292007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
16730
16731 * win32-low.c: Commit leftover changes from 2007-03-29.
16732
0c2ead7e
DJ
167332007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
16734
16735 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
16736 fields short instead of int. Add explicit padding.
16737 (i387_cache_to_fsave): Remove unnecessary casts.
16738 (i387_fsave_to_cache): Doc fix.
16739 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
16740
73725ff3
DJ
167412007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
16742
16743 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
16744 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
16745
d99f33d8
PA
167462007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
16747
16748 * configure.srv (arm*-*-mingw32ce*): Move near the other
16749 arm targets.
16750
68070c10
PA
167512007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
16752
2482afc6 16753 * configure.ac: Add errno checking.
68070c10
PA
16754 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
16755 sys/file.h and malloc.h.
16756 (AC_CHECK_DECLS): Add perror.
16757 (srv_mingwce): Handle.
2482afc6 16758 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
16759 win32-i386-low.o to srv_tgtobj.
16760 (i[34567]86-*-mingw*): Likewise.
16761 (arm*-*-mingw32ce*): Add case.
16762 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
16763 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
16764 [__MINGW32CE__] (strerror): New function.
16765 [__MINGW32CE__] (errno): Define to GetLastError.
16766 [__MINGW32CE__] (COUNTOF): New macro.
16767 (remote_open): Remove extra close call.
16768 * mem-break.c (delete_breakpoint_at): New function.
16769 * mem-break.h (delete_breakpoint_at): Declare.
16770 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
16771 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
16772 [USE_WIN32API] (read, write): Add char* casts.
16773 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
16774 * server.h: Include wincecompat.h on Windows CE.
16775 [HAVE_ERRNO_H]: Check.
16776 (perror): Declare if not declared.
16777 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
16778 (perror_with_name): Remove errno declaration.
16779 * wincecompat.h: New.
16780 * wincecompat.c: New.
16781 * win32-low.h: New.
16782 * win32-arm-low.c: New.
16783 * win32-i386-low.c: New.
16784 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
16785 (OUTMSG2): Make it safe.
16786 (_T): New macro.
16787 (COUNTOF): New macro.
16788 (NUM_REGS): Get it from the low target.
16789 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
16790 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
16791 (thread_rec): Let low target handle debug registers.
16792 (child_add_thread): Likewise.
16793 (child_init_thread_list): Likewise.
16794 (continue_one_thread): Likewise.
16795 (regptr): New.
16796 (do_child_fetch_inferior_registers): Move to ...
16797 * win32-i386-low.c: ... here, and rename to ...
16798 (do_fetch_inferior_registers): ... this.
889bf7c5 16799 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
16800 Go through the low target.
16801 (do_child_store_inferior_registers): Use regptr.
16802 (strwinerror): New function.
16803 (win32_create_inferior): Handle Windows CE.
16804 Use strwinerror instead of strerror on Windows error
16805 codes. Add program to the error output.
16806 Don't close the main thread handle on Windows CE.
16807 (win32_attach): Use coredll.dll on Windows CE.
16808 (win32_kill): Close current process and current
16809 thread handles.
16810 (win32_detach): Use coredll.dll on Windows CE.
16811 (win32_resume): Let low target handle debug registers, and
16812 step request.
16813 (handle_exception): Add/Remove initial breakpoint. Avoid
16814 non-existant WSTOPSIG on Windows CE.
16815 (win32_read_inferior_memory): Cast to remove warning.
16816 (win32_arch_string): Go through the low target.
16817 (initialize_low): Call set_breakpoint_data with the low
16818 target's breakpoint.
16819 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
16820 FOP_REGNUM, mappings): Move to ...
16821 * win32-i386-low.c: ... here.
16822 * win32-low.c (win32_thread_info): Move to ...
16823 * win32-low.h: ... here.
16824 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
16825 win32-arm-low.c and wincecompat.c.
16826 (all:): Add $EXEEXT.
16827 (install-only:): Likewise.
16828 (gdbserver:): Likewise.
16829 (gdbreplay:): Likewise.
16830 * config.in: Regenerate.
16831 * configure: Regenerate.
16832
41093d81
PA
168332007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
16834
16835 * win32-low.c: Rename typedef thread_info to
16836 win32_thread_info throughout.
16837
544afa54
PA
168382007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
16839
16840 * win32-i386-low.c: Rename to ...
16841 * win32-low.c: ... this.
16842 * configure.srv: Replace win32-i386-low.o with win32-low.o.
16843 * Makefile.in: Likewise.
16844
bce7165d
PA
168452007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
16846
16847 * remote-utils.c (monitor_output): Constify msg parameter.
16848 * server.h (monitor_output): Likewise.
16849 * win32-i386-low.c (handle_output_debug_string): New.
16850 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
16851 handle_output_debug_string.
16852 (get_child_debug_event): Likewise.
16853
506c7aa0
DJ
168542007-03-27 Mat Hostetter <mat@lcs.mit.edu>
16855
16856 * server.c (main): Correct strtoul check.
16857
42c81e2a
DJ
168582007-03-27 Jon Ringle <jon@ringle.org>
16859
16860 * linux-low.c: Check __ARCH_HAS_MMU__ also.
16861
9453113a
DJ
168622007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
16863
16864 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
16865
64a69107
DJ
168662007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
16867
16868 * terminal.h: Check HAVE_SGTTY_H.
16869
168702007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
16871
16872 * remote-utils.c (remote_open): Print out the assigned port number.
16873
c74d0ad8
DJ
168742007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
16875
16876 * remote-utils.c (monitor_output): New function.
16877 * server.c (debug_threads): Define here.
16878 (monitor_show_help): New function.
16879 (handle_query): Handle qRcmd.
16880 (main): Do not handle 'd' packet.
16881 * server.h (debug_threads, remote_debug, monitor_output): Declare.
16882 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
16883 of debug_threads.
16884
de7c3b4a
PA
168852007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
16886
16887 * Makefile.in (EXEEXT): New.
16888 (clean): Use $(EXEEXT).
16889
ef57601b
PA
168902007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
16891
16892 * target.h (target_ops): Rename send_signal to request_interrupt,
16893 and remove enum target_signal parameter.
16894 * linux-low.c (linux_request_interrupt): Rename from
16895 linux_send_signal, and always send SIGINT.
16896 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
16897 and always send SIGINT.
16898 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
16899 of send_signal.
16900 (input_interrupt): Likewise.
16901
820f2bda
PA
169022007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
16903
16904 * server.c (get_features_xml): Check if target implemented
16905 arch_string.
16906 * win32-i386-low.c (win32_arch_string): New.
16907 (win32_target_ops): Add win32_arch_string as arch_string member.
16908
ab39bf24
UW
169092007-02-22 Markus Deuling <deuling@de.ibm.com>
16910
16911 * spu-low.c (spu_arch_string): New.
16912 (spu_target_ops): Add spu_arch_string.
16913
61ff6e04
DJ
169142007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
16915
16916 * remote-utils.c: Remove HAVE_TERMINAL_H check.
16917 * configure.ac: Do not check for terminal.h.
16918 * configure, config.in: Regenerated.
16919
fb1e4ffc
DJ
169202007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
16921
16922 * Makefile.in (OBS): Add $(XML_BUILTIN).
16923 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
16924 (clean): Update.
16925 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
16926 (arm-with-iwmmxt.c): New.
16927 * config.in, configure: Regenerate.
16928 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
16929 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
16930 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
16931 (arm*-*-linux*): Add iWMMXt and regset support.
16932 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
16933 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
16934 (arm_store_wmmxregset, target_regsets): New.
16935 * server.c (get_features_xml): Take annex argument. Check builtin
16936 XML documents.
16937 (handle_query): Handle multiple annexes.
16938
0f48aa01
DJ
169392007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
16940
16941 * remote-utils.c [USE_WIN32API] (read, write): Define.
16942 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
16943 write.
16944
23181151
DJ
169452007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
16946
16947 * linux-i386-low.c (the_low_target): Set arch_string.
16948 * linux-x86-64-low.c (the_low_target): Likewise.
16949 * linux-low.c (linux_arch_string): New.
16950 (linux_target_ops): Add it.
16951 * linux-low.h (struct linux_target_ops): Add arch_string.
16952 * server.c (write_qxfer_response): Use const void * for DATA.
16953 (get_features_xml): New.
16954 (handle_query): Handle qXfer:features:read. Report it for qSupported.
16955 * target.h (struct target_ops): Add arch_string method.
16956
9d606399
DJ
169572007-01-03 Denis Pilat <denis.pilat@st.com>
16958 Daniel Jacobowitz <dan@codesourcery.com>
16959
16960 * linux-low.c (linux_kill): Handle being called with no threads.
16961 * win32-i386-low.c (win32_kill): Likewise.
16962 (get_child_debug_event): Clear current_process_handle.
16963
169642006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
16965 Daniel Jacobowitz <dan@codesourcery.com>
16966
16967 * remote-utils.c (remote_open): Check the type of specified
16968 serial port devices before opening them.
16969 * server.c (main): Kill the inferior if an error occurs during
16970 the first remote_open.
16971
a5e13d24
DJ
169722006-12-05 Markus Deuling <deuling@de.ibm.com>
16973
16974 * README: Update supported targets.
16975
186947f7
DJ
169762006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
16977
16978 * Makefile.in (clean): Remove reg-mips64.c.
16979 (reg-mips64.c, reg-mips64.o): New rules.
16980 * configure.srv: Handle mips64. Include regset support for mips.
16981 * linux-mips-low.c (union mips_register): New.
16982 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
16983 (mips_breakpoint, mips_breakpoint_at): Use int.
16984 (mips_collect_register, mips_supply_register)
16985 (mips_collect_register_32bit, mips_supply_register_32bit)
16986 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
16987 (mips_store_fpregset, target_regsets): New.
16988 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
16989
a13e2c95
UW
169902006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
16991
16992 * configure.srv: Add target "spu*-*-*".
16993 * Makefile.in (clean): Remove reg-spu.c.
16994 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
16995 * spu-low.c: New file.
16996
cb7283db
DJ
169972006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
16998
16999 * configure.ac: Correct td_thr_tls_get_addr test.
17000 * configure: Regenerated.
17001
89be2091
DJ
170022006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
17003
17004 * linux-low.c (linux_wait_for_event): Reformat. Use the
17005 pass_signals array.
17006 * remote-utils.c (decode_address_to_semicolon): New.
17007 * server.c (pass_signals, handle_general_set): New.
17008 (handle_query): Mention QPassSignals for qSupported.
17009 (main): Call handle_general_set.
17010 * server.h (pass_signals, decode_address_to_semicolon): New.
17011
000ef4f0
DJ
170122006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
17013
17014 * server.c (handle_query): Correct error handling for read_auxv.
17015
b7149293
UW
170162005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
17017
17018 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
17019 and srv_linux_thread_db to yes.
17020 * linux-s390-low.c (s390_fill_gregset): New function.
17021 (target_regsets): Define data structure.
17022
dae5f5cf
DJ
170232006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
17024
17025 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
17026 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
17027 * config.in, configure: Regenerated.
17028 * inferiors.c (gdb_id_to_thread): New function.
17029 (gdb_id_to_thread_id): Use it.
17030 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
17031 * linux-low.h (struct process_info): Add th member.
17032 (thread_db_get_tls_address): New prototype.
17033 * remote-utils.c (decode_address): Make non-static.
17034 * server.c (handle_query): Handle qGetTLSAddr.
17035 * server.h (gdb_id_to_thread, decode_address): New prototypes.
17036 * target.h (struct target_ops): Add get_tls_address.
17037 * thread-db.c (maybe_attach_thread): Save the thread handle.
17038 (thread_db_get_tls_address): New.
17039
32ca6d61
DJ
170402006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
17041
17042 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
17043 (linux_resume_one_process): Take a siginfo_t *. Update all
17044 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
17045 (struct pending_signals): Add a siginfo_t.
17046 (linux_wait_for_process): Always set last_status.
17047 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
17048 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
17049 * linux-low.h (struct process_info): Add last_status.
17050
5ffff7c1
DJ
170512006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
17052
17053 * remote-utils.c (try_rle): New function.
17054 (putpkt_binary): Use it.
17055
8695c747
DJ
170562006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
17057
17058 * Makefile.in (clean): Clean reg-x86-64-linux.c.
17059 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
17060 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
17061 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
17062 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
17063 point registers.
17064
290fadea
RS
170652006-08-08 Richard Sandiford <richard@codesourcery.com>
17066
17067 * server.c (terminal_fd): New variable.
17068 (old_foreground_pgrp): Likewise.
17069 (restore_old_foreground_pgrp): New function.
17070 (start_inferior): Record the terminal file descriptor in terminal_fd
17071 and its original foreground group in old_foreground_pgrp. Register
17072 restore_old_foreground_pgrp with atexit().
17073
9f2e1e63
DJ
170742006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
17075
17076 * server.c (handle_query): Correct qPart to qXfer.
17077
b80864fb
DJ
170782006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
17079
17080 * configure.ac: Check for more headers which are missing on
17081 Windows. Automatically supply -lwsock32 and USE_WIN32API.
17082 * configure.srv: Add Cygwin and mingw32.
17083 * remote-utils.c: Don't include headers unconditionally which
17084 are missing on mingw32. Include <winsock.h> for mingw32.
17085 (remote_open): Adjust for mingw32 support. Flush
17086 standard error after writing to it.
17087 (remote_close, putpkt_binary, input_interrupt, block_async_io)
17088 (unblock_async_io, enable_async_io, disable_async_io)
17089 (readchar, getpkt): Update for Winsock support.
17090 (prepare_resume_reply): Expect a protocol signal number.
17091 * server.c: Disable <sys/wait.h> on mingw32.
17092 (start_inferior): Adjust for mingw32 support. Flush
17093 standard error after writing to it.
17094 (attach_inferior): Likewise. Use protocol signal
17095 numbers.
17096 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
17097 and names.
17098 * win32-i386-low.c: New file.
17099 * Makefile.in (XM_CLIBS): Set.
17100 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
17101 (win32-i386-low.o): New dependency rule.
17102 * linux-low.c (linux_wait): Use target signal numbers.
17103 * target.h (struct target_ops): Doc fix.
17104 * server.h (target_signal_to_name): New prototype.
17105 * gdbreplay.c: Don't include headers unconditionally which
17106 are missing on mingw32. Include <winsock.h> for mingw32.
17107 (remote_close, remote_open): Adjust for Winsock support.
17108 * configure, config.in: Regenerated.
17109
0876f84a
DJ
171102006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
17111
17112 * server.c (decode_xfer_read, write_qxfer_response): New.
17113 (handle_query): Take a packet length argument. Handle
17114 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
17115 the qSupported response.
17116 (main): Update call to handle_query.
17117
01f9e8fa
DJ
171182006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
17119
17120 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
17121 (putpkt_binary): Renamed from putpkt and adjusted for binary
17122 data.
17123 (putpkt): New wrapper for putpkt_binary.
17124 (readchar): Don't mask off the high bit.
17125 (decode_X_packet): New function.
17126 * server.c (main): Call putpkt_binary if a handler sets the packet
17127 length. Save the length of the incoming packet. Handle 'X'.
17128 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
17129
be2a5f71
DJ
171302006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
17131
17132 * server.c (handle_query): Handle qSupported.
17133
ea025f5f
DJ
171342006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
17135
17136 * remote-utils.c (all_symbols_looked_up): New variable.
17137 (look_up_one_symbol): Check it.
17138 * server.h (look_up_one_symbol): New declaration.
17139 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
17140
9308fc88
DJ
171412006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
17142
17143 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 17144 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
17145 (PTRACE_GET_THREAD_AREA): Define.
17146 (ps_get_thread_area): New function.
17147
52fb6437
NS
171482006-05-09 Nathan Sidwell <nathan@codesourcery.com>
17149
17150 * configure.srv (m68k*-*-uclinux*): New target.
17151 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
17152 (linux_resume_one_process): Remove extraneous cast.
17153 (linux_read_offsets): New.
17154 (linux_target_op): Add linux_read_offsets on mmuless systems.
17155 * server.c (handle_query): Add qOffsets logic.
17156 * target.h (struct target_ops): Add read_offsets.
17157
21b0f40c
DJ
171582006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
17159
17160 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
17161 (PTRACE_GET_THREAD_AREA): Define.
17162 (ps_get_thread_area): New function.
17163 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
17164 (linux-x86-64-low.o): Update.
17165
0050a760
DJ
171662006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
17167
17168 * configure.ac: Remove checks for prfpregset_t.
17169 * gdb_proc_service.h: New file.
17170 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
17171 new "gdb_proc_service.h".
17172 * proc-service.c: Likewise.
17173 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
17174 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
17175 * Makefile.in (gdb_proc_service_h): Updated.
17176 * configure, config.in: Regenerated.
17177
b92a518e
DJ
171782006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
17179
17180 * remote-utils.c (prepare_resume_reply): Move declaration
17181 of gdb_id_from_wait to the top of the block.
17182
545587ee
DJ
171832006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
17184
17185 * linux-low.c (regsets_store_inferior_registers): Read the regset
17186 from the target before filling it.
17187
9db87ebd
DJ
171882006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
17189
17190 * server.c (attach_inferior): Return SIGTRAP for a successful
17191 attach.
17192
dd24457d
DJ
171932006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
17194
17195 * Makefile.in (OBS): Add version.o.
17196 (STAGESTUFF): Delete.
17197 (version.o): Add dependencies.
17198 (version.c): Replace rule.
17199 (clean): Remove version.c.
17200 * server.c (gdbserver_version): New.
17201 (gdbserver_usage): Use printf.
17202 (main): Handle --version and --help.
17203 * server.h (version, host_name): Add declarations.
17204
6f0f660e
EZ
172052005-12-23 Eli Zaretskii <eliz@gnu.org>
17206
889bf7c5
PA
17207 * linux-arm-low.c:
17208 * linux-arm-low.c:
17209 * inferiors.c:
17210 * i387-fp.h:
17211 * i387-fp.c:
17212 * gdbreplay.c:
17213 * regcache.c:
17214 * proc-service.c:
17215 * mem-break.h:
17216 * mem-break.c:
17217 * linux-x86-64-low.c:
17218 * linux-sh-low.c:
17219 * linux-s390-low.c:
17220 * linux-ppc64-low.c:
17221 * linux-ppc-low.c:
17222 * linux-mips-low.c:
17223 * linux-m68k-low.c:
17224 * linux-m32r-low.c:
17225 * linux-low.h:
17226 * linux-low.c:
17227 * linux-ia64-low.c:
17228 * linux-i386-low.c:
17229 * linux-crisv32-low.c:
17230 * thread-db.c:
17231 * terminal.h:
17232 * target.h:
17233 * target.c:
17234 * server.h:
17235 * server.c:
17236 * remote-utils.c:
17237 * regcache.h:
17238 * utils.c:
17239 * Makefile.in:
17240 * configure.ac:
6f0f660e
EZ
17241 * gdbserver.1: Add (C) after Copyright. Update the FSF
17242 address.
17243
9d1fb177
DJ
172442005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
17245
17246 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
17247 (arm_breakpoint_at): Recognize both breakpoints.
17248 (the_low_target): Use the correct breakpoint instruction.
17249
011a70c2
DJ
172502005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
17251
17252 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
17253 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
17254 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
17255 (the_low_target): Update.
17256
7fb85e41
AS
172572005-10-25 Andreas Schwab <schwab@suse.de>
17258
17259 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
17260
17261 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
17262 (ia64_num_regs): Reduce to 462.
17263
3db0444b
DJ
172642005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
17265
17266 * acinclude.m4: Correct quoting.
17267 * aclocal.m4: Regenerated.
17268
17269 Suggested by SZOKOVACS Robert <szo@ies.hu>:
17270 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
17271 (thread_db_init): Call thread_db_err_str.
17272 * configure.ac: Check for TD_VERSION.
17273 * config.in, configure: Regenerated.
17274
bee0189a
DJ
172752005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
17276
17277 * server.h (error, fatal, warning): Add ATTR_FORMAT.
17278
e9d25b98
DJ
172792005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
17280
17281 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
17282 is not available. Define HAVE_PTRACE_GETREGS if it is.
17283 * config.in, configure: Regenerated.
17284 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
17285 * linux-i386-low.c, linux-m68k-low.c: Update to use
17286 HAVE_PTRACE_GETREGS.
17287 * linux-low.c (regsets_fetch_inferior_registers)
17288 (regsets_store_inferior_registers): Only return 0 if we processed
17289 GENERAL_REGS.
17290 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
17291 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
17292
a06660f7
DJ
172932005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
17294
17295 * inferiors.c (struct thread_info): Add gdb_id.
17296 (add_thread): Add gdb_id argument.
17297 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
17298 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
17299 calls to add_thread.
17300 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
17301 * server.c (handle_query): Use thread_to_gdb_id.
17302 (handle_v_cont, main): Use gdb_id_to_thread_id.
17303 * server.h (add_thread): Update prototype.
17304 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
17305 prototypes.
17306
5a1f5858
DJ
173072005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
17308
17309 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
17310 left-padded registers.
17311 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
17312 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
17313
e122f1f5
SE
173142005-07-01 Steve Ellcey <sje@cup.hp.com>
17315
17316 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
17317 * configure: Regenerate.
17318 * config.in: Regenerate.
17319 * server.h (NEED_DECLARATION_STRERROR):
17320 Replace with !HAVE_DECL_STRERROR.
17321
d592fa2f
DJ
173222005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
17323
17324 * linux-low.c (linux_wait, linux_send_signal): Don't test
17325 an unsigned long variable for > 0 if it could be MAX_ULONG.
17326 * server.c (myresume): Likewise.
17327 * target.c (set_desired_inferior): Likewise.
17328
ccbd4912
MK
173292005-06-13 Mark Kettenis <kettenis@gnu.org>
17330
17331 * configure.ac: Simplify and improve check for socklen_t.
17332 * configure, config.in: Regenerate.
17333
f450004a
DJ
173342005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
17335
17336 * acconfig.h: Remove.
17337 * configure.ac: Add a test for socklen_t. Use three-argument
17338 AC_DEFINE throughout.
17339 * config.in: Regenerated using autoheader 2.59.
17340 * configure: Regenerated.
17341
17342 * gdbreplay.c (socklen_t): Provide a default.
17343 (remote_open): Use socklen_t.
17344 * remote-utils.c (socklen_t): Provide a default.
17345 (remote_open): Use socklen_t.
17346 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
17347 unsigned char.
17348
17349 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
17350 char for buffers.
17351 * linux-low.c (linux_read_memory, linux_write_memory)
17352 (linux_read_auxv): Likewise.
17353 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
17354 (check_mem_write): Likewise.
17355 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
17356 Likewise.
17357 * regcache.c (struct inferior_rgcache_data, registers_to_string)
17358 (registers_from_string, register_data): Likewise.
17359 * server.c (handle_query, main): Likewise.
17360 * server.h (convert_ascii_to_int, convert_int_to_ascii)
17361 (decode_M_packet): Likewise.
17362 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
17363 * target.h (struct target_ops): Update read_memory, write_memory,
17364 and read_auxv.
17365 (read_inferior_memory, write_inferior_memory): Update.
17366 * linux-low.h (struct linux_target_ops): Change type of breakpoint
17367 to unsigned char *.
17368 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
17369 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
17370 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
17371 linux-s390-low.c, linux-sh-low.c: Update for changes in
17372 read_inferior_memory and the_low_target->breakpoint.
17373
eee84df1
DJ
173742005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
17375
17376 * Makefile.in (SFILES): Add linux-ppc64-low.c.
17377 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
17378 * configure.srv: Add powerpc64-*-linux*.
17379 * linux-ppc64-low.c: New file.
17380
45b134e5
OF
173812005-05-23 Orjan Friberg <orjanf@axis.com>
17382
17383 * linux-cris-low.c: New file with support for CRIS.
17384 * linux-crisv32-low.c: Ditto for CRISv32.
17385 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
17386 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 17387 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
17388 reg-crisv32.o, and reg-crisv32.c to make rules.
17389 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
17390 recognized targets.
17391
48d93c75
UW
173922005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
17393
17394 * linux-low.c (fetch_register): Ensure buffer size is a multiple
17395 of sizeof (PTRACE_XFER_TYPE).
17396 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
17397
e013ee27
OF
173982005-05-12 Orjan Friberg <orjanf@axis.com>
17399
889bf7c5 17400 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
17401 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
17402 pointers for hardware watchpoint support.
17403 * linux-low.h (struct linux_target_ops): Ditto.
17404 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
17405 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
17406 to linux_target_ops.
17407 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
17408 reply packet.
17409 * server.c (main): Recognize 'Z' and 'z' packets.
17410
b0ded00b
UW
174112005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
17412
17413 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
17414 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
17415 (the_low_target): Add new members.
17416
8643e2ad
DJ
174172005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
17418
17419 * proc-service.c (ps_lgetregs): Search all_processes instead of
17420 all_threads.
17421
fc620387
DJ
174222005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
17423
17424 * server.c (start_inferior): Change return type to int.
17425 (attach_inferior): Change sigptr to int *.
17426 (handle_v_cont, handle_v_requests): Change signal to int *.
17427 (main): Change signal to int.
17428
174292005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
17430
17431 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
17432 * configure.srv: Add m32r*-*-linux*.
17433 * linux-m32r-low.c: New file.
17434
e0e76420
DJ
174352005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
17436
17437 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
17438
a1928bad
DJ
174392005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
17440
17441 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
17442 Take unsigned long arguments for PIDs.
17443 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
17444 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
17445 (wait_for_sigstop, linux_resume_one_process)
17446 (regsets_fetch_inferior_registers, linux_send_signal)
17447 (linux_read_auxv): Likewise. Update the types of variables holding
17448 PIDs. Update format string specifiers.
17449 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
17450 * remote-utils.c (prepare_resume_reply): Likewise.
17451 * server.c (cont_thread, general_thread, step_thread)
17452 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
17453 unsigned long.
17454 (handle_query): Update format specifiers.
17455 (handle_v_cont, main): Use strtoul for thread IDs.
17456 * server.h (struct inferior_list_entry): Use unsigned long for ID.
17457 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
17458 (general_thread, step_thread, thread_from_wait)
17459 (old_thread_from_wait): Update.
17460 * target.h (struct thread_resume): Use unsigned long for THREAD.
17461 (struct target_ops): Use unsigned long for arguments to attach and
17462 thread_alive.
17463
dcdb98d2
DJ
174642005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
17465
17466 * acinclude.m4: Include bfd/bfd.m4 directly.
17467 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
17468 <agriffis@toolchain.org>.
17469 * aclocal.m4, configure: Regenerated.
17470
bec39cab
AC
174712005-01-07 Andrew Cagney <cagney@gnu.org>
17472
17473 * configure.ac: Rename configure.in, require autoconf 2.59.
17474 * configure: Re-generate.
17475
434c4c77
DJ
174762004-12-08 Daniel Jacobowitz <dan@debian.org>
17477
17478 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
17479 LIBS when finished.
17480 * aclocal.m4: Regenerated.
17481 * configure: Regenerated.
17482
db1d3e1b
AS
174832004-11-21 Andreas Schwab <schwab@suse.de>
17484
17485 * linux-m68k-low.c (m68k_num_gregs): Define.
17486 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
17487 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
17488 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
17489 (m68k_breakpoint_at): New. Add to the_low_target.
17490
17491 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
17492 srv_linux_thread_db to yes.
17493
43360365
JB
174942004-10-20 Joel Brobecker <brobecker@gnat.com>
17495
17496 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
17497 (ARCH_SET_FS): Likewise.
17498 (ARCH_GET_FS): Likewise.
17499 (ARCH_GET_GS): Likewise.
17500
fd500816
DJ
175012004-10-16 Daniel Jacobowitz <dan@debian.org>
17502
17503 * linux-i386-low.c (ps_get_thread_area): New.
17504 * linux-x86-64-low.c (ps_get_thread_area): New.
17505 * linux-low.c: Include <sys/syscall.h>.
17506 (linux_kill_one_process): Don't kill the first thread here.
17507 (linux_kill): Kill the first thread here.
17508 (kill_lwp): New function.
17509 (send_sigstop, linux_send_signal): Use it.
17510 * proc-service.c: Clean up #ifdefs.
17511 (fpregset_info): Delete.
17512 (ps_lgetregs): Update and enable implementation.
17513 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
17514 implementations.
17515 * remote-utils.c (struct sym_cache, symbol_cache): New.
17516 (input_interrupt): Print a clearer message.
17517 (async_io_enabled): New variable.
17518 (enable_async_io, disable_async_io): Use it. Update comments.
17519 (look_up_one_symbol): Use the symbol cache.
17520 * thread-db.c (thread_db_look_up_symbols): New function.
17521 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
17522
f6de3c42
DJ
175232004-10-16 Daniel Jacobowitz <dan@debian.org>
17524
17525 * configure.in: Test for -rdynamic.
17526 * configure: Regenerated.
17527 * Makefile (INTERNAL_LDFLAGS): New.
17528 (gdbserver, gdbreplay): Use it.
17529
2c0fc042
AC
175302004-09-02 Andrew Cagney <cagney@gnu.org>
17531
17532 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
17533
075b3282
DJ
175342004-03-23 Daniel Jacobowitz <drow@mvista.com>
17535
17536 * linux-low.c (linux_wait): Clear all_processes list also.
17537
fa6a77dc
DJ
175382004-03-12 Daniel Jacobowitz <drow@mvista.com>
17539
17540 * linux-low.c: Include <errno.h>. Remove extern declaration of
17541 errno.
17542
6d782a97
DJ
175432004-03-12 Daniel Jacobowitz <drow@mvista.com>
17544
17545 * gdbreplay.c, server.h, utils.c: Update copyright years.
17546
3a7fb99b
DJ
175472004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
17548
17549 * server.c (main): Print child status or termination signal from
17550 variable 'signal', not 'sig'.
17551
c3e735a6
DJ
175522004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
17553
17554 * linux-low.c (linux_read_memory): Change return type to
17555 int. Check for and return error from ptrace().
17556 * target.c (read_inferior_memory): Change return type to int. Pass
17557 back return status from the_target->read_memory().
17558 * target.h (struct target_ops): Adapt *read_memory() prototype.
17559 Update comment.
17560 (read_inferior_memory): Adapt prototype.
17561 * server.c (main): Return an error packet if
17562 read_inferior_memory() returns an error.
17563
a59d1c82
DJ
175642004-03-04 Daniel Jacobowitz <drow@mvista.com>
17565
17566 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
17567 Unify with other clean targets.
17568
dc3f8883
DJ
175692004-02-29 Daniel Jacobowitz <drow@mvista.com>
17570
17571 * server.c (handle_v_cont): Call set_desired_inferior.
17572
89a208da
DJ
175732004-02-29 Daniel Jacobowitz <drow@mvista.com>
17574
17575 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
17576
62ea82f5
DJ
175772004-02-29 Daniel Jacobowitz <drow@mvista.com>
17578
17579 * linux-low.c (linux_wait): Unblock async I/O.
17580 (linux_resume): Block and enable async I/O.
17581 * remote-utils.c (block_async_io, unblock_async_io): New functions.
17582 * server.h (block_async_io, unblock_async_io): Add prototypes.
17583
6910d122
DJ
175842004-02-29 Daniel Jacobowitz <drow@mvista.com>
17585
17586 * remote-utils.c (remote_open): Print a status notice after
17587 opening a TCP port.
17588 * server.c (attach_inferior): Print a status notice after
17589 attaching.
17590
175912004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
17592
17593 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
17594
c89dc5d4
DJ
175952004-02-26 Daniel Jacobowitz <drow@mvista.com>
17596
17597 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
17598 error packet.
17599 * server.c, target.h: Update copyright years.
17600
4b8dad4a
RM
176012004-02-25 Roland McGrath <roland@redhat.com>
17602
17603 * target.h (struct target_ops): New member `read_auxv'.
17604 * server.c (handle_query): Handle qPart:auxv:read: query using that.
17605 * linux-low.c (linux_read_auxv): New function.
17606 (linux_target_ops): Initialize `read_auxv' member to that.
17607
d7446758
JB
176082004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
17609
17610 Committed by Jim Blandy <jimb@redhat.com>.
17611
17612 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 17613 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
17614 instead of GPR_SIZE to distiguish s390 and s390x targets.
17615
5544ad89
DJ
176162004-01-31 Daniel Jacobowitz <drow@mvista.com>
17617
17618 * linux-low.c: Update copyright year.
17619 (check_removed_breakpoint): Clear pending_is_breakpoint.
17620 (linux_set_resume_request, linux_queue_one_thread)
17621 (resume_status_pending_p): New functions.
17622 (linux_continue_one_thread): Use process->resume.
17623 (linux_resume): Only resume threads if there are no pending events.
17624 * linux-low.h (struct process_info): Add resume request
17625 pointer.
17626
2a68b70e
DJ
176272004-01-30 Daniel Jacobowitz <drow@mvista.com>
17628
17629 * regcache.c (new_register_cache): Clear the allocated register
17630 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
17631
64386c31
DJ
176322003-10-13 Daniel Jacobowitz <drow@mvista.com>
17633
17634 * linux-low.c (linux_resume): Take a struct thread_resume *
17635 argument.
17636 (linux_wait): Update call.
17637 (resume_ptr): New static variable.
17638 (linux_continue_one_thread): Renamed from
17639 linux_continue_one_process. Use resume_ptr.
17640 (linux_resume): Use linux_continue_one_thread.
17641 * server.c (handle_v_cont, handle_v_requests): New functions.
17642 (myresume): New function.
17643 (main): Handle 'v' case.
17644 * target.h (struct thread_resume): New type.
17645 (struct target_ops): Change argument of "resume" to struct
17646 thread_resume *.
17647 (myresume): Delete macro.
17648
c938e9b0
L
176492003-08-08 H.J. Lu <hongjiu.lu@intel.com>
17650
17651 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
17652 (uninstall): Support DESTDIR.
17653
7f313d07
BC
17654Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
17655
17656 * configure.srv: Add xscale*linux copy of arm*linux entry.
17657
3b2fc2ea
DJ
176582003-07-24 Daniel Jacobowitz <drow@mvista.com>
17659
17660 * linux-arm-low.c (arm_reinsert_addr): New function.
17661 (the_low_target): Add arm_reinsert_addr.
17662
1c0a559e
MK
176632003-07-08 Mark Kettenis <kettenis@gnu.org>
17664
17665 * mem-break.c: Remove whitespace at end of file.
17666
43d5792c
DJ
176672003-06-28 Daniel Jacobowitz <drow@mvista.com>
17668
17669 * configure.in: Check whether we need to prototype strerror.
17670 * server.h: Optionally prototype strerror.
17671 * gdbreplay.c (perror_with_name): Use strerror.
17672 * linux-low.c (linux_attach_lwp): Use strerror.
17673 * utils.c (perror_with_name): Use strerror.
17674 * config.in, configure: Regenerated.
17675
c8a86edf
DJ
176762003-06-28 Daniel Jacobowitz <drow@mvista.com>
17677
17678 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
17679 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
17680
73d37363
DJ
176812003-06-20 Daniel Jacobowitz <drow@mvista.com>
17682
17683 * Makefile.in (SFILES): Update.
17684 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
17685 low-sun3.c: Remove files.
17686
6ad8ae5c
DJ
176872003-06-17 Daniel Jacobowitz <drow@mvista.com>
17688
17689 * linux-low.c: Move comment to linux_thread_alive where it belonged.
17690 (linux_detach_one_process, linux_detach): New functions.
17691 (linux_target_ops): Add linux_detach.
17692 * server.c (main): Handle 'D' packet.
17693 * target.h (struct target_ops): Add "detach" member.
17694 (detach_inferior): Define.
17695
1581182a
MK
176962003-06-13 Mark Kettenis <kettenis@gnu.org>
17697
17698 From Kelley Cook <kelleycook@wideopenwest.com>:
17699 * configure.srv: Accept i[34567]86 variants.
17700
e5379b03
DJ
177012003-06-05 Daniel Jacobowitz <drow@mvista.com>
17702
17703 * linux-low.c (linux_wait_for_event): Correct comment typos.
17704 (linux_resume_one_process): Call check_removed_breakpoint.
17705 (linux_send_signal): New function.
17706 (linux_target_ops): Add linux_send_signal.
17707 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
17708 of kill.
17709 * target.h (struct target_ops): Add send_signal.
17710
2ff29de4
JB
177112003-05-29 Jim Blandy <jimb@redhat.com>
17712
17713 * linux-low.c (usr_store_inferior_registers): Transfer buf in
17714 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
17715 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
17716 away part of the register's value.
17717
254787d4
DJ
177182003-03-26 Daniel Jacobowitz <drow@mvista.com>
17719
17720 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
17721 (linux_wait_for_event, linux_init_signals): Likewise.
17722
94e10508
DJ
177232003-03-17 Daniel Jacobowitz <drow@mvista.com>
17724
17725 * configure.in: Check for stdlib.h.
17726 * configure: Regenerated.
17727 * config.in: Regenerated.
17728
4c0711e0
DJ
177292003-01-04 Andreas Schwab <schwab@suse.de>
17730
17731 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
17732
ef66e766
AC
177332003-01-02 Andrew Cagney <ac131313@redhat.com>
17734
17735 * Makefile.in: Remove obsolete code.
17736
a1358604
DJ
177372002-11-20 Daniel Jacobowitz <drow@mvista.com>
17738
17739 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
17740 defined(PT_FPR0_HI).
17741
23ce3b1c
DJ
177422002-11-17 Stuart Hughes <seh@zee2.com>
17743
17744 * linux-arm-low.c (arm_num_regs): Increase.
17745 (arm_regmap): Include status register.
17746
177472002-11-17 Daniel Jacobowitz <drow@mvista.com>
17748
17749 * linux-low.c (register_addr): Remove incorrect -1 check.
17750
a9fa9f7d
DJ
177512002-08-29 Daniel Jacobowitz <drow@mvista.com>
17752
17753 * linux-low.c (linux_create_inferior): Call setpgid. Return
17754 the new PID.
17755 (unstopped_p, linux_signal_pid): Remove.
17756 (linux_target_ops): Remove linux_signal_pid.
17757 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
17758 global instead of target method.
17759 * target.h (struct target_ops): Remove signal_pid. Update comment
17760 for create_inferior.
17761 * server.c (signal_pid): New variable.
17762 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 17763 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
17764 (attach_inferior): Set signal_pid.
17765
17574093
DJ
177662002-08-23 Daniel Jacobowitz <drow@mvista.com>
17767
17768 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
17769
177702002-08-20 Jim Blandy <jimb@redhat.com>
17771
17772 * Makefile.in (LDFLAGS): Allow the configure script to establish a
17773 default for this.
17774
177752002-08-01 Andrew Cagney <cagney@redhat.com>
17776
17777 * Makefile.in: Make chill references obsolete.
17778
177792002-07-24 Kevin Buettner <kevinb@redhat.com>
17780
17781 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
17782 * configure: Regenerate.
17783 * config.in: Regenerate.
17784
177852002-07-09 David O'Brien <obrien@FreeBSD.org>
17786
17787 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
17788 (perror_with_name, remote_close, remote_open, expect, play): Static.
17789
177902002-07-04 Michal Ludvig <mludvig@suse.cz>
17791
4b8dad4a 17792 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
17793 byte offsets instead of an array of indexes.
17794 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
17795
177962002-06-13 Daniel Jacobowitz <drow@mvista.com>
17797
17798 * regcache.c: Add comment.
17799
178002002-06-11 Daniel Jacobowitz <drow@mvista.com>
17801
17802 * thread-db.c: New file.
17803 * proc-service.c: New file.
17804 * acinclude.m4: New file.
17805 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
17806 proc-service.o, and thread-db.o.
17807 (linux-low.o): Add USE_THREAD_DB.
17808 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
17809 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
17810 * aclocal.m4: Regenerated.
17811 * config.in: Regenerated.
17812 * configure: Regenerated.
17813 * configure.in: Check for proc_service.h, sys/procfs.h,
17814 thread_db.h, and linux/elf.h headrs.
17815 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
17816 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
17817 Check for -lthread_db and thread support.
17818 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
17819 PowerPC, and SuperH.
17820 * i387-fp.c: Constify arguments.
17821 * i387-fp.h: Likewise.
17822 * inferiors.c: (struct thread_info): Renamed from
17823 `struct inferior_info'. Remove PID member. Use generic inferior
17824 list header. All uses updated.
17825 (inferiors, signal_pid): Removed.
17826 (all_threads): New variable.
17827 (get_thread): Define.
17828 (add_inferior_to_list): New function.
17829 (for_each_inferior): New function.
17830 (change_inferior_id): New function.
17831 (add_inferior): Removed.
17832 (remove_inferior): New function.
17833 (add_thread): New function.
17834 (free_one_thread): New function.
17835 (remove_thread): New function.
17836 (clear_inferiors): Use for_each_inferior and free_one_thread.
17837 (find_inferior): New function.
17838 (find_inferior_id): New function.
17839 (inferior_target_data): Update argument type.
17840 (set_inferior_target_data): Likewise.
17841 (inferior_regcache_data): Likewise.
17842 (set_inferior_regcache_data): Likewise.
17843 * linux-low.c (linux_bp_reinsert): Remove.
17844 (all_processes, stopping_threads, using_thrads)
17845 (struct pending_signals, debug_threads, pid_of): New.
17846 (inferior_pid): Replace with macro.
17847 (struct inferior_linux_data): Remove.
17848 (get_stop_pc, add_process): New functions.
17849 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
17850 Use add_process and add_thread.
17851 (linux_attach_lwp): New function, based on old linux_attach. Use
17852 add_process and add_thread. Set stop_expected for new threads.
17853 (linux_attach): New function.
17854 (linux_kill_one_process): New function.
17855 (linux_kill): Kill all LWPs.
17856 (linux_thread_alive): Use find_inferior_id.
17857 (check_removed_breakpoints, status_pending_p): New functions.
17858 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
17859 Update. Use WNOHANG. Wait for cloned processes also. Update process
17860 struct for the found process.
17861 (linux_wait_for_event): New function.
17862 (linux_wait): Use it. Support LWPs.
17863 (send_sigstop, wait_for_sigstop, stop_all_processes)
17864 (linux_resume_one_process, linux_continue_one_process): New functions.
17865 (linux_resume): Support LWPs.
17866 (REGISTER_RAW_SIZE): Remove.
17867 (fetch_register): Use register_size instead. Call supply_register.
17868 (usr_store_inferior_registers): Likewise. Call collect_register.
17869 Fix recursive case.
17870 (regsets_fetch_inferior_registers): Improve error message.
17871 (regsets_store_inferior_registers): Add debugging.
17872 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
17873 (unstopped_p, linux_signal_pid): New functions.
17874 (linux_target_ops): Add linux_signal_pid.
17875 (linux_init_signals): New function.
17876 (initialize_low): Call it. Initialize using_threads.
17877 * regcache.c (inferior_regcache_data): Add valid
17878 flag.
17879 (get_regcache): Fetch registers lazily. Add fetch argument
17880 and update all callers.
17881 (regcache_invalidate_one, regcache_invalidate): New
17882 functions.
17883 (new_register_cache): Renamed from create_register_cache.
17884 Return the new regcache.
17885 (free_register_cache): Change argument to a void *.
17886 (registers_to_string, registers_from_string): Call get_regcache
17887 with fetch flag set.
17888 (register_data): Make static. Pass fetch flag to get_regcache.
17889 (supply_register): Call get_regcache with fetch flag clear.
17890 (collect_register): Call get_regcache with fetch flag set.
17891 (collect_register_as_string): New function.
17892 * regcache.h: Update.
17893 * remote-utils.c (putpkt): Flush after debug output and use
17894 stderr.
17895 Handle input interrupts while waiting for an ACK.
17896 (input_interrupt): Use signal_pid method.
17897 (getpkt): Flush after debug output and use stderr.
17898 (outreg): Use collect_register_as_string.
17899 (new_thread_notify, dead_thread_notify): New functions.
17900 (prepare_resume_reply): Check using_threads. Set thread_from_wait
17901 and general_thread.
17902 (look_up_one_symbol): Flush after debug output.
17903 * server.c (step_thread, server_waiting): New variables.
17904 (start_inferior): Don't use signal_pid. Update call to mywait.
17905 (attach_inferior): Update call to mywait.
17906 (handle_query): Handle qfThreadInfo and qsThreadInfo.
17907 (main): Don't fetch/store registers explicitly. Use
17908 set_desired_inferior. Support proposed ``Hs'' packet. Update
17909 calls to mywait.
17910 * server.h: Update.
17911 (struct inferior_list, struct_inferior_list_entry): New.
17912 * target.c (set_desired_inferior): New.
17913 (write_inferior_memory): Constify.
17914 (mywait): New function.
17915 * target.h: Update.
17916 (struct target_ops): New signal_pid method.
17917 (mywait): Removed macro, added prototype.
17918
17919 * linux-low.h (regset_func): Removed.
17920 (regset_fill_func, regset_store_func): New.
17921 (enum regset_type): New.
17922 (struct regset_info): Add type field. Use new operation types.
17923 (struct linux_target_ops): stop_pc renamed to get_pc.
17924 Add decr_pc_after_break and breakpoint_at.
17925 (get_process, get_thread_proess, get_process_thread)
17926 (strut process_info, all_processes, linux_attach_lwp)
17927 (thread_db_init): New.
17928
17929 * linux-arm-low.c (arm_get_pc, arm_set_pc,
17930 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
17931 (the_low_target): Add new members.
17932 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
17933 (i386_store_fpxregset): Constify.
17934 (target_regsets): Add new kind identifier.
17935 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
17936 (i386_set_pc): Add debugging.
17937 (i386_breakpoint_at): New function.
17938 (the_low_target): Add new members.
17939 * linux-mips-low.c (mips_get_pc, mips_set_pc)
17940 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
17941 (mips_breakpoint_at): New.
17942 (the_low_target): Add new members.
17943 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
17944 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
17945 (the_low_target): Add new members.
17946 * linux-sh-low.c (sh_get_pc, sh_set_pc)
17947 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
17948 (the_low_target): Add new members.
17949 * linux-x86-64-low.c (target_regsets): Add new kind
17950 identifier.
17951
179522002-05-15 Daniel Jacobowitz <drow@mvista.com>
17953
17954 From Martin Pool <mbp@samba.org>:
17955 * server.c (gdbserver_usage): New function.
17956 (main): Call it.
17957
179582002-05-14 Daniel Jacobowitz <drow@mvista.com>
17959
17960 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
17961 stop_at -> stop_pc.
17962
179632002-05-04 Andrew Cagney <ac131313@redhat.com>
17964
17965 * Makefile.in: Remove obsolete code.
17966
179672002-04-24 Michal Ludvig <mludvig@suse.cz>
17968
17969 * linux-low.c (regsets_fetch_inferior_registers),
17970 (regsets_store_inferior_registers): Removed cast to int from
17971 ptrace() calls.
17972 * regcache.h: Added declaration of struct inferior_info.
17973
179742002-04-20 Daniel Jacobowitz <drow@mvista.com>
17975
17976 * inferiors.c (struct inferior_info): Add regcache_data.
17977 (add_inferior): Call create_register_cache.
17978 (clear_inferiors): Call free_register_cache.
17979 (inferior_regcache_data, set_inferior_regcache_data): New functions.
17980 * regcache.c (struct inferior_regcache_data): New.
17981 (registers): Remove.
17982 (get_regcache): New function.
17983 (create_register_cache, free_register_cache): New functions.
17984 (set_register_cache): Don't initialize the register cache here.
17985 (registers_to_string, registers_from_string, register_data): Call
17986 get_regcache.
17987 * regcache.h: Add prototypes.
17988 * server.h: Likewise.
17989
179902002-04-20 Daniel Jacobowitz <drow@mvista.com>
17991
17992 * mem-break.c: New file.
17993 * mem-break.h: New file.
17994 * Makefile.in: Add mem-break.o rule; update server.h
17995 dependencies.
17996 * inferiors.c (struct inferior_info): Add target_data
17997 member.
17998 (clear_inferiors): Free target_data member if set.
17999 (inferior_target_data, set_inferior_target_data): New functions.
18000 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
18001 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
18002 * linux-low.c (linux_bp_reinsert): New variable.
18003 (struct inferior_linux_data): New.
18004 (linux_create_inferior): Use set_inferior_target_data.
18005 (linux_attach): Likewise. Call add_inferior.
18006 (linux_wait_for_one_inferior): New function.
18007 (linux_wait): Call it.
18008 (linux_write_memory): Add const.
18009 (initialize_low): Call set_breakpoint_data.
18010 * linux-low.h (struct linux_target_ops): Add breakpoint
18011 handling members.
18012 * server.c (attach_inferior): Remove extra add_inferior
18013 call.
18014 * server.h: Include mem-break.h. Update inferior.c
18015 prototypes.
18016 * target.c (read_inferior_memory)
18017 (write_inferior_memory): New functions.
18018 * target.h (read_inferior_memory)
18019 (write_inferior_memory): Change macros to prototypes.
18020 (struct target_ops): Update comments. Add const to write_memory
18021 definition.
18022
180232002-04-11 Daniel Jacobowitz <drow@mvista.com>
18024
18025 * linux-low.c (usr_store_inferior_registers): Support
18026 registers which are allowed to fail to store.
18027 * linux-low.h (linux_target_ops): Likewise.
18028 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
18029 (ppc_cannot_store_register): FPSCR may not be storable.
18030
180312002-04-09 Daniel Jacobowitz <drow@mvista.com>
18032
18033 * server.h: Include <string.h> if HAVE_STRING_H.
18034 * ChangeLog: Correct paths in last ChangeLog entry.
18035
180362002-04-09 Daniel Jacobowitz <drow@mvista.com>
18037
18038 * linux-low.h: Remove obsolete prototypes.
18039 (struct linux_target_ops): New.
18040 (extern the_low_target): New.
18041 * linux-low.c (num_regs, regmap): Remove declarations.
18042 (register_addr): Use the_low_target explicitly.
18043 (fetch_register): Likewise.
18044 (usr_fetch_inferior_registers): Likewise.
18045 (usr_store_inferior_registers): Likewise.
18046 * linux-arm-low.c (num_regs): Remove.
18047 (arm_num_regs): Define.
18048 (arm_regmap): Renamed from regmap, made static.
18049 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
18050 made static.
18051 (arm_cannot_store_register): Renamed from cannot_store_register,
18052 made static.
18053 (the_low_target): New.
18054 * linux-i386-low.c (num_regs): Remove.
18055 (i386_num_regs): Define.
18056 (i386_regmap): Renamed from regmap, made static.
18057 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
18058 made static.
18059 (i386_cannot_store_register): Renamed from cannot_store_register,
18060 made static.
18061 (the_low_target): New.
18062 * linux-ia64-low.c (num_regs): Remove.
18063 (ia64_num_regs): Define.
18064 (ia64_regmap): Renamed from regmap, made static.
18065 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
18066 made static.
18067 (ia64_cannot_store_register): Renamed from cannot_store_register,
18068 made static.
18069 (the_low_target): New.
18070 * linux-m68k-low.c (num_regs): Remove.
18071 (m68k_num_regs): Define.
18072 (m68k_regmap): Renamed from regmap, made static.
18073 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
18074 made static.
18075 (m68k_cannot_store_register): Renamed from cannot_store_register,
18076 made static.
18077 (the_low_target): New.
18078 * linux-mips-low.c (num_regs): Remove.
18079 (mips_num_regs): Define.
18080 (mips_regmap): Renamed from regmap, made static.
18081 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
18082 made static.
18083 (mips_cannot_store_register): Renamed from cannot_store_register,
18084 made static.
18085 (the_low_target): New.
18086 * linux-ppc-low.c (num_regs): Remove.
18087 (ppc_num_regs): Define.
18088 (ppc_regmap): Renamed from regmap, made static.
18089 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
18090 made static.
18091 (ppc_cannot_store_register): Renamed from cannot_store_register,
18092 made static.
18093 (the_low_target): New.
18094 * linux-s390-low.c (num_regs): Remove.
18095 (s390_num_regs): Define.
18096 (s390_regmap): Renamed from regmap, made static.
18097 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
18098 made static.
18099 (s390_cannot_store_register): Renamed from cannot_store_register,
18100 made static.
18101 (the_low_target): New.
18102 * linux-sh-low.c (num_regs): Remove.
18103 (sh_num_regs): Define.
18104 (sh_regmap): Renamed from regmap, made static.
18105 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
18106 made static.
18107 (sh_cannot_store_register): Renamed from cannot_store_register,
18108 made static.
18109 (the_low_target): New.
18110 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
18111 (the_low_target): New.
18112
181132002-04-09 Daniel Jacobowitz <drow@mvista.com>
18114
18115 * Makefile.in: Add stamp-h target.
18116 * configure.in: Create stamp-h.
18117 * configure: Regenerated.
18118
181192002-04-09 Daniel Jacobowitz <drow@mvista.com>
18120
18121 * inferiors.c: New file.
18122 * target.c: New file.
18123 * target.h: New file.
18124 * Makefile.in: Add target.o and inferiors.o. Update
18125 dependencies.
18126 * linux-low.c (inferior_pid): New static variable,
18127 moved from server.c.
18128 (linux_create_inferior): Renamed from create_inferior.
18129 Call add_inferior. Return 0 on success instead of a PID.
18130 (linux_attach): Renamed from myattach.
18131 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
18132 (linux_thread_alive): Renamed from mythread_alive.
18133 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
18134 child dies.
18135 (linux_resume): Renamed from myresume. Add missing ``return 0''.
18136 (regsets_store_inferior_registers): Correct error message.
18137 Add missing ``return 0''.
18138 (linux_fetch_registers): Renamed from fetch_inferior_registers.
18139 (linux_store_registers): Renamed from store_inferior_registers.
18140 (linux_read_memory): Renamed from read_inferior_memory.
18141 (linux_write_memory): Renamed from write_inferior_memory.
18142 (linux_target_ops): New structure.
18143 (initialize_low): Call set_target_ops ().
18144 * remote-utils.c (unhexify): New function.
18145 (hexify): New function.
18146 (input_interrupt): Send signals to ``signal_pid''.
18147 * server.c (inferior_pid): Remove.
18148 (start_inferior): Update create_inferior call.
18149 (attach_inferior): Call add_inferior.
18150 (handle_query): New function.
18151 (main): Call handle_query for `q' packets.
18152 * server.h: Include "target.h". Remove obsolete prototypes.
18153 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
18154
181552002-04-09 Daniel Jacobowitz <drow@mvista.com>
18156
18157 * Makefile.in: Add WARN_CFLAGS. Update configury
18158 dependencies.
18159 * configure.in: Check for <string.h>
18160 * configure: Regenerate.
18161 * config.in: Regenerate.
18162 * gdbreplay.c: Include needed system headers.
18163 (remote_open): Remove strchr prototype.
18164 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
18165 * regcache.c (supply_register): Change buf argument to const void *.
18166 (supply_register_by_name): Likewise.
18167 (collect_register): Change buf argument to void *.
18168 (collect_register_by_name): Likewise.
18169 * regcache.h: Add missing prototypes.
18170 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
18171 * server.c (handle_query): New function.
18172 (attached): New static variable, moved out of main.
18173 (main): Quiet longjmp clobber warnings.
18174 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
18175 * utils.c (error): Remove NORETURN.
18176 (fatal): Likewise.
This page took 3.050162 seconds and 4 git commands to generate.