]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdbserver/ChangeLog
gdbserver: turn target op 'create_inferior' into a method
[thirdparty/binutils-gdb.git] / gdbserver / ChangeLog
CommitLineData
15295543
TBA
12020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2
3 Turn process_stratum_target's create_inferior 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 (create_inferior): Rename the macro to ...
9 (target_create_inferior): ... this.
10
11 Update the derived classes and callers below.
12
13 * server.cc (handle_v_run): Update.
14 (captured_main): Update.
15 (process_serial_event): Update.
16 * linux-low.cc (linux_target_ops): Update.
17 (linux_create_inferior): Turn into ...
18 (linux_process_target::create_inferior): ... this.
19 * linux-low.h (class linux_process_target): Update.
20 * lynx-low.cc (lynx_target_ops): Update.
21 (lynx_create_inferior): Turn into ...
22 (lynx_process_target::create_inferior): ... this.
23 * lynx-low.h (class lynx_process_target): Update.
24 * nto-low.cc (nto_target_ops): Update.
25 (nto_create_inferior): Turn into ...
26 (nto_process_target::create_inferior): ... this.
27 * nto-low.h (class nto_process_target): Update.
28 * win32-low.cc (win32_target_ops): Update.
29 (win32_create_inferior): Turn into ...
30 (win32_process_target::create_inferior): ... this.
31 * win32-low.h (class win32_process_target): Update.
32
5ef9273d
TBA
332020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
34
35 * target.h (class process_target): New class definition.
36 (struct process_stratum_target) <pt>: New field with type
37 'process_target*'.
38 * linux-low.h (class linux_process_target): Define as a derived
39 class of 'process_target'.
40 * linux-low.cc (linux_target_ops): Add a linux_process_target*
41 as the 'pt' field.
42 * lynx-low.h (class lynx_process_target): Define as a derived
43 class of 'process_target'.
44 * lynx-low.cc (lynx_target_ops): Add a lynx_process_target*
45 as the 'pt' field.
46 * nto-low.h (class nto_process_target): Define as a derived
47 class of 'process_target'.
48 * nto-low.cc (nto_target_ops): Add an nto_process_target*
49 as the 'pt' field.
50 * win32-low.h (class win32_process_target): Define as a derived
51 class of 'process_target'.
52 * win32-low.cc (win32_target_ops): Add a win32_process_target*
53 as the 'pt' field.
54
9f1528a1
AB
552020-02-19 Andrew Burgess <andrew.burgess@embecosm.com>
56
57 * configure: Regenerate.
58
bf84f706
MR
592020-02-19 Maciej W. Rozycki <macro@wdc.com>
60 Andrew Burgess <andrew.burgess@embecosm.com>
61
62 * linux-riscv-low.cc: New file.
63 * Makefile.in (SFILES): Add linux-riscv-low.cc, arch/riscv.c,
64 and nat/riscv-linux-tdesc.c.
65 * configure.srv <riscv*-*-linux*> (srv_tgtobj)
66 (srv_linux_regsets, srv_linux_usrregs, srv_linux_thread_db):
67 Define.
68
1a627e7e
TT
692020-02-14 Tom Tromey <tom@tromey.com>
70
71 * acinclude.m4: Don't include acx_configure_dir.m4.
72 * Makefile.in (LIBIBERTY_BUILDDIR, GNULIB_BUILDDIR): Update.
73 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): Remove.
74 (all, install-only, uninstall, clean-info, clean)
75 (maintainer-clean): Don't recurse.
76 (subdir_do, all-lib): Remove.
77 ($(LIBGNU) $(LIBIBERTY) $(GNULIB_H)): Remove rule.
78 (GNULIB_H): Remove.
79 (generated_files): Update.
80 ($(GNULIB_BUILDDIR)/Makefile): Remove rule.
81 * configure: Rebuild.
82 * configure.ac: Don't configure gnulib or libiberty.
83 (GNULIB): Update.
84
a9b34532
EZ
852020-02-14 Eli Zaretskii <eliz@gnu.org>
86
87 * win32-low.c (create_process): Prepend PROGRAM to ARGS when
88 preparing the command line for CreateProcess.
89 (win32_create_inferior): Reflect the program name in debugging
90 output that shows the process and its command line.
91
feacfcac
SM
922020-02-13 Simon Marchi <simon.marchi@efficios.com>
93
94 * Makefile.in: Rename source files from .c to .cc.
95 * %.c: Rename to %.cc.
96 * configure.ac: Rename server.c to server.cc.
97 * configure: Re-generate.
98
06b3c5bd
SM
992020-02-13 Simon Marchi <simon.marchi@efficios.com>
100
101 * Makefile.in: Rename gdbsupport source files from .c to .cc.
102
052793ad
HD
1032020-02-12 Hannes Domani <ssbssa@yahoo.de>
104
105 * win32-low.c (win32_create_inferior): Set signal_pid.
106
f20e3e82
MR
1072020-02-12 Maciej W. Rozycki <macro@wdc.com>
108 Pedro Alves <palves@redhat.com>
109
110 Skip building gdbserver in a cross-configuration.
111 * configure.srv: Set $gdbserver_host depending on whether $target
112 is $host. Use $gdbserver_host instead of $host.
113
8ddd8e0e
SM
1142020-02-11 Simon Marchi <simon.marchi@efficios.com>
115
116 * configure: Re-generate.
117
898e7f60
SM
1182020-02-11 Simon Marchi <simon.marchi@efficios.com>
119
120 * configure: Re-generate.
121
58df732b
SM
1222020-02-11 Simon Marchi <simon.marchi@efficios.com>
123
124 * acinclude.m4: Update warning.m4 path.
125
7928d571
HD
1262020-02-09 Hannes Domani <ssbssa@yahoo.de>
127
128 * win32-low.c (win32_clear_inferiors): Reset siginfo_er.
129 (handle_exception): Set siginfo_er.
130 (win32_xfer_siginfo): New function.
131
919adfe8
TT
1322020-02-07 Tom Tromey <tom@tromey.com>
133 Pedro Alves <palves@redhat.com>
134
135 * README: Update build documentation.
136 * configure.srv: Set UNSUPPORTED if host is unsupported. Check
137 host, not target.
138 * configure.ac: Update paths.
139 * configure: Rebuild.
140 * acinclude.m4: Update paths.
141 * Makefile.in: Update include paths.
142 (depcomp, INCLUDE_DIR, INCGNU, INCSUPPORT, INCLUDE_CFLAGS)
143 (SFILES, XML_DIR, n, $(GNULIB_BUILDDIR)/Makefile, config.status)
144 (version-generated.c, stamp-xml, regdat_sh, arch/%-ipa.o)
145 (gdbsupport/%-ipa.o, %-ipa.o, arch/%.o, gdbsupport/%.o, %.o)
146 (%-generated.c): Update paths.
147 * Move entire directory from ../gdb/gdbserver.
148
287c844a
MR
1492020-01-29 Maciej W. Rozycki <macro@wdc.com>
150
151 * configure.srv <i[34567]86-*-mingw*>: Fix whitespace damage.
152
548a204f
PFC
1532020-01-29 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
154
155 * configure.srv (powerpc*-*-linux*): Use srv_tgtobj in second
156 assignment instead of srv_linux_obj.
157
a2236a08
HD
1582020-01-28 Hannes Domani <ssbssa@yahoo.de>
159
160 * server.c (handle_qxfer_libraries): Write segment-address with
161 paddress.
162
bdaed379
HD
1632020-01-24 Hannes Domani <ssbssa@yahoo.de>
164
165 * Makefile.in (install-strip): New target.
166 (install_sh, INSTALL_STRIP_PROGRAM, STRIP): New variables.
167 * aclocal.m4: Regenerate.
168 * configure: Regenerate.
169 * configure.ac: Add AM_PROG_INSTALL_STRIP.
170
42cd72aa
MR
1712020-01-24 Maciej W. Rozycki <macro@wdc.com>
172
173 * Makefile.in (SFILES): Adjust paths to point to real files.
174 (OBS): Move waitstatus.o to target/waitstatus.o.
175 (TAGS): Transform paths appropriately.
176 (%.o): Rename to...
177 (nat/%.o): ... this pattern rule.
178 (%.o): Rename to...
179 (target/%.o): ... this pattern rule.
180 * configure.srv: Adjust paths throughout to include nat/ prefix
181 with the revant files.
182 * configure.ac: Add `nat' and `target' to CONFIG_SRC_SUBDIR.
183 * configure: Regenerate.
184
42ba50ec
MR
1852020-01-24 Maciej W. Rozycki <macro@wdc.com>
186
187 * Makefile.in (TAGS): Remove config files from the recipe.
188
05ea2a05
TT
1892020-01-14 Tom Tromey <tom@tromey.com>
190
191 * configure: Rebuild.
192 * configure.ac: Remove any checks that were added to common.m4.
193 * acinclude.m4: Include lib-ld.m4, lib-prefix.m4, and
194 lib-link.m4.
195
01027315
TT
1962020-01-14 Tom Tromey <tom@tromey.com>
197
198 * server.h: Include config.h.
199 * gdbreplay.c: Include config.h.
200 * configure: Rebuild.
201 * configure.ac: Don't source common.host.
202 * acinclude.m4: Update path.
203 * Makefile.in (INCSUPPORT): New variable.
204 (INCLUDE_CFLAGS): Add INCSUPPORT.
205 (SFILES): Update paths.
206 (version-generated.c): Update path to create-version.sh.
207 (gdbsupport/%-ipa.o, gdbsupport/%.o): Update paths.
208
b2ceabe8
TT
2092020-01-14 Tom Tromey <tom@tromey.com>
210
211 * configure.ac (LIBS): Use WIN32APILIBS.
212 (USE_WIN32API): Don't define.
213 * configure: Rebuild.
214
25c51f71
TT
2152020-01-14 Tom Tromey <tom@tromey.com>
216
217 * configure: Rebuild.
218
c0bd321d
SM
2192020-01-13 Simon Marchi <simon.marchi@efficios.com>
220
221 * Makefile.in (%-generated.c): Remove rule for files from
222 regformats/i386.
223
bb564c58
SM
2242020-01-13 Simon Marchi <simon.marchi@efficios.com>
225
226 * configure: Re-generate.
227
6e37c371
SM
2282020-01-13 Simon Marchi <simon.marchi@efficios.com>
229
230 * tracepoint.h (IP_AGENT_EXPORT_FUNC) [!IN_PROCESS_AGENT]:
231 Define to static.
232 * tracepoint.c (stop_tracing, flush_trace_buffer,
233 about_to_request_buffer_space, get_trace_state_variable_value,
234 set_trace_state_variable_value, gdb_collect): Add declaration.
235
df4a0200
SM
2362020-01-13 Simon Marchi <simon.marchi@efficios.com>
237
238 * linux-x86-low.c (x86_linux_regs_info, amd64_emit_eq_goto,
239 amd64_emit_ne_goto, amd64_emit_lt_goto, amd64_emit_le_goto,
240 amd64_emit_gt_goto, amd64_emit_ge_goto, amd64_emit_ge_goto,
241 i386_emit_eq_goto, i386_emit_ne_goto, i386_emit_lt_goto,
242 i386_emit_le_goto, i386_emit_gt_goto, i386_emit_ge_goto): Make
243 static.
244
89e94ec9
SM
2452020-01-13 Simon Marchi <simon.marchi@efficios.com>
246
247 * inferiors.c: Include gdbsupport/common-inferior.h.
248
2552728a
SM
2492020-01-13 Simon Marchi <simon.marchi@efficios.com>
250
251 * hostio-errno.c: Include hostio.h.
252
4025fa09
SM
2532020-01-13 Simon Marchi <simon.marchi@efficios.com>
254
255 * Makefile.in (%-generated.c): Make $(regdat_sh) a regular
256 prerequisite.
257
c0b0a142
SM
2582020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
259
260 * linux-arm-tdesc.c: Include linux-arm-tdesc.h.
261 * linux-arm-tdesc.h: Include arch/arm.h.
262
bb1183e2
SM
2632020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
264
265 * linux-aarch64-low.c (aarch64_write_goto_address): Make static.
266
f5df0b5f
SM
2672020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
268
269 * linux-aarch32-tdesc.c: Include linux-aarch32-tdesc.h.
270 * linux-aarch64-tdesc.c: Include linux-aarch64-tdesc.h.
271
5b6d1e4f
PA
2722020-01-10 Pedro Alves <palves@redhat.com>
273
274 * fork-child.c (post_fork_inferior): Pass target down to
275 startup_inferior.
276 * inferiors.c (switch_to_thread): Add process_stratum_target
277 parameter.
278 * lynx-low.c (lynx_target_ops): Now a process_stratum_target.
279 * nto-low.c (nto_target_ops): Now a process_stratum_target.
280 * linux-low.c (linux_target_ops): Now a process_stratum_target.
281 * remote-utils.c (prepare_resume_reply): Pass the target to
282 switch_to_thread.
283 * target.c (the_target): Now a process_stratum_target.
284 (done_accessing_memory): Pass the target to switch_to_thread.
285 (set_target_ops): Ajust to use process_stratum_target.
286 * target.h (struct target_ops): Rename to ...
287 (struct process_stratum_target): ... this.
288 (the_target, set_target_ops): Adjust.
289 (prepare_to_access_memory): Adjust comment.
290 * win32-low.c (child_xfer_memory): Adjust to use
291 process_stratum_target.
292 (win32_target_ops): Now a process_stratum_target.
293
559e7e50
EZ
2942020-01-06 Eli Zaretskii <eliz@gnu.org>
295 Pedro Alves <palves@redhat.com>
296
297 * win32-low.c (get_child_debug_event): Extract the fatal exception
298 from the exit status and convert to the equivalent Posix signal
299 number.
300 (win32_wait): Allow TARGET_WAITKIND_SIGNALLED status as well.
301 * Makefile.in (OBS, SFILES): Add gdb_wait.[co].
302
48189bec
HD
3032020-01-01 Hannes Domani <ssbssa@yahoo.de>
304
305 * Makefile.in: Use INSTALL_PROGRAM_ENV.
306
5dd8bf88
JB
3072020-01-01 Joel Brobecker <brobecker@adacore.com>
308
309 * server.c (gdbserver_version): Change copyright year to 2020.
310 * gdbreplay.c (gdbreplay_version): Likewise.
311
0ad6b8ee
CB
3122019-12-19 Christian Biesinger <cbiesinger@google.com>
313
314 * configure: Regenerate.
315 * configure.ac: Quote variable arguments of test.
316
1ee7b812
BE
3172019-12-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
318
319 * Makefile.in: Fix build with GNU Make 3.81
320
d9fa87f4
TT
3212019-12-16 Tom Tromey <tromey@adacore.com>
322
323 * server.c (get_exec_file): Constify result.
324
ab7d13f0
CB
3252019-12-10 Christian Biesinger <cbiesinger@google.com>
326
327 * Makefile.in: Add safe-strerror.c to gdbreplay and IPA, and change
328 UNDO_GNULIB_CFLAGS to undo strerror_r instead of strerror.
329 * config.in: Regenerate.
330 * configure: Regenerate.
331 * configure.ac: Don't check for strerror.
332 * linux-i386-ipa.c (initialize_fast_tracepoint_trampoline_buffer):
333 Call safe_strerror instead of strerror.
334 * server.h (strerror): Remove this now-unnecessary declaration.
335 * tracepoint.c (init_named_socket): Call safe_strerror instead of
336 strerror.
337 (gdb_agent_helper_thread): Likewise.
338 * utils.c (perror_with_name): Likewise.
339
4da8c3a8
TT
3402019-11-26 Tom Tromey <tom@tromey.com>
341
342 * configure, config.in: Rebuild.
343
21987b9c
TT
3442019-11-26 Tom Tromey <tom@tromey.com>
345
346 * remote-utils.c (block_unblock_async_io): Use gdb_sigmask.
347 * linux-low.c (linux_wait_for_event_filtered, linux_async): Use
348 gdb_sigmask.
349 * configure, config.in: Rebuild.
350
5e030278
TT
3512019-11-26 Tom Tromey <tom@tromey.com>
352
353 * Makefile.in (PTHREAD_CFLAGS, PTHREAD_LIBS): New variables.
354 (INTERNAL_CFLAGS_BASE): Use PTHREAD_CFLAGS.
355 (GDBSERVER_LIBS): Use PTHREAD_LIBS.
356 * acinclude.m4: Include ax_pthread.m4.
357 * config.in, configure: Rebuild.
358
6d91ce9a
CB
3592019-11-26 Christian Biesinger <cbiesinger@google.com>
360
361 * debug.c (debug_set_output): Call safe_strerror instead of
362 strerror.
363 * linux-low.c (attach_proc_task_lwp_callback): Likewise.
364 (linux_kill_one_lwp): Likewise.
365 (linux_detach_one_lwp): Likewise.
366 (linux_wait_for_event_filtered): Likewise.
367 (store_register): Likewise.
368 * lynx-low.c (lynx_attach): Likewise.
369 * mem-break.c (insert_memory_breakpoint): Likewise.
370 (remove_memory_breakpoint): Likewise.
371 (delete_fast_tracepoint_jump): Likewise.
372 (set_fast_tracepoint_jump): Likewise.
373 (uninsert_fast_tracepoint_jumps_at): Likewise.
374 (reinsert_fast_tracepoint_jumps_at): Likewise.
375 * nto-low.c (nto_xfer_memory): Likewise.
376 (nto_resume): Likewise.
377
6cdd651f
LM
3782019-11-20 Luis Machado <luis.machado@linaro.org>
379
380 * linux-aarch64-low.c (is_sve_tdesc): Check against target feature
381 instead of register count.
382 * tdesc.c (tdesc_contains_feature): New function.
383 * tdesc.h (tdesc_contains_feature): New prototype.
384
cd850b40
CB
3852019-11-15 Christian Biesinger <cbiesinger@google.com>
386
387 * Makefile.in: Add safe-strerror.c.
388 * configure: Regenerate.
389 * configure.ac: Don't source common.host.
390
5abebf3c
CB
3912019-11-15 Christian Biesinger <cbiesinger@google.com>
392
393 * config.in: Regenerate.
394 * configure: Regenerate.
395
e06f3d6e
AB
3962019-11-12 Andrew Burgess <andrew.burgess@embecosm.com>
397
398 * ax.c (ax_printf): Handle size_t_arg.
399
ca3a04f6
CB
4002019-11-06 Christian Biesinger <cbiesinger@google.com>
401
402 * linux-tdep.c (linux_info_proc): Use strtok_r instead of strtok.
403 * mi/mi-main.c (output_cores): Likewise.
404 * nat/linux-osdata.c (linux_xfer_osdata_cpus): Likewise.
405 (linux_xfer_osdata_modules): Likewise.
406 * remote.c (register_remote_support_xml): Likewise.
407 * sparc64-tdep.c (adi_is_addr_mapped): Likewise.
408 * xml-syscall.c (syscall_create_syscall_desc): Likewise.
409
e48f6033
CB
4102019-11-01 Christian Biesinger <cbiesinger@google.com>
411
412 * configure: Regenerate.
413 * configure.ac: Remove check for strerror_r.
414
e7e97a2e
CB
4152019-10-31 Christian Biesinger <cbiesinger@google.com>
416
417 * config.in: Regenerate.
418 * configure: Regenerate.
419 * configure.ac: Also check for strerror_r.
420
75cafaa6
CB
4212019-10-31 Christian Biesinger <cbiesinger@google.com>
422
423 * ax.h (debug_agent): Remove duplicate declaration.
424
30baf67b
TV
4252019-10-26 Tom de Vries <tdevries@suse.de>
426
427 * linux-aarch64-low.c: Fix typos in comments.
428 * linux-arm-low.c: Same.
429 * linux-low.c: Same.
430 * linux-ppc-low.c: Same.
431 * proc-service.c: Same.
432 * regcache.h: Same.
433 * server.c: Same.
434 * tracepoint.c: Same.
435 * win32-low.c: Same.
436
52c64cf7
TT
4372019-10-25 Tom Tromey <tromey@adacore.com>
438
439 * utils.c (xstrdup): Remove.
440
c12d372d
TT
4412019-10-23 Tom Tromey <tom@tromey.com>
442
443 * configure, config.in: Rebuild.
444
4d0b984b
TT
4452019-10-23 Tom Tromey <tom@tromey.com>
446
447 * configure: Rebuild.
448 * acinclude.m4: Use m4_include, not sinclude.
449
c5adaa19
TT
4502019-10-17 Tom Tromey <tromey@adacore.com>
451
452 * configure: Rebuild.
453 * configure.ac: Use AC_CONFIG_HEADERS. Create stamp-h there, not
454 in AC_CONFIG_FILES invocation.
455 * Makefile.in (stamp-h, Makefile): Use new-style config.status
456 invocation.
457
fec4e896
CB
4582019-10-16 Christian Biesinger <cbiesinger@google.com>
459
460 * server.c: Include xml-builtin.h.
461 (get_xml_features): Don't declare xml_builtins here.
462
00975ff6
AB
4632019-10-15 Andrew Burgess <andrew.burgess@embecosm.com>
464
465 * Makefile.in: Remove references to vec-ipa.o.
466
0dc32745
AB
4672019-10-15 Andrew Burgess <andrew.burgess@embecosm.com>
468
469 * Makefile.in: Remove references to vec.c.
470
3e6ec53a
CB
4712019-10-02 Christian Biesinger <cbiesinger@google.com>
472
473 * server.c (server_waiting): Change to bool.
474 (extended_protocol): Likewise.
475 (response_needed): Likewise.
476 (exit_requested): Likewise.
477 (run_once): Likewise.
478 (report_no_resumed): Likewise.
479 (non_stop): Likewise.
480 (disable_packet_vCont): Likewise.
481 (disable_packet_Tthread): Likewise.
482 (disable_packet_qC): Likewise.
483 (disable_packet_qfThreadInfo): Likewise.
484 (handle_general_set): Update.
485 (handle_detach): Update.
486 (handle_monitor_command): Update.
487 (handle_query): Update.
488 (captured_main): Update.
489 (process_serial_event): Update.
490 * server.h (server_waiting): Change to bool.
491 (disable_packet_vCont): Likewise.
492 (disable_packet_Tthread): Likewise.
493 (disable_packet_qC): Likewise.
494 (disable_packet_qfThreadInfo): Likewise.
495 (run_once): Likewise.
496 (non_stop): Likewise.
497 * target.c (target_stop_and_wait): Update.
498
80fd2826
TT
4992019-10-02 Tom Tromey <tromey@adacore.com>
500
501 * Makefile.in (SFILES): Add common-inferior.c.
502 (OBS): Add common-inferior.o.
503 * server.c (startup_with_shell): Don't define.
504
46f29a9a
AB
5052019-10-02 Andrew Burgess <andrew.burgess@embecosm.com>
506
507 * linux-low.c (linux_low_read_btrace): Update for change to
508 std::vector.
509
f9d949fb
CB
5102019-09-20 Christian Biesinger <cbiesinger@google.com>
511
512 * debug.c (debug_threads): Remove comment in favor of the header.
513 * debug.h (using_threads): Add declaration.
514 (debug_threads): Add comment.
515 * linux-aarch64-low.c: Include debug.h and remove declaration of
516 debug_threads.
517 * nto-low.c: Likewise.
518 * remote-utils.c: Likewise.
519 * thread-db.c: Likewise.
520
abf516c6
UW
5212019-09-20 Ulrich Weigand <uweigand@de.ibm.com>
522
523 * configure.srv (ipa_ppc_linux_regobj): Remove powerpc-cell32l-ipa.o
524 and powerpc-cell64l-ipa.o.
525 (powerpc*-*-linux*): Remove powerpc-cell32l.o and powerpc-cell64l.o
526 from srv_regobj. Remove rs6000/powerpc-cell32l.xml and
527 rs6000/powerpc-cell64l.xml from srv_xmlfiles.
528 (spu*-*-*): Remove.
529
530 * spu-low.c: Remove file.
531
532 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Remove.
533 (parse_spufs_run): Remove.
534 (ppc_get_pc): Remove Cell/B.E. support.
535 (ppc_set_pc): Likewise.
536 (ppc_breakpoint_at): Likewise.
537 (ppc_arch_setup): Likewise.
538 (ppc_get_ipa_tdesc_idx): Do not handle tdesc_powerpc_cell64l or
539 tdesc_powerpc_cell32l.
540 (initialize_low_arch): Do not call init_registers_powerpc_cell64l
541 or init_registers_powerpc_cell32l.
542 * linux-ppc-ipa.c (get_ipa_tdesc): Do not handle PPC_TDESC_CELL.
543 (initialize_low_tracepoint): Do not call init_registers_powerpc_cell64l
544 or init_registers_powerpc_cell32l.
545 * linux-ppc-tdesc-init.h (PPC_TDESC_CELL): Mark as unused.
546 (init_registers_powerpc_cell32l): Remove prototype.
547 (init_registers_powerpc_cell64l): Likewise.
548
549 * target.h (struct target_ops): Remove qxfer_spu member.
550 * server.c (handle_qxfer_spu): Remove.
551 (qxfer_packets): Remove entry for "spu".
552 (handle_query): No longer support qXfer:spu:read or qXfer:spu:write.
553 * linux-low.c (SPUFS_MAGIC): Remove.
554 (spu_enumerate_spu_ids): Remove.
555 (linux_qxfer_spu): Remove.
556 (linux_target_ops): Remove qxfer_spu member.
557 * lynx-low.c (lynx_target_ops): Remove qxfer_spu member.
558 * nto-low.c (nto_target_ops): Remove qxfer_spu member.
559 * win32-low.c (win32_target_ops): Remove qxfer_spu member.
560
2d41fa11
SDJ
5612019-08-23 Sergio Durigan Junior <sergiodj@redhat.com>
562
563 * Makefile.in (SFILES): Add 'gdbsupport/gdb-dlfcn.c'.
564 (OBS): Add 'gdbsupport/gdb-dlfcn.o'.
565 * config.in: Regenerate.
566 * configure: Regenerate.
567
d59b55f0
TT
5682019-08-15 Tom Tromey <tromey@adacore.com>
569
570 * target.c (target_write_memory): Use gdb::byte_vector.
571
4196ab2a
TT
5722019-08-15 Tom Tromey <tromey@adacore.com>
573
574 * tracepoint.c (write_inferior_data_pointer)
575 (write_inferior_integer, write_inferior_int8)
576 (write_inferior_uinteger, m_tracepoint_action_download)
577 (r_tracepoint_action_download, x_tracepoint_action_download)
578 (l_tracepoint_action_download, clear_inferior_trace_buffer)
579 (download_agent_expr, download_tracepoint_1)
580 (download_trace_state_variables, upload_fast_traceframes): Update.
581 * server.c (gdb_write_memory): Update.
582 * remote-utils.c (relocate_instruction): Update.
583 * proc-service.c (ps_pdwrite): Update.
584 * mem-break.c (remove_memory_breakpoint)
585 (delete_fast_tracepoint_jump, set_fast_tracepoint_jump)
586 (uninsert_fast_tracepoint_jumps_at)
587 (reinsert_fast_tracepoint_jumps_at): Update.
588 * linux-x86-low.c (append_insns)
589 (i386_install_fast_tracepoint_jump_pad)
590 (amd64_write_goto_address, i386_write_goto_address): Update.
591 * linux-s390-low.c (append_insns, s390_write_goto_address):
592 Update.
593 * linux-ppc-low.c (ppc_relocate_instruction)
594 (ppc_install_fast_tracepoint_jump_pad, emit_insns)
595 (ppc_write_goto_address): Update.
596 * linux-aarch64-low.c (append_insns): Update.
597 * target.h (struct target_ops): Update.
598 (write_inferior_memory): Don't declare.
599 * target.c (target_write_memory): Rename from
600 write_inferior_memory. Remove old target_write_memory.
601
c6778d00
TT
6022019-08-15 Tom Tromey <tromey@adacore.com>
603
604 * target.c (write_inferior_memory): Use std::vector.
605
404f2902
FCE
6062019-08-06 Frank Ch. Eigler <fche@redhat.com>
607
608 PR build/24886
609 * configure.ac: Drop enable-libmcheck support.
610 * configure, config.in: Rebuild.
611 * acinclude.m4: Don't include it.
612
4c5aa8e0
AH
6132019-07-19 Alan Hayward <alan.hayward@arm.com>
614
615 * configure.srv: Remove Arm xml files.
616
7cc17433
AH
6172019-07-19 Alan Hayward <alan.hayward@arm.com>
618
619 * configure.srv: Add new files. Remove xml generated files.
620 * linux-aarch32-low.c (initialize_low_arch_aarch32): Don't init
621 registers.
622 * linux-aarch32-low.h (tdesc_arm_with_neon): Remove.
623 * linux-aarch32-tdesc.c: New file.
624 * linux-aarch32-tdesc.h: New file.
625 * linux-aarch64-low.c (aarch64_arch_setup): Call aarch32_linux_read_description.
626 * linux-arm-low.c (init_registers_arm, tdesc_arm)
627 (init_registers_arm_with_iwmmxt, tdesc_arm_with_iwmmxt)
628 (init_registers_arm_with_vfpv2, tdesc_arm_with_vfpv2)
629 (init_registers_arm_with_vfpv3, tdesc_arm_with_vfpv3): Remove.
630 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
631 (arm_store_vfpregset): Call arm_linux_get_tdesc_fp_type.
632 (arm_read_description): Call arm_linux_read_description.
633 (initialize_low_arch): Don't init registers.
634 * linux-arm-tdesc.c: New file.
635 * linux-arm-tdesc.h: New file.
636
166a82be
AH
6372019-07-10 Alan Hayward <alan.hayward@arm.com>
638
639 * linux-arm-low.c (arm_fill_wmmxregset, arm_store_wmmxregset):
640 Move counter inside for.
641 (arm_read_description): Check ptrace earlier.
642 (arm_arch_setup): Call arm_linux_init_hwbp_cap here.
643
268a13a5
TT
6442019-07-09 Tom Tromey <tom@tromey.com>
645
646 * configure: Rebuild.
647 * configure.ac: Change common to gdbsupport.
648 * acinclude.m4: Change common to gdbsupport.
649 * Makefile.in (SFILES, OBS, GDBREPLAY_OBS, IPA_OBJS)
650 (version-generated.c, gdbsupport/%-ipa.o, gdbsupport/%.o): Change
651 common to gdbsupport.
652 * ax.c, event-loop.c, fork-child.c, gdb_proc_service.h,
653 gdbreplay.c, gdbthread.h, hostio-errno.c, hostio.c, i387-fp.c,
654 inferiors.c, inferiors.h, linux-aarch64-tdesc-selftest.c,
655 linux-amd64-ipa.c, linux-i386-ipa.c, linux-low.c,
656 linux-tic6x-low.c, linux-x86-low.c, linux-x86-tdesc-selftest.c,
657 linux-x86-tdesc.c, lynx-i386-low.c, lynx-low.c, mem-break.h,
658 nto-x86-low.c, regcache.c, regcache.h, remote-utils.c, server.c,
659 server.h, spu-low.c, symbol.c, target.h, tdesc.c, tdesc.h,
660 thread-db.c, tracepoint.c, win32-i386-low.c, win32-low.c: Change
661 common to gdbsupport.
662
350fab54
AH
6632019-07-04 Alan Hayward <alan.hayward@arm.com>
664
665 * linux-aarch32-low.c (arm_read_description, arm_regsets): Use new
666 defines.
667 * linux-arm-low.c (arm_read_description, arm_regsets): Likewise.
668
2b40fda7
AH
6692019-07-04 Alan Hayward <alan.hayward@arm.com>
670
671 * configure.srv: Remove legacy xml.
672 * linux-aarch64-low.c (initialize_low_arch): Remove
673 initialize_low_tdesc call.
674 * linux-aarch64-tdesc-selftest.c: Remove file.
675 * linux-aarch64-tdesc.h (initialize_low_tdesc): Remove.
676 * linux-x86-low.c (initialize_low_arch): Remove
677 initialize_low_tdesc call.
678 * linux-x86-tdesc-selftest.c: Remove file.
679 * linux-x86-tdesc.h (initialize_low_tdesc): Remove.
680
7d10623d
TV
6812019-06-20 Tom de Vries <tdevries@suse.de>
682
683 * linux-s390-ipa.c (get_ipa_tdesc)[!__s390x__]: Use
684 s390_te_linux64_ft_collect_regmap for S390_TDESC_GS.
685
8d6a48df
TV
6862019-06-19 Tom de Vries <tdevries@suse.de>
687
688 * debug.h (debug_write): Change return type to ssize_t.
689 * debug.c (debug_write): Same.
690
73cc7272
TT
6912019-06-14 Tom Tromey <tom@tromey.com>
692
693 * configure.ac: Use new path to gnulib.
694 * configure: Rebuild.
695 * Makefile.in (INCGNU, $(GNULIB_BUILDDIR)/Makefile): Use new path
696 to gnulib.
697
08f10e02
TT
6982019-06-11 Tom Tromey <tom@tromey.com>
699
700 * Makefile.in (SFILES): Add alloc.c.
701 (OBS): Add alloc.o.
702 (IPA_OBJS): Add alloc-ipa.o.
703 (alloc-ipa.o): New target.
704 (%.o: ../%.c): New pattern rule.
705
422186a9
TT
7062019-06-10 Tom Tromey <tromey@adacore.com>
707
708 * remote-utils.c (look_up_one_symbol, relocate_instruction): Don't
709 end warning with a newline.
710 * linux-s390-low.c (s390_get_wordsize): Don't end warning with a
711 newline.
712 * thread-db.c (attach_thread): Don't end warning with a newline.
713 (thread_db_notice_clone): Likewise.
714 * tracepoint.c (gdb_agent_helper_thread): Don't end warning with a
715 newline.
716 * linux-x86-low.c (x86_get_min_fast_tracepoint_insn_len): Don't
717 end warning with a newline.
718
b02f78f9
PA
7192019-06-04 Pedro Alves <palves@redhat.com>
720
721 * server.c (captured_main): Use make_unique_xstrdup.
722
88ed7edb
TT
7232019-06-02 Tom Tromey <tom@tromey.com>
724
725 * gdbreplay.c (fromhex): Remove.
726 * Makefile.in (GDBREPLAY_OBS): Add rsp-low.o.
727
33a6bc35
TT
7282019-05-29 Tom Tromey <tromey@adacore.com>
729
730 * configure: Rebuild.
731
e90a813d
KB
7322019-05-06 Kevin Buettner <kevinb@redhat.com>
733
734 * linux-x86-low.c (x86_fill_gregset): Don't compile 64-bit
735 sign extension code on 32-bit builds.
736
353ea2d1
EZ
7372019-05-03 Eli Zaretskii <eliz@gnu.org>
738
739 * remote-utils.c:
740 * gdbreplay.c [USE_WIN32API]: Remove the _WIN32_WINNT override.
741
b494cdff
TT
7422019-04-19 Tom Tromey <tom@tromey.com>
743
744 * server.c (struct vstop_notif): Derive from notif_event.
745 <base>: Remove.
746 (queue_stop_reply): Update.
747 (remove_all_on_match_ptid): Change type. Rewrite.
748 (discard_queued_stop_replies): Rewrite.
749 (in_queued_stop_replies_ptid): Change type.
750 (in_queued_stop_replies): Rewrite.
751 (notif_stop): Update.
752 (queue_stop_reply_callback): Update.
753 (captured_main): Don't call initialize_notif.
754 (push_stop_notification): Update.
755 * notif.c (notif_write_event, handle_notif_ack)
756 (notif_event_enque, notif_push): Update.
757 (notif_event_xfree, initialize_notif): Remove.
758 * notif.h (struct notif_event): Include <list>, not
759 "common/queue.h".
760 (struct notif_server) <queue>: Now a std::list.
761 (notif_event_p): Remove typedef.
762 (initialize_notif): Don't declare.
763 (struct notif_event): Add virtual destructor.
764
a7e559cc
AH
7652019-04-17 Alan Hayward <alan.hayward@arm.com>
766
767 * ax.c (ax_vdebug): Call debug_printf.
768 * debug.c (debug_write): New function.
769 * debug.h (debug_write): New declaration.
770 * linux-low.c (sigchld_handler): Call debug_write.
771
aeb2e706
AH
7722019-04-17 Alan Hayward <alan.hayward@arm.com>
773
774 * debug.c (debug_set_output): New function.
775 (debug_vprintf): Send output to debug_file.
776 (debug_flush): Likewise.
777 * debug.h (debug_set_output): New declaration.
778 * server.c (handle_monitor_command): Add debug-file option.
779 (captured_main): Likewise.
780
c1bc0935
AH
7812019-04-17 Alan Hayward <alan.hayward@arm.com>
782
783 * debug.c (remote_debug): Add definition.
784 * debug.h (remote_debug): Add declaration.
785 * hostio.c (remote_debug): Remove declaration.
786 * remote-utils.c (struct ui_file): Likewise.
787 (remote_debug): Likewise.
788 * remote-utils.h (remote_debug): Likewise,
789 * server.c (remote_debug): Remove definition.
790
3f52fdbc
KB
7912019-04-10 Kevin Buettner <kevinb@redhat.com>
792
793 * linux-x86-low.c (x86_fill_gregset): Sign extend EAX value
794 when using a 64-bit gdbserver.
795
b0319eaa
TT
7962019-04-09 Tom Tromey <tromey@adacore.com>
797
798 * linux-low.c (select_event_lwp): Use find_thread_in_random.
799
eedc3f4f
TT
8002019-04-08 Tom Tromey <tom@tromey.com>
801
802 * linux-low.c (linux_detach_one_lwp): Replace throw_exception with
803 throw.
804 (linux_resume_one_lwp): Likewise.
805
230d2906
TT
8062019-04-08 Tom Tromey <tom@tromey.com>
807
808 * gdbreplay.c: Update.
809 * linux-low.c: Update.
810 * server.c: Update.
811
a70b8144
TT
8122019-04-08 Tom Tromey <tom@tromey.com>
813
814 * server.c: Use C++ exception handling.
815 * linux-low.c: Use C++ exception handling.
816 * gdbreplay.c: Use C++ exception handling.
817
3d6e9d23
TT
8182019-04-08 Tom Tromey <tom@tromey.com>
819
820 * server.c (handle_btrace_general_set, handle_qxfer_btrace)
821 (handle_qxfer_btrace_conf, detach_or_kill_for_exit_cleanup)
822 (captured_main, main): Update.
823 * gdbreplay.c (main): Update.
824
0570503d
PFC
8252019-04-05 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
826
827 * linux-low.c (linux_get_auxv): Remove static. Return auxv entry
828 value in argument pointer, return 1 if the entry is found and 0
829 otherwise. Move comment.
830 (linux_get_hwcap, linux_get_hwcap2): Use modified linux_get_auxv.
831 * linux-low.h (linux_get_auxv): Declare.
832 * linux-ppc-low.c (is_elfv2_inferior): Use linux_get_auxv.
833
227a9e65
TT
8342019-04-05 Tom Tromey <tromey@adacore.com>
835
836 * server.c (gdbserver_usage): Use upper-case for metasyntactic
837 variables.
838
69f4c9cc
AH
8392019-03-28 Alan Hayward <alan.hayward@arm.com>
840
841 * linux-low.c (AT_HWCAP2): Add define if not already included.
842
974c89e0
AH
8432019-03-26 Alan Hayward <alan.hayward@arm.com>
844
845 * linux-aarch64-low.c (aarch64_get_hwcap): Remove function.
846 (aarch64_arch_setup): Call linux_get_hwcap.
847 * linux-arm-low.c (arm_get_hwcap): Remove function.
848 (arm_read_description): Call linux_get_hwcap.
849 * linux-low.c (linux_get_auxv): New function.
850 (linux_get_hwcap): Likewise.
851 (linux_get_hwcap2): Likewise.
852 * linux-low.h (linux_get_hwcap): New declaration.
853 (linux_get_hwcap2): Likewise.
854 * linux-ppc-low.c (ppc_get_auxv): Remove function.
855 (ppc_arch_setup): Call linux_get_hwcap.
856 * linux-s390-low.c (s390_get_hwcap): Remove function.
857 (s390_arch_setup): Call linux_get_hwcap.
858
1ef53e6b
AH
8592019-03-22 Alan Hayward <alan.hayward@arm.com>
860 Jiong Wang <jiong.wang@arm.com>
861
862 * linux-aarch64-low.c (aarch64_store_pauthregset): New function.
863 * linux-low.c (regsets_store_inferior_registers): Allow optional reads
864 to fail.
865 * linux-low.h (enum regset_type): Add OPTIONAL_REGS.
866
ee4fbcfa
AH
8672019-03-22 Alan Hayward <alan.hayward@arm.com>
868 Jiong Wang <jiong.wang@arm.com>
869
870 * linux-aarch64-low.c (AARCH64_HWCAP_PACA): New define.
871 (aarch64_get_hwcap): New function.
872 (aarch64_arch_setup): Read APIA hwcap.
873
6dc0ebde
AH
8742019-03-22 Alan Hayward <alan.hayward@arm.com>
875 Jiong Wang <jiong.wang@arm.com>
876
877 * linux-aarch64-ipa.c (get_ipa_tdesc): Add pauth param.
878 (initialize_low_tracepoint): Likewise.
879 * linux-aarch64-low.c (aarch64_arch_setup): Likewise.
880 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Likewise.
881 * linux-aarch64-tdesc.c (struct target_desc): Likewise.
882 (aarch64_linux_read_description): Likewise.
883 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Likewise.
884
1163a4b7
JB
8852019-03-12 John Baldwin <jhb@FreeBSD.org>
886
887 * linux-x86-tdesc.c (i386_linux_read_description): Update call to
888 i386_create_target_description for 'segments' parameter.
889 * lynx-i386-low.c (lynx_i386_arch_setup): Likewise.
890 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
891 * win32-i386-low.c (i386_arch_setup): Likewise.
892
d3a70e03
TT
8932019-03-12 Tom Tromey <tromey@adacore.com>
894
895 * linux-low.c (iterate_over_lwps): Update.
896
37991b4f
TT
8972019-03-06 Tom Tromey <tom@tromey.com>
898
899 * server.c (detach_or_kill_for_exit_cleanup): Remove parameter.
900 (captured_main): Use SCOPE_EXIT.
901
45950eb6
SDJ
9022019-03-04 Sergio Durigan Junior <sergiodj@redhat.com>
903
904 * configure.srv: Use '$enable_unittest' instead of '$development'
905 when checking whether to fill 'srv_regobj' on 'aarch64*-*-linux*'
906 case.
907
43ac54fc
TT
9082019-02-27 Tom Tromey <tromey@adacore.com>
909
910 * gdbreplay.c (logchar): Handle \r\n.
911
df0da8a2
AH
9122019-02-07 Alan Hayward <alan.hayward@arm.com>
913
914 * linux-low.c (linux_attach): Add process before lwp.
915 * server.c (attach_inferior): Check if already attached.
916
1a5c2598
TT
9172019-02-07 Tom Tromey <tom@tromey.com>
918
919 * x86-tdesc.h: Rename include guard.
920 * x86-low.h: Add include guard.
921 * wincecompat.h: Rename include guard.
922 * win32-low.h: Add include guard.
923 * utils.h: Rename include guard.
924 * tracepoint.h: Rename include guard.
925 * tdesc.h: Rename include guard.
926 * target.h: Rename include guard.
927 * server.h: Rename include guard.
928 * remote-utils.h: Rename include guard.
929 * regcache.h: Rename include guard.
930 * nto-low.h: Rename include guard.
931 * notif.h: Add include guard.
932 * mem-break.h: Rename include guard.
933 * lynx-low.h: Add include guard.
934 * linux-x86-tdesc.h: Add include guard.
935 * linux-s390-tdesc.h: Add include guard.
936 * linux-ppc-tdesc-init.h: Add include guard.
937 * linux-low.h: Add include guard.
938 * linux-aarch64-tdesc.h: Add include guard.
939 * linux-aarch32-low.h: Add include guard.
940 * inferiors.h: Rename include guard.
941 * i387-fp.h: Rename include guard.
942 * hostio.h: Rename include guard.
943 * gdbthread.h: Rename include guard.
944 * gdb_proc_service.h: Rename include guard.
945 * event-loop.h: Rename include guard.
946 * dll.h: Rename include guard.
947 * debug.h: Rename include guard.
948 * ax.h: Rename include guard.
949
956cc47c
SN
9502018-01-30 Szabolcs Nagy <szabolcs.nagy@arm.com>
951
952 PR gdb/23985
953 * Makefile.in (IPAGENT_CFLAGS): Add UNDO_GNULIB_CFLAGS.
954 (UNDO_GNULIB_CFLAGS): Undo gnulib replacements.
955
a0707f3c
TT
9562019-01-25 Tom Tromey <tom@tromey.com>
957
958 * Makefile.in (INCLUDE_CFLAGS): Don't add -I for common.
959
0747795c
TT
9602019-01-25 Tom Tromey <tom@tromey.com>
961
962 * win32-low.c: Fix common/ includes.
963 * win32-i386-low.c: Fix common/ includes.
964 * tracepoint.c: Fix common/ includes.
965 * thread-db.c: Fix common/ includes.
966 * target.h: Fix common/ includes.
967 * symbol.c: Fix common/ includes.
968 * spu-low.c: Fix common/ includes.
969 * server.h: Fix common/ includes.
970 * server.c: Fix common/ includes.
971 * remote-utils.c: Fix common/ includes.
972 * regcache.h: Fix common/ includes.
973 * regcache.c: Fix common/ includes.
974 * nto-x86-low.c: Fix common/ includes.
975 * notif.h: Fix common/ includes.
976 * mem-break.h: Fix common/ includes.
977 * lynx-low.c: Fix common/ includes.
978 * lynx-i386-low.c: Fix common/ includes.
979 * linux-x86-tdesc-selftest.c: Fix common/ includes.
980 * linux-x86-low.c: Fix common/ includes.
981 * linux-low.c: Fix common/ includes.
982 * inferiors.h: Fix common/ includes.
983 * i387-fp.c: Fix common/ includes.
984 * hostio.c: Fix common/ includes.
985 * hostio-errno.c: Fix common/ includes.
986 * gdbthread.h: Fix common/ includes.
987 * gdbreplay.c: Fix common/ includes.
988 * fork-child.c: Fix common/ includes.
989 * event-loop.c: Fix common/ includes.
990 * ax.c:
991 (enum gdb_agent_op): Fix common/ includes.
992
be6d4f74
TT
9932019-01-21 Tom Tromey <tom@tromey.com>
994
995 * tracepoint.c: Fix includes.
996 * remote-utils.c: Fix includes.
997 * linux-x86-low.c: Fix includes.
998
66d91b39
JB
9992019-01-01 Joel Brobecker <brobecker@adacore.com>
1000
1001 * gdbreplay.c (gdbreplay_version): Update copyright year in
1002 version message.
1003 * server.c (gdbserver_version): Likewise.
1004
754e3168
AH
10052018-12-05 Alan Hayward <alan.hayward@arm.com>
1006
1007 * linux-low.c (add_lwp): Switch ordering.
1008
d105de22
TT
10092018-11-29 Tom Tromey <tom@tromey.com>
1010
1011 * win32-low.c (win32_join): Take pid, not process.
1012 * target.h (struct target_ops) <join>: Change argument type.
1013 (join_inferior): Change argument name.
1014 * spu-low.c (spu_join): Take pid, not process.
1015 * server.c (handle_detach): Preserve pid before destroying
1016 process.
1017 * lynx-low.c (lynx_join): Take pid, not process.
1018 * linux-low.c (linux_join): Take pid, not process.
1019
50138245
AH
10202018-11-23 Alan Hayward <alan.hayward@arm.com>
1021
1022 * linux-aarch64-low.c (aarch64_cannot_store_register): Remove.
1023 (aarch64_cannot_fetch_register): Likewise.
1024 (struct linux_target_ops): Update references.
1025
64f57f3d
PFC
10262018-10-31 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1027
1028 * linux-ppc-low.c: Include nat/linux-ptrace.h.
1029
8d619c01
EBM
10302018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1031
1032 * configure.srv (ipa_ppc_linux_regobj): Add
1033 powerpc-isa207-htm-vsx32l-ipa.o and
1034 powerpc-isa207-htm-vsx64l-ipa.o.
1035 (powerpc*-*-linux*): Add powerpc-isa207-htm-vsx32l.o and
1036 powerpc-isa207-htm-vsx64l.o to srv_regobj. Add
1037 rs6000/power-htm-spr.xml, rs6000/power-htm-core.xml,
1038 rs6000/power64-htm-core.xml, rs6000/power-htm-fpu.xml,
1039 rs6000/power-htm-altivec.xml, rs6000/power-htm-vsx.xml,
1040 rs6000/power-htm-ppr.xml, rs6000/power-htm-dscr.xml,
1041 rs6000/power-htm-tar.xml, rs6000/powerpc-isa207-htm-vsx32l.xml,
1042 and rs6000/powerpc-isa207-htm-vsx64l.xml to srv_xmlfiles.
1043 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
1044 <PPC_TDESC_ISA207_HTM_VSX>: New enum value.
1045 (init_registers_powerpc_isa207_htm_vsx32l)
1046 (init_registers_powerpc_isa207_htm_vsx64l): Declare.
1047 * linux-ppc-low.c (ppc_fill_tm_sprregset, ppc_store_tm_sprregset)
1048 (ppc_store_tm_cgprregset, ppc_store_tm_cfprregset)
1049 (ppc_store_tm_cvrregset, ppc_store_tm_cvsxregset)
1050 (ppc_store_tm_cpprregset, ppc_store_tm_cdscrregset)
1051 (ppc_store_tm_ctarregset): New functions.
1052 (ppc_regsets): Add entries for HTM regsets.
1053 (ppc_arch_setup): Set htm in features struct when needed. Set
1054 sizes for the HTM regsets.
1055 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_HTM_VSX.
1056 (initialize_low_arch): Call
1057 init_registers_powerpc_isa207_htm_vsx32l and
1058 init_registers_powerpc_isa207_htm_vsx64l.
1059 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
1060 PPC_TDESC_ISA207_HTM_VSX.
1061 (initialize_low_tracepoint): Call
1062 init_registers_powerpc_isa207_htm_vsx32l and
1063 init_registers_powerpc_isa207_htm_vsx64l.
1064
232bfb86
EBM
10652018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1066
1067 * configure.srv (powerpc*-*-linux*): Add rs6000/power-ebb.xml and
1068 rs6000/power-linux-pmu.xml to srv_xmlfiles.
1069 * linux-ppc-low.c (ppc_store_ebbregset, ppc_fill_pmuregset)
1070 (ppc_store_pmuregset): New functions.
1071 (ppc_regsets): Add entries for ebb and pmu regsets.
1072 (ppc_arch_setup): Set isa207 in features struct if the ebb and
1073 pmu regsets are available. Set sizes for these regsets.
1074
f2cf6173
EBM
10752018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1076
1077 * configure.srv (ipa_ppc_linux_regobj): Add
1078 powerpc-isa207-vsx64l-ipa.o and powerpc-isa207-vsx32l-ipa.o.
1079 (powerpc*-*-linux*): Add powerpc-isa207-vsx32l.o and
1080 powerpc-isa207-vsx64l.o to srv_regobj, add rs6000/power-tar.xml,
1081 rs6000/powerpc-isa207-vsx32l.xml, and
1082 rs6000/powerpc-isa207-vsx64l.xml to srv_xmlfiles.
1083 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
1084 <PPC_TDESC_ISA207_VSX>: New enum value.
1085 (init_registers_powerpc_isa207_vsx32l): Declare.
1086 (init_registers_powerpc_isa207_vsx64l): Declare.
1087 * linux-ppc-low.c (ppc_fill_tarregset): New function.
1088 (ppc_store_tarregset): New function.
1089 (ppc_regsets): Add entry for the TAR regset.
1090 (ppc_arch_setup): Set isa207 in features struct when needed. Set
1091 size for the TAR regsets.
1092 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_VSX.
1093 (initialize_low_arch): Call init_registers_powerpc_isa207_vsx32l
1094 and init_registers_powerpc_isa207_vsx64l.
1095 * linux-ppc-ipa.c (get_ipa_tdesc): Handle PPC_TDESC_ISA207_VSX.
1096 (initialize_low_tracepoint): Call
1097 init_registers_powerpc_isa207_vsx32l and
1098 init_registers_powerpc_isa207_vsx64l.
1099
7ca18ed6
EBM
11002018-10-26 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
1101 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1102
1103 * configure.srv (ipa_ppc_linux_regobj): Add
1104 powerpc-isa205-ppr-dscr-vsx32l-ipa.o and
1105 powerpc-isa205-ppr-dscr-vsx64l-ipa.o.
1106 (powerpc*-*-linux*): Add powerpc-isa205-ppr-dscr-vsx32l.o and
1107 powerpc-isa205-ppr-dscr-vsx64l.o to srv_regobj, add
1108 rs6000/power-dscr.xml, rs6000/power-ppr.xml,
1109 rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml and
1110 rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml to srv_xmlfiles.
1111 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
1112 <PPC_TDESC_ISA205_PPR_DSCR_VSX>: New enum value.
1113 (init_registers_powerpc_isa205_ppr_dscr_vsx32l)
1114 (init_registers_powerpc_isa205_ppr_dscr_vsx64l): Declare.
1115 * linux-ppc-low.c: Include "elf/common.h" and <sys/uio.h>.
1116 (ppc_hwcap): Add comment.
1117 (ppc_hwcap2): New global.
1118 (ppc_check_regset, ppc_fill_pprregset, ppc_store_pprregset)
1119 (ppc_fill_dscrregset, ppc_store_dscrregset): New functions.
1120 (ppc_regsets): Add entries for the DSCR and PPR regsets.
1121 (ppc_arch_setup): Get AT_HWCAP2. Set ppr_dscr in features struct
1122 when needed. Set sizes for the the DSCR and PPR regsets.
1123 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA205_PPR_DSCR_VSX.
1124 (initialize_low_arch): Call
1125 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
1126 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
1127 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
1128 PPC_TDESC_ISA205_PPR_DSCR_VSX.
1129 (initialize_low_tracepoint): Call
1130 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
1131 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
1132
5c849b22
PFC
11332018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1134
1135 * linux-ppc-low.c (ppc_fill_vrregset): Remove memset calls.
1136
8ecfd7bd
SDJ
11372018-10-10 Sergio Durigan Junior <sergiodj@redhat.com>
1138 Simon Marchi <simark@simark.ca>
1139
1140 * acinclude.m4: Include "../selftest.m4".
1141 * configure: Regenerate.
1142 * configure.ac: Use "GDB_AC_SELFTEST".
1143 * configure.srv: Use "$enable_unittests" instead of
1144 "$development" when checking whether unit tests have been
1145 enabled.
1146 * server.c (captured_main): Update message informing that
1147 selftests have been disabled.
1148
96643e35
TT
11492018-10-04 Tom Tromey <tom@tromey.com>
1150
1151 * configure: Rebuild.
1152
da4ae14a
TT
11532018-10-04 Tom Tromey <tom@tromey.com>
1154
1155 * server.c (handle_status): Rename inner "thread".
1156 (process_serial_event): Declare "res" in 'm' case.
1157 * linux-low.c (last_thread_of_process_p, find_lwp_pid)
1158 (iterate_over_lwps): Rename inner "thread".
1159 (linux_qxfer_libraries_svr4): Rename inner "len".
1160 * gdbthread.h (find_thread_in_random): Rename inner "thread".
1161
7c619dbd
GB
11622018-10-01 Gary Benson <gbenson@redhat.com>
1163
1164 * gdb_proc_service.h: Moved common code to
1165 common/gdb_proc_service.h.
1166
3795e814
GB
11672018-10-01 Gary Benson <gbenson@redhat.com>
1168
1169 * gdb_proc_service.h: Synchronize comments and whitespace with
1170 GDB's version of this file.
1171
49b036f1
TT
11722018-09-25 Tom Tromey <tom@tromey.com>
1173
1174 * configure: Rebuild.
1175 * configure.ac (WARN_CFLAGS): Don't remove -Wmissing-prototypes.
1176
8ff03f0b
SM
11772018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
1178
1179 * Makefile.in (gdbserver$(EXEEXT)): Sort OBS.
1180 (gdbreplay$(EXEEXT)): Sort GDBREPLAY_OBS.
1181 ($(IPA_LIB)): Sort IPA_OBJS.
1182
a1cd91dc
SM
11832018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
1184
1185 * Makefile.in: Remove references to $(ADD_DEPS).
1186
752312ba
TT
11872018-09-16 Tom Tromey <tom@tromey.com>
1188
1189 * remote-utils.c (remote_open): Use GNU style for metasyntactic
1190 variables.
1191 * gdbreplay.c (gdbreplay_usage): Use GNU style for metasyntactic
1192 variables.
1193
f1628857
TT
11942018-09-05 Tom Tromey <tom@tromey.com>
1195
1196 * configure: Rebuild.
1197
ad202fcc
SM
11982018-08-28 Simon Marchi <simon.marchi@polymtl.ca>
1199
1200 PR build/23399
1201 * tracepoint.c (IPA_SYM_STRUCT_NAME): Define.
1202
d3d8724a
TT
12032018-08-27 Tom Tromey <tom@tromey.com>
1204
1205 PR build/23087:
1206 * configure: Rebuild.
1207
b4f183d2
TT
12082018-08-27 Tom Tromey <tom@tromey.com>
1209
1210 * linux-s390-low.c (s390_emit_ext, s390_emit_litpool)
1211 (s390_emit_const, s390_emit_reg, s390_emit_zero_ext)
1212 (s390_emit_stack_adjust, s390_emit_set_r2, s390x_emit_ext)
1213 (s390x_emit_const, s390x_emit_reg, s390x_emit_zero_ext)
1214 (s390x_emit_stack_adjust): Add casts to unsigned char.
1215
4e2aa472
SM
12162018-08-22 Simon Marchi <simon.marchi@ericsson.com>
1217
1218 PR gdb/23374
1219 PR gdb/23375
1220 * server.h (struct client_state) <disable_randomization>:
1221 Initialize to 1.
1222
cf4088a9
SM
12232018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
1224
1225 * linux-mips-low.c (mips_collect_ptrace_register): Remove unused
1226 variable.
1227 (mips_supply_ptrace_register): Likewise.
1228
a0de763e
TT
12292018-07-22 Tom Tromey <tom@tromey.com>
1230
1231 * configure: Rebuild.
1232
b0a7723d
TT
12332018-07-22 Tom Tromey <tom@tromey.com>
1234
1235 * win32-low.c (win32_create_inferior): Remove unused variables.
1236 * gdbreplay.c (remote_open): Remove unused variable.
1237 * remote-utils.c (remote_prepare): Remove unused variable.
1238 * x86-tdesc.h (X86_TDESC_H): Define.
1239 (amd64_expedite_regs): Define conditionally.
1240 (i386_expedite_regs): Mark ATTRIBUTE_UNUSED.
1241 * linux-x86-tdesc.c (i386_tdescs): Move inside #if.
1242 * remote-utils.c (readchar): Remove unused variable.
1243
a780ef4f
PA
12442018-07-13 Pedro Alves <palves@redhat.com>
1245
1246 * linux-low.c (linux_kill): Change parameter to process_info
1247 pointer instead of pid. Adjust.
1248 * lynx-low.c (lynx_kill): Likewise.
1249 * nto-low.c (nto_kill): Likewise.
1250 * spu-low.c (spu_kill): Likewise.
1251 * win32-low.c (win32_kill): Likewise.
1252 * server.c (handle_v_kill, kill_inferior_callback)
1253 (detach_or_kill_for_exit): Adjust.
1254 * target.c (kill_inferior): Change parameter to process_info
1255 pointer instead of pid. Adjust.
1256 * target.h (struct target_ops) <kill>: Change parameter to
1257 process_info pointer instead of pid. Adjust all implementations
1258 and callers.
1259 (kill_inferior): Likewise.
1260
ef2ddb33
PA
12612018-07-13 Pedro Alves <palves@redhat.com>
1262
1263 * linux-low.c (linux_detach, linux_join): Change parameter to
1264 process_info pointer instead of pid. Adjust.
1265 * lynx-low.c (lynx_detach, lynx_join): Likewise.
1266 * nto-low.c (nto_detach): Likewise.
1267 * spu-low.c (spu_detach, spu_join): Likewise.
1268 * win32-low.c (win32_detach, win32_join): Likewise.
1269 * server.c (handle_detach, detach_or_kill_for_exit): Adjust.
1270 * target.h (struct target_ops) <detach, join>: Change parameter to
1271 process_info pointer instead of pid. Adjust all implementations
1272 and callers.
1273 (detach_inferior, join_inferior): Rename 'pid' parameter to
1274 'proc'.
1275
c7ab0aef
SDJ
12762018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
1277 Jan Kratochvil <jan.kratochvil@redhat.com>
1278 Paul Fertser <fercerpav@gmail.com>
1279 Tsutomu Seki <sekiriki@gmail.com>
1280
1281 * Makefile.in (SFILES): Add '$(srcdir)/common/netstuff.c'.
1282 (OBS): Add 'common/netstuff.o'.
1283 (GDBREPLAY_OBS): Likewise.
1284 * gdbreplay.c: Include 'wspiapi.h' and 'netstuff.h'.
1285 (remote_open): Implement support for IPv6
1286 connections.
1287 * remote-utils.c: Include 'netstuff.h', 'filestuff.h'
1288 and 'wspiapi.h'.
1289 (handle_accept_event): Accept connections from IPv6 sources.
1290 (remote_prepare): Handle IPv6-style hostnames; implement
1291 support for IPv6 connections.
1292 (remote_open): Implement support for printing connections from
1293 IPv6 sources.
1294
31445d10
PA
12952018-07-11 Pedro Alves <palves@redhat.com>
1296
1297 PR gdb/23377
1298 * mem-break.c (any_persistent_commands): Add process_info
1299 parameter and use it instead of relying on the current process.
1300 Change return type to bool.
1301 * mem-break.h (any_persistent_commands): Add process_info
1302 parameter and change return type to bool.
1303 * server.c (handle_detach): Remove require_running_or_return call.
1304 Look up the process_info for the process we're about to detach.
1305 If not found, return back error to GDB. Adjust
1306 any_persistent_commands call to pass down a process pointer.
1307
cb197132
PA
13082018-07-11 Pedro Alves <palves@redhat.com>
1309
1310 * i387-fp.c (i387_cache_to_fsave, cache_to_fxsave)
1311 (i387_cache_to_xsave): Use regcache_raw_get_unsigned_by_name
1312 instead of collect_register_by_name.
1313 * regcache.c (regcache_raw_get_unsigned_by_name): New.
1314 * regcache.h (regcache_raw_get_unsigned_by_name): New.
1315
1b919490
VB
13162018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
1317 Pedro Alves <palves@redhat.com>
1318
1319 * linux-low.c (initialize_low): Call linux_proc_init_warnings.
1320
d7e15655
TT
13212018-07-03 Tom Tromey <tom@tromey.com>
1322
1323 * linux-low.c: Update.
1324 * lynx-low.c: Update.
1325 * mem-break.c: Update.
1326 * nto-low.c: Update.
1327 * remote-utils.c: Update.
1328 * server.c: Update.
1329 * spu-low.c: Update.
1330 * target.c: Update.
1331 * win32-low.c: Update.
1332
26a57c92
TT
13332018-07-03 Tom Tromey <tom@tromey.com>
1334
1335 * server.c: Update.
1336
0e998d96
TT
13372018-07-03 Tom Tromey <tom@tromey.com>
1338
1339 * linux-low.c: Update.
1340
cc6bcb54
TT
13412018-07-03 Tom Tromey <tom@tromey.com>
1342
1343 * target.c: Update.
1344
e38504b3
TT
13452018-07-03 Tom Tromey <tom@tromey.com>
1346
1347 * linux-low.c: Update.
1348 * linux-mips-low.c: Update.
1349 * lynx-low.c: Update.
1350 * nto-low.c: Update.
1351 * remote-utils.c: Update.
1352 * server.c: Update.
1353 * spu-low.c: Update.
1354 * target.c: Update.
1355 * thread-db.c: Update.
1356
e99b03dc
TT
13572018-07-03 Tom Tromey <tom@tromey.com>
1358
1359 * linux-low.c: Update.
1360 * linux-mips-low.c: Update.
1361 * lynx-low.c: Update.
1362 * mem-break.c: Update.
1363 * nto-low.c: Update.
1364 * remote-utils.c: Update.
1365 * server.c: Update.
1366 * spu-low.c: Update.
1367 * target.c: Update.
1368 * tracepoint.c: Update.
1369
f2907e49
TT
13702018-07-03 Tom Tromey <tom@tromey.com>
1371
1372 * linux-low.c: Update.
1373 * linux-ppc-low.c: Update.
1374 * linux-x86-low.c: Update.
1375 * proc-service.c: Update.
1376 * server.c: Update.
1377 * spu-low.c: Update.
1378 * thread-db.c: Update.
1379 * win32-low.c: Update.
1380
fd79271b
TT
13812018-07-03 Tom Tromey <tom@tromey.com>
1382
1383 * linux-low.c: Update.
1384 * lynx-low.c: Update.
1385 * nto-low.c: Update.
1386 * remote-utils.c: Update.
1387 * spu-low.c: Update.
1388 * thread-db.c: Update.
1389 * win32-low.c: Update.
1390
c0867626
SDJ
13912018-06-29 Joel Brobecker <brobecker@adacore.com>
1392
1393 * linux-x86-tdesc.c (amd64_linux_read_description): Add missing
1394 parameter in call to 'amd64_create_target_description'.
1395
2512d7ef
JK
13962018-06-28 Jan Kratochvil <jan.kratochvil@redhat.com>
1397
1398 * x86-tdesc.h: Remove executable permission flag.
1399
d0ac1c44
SM
14002018-06-19 Simon Marchi <simon.marchi@ericsson.com>
1401
1402 * configure.ac: Remove AC_PREREQ, add missing quoting.
1403 * configure: Re-generate.
1404 * config.in: Re-generate.
1405 * aclocal.m4: Re-generate.
1406
c4eb05ff
SM
14072018-06-18 Simon Marchi <simon.marchi@ericsson.com>
1408
1409 * tracepoint.h (current_traceframe): Remove declaration.
1410
02895270
AH
14112018-06-18 Alan Hayward <alan.hayward@arm.com>
1412
1413 * linux-aarch64-low.c (is_sve_tdesc): New function.
1414 (aarch64_sve_regs_copy_to_regcache): Likewise.
1415 (aarch64_sve_regs_copy_from_regcache): Likewise.
1416 (aarch64_regs_info): Add SVE checks.
1417 (initialize_low_arch): Initialize SVE.
1418
e9902bfc
AH
14192018-06-18 Alan Hayward <alan.hayward@arm.com>
1420
1421 * Makefile.in: Add aarch64-sve-linux-ptrace.c.
1422
fefa175e
AH
14232018-06-11 Alan Hayward <alan.hayward@arm.com>
1424
1425 * linux-aarch64-ipa.c (get_ipa_tdesc): Add null VQ param.
1426 (initialize_low_tracepoint): Likewise
1427 * linux-aarch64-low.c (aarch64_arch_setup): Get VQ.
1428 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Add null VQ
1429 param.
1430 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add VQ
1431 checks.
1432 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Add VQ.
1433
b91ad3ff
AH
14342018-06-11 Alan Hayward <alan.hayward@arm.com>
1435
1436 * server.h (PBUFSIZ): Increase size
1437
f868386e
AH
14382018-06-11 Alan Hayward <alan.hayward@arm.com>
1439
1440 * regcache.c (regcache::raw_compare): New function.
1441 * regcache.h (regcache::raw_compare): New declaration.
1442
9c861883
AH
14432018-06-11 Alan Hayward <alan.hayward@arm.com>
1444
1445 * regcache.c (new_register_cache): Use new.
1446 (free_register_cache): Use delete.
1447 (register_data): Use const.
1448 (supply_register): Move body inside regcache.
1449 (regcache::raw_supply): New override function.
1450 (collect_register): Move body inside regcache.
1451 (regcache::raw_collect): New override function.
1452 (regcache::get_register_status): New override function.
1453 * regcache.h (struct regcache): Inherit from reg_buffer_common.
1454
40591844
TT
14552018-06-09 Tom Tromey <tom@tromey.com>
1456
1457 * event-loop.c (gdb_event, gdb_event_p): Remove typedefs. Don't
1458 declare queue.
1459 (event_queue): Use std::queue.
1460 (gdb_event_xfree): Remove.
1461 (initialize_event_loop, process_event, wait_for_event): Update.
1462
6341380d
SC
14632018-06-08 Stan Cox <scox@redhat.com>
1464
1465 * win32-low.c (win32_create_inferior): last_ptid and last_status
1466 moved to client_state.
1467
03349c93
PA
14682018-06-08 Pedro Alves <palves@redhat.com>
1469
1470 * Makefile.in (GDBREPLAY_OBS): Add common/cleanups.o,
1471 common/common-exceptions.o, common/common-utils.o,
1472 common/errors.o, common/print-utils.o and utils.o.
1473 * gdbreplay.c: Include "common-defs.h" instead of the two
1474 'config.h's here. Don't include stdio.h, errno.h, stdlib.h,
1475 string.h or alloca.h.
1476 (perror_with_name): Delete.
1477 (remote_open): Use xstrdup instead of strdup.
1478 (main): Rename to ...
1479 (captured_main): ... this.
1480 (main): New.
1481
8dcc53b3
TT
14822018-06-08 Tom Tromey <tom@tromey.com>
1483
1484 * linux-low.c (linux_low_read_btrace): Update.
1485
c12a5089
SC
14862018-06-04 Stan Cox <scox@redhat.com>
1487
1488 * server.h (struct client_state): New.
1489 * server.c (cont_thread, general_thread, multi_process)
1490 (report_fork_events, report_vfork_events, report_exec_events)
1491 (report_thread_events, swbreak_feature, hwbreak_feature)
1492 (vCont_supported, disable_randomization, pass_signals)
1493 (program_signals, program_signals_p, last_status, last_ptid, own_buf):
1494 Moved to client_state.
1495 * remote-utils.c (remote_debug, noack_mode)
1496 (transport_is_reliable): Moved to client_state.
1497 * tracepoint.c (current_traceframe): Moved to client_state.
1498
1499 Update all callers.
1500 * server.c, remote-utils.c, tracepoint.c, fork-child.c,
1501 linux-low.c, remote-utils.h, target.c: Use client_state.
1502
122394f1
AH
15032018-05-31 Alan Hayward <alan.hayward@arm.com>
1504
1505 * configure.srv: Add new c/h file.
1506
95228a0d
AH
15072018-05-31 Alan Hayward <alan.hayward@arm.com>
1508
1509 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add
1510 null VQ.
1511
d8dab6c3
MR
15122018-05-25 Maciej W. Rozycki <macro@mips.com>
1513
1514 * gdb.arch/mips-fpregset-core.exp: New test.
1515 * gdb.arch/mips-fpregset-core.c: New test source.
1516
81e25b7c
EK
15172018-05-23 Erik Kurzinger <ekurzinger@nvidia.com>
1518
1519 PR server/23198
1520 * hostio.c (require_int): Do not report overflow for integers
1521 between 0xfffffff and 0x7fffffff.
1522
7e947ad3
MR
15232018-05-22 Maciej W. Rozycki <macro@mips.com>
1524
1525 * linux-mips-low.c [HAVE_PTRACE_GETREGS] (mips_collect_register)
1526 (mips_supply_register): Move outside HAVE_PTRACE_GETREGS.
1527 (mips_collect_ptrace_register, mips_supply_ptrace_register): New
1528 functions.
1529 (the_low_target): Wire them.
1530
1d75a658
PFC
15312018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1532
1533 * linux-ppc-low.c (ppc_fill_vrregset): Add vscr_offset variable.
1534 Set vscr_offset to 0 in little-endian mode and 12 in big-endian
1535 mode. Call collect_register_by_name with vscr using
1536 vscr_offset. Zero-pad vscr and vrsave fields in collector buffer.
1537 (ppc_store_vrregset): Add and set vscr_offset variable as in
1538 ppc_fill_vrregset. Call supply_register_by_name with vscr using
1539 vscr_offset.
1540
d078308a
PFC
15412018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1542
1543 * linux-ppc-low.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
1544 (ppc_arch_setup): Change SIZEOF_VRREGS and SIZEOF_VSXREGS to
1545 PPC_LINUX_SIZEOF_VRREGSET and PPC_LINUX_SIZEOF_VSXREGSET.
1546
7273b5fc
PFC
15472018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1548
1549 * linux-ppc-low.c (ppc_fill_vsxregset): Remove ppc_hwcap check.
1550 (ppc_store_vsxregset): Likewise.
1551 (ppc_fill_vrregset): Likewise.
1552 (ppc_store_vrregset): Likewise.
1553 (ppc_fill_evrregset): Likewise.
1554 (ppc_store_evrregset): Likewise.
1555 (ppc_regsets): Set VSX/VR/EVR regset sizes to 0.
1556 (ppc_arch_setup): Iterate through ppc_regsets and set sizes when
1557 needed.
1558
2e077f5e
PFC
15592018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1560
1561 * linux-ppc-low.c (ppc_arch_setup): Remove code for getting the
1562 wordsize of the inferior. Call ppc_linux_target_wordsize.
1563
bd64614e
PFC
15642018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1565
1566 * configure.srv (srv_tgtobj): Add arch/ppc-linux-common.o.
1567 * Makefile.in (SFILES): Add arch/ppc-linux-common.c.
1568 * linux-ppc-tdesc.h: Rename to linux-ppc-tdesc-init.h.
1569 * linux-ppc-tdesc-init.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
1570 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
1571 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
1572 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
1573 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
1574 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
1575 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
1576 (tdesc_powerpc_e500l): Remove.
1577 * linux-ppc-ipa.c: Include arch/ppc-linux-tdesc.h and
1578 linux-ppc-tdesc-init.h. Don't include linux-ppc-tdesc.h.
1579 * linux-ppc-low.c: Include arch/ppc-linux-common.h,
1580 arch/ppc-linux-tdesc.h, and linux-ppc-tdesc-init.h. Don't include
1581 linux-ppc-tdesc.h.
1582 (ppc_arch_setup): Remove target description matching code. Fill a
1583 ppc_linux_features struct and call ppc_linux_match_description
1584 with it.
1585
75d74cca
MR
15862018-05-22 Maciej W. Rozycki <macro@mips.com>
1587
1588 * linux-mips-low.c (mips_cannot_fetch_register): Return 1 if the
1589 width of the requested register exceeds the width of the
1590 `ptrace' data type.
1591 (mips_cannot_store_register): Likewise.
1592
e4439e43
MR
15932018-05-21 Maciej W. Rozycki <macro@mips.com>
1594
1595 * linux-mips-low.c (mips_fetch_register): New function. Update
1596 preceding comment.
1597 (mips_store_gregset): Supply 0 rather than $restart for $zero.
1598 (the_low_target): Wire `mips_fetch_register'.
1599
55271bf9
JB
16002018-05-10 Joel Brobecker <brobecker@adacore.com>
1601
1602 * lynx-i386-low.c (LYNXOS_178): New macro.
1603 [LYNXOS_178] (usr_fcontext_t): Provide a definition that matches
1604 the layout on LynxOS-178.
1605 (lynx_i386_fill_fpregset, lynx_i386_store_fpregset): Do not
1606 handle floating point registers that are not supported by
1607 LynxOS-178.
1608
1a34f210
TT
16092018-05-10 Tom Tromey <tom@tromey.com>
1610
1611 * configure: Rebuild.
1612
190852c8
JB
16132018-05-10 Joel Brobecker <brobecker@adacore.com>
1614
1615 PR server/23158:
1616 * tdesc.h (init_target_desc) <expedite_regs>: New parameter.
1617 * tdesc.c (init_target_desc) <expedite_regs>: New parameter.
1618 Use it to set the expedite_regs field in the given tdesc.
1619 * x86-tdesc.h: New file.
1620 * linux-aarch64-tdesc.c (aarch64_linux_read_description):
1621 Adjust following the addition of the new expedite_regs parameter
1622 to init_target_desc.
1623 * linux-tic6x-low.c (tic6x_read_description): Likewise.
1624 * linux-x86-tdesc.c: #include "x86-tdesc.h".
1625 (i386_linux_read_description, amd64_linux_read_description):
1626 Adjust following the addition of the new expedite_regs parameter
1627 to init_target_desc.
1628 * lynx-i386-low.c: #include "x86-tdesc.h".
1629 (lynx_i386_arch_setup): Adjust following the addition of the new
1630 expedite_regs parameter to init_target_desc.
1631 * nto-x86-low.c: #include "x86-tdesc.h".
1632 (nto_x86_arch_setup): Adjust following the addition of the new
1633 expedite_regs parameter to init_target_desc.
1634 * win32-i386-low.c: #include "x86-tdesc.h".
1635 (i386_arch_setup): Adjust following the addition of the new
1636 expedite_regs parameter to init_target_desc.
1637
7dbac825
JB
16382018-05-10 Joel Brobecker <brobecker@adacore.com>
1639
1640 PR server/23158:
1641 * win32-low.c (win32_create_inferior): Add call to my_wait
1642 setting last_status global.
1643
906994d9
JB
16442018-05-10 Joel Brobecker <brobecker@adacore.com>
1645
1646 PR server/23158:
1647 * win32-low.c (create_process): Only call gdb_tilde_expand if
1648 inferior_cwd is not NULL.
1649
8ee22052
AB
16502018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
1651
1652 * i387-fp.c (i387_cache_to_xsave): Only write x87 control
1653 registers to the cache if their values have changed.
1654 (i387_xsave_to_cache): Provide default values for x87 control
1655 registers when these features are available, but disabled.
1656 * regcache.c (supply_register_by_name_zeroed): New function.
1657 * regcache.h (supply_register_by_name_zeroed): Declare new
1658 function.
1659
aff689d3
TT
16602018-05-07 Tom Tromey <tom@tromey.com>
1661
1662 * configure: Rebuild.
1663
85e26832
TT
16642018-05-04 Tom Tromey <tom@tromey.com>
1665
1666 * configure: Rebuild.
1667
a3b60e45
JK
16682018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
1669 Pedro Alves <palves@redhat.com>
1670
1671 * linux-aarch64-low.c (aarch64_stopped_data_address):
1672 Likewise.
1673
632e107b
TT
16742018-04-27 Tom Tromey <tom@tromey.com>
1675
1676 * configure: Rebuild.
1677
458412c3
TT
16782018-04-23 Tom Tromey <tom@tromey.com>
1679
1680 * configure: Rebuild.
1681
f31c089e
SM
16822018-04-19 Simon Marchi <simon.marchi@ericsson.com>
1683
1684 * Makefile.in (depcomp): Add "..".
1685 (all_deps_files): New and use it.
1686
b319b098
AH
16872018-04-18 Alan Hayward <alan.hayward@arm.com>
1688
1689 * configure.srv (aarch64*-*-linux*): Don't include xml.
1690 (i[34567]86-*-cygwin*): Likewise.
1691 (i[34567]86-*-linux*): Likewise.
1692 (i[34567]86-*-lynxos*): Likewise.
1693 (i[34567]86-*-mingw32ce*): Likewise.
1694 (i[34567]86-*-mingw*): Likewise.
1695 (i[34567]86-*-nto*): Likewise.
1696 (tic6x-*-uclinux): Likewise.
1697 (x86_64-*-linux*): Likewise.
1698 (x86_64-*-mingw*): Likewise.
1699 (x86_64-*-cygwin*): Likewise.
1700
3b74854b
AH
17012018-04-18 Alan Hayward <alan.hayward@arm.com>
1702
1703 * tdesc.c: Remove xml parameter.
1704
e98577a9
AH
17052018-04-18 Alan Hayward <alan.hayward@arm.com>
1706
1707 * server.c (get_features_xml): Remove cast.
1708 * tdesc.c (void target_desc::accept): Fill in function.
1709 (tdesc_get_features_xml): Remove old xml creation.
1710 (print_xml_feature::visit_pre): Add xml vistor.
1711 * tdesc.h (struct target_desc): Make xmltarget mutable.
1712 (tdesc_get_features_xml): Remove declaration.
1713
d278f585
AH
17142018-04-18 Alan Hayward <alan.hayward@arm.com>
1715
1716 * tdesc.c (tdesc_architecture_name): Add new function.
1717 (tdesc_osabi_name): Likewise.
1718 (tdesc_get_features_xml): Use new functions.
1719
eee8a18d
AH
17202018-04-18 Alan Hayward <alan.hayward@arm.com>
1721
1722 * tdesc.c (tdesc_create_flags): Remove.
1723 (tdesc_add_flag): Likewise.
1724 (tdesc_named_type): Likewise.
1725 (tdesc_create_union): Likewise.
1726 (tdesc_create_struct): Likewise.
1727 (tdesc_create_vector): Likewise.
1728 (tdesc_add_bitfield): Likewise.
1729 (tdesc_add_field): Likewise.
1730 (tdesc_set_struct_size): Likewise.
1731
82ec9bc7
AH
17322018-04-18 Alan Hayward <alan.hayward@arm.com>
1733
1734 * tdesc.c (~target_desc): Remove implictly deleted items.
1735 (init_target_desc): Iterate all features.
1736 (tdesc_get_features_xml): Use vector.
1737 (tdesc_create_feature): Create feature.
1738 * tdesc.h (tdesc_feature) Remove
1739 (target_desc): Add features.
1740
ea3e7d71
AH
17412018-04-18 Alan Hayward <alan.hayward@arm.com>
1742
1743 * Makefile.in: Add common/tdesc.c
1744 * tdesc.c (init_target_desc): init all reg_defs from register
1745 vector.
1746 (tdesc_create_reg): Create tdesc_reg.
1747 * tdesc.h (tdesc_feature): Add register vector.
1748
17d08cd4
SM
17492018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
1750
1751 * tdesc.h (struct target_desc) <features>: Change type to
1752 std::vector<std::string>.
1753 * tdesc.c (target_desc::~target_desc): Adjust to std::vector
1754 changes.
1755 (tdesc_get_features_xml): Likewise.
1756 (tdesc_create_feature): Likewise.
1757
5cd3e386
AH
17582018-03-26 Alan Hayward <alan.hayward@arm.com>
1759
1760 * regcache.c (find_register_by_number): Return a ref.
1761 (find_regno): Use references.
1762 (register_size): Likewise.
1763 (register_data): Likewise.
1764 * tdesc.c (target_desc::~target_desc): Remove free calls.
1765 (target_desc::operator==): Use std::vector compare.
1766 (init_target_desc): Use reference.
1767 (tdesc_create_reg): Use reg constructors.
1768 * tdesc.h (struct target_desc): Replace pointer with object.
1769
dff7492c
AH
17702018-03-23 Alan Hayward <alan.hayward@arm.com>
1771
1772 * regcache.c (find_register_by_number): Make static.
1773 (find_regno): Use find_register_by_number
1774 * regcache.h (struct reg): Remove declaration.
1775
d80e5242
AH
17762018-03-23 Alan Hayward <alan.hayward@arm.com>
1777
1778 * tdesc.c (target_desc::~target_desc): Move to here.
1779 (target_desc::operator==): Likewise.
1780 * tdesc.h (target_desc::~target_desc): Move from here.
1781 (target_desc::operator==): Likewise.
1782
f69c5afb
AA
17832018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
1784
1785 * linux-s390-low.c (s390_get_wordsize): Correct brace style.
1786
ce29f843
AA
17872018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1788
1789 * linux-s390-ipa.c (get_ipa_tdesc): Add handling for
1790 S390_TDESC_GS.
1791 * linux-s390-low.c (s390_get_ipa_tdesc_idx): Likewise.
1792 (initialize_low_tracepoint): Call init_registers_s390x_gs_linux64
1793 and init_registers_s390_gs_linux64.
1794
c49bd90b
AA
17952018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1796
1797 * linux-s390-low.c (s390_fill_gs): Remove function.
1798 (s390_fill_gsbc): Remove function.
1799 (s390_regsets): Set fill functions for the guarded storage regsets
1800 to NULL.
1801
7edb9bd3
AA
18022018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1803
1804 * linux-s390-low.c (s390_get_hwcap): Replace tdesc parameter by
1805 the word size. Add comment.
1806 (s390_get_wordsize): New function.
1807 (s390_arch_setup): No longer select a temporary tdesc to fetch the
1808 pswm with it. Instead, use s390_get_wordsize to determine the
1809 word size first and derive the correct tdesc from that directly.
1810
39be3c7e
SM
18112018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
1812
1813 * Makefile.in: Include silent-rules.mk.
1814 (srcdir, abs_top_srcdir, abs_srcdir, VPATH): Move up.
1815 (COMPILE): Add ECHO_CXX.
1816 (gdbserver$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
1817 (gdbreplay$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
1818 ($(IPA_LIB)): Add SILENCE and ECHO_CXXLD.
1819 (version-generated.c): Add ECHO_GEN.
1820 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN_GENERATED.
1821 (IPAGENT_COMPILE): Add ECHO_CXX.
1822 (%-generated.c): Add ECHO_REGDAT.
1823
3ae9ce5d
TT
18242018-03-14 Tom Tromey <tom@tromey.com>
1825
1826 PR cli/14977:
1827 * ax.c (ax_printf): Special case for NULL.
1828
e6a58aa8
SM
18292018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
1830
1831 * linux-low.c (linux_qxfer_libraries_svr4): Use
1832 xml_escape_text_append.
1833
f6e8a41e
SM
18342018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
1835
1836 * linux-low.c (linux_qxfer_libraries_svr4): Use std::string.
1837
b9671caf
SM
18382018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
1839
1840 * server.c (handle_general_set): Remove unnecessary xstrdup.
1841
e80aaf61
SM
18422018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
1843
1844 * server.c (parse_debug_format_options): Adjust to
1845 delim_string_to_char_ptr_vec changes.
1846 * thread-db.c (thread_db_load_search): Adjust to
1847 dirnames_to_char_ptr_vec changes.
1848
b1223e78
MM
18492018-03-01 Markus Metzger <markus.t.metzger@intel.com>
1850
1851 * target.h (target_enable_btrace, target_disable_btrace)
1852 (target_read_btrace, target_read_btrace_conf): Turn macro into
1853 inline function. Throw error if target method is not defined.
1854 * server.c (handle_qxfer_btrace handle_qxfer_btrace_conf): Remove
1855 check for btrace target method. Be prepared to handle exceptions
1856 from btrace target methods.
1857
81561546
SDJ
18582018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
1859
1860 * server.c (captured_main): Change order of error message printed
1861 when the current working directory cannot be found.
1862
25e3c82c
SDJ
18632018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
1864
1865 * server.c: Include "filenames.h" and "pathstuff.h".
1866 (program_name): Delete variable.
1867 (program_path): New anonymous class.
1868 (get_exec_wrapper): Use "program_path" instead of
1869 "program_name".
1870 (handle_v_run): Likewise.
1871 (captured_main): Likewise.
1872 (process_serial_event): Likewise.
1873
b4987c95
SDJ
18742018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
1875
1876 * Makefile.in (SFILES): Add "$(srcdir)/common/pathstuff.c".
1877 (OBJS): Add "pathstuff.o".
1878 * server.c (current_directory): New global variable.
1879 (captured_main): Initialize "current_directory".
1880
f46cd62a
AH
18812018-02-26 Alan Hayward <alan.hayward@arm.com>
1882
1883 * tdesc.c: Use common/tdesc.h.
1884 * tdesc.h: Likewise.
1885
a543c5ca
AH
18862018-02-20 Alan Hayward <alan.hayward@arm.com>
1887 Simon Marchi <simon.marchi@ericsson.com>
1888
1889 * Makefile.in: Switch order of make rules.
1890
b5884fa7
AH
18912018-02-19 Alan Hayward <alan.hayward@arm.com>
1892
1893 * Makefile.in: Add common directory in build.
1894 * configure.ac: Add common reference.
1895 * configure: Regenerate.
1896
de6242d3
MM
18972018-02-09 Markus Metzger <markus.t.metzger@intel.com>
1898
1899 * linux-low.c (linux_target_ops): Remove linux_supports_btrace.
1900 * nto-low.c (nto_target_ops): Remove NULL for supports_btrace.
1901 * spu-low.c (spu_target_ops): Likewise.
1902 * win32-low.c (win32_target_ops): Likewise.
1903 * server.c (supported_btrace_packets): Report packets unconditionally.
1904 * target.h (target_ops) <supports_btrace>: Remove.
1905 (target_supports_btrace): Remove.
1906
9ee23a85
MM
19072018-02-09 Markus Metzger <markus.t.metzger@intel.com>
1908
1909 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt)
1910 (handle_btrace_disable): Change return type to void. Use exceptions
1911 to report errors.
1912 (handle_btrace_general_set): Catch exception and copy message to
1913 return message.
1914
8ce47547
TT
19152018-02-08 Tom Tromey <tom@tromey.com>
1916
1917 * linux-low.c (install_software_single_step_breakpoints): Use
1918 make_scoped_restore.
1919 * inferiors.c (make_cleanup_restore_current_thread): Remove.
1920 (do_restore_current_thread_cleanup): Remove.
1921 * gdbthread.h (make_cleanup_restore_current_thread): Don't
1922 declare.
1923
45dd3607
TT
19242018-02-08 Tom Tromey <tom@tromey.com>
1925
1926 * mem-break.c (set_raw_breakpoint_at): Use
1927 gdb::unique_xmalloc_ptr.
1928
e671cd59
PA
19292018-01-30 Pedro Alves <palves@redhat.com>
1930
1931 PR gdb/13211
1932 * target.c (target_terminal::terminal_state): Rename to ...
1933 (target_terminal::m_terminal_state): ... this.
1934
a0aad537
JC
19352018-01-19 James Clarke <jrtc27@jrtc27.com>
1936
1937 * linux-low.c (handle_extended_wait): Surround call to
1938 thread_db_notice_clone with #ifdef USE_THREAD_DB.
1939
4d9b86e1
SM
19402018-01-17 Simon Marchi <simon.marchi@ericsson.com>
1941
1942 * linux-low.c (attach_proc_task_lwp_callback): Adjust to
1943 linux_ptrace_attach_fail_reason_string now returning an
1944 std::string.
1945 (linux_attach): Likewise.
1946 * thread-db.c (attach_thread): Likewise.
1947
f517c180
EA
19482018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
1949
1950 PR gdb/21559
1951 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
1952 checking for fs_base/gs_base fields in struct user_regs_struct.
1953 * configure: Regenerate.
1954
9a70f35c
YQ
19552018-01-16 Yao Qi <yao.qi@linaro.org>
1956
1957 PR gdb/18749
1958 * linux-low.c (fetch_register): Call supply_register instead of
1959 error.
1960
605fd3c6
YQ
19612018-01-08 Yao Qi <yao.qi@linaro.org>
1962 Simon Marchi <simon.marchi@ericsson.com>
1963
1964 * Makefile.in (OBS): Remove selftest.o.
1965 * configure.ac: Set srv_selftest_objs if $development is true.
1966 (GDBSERVER_DEPFILES): Append $srv_selftest_objs.
1967 * configure: Re-generated.
1968 * server.c (captured_main): Wrap variable selftest_filter with
1969 GDB_SELF_TEST.
1970
2cc05030
SM
19712018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
1972
1973 * server.c (parse_debug_format_options): Return std::string.
1974 (handle_monitor_command, captured_main): Adjust.
1975
e379cee6
PA
19762018-01-05 Pedro Alves <palves@redhat.com>
1977
1978 PR gdb/18653
1979 * server.c (captured_main): Pass quiet=false to
1980 save_original_signals_state.
1981
82e1e79a
JB
19822018-01-01 Joel Brobecker <brobecker@adacore.com>
1983
1984 * gdbreplay.c (gdbreplay_version): Update copyright year in
1985 version message.
1986 * server.c (gdbserver_version): Likewise.
1987
8e481c3b
TT
19882017-12-08 Tom Tromey <tom@tromey.com>
1989
1990 * ax.c (ax_printf): Update.
1991
a8806230
YQ
19922017-12-07 Yao Qi <yao.qi@linaro.org>
1993
1994 * linux-aarch64-ipa.c (initialize_low_tracepoint): Call
1995 aarch64_linux_read_description.
1996 * linux-amd64-ipa.c (idx2mask): New array.
1997 (get_ipa_tdesc): Move idx2mask out.
1998 (initialize_low_tracepoint): Initialize target descriptions.
1999 * linux-i386-ipa.c (idx2mask): New array.
2000 (get_ipa_tdesc): Move idx2mask out.
2001 (initialize_low_tracepoint): Initialize target descriptions.
2002
d4a0e8b5
SM
20032017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
2004
2005 * tdesc.c (struct tdesc_type): Change return type.
2006 (tdesc_add_flag): Change parameter type.
2007 (tdesc_add_bitfield): Likewise.
2008 (tdesc_add_field): Likewise.
2009 (tdesc_set_struct_size): Likewise.
2010
798a7429
SM
20112017-12-05 Simon Marchi <simon.marchi@ericsson.com>
2012
2013 * regcache.c (registers_to_string): Remove unused variable.
2014
c0e15c9b
SM
20152017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2016
2017 * inferiors.c (for_each_inferior_with_data): Remove.
2018 * inferiors.h (for_each_inferior_with_data): Remove.
2019 * server.c (handle_qxfer_threads_worker): Change parameter type.
2020 (handle_qxfer_threads_proper): Use for_each_thread.
2021
f0045347
SM
20222017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2023
2024 * inferiors.c (for_each_inferior): Remove.
2025 (clear_inferiors): Use for_each_thread.
2026 * inferiors.h (for_each_inferior): Remove.
2027 * linux-low.c (linux_wait_for_event_filtered): Use
2028 for_each_thread.
2029 (linux_stabilize_threads): Likewise.
2030 * regcache.c (regcache_release): Likewise.
2031 * server.c (gdb_wants_all_threads_stopped): Likewise.
2032 (clear_pending_status_callback): Remove.
2033 (handle_status): Use for_each_thread.
2034 (captured_main): Likewise.
2035 * win32-low.c (child_init_thread_list): Likewise.
2036 (win32_clear_inferiors): Likewise.
2037 (fake_breakpoint_event): Likewise.
2038
9521758b
SM
20392017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2040
2041 * inferiors.h (find_inferior): Remove.
2042 * inferiors.c (find_inferior): Remove.
2043
8f86d7aa
SM
20442017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2045
2046 * linux-low.c (resume_status_pending_p): Update comment.
2047 (need_step_over_p): Update comment.
2048
e2b44075
SM
20492017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2050
2051 * linux-low.c (proceed_one_lwp): Return void, change parameter
2052 type.
2053 (unsuspend_and_proceed_one_lwp): Likewise.
2054 (proceed_all_lwps): Use for_each_thread.
2055 (unstop_all_lwps): Likewise.
2056
c80825ff
SM
20572017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2058
2059 * linux-low.c (linux_resume_one_thread): Return void, take
2060 parameter directly.
2061 (linux_resume): Use for_each_thread.
2062
df3e4dbe
SM
20632017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2064
2065 * linux-low.c (send_sigstop_callback): Return void, change
2066 parameter type. Rename to...
2067 (send_sigstop): ... this.
2068 (suspend_and_send_sigstop_callback): Return void, change parameter
2069 type. Rename to...
2070 (suspend_and_send_sigstop): ... this.
2071 (stop_all_lwps): Use for_each_thread.
2072
5a6b0a41
SM
20732017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2074
2075 * linux-low.c (lwp_running): Return bool, remove unused
2076 argument.
2077 (linux_stabilize_threads): Use find_thread.
2078
39a64da5
SM
20792017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2080
2081 * linux-low.c (select_singlestep_lwp_callback): Remove.
2082 (count_events_callback): Remove.
2083 (select_event_lwp_callback): Remove.
2084 (select_event_lwp): Use find_thread/for_each_thread.
2085
a1385b7b
SM
20862017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2087
2088 * linux-low.c (not_stopped_callback): Return bool, take filter
2089 argument directly.
2090 (linux_wait_for_event_filtered): Use find_thread.
2091 (linux_wait_1): Likewise.
2092
454296a2
SM
20932017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2094
2095 * linux-low.c (same_lwp): Remove.
2096 (find_lwp_pid): Use find_thread.
2097
6b2a85da
SM
20982017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2099
2100 * linux-low.c (delete_lwp_callback): Remove.
2101 (linux_mourn): Use for_each_thread.
2102
798a38e8
SM
21032017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2104
2105 * linux-low.c (linux_detach_lwp_callback): Return void, remove
2106 args parameter, don't check for pid.
2107 (linux_detach): Use for_each_thread.
2108
e4eb0dec
SM
21092017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2110
2111 * linux-low.c (struct counter): Remove.
2112 (second_thread_of_pid_p): Remove.
2113 (last_thread_of_process_p): Use find_thread.
2114
83e1b6c1
SM
21152017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2116
2117 * inferiors.c (find_inferior_in_random): Remove.
2118 * inferiors.h (find_inferior_in_random): Remove.
2119 * linux-low.c (status_pending_p_callback): Return bool, accept
2120 parameter ptid directly.
2121 (linux_wait_for_event_filtered): Use find_thread_in_random.
2122 (linux_wait_1): Likewise.
2123
8dc7b443
SM
21242017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2125
2126 * inferiors.c (find_inferior_id): Remove.
2127 (find_thread_ptid): Move implemention from find_inferior_id to
2128 here.
2129 * inferiors.h (find_inferior_id): Remove.
2130 * server.c (handle_status): Use find_thread_ptid.
2131 (process_serial_event): Likewise.
2132 * thread-db.c (find_one_thread): Likewise.
2133 (thread_db_thread_handle): Likewise.
2134 * win32-low.c (thread_rec): Likewise.
2135 (child_delete_thread): Likewise.
2136 (win32_thread_alive): Likewise.
2137 (get_child_debug_event): Likewise.
2138
da25033c
SM
21392017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2140
2141 * linux-mips-low.c (update_watch_registers_callback): Return
2142 void, remove pid_p parameter, don't check for pid.
2143 (mips_insert_point, mips_remove_point): Use for_each_thread.
2144
c91bb56b
SM
21452017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2146
2147 * lynx.low (lynx_delete_thread_callback): Remove.
2148 (lynx_mourn): Use for_each_thread.
2149
634a3254
SM
21502017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2151
2152 * regcache.c (regcache_invalidate_one): Remove.
2153 (regcache_invalidate_pid): use for_each_thread.
2154
41272101
TT
21552017-11-26 Tom Tromey <tom@tromey.com>
2156
2157 * linux-low.c (linux_create_inferior): Update.
2158
f5291a6f
UW
21592017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
2160
2161 * spu-low.c (spu_create_inferior): Fix typo in argument name.
2162
6654d750
AH
21632017-11-24 Alan Hayward <alan.hayward@arm.com>
2164
2165 * configure.srv: Add linux-aarch64-tdesc-selftest.o.
2166 * linux-aarch64-low.c (initialize_low_arch): Call init func.
2167 * linux-aarch64-tdesc-selftest.c: New file.
2168 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
2169
21702017-11-24 Alan Hayward <alan.hayward@arm.com>
2171
2172 * configure.srv: Add new file.
2173 * linux-aarch64-low.c (initialize_low_arch): Call init func.
2174 * linux-aarch64-tdesc-selftest.c: New file.
2175 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
2176
49bdb7ee
AH
21772017-11-24 Alan Hayward <alan.hayward@arm.com>
2178
2179 * linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init.
2180 * linux-aarch64-low.c (initialize_low_arch): Remove init.
2181 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
2182
d6d7ce56
AH
21832017-11-24 Alan Hayward <alan.hayward@arm.com>
2184
2185 * configure.srv: Add new files.
2186 * linux-aarch64-ipa.c (get_ipa_tdesc): Call
2187 aarch64_linux_read_description.
2188 * linux-aarch64-low.c (aarch64_linux_read_description):
2189 Merge with aarch64_arch_setup.
2190 (aarch64_arch_setup): Call aarch64_linux_read_description.
2191 * linux-aarch64-tdesc.c: New file.
2192 * linux-aarch64-tdesc.h: New file.
2193
506fe5f4
YQ
21942017-11-24 Yao Qi <yao.qi@linaro.org>
2195
2196 * configure.srv: Set $srv_regobj for tic6x-linux.
2197 * linux-tic6x-low.c: Include "arch/tic6x.h" and "tdesc.h".
2198 (tic6x_read_description): Move some code to tic6x_arch_setup.
2199 (tic6x_tdesc_test): New function.
2200 (initialize_low_arch): Call selftests::register_test.
2201
29f9a567
YQ
22022017-11-22 Yao Qi <yao.qi@linaro.org>
2203
2204 * remote-utils.c (prepare_resume_reply): Use memcpy.
2205
578290ec
SM
22062017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2207
2208 * linux-low.c (kill_one_lwp_callback): Return void, take
2209 argument directly, don't filter on pid.
2210 (linux_kill): Use for_each_thread.
2211
eca55aec
SM
22122017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2213
2214 * linux-low.c (need_step_over_p): Return bool, remove dummy
2215 argument.
2216 (linux_resume, proceed_all_lwps): Use find_thread.
2217
25c28b4d
SM
22182017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2219
2220 * linux-low.c (resume_status_pending_p): Return bool, remove
2221 flag_p argument.
2222 (linux_resume): Use find_thread.
2223
5fdda392
SM
22242017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2225
2226 * linux-low.c (struct thread_resume_array): Remove.
2227 (linux_set_resume_request): Return void, take arguments
2228 directly.
2229 (linux_resume): Use for_each_thread.
2230
fcb056a5
SM
22312017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2232
2233 * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
2234 return bool, remove data argument.
2235 (linux_stabilize_threads): Use find_thread.
2236
139720c5
SM
22372017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2238
2239 * linux-low.c (unsuspend_one_lwp): Remove.
2240 (unsuspend_all_lwps): Use for_each_thread, inline code from
2241 unsuspend_one_lwp.
2242
6d1e5673
SM
22432017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2244
2245 * gdbthread.h (find_thread): Add overload with ptid_t filter.
2246 * linux-low.c (struct iterate_over_lwps_args): Remove.
2247 (iterate_over_lwps_filter): Remove.
2248 (iterate_over_lwps): Use find_thread.
2249
bbf550d5
SM
22502017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2251
2252 * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
2253 (linux_handle_new_gdb_connection): Use for_each_thread, inline
2254 code from reset_lwp_ptrace_options_callback.
2255
00192f77
SM
22562017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2257
2258 * linux-arm-low.c (struct update_registers_data): Remove.
2259 (update_registers_callback): Return void, take arguments
2260 directly, don't check thread's pid.
2261 (arm_insert_point, arm_remove_point): Use for_each_thread.
2262
2bee2b6c
SM
22632017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2264
2265 * win32-low.c (continue_one_thread): Return void, take argument
2266 directly.
2267 (child_continue): Use for_each_thread.
2268
0b360f19
SM
22692017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2270
2271 * win32-i386-low.c (update_debug_registers_callback): Rename
2272 to ...
2273 (update_debug_registers): ... this, return void, remove pid_p arg.
2274 (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
2275
f27866ba
SM
22762017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
2277
2278 * inferiors.h (struct process_info): Add constructor, initialize
2279 fields..
2280 <syscalls_to_catch>: Change type to std::vector<int>.
2281 * inferiors.c (add_process): Allocate process_info with new.
2282 (remove_process): Free process_info with delete.
2283 * linux-low.c (handle_extended_wait): Adjust.
2284 (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
2285 * server.c (handle_general_set): Adjust.
2286
e849ea89
PA
22872017-11-16 Pedro Alves <palves@redhat.com>
2288
2289 * remote-utils.c (remote_close): Block SIGIO signals instead of
2290 uninstalling the SIGIO handler.
2291
1d0aa65c
AH
22922017-11-16 Alan Hayward <alan.hayward@arm.com>
2293
2294 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
2295
3491a34c
YQ
22962017-11-16 Yao Qi <yao.qi@linaro.org>
2297
2298 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
2299 (tic6x_store_gregset): Likewise.
2300 (tic6x_usrregs_info): Move it up.
2301
a602f924
AH
23022017-11-15 Alan Hayward <alan.hayward@arm.com>
2303
2304 * Makefile.in: Update arch rules.
2305 * configure.srv: Explicitly mark arch/ files.
2306
5616b6c3
AS
23072017-11-13 Andreas Schwab <schwab@suse.de>
2308
2309 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
2310 function.
2311 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2312
d1928160
PA
23132017-11-06 Pedro Alves <palves@redhat.com>
2314
2315 * config.in, configure: Regenerate.
2316
bac608e7
SM
23172017-10-27 Simon Marchi <simon.marchi@ericsson.com>
2318
2319 * target.c (struct thread_search): Remove.
2320 (thread_search_callback): Remove.
2321 (prepare_to_access_memory): Use for_each_thread instead of
2322 find_inferior. Inline code from thread_search_callback.
2323
eaddb425
SM
23242017-10-27 Simon Marchi <simon.marchi@ericsson.com>
2325
2326 * server.c (struct visit_actioned_threads_data): Remove.
2327 (visit_actioned_threads): Change prototype to take arguments
2328 directly.
2329 (resume): Use find_thread instead of find_inferior.
2330
99078d34
SM
23312017-10-27 Simon Marchi <simon.marchi@ericsson.com>
2332
2333 * server.c (queue_stop_reply_callback): Change prototype, return
2334 void.
2335 (find_status_pending_thread_callback): Remove.
2336 (handle_status): Replace find_inferior with find_thread and
2337 for_each_thread.
2338
cc628f3d
AH
23392017-10-25 Alan Hayward <alan.hayward@arm.com>
2340
2341 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
2342 with REGNO.
2343 (aarch64_store_gregset): Likewise.
2344 (aarch64_fill_fpregset): Likewise.
2345 (aarch64_store_fpregset): Likewise.
2346
4d3bb80e
SM
23472017-10-21 Simon Marchi <simon.marchi@ericsson.com>
2348
2349 * gdbthread.h (find_thread, for_each_thread): New functions.
2350 * inferiors.c (thread_of_pid): Remove.
2351 (find_any_thread_of_pid): Use find_thread.
2352 * linux-low.c (num_lwps): Use for_each_thread.
2353
7a7cdfa0
YQ
23542017-10-17 Yao Qi <yao.qi@linaro.org>
2355
2356 * Makefile.in: Remove one rule.
2357 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
2358
e675d170
YQ
23592017-10-17 Yao Qi <yao.qi@linaro.org>
2360
2361 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
2362 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
2363
7eb4e0f9
YQ
23642017-10-17 Yao Qi <yao.qi@linaro.org>
2365
2366 * configure.srv: Rename arm.o with arch/arm.o.
2367
60d6cfc9
YQ
23682017-10-17 Yao Qi <yao.qi@linaro.org>
2369
2370 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
2371 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
2372 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
2373 (arch-i386.o, arch-amd64.o): Remove rules.
2374 (arch/%.o): New rule.
2375 Update POSTCOMPILE and COMPILE.pre.
2376 * configure.ac: Invoke AC_CONFIG_COMMANDS.
2377 * configure: Re-generated.
2378 * configure.srv: Replace arch-i386.o with arch/i386.o.
2379 Replace arch-amd64.o with arch/amd64.o.
2380
5bfda255
YQ
23812017-10-16 Yao Qi <yao.qi@linaro.org>
2382
2383 * configure: Regenerated.
2384
9c80ecd6
SM
23852017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
2386
2387 * inferiors.h: (struct inferior_list): Remove.
2388 (struct inferior_list_entry); Remove.
2389 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
2390 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
2391 get_first_inferior): Remove.
2392 (for_each_inferior, for_each_inferior_with_data, find_inferior,
2393 find_inferior_id, find_inferior_in_random): Change signature.
2394 * inferiors.c (all_threads): Change type to
2395 std::list<thread_info *>.
2396 (get_thread): Remove macro.
2397 (find_inferior, find_inferior_id): Change signature, implement
2398 using find_thread.
2399 (find_inferior_in_random): Change signature, implement using
2400 find_thread_in_random.
2401 (for_each_inferior, for_each_inferior_with_data): Change
2402 signature, implement using for_each_thread.
2403 (add_inferior_to_list, remove_inferior): Remove.
2404 (add_thread, get_first_thread, thread_of_pid,
2405 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
2406 (get_first_inferior, one_inferior_p, clear_inferior_list):
2407 Remove.
2408 (clear_inferiors, get_thread_process): Update.
2409 * gdbthread.h: Include <list>.
2410 (struct thread_info) <entry>: Remove field.
2411 <id>: New field.
2412 (all_threads): Change type to std::list<thread_info *>.
2413 (get_first_inferior): Add doc.
2414 (find_thread, for_each_thread, find_thread_in_random): New
2415 functions.
2416 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
2417 * linux-arm-low.c (update_registers_callback): Update.
2418 * linux-low.c (second_thread_of_pid_p): Update.
2419 (kill_one_lwp_callback, linux_detach_lwp_callback,
2420 delete_lwp_callback, status_pending_p_callback, same_lwp,
2421 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
2422 iterate_over_lwps, not_stopped_callback,
2423 resume_stopped_resumed_lwps, count_events_callback,
2424 select_singlestep_lwp_callback, select_event_lwp_callback,
2425 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
2426 suspend_and_send_sigstop_callback, wait_for_sigstop,
2427 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
2428 lwp_running, linux_set_resume_request, resume_status_pending_p,
2429 need_step_over_p, start_step_over, linux_resume_one_thread,
2430 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
2431 reset_lwp_ptrace_options_callback): Update.
2432 * linux-mips-low.c (update_watch_registers_callback): Update.
2433 * regcache.c (regcache_invalidate_one, regcache_invalidate):
2434 Update.
2435 (free_register_cache_thread_one): Remove.
2436 (regcache_release): Update.
2437 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
2438 handle_qxfer_threads_worker): Update.
2439 (handle_query): Update, use list iterator.
2440 (visit_actioned_threads, handle_pending_status,
2441 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
2442 clear_pending_status_callback, set_pending_status_callback,
2443 find_status_pending_thread_callback, handle_status,
2444 process_serial_event): Update.
2445 * target.c (thread_search_callback): Update.
2446 * thread-db.c (thread_db_get_tls_address): Update.
2447 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
2448 Update.
2449 * win32-i386-low.c (update_debug_registers_callback): Update.
2450 * win32-low.c (delete_thread_info, child_delete_thread,
2451 continue_one_thread, suspend_one_thread,
2452 get_child_debug_event): Adjust.
2453
9179355e
SM
24542017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
2455
2456 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
2457 * inferiors.h: Include <list>.
2458 (struct process_info) <entry>: Remove field.
2459 <pid>: New field.
2460 (pid_of): Change macro to function.
2461 (ptid_of, lwpid_of): Remove macro.
2462 (all_processes): Change type to std::list<process_info *>.
2463 (ALL_PROCESSES): Remove macro.
2464 (for_each_process, find_process): New function.
2465 * inferiors.c (all_processes): Change type to
2466 std::list<process_info *>.
2467 (find_thread_process): Adjust.
2468 (add_process): Likewise.
2469 (remove_process): Likewise.
2470 (find_process_pid): Likewise.
2471 (get_first_process): Likewise.
2472 (started_inferior_callback): Remove.
2473 (have_started_inferiors_p): Adjust.
2474 (attached_inferior_callback): Remove.
2475 (have_attached_inferiors_p): Adjust.
2476 * linux-low.c (check_zombie_leaders): Likewise.
2477 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
2478 (x86_linux_update_xmltarget): Adjust.
2479 * server.c (handle_query): Likewise.
2480 (gdb_reattached_process): Remove.
2481 (handle_status): Adjust.
2482 (kill_inferior_callback): Likewise.
2483 (detach_or_kill_inferior): Remove.
2484 (print_started_pid): Likewise.
2485 (print_attached_pid): Likewise.
2486 (detach_or_kill_for_exit): Update.
2487 (process_serial_event): Likewise.
2488 * linux-arm-low.c (arm_new_fork): Likewise.
2489
c9cb8905
SM
24902017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
2491
2492 * dll.h: Include <list>.
2493 (struct dll_info): Add constructor.
2494 <entry>: Remove field.
2495 (all_dlls): Change type to std::list<dll_info>.
2496 * dll.c: Include <algorithm>.
2497 (get_dll): Remove macro.
2498 (all_dlls): Change type to std::list<dll_info *>.
2499 (free_one_dll): Remove.
2500 (match_dll): Likewise.
2501 (loaded_dll): Adjust.
2502 (unloaded_dll): Adjust to all_dlls type change, use
2503 std::find_if. Inline code from match_dll.
2504 (clear_dlls): Adjust to all_dlls type change.
2505 * server.c (emit_dll_description): Remove.
2506 (handle_qxfer_libraries): Adjust to all_dlls type change,
2507 integrate emit_dll_description's functionality.
2508
04ec7890
SM
25092017-10-12 Simon Marchi <simon.marchi@ericsson.com>
2510
2511 * linux-low.h (struct linux_target_ops) <delete_process>: New
2512 field.
2513 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
2514 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
2515 (struct linux_target_ops): Add delete_process callback.
2516 * linux-arm-low.c (arm_delete_process): New.
2517 (struct linux_target_ops): Add delete_process callback.
2518 * linux-bfin-low.c (struct linux_target_ops): Likewise.
2519 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
2520 * linux-m32r-low.c (struct linux_target_ops): Likewise.
2521 * linux-mips-low.c (mips_linux_delete_process): New.
2522 (struct linux_target_ops): Add delete_process callback.
2523 * linux-ppc-low.c (struct linux_target_ops): Likewise.
2524 * linux-s390-low.c (struct linux_target_ops): Likewise.
2525 * linux-sh-low.c (struct linux_target_ops): Likewise.
2526 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
2527 * linux-tile-low.c (struct linux_target_ops): Likewise.
2528 * linux-x86-low.c (x86_linux_delete_process): New.
2529 (struct linux_target_ops): Add delete_process callback.
2530 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
2531
466eecee
SM
25322017-10-12 Simon Marchi <simon.marchi@ericsson.com>
2533
2534 * linux-aarch64-low.c (the_low_target): Add thread delete
2535 callback.
2536 * linux-arm-low.c (arm_delete_thread): New function.
2537 (the_low_target): Add thread delete callback.
2538 * linux-bfin-low.c (the_low_target): Likewise.
2539 * linux-crisv32-low.c (the_low_target): Likewise.
2540 * linux-low.c (delete_lwp): Invoke delete_thread callback if
2541 set.
2542 * linux-low.h (struct linux_target_ops) <delete_thread>: New
2543 field.
2544 * linux-m32r-low.c (the_low_target): Add thread delete callback.
2545 * linux-mips-low.c (mips_linux_delete_thread): New function.
2546 (the_low_target): Add thread delete callback.
2547 * linux-ppc-low.c (the_low_target): Likewise.
2548 * linux-s390-low.c (the_low_target): Likewise.
2549 * linux-sh-low.c (the_low_target): Likewise.
2550 * linux-tic6x-low.c (the_low_target): Likewise.
2551 * linux-tile-low.c (the_low_target): Likewise.
2552 * linux-x86-low.c (the_low_target): Likewise.
2553 * linux-xtensa-low.c (the_low_target): Likewise.
2554
b79f7801
YZ
25552017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
2556
2557 * win32-low.c: Include "common-inferior.h".
2558
bc3b087d
SDJ
25592017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
2560
2561 * inferiors.c (set_inferior_cwd): New function.
2562 * server.c (handle_general_set): Handle QSetWorkingDir packet.
2563 (handle_query): Inform that QSetWorkingDir is supported.
2564 * win32-low.c (create_process): Pass the inferior's cwd to
2565 CreateProcess.
2566
d092c5a2
SDJ
25672017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
2568
2569 * inferiors.c (current_inferior_cwd): New global variable.
2570 (get_inferior_cwd): New function.
2571 * inferiors.h (struct process_info) <cwd>: New field.
2572
7da0a886
SDJ
25732017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
2574
2575 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
2576 (OBS): Add gdb_tilde_expand.o.
2577
289a6840
SM
25782017-10-02 Simon Marchi <simon.marchi@ericsson.com>
2579
2580 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
2581 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
2582
256642e8
PA
25832017-09-29 Pedro Alves <palves@redhat.com>
2584
2585 * ax.c (gdb_parse_agent_expr): Constify.
2586 * ax.h (gdb_parse_agent_expr): Constify.
2587 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
2588 Constify.
2589 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
2590 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
2591 * remote-utils.h (read_ptid): Constify.
2592 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
2593 (process_point_options, process_serial_event): Constify.
2594 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
2595 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
2596 (cmd_qtbuffer): Constify.
2597
5b9ca4d4
PA
25982017-09-29 Pedro Alves <palves@redhat.com>
2599
2600 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
2601 fails.
2602
94c207e0
PA
26032017-09-29 Pedro Alves <palves@redhat.com>
2604
2605 * linux-low.c (handle_extended_wait): Pass parent thread instead
2606 of process to thread_db_notice_clone.
2607 * linux-low.h (thread_db_notice_clone): Replace parent process
2608 parameter with parent thread parameter.
2609 * thread-db.c (find_one_thread): Add comment.
2610 (thread_db_notice_clone): Replace parent process parameter with
2611 parent thread parameter. Temporarily switch to the parent thread.
2612
75352e28
SDJ
26132017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
2614
2615 * gdbthread.h: Include "common-gdbthread.h".
2616 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
2617 "if" when validating the ptid.
2618 * remote-utils.c: Include "gdbthread.h".
2619 (prepare_resume_reply): Use "switch_to_thread".
2620 * target.c (done_accessing_memory): Likewise.
2621
ad339634
AA
26222017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
2623
2624 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
2625 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
2626 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
2627 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
2628 s390x-gs-linux64-ipa.o to ipa_obj.
2629 * linux-s390-low.c (HWCAP_S390_GS): New define.
2630 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
2631 New functions.
2632 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
2633 (s390_arch_setup): Check for guarded-storage support and choose
2634 appropriate tdesc.
2635 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
2636 init_registers_s390x_gs_linux64.
2637 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
2638 enum value.
2639 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
2640 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
2641
cc4d742f
SM
26422017-09-22 Simon Marchi <simon.marchi@ericsson.com>
2643
2644 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
2645
f6327dcb
KB
26462017-09-21 Kevin Buettner <kevinb@redhat.com>
2647
2648 * linux-low.h (struct lwp_info): Add new field, thread_handle.
2649 (thread_db_thread_handle): Declare.
2650 * linux-low.c (linux_target_ops): Initialize thread_handle.
2651 * server.c (handle_qxfer_threads_worker): Add support for
2652 "handle" attribute.
2653 * target.h (struct target_ops): Add new function pointer,
2654 thread_handle.
2655 (target_thread_handle): Define.
2656 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
2657 field in lwp.
2658 (thread_db_thread_handle): New function.
2659
86299109
KB
26602017-09-21 Kevin Buettner <kevinb@redhat.com>
2661
2662 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
2663 * linux-low.h (thread_db_notice_clone): Declare.
2664 * thread-db.c (thread_db_notice_clone): New function.
2665
f557a88a
PA
26662017-09-21 Pedro Alves <palves@redhat.com>
2667
2668 * server.c (gdb_read_memory, handle_status, process_serial_event)
2669 (handle_serial_event, handle_target_event): Adjust to
2670 set_desired_thread prototype change.
2671 * target.c (set_desired_thread): Remove 'use_general' parameter
2672 and adjust.
2673 * target.h (set_desired_thread): Remove 'use_general' parameter.
2674
223ffa71
TT
26752017-09-20 Tom Tromey <tom@tromey.com>
2676
2677 * target.c (target_terminal::terminal_state): Define.
2678 (target_terminal::init): Rename from target_terminal_init.
2679 (target_terminal::inferior): Rename from
2680 target_terminal_inferior.
2681 (target_terminal::ours): Rename from target_terminal_ours.
2682 (target_terminal::ours_for_output, target_terminal::info): New.
2683
04fd3ba9
SM
26842017-09-16 Simon Marchi <simon.marchi@ericsson.com>
2685
2686 * server.c (accumulate_file_name_length): Remove.
2687 (emit_dll_description): Adjust to std::string change.
2688 (handle_qxfer_libraries): Use std::string to hold document.
2689
5e187554
SM
26902017-09-16 Simon Marchi <simon.marchi@ericsson.com>
2691
2692 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
2693 return type of xml_escape_text.
2694 * server.c (emit_dll_description): Likewise.
2695
1526853e
SM
26962017-09-16 Simon Marchi <simon.marchi@ericsson.com>
2697
2698 * server.c (captured_main): Accept argument for --selftest.
2699 Update run_tests call.
2700 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
2701 when registering selftests.
2702
c4dfafab
SDJ
27032017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
2704
2705 * regcache.c (get_thread_regcache): Update code to use "std::vector"
2706 instead of "VEC" for "target_desc.reg_defs".
2707 (regcache_cpy): Likewise.
2708 (registers_to_string): Likewise.
2709 (registers_from_string): Likewise.
2710 (find_regno): Likewise.
2711 (supply_regblock): Likewise.
2712 (regcache_raw_read_unsigned): Likewise.
2713 * tdesc.c (init_target_desc): Likewise.
2714 (tdesc_create_reg): Likewise.
2715 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
2716 (struct target_desc) <reg_defs>: Convert to "std::vector".
2717 (target_desc): Do not initialize "reg_defs".
2718 (~target_desc): Update code to use "std::vector" instead of "VEC"
2719 for "target_desc.reg_defs".
2720 (operator==): Likewise.
2721
124aceb4
SM
27222017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2723
2724 * inferiors.h (thread_to_gdb_id): Remove.
2725 * inferiors.c (thread_to_gdb_id): Remove.
2726 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
2727 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
2728 lynx_store_registers, lynx_read_memory, lynx_write_memory):
2729 Likewise.
2730 * nto-low.c (nto_fetch_registers, nto_store_registers,
2731 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
2732
96cde54f
SM
27332017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2734
2735 * inferiors.h (gdb_id_to_thread_id): Remove.
2736 * inferiors.c (gdb_id_to_thread_id): Remove.
2737 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
2738 removal. Move pid declaration closer to where it's used.
2739
e8ca139e
SM
27402017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2741
2742 * server.c (handle_detach): New function.
2743 (process_serial_event): Move code out, call handle_detach.
2744
f8a4e119
SM
27452017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2746
2747 * server.c (require_running): Rename to ...
2748 (require_running_or_return): ... this ...
2749 (require_running_or_break): ... and this.
2750 (handle_query, process_serial_event): Adjust.
2751
0eb0a407
SM
27522017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2753
2754 * linux-low.c (linux_set_resume_request): Remove unused
2755 variables.
2756
785922a5
SM
27572017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2758
2759 * server.c (first_thread_of): Remove.
2760 (process_serial_event): Replace usage of first_thread_of with
2761 find_any_thread_of_pid.
2762 * tracepoint.c (same_process_p): Remove.
2763 (gdb_agent_about_to_close): Replace usage of same_process_p with
2764 find_any_thread_of_pid.
2765 * linux-x86-low.c (same_process_callback): Remove.
2766 (x86_arch_setup_process_callback): Replace usage of
2767 same_process_callback with find_any_thread_of_pid.
2768 * thread-db.c (any_thread_of): Remove.
2769 (switch_to_process): Replace usage of any_thread_of with
2770 find_any_thread_of_pid.
2771 * inferiors.c (thread_pid_matches_callback): Remove.
2772 (find_thread_process): Adjust to use find_any_thread_of_pid.
2773
a059f00c
SDJ
27742017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
2775
2776 * regcache.c (get_thread_regcache): Guard calls to "memset"
e79be6e5 2777 with "!VEC_empty".
a059f00c 2778
cc397f3a
SDJ
27792017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
2780
2781 * linux-low.c (handle_extended_wait): Use
2782 "allocate_target_description" instead of "XNEW".
2783 * linux-x86-low.c (initialize_low_arch): Likewise.
2784
22916b07
YQ
27852017-09-05 Yao Qi <yao.qi@linaro.org>
2786
2787 * configure.srv (srv_i386_regobj): Remove.
2788 (srv_amd64_regobj): Remove.
2789 (srv_regobj): Set it to "" for x86 non-linux targets.
2790 * linux-x86-tdesc.c (i386_linux_read_description):
2791 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
2792 (init_registers_i386): Remove the declaration.
2793 (tdesc_i386): Remove the declaration.
2794 (lynx_i386_arch_setup): Call i386_create_target_description.
2795 * nto-x86-low.c: Likewise.
2796 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
2797 [!__x86_64__]: include arch/i386.h.
2798 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
2799
38602d55
YQ
28002017-09-05 Yao Qi <yao.qi@linaro.org>
2801
2802 * configure.srv (srv_amd64_linux_xmlfiles): Remove
2803 i386/amd64-XXX-linux from it.
2804
44b886ff
YQ
28052017-09-05 Yao Qi <yao.qi@linaro.org>
2806
2807 * configure.srv: Empty srv_amd64_linux_regobj if $development is
2808 false.
2809 (ipa_amd64_linux_regobj): Remove.
2810 (ipa_x32_linux_regobj): Remove.
2811
b4570e4b
YQ
28122017-09-05 Yao Qi <yao.qi@linaro.org>
2813
2814 * Makefile.in (arch-amd64.o): New rule.
2815 * configure.srv: Append arch-amd64.o.
2816 * linux-amd64-ipa.c: Include common/x86-xstate.h.
2817 (get_ipa_tdesc): Call amd64_linux_read_description.
2818 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
2819 and init_registers_amd64_XXX.
2820 * linux-x86-low.c (x86_linux_read_description): Call
2821 amd64_linux_read_description.
2822 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
2823 (initialize_low_arch): Don't call init_registers_x32_XXX and
2824 init_registers_amd64_XXX.
2825 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
2826 and tdesc_amd64_XXX.
2827 [__x86_64__] (amd64_tdesc_test): New function.
2828 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
2829 and init_registers_amd64_XXX.
2830 * linux-x86-tdesc.c: Include arch/amd64.h.
2831 (xcr0_to_tdesc_idx): New function.
2832 (i386_linux_read_description): New function.
2833 (amd64_get_ipa_tdesc_idx): New function.
2834 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
2835 (amd64_get_ipa_tdesc): Declare.
2836
d1f28ea2
YQ
28372017-09-05 Yao Qi <yao.qi@linaro.org>
2838
2839 * configure.srv (srv_i386_linux_xmlfiles): Remove
2840 i386/i386-XXX-linux.xml from it.
2841
25a93583
YQ
28422017-09-05 Yao Qi <yao.qi@linaro.org>
2843
2844 * configure.srv: Set srv_i386_linux_regobj empty if $development
2845 is false.
2846 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
2847 initialize_low_tdesc.
2848 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
2849 with #if initialize_low_tdesc.
2850 * linux-x86-tdesc-selftest.c: New file.
2851 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
2852
5f035c07
YQ
28532017-09-05 Yao Qi <yao.qi@linaro.org>
2854
2855 * Makefile.in (arch-i386.o): New rule.
2856 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
2857 (x86_64-*-linux*): Likewise.
2858 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
2859 include arch/i386.h.
2860 (i386_linux_read_description): Remove code and call
2861 i386_create_target_description.
2862 * tdesc.c (allocate_target_description): New function.
2863 * tdesc.h (set_tdesc_architecture): Remove declaration.
2864 (set_tdesc_osabi): Likewise.
2865
0abe8a89
YQ
28662017-09-05 Yao Qi <yao.qi@linaro.org>
2867
2868 * linux-x86-tdesc.c: Don't include <inttypes.h>.
2869 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
2870 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
2871 .xmltarget.
2872 * server.c (get_features_xml): Call tdesc_get_features_xml.
2873 * tdesc.c (set_tdesc_architecture): New function.
2874 (set_tdesc_osabi): New function.
2875 (tdesc_get_features_xml): New function.
2876 (tdesc_create_feature): Add an argument.
2877 * tdesc.h (struct target_desc) <features>: New field.
2878 <arch, osabi>: New field.
2879 (~target_desc): xfree features, arch, and osabi.
2880 (target_desc::oerator==): Don't compare .xmltarget.
2881 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
2882 (set_tdesc_osabi): Likewise.
2883 (tdesc_get_features_xml): Likewise.
2884
0a188386
YQ
28852017-09-05 Yao Qi <yao.qi@linaro.org>
2886
2887 * linux-x86-tdesc.c: Include selftest.h.
2888 (i386_tdesc_test): New function.
2889 (initialize_low_tdesc): Call selftests::register_test.
2890 * tdesc.h: Include regdef.h.
2891 (target_desc): Override operator == and !=.
2892
f49ff000
YQ
28932017-09-05 Yao Qi <yao.qi@linaro.org>
2894
2895 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
2896 (ipa_obj): Likewise.
2897 * linux-i386-ipa.c: Include common/x86-xstate.h
2898 (get_ipa_tdesc): Call i386_linux_read_description.
2899 (initialize_low_tracepoint): Don't call init_registers_XXX
2900 functions, call initialize_low_tdesc instead.
2901 * linux-x86-low.c (x86_linux_read_description): Call
2902 i386_linux_read_description.
2903 (initialize_low_arch): Don't call init_registers_i386_XXX
2904 functions, call initialize_low_tdesc.
2905 * linux-x86-tdesc.c: New file.
2906 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
2907 (i386_get_ipa_tdesc_idx): Declare.
2908 (i386_get_ipa_tdesc): Declare.
2909 (initialize_low_tdesc): Declare.
2910
2b68ef2f
YQ
29112017-09-05 Yao Qi <yao.qi@linaro.org>
2912
2913 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
2914 instead of 0.
2915
f7000548
YQ
29162017-09-05 Yao Qi <yao.qi@linaro.org>
2917
2918 * Makefile.in (IPA_OBJS): Add vec-ipa.o
2919 * regcache.c (get_thread_regcache): Use VEC_length.
2920 (init_register_cache): Likewise.
2921 (regcache_cpy): Likewise.
2922 (registers_to_string): Iterate reg_defs via VEC_iterate.
2923 (find_regno): Likewise.
2924 (find_register_by_number): Use VEC_index.
2925 (register_size): Call find_register_by_number.
2926 (register_data): Call find_register_by_number.
2927 (supply_regblock): Use VEC_length.
2928 (regcache_raw_read_unsigned): Likewise.
2929 * tdesc.c (init_target_desc): Iterate reg_defs via
2930 VEC_iterate.
2931 (default_description): Update initializer.
2932 (copy_target_description): Don't update field num_registers.
2933 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
2934 <num_registers>: Remove.
2935
50a421ac
SM
29362017-09-04 Simon Marchi <simon.marchi@ericsson.com>
2937
2938 * Makefile.in (.SECONDARY): Define target.
2939
23fdd69e
SM
29402017-09-03 Simon Marchi <simon.marchi@ericsson.com>
2941
2942 * linux-low.c (linux_wait_1): Adjust.
2943 * server.c (queue_stop_reply_callback): Adjust.
2944
0a2dde4a
SDJ
29452017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
2946
2947 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
2948 QEnvironmentUnset and QEnvironmentReset packets.
2949 (handle_query): Inform remote that QEnvironmentHexEncoded,
2950 QEnvironmentUnset and QEnvironmentReset are supported.
2951
6afd337d
SM
29522017-08-25 Simon Marchi <simon.marchi@ericsson.com>
2953
2954 * inferiors.h (inferior_target_data): Rename to ...
2955 (thread_target_data): ... this.
2956 (inferior_regcache_data): Rename to ...
2957 (thread_regcache_data): ... this.
2958 (set_inferior_regcache_data): Rename to ...
2959 (set_thread_regcache_data): ... this.
2960 * inferiors.c (inferior_target_data): Rename to ...
2961 (thread_target_data): ... this.
2962 (inferior_regcache_data): Rename to ...
2963 (thread_regcache_data): ... this.
2964 (set_inferior_regcache_data): Rename to ...
2965 (set_thread_regcache_data): ... this.
2966 (free_one_thread): Update.
2967 * linux-low.h (get_thread_lwp): Update.
2968 * regcache.c (get_thread_regcache): Update.
2969 (regcache_invalidate_thread): Update.
2970 (free_register_cache_thread): Update.
2971 * win32-i386-low.c (update_debug_registers_callback): Update.
2972 (win32_get_current_dr): Update.
2973 * win32-low.c (thread_rec): Update.
2974 (delete_thread_info): Update.
2975 (continue_one_thread): Update.
2976 (suspend_one_thread): Update.
2977
a160cc46
SM
29782017-08-24 Simon Marchi <simon.marchi@ericsson.com>
2979
2980 * inferiors.c (set_inferior_target_data): Remove.
2981 * inferiors.h (set_inferior_target_data): Remove.
2982
6d580b63
YQ
29832017-08-18 Yao Qi <yao.qi@linaro.org>
2984
2985 * Makefile.in (OBS): Add selftest.o.
2986 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
2987 * configure, config.in: Re-generated.
2988 * server.c: Include common/sefltest.h.
2989 (captured_main): Handle option --selftest.
2990
f5a29eb0
YQ
29912017-08-09 Yao Qi <yao.qi@linaro.org>
2992
2993 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
2994 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
2995 i386-avx-mpx.o and i386-mmx.o.
2996 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
2997 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
2998 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
2999 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
3000 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
3001 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
3002 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
3003 i386/amd64-avx-mpx.xml.
3004
57757c2f
YQ
30052017-08-09 Yao Qi <yao.qi@linaro.org>
3006
3007 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
3008 and x32-avx-avx512.o.
3009 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
3010 i386/x32-avx-avx512.xml.
3011
229d26fc
SM
30122017-07-26 Simon Marchi <simon.marchi@ericsson.com>
3013
3014 * tracepoint.h (enum class fast_tpoint_collect_result): New
3015 enumeration.
3016 (fast_tracepoint_collecting): Change return type to
3017 fast_tpoint_collect_result.
3018 * tracepoint.c (fast_tracepoint_collecting): Likewise.
3019 * linux-low.h: Include tracepoint.h.
3020 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
3021 fast_tpoint_collect_result.
3022 * linux-low.c (handle_tracepoints): Adjust.
3023 (linux_fast_tracepoint_collecting): Change return type to
3024 fast_tpoint_collect_result.
3025 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
3026 linux_wait_1, stuck_in_jump_pad_callback,
3027 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
3028 proceed_one_lwp): Adjust to type change.
3029
2e1e43e1
YQ
30302017-07-10 Yao Qi <yao.qi@linaro.org>
3031
3032 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
3033
adc764e7
YQ
30342017-06-29 Yao Qi <yao.qi@linaro.org>
3035
3036 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
3037 Remove.
3038 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
3039
a206891a
SM
30402017-06-20 Simon Marchi <simon.marchi@ericsson.com>
3041
3042 * Makefile.in (IPA_OBJS): Sort and format one item per line.
3043
9a6c7d9c
SDJ
30442017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
3045
3046 * linux-low.c (linux_create_inferior): Adjust code to access the
3047 environment information via 'gdb_environ' class.
3048 * lynx-low.c (lynx_create_inferior): Likewise.
3049 * server.c (our_environ): Make it an instance of 'gdb_environ'.
3050 (get_environ): Return a pointer to 'our_environ'.
3051 (captured_main): Initialize 'our_environ'.
3052 * server.h (get_environ): Adjust prototype.
3053 * spu-low.c (spu_create_inferior): Adjust code to access the
3054 environment information via 'gdb_environ' class.
3055
ae3e2ccf
SM
30562017-06-17 Simon Marchi <simon.marchi@ericsson.com>
3057
3058 * linux-low.c (linux_read_memory, linux_write_memory): Remove
3059 usage of "register" keyword.
3060
3e019bdc
SM
30612017-06-17 Simon Marchi <simon.marchi@ericsson.com>
3062
3063 * configure: Re-generate.
3064
8465943a
SM
30652017-06-17 Simon Marchi <simon.marchi@ericsson.com>
3066
3067 * configure: Re-generate.
3068
cf0dd6f0
SM
30692017-06-17 Simon Marchi <simon.marchi@ericsson.com>
3070
3071 * Makefile.in (COMPILE.pre): Add "-x c++".
3072
9845682b
SDJ
30732017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
3074
3075 * fork-child.c: Conditionally include <signal.h>.
3076
aefd8b33
SDJ
30772017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
3078
3079 * server.c (handle_general_set): Handle new packet
3080 "QStartupWithShell".
3081 (handle_query): Add "QStartupWithShell" to the list of supported
3082 packets.
3083 (gdbserver_usage): Add help text explaining the
3084 new "--startup-with-shell" and "--no-startup-with-shell" CLI
3085 options.
3086 (captured_main): Recognize and act upon the presence of the new
3087 CLI options.
3088
2090129c
SDJ
30892017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
3090 Pedro Alves <palves@redhat.com>
3091
3092 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
3093 * configure: Regenerate.
3094 * configure.srv (srv_linux_obj): Add "fork-child.o" and
3095 "fork-inferior.o".
3096 (i[34567]86-*-lynxos*): Likewise.
3097 (spu*-*-*): Likewise.
3098 * fork-child.c: New file.
3099 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
3100 and "environ.h".
3101 (linux_ptrace_fun): New function.
3102 (linux_create_inferior): Adjust function prototype to reflect
3103 change on "target.h". Adjust function code to use
3104 "fork_inferior".
3105 (linux_request_interrupt): Delete "signal_pid".
3106 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
3107 (lynx_ptrace_fun): New function.
3108 (lynx_create_inferior): Adjust function prototype to reflect
3109 change on "target.h". Adjust function code to use
3110 "fork_inferior".
3111 * nto-low.c (nto_create_inferior): Adjust function prototype and
3112 code to reflect change on "target.h". Update comments.
3113 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
3114 "common-terminal.h" and "environ.h".
3115 (terminal_fd): Moved to fork-child.c.
3116 (old_foreground_pgrp): Likewise.
3117 (restore_old_foreground_pgrp): Likewise.
3118 (last_status): Make it global.
3119 (last_ptid): Likewise.
3120 (our_environ): New variable.
3121 (startup_with_shell): Likewise.
3122 (program_name): Likewise.
3123 (program_argv): Rename to...
3124 (program_args): ...this.
3125 (wrapper_argv): New variable.
3126 (start_inferior): Delete function.
3127 (get_exec_wrapper): New function.
3128 (get_exec_file): Likewise.
3129 (get_environ): Likewise.
3130 (prefork_hook): Likewise.
3131 (post_fork_inferior): Likewise.
3132 (postfork_hook): Likewise.
3133 (postfork_child_hook): Likewise.
3134 (handle_v_run): Update code to deal with arguments coming from the
3135 remote host. Update calls from "start_inferior" to
3136 "create_inferior".
3137 (captured_main): Likewise. Initialize environment variable. Call
3138 "have_job_control".
3139 * server.h (post_fork_inferior): New prototype.
3140 (get_environ): Likewise.
3141 (last_status): Declare.
3142 (last_ptid): Likewise.
3143 (signal_pid): Likewise.
3144 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
3145 (spu_ptrace_fun): New function.
3146 (spu_create_inferior): Adjust function prototype to reflect change
3147 on "target.h". Adjust function code to use "fork_inferior".
3148 * target.c (target_terminal_init): New function.
3149 (target_terminal_inferior): Likewise.
3150 (target_terminal_ours): Likewise.
3151 * target.h: Include <vector>.
3152 (struct target_ops) <create_inferior>: Update prototype.
3153 (create_inferior): Update macro.
3154 * utils.c (gdb_flush_out_err): New function.
3155 * win32-low.c (win32_create_inferior): Adjust function prototype
3156 and code to reflect change on "target.h".
3157
043a4934
SDJ
31582017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
3159
3160 * inferiors.c (switch_to_thread): New function.
3161
15652511
SDJ
31622017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
3163
3164 * Makefile.in (SFILE): Add "common/job-control.c".
3165 (OBS): Add "job-control.o".
3166
21ea5acd
SDJ
31672017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
3168
3169 * Makefile: Remove "@host_makefile_frag@".
3170
e13cb306
PA
31712017-05-05 Pedro Alves <palves@redhat.com>
3172
3173 * configure: Regenerate.
3174
c94fee56
SDJ
31752017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
3176
3177 * configure: Regenerate.
3178
a0ff9e1a
SM
31792017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
3180
3181 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
3182 software_single_step change of return type to
3183 std::vector<CORE_ADDR>.
3184 * linux-low.c (install_software_single_step_breakpoints):
3185 Likewise.
3186 * linux-low.h (install_software_single_step_breakpoints):
3187 Likewise.
3188
be628ab8
SDJ
31892017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
3190
3191 * remote-utils.c: Include "gdb_termios.h" instead of
3192 "terminal.h".
3193 * terminal.h: Delete file.
3194
7c5ded6a
SDJ
31952017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
3196
3197 * server.c: Include <vector>.
3198 <program_argv, wrapper_argv>: Convert to std::vector.
3199 (start_inferior): Rewrite function to use C++.
3200 (handle_v_run): Likewise. Update code that calculates the argv
3201 based on the vRun packet; use C++.
3202 (captured_main): Likewise.
3203
436252de
SM
32042017-04-06 Simon Marchi <simon.marchi@ericsson.com>
3205
3206 * server.c (handle_v_cont): Initialize thread_resume::thread
3207 with null_ptid.
3208
9bf2a700
PA
32092017-04-05 Pedro Alves <palves@redhat.com>
3210
3211 * configure: Regenerate.
3212
a121b7c1
PA
32132017-04-05 Pedro Alves <palves@redhat.com>
3214
3215 * gdbreplay.c (sync_error): Constify.
3216 * linux-x86-low.c (push_opcode): Constify.
3217
21c8a587
PA
32182017-04-05 Pedro Alves <palves@redhat.com>
3219
3220 * win32-low.c (get_child_debug_event)
3221 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
3222 Report TARGET_WAITKIND_SPURIOUS instead.
3223
fb32b4f7
PA
32242017-04-05 Pedro Alves <palves@redhat.com>
3225
e79be6e5
SM
3226 * remote-utils.c (remote_prepare, remote_open): Constify.
3227 * remote-utils.h (remote_prepare, remote_open): Constify.
3228 * server.c (captured_main): Constify 'port' handling.
fb32b4f7 3229
65dd1e59
SM
32302017-04-04 Simon Marchi <simon.marchi@ericsson.com>
3231
3232 * Makefile.in (clean): Clear .deps.
3233
8fa5b777
SM
32342017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
3235
3236 * .gitignore: Remove generated files, replace with wildcard.
3237 * (clean): Replace removal of generated files with wildcard.
3238 (version.c): Replace with...
3239 (version-generated.c): ...this.
3240 (xml-builtin.c): Replace with...
3241 (xml-builtin-generated.c): ...this.
3242 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
3243 (%.c: *regformats*): Replace with...
3244 (%-generated.c: *regformats*): ...this.
3245
a12e714b
MF
32462017-03-27 Max Filippov <jcmvbkbc@gmail.com>
3247
3248 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
3249 (xtensa_fill_gregset): Call collect_register_by_name for
3250 threadptr register.
3251 (xtensa_store_gregset): Call supply_register_by_name for
3252 threadptr register.
3253
1a09b50a
MF
32542017-03-27 Max Filippov <jcmvbkbc@gmail.com>
3255
3256 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
3257 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
3258 (xtensa_store_gregset): Call supply_register for all registers in
3259 a0_regnum..a0_regnum + C0_NREGS range.
3260
1a01e7c6
SM
32612017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3262
3263 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
3264 (ax-ipa.o: ax.c): Remove.
3265 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
3266 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
3267 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
3268 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
3269 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
3270
36bc18a8
SM
32712017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3272
3273 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
3274 (print-utils-ipa.o: ../common/print-utils.c): Remove.
3275 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
3276 (errors-ipa.o: ../common/errors.c): Remove.
3277 (format-ipa.o: ../common/format.c): Remove.
3278 (common-utils-ipa.o: ../common/common-utils.c): Remove.
3279
a8ebe3d5
SM
32802017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3281
3282 * Makefile.in (%-ipa.o: %.c): New rule.
3283 (tracepoint-ipa.o: tracepoint.c): Remove.
3284 (utils-ipa.o: utils.c): Remove.
3285 (remote-utils-ipa.o: remote-utils.c): Remove.
3286 (regcache-ipa.o: regcache.c): Remove.
3287 (i386-linux-ipa.o: i386-linux.c): Remove.
3288 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
3289 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
3290 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
3291 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
3292 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
3293 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
3294 (amd64-linux-ipa.o: amd64-linux.c): Remove.
3295 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
3296 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
3297 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
3298 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
3299 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
3300 (aarch64-ipa.o: aarch64.c): Remove.
3301 (s390-linux32-ipa.o: s390-linux32.c): Remove.
3302 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
3303 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
3304 (s390-linux64-ipa.o: s390-linux64.c): Remove.
3305 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
3306 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
3307 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
3308 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
3309 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
3310 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
3311 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
3312 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
3313 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
3314 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
3315 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
3316 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
3317 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
3318 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
3319 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
3320 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
3321 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
3322 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
3323 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
3324 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
3325 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
3326 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
3327 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
3328 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
3329 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
3330 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
3331 (tdesc-ipa.o: tdesc.c): Remove.
3332 (x32-linux-ipa.o: x32-linux.c): Remove.
3333 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
3334 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
3335
50cfacb7
SM
33362017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3337
3338 * Makefile.in (%.o: ../arch/%.c): New rule.
3339 (arm.o: ../arch/arm.c): Remove.
3340 (arm-linux.o: ../arch/arm-linux.c): Remove.
3341 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
3342 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
3343
c5a22423
SM
33442017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3345
3346 * Makefile.in (%.o: ../nat/%.c): New rule.
3347 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
3348 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
3349 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
3350 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
3351 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
3352 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
3353 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
3354 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
3355 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
3356 (linux-personality.o: ../nat/linux-personality.c): Remove.
3357 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
3358 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
3359 (x86-linux.o: ../nat/x86-linux.c): Remove.
3360 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
3361 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
3362
6bda016b
SM
33632017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3364
3365 * Makefile.in (%.o: ../common/%.c): New rule.
3366 (signals.o: ../common/signals.c): Remove.
3367 (print-utils.o: ../common/print-utils.c): Remove.
3368 (rsp-low.o: ../common/rsp-low.c): Remove.
3369 (common-utils.o: ../common/common-utils.c): Remove.
3370 (posix-strerror.o: ../common/posix-strerror.c): Remove.
3371 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
3372 (vec.o: ../common/vec.c): Remove.
3373 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
3374 (xml-utils.o: ../common/xml-utils.c): Remove.
3375 (ptid.o: ../common/ptid.c): Remove.
3376 (buffer.o: ../common/buffer.c): Remove.
3377 (format.o: ../common/format.c): Remove.
3378 (filestuff.o: ../common/filestuff.c): Remove.
3379 (agent.o: ../common/agent.c): Remove.
3380 (errors.o: ../common/errors.c): Remove.
3381 (environ.o: ../common/environ.c): Remove.
3382 (common-debug.o: ../common/common-debug.c): Remove.
3383 (cleanups.o: ../common/cleanups.c): Remove.
3384 (common-exceptions.o: ../common/common-exceptions.c): Remove.
3385 (fileio.o: ../common/fileio.c): Remove.
3386 (common-regcache.o: ../common/common-regcache.c): Remove.
3387 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
3388 (new-op.o: ../common/new-op.c): Remove.
3389 (btrace-common.o: ../common/btrace-common.c): Remove.
3390
21122961
SM
33912017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3392
3393 * Makefile.in (%.o: ../target/%.c): New rule.
3394 (waitstatus.o: ../target/waitstatus.c): Remove.
3395
c362e621
SM
33962017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3397
3398 * Makefile.in
3399 (%.c: ../regformats/%.dat,
3400 (%.c: ../regformats/arm/%.dat,
3401 (%.c: ../regformats/i386/%.dat,
3402 (%.c: ../regformats/rs6000/%.dat): New rules.
3403 (aarch64.c): Remove.
3404 (reg-arm.c): Remove.
3405 (arm-with-iwmmxt.c): Remove.
3406 (arm-with-vfpv2.c): Remove.
3407 (arm-with-vfpv3.c): Remove.
3408 (arm-with-neon.c): Remove.
3409 (reg-bfin.c): Remove.
3410 (reg-cris.c): Remove.
3411 (reg-crisv32.c): Remove.
3412 (i386.c): Remove.
3413 (i386-linux.c): Remove.
3414 (i386-avx.c): Remove.
3415 (i386-avx-linux.c): Remove.
3416 (i386-avx-avx512.c): Remove.
3417 (i386-avx-avx512-linux.c): Remove.
3418 (i386-mpx.c): Remove.
3419 (i386-mpx-linux.c): Remove.
3420 (i386-avx-mpx-avx512-pku.c): Remove.
3421 (i386-avx-mpx-avx512-pku-linux.c): Remove.
3422 (i386-avx-mpx.c): Remove.
3423 (i386-avx-mpx-linux.c): Remove.
3424 (i386-mmx.c): Remove.
3425 (i386-mmx-linux.c): Remove.
3426 (reg-ia64.c): Remove.
3427 (reg-m32r.c): Remove.
3428 (reg-m68k.c): Remove.
3429 (reg-cf.c): Remove.
3430 (mips-linux.c): Remove.
3431 (mips-dsp-linux.c): Remove.
3432 (mips64-linux.c): Remove.
3433 (mips64-dsp-linux.c): Remove.
3434 (nios2-linux.c): Remove.
3435 (powerpc-32.c): Remove.
3436 (powerpc-32l.c): Remove.
3437 (powerpc-altivec32l.c): Remove.
3438 (powerpc-cell32l.c): Remove.
3439 (powerpc-vsx32l.c): Remove.
3440 (powerpc-isa205-32l.c): Remove.
3441 (powerpc-isa205-altivec32l.c): Remove.
3442 (powerpc-isa205-vsx32l.c): Remove.
3443 (powerpc-e500l.c): Remove.
3444 (powerpc-64l.c): Remove.
3445 (powerpc-altivec64l.c): Remove.
3446 (powerpc-cell64l.c): Remove.
3447 (powerpc-vsx64l.c): Remove.
3448 (powerpc-isa205-64l.c): Remove.
3449 (powerpc-isa205-altivec64l.c): Remove.
3450 (powerpc-isa205-vsx64l.c): Remove.
3451 (s390-linux32.c): Remove.
3452 (s390-linux32v1.c): Remove.
3453 (s390-linux32v2.c): Remove.
3454 (s390-linux64.c): Remove.
3455 (s390-linux64v1.c): Remove.
3456 (s390-linux64v2.c): Remove.
3457 (s390-te-linux64.c): Remove.
3458 (s390-vx-linux64.c): Remove.
3459 (s390-tevx-linux64.c): Remove.
3460 (s390x-linux64.c): Remove.
3461 (s390x-linux64v1.c): Remove.
3462 (s390x-linux64v2.c): Remove.
3463 (s390x-te-linux64.c): Remove.
3464 (s390x-vx-linux64.c): Remove.
3465 (s390x-tevx-linux64.c): Remove.
3466 (tic6x-c64xp-linux.c): Remove.
3467 (tic6x-c64x-linux.c): Remove.
3468 (tic6x-c62x-linux.c): Remove.
3469 (reg-sh.c): Remove.
3470 (reg-sparc64.c): Remove.
3471 (reg-spu.c): Remove.
3472 (amd64.c): Remove.
3473 (amd64-linux.c): Remove.
3474 (amd64-avx.c): Remove.
3475 (amd64-avx-linux.c): Remove.
3476 (amd64-avx-avx512.c): Remove.
3477 (amd64-avx-avx512-linux.c): Remove.
3478 (amd64-mpx.c): Remove.
3479 (amd64-mpx-linux.c): Remove.
3480 (amd64-avx-mpx-avx512-pku.c): Remove.
3481 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
3482 (amd64-avx-mpx.c): Remove.
3483 (amd64-avx-mpx-linux.c): Remove.
3484 (x32.c): Remove.
3485 (x32-linux.c): Remove.
3486 (x32-avx.c): Remove.
3487 (x32-avx-linux.c): Remove.
3488 (x32-avx-avx512.c): Remove.
3489 (x32-avx-avx512-linux.c): Remove.
3490 (reg-xtensa.c): Remove.
3491 (reg-tilegx.c): Remove.
3492 (reg-tilegx32.c): Remove.
3493
1672e0d9
SDJ
34942017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
3495
3496 * Makefile.in (SFILES): Add "common/environ.c".
3497 (OBJS): Add "common/environ.h".
3498
239b6d10
WT
34992017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
3500
3501 * configure.ac: Check if the fs_base and gs_base members of
3502 `struct user_regs_struct' exist.
3503 * config.in: Regenerated.
3504 * configure: Likewise.
3505
694b382c
AT
35062017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
3507
3508 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
3509 target_read_memory.
3510 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
3511 (get_next_pcs_syscall_next_pc): Likewise.
3512
7dc53023
LM
35132016-12-23 Luis Machado <lgustavo@codesourcery.com>
3514
3515 * win32-i386-low.c: Fix incorrect reference to a couple source files.
3516 * nto-x86-low.c: Likewise.
3517
ad02e4fe
SM
35182016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
3519
3520 * Makefile.in: Include disable-implicit-rules.mk.
3521
dcb07cfa
PA
35222016-11-23 Pedro Alves <palves@redhat.com>
3523
3524 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
3525 (debug_vprintf): Use std::chrono::steady_clock instead of
3526 gettimeofday. Use '.' instead of ':'.
3527 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
3528 (get_timestamp): Use std::chrono::steady_clock instead of
3529 gettimeofday.
3530
8629c02c
SM
35312016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
3532
3533 * Makefile.in: Fix whitespace formatting.
3534
b593ecca
SM
35352016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
3536
3537 * Makefile.in (SFILES, OBS): Flatten list and order
3538 alphabetically.
3539
9986ba08
PA
35402016-11-23 Pedro Alves <palves@redhat.com>
3541
3542 * event-loop.c (handle_file_event): Use warning.
3543 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
3544 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
3545 Use warning.
3546
4eefa7bc
PA
35472016-11-23 Pedro Alves <palves@redhat.com>
3548
3549 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
3550 output.
3551 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
3552 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
3553 debug_printf and debug_flush for debug output.
3554 * server.c (handle_general_set): Likewise.
3555 * thread-db.c (try_thread_db_load): Use debug_printf for debug
3556 output.
3557
5443506e
SM
35582016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
3559
3560 * Makefile.in (.c.o): Replace rule with ...
3561 (%.o: %.c): ... this one.
3562
3b165252
SM
35632016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
3564
3565 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
3566 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
3567 make.
3568 * configure.ac: Remove checks for the make program.
3569 * configure: Re-generate.
3570
0bcda685
PA
35712016-10-28 Pedro Alves <palves@redhat.com>
3572
3573 * Makefile.in (CXX_DIALECT): Get from configure.
3574 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
3575 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
3576 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
3577 * config.in: Regenerate.
3578 * configure: Regenerate.
3579
c3805894
YQ
35802016-10-27 Yao Qi <yao.qi@linaro.org>
3581
3582 * linux-low.c (linux_supports_range_stepping): Return true if
3583 can_software_single_step return true.
3584
89342618
YQ
35852016-10-27 Yao Qi <yao.qi@linaro.org>
3586
3587 * inferiors.c (find_inferior_in_random): New function.
3588 * inferiors.h (find_inferior_in_random): Declare.
3589 * linux-low.c (linux_wait_for_event_filtered): Call
3590 find_inferior_in_random instead of find_inferior.
3591
e3652c84
YQ
35922016-10-27 Yao Qi <yao.qi@linaro.org>
3593
3594 * linux-low.c (linux_wait_1): If single-step breakpoints are
3595 inserted, remove them.
3596
5a04c4cf
PA
35972016-10-26 Pedro Alves <palves@redhat.com>
3598
3599 * linux-low.c (handle_extended_wait): Link parent/child fork
3600 threads.
3601 (linux_wait_1): Unlink them.
3602 (linux_set_resume_request): Ignore resume requests for
3603 already-resumed and unhandled fork child threads.
3604 * linux-low.h (struct lwp_info) <fork_relative>: New field.
3605 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
3606 New functions.
3607 (handle_v_requests) <vCont>: Don't call require_running.
3608 * server.h (in_queued_stop_replies): New declaration.
3609
cb93dc7f
YQ
36102016-10-24 Yao Qi <yao.qi@linaro.org>
3611
3612 PR server/20733
3613 * linux-aarch64-low.c (append_insns): Cast the return value to
3614 'uint32_t *'.
3615
a1078bea
YQ
36162016-10-10 Yao Qi <yao.qi@linaro.org>
3617
3618 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
3619
1fb77080
SDJ
36202016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
3621
3622 * target.c (target_supports_multi_process): New function, moved
3623 from...
3624 * target.h (target_supports_multi_process): ... here. Remove
3625 macro.
3626
39b5a3b9
TT
36272016-10-05 Tom Tromey <tom@tromey.com>
3628
3629 PR remote/20655:
3630 * tracepoint.c (handle_tracepoint_bkpts): Check
3631 ipa_error_tracepoint, not ipa_stopping_tracepoint.
3632
c1d0b70a
YQ
36332016-10-05 Yao Qi <yao.qi@linaro.org>
3634
3635 * configure.srv: Update the path of arm-*.xml files.
3636
0a69eedb
YQ
36372016-10-05 Terry Guo <terry.guo@arm.com>
3638 Yao Qi <yao.qi@linaro.org>
3639
3640 * Makefile.in: Adjust the path of rules.
3641 * configure.srv: Update the path of xml files.
3642 * regformats/arm-with-iwmmxt.dat: Regenerated.
3643 * regformats/arm-with-neon.dat: Likewise.
3644 * regformats/arm-with-vfpv2.dat: Likewise.
3645 * regformats/arm-with-vfpv3.dat Likewise.
3646
17e16485
YQ
36472016-09-30 Yao Qi <yao.qi@linaro.org>
3648
3649 PR gdbserver/20627
3650 * target.c (target_stop_and_wait): Don't call
3651 target_continue_no_signal, use resume_stop instead.
3652
edeeb602
YQ
36532016-09-26 Yao Qi <yao.qi@linaro.org>
3654
3655 * linux-low.c (linux_wait_1): Call debug_exit.
3656
503b1c39
PA
36572016-09-23 Pedro Alves <palves@redhat.com>
3658
3659 * Makefile.in (SFILES): Add common/new-op.c.
3660 (OBS): Add common/new-op.o.
3661 (new-op.o): New rule.
3662
74172ecf
SM
36632016-09-21 Simon Marchi <simon.marchi@ericsson.com>
3664
3665 * .gitinore: Ignore more files.
3666
fc6cda2e
YQ
36672016-09-21 Yao Qi <yao.qi@linaro.org>
3668
3669 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
3670 23.
3671
bc1e6c81
SDJ
36722016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
3673
3674 * server.c (start_inferior): Call target_mourn_inferior instead of
3675 mourn_inferior; pass ptid_t argument to it.
3676 (resume): Likewise.
3677 (handle_target_event): Likewise.
3678 * target.c (target_mourn_inferior): New function.
3679 * target.h (mourn_inferior): Delete macro.
3680
0e00e962
AA
36812016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
3682
3683 * linux-low.c (lwp_is_stepping): New function.
3684
1d8cb77d
CL
36852016-09-06 Carl Love <cel@us.ibm.com>
3686
3687 * server.c (start_inferior): Fixed comment, requested comment change
3688 didn't get updated correctly. Removed reference to ptrace () call as
3689 it is only true on Linux systems.
3690
7313bced
CL
36912016-09-06 Carl Love <cel@us.ibm.com>
3692
3693 * server.c (start_inferior): Do not call
3694 function target_post_create_inferior () if the
3695 inferior process has already exited.
3696
cf6de44d
PA
36972016-09-05 Pedro Alves <palves@redhat.com>
3698
3699 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
3700 (COMPILE.pre, CC_LD): Use CXX directly.
3701 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
3702 * acinclude.m4: Don't include build-with-cxx.m4.
3703 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
3704 * configure: Regenerate.
3705
c1da6748
AT
37062016-09-02 Akash Trehan <akash.trehan123@gmail.com>
3707
3708 PR gdb/19495
3709 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
3710 call writing data to own_buf.
3711
f2b9e3df
SDJ
37122016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
3713
3714 * target.c (mywait): Call target_wait instead of
3715 the_target->wait.
3716 (target_wait): New function.
3717
049a8570
SDJ
37182016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
3719
3720 * server.c (start_inferior): New variable 'ptid'. Replace calls
3721 to the_target->resume by target_continue{,_no_signal}, depending
3722 on the case.
3723 * target.c (target_stop_and_wait): Call target_continue_no_signal
3724 instead of the_target->resume.
3725 (target_continue): New function.
3726
3aa5cfa0
AT
37272016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
3728
3729 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
3730
754653a7
AZ
37312016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
3732
3733 PR server/20491
3734 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
3735 ps_prochandle.
3736 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
3737 * linux-arm-low.c (ps_get_thread_area): Likewise.
3738 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
3739 * linux-m68k-low.c (ps_get_thread_area): Likewise.
3740 * linux-mips-low.c (ps_get_thread_area): Likewise.
3741 * linux-nios2-low.c (ps_get_thread_area): Likewise.
3742 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
3743 * linux-x86-low.c (ps_get_thread_area): Likewise.
3744 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
3745
ed036b40
PA
37462016-08-19 Pedro Alves <palves@redhat.com>
3747
3748 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
3749
c8ef42ee
PA
37502016-08-19 Pedro Alves <palves@redhat.com>
3751
3752 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
3753 comment. Use memcpy instead of casting through unsigned long.
3754
9c235a72
PA
37552016-08-19 Pedro Alves <palves@redhat.com>
3756
3757 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
3758 allocating around 0x80000000.
3759
201506da
PA
37602016-08-19 Pedro Alves <palves@redhat.com>
3761
3762 PR gdb/20415
3763 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
3764 (x32-avx512-linux-ipa.o): New rules.
3765 * configure.ac (x86_64-*-linux*): New x32 check.
3766 * configure.srv (ipa_x32_linux_regobj): New.
3767 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
3768 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
3769 descriptions.
3770 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
3771 descriptions.
3772 * configure: Regenerate.
3773
f348d89a
PA
37742016-08-09 Pedro Alves <palves@redhat.com>
3775
3776 PR gdb/18653
3777 * Makefile.in (OBS): Add signals-state-save-restore.o.
3778 (signals-state-save-restore.o): New rule.
3779 * config.in: Regenerate.
3780 * configure: Regenerate.
3781 * linux-low.c: Include "signals-state-save-restore.h".
3782 (linux_create_inferior): Call
3783 restore_original_signals_state.
3784 * server.c: Include "dispositions-save-restore.h".
3785 (captured_main): Call save_original_signals_state.
3786
1baf5149
PA
37872016-08-05 Pedro Alves <palves@redhat.com>
3788
3789 * configure: Regenerate.
3790
fcd4a73d
YQ
37912016-08-04 Yao Qi <yao.qi@linaro.org>
3792
3793 * linux-low.c (regsets_fetch_inferior_registers): Check
3794 errno is ESRCH or not.
3795
979659d0
YQ
37962016-08-02 Yao Qi <yao.qi@linaro.org>
3797
3798 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
3799 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
3800 (thread_db_load_search): Update.
3801 (try_thread_db_load_1): Don't look for td_ta_event_addr,
3802 td_ta_set_event and td_ta_event_getmsg.
3803
6598661d
PA
38042016-07-26 Pedro Alves <palves@redhat.com>
3805
3806 PR server/20414
3807 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
3808 of unsigned long for 64-bit registers and use uint32_t instead of
3809 unsigned int for 32-bit registers.
3810
9cf12d57
PA
38112016-07-26 Pedro Alves <palves@redhat.com>
3812
3813 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
3814 to 'ptrace'.
3815
305450ed
TT
38162016-07-21 Tom Tromey <tom@tromey.com>
3817
3818 * configure: Rebuild.
3819
2583da7c
YQ
38202016-07-21 Yao Qi <yao.qi@linaro.org>
3821
3822 * mem-break.c (find_gdb_breakpoint): Cast bp to
3823 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
3824
21536b36
YQ
38252016-07-21 Yao Qi <yao.qi@linaro.org>
3826
3827 * server.c (handle_v_requests): Support s and S actions
3828 if target_supports_software_single_step return true.
3829
8901d193
YQ
38302016-07-21 Yao Qi <yao.qi@linaro.org>
3831
3832 * linux-low.c (resume_stopped_resumed_lwps): If resume request
3833 is resume_step, call maybe_hw_step.
3834 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
3835 and unstop them.
3836 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
3837 breakpoints or not.
3838 (proceed_one_lwp): If resume request is resume_step, install
3839 reinsert breakpoints and call maybe_hw_step.
3840
0e9a339e
YQ
38412016-07-21 Yao Qi <yao.qi@linaro.org>
3842
3843 * linux-low.c (proceed_one_lwp): Declare.
3844 (linux_resume_one_thread): Remove local variable 'step'.
3845 Lift code enqueue signal. Call proceed_one_lwp instead of
3846 linux_resume_one_lwp.
3847
4281b351
YQ
38482016-07-21 Yao Qi <yao.qi@linaro.org>
3849
3850 * linux-low.c (linux_resume_one_thread): Call
3851 enqueue_pending_signal.
3852
984a2c04
YQ
38532016-07-21 Yao Qi <yao.qi@linaro.org>
3854
3855 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
3856 * inferiors.c (do_restore_current_thread_cleanup): New function.
3857 (make_cleanup_restore_current_thread): Likewise.
3858 * linux-low.c (install_software_single_step_breakpoints): Call
3859 make_cleanup_restore_current_thread. Switch current_thread to
3860 thread.
3861
bec903c9
YQ
38622016-07-21 Yao Qi <yao.qi@linaro.org>
3863
3864 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
3865 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
3866 (clone_one_breakpoint): Likewise.
3867 (delete_reinsert_breakpoints): Change parameter to thread.
3868 Callers updated.
3869 (has_reinsert_breakpoints): Likewise.
3870 (uninsert_reinsert_breakpoints): Likewise.
3871 (reinsert_reinsert_breakpoints): Likewise.
3872 * mem-break.h (set_reinsert_breakpoint): Update declaration.
3873 (delete_reinsert_breakpoints): Likewise.
3874 (reinsert_reinsert_breakpoints): Likewise.
3875 (uninsert_reinsert_breakpoints): Likewise.
3876 (has_reinsert_breakpoints): Likewise.
3877
63c40ec7
YQ
38782016-07-21 Yao Qi <yao.qi@linaro.org>
3879
3880 * inferiors.c (get_thread_process): Make parameter const.
3881 * inferiors.h (get_thread_process): Update declaration.
3882 * mem-break.c (clone_all_breakpoints): Remove all parameters.
3883 Add new parameters child_thread and parent_thread. Callers
3884 updated.
3885 * mem-break.h (clone_all_breakpoints): Update declaration.
3886
9aa76cd0
YQ
38872016-07-21 Yao Qi <yao.qi@linaro.org>
3888
3889 * mem-break.c (struct breakpoint) <cond_list>: Remove.
3890 <command_list, handler>: Remove.
3891 (struct gdb_breakpoint): New.
3892 (struct other_breakpoint): New.
3893 (struct reinsert_breakpoint): New.
3894 (is_gdb_breakpoint): New function.
3895 (any_persistent_commands): Update command_list if
3896 is_gdb_breakpoint returns true.
3897 (set_breakpoint): Create breakpoints according to their types.
3898 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
3899 (set_gdb_breakpoint_1): Likewise.
3900 (set_gdb_breakpoint): Likewise.
3901 (clear_breakpoint_conditions): Change parameter type to
3902 'struct gdb_breakpoint *'.
3903 (clear_breakpoint_commands): Likewise.
3904 (clear_breakpoint_conditions_and_commands): Likewise.
3905 (add_condition_to_breakpoint): Likewise.
3906 (add_breakpoint_condition): Likewise.
3907 (add_commands_to_breakpoint): Likewise.
3908 (check_breakpoints): Check other_breakpoint.
3909 (clone_one_breakpoint): Clone breakpopint according to its type.
3910 * mem-break.h (struct gdb_breakpoint): Declare.
3911 (set_gdb_breakpoint): Update declaration.
3912 (clear_breakpoint_conditions_and_commands): Likewise.
3913 (add_breakpoint_condition): Likewise.
3914 (add_breakpoint_commands): Likewise.
3915 * server.c (process_point_options): Change parameter type to
3916 'struct gdb_breakpoint *'.
3917
811f8301
YQ
39182016-07-21 Yao Qi <yao.qi@linaro.org>
3919
3920 * mem-break.c (set_breakpoint_at): Rename it to ...
3921 (set_breakpoint_type_at): ... it.
3922 (set_breakpoint_at): Call set_breakpoint_type_at.
3923 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
3924 * mem-break.h (set_breakpoint_at): Update comments.
3925
b1c51e36
CLT
39262016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
3927
3928 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
3929 to buf parameter.
3930 (nios2_store_gregset): Likewise.
3931
ced2dffb
PA
39322016-07-01 Pedro Alves <palves@redhat.com>
3933 Antoine Tremblay <antoine.tremblay@ericsson.com>
3934
3935 * linux-low.c: Change interface to take the target lwp_info
3936 pointer directly and return void. Handle detaching from a zombie
3937 thread.
3938 (linux_detach_lwp_callback): New function.
3939 (linux_detach): Detach from the leader thread after detaching from
3940 the clone threads.
3941
2ac09a5b
YQ
39422016-06-28 Yao Qi <yao.qi@linaro.org>
3943
3944 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
3945 for variable new_offset.
3946 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
3947 (aarch64_ftrace_insn_reloc_cb): Likewise.
3948 (aarch64_ftrace_insn_reloc_tb): Likewise.
3949 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
3950 PRIx64 instead of PRIx32.
3951
79e7fd4f
YQ
39522016-06-28 Yao Qi <yao.qi@linaro.org>
3953
3954 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
3955 (the_low_target): Install arm_get_syscall_trapinfo.
3956
061fc021
YQ
39572016-06-28 Yao Qi <yao.qi@linaro.org>
3958
3959 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
3960 function.
3961 (the_low_target): Install aarch64_get_syscall_trapinfo.
3962
4cc32bec
YQ
39632016-06-28 Yao Qi <yao.qi@linaro.org>
3964
3965 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
3966 Callers updated.
3967 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
3968 Remove parameter sysno.
3969 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
3970 sysret.
3971
782c1122
AA
39722016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
3973
3974 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
3975 (s390_emit_ne_goto): Likewise.
3976 (s390_emit_lt_goto): Likewise.
3977 (s390_emit_le_goto): Likewise.
3978 (s390_emit_gt_goto): Likewise.
3979 (s390_emit_ge_goto): Likewise.
3980 (s390x_emit_eq_goto): Likewise.
3981 (s390x_emit_ne_goto): Likewise.
3982 (s390x_emit_lt_goto): Likewise.
3983 (s390x_emit_le_goto): Likewise.
3984 (s390x_emit_gt_goto): Likewise.
3985 (s390x_emit_ge_goto): Likewise.
3986 (s390_emit_ops_impl): Mark variable static.
3987 (s390x_emit_ops): Likewise.
3988
2e7b624b
YQ
39892016-06-17 Yao Qi <yao.qi@linaro.org>
3990
3991 * linux-low.c (handle_extended_wait): Call
3992 uninsert_reinsert_breakpoints for the parent process. Remove
3993 reinsert breakpoints from the child process. Reinsert them to
3994 the parent process when vfork is done.
3995 * mem-break.c (uninsert_reinsert_breakpoints): New function.
3996 (reinsert_reinsert_breakpoints): New function.
3997 * mem-break.h (uninsert_reinsert_breakpoints): Declare
3998 (reinsert_reinsert_breakpoints): Declare.
3999
8a81c5d7
YQ
40002016-06-17 Yao Qi <yao.qi@linaro.org>
4001
4002 * linux-low.c (handle_extended_wait): If the parent is doing
4003 step-over, remove the reinsert breakpoints from the forked child.
4004
f50bf8e5
YQ
40052016-06-17 Yao Qi <yao.qi@linaro.org>
4006
4007 * linux-low.c (unsuspend_all_lwps): Declare.
4008 (linux_low_filter_event): If thread exited, call finish_step_over.
4009 If step-over is finished, unsuspend other threads.
4010
8376a3cb
YQ
40112016-06-17 Yao Qi <yao.qi@linaro.org>
4012
4013 * linux-low.c (linux_resume_one_lwp_throw): Assert
4014 has_reinsert_breakpoints returns false.
4015 * mem-break.c (delete_disabled_breakpoints): Assert
4016 bp type isn't reinsert_breakpoint.
4017
f79b145d
YQ
40182016-06-17 Yao Qi <yao.qi@linaro.org>
4019
4020 * linux-low.c (maybe_hw_step): New function.
4021 (linux_resume_one_lwp_throw): Call maybe_hw_step.
4022 (finish_step_over): Switch current_thread to lwp temporarily,
4023 and assert has_reinsert_breakpoints returns true.
4024 (proceed_one_lwp): Call maybe_hw_step.
4025 * mem-break.c (has_reinsert_breakpoints): New function.
4026 * mem-break.h (has_reinsert_breakpoints): Declare.
4027
0ae534d2
JT
40282016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
4029
4030 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
4031
fcdad592
YQ
40322016-05-17 Yao Qi <yao.qi@linaro.org>
4033
4034 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
4035 instead of find_inferior.
4036
9e784964
YQ
40372016-05-05 Yao Qi <yao.qi@linaro.org>
4038
4039 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
4040 Initialize res to zero.
4041
cf2ebb6e
YQ
40422016-05-05 Yao Qi <yao.qi@linaro.org>
4043
4044 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
4045 to uint32_t.
4046
c1aebf87
UW
40472016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
4048
4049 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
4050 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
4051 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
4052
35fd2deb 40532016-04-28 Par Olsson <par.olsson@windriver.com>
cbe14bcf 4054 Simon Marchi <simon.marchi@ericsson.com>
35fd2deb
PO
4055
4056 * tracepoint.c (write_inferior_int8): New function.
4057 (cmd_qtenable_disable): Write enable flag using
4058 write_inferior_int8.
4059
484b3c32
YQ
40602016-04-25 Yao Qi <yao.qi@linaro.org>
4061
4062 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
4063 (need_step_over_p): Return zero if the LWP has pending signals
4064 can be delivered on software single step target.
4065
85ba7d86
YQ
40662016-04-25 Yao Qi <yao.qi@linaro.org>
4067
4068 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
4069 return instead of error.
4070
3539aa13
YQ
40712016-04-22 Yao Qi <yao.qi@linaro.org>
4072
4073 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
4074 to 23.
4075
5b061e98
YQ
40762016-04-22 Yao Qi <yao.qi@linaro.org>
4077
4078 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
4079 signal when stepping over breakpoint with software single
4080 step.
4081
3451269c
PA
40822016-04-21 Pedro Alves <palves@redhat.com>
4083
4084 * linux-s390-low.c (s390_collect_ptrace_register)
4085 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
4086 add casts.
4087 (s390_check_regset): Use void * instead of gdb_byte *.
4088
a2358508
PA
40892016-04-20 Pedro Alves <palves@redhat.com>
4090
4091 * configure: Renegerate.
4092
6885166d
YQ
40932016-04-20 Yao Qi <yao.qi@linaro.org>
4094
4095 * linux-aarch32-low.c: Include "arch/arm-linux.h".
4096 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
4097 number 16.
4098 (arm_store_gregset): Likewise.
4099
2b863f51
WT
41002016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
4101
4102 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
4103 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
4104 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
4105 (amd64-avx-mpx-linux.c): New rules.
4106 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
4107 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
4108 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
4109 (srv_amd64_regobj): Add amd64-avx-mpx.o.
4110 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
4111 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
4112 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
4113 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
4114 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
4115 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
4116 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
4117 * linux-x86-low.c (x86_linux_read_description): Add case for
4118 X86_XSTATE_AVX_MPX_MASK.
4119 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
4120 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
4121 init_registers_i386_avx_mpx_linux.
4122 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
4123 (initialize_low_tracepoint): Call
4124 init_registers_i386_avx_mpx_linux.
4125 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
4126 (initialize_low_tracepoint): Call
4127 init_registers_amd64_avx_mpx_linux.
4128 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
4129 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
4130 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
4131 declarations.
4132
9b30624b
PA
41332016-04-18 Pedro Alves <palves@redhat.com>
4134
4135 * configure: Regenerate.
4136
45e3745e
AT
41372016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
4138
4139 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
4140 (aarch64_emit_sub): Likewise.
4141
2afc13ff
PA
41422016-04-12 Pedro Alves <palves@redhat.com>
4143
4144 * utils.c (prepare_to_throw_exception): Delete.
4145
6e774b13
SM
41462016-04-05 Simon Marchi <simon.marchi@ericsson.com>
4147
4148 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
4149
4dca19f8
MK
41502016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
4151
4152 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
4153
d0a9981f
MK
41542016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
4155
4156 * linux-aarch64-ipa.c: Add <elf.h> include.
4157 * linux-ppc-ipa.c: Add <elf.h> include.
4158 * linux-s390-ipa.c: Add <elf.h> include.
4159
252db07e
MK
41602016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
4161
4162 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
4163 (get_raw_reg_ptr): Likewise.
4164 (get_trace_state_variable_value_ptr): Likewise.
4165 (set_trace_state_variable_value_ptr): Likewise.
4166 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
4167 char *.
4168
14e2b6d9
MK
41692016-03-31 Wei-cheng Wang <cole945@gmail.com>
4170 Marcin Kościelnicki <koriakin@0x04.net>
4171
4172 PR/17221
4173 * linux-ppc-low.c (emit_insns): New function.
4174 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
4175 (ppc_emit_prologue): New function.
4176 (ppc_emit_epilogue): New function.
4177 (ppc_emit_add): New function.
4178 (ppc_emit_sub): New function.
4179 (ppc_emit_mul): New function.
4180 (ppc_emit_lsh): New function.
4181 (ppc_emit_rsh_signed): New function.
4182 (ppc_emit_rsh_unsigned): New function.
4183 (ppc_emit_ext): New function.
4184 (ppc_emit_zero_ext): New function.
4185 (ppc_emit_log_not): New function.
4186 (ppc_emit_bit_and): New function.
4187 (ppc_emit_bit_or): New function.
4188 (ppc_emit_bit_xor): New function.
4189 (ppc_emit_bit_not): New function.
4190 (ppc_emit_equal): New function.
4191 (ppc_emit_less_signed): New function.
4192 (ppc_emit_less_unsigned): New function.
4193 (ppc_emit_ref): New function.
4194 (ppc_emit_const): New function.
4195 (ppc_emit_reg): New function.
4196 (ppc_emit_pop): New function.
4197 (ppc_emit_stack_flush): New function.
4198 (ppc_emit_swap): New function.
4199 (ppc_emit_stack_adjust): New function.
4200 (ppc_emit_call): New function.
4201 (ppc_emit_int_call_1): New function.
4202 (ppc_emit_void_call_2): New function.
4203 (ppc_emit_if_goto): New function.
4204 (ppc_emit_goto): New function.
4205 (ppc_emit_eq_goto): New function.
4206 (ppc_emit_ne_goto): New function.
4207 (ppc_emit_lt_goto): New function.
4208 (ppc_emit_le_goto): New function.
4209 (ppc_emit_gt_goto): New function.
4210 (ppc_emit_ge_goto): New function.
4211 (ppc_write_goto_address): New function.
4212 (ppc_emit_ops_impl): New static variable.
4213 (ppc64v1_emit_prologue): New function.
4214 (ppc64v2_emit_prologue): New function.
4215 (ppc64_emit_epilogue): New function.
4216 (ppc64_emit_add): New function.
4217 (ppc64_emit_sub): New function.
4218 (ppc64_emit_mul): New function.
4219 (ppc64_emit_lsh): New function.
4220 (ppc64_emit_rsh_signed): New function.
4221 (ppc64_emit_rsh_unsigned): New function.
4222 (ppc64_emit_ext): New function.
4223 (ppc64_emit_zero_ext): New function.
4224 (ppc64_emit_log_not): New function.
4225 (ppc64_emit_bit_and): New function.
4226 (ppc64_emit_bit_or): New function.
4227 (ppc64_emit_bit_xor): New function.
4228 (ppc64_emit_bit_not): New function.
4229 (ppc64_emit_equal): New function.
4230 (ppc64_emit_less_signed): New function.
4231 (ppc64_emit_less_unsigned): New function.
4232 (ppc64_emit_ref): New function.
4233 (ppc64_emit_const): New function.
4234 (ppc64v1_emit_reg): New function.
4235 (ppc64v2_emit_reg): New function.
4236 (ppc64_emit_pop): New function.
4237 (ppc64_emit_stack_flush): New function.
4238 (ppc64_emit_swap): New function.
4239 (ppc64v1_emit_call): New function.
4240 (ppc64v2_emit_call): New function.
4241 (ppc64v1_emit_int_call_1): New function.
4242 (ppc64v2_emit_int_call_1): New function.
4243 (ppc64v1_emit_void_call_2): New function.
4244 (ppc64v2_emit_void_call_2): New function.
4245 (ppc64_emit_if_goto): New function.
4246 (ppc64_emit_eq_goto): New function.
4247 (ppc64_emit_ne_goto): New function.
4248 (ppc64_emit_lt_goto): New function.
4249 (ppc64_emit_le_goto): New function.
4250 (ppc64_emit_gt_goto): New function.
4251 (ppc64_emit_ge_goto): New function.
4252 (ppc64v1_emit_ops_impl): New static variable.
4253 (ppc64v2_emit_ops_impl): New static variable.
4254 (ppc_emit_ops): New function.
4255 (linux_low_target): Wire in ppc_emit_ops.
4256
a2174ba4
MK
42572016-03-31 Wei-cheng Wang <cole945@gmail.com>
4258 Marcin Kościelnicki <koriakin@0x04.net>
4259
4260 PR/17221
4261 * Makefile.in: Add powerpc-*-ipa.o
4262 * configure.srv: Add ipa_obj for powerpc*-linux.
4263 * linux-ppc-ipa.c: New file.
4264 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
4265 includes.
4266 (PPC_FIELD): New macro.
4267 (PPC_SEXT): New macro.
4268 (PPC_OP6): New macro.
4269 (PPC_BO): New macro.
4270 (PPC_LI): New macro.
4271 (PPC_BD): New macro.
4272 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
4273 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
4274 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
4275 (ppc_get_thread_area): New function.
4276 (is_elfv2_inferior): New function.
4277 (gen_ds_form): New function.
4278 (GEN_STD): New macro.
4279 (GEN_STDU): New macro.
4280 (GEN_LD): New macro.
4281 (GEN_LDU): New macro.
4282 (gen_d_form): New function.
4283 (GEN_ADDI): New macro.
4284 (GEN_ADDIS): New macro.
4285 (GEN_LI): New macro.
4286 (GEN_LIS): New macro.
4287 (GEN_ORI): New macro.
4288 (GEN_ORIS): New macro.
4289 (GEN_LWZ): New macro.
4290 (GEN_STW): New macro.
4291 (GEN_STWU): New macro.
4292 (gen_xfx_form): New function.
4293 (GEN_MFSPR): New macro.
4294 (GEN_MTSPR): New macro.
4295 (GEN_MFCR): New macro.
4296 (GEN_MTCR): New macro.
4297 (GEN_SYNC): New macro.
4298 (GEN_LWSYNC): New macro.
4299 (gen_x_form): New function.
4300 (GEN_OR): New macro.
4301 (GEN_MR): New macro.
4302 (GEN_LWARX): New macro.
4303 (GEN_STWCX): New macro.
4304 (GEN_CMPW): New macro.
4305 (gen_md_form): New function.
4306 (GEN_RLDICL): New macro.
4307 (GEN_RLDICR): New macro.
4308 (gen_i_form): New function.
4309 (GEN_B): New macro.
4310 (GEN_BL): New macro.
4311 (gen_b_form): New function.
4312 (GEN_BNE): New macro.
4313 (GEN_LOAD): New macro.
4314 (GEN_STORE): New macro.
4315 (gen_limm): New function.
4316 (gen_atomic_xchg): New function.
4317 (gen_call): New function.
4318 (ppc_relocate_instruction): New function.
4319 (ppc_install_fast_tracepoint_jump_pad): New function.
4320 (ppc_get_min_fast_tracepoint_insn_len): New function.
4321 (ppc_get_ipa_tdesc_idx): New function.
4322 (the_low_target): Wire in the new functions.
4323 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
4324 tdescs.
4325 * linux-ppc-tdesc.h: New file.
4326
a13c4696
MK
43272016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
4328
4329 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
4330 (alloc_jump_pad_buffer): New function.
4331 * linux-amd64-ipa.c: Add <sys/mman.h> include.
4332 (alloc_jump_pad_buffer): New function.
4333 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
4334 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
4335 (alloc_jump_pad_buffer): New function.
4336 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
4337 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
4338 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
4339 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
4340
1cda1512
MK
43412016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
4342
4343 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
4344 * linux-amd64-ipa.c: Likewise.
4345 * linux-i386-ipa.c: Likewise.
4346 * linux-s390-ipa.c: Likewise.
4347 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
4348 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
4349 set_trace_state_variable_value_ptr.
4350 (struct ipa_sym_addresses): Likewise.
4351 (symbol_list): Likewise.
4352 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
4353 accessing gdb_collect directly.
4354 (gdb_collect_ptr_type): New typedef.
4355 (get_raw_reg_ptr_type): New typedef.
4356 (get_trace_state_variable_value_ptr_type): New typedef.
4357 (set_trace_state_variable_value_ptr_type): New typedef.
4358 (gdb_collect_ptr): New global.
4359 (get_raw_reg_ptr): New global.
4360 (get_trace_state_variable_value_ptr): New global.
4361 (set_trace_state_variable_value_ptr): New global.
4362 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
4363 accessing get_raw_reg directly.
4364 (get_get_tsv_func_addr): Likewise for
4365 get_trace_state_variable_value_ptr.
4366 (get_set_tsv_func_addr): Likewise for
4367 set_trace_state_variable_value_ptr.
4368 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
4369
72fb5488
SM
43702016-03-30 Simon Marchi <simon.marchi@ericsson.com>
4371
4372 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
4373
28170b88
MK
43742016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
4375
4376 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
4377 packets.
4378 (relocate_instruction): Remove own_buf.
4379 * server.c (own_buf): Make global.
4380 (handle_v_requests): Make global.
4381 * server.h (own_buf): New declaration.
4382 (handle_v_requests): New prototype.
4383
f39e8743
MK
43842016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
4385
4386 PR 18377
4387 * linux-s390-low.c (add_insns): New function.
4388 (s390_emit_prologue): New function.
4389 (s390_emit_epilogue): New function.
4390 (s390_emit_add): New function.
4391 (s390_emit_sub): New function.
4392 (s390_emit_mul): New function.
4393 (s390_emit_lsh): New function.
4394 (s390_emit_rsh_signed): New function.
4395 (s390_emit_rsh_unsigned): New function.
4396 (s390_emit_ext): New function.
4397 (s390_emit_log_not): New function.
4398 (s390_emit_bit_and): New function.
4399 (s390_emit_bit_or): New function.
4400 (s390_emit_bit_xor): New function.
4401 (s390_emit_bit_not): New function.
4402 (s390_emit_equal): New function.
4403 (s390_emit_less_signed): New function.
4404 (s390_emit_less_unsigned): New function.
4405 (s390_emit_ref): New function.
4406 (s390_emit_if_goto): New function.
4407 (s390_emit_goto): New function.
4408 (s390_write_goto_address): New function.
4409 (s390_emit_litpool): New function.
4410 (s390_emit_const): New function.
4411 (s390_emit_call): New function.
4412 (s390_emit_reg): New function.
4413 (s390_emit_pop): New function.
4414 (s390_emit_stack_flush): New function.
4415 (s390_emit_zero_ext): New function.
4416 (s390_emit_swap): New function.
4417 (s390_emit_stack_adjust): New function.
4418 (s390_emit_set_r2): New function.
4419 (s390_emit_int_call_1): New function.
4420 (s390_emit_void_call_2): New function.
4421 (s390_emit_eq_goto): New function.
4422 (s390_emit_ne_goto): New function.
4423 (s390_emit_lt_goto): New function.
4424 (s390_emit_le_goto): New function.
4425 (s390_emit_gt_goto): New function.
4426 (s390_emit_ge_goto): New function.
4427 (s390x_emit_prologue): New function.
4428 (s390x_emit_epilogue): New function.
4429 (s390x_emit_add): New function.
4430 (s390x_emit_sub): New function.
4431 (s390x_emit_mul): New function.
4432 (s390x_emit_lsh): New function.
4433 (s390x_emit_rsh_signed): New function.
4434 (s390x_emit_rsh_unsigned): New function.
4435 (s390x_emit_ext): New function.
4436 (s390x_emit_log_not): New function.
4437 (s390x_emit_bit_and): New function.
4438 (s390x_emit_bit_or): New function.
4439 (s390x_emit_bit_xor): New function.
4440 (s390x_emit_bit_not): New function.
4441 (s390x_emit_equal): New function.
4442 (s390x_emit_less_signed): New function.
4443 (s390x_emit_less_unsigned): New function.
4444 (s390x_emit_ref): New function.
4445 (s390x_emit_if_goto): New function.
4446 (s390x_emit_const): New function.
4447 (s390x_emit_call): New function.
4448 (s390x_emit_reg): New function.
4449 (s390x_emit_pop): New function.
4450 (s390x_emit_stack_flush): New function.
4451 (s390x_emit_zero_ext): New function.
4452 (s390x_emit_swap): New function.
4453 (s390x_emit_stack_adjust): New function.
4454 (s390x_emit_int_call_1): New function.
4455 (s390x_emit_void_call_2): New function.
4456 (s390x_emit_eq_goto): New function.
4457 (s390x_emit_ne_goto): New function.
4458 (s390x_emit_lt_goto): New function.
4459 (s390x_emit_le_goto): New function.
4460 (s390x_emit_gt_goto): New function.
4461 (s390x_emit_ge_goto): New function.
4462 (s390_emit_ops): New function.
4463 (struct linux_target_ops): Fill in emit_ops hook.
4464
abd9baf9
MK
44652016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
4466
4467 PR 18377
4468 * Makefile.in: Add s390 IPA files.
4469 * configure.srv: Build IPA for s390.
4470 * linux-s390-ipa.c: New file.
4471 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
4472 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
4473 (tdesc_s390_linux32): Likewise.
4474 (init_registers_s390_linux32v1): Likewise.
4475 (tdesc_s390_linux32v1): Likewise.
4476 (init_registers_s390_linux32v2): Likewise.
4477 (tdesc_s390_linux32v2): Likewise.
4478 (init_registers_s390_linux64): Likewise.
4479 (tdesc_s390_linux64): Likewise.
4480 (init_registers_s390_linux64v1): Likewise.
4481 (tdesc_s390_linux64v1): Likewise.
4482 (init_registers_s390_linux64v2): Likewise.
4483 (tdesc_s390_linux64v2): Likewise.
4484 (init_registers_s390_te_linux64): Likewise.
4485 (tdesc_s390_te_linux64): Likewise.
4486 (init_registers_s390_vx_linux64): Likewise.
4487 (tdesc_s390_vx_linux64): Likewise.
4488 (init_registers_s390_tevx_linux64): Likewise.
4489 (tdesc_s390_tevx_linux64): Likewise.
4490 (init_registers_s390x_linux64): Likewise.
4491 (tdesc_s390x_linux64): Likewise.
4492 (init_registers_s390x_linux64v1): Likewise.
4493 (tdesc_s390x_linux64v1): Likewise.
4494 (init_registers_s390x_linux64v2): Likewise.
4495 (tdesc_s390x_linux64v2): Likewise.
4496 (init_registers_s390x_te_linux64): Likewise.
4497 (tdesc_s390x_te_linux64): Likewise.
4498 (init_registers_s390x_vx_linux64): Likewise.
4499 (tdesc_s390x_vx_linux64): Likewise.
4500 (init_registers_s390x_tevx_linux64): Likewise.
4501 (tdesc_s390x_tevx_linux64): Likewise.
4502 (have_hwcap_s390_vx): New static variable.
4503 (s390_arch_setup): Fill have_hwcap_s390_vx.
4504 (s390_get_thread_area): New function.
4505 (s390_ft_entry_gpr_esa): New const.
4506 (s390_ft_entry_gpr_zarch): New const.
4507 (s390_ft_entry_misc): New const.
4508 (s390_ft_entry_fr): New const.
4509 (s390_ft_entry_vr): New const.
4510 (s390_ft_main_31): New const.
4511 (s390_ft_main_64): New const.
4512 (s390_ft_exit_fr): New const.
4513 (s390_ft_exit_vr): New const.
4514 (s390_ft_exit_misc): New const.
4515 (s390_ft_exit_gpr_esa): New const.
4516 (s390_ft_exit_gpr_zarch): New const.
4517 (append_insns): New function.
4518 (s390_relocate_instruction): New function.
4519 (s390_install_fast_tracepoint_jump_pad): New function.
4520 (s390_get_min_fast_tracepoint_insn_len): New function.
4521 (s390_get_ipa_tdesc_idx): New function.
4522 (struct linux_target_ops): Wire in the above functions.
4523 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
4524 * linux-s390-tdesc.h: New file.
4525
a4105d04
MK
45262016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
4527
4528 * linux-s390-low.c (s390_supports_tracepoints): New function.
4529 (struct linux_target_ops): Fill supports_tracepoints hook.
4530
35ac8b3e
YQ
45312016-03-18 Yao Qi <yao.qi@linaro.org>
4532
4533 * linux-low.c (lwp_signal_can_be_delivered): New function.
4534 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
4535
94610ec4
YQ
45362016-03-18 Yao Qi <yao.qi@linaro.org>
4537
4538 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
4539 0 if signal is enqueued. Remove 'signal' from one debugging
4540 message. Move one debugging message to some lines below.
4541 Remove code setting 'signal' to 0.
4542
80aea927
YQ
45432016-03-18 Yao Qi <yao.qi@linaro.org>
4544
4545 * linux-low.c (linux_low_filter_event): Remove redundant
4546 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
4547
b04fd3be
MK
45482016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
4549
4550 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
4551 (struct linux_target_ops): Wire in the above.
4552
c40c8d4b
YQ
45532016-03-03 Yao Qi <yao.qi@linaro.org>
4554
4555 * linux-low.c: Update comments to start_step_over.
4556
0f8288ae
YQ
45572016-03-03 Yao Qi <yao.qi@linaro.org>
4558
4559 PR server/19736
4560 * linux-low.c (handle_extended_wait): Set child suspended
4561 if event_lwp->bp_reinsert isn't zero.
4562
fdbd04a8
YQ
45632016-03-02 Yao Qi <yao.qi@linaro.org>
4564
4565 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
4566 enqueue_pending_signal.
4567
6896a8fa
MK
45682016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
4569
4570 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
4571 is actually loaded.
4572
ab503087
MK
45732016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
4574
4575 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
4576 (s390_regmap_3264) [!__s390x__]: New global.
4577 (s390_collect_ptrace_register): Skip map entries containing -1.
4578 (s390_supply_ptrace_register): Ditto.
4579 (s390_fill_gprs_high): New function.
4580 (s390_store_gprs_high): New function.
4581 (s390_regsets): Add NT_S390_HIGH_GPRS.
4582 (s390_get_hwcap): Enable on 31-bit.
4583 (have_hwcap_s390_high_gprs): Enable on 31-bit.
4584 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
4585 Detect NT_S390_HIGH_GPRS.
4586 (s390_usrregs_info_3264): Enable on 31-bit.
4587 (s390_regs_info): Enable regs_info_3264 on 31-bit.
4588 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
4589
ae91f625
MK
45902016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
4591
4592 PR gdb/13808
4593 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
4594 * configure.srv: Ditto.
4595 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
4596 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
4597 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
4598 (init_registers_amd64_linux): Remove prototype.
4599 (tdesc_amd64_linux): Remove declaration.
4600 (get_ipa_tdesc): New function.
4601 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
4602 initialize remaining tdescs.
4603 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
4604 (init_registers_i386_linux): Remove prototype.
4605 (tdesc_i386_linux): Remove declaration.
4606 (get_ipa_tdesc): New function.
4607 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
4608 initialize remaining tdescs.
4609 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
4610 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
4611 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
4612 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
4613 (x86_get_ipa_tdesc_idx): New function.
4614 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
4615 * linux-x86-tdesc.h: New file.
4616 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
4617 (target_get_ipa_tdesc_idx): New macro.
4618 * tracepoint.c (ipa_tdesc_idx): New macro.
4619 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
4620 (symbol_list): Add ipa_tdesc_idx.
4621 (cmd_qtstart): Write ipa_tdesc_idx in the target.
4622 (ipa_tdesc): Remove.
4623 (ipa_tdesc_idx): New variable.
4624 (get_context_regcache): Use get_ipa_tdesc.
4625 (gdb_collect): Ditto.
4626 (gdb_probe): Ditto.
4627 * tracepoint.h (get_ipa_tdesc): New prototype.
4628 (ipa_tdesc): Remove.
4629
e7ad2f14
PA
46302016-02-24 Pedro Alves <palves@redhat.com>
4631
4632 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
4633 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
4634 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
4635 Factor out common code between the USE_SIGTRAP_SIGINFO and
4636 !USE_SIGTRAP_SIGINFO blocks.
4637 (linux_low_filter_event): Call save_stop_reason instead of
4638 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
4639 Update comments.
4640 (linux_wait_1): Update comments.
4641
657f9cde
WW
46422016-02-24 Wei-cheng Wang <cole945@gmail.com>
4643
4644 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
4645 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
4646 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
4647 ppc_insert_point, ppc_remove_point.
4648
b00b61e1
MK
46492016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
4650
4651 * linux-s390-low.c (s390_supports_z_point_type): New function.
4652 (struct linux_target_ops): Wire s390_supports_z_point_type in.
4653
553cb527
YQ
46542016-02-16 Yao Qi <yao.qi@linaro.org>
4655
4656 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
4657 PC. Get pc from regcache_read_pc.
4658
a5652c21
YQ
46592016-02-12 Yao Qi <yao.qi@linaro.org>
4660
4661 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
4662 or linux_get_pc_32bit.
4663 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
4664
ed443b61
YQ
46652016-02-12 Yao Qi <yao.qi@linaro.org>
4666
4667 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
4668 arm_linux_get_next_pcs_fixup.
4669
020ecd38
MK
46702016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
4671
4672 * tracepoint.c (x_tracepoint_action_download): Change
4673 write_inferior_data_ptr to write_inferior_data_pointer.
4674 (cmd_qtstart): Likewise.
4675 (write_inferior_data_ptr): Remove.
4676 (download_agent_expr): Change write_inferior_data_ptr to
4677 write_inferior_data_pointer.
4678 (download_tracepoint_1): Likewise.
4679 (download_tracepoint): Likewise.
4680 (download_trace_state_variables): Likewise.
4681
7cae9051
WW
46822016-02-11 Wei-cheng Wang <cole945@gmail.com>
4683 Marcin Kościelnicki <koriakin@0x04.net>
4684
4685 * tracepoint.c (struct tracepoint_action_ops): Remove.
4686 (struct tracepoint_action): Remove ops.
4687 (m_tracepoint_action_download, r_tracepoint_action_download)
4688 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
4689 size and offset accordingly.
4690 (m_tracepoint_action_ops, r_tracepoint_action_ops)
4691 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
4692 (tracepoint_action_send, tracepoint_action_download): New functions.
4693 Helpers for trace action handlers.
4694 (add_tracepoint_action): Remove setup actions ops.
4695 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
4696
9f6a71b4
YQ
46972016-02-10 Yao Qi <yao.qi@linaro.org>
4698
4699 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
4700
1e94266c
SM
47012016-02-09 Simon Marchi <simon.marchi@ericsson.com>
4702
4703 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
4704 to AC_OUTPUT.
4705 * configure: Regenerate.
4706
8adce034
SM
47072016-02-09 Simon Marchi <simon.marchi@ericsson.com>
4708
4709 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
4710 void * to gdb_byte *.
4711 * linux-low.c (siginfo_fixup): Likewise.
4712 (linux_xfer_siginfo): Likewise.
4713 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
4714 Likewise.
4715 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
4716
93813b37
WT
47172016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
4718
4719 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
4720 to srv_tgtobj.
4721 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
4722 to srv_tgtobj.
4723 * linux-x86-low.c [__x86_64__]: Include
4724 "nat/amd64-linux-siginfo.h".
4725 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
4726 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
4727 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
4728 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
4729 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
4730 (cpt_si_fd, si_timerid, si_overrun): Move from
4731 nat/amd64-linux-siginfo.c.
4732 * Makefile.in (amd64-linux-siginfo.o:): New rule.
4733
8424cc97
SM
47342016-01-28 Simon Marchi <simon.marchi@ericsson.com>
4735
4736 * server.c (skip_to_semicolon): Remove.
4737 (process_point_options): Use strchrnul instead of
4738 skip_to_semicolon.
4739
4d18591b
YQ
47402016-01-26 Yao Qi <yao.qi@linaro.org>
4741
4742 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
4743 * linux-low.c (install_software_single_step_breakpoints): Don't
4744 call regcache_read_pc.
4745 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
4746 argument pc.
4747
d8020970
YQ
47482016-01-26 Yao Qi <yao.qi@linaro.org>
4749
4750 * linux-low.c (install_software_single_step_breakpoints): Call
4751 regcache_read_pc instead of get_pc.
4752
8b207339
YQ
47532016-01-26 Yao Qi <yao.qi@linaro.org>
4754
4755 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
4756 (unblock_async_io): Rename to ...
4757 (block_unblock_async_io): ... it. New function.
4758 (enable_async_io): Don't install SIGIO handler. Unblock it
4759 instead.
4760 (disable_async_io): Don't ignore SIGIO. Block it instead.
4761 (initialize_async_io): Install SIGIO handler. Don't call
4762 unblock_async_io.
4763
18879fef
YQ
47642016-01-26 Yao Qi <yao.qi@linaro.org>
4765
4766 * remote-utils.c (getpkt): If the buffer isn't empty, and the
4767 first character is '\003', call *the_target->request_interrupt.
4768
a0f8e08a
YQ
47692016-01-25 Yao Qi <yao.qi@linaro.org>
4770
4771 * remote-utils.c (new_thread_notify): Remove.
4772 (dead_thread_notify): Likewise.
4773 * remote-utils.h (new_thread_notify): Remove declaration.
4774 (dead_thread_notify): Likewise.
4775
cc5fd9ab
MK
47762016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
4777
4778 * gdb.trace/pending.exp: Fix expected message on continue.
4779
99e8eb11
MK
47802016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
4781
4782 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
4783 it works properly on big-endian machines where sizeof (CORE_ADDR)
4784 != sizeof (void *).
4785
a994041d
PA
47862016-01-21 Pedro Alves <palves@redhat.com>
4787
4788 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
4789 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
4790 * configure: Regenerate.
4791
f7a6a40d
YQ
47922016-01-21 Yao Qi <yao.qi@linaro.org>
4793
4794 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
4795 is_thumb and set it according to CPSR saved on the stack.
4796 (get_next_pcs_syscall_next_pc): Pass is_thumb to
4797 arm_sigreturn_next_pc.
4798
6f69e520
YQ
47992016-01-18 Yao Qi <yao.qi@linaro.org>
4800
4801 * linux-low.c (linux_set_pc_64bit): New function.
4802 (linux_get_pc_64bit): New function.
4803 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
4804 Declare.
4805 * linux-sparc-low.c (debug_threads): Remove declaration.
4806 (sparc_get_pc): Remove.
4807 (the_low_target): Use linux_get_pc_64bit instead of
4808 sparc_get_pc.
4809 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
4810 (the_low_target): Use linux_get_pc_64bit and
4811 linux_set_pc_64bit.
4812
276d4552
YQ
48132016-01-18 Yao Qi <yao.qi@linaro.org>
4814
4815 * linux-arm-low.c (debug_threads): Remove declaration.
4816 (arm_get_pc, arm_set_pc): Remove.
4817 (the_low_target): Use linux_get_pc_32bit and
4818 linux_set_pc_32bit.
4819 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
4820 (the_low_target): Use linux_get_pc_32bit and
4821 linux_set_pc_32bit.
4822 * linux-cris-low.c (debug_threads): Remove declaration.
4823 (cris_get_pc, cris_set_pc,): Remove.
4824 (the_low_target): Use linux_get_pc_32bit and
4825 linux_set_pc_32bit.
4826 * linux-crisv32-low.c (debug_threads): Remove declaration.
4827 (cris_get_pc, cris_set_pc): Remove.
4828 (the_low_target): Use linux_get_pc_32bit and
4829 linux_set_pc_32bit.
4830 * linux-low.c: Include inttypes.h.
4831 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
4832 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
4833 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
4834 (the_low_target): Use linux_get_pc_32bit and
4835 linux_set_pc_32bit.
4836 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
4837 (the_low_target): Use linux_get_pc_32bit and
4838 linux_set_pc_32bit.
4839 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
4840 (the_low_target): Use linux_get_pc_32bit and
4841 linux_set_pc_32bit.
4842 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
4843 (the_low_target): Use linux_get_pc_32bit and
4844 linux_set_pc_32bit.
4845 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
4846 (the_low_target): Use linux_get_pc_32bit and
4847 linux_set_pc_32bit.
4848
eb0edac8
GB
48492016-01-18 Gary Benson <gbenson@redhat.com>
4850
4851 * configure.ac (AC_FUNC_FORK): New check.
4852 * config.in: Regenerate.
4853 * configure: Likewise.
4854
1b451dda
YQ
48552016-01-14 Yao Qi <yao.qi@linaro.org>
4856
4857 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
4858 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
4859 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
4860 arm_get_next_pcs_ctor.
4861
82075af2
JS
48622016-01-12 Josh Stone <jistone@redhat.com>
4863 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4864
4865 * inferiors.h: Include "gdb_vecs.h".
4866 (struct process_info): Add syscalls_to_catch.
4867 * inferiors.c (remove_process): Free syscalls_to_catch.
4868 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
4869 syscall_return stops.
4870 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
4871 * server.c (handle_general_set): Handle QCatchSyscalls.
4872 (handle_query): Report support for QCatchSyscalls.
4873 * target.h (struct target_ops): Add supports_catch_syscall.
4874 (target_supports_catch_syscall): New macro.
4875 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
4876 (struct lwp_info): Add syscall_state.
4877 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
4878 Maintain syscall_state and syscalls_to_catch across exec.
4879 (get_syscall_trapinfo): New function, proxy to the_low_target.
4880 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
4881 (linux_low_filter_event): Toggle syscall_state entry/return for
4882 syscall traps, and set it ignored for all others.
4883 (gdb_catching_syscalls_p): New function.
4884 (gdb_catch_this_syscall_p): New function.
4885 (linux_wait_1): Handle SYSCALL_SIGTRAP.
4886 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
4887 (linux_supports_catch_syscall): New function.
4888 (linux_target_ops): Install it.
4889 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
4890 (the_low_target): Install it.
4891
8f13a3ce
MF
48922016-01-12 Mike Frysinger <vapier@gentoo.org>
4893
4894 * acinclude.m4: Include new ../warning.m4 file.
4895 * configure: Regenerated.
4896 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
4897
5b3da067
MF
48982016-01-12 Mike Frysinger <vapier@gentoo.org>
4899
4900 * ax.c (is_goto_target): Mark static.
4901 * linux-low.c (register_addr): Likewise.
4902 (linux_fetch_registers, linux_store_registers): Likewise.
4903 * mem-break.c (any_persistent_commands): Fix old prototype.
4904 (add_commands_to_breakpoint): Mark static.
4905 * regcache.c (find_register_by_name): Delete unused func.
4906 * remote-utils.c (hex_or_minus_one): Mark static.
4907 * server.c (monitor_show_help): Mark static.
4908 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
4909 handle_v_requests): Likewise.
4910
bc504a31
PA
49112016-01-12 Pedro Alves <palves@redhat.com>
4912
4913 Remove use of the registered trademark symbol throughout.
4914
5a0dd67a
YQ
49152016-01-08 Yao Qi <yao.qi@linaro.org>
4916
4917 * remote-utils.c (getpkt): If c is '\003', call target hook
4918 request_interrupt.
4919
b2ca446f
YQ
49202016-01-06 Yao Qi <yao.qi@linaro.org>
4921
4922 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
4923 linux-aarch32-low.c.
4924 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4925 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
4926 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
4927 (thumb2_breakpoint): Declare.
4928 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
4929 linux-aarch32-low.h.
4930 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4931 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
4932 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
4933
edd88788
JB
49342016-01-01 Joel Brobecker <brobecker@adacore.com>
4935
4936 * gdbreplay.c (gdbreplay_version): Change copyright year in
4937 version message.
4938 * server.c (gdbserver_version): Likewise.
4939
65da7f14
PP
49402015-12-28 Patrick Palka <patrick@parcs.ath.cx>
4941
4942 * server.c (crc32_table): Delete.
4943 (crc32): Use libiberty's xcrc32 function.
4944
4abd5ed2
JB
49452015-12-22 Joel Brobecker <brobecker@adacore.com>
4946
4947 * lynx-low.c (lynx_delete_thread_callback): New function.
4948 (lynx_mourn): Properly delete our process and all of its
4949 threads. Remove call to clear_inferiors.
4950
0e50fe5c
JB
49512015-12-22 Joel Brobecker <brobecker@adacore.com>
4952
4953 * target.c (thread_search_callback): Add check that
4954 the thread_stopped target callback is not NULL before
4955 calling it.
4956
35adc03f
YQ
49572015-12-21 Yao Qi <yao.qi@linaro.org>
4958
4959 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
4960 arm breakpoint.
4961
bd2b2909
AT
49622015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4963
4964 * server.c (handle_query): Call target_supports_software_single_step.
4965
7fe5e27e
AT
49662015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4967
4968 * linux-low.c (single_step): New function.
4969 (linux_resume_one_lwp_throw): Call single_step.
4970 (start_step_over): Likewise.
4971
d9311bfa
AT
49722015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4973
4974 * Makefile.in (SFILES): Append arch/arm-linux.c,
4975 arch/arm-get-next-pcs.c.
4976 (arm-linux.o): New rule.
4977 (arm-get-next-pcs.o): New rule.
4978 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
4979 arm-linux.o.
4980 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
4981 to linux-aarch32-low.c.
4982 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4983 (arm_breakpoint_len, thumb_breakpoint): Likewise.
4984 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
4985 (thumb2_breakpoint_len): Likewise.
4986 (arm_is_thumb_mode): Make non-static.
4987 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
4988 from linux-aarch32-low.c.
4989 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4990 (arm_breakpoint_len, thumb_breakpoint): Likewise.
4991 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
4992 (thumb2_breakpoint_len): Likewise.
4993 (arm_is_thumb_mode): New declaration.
4994 * linux-arm-low.c: Include arch/arm-linux.h
4995 aarch/arm-get-next-pcs.h, sys/syscall.h.
4996 (get_next_pcs_ops): New struct.
4997 (get_next_pcs_addr_bits_remove): New function.
4998 (get_next_pcs_is_thumb): New function.
4999 (get_next_pcs_read_memory_unsigned_integer): Likewise.
5000 (arm_sigreturn_next_pc): Likewise.
5001 (get_next_pcs_syscall_next_pc): Likewise.
5002 (arm_gdbserver_get_next_pcs): Likewise.
5003 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
5004 Initialize.
5005 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
5006 * server.h: Include gdb_vecs.h.
5007
68ce2059
AT
50082015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
5009
5010 * Makefile.in (SFILES): Append common/common-regcache.c.
5011 (OBS): Append common-regcache.o.
5012 (common-regcache.o): New rule.
5013 * regcache.c (init_register_cache): Initialize cache to
5014 REG_UNAVAILABLE.
5015 (regcache_raw_read_unsigned): New function.
5016 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
5017 register_status enum.
5018
fa5308bd
AT
50192015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
5020
5021 * linux-aarch64-low.c (the_low_targets): Rename
5022 breakpoint_reinsert_addr to get_next_pcs.
5023 * linux-arm-low.c (the_low_targets): Likewise.
5024 * linux-bfin-low.c (the_low_targets): Likewise.
5025 * linux-cris-low.c (the_low_targets): Likewise.
5026 * linux-crisv32-low.c (the_low_targets): Likewise.
5027 * linux-low.c (can_software_single_step): Likewise.
5028 (install_software_single_step_breakpoints): New function.
5029 (start_step_over): Use install_software_single_step_breakpoints.
5030 * linux-low.h: New CORE_ADDR vector.
5031 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
5032 get_next_pcs.
5033 * linux-mips-low.c (the_low_targets): Likewise.
5034 * linux-nios2-low.c (the_low_targets): Likewise.
5035 * linux-sparc-low.c (the_low_targets): Likewise.
5036
4a6ed09b
PA
50372015-12-17 Pedro Alves <palves@redhat.com>
5038
5039 * linux-low.c (linux_kill_one_lwp): Remove references to
5040 LinuxThreads.
5041 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
5042 to 'kill'.
5043 (linux_init_signals): Delete.
5044 (initialize_low): Adjust.
5045 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
5046
7544db95
PA
50472015-12-16 Pedro Alves <palves@redhat.com>
5048
5049 * configure.ac (compiler warning flags): When testing a
5050 -Wno-foo option, check whether -Wfoo works instead.
5051 * configure: Regenerate.
5052
8020350c
DB
50532015-12-11 Don Breazeal <donb@codesourcery.com>
5054
5055 * server.c (process_serial_event): Don't exit from gdbserver
5056 in remote mode if there are still active inferiors.
5057
db91f502
YQ
50582015-12-11 Yao Qi <yao.qi@linaro.org>
5059
5060 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
5061 arm_breakpoint_at if the process is 32-bit.
5062
b37a6290
YQ
50632015-12-11 Yao Qi <yao.qi@linaro.org>
5064
5065 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
5066 arm breakpoint.
5067
17b1509a
YQ
50682015-12-07 Yao Qi <yao.qi@linaro.org>
5069
5070 * configure.srv: Append arm.o to srv_tgtobj for
5071 aarch64*-*-linux* target.
5072 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
5073 from linux-arm-low.c.
5074 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
5075 (arm_breakpoint_len, thumb_breakpoint): Likewise.
5076 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
5077 (thumb2_breakpoint_len): Likewise.
5078 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
5079 (arm_breakpoint_kinds): Likewise.
5080 (arm_breakpoint_kind_from_pc): Likewise.
5081 (arm_sw_breakpoint_from_kind): Likewise.
5082 (arm_breakpoint_kind_from_current_state): Likewise.
5083 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
5084 (arm_sw_breakpoint_from_kind): Declare.
5085 (arm_breakpoint_kind_from_current_state): Declare.
5086 (arm_breakpoint_at): Declare.
5087 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
5088 arm_sw_breakpoint_from_kind if process is 32-bit.
5089 (aarch64_breakpoint_kind_from_pc): New function.
5090 (aarch64_breakpoint_kind_from_current_state): New function.
5091 (the_low_target): Initialize fields breakpoint_kind_from_pc
5092 and breakpoint_kind_from_current_state.
5093 * linux-arm-low.c (arm_breakpoint_kinds): Move to
5094 linux-aarch32-low.c.
5095 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
5096 (arm_breakpoint, arm_breakpoint_len): Likewise.
5097 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
5098 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
5099 (arm_is_thumb_mode): Likewise.
5100 (arm_breakpoint_at): Likewise.
5101 (arm_breakpoint_kind_from_pc): Likewise.
5102 (arm_sw_breakpoint_from_kind): Likewise.
5103 (arm_breakpoint_kind_from_current_state): Likewise.
5104
5105 Revert:
5106 2015-08-04 Yao Qi <yao.qi@linaro.org>
5107
5108 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
5109 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
5110 * server.c (extended_protocol): Remove "static".
5111 * server.h (extended_protocol): Declare it.
5112
ece66d65
JS
51132015-12-04 Josh Stone <jistone@redhat.com>
5114
5115 * target.h (struct target_ops) <arch_setup>: Rename to ...
5116 (struct target_ops) <post_create_inferior>: ... this.
5117 (target_arch_setup): Rename to ...
5118 (target_post_create_inferior): ... this, calling post_create_inferior.
5119 * server.c (start_inferior): Update target_arch_setup calls to
5120 target_post_create_inferior.
5121 * linux-low.c (linux_low_ptrace_options): Forward declare.
5122 (linux_arch_setup): Update its comment for general use.
5123 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
5124 (struct linux_target_ops): Use linux_post_create_inferior.
5125 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
5126 to post_create_inferior.
5127 * nto-low.c (struct nto_target_ops): Likewise.
5128 * spu-low.c (struct spu_target_ops): Likewise.
5129 * win32-low.c (struct win32_target_ops): Likewise.
5130
e58c48b4
AT
51312015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
5132
5133 * linux-arm-low.c: Remove duplicate arch/arm.h include.
5134
fbec8956
AT
51352015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
5136
5137 * linux-arm-low.c (arm_reinsert_addr): Remove function.
5138 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
5139 * linux-cris-low.c (cris_reinsert_addr> Remove function.
5140 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
5141 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
5142 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
5143 * linux-mips-low.c (mips_reinsert_addr): Remove function.
5144 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
5145 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
5146 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
5147 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
5148 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
5149
9b4c5f87
AT
51502015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
5151
5152 * linux-low.c (linux_look_up_symbols): Don't call
5153 linux_supports_traceclone.
5154 * linux-low.h (thread_db_init): Remove use_events argument.
5155 * thread-db.c (thread_db_use_event): Remove global variable.
5156 (struct thread_db) <td_thr_event_enable_p>: Remove field.
5157 (struct thread_db) <td_create_bp>: Remove field.
5158 (thread_db_create_event): Remove function.
5159 (thread_db_enable_reporting): Likewise.
5160 (find_one_thread): Don't check for thread_db_use_events.
5161 (attach_thread): Likewise.
5162 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
5163 (try_thread_db_load_1): Don't check for thread_db_use_events.
5164 (thread_db_init): Remove use_events argument and thread events
5165 handling.
5166 (remove_thread_event_breakpoints): Remove function.
5167 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
5168
7d00775e
AT
51692015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
5170
5171 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
5172 New function.
5173 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5174 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
5175 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5176 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
5177 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
5178 Initialize.
5179 * linux-crisv32-low.c (cris_supports_hardware_single_step):
5180 New function.
5181 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5182 * linux-low.c (can_hardware_single_step): Use
5183 supports_hardware_single_step.
5184 (can_software_single_step): New function.
5185 (start_step_over): Call can_software_single_step.
5186 (linux_supports_hardware_single_step): New function.
5187 (struct target_ops) <supports_software_single_step>: Initialize.
5188 * linux-low.h (struct linux_target_ops)
5189 <supports_hardware_single_step>: Initialize.
5190 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
5191 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5192 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
5193 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
5194 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
5195 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5196 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
5197 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5198 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
5199 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
5200 Initialize.
5201 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
5202 (struct linux_target_ops) <tile_supports_hardware_single_step>:
5203 Initialize.
5204 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
5205 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5206 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
5207 New function.
5208 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5209 * target.h (struct target_ops): <supports_software_single_step>:
5210 New field.
5211 (target_supports_software_single_step): New macro.
5212
2d97cd35
AT
52132015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
5214
5215 * linux-low.c (linux_wait_1): Fix pc advance condition.
5216 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
5217 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
5218
769ef81f
AT
52192015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
5220
5221 * linux-arm-low.c (arm_is_thumb_mode): New function.
5222 (arm_breakpoint_at): Use arm_is_thumb_mode.
5223 (arm_breakpoint_kind_from_current_state): New function.
5224 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
5225 Initialize.
5226 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
5227 (linux_breakpoint_kind_from_current_state): New function.
5228 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
5229 * linux-low.h (struct linux_target_ops)
5230 <breakpoint_kind_from_current_state>: New field.
5231 * target.h (struct target_ops): Likewise.
5232 (target_breakpoint_kind_from_current_state): New macro.
5233
1bebeeca
PA
52342015-11-30 Pedro Alves <palves@redhat.com>
5235
5236 * linux-low.c (linux_resume): Wake up the event loop before
5237 returning.
5238
a67a9fae
PA
52392015-11-30 Pedro Alves <palves@redhat.com>
5240
5241 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
5242 check.
5243 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
5244 to -1.
5245 * target.c (struct thread_search): New structure.
5246 (thread_search_callback): New function.
5247 (prev_general_thread): New global.
5248 (prepare_to_access_memory, done_accessing_memory): New functions.
5249 * target.h (prepare_to_access_memory, done_accessing_memory):
5250 Replace macros with function declarations.
5251
f2faf941
PA
52522015-11-30 Pedro Alves <palves@redhat.com>
5253
5254 PR 14618
5255 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
5256 report TARGET_WAITKIND_NO_RESUMED.
5257 * remote-utils.c (prepare_resume_reply): Handle
5258 TARGET_WAITKIND_NO_RESUMED.
5259 * server.c (report_no_resumed): New global.
5260 (handle_query) <qSupported>: Handle "no-resumed+". Report
5261 "no-resumed+" support.
5262 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
5263 return error if the client doesn't support no-resumed events.
5264 (push_stop_notification): New function.
5265 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
5266 events if the client supports them.
5267
a681f9c9
PA
52682015-11-30 Pedro Alves <palves@redhat.com>
5269
5270 * linux-low.c (thread_still_has_status_pending_p): Don't check
5271 vCont;t here.
5272 (lwp_resumed): New function.
5273 (status_pending_p_callback): Return early if the LWP is not
5274 supposed to be resumed.
5275
65706a29
PA
52762015-11-30 Pedro Alves <palves@redhat.com>
5277
5278 * linux-low.c (handle_extended_wait): Assert that the LWP's
5279 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
5280 thread create events, leave the new child's status pending.
5281 (linux_low_filter_event): If GDB wants to hear about thread exit
5282 events, leave the LWP marked dead and don't delete it.
5283 (linux_wait_for_event_filtered): Don't check for thread exit.
5284 (filter_exit_event): New function.
5285 (linux_wait_1): Use it, when returning an exit event.
5286 (linux_resume_one_lwp_throw): Assert that the LWP's
5287 waitstatus is TARGET_WAITKIND_IGNORE.
5288 * remote-utils.c (prepare_resume_reply): Handle
5289 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
5290 * server.c (report_thread_events): New global.
5291 (handle_general_set): Handle QThreadEvents.
5292 (handle_query) <qSupported>: Handle and report QThreadEvents+;
5293 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
5294 TARGET_WAITKIND_THREAD_EXITED.
5295 * server.h (report_thread_events): Declare.
5296
56cf4bed
PA
52972015-11-30 Pedro Alves <palves@redhat.com>
5298
5299 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
5300 the thread's last_resume_kind was resume_stop.
5301
500c1d85
PA
53022015-11-30 Pedro Alves <palves@redhat.com>
5303
5304 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
5305 before returning.
5306
de979965
PA
53072015-11-30 Pedro Alves <palves@redhat.com>
5308
5309 * server.c (handle_v_requests): Handle vCtrlC.
5310
34c65914
PA
53112015-11-30 Pedro Alves <palves@redhat.com>
5312
5313 * gdbthread.h (find_any_thread_of_pid): Declare.
5314 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
5315 functions.
5316 * server.c (handle_query): If current_thread is NULL, look for
5317 another thread of the selected process.
5318
79efa585 53192015-11-26 Daniel Colascione <dancol@dancol.org>
01a49af8 5320 Simon Marchi <simon.marchi@ericsson.com>
79efa585
SM
5321
5322 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
5323 * server.c (handle_qxfer_threads_worker): Refactor to include thread
5324 name in reply.
5325 * target.h (struct target_ops) <thread_name>: New field.
5326 (target_thread_name): New macro.
5327
80d82c19
JB
53282015-11-23 Joel Brobecker <brobecker@adacore.com>
5329
5330 * regcache.h (regcache_invalidate_pid): Add declaration.
5331 * regcache.c (regcache_invalidate_pid): New function, extracted
5332 from regcache_invalidate.
5333 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
5334 Add trivial documentation comment.
5335 * lynx-low.c: Use regcache_invalidate_pid instead of
5336 regcache_invalidate.
5337
64da5dd5
JB
53382015-11-23 Joel Brobecker <brobecker@adacore.com>
5339
5340 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
5341 and Elf64_auxv_t if the target is Android.
5342
37ce4055
DE
53432015-11-22 Doug Evans <xdje42@gmail.com>
5344
5345 * target.h: #include <sys/types.h>.
5346
06e03fff
PA
53472015-11-19 Pedro Alves <palves@redhat.com>
5348
5349 * linux-low.c (linux_process_qsupported): Change prototype.
5350 Adjust.
5351 * linux-low.h (struct linux_target_ops) <process_qsupported>:
5352 Change prototype.
5353 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
5354 and adjust to loop over all features.
5355 * server.c (handle_query) <qSupported>: Adjust to call
5356 target_process_qsupported once, passing it a vector of unprocessed
5357 features.
5358 * target.h (struct target_ops) <process_qsupported>: Change
5359 prototype.
5360 (target_process_qsupported): Adjust.
5361
9a084706
PA
53622015-11-19 Pedro Alves <palves@redhat.com>
5363
5364 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
5365 mode.
5366 * configure: Regenerate.
5367
dad44a1f
PA
53682015-11-19 Pedro Alves <palves@redhat.com>
5369
5370 * configure: Regenerate.
5371
231c0592
YQ
53722015-11-19 Yao Qi <yao.qi@linaro.org>
5373
5374 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
5375 type to uint32_t.
5376
6c1c9a8b
YQ
53772015-11-19 Yao Qi <yao.qi@linaro.org>
5378
5379 * linux-aarch64-low.c (enum aarch64_operand_type): New.
5380 (struct aarch64_operand): Move enum out.
5381
9caa3311
YQ
53822015-11-19 Yao Qi <yao.qi@linaro.org>
5383
5384 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
5385 struct user_fpsimd_state *.
5386 (aarch64_store_fpregset): Likewise.
5387
6a69a054
YQ
53882015-11-19 Yao Qi <yao.qi@linaro.org>
5389
5390 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
5391 struct user_pt_regs *.
5392 (aarch64_store_gregset): Likewise.
5393
1798301e
PA
53942015-11-18 Pedro Alves <palves@redhat.com>
5395
5396 * Makefile.in (all_object_files): Add $IPA_OBJS.
5397
ce7715e2
PA
53982015-11-17 Pedro Alves <palves@redhat.com>
5399
5400 * win32-low.c (win32_resume): Use gdb_signal_from_host,
5401 GDB_SIGNAL_0 and gdb_signal_to_string.
5402
c0879059
PA
54032015-11-17 Pedro Alves <palves@redhat.com>
5404
5405 * win32-low.c (handle_output_debug_string): Remove parameter.
5406 (win32_kill): Remove our_status local and adjust call to
5407 handle_output_debug_string.
5408 (get_child_debug_event): Adjust call to
5409 handle_output_debug_string.
5410
1996e237
SM
54112015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5412
5413 * linux-mips-low.c (mips_fill_gregset): Add cast.
5414 (mips_store_gregset): Likewise.
5415 (mips_fill_fpregset): Likewise.
5416 (mips_store_fpregset): Likewise.
5417
cbec665b
SM
54182015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5419
5420 * linux-mips-low.c (mips_add_watchpoint): Rename private to
5421 priv.
5422
eb3e3c67
SM
54232015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5424
5425 * linux-mips-low.c (mips_linux_new_thread): Change type of
5426 watch_type to enum target_hw_bp_type.
5427
171de4b8
SM
54282015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5429
5430 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
5431 Change return type to arm_hwbp_type.
5432
04248ead
SM
54332015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5434
5435 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
5436 (arm_store_gregset): Likewise.
5437 * linux-arm-low.c (arm_get_hwcap): Likewise.
5438 (arm_read_description): Likewise.
5439
04b3479c
SM
54402015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5441
5442 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
5443
2bc84e8a
SM
54442015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5445
5446 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
5447 (ppc_fill_vsxregset): Likewise.
5448 (ppc_store_vsxregset): Likewise.
5449 (ppc_fill_vrregset): Likewise.
5450 (ppc_store_vrregset): Likewise.
5451 (ppc_fill_evrregset): Likewise.
5452 (ppc_store_evrregset): Likewise.
5453
e6c5bb05
SM
54542015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5455
5456 * linux-ppc-low.c (ppc_usrregs_info): Remove
5457 forward-declaration.
5458 (ppc_arch_setup): Move lower in file.
5459
7ea45d72
SM
54602015-10-30 Simon Marchi <simon.marchi@ericsson.com>
5461
5462 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
5463 (ps_pdwrite): Likewise.
5464
69291610
HW
54652015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
5466
5467 * linux-arm-low.c (arm_new_thread): Move pointer dereference
5468 to after assert checks.
5469
b42945fd
SM
54702015-10-29 Simon Marchi <simon.marchi@ericsson.com>
5471
5472 * proc-service.c (ps_pdread): Add/adjust casts.
5473 (ps_pdwrite): Add/adjust casts.
5474
d6f85c84
SM
54752015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
5476
5477 * server.c (handle_search_memory_1): Cast return value of
5478 memmem.
5479
f98cd059
SM
54802015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
5481
5482 * server.c (write_qxfer_response): Change type of data to
5483 gdb_byte *.
5484
d2412fa5
PA
54852015-10-29 Pedro Alves <palves@redhat.com>
5486
5487 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
5488
c17414a2
PA
54892015-10-29 Pedro Alves <palves@redhat.com>
5490
5491 * tracepoint.c (clear_installed_tracepoints): Add casts.
5492
e053fbc4
PA
54932015-10-29 Pedro Alves <palves@redhat.com>
5494
5495 * server.c (handle_v_cont, process_serial_event): Add enum
5496 gdb_signal casts to signal parsing code.
5497
add67df8
PA
54982015-10-29 Pedro Alves <palves@redhat.com>
5499
5500 * linux-low.h (NULL_REGSET): Define.
5501 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
5502 * linux-arm-low.c (arm_regsets): Likewise.
5503 * linux-crisv32-low.c (cris_regsets): Likewise.
5504 * linux-m68k-low.c (m68k_regsets): Likewise.
5505 * linux-mips-low.c (mips_regsets): Likewise.
5506 * linux-nios2-low.c (nios2_regsets): Likewise.
5507 * linux-ppc-low.c (ppc_regsets): Likewise.
5508 * linux-s390-low.c (s390_regsets): Likewise.
5509 * linux-sh-low.c (sh_regsets): Likewise.
5510 * linux-sparc-low.c (sparc_regsets): Likewise.
5511 * linux-tic6x-low.c (tic6x_regsets): Likewise.
5512 * linux-tile-low.c (tile_regsets): Likewise.
5513 * linux-x86-low.c (x86_regsets): Likewise.
5514 * linux-xtensa-low.c (xtensa_regsets): Likewise.
5515
50bc912a
PA
55162015-10-29 Pedro Alves <palves@redhat.com>
5517
5518 * linux-low.h (NULL_REGSET): Define.
5519 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
5520 * linux-arm-low.c (arm_regsets): Likewise.
5521 * linux-crisv32-low.c (cris_regsets): Likewise.
5522 * linux-m68k-low.c (m68k_regsets): Likewise.
5523 * linux-mips-low.c (mips_regsets): Likewise.
5524 * linux-nios2-low.c (nios2_regsets): Likewise.
5525 * linux-ppc-low.c (ppc_regsets): Likewise.
5526 * linux-s390-low.c (s390_regsets): Likewise.
5527 * linux-sh-low.c (sh_regsets): Likewise.
5528 * linux-sparc-low.c (sparc_regsets): Likewise.
5529 * linux-tic6x-low.c (tic6x_regsets): Likewise.
5530 * linux-tile-low.c (tile_regsets): Likewise.
5531 * linux-x86-low.c (x86_regsets): Likewise.
5532 * linux-xtensa-low.c (xtensa_regsets): Likewise.
5533
682b2546
DE
55342015-10-26 Doug Evans <dje@google.com>
5535
5536 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
5537
963843d4
DE
55382015-10-26 Doug Evans <dje@google.com>
5539
5540 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
5541
d41401ac
DE
55422015-10-26 Doug Evans <dje@google.com>
5543
5544 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
5545 for debug_printf.
5546 (attach_thread, find_new_threads_callback): Ditto.
5547
3db28855
AT
55482015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
5549
5550 * mem-break.h (set_breakpoint_data): Remove.
5551
fb78e89c
AT
55522015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
5553
5554 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
5555 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
5556 (initialize_low): Remove set_breakpoint_data call.
5557 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
5558 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
5559 (initialize_low): Remove set_breakpoint_data call.
5560 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
5561 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
5562 (initialize_low): Remove set_breakpoint_data call.
5563
2e6ee069
AT
55642015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
5565
5566 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
5567 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
5568 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
5569 * target.h (target_breakpoint_kind_from_pc): New macro.
5570
1652a986
AT
55712015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
5572
5573 * linux-low.c (default_breakpoint_kind_from_pc): New function.
5574 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
5575 the default breakpoint kind.
5576
abeead09
AT
55772015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5578
5579 * linux-arm-low.c (arm_supports_z_point_type): Add software
5580 breakpoint support.
5581
b0b4b501
AT
55822015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5583
5584 * linux-arm-low.c: Refactor breakpoint definitions.
5585 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
5586 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
5587
8689682c
AT
55882015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5589
5590 * Makefile.in: Add arm.c/o.
5591 * configure.srv: Likewise.
5592 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
5593 (arm_breakpoint_kind_from_pc): New function.
5594 (arm_sw_breakpoint_from_kind): Return proper kind.
5595 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
5596
27165294
AT
55972015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5598
5599 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
5600 removal.
5601 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
5602 (struct raw_breakpoint) <size>: Remove.
5603 (struct raw_breakpoint) <kind>: Add.
5604 (bp_size): New function.
5605 (bp_opcode): Likewise.
5606 (find_raw_breakpoint_at): Adjust for kind.
5607 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
5608 (remove_memory_breakpoint): Adjust for kind call bp_size.
5609 (set_raw_breakpoint_at): Adjust for kind.
5610 (set_breakpoint): Likewise.
5611 (set_breakpoint_at): Call breakpoint_kind_from_pc.
5612 (delete_raw_breakpoint): Adjust for kind.
5613 (delete_breakpoint): Likewise.
5614 (find_gdb_breakpoint): Likewise.
5615 (set_gdb_breakpoint_1): Likewise.
5616 (set_gdb_breakpoint): Likewise.
5617 (delete_gdb_breakpoint_1): Likewise.
5618 (delete_gdb_breakpoint): Likewise.
5619 (uninsert_raw_breakpoint): Likewise.
5620 (reinsert_raw_breakpoint): Likewise.
5621 (set_breakpoint_data): Remove.
5622 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
5623 (check_mem_read): Adjust for kind call bp_size.
5624 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
5625 (clone_one_breakpoint): Adjust for kind.
5626 * mem-break.h (set_gdb_breakpoint): Likewise.
5627 (delete_gdb_breakpoint): Likewise.
5628 * server.c (process_serial_event): Likewise.
5629
dd373349
AT
56302015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5631
5632 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
5633 (struct linux_target_ops) <breakpoint>: Remove.
5634 (struct linux_target_ops) <breakpoint_len>: Remove.
5635 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5636 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5637 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
5638 (arm_sw_breakpoint_from_kind): New function.
5639 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
5640 (struct linux_target_ops) <breakpoint>: Remove.
5641 (struct linux_target_ops) <breakpoint_len>: Remove.
5642 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5643 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5644 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
5645 (struct linux_target_ops) <breakpoint>: Remove.
5646 (struct linux_target_ops) <breakpoint_len>: Remove.
5647 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5648 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5649 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
5650 (struct linux_target_ops) <breakpoint>: Remove.
5651 (struct linux_target_ops) <breakpoint_len>: Remove.
5652 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5653 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5654 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
5655 and sw_breakpoint_from_kind to increment the pc.
5656 (linux_breakpoint_kind_from_pc): New function.
5657 (linux_sw_breakpoint_from_kind): New function.
5658 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
5659 (initialize_low): Call breakpoint_kind_from_pc and
5660 sw_breakpoint_from_kind to replace breakpoint_data/len.
5661 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
5662 New field.
5663 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
5664 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
5665 (struct linux_target_ops) <breakpoint>: Remove.
5666 (struct linux_target_ops) <breakpoint_len>: Remove.
5667 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5668 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5669 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
5670 (struct linux_target_ops) <breakpoint>: Remove.
5671 (struct linux_target_ops) <breakpoint_len>: Remove.
5672 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5673 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5674 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
5675 (struct linux_target_ops) <breakpoint>: Remove.
5676 (struct linux_target_ops) <breakpoint_len>: Remove.
5677 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5678 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5679 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
5680 (struct linux_target_ops) <breakpoint>: Remove.
5681 (struct linux_target_ops) <breakpoint_len>: Remove.
5682 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5683 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5684 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
5685 (struct linux_target_ops) <breakpoint>: Remove.
5686 (struct linux_target_ops) <breakpoint_len>: Remove.
5687 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5688 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5689 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
5690 (struct linux_target_ops) <breakpoint>: Remove.
5691 (struct linux_target_ops) <breakpoint_len>: Remove.
5692 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5693 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5694 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
5695 (struct linux_target_ops) <breakpoint>: Remove.
5696 (struct linux_target_ops) <breakpoint_len>: Remove.
5697 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5698 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5699 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
5700 (struct linux_target_ops) <breakpoint>: Remove.
5701 (struct linux_target_ops) <breakpoint_len>: Remove.
5702 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5703 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5704 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
5705 (struct linux_target_ops) <breakpoint>: Remove.
5706 (struct linux_target_ops) <breakpoint_len>: Remove.
5707 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5708 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5709 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
5710 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
5711 (struct linux_target_ops) <breakpoint>: Remove.
5712 (struct linux_target_ops) <breakpoint_len>: Remove.
5713 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5714 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5715 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
5716 (struct linux_target_ops) <breakpoint>: Remove.
5717 (struct linux_target_ops) <breakpoint_len>: Remove.
5718 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5719 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5720
4cd98a19
AT
57212015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5722
5723 * linux-cris-low.c (cris_get_pc): Remove void arg.
5724
774ee6d2
AR
57252015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
5726
5727 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
5728 variable name.
5729
833dcd29
AR
57302015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
5731
5732 * inferiors.c (thread_pid_matches_callback): New function.
5733 (find_thread_process): New function.
5734 (remove_thread): Reset current_thread.
5735 (remove_process): Assert threads have been removed first.
5736
8d689ee5
YQ
57372015-10-15 Yao Qi <yao.qi@linaro.org>
5738
5739 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
5740 if it is 3.
5741 (aarch64_remove_point): Likewise.
5742 * regcache.c (regcache_register_size): New function.
5743
1c2e1515
YQ
57442015-10-12 Yao Qi <yao.qi@linaro.org>
5745
5746 * linux-aarch64-low.c: Update all callers as emit_load_store
5747 is renamed to aarch64_emit_load_store.
5748
e1c587c3
YQ
57492015-10-12 Yao Qi <yao.qi@linaro.org>
5750
5751 * linux-aarch64-low.c: Update all callers of function renaming
5752 from emit_insn to aarch64_emit_insn.
5753
b6542f81
YQ
57542015-10-12 Yao Qi <yao.qi@linaro.org>
5755
5756 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
5757 arch/aarch64-insn.h.
5758 (struct aarch64_memory_operand): Likewise.
5759 (ENCODE): Likewise.
5760 (emit_insn): Move to arch/aarch64-insn.c.
5761 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
5762 (emit_load_store): Move to arch/aarch64-insn.c.
5763 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
5764 (can_encode_int32): Remove.
5765
246994ce
YQ
57662015-10-12 Yao Qi <yao.qi@linaro.org>
5767
5768 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
5769 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
5770 (aarch64_relocate_instruction): Likewise.
5771 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
5772 (struct aarch64_insn_visitor): Likewise.
5773
0badd99f
YQ
57742015-10-12 Yao Qi <yao.qi@linaro.org>
5775
5776 * linux-aarch64-low.c (struct aarch64_insn_data): New.
5777 (struct aarch64_insn_visitor): New.
5778 (struct aarch64_insn_relocation_data): New.
5779 (aarch64_ftrace_insn_reloc_b): New function.
5780 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
5781 (aarch64_ftrace_insn_reloc_cb): Likewise.
5782 (aarch64_ftrace_insn_reloc_tb): Likewise.
5783 (aarch64_ftrace_insn_reloc_adr): Likewise.
5784 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
5785 (aarch64_ftrace_insn_reloc_others): Likewise.
5786 (visitor): New.
5787 (aarch64_relocate_instruction): Use visitor.
5788
dfaffe9d
YQ
57892015-10-12 Yao Qi <yao.qi@linaro.org>
5790
5791 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
5792 int. Add argument buf.
5793 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
5794 aarch64_relocate_instruction.
5795
70b439f0
YQ
57962015-10-12 Yao Qi <yao.qi@linaro.org>
5797
5798 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
5799 argument insn. Remove local variable insn. Don't call
5800 target_read_uint32.
5801 (aarch64_install_fast_tracepoint_jump_pad): Call
5802 target_read_uint32.
5803
7781c06f
YQ
58042015-09-30 Yao Qi <yao.qi@linaro.org>
5805
5806 * linux-aarch64-low.c (emit_movk): Shorten a long line.
5807 (emit_load_store_pair): Likewise.
5808
9a3c8263
SM
58092015-09-25 Simon Marchi <simon.marchi@ericsson.com>
5810
5811 * dll.c (match_dll): Add cast(s).
5812 (unloaded_dll): Likewise.
5813 * linux-low.c (second_thread_of_pid_p): Likewise.
5814 (delete_lwp_callback): Likewise.
5815 (count_events_callback): Likewise.
5816 (select_event_lwp_callback): Likewise.
5817 (linux_set_resume_request): Likewise.
5818 * server.c (accumulate_file_name_length): Likewise.
5819 (emit_dll_description): Likewise.
5820 (handle_qxfer_threads_worker): Likewise.
5821 (visit_actioned_threads): Likewise.
5822 * thread-db.c (any_thread_of): Likewise.
5823 * tracepoint.c (same_process_p): Likewise.
5824 (match_blocktype): Likewise.
5825 (build_traceframe_info_xml): Likewise.
5826
224c3ddb
SM
58272015-09-25 Simon Marchi <simon.marchi@ericsson.com>
5828
5829 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
5830 assignment.
5831 (gdb_unparse_agent_expr): Likewise.
5832 * hostio.c (require_data): Likewise.
5833 (handle_pread): Likewise.
5834 * linux-low.c (disable_regset): Likewise.
5835 (fetch_register): Likewise.
5836 (store_register): Likewise.
5837 (get_dynamic): Likewise.
5838 (linux_qxfer_libraries_svr4): Likewise.
5839 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
5840 (set_fast_tracepoint_jump): Likewise.
5841 (uninsert_fast_tracepoint_jumps_at): Likewise.
5842 (reinsert_fast_tracepoint_jumps_at): Likewise.
5843 (validate_inserted_breakpoint): Likewise.
5844 (clone_agent_expr): Likewise.
5845 * regcache.c (init_register_cache): Likewise.
5846 * remote-utils.c (putpkt_binary_1): Likewise.
5847 (decode_M_packet): Likewise.
5848 (decode_X_packet): Likewise.
5849 (look_up_one_symbol): Likewise.
5850 (relocate_instruction): Likewise.
5851 (monitor_output): Likewise.
5852 * server.c (handle_search_memory): Likewise.
5853 (handle_qxfer_exec_file): Likewise.
5854 (handle_qxfer_libraries): Likewise.
5855 (handle_qxfer): Likewise.
5856 (handle_query): Likewise.
5857 (handle_v_cont): Likewise.
5858 (handle_v_run): Likewise.
5859 (captured_main): Likewise.
5860 * target.c (write_inferior_memory): Likewise.
5861 * thread-db.c (try_thread_db_load_from_dir): Likewise.
5862 * tracepoint.c (init_trace_buffer): Likewise.
5863 (add_tracepoint_action): Likewise.
5864 (add_traceframe): Likewise.
5865 (add_traceframe_block): Likewise.
5866 (cmd_qtdpsrc): Likewise.
5867 (cmd_qtdv): Likewise.
5868 (cmd_qtstatus): Likewise.
5869 (response_source): Likewise.
5870 (response_tsv): Likewise.
5871 (cmd_qtnotes): Likewise.
5872 (gdb_collect): Likewise.
5873 (initialize_tracepoint): Likewise.
5874
afbe19f8
PL
58752015-09-21 Pierre Langlois <pierre.langlois@arm.com>
5876
5877 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
5878 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
5879 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
5880 <NOP>: New.
5881 (enum aarch64_condition_codes): New enum.
5882 (w0): New static global.
5883 (fp): Likewise.
5884 (lr): Likewise.
5885 (struct aarch64_memory_operand) <type>: New
5886 MEMORY_OPERAND_POSTINDEX type.
5887 (postindex_memory_operand): New helper function.
5888 (emit_ret): New function.
5889 (emit_load_store_pair): New function, factored out of emit_stp
5890 with support for MEMORY_OPERAND_POSTINDEX.
5891 (emit_stp): Rewrite using emit_load_store_pair.
5892 (emit_ldp): New function.
5893 (emit_load_store): Likewise.
5894 (emit_ldr): Mention post-index instruction in comment.
5895 (emit_ldrh): New function.
5896 (emit_ldrb): New function.
5897 (emit_ldrsw): Mention post-index instruction in comment.
5898 (emit_str): Likewise.
5899 (emit_subs): New function.
5900 (emit_cmp): Likewise.
5901 (emit_and): Likewise.
5902 (emit_orr): Likewise.
5903 (emit_orn): Likewise.
5904 (emit_eor): Likewise.
5905 (emit_mvn): Likewise.
5906 (emit_lslv): Likewise.
5907 (emit_lsrv): Likewise.
5908 (emit_asrv): Likewise.
5909 (emit_mul): Likewise.
5910 (emit_sbfm): Likewise.
5911 (emit_sbfx): Likewise.
5912 (emit_ubfm): Likewise.
5913 (emit_ubfx): Likewise.
5914 (emit_csinc): Likewise.
5915 (emit_cset): Likewise.
5916 (emit_nop): Likewise.
5917 (emit_ops_insns): New helper function.
5918 (emit_pop): Likewise.
5919 (emit_push): Likewise.
5920 (aarch64_emit_prologue): New function.
5921 (aarch64_emit_epilogue): Likewise.
5922 (aarch64_emit_add): Likewise.
5923 (aarch64_emit_sub): Likewise.
5924 (aarch64_emit_mul): Likewise.
5925 (aarch64_emit_lsh): Likewise.
5926 (aarch64_emit_rsh_signed): Likewise.
5927 (aarch64_emit_rsh_unsigned): Likewise.
5928 (aarch64_emit_ext): Likewise.
5929 (aarch64_emit_log_not): Likewise.
5930 (aarch64_emit_bit_and): Likewise.
5931 (aarch64_emit_bit_or): Likewise.
5932 (aarch64_emit_bit_xor): Likewise.
5933 (aarch64_emit_bit_not): Likewise.
5934 (aarch64_emit_equal): Likewise.
5935 (aarch64_emit_less_signed): Likewise.
5936 (aarch64_emit_less_unsigned): Likewise.
5937 (aarch64_emit_ref): Likewise.
5938 (aarch64_emit_if_goto): Likewise.
5939 (aarch64_emit_goto): Likewise.
5940 (aarch64_write_goto_address): Likewise.
5941 (aarch64_emit_const): Likewise.
5942 (aarch64_emit_call): Likewise.
5943 (aarch64_emit_reg): Likewise.
5944 (aarch64_emit_pop): Likewise.
5945 (aarch64_emit_stack_flush): Likewise.
5946 (aarch64_emit_zero_ext): Likewise.
5947 (aarch64_emit_swap): Likewise.
5948 (aarch64_emit_stack_adjust): Likewise.
5949 (aarch64_emit_int_call_1): Likewise.
5950 (aarch64_emit_void_call_2): Likewise.
5951 (aarch64_emit_eq_goto): Likewise.
5952 (aarch64_emit_ne_goto): Likewise.
5953 (aarch64_emit_lt_goto): Likewise.
5954 (aarch64_emit_le_goto): Likewise.
5955 (aarch64_emit_gt_goto): Likewise.
5956 (aarch64_emit_ge_got): Likewise.
5957 (aarch64_emit_ops_impl): New static global variable.
5958 (aarch64_emit_ops): New target function, return
5959 &aarch64_emit_ops_impl.
5960 (struct linux_target_ops): Install it.
5961
bb903df0
PL
59622015-09-21 Pierre Langlois <pierre.langlois@arm.com>
5963
5964 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
5965 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
5966 aarch64-ipa.o.
5967 * linux-aarch64-ipa.c: New file.
5968 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
5969 and endian.h.
5970 (aarch64_get_thread_area): New target method.
5971 (extract_signed_bitfield): New helper function.
5972 (aarch64_decode_ldr_literal): New function.
5973 (enum aarch64_opcodes): New enum.
5974 (struct aarch64_register): New struct.
5975 (struct aarch64_operand): New struct.
5976 (x0): New static global.
5977 (x1): Likewise.
5978 (x2): Likewise.
5979 (x3): Likewise.
5980 (x4): Likewise.
5981 (w2): Likewise.
5982 (ip0): Likewise.
5983 (sp): Likewise.
5984 (xzr): Likewise.
5985 (aarch64_register): New helper function.
5986 (register_operand): Likewise.
5987 (immediate_operand): Likewise.
5988 (struct aarch64_memory_operand): New struct.
5989 (offset_memory_operand): New helper function.
5990 (preindex_memory_operand): Likewise.
5991 (enum aarch64_system_control_registers): New enum.
5992 (ENCODE): New macro.
5993 (emit_insn): New helper function.
5994 (emit_b): New function.
5995 (emit_bcond): Likewise.
5996 (emit_cb): Likewise.
5997 (emit_tb): Likewise.
5998 (emit_blr): Likewise.
5999 (emit_stp): Likewise.
6000 (emit_ldp_q_offset): Likewise.
6001 (emit_stp_q_offset): Likewise.
6002 (emit_load_store): Likewise.
6003 (emit_ldr): Likewise.
6004 (emit_ldrsw): Likewise.
6005 (emit_str): Likewise.
6006 (emit_ldaxr): Likewise.
6007 (emit_stxr): Likewise.
6008 (emit_stlr): Likewise.
6009 (emit_data_processing_reg): Likewise.
6010 (emit_data_processing): Likewise.
6011 (emit_add): Likewise.
6012 (emit_sub): Likewise.
6013 (emit_mov): Likewise.
6014 (emit_movk): Likewise.
6015 (emit_mov_addr): Likewise.
6016 (emit_mrs): Likewise.
6017 (emit_msr): Likewise.
6018 (emit_sevl): Likewise.
6019 (emit_wfe): Likewise.
6020 (append_insns): Likewise.
6021 (can_encode_int32_in): New helper function.
6022 (aarch64_relocate_instruction): New function.
6023 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
6024 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
6025 (struct linux_target_ops): Install aarch64_get_thread_area,
6026 aarch64_install_fast_tracepoint_jump_pad and
6027 aarch64_get_min_fast_tracepoint_insn_len.
6028
787749ea
PL
60292015-09-21 Pierre Langlois <pierre.langlois@arm.com>
6030
6031 * Makefile.in (aarch64-insn.o): New rule.
6032 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
6033
9812b2e6
YQ
60342015-09-21 Yao Qi <yao.qi@linaro.org>
6035
6036 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
6037
18fe412b
YQ
60382015-09-21 Yao Qi <yao.qi@linaro.org>
6039
6040 * tracepoint.c (max_jump_pad_size): Remove.
6041
a0cc84cd
YQ
60422015-09-18 Yao Qi <yao.qi@linaro.org>
6043
6044 * linux-aarch64-low.c: Don't include sys/uio.h.
6045 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
6046
d78908cf
WW
60472015-09-16 Wei-cheng Wang <cole945@gmail.com>
6048
6049 * tracepoint.c (eval_result_type): Change prototype.
6050 (condition_true_at_tracepoint): Fix argument to compiled_cond.
6051
d57e0d50
PA
60522015-09-15 Pedro Alves <palves@redhat.com>
6053
6054 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
6055 Check whether to report exec events instead of checking whether
6056 multiprocess is enabled.
6057
5a676acc
PA
60582015-09-15 Pedro Alves <palves@redhat.com>
6059
6060 PR remote/18965
6061 * remote-utils.c (prepare_resume_reply): Merge
6062 TARGET_WAITKIND_VFORK_DONE switch case with the
6063 TARGET_WAITKIND_FORKED case.
6064
7c5d0fad
YQ
60652015-09-15 Yao Qi <yao.qi@linaro.org>
6066
6067 * server.c (handle_query): Check string comparison using
6068 "else if" instead of "if".
6069
750ce8d1
YQ
60702015-09-15 Yao Qi <yao.qi@linaro.org>
6071
6072 * server.c (vCont_supported): New global variable.
6073 (handle_query): Set vCont_supported to 1 if "vContSupported+"
6074 matches. Append ";vContSupported+" to own_buf.
6075 (handle_v_requests): Append ";s;S" to own_buf if target supports
6076 hardware single step or vCont_supported is false.
6077 (capture_main): Set vCont_supported to zero.
6078
70b90b91
YQ
60792015-09-15 Yao Qi <yao.qi@linaro.org>
6080
6081 * linux-low.c (linux_supports_conditional_breakpoints): Rename
6082 it to ...
6083 (linux_supports_hardware_single_step): ... New function.
6084 (linux_target_ops): Update.
6085 * lynx-low.c (lynx_target_ops): Set field
6086 supports_hardware_single_step to target_can_do_hardware_single_step.
6087 * nto-low.c (nto_target_ops): Likewise.
6088 * spu-low.c (spu_target_ops): Likewise.
6089 * win32-low.c (win32_target_ops): Likewise.
6090 * target.c (target_can_do_hardware_single_step): New function.
6091 * target.h (struct target_ops) <supports_conditional_breakpoints>:
6092 Remove. <supports_hardware_single_step>: New field.
6093 (target_supports_conditional_breakpoints): Remove.
6094 (target_supports_hardware_single_step): New macro.
6095 (target_can_do_hardware_single_step): Declare.
6096 * server.c (handle_query): Use target_supports_hardware_single_step
6097 instead of target_supports_conditional_breakpoints.
6098
ade90bde
YQ
60992015-09-15 Yao Qi <yao.qi@linaro.org>
6100
6101 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
6102 function.
6103 (struct linux_target_ops the_low_target): Install
6104 aarch64_linux_siginfo_fixup.
6105
94585166
DB
61062015-09-11 Don Breazeal <donb@codesourcery.com>
6107 Luis Machado <lgustavo@codesourcery.com>
6108
6109 * linux-low.c (linux_mourn): Static declaration.
6110 (linux_arch_setup): Move in front of
6111 handle_extended_wait.
6112 (linux_arch_setup_thread): New function.
6113 (handle_extended_wait): Handle exec events. Call
6114 linux_arch_setup_thread. Make event_lwp argument a
6115 pointer-to-a-pointer.
6116 (check_zombie_leaders): Do not check stopped threads.
6117 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
6118 (linux_low_filter_event): Add lwp and thread for exec'ing
6119 non-leader thread if leader thread has been deleted.
6120 Refactor code into linux_arch_setup_thread and call it.
6121 Pass child lwp pointer by reference to handle_extended_wait.
6122 (linux_wait_for_event_filtered): Update comment.
6123 (linux_wait_1): Prevent clobbering exec event status.
6124 (linux_supports_exec_events): New function.
6125 (linux_target_ops) <supports_exec_events>: Initialize new member.
6126 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
6127 new member.
6128 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
6129 * server.c (report_exec_events): New global variable.
6130 (handle_query): Handle qSupported query for exec-events feature.
6131 (captured_main): Initialize report_exec_events.
6132 * server.h (report_exec_events): Declare new global variable.
6133 * target.h (struct target_ops) <supports_exec_events>: New
6134 member.
6135 (target_supports_exec_events): New macro.
6136 * win32-low.c (win32_target_ops) <supports_exec_events>:
6137 Initialize new member.
6138
0568462b
MM
61392015-09-09 Markus Metzger <markus.t.metzger@intel.com>
6140
6141 * linux-low.c (linux_low_enable_btrace): Remove.
6142 (linux_target_ops): Replace linux_low_enable_btrace with
6143 linux_enable_btrace.
6144
39edd165
YQ
61452015-09-03 Yao Qi <yao.qi@linaro.org>
6146
6147 * linux-aarch64-low.c (aarch64_insert_point): Call
6148 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
6149 returns true.
6150
1db33b5a
UW
61512015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
6152
6153 * linux-low.c (check_stopped_by_breakpoint): Use
6154 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
6155
ab290430
PA
61562015-08-27 Pedro Alves <palves@redhat.com>
6157
6158 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
6159
8d749320
SM
61602015-08-26 Simon Marchi <simon.marchi@ericsson.com>
6161
6711b7f8
SM
6162 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
6163 the XNEW-family equivalent.
8d749320
SM
6164 (compile_bytecodes): Likewise.
6165 * dll.c (loaded_dll): Likewise.
6166 * event-loop.c (append_callback_event): Likewise.
6167 (create_file_handler): Likewise.
6168 (create_file_event): Likewise.
6169 * hostio.c (handle_open): Likewise.
6170 * inferiors.c (add_thread): Likewise.
6171 (add_process): Likewise.
6172 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
6173 * linux-arm-low.c (arm_new_process): Likewise.
6174 (arm_new_thread): Likewise.
6175 * linux-low.c (add_to_pid_list): Likewise.
6176 (linux_add_process): Likewise.
6177 (handle_extended_wait): Likewise.
6178 (add_lwp): Likewise.
6179 (enqueue_one_deferred_signal): Likewise.
6180 (enqueue_pending_signal): Likewise.
6181 (linux_resume_one_lwp_throw): Likewise.
6182 (linux_resume_one_thread): Likewise.
6183 (linux_read_memory): Likewise.
6184 (linux_write_memory): Likewise.
6185 * linux-mips-low.c (mips_linux_new_process): Likewise.
6186 (mips_linux_new_thread): Likewise.
6187 (mips_add_watchpoint): Likewise.
6188 * linux-x86-low.c (initialize_low_arch): Likewise.
6189 * lynx-low.c (lynx_add_process): Likewise.
6190 * mem-break.c (set_raw_breakpoint_at): Likewise.
6191 (set_breakpoint): Likewise.
6192 (add_condition_to_breakpoint): Likewise.
6193 (add_commands_to_breakpoint): Likewise.
6194 (clone_agent_expr): Likewise.
6195 (clone_one_breakpoint): Likewise.
6196 * regcache.c (new_register_cache): Likewise.
6197 * remote-utils.c (look_up_one_symbol): Likewise.
6198 * server.c (queue_stop_reply): Likewise.
6199 (start_inferior): Likewise.
6200 (queue_stop_reply_callback): Likewise.
6201 (handle_target_event): Likewise.
6202 * spu-low.c (fetch_ppc_memory): Likewise.
6203 (store_ppc_memory): Likewise.
6204 * target.c (set_target_ops): Likewise.
6205 * thread-db.c (thread_db_load_search): Likewise.
6206 (try_thread_db_load_1): Likewise.
6207 * tracepoint.c (add_tracepoint): Likewise.
6208 (add_tracepoint_action): Likewise.
6209 (create_trace_state_variable): Likewise.
6210 (cmd_qtdpsrc): Likewise.
6211 (cmd_qtro): Likewise.
6212 (add_while_stepping_state): Likewise.
6213 * win32-low.c (child_add_thread): Likewise.
6214 (get_image_name): Likewise.
6215
ed8b7b42
YQ
62162015-08-25 Yao Qi <yao.qi@linaro.org>
6217
6218 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
6219
db3cb7cb
YQ
62202015-08-25 Yao Qi <yao.qi@linaro.org>
6221
6222 * Makefile.in (aarch64-linux.o): New rule.
6223 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
6224 srv_tgtobj.
6225 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
6226 (aarch64_init_debug_reg_state): Make it extern.
6227 (aarch64_linux_prepare_to_resume): Remove.
6228
f6011a1c
YQ
62292015-08-25 Yao Qi <yao.qi@linaro.org>
6230
6231 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
6232 lwp_arch_private_info and ptid_of_lwp.
6233
88e2cf7e
YQ
62342015-08-25 Yao Qi <yao.qi@linaro.org>
6235
6236 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
6237 Find proc_info by find_process_pid. All callers updated.
6238
5e35436e
YQ
62392015-08-25 Yao Qi <yao.qi@linaro.org>
6240
6241 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
6242 Remove.
6243 (debug_reg_change_callback): Remove.
6244 (aarch64_notify_debug_reg_change): Remove.
6245
4a8a7965
YQ
62462015-08-25 Yao Qi <yao.qi@linaro.org>
6247
6248 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
6249 Call current_lwp_ptid.
6250
32a271ee
YQ
62512015-08-25 Yao Qi <yao.qi@linaro.org>
6252
6253 * linux-aarch64-low.c (debug_reg_change_callback): Use
6254 debug_printf.
6255
0d51c8d7
YQ
62562015-08-25 Yao Qi <yao.qi@linaro.org>
6257
6258 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
6259
31a43dd5
YQ
62602015-08-25 Yao Qi <yao.qi@linaro.org>
6261
6262 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
6263
8ee52567
YQ
62642015-08-25 Yao Qi <yao.qi@linaro.org>
6265
6266 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
6267 the code.
6268
ff3f0f45
YQ
62692015-08-25 Yao Qi <yao.qi@linaro.org>
6270
6271 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
6272 Remove.
6273 (debug_reg_change_callback): Remove argument entry and add argument
6274 lwp. Remove local variable thread. Don't print thread id in the
6275 debugging output. Don't check whether pid of thread equals to pid.
6276 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
6277 iterate_over_lwps instead find_inferior.
6278
3d40fbb5
PA
62792015-08-24 Pedro Alves <palves@redhat.com>
6280
6281 * inferiors.c (get_first_process): New function.
6282 * inferiors.h (get_first_process): New declaration.
6283 * remote-utils.c (read_ptid): Default to the first process in the
6284 list, instead of to the current thread's process.
6285
438e1e42
PA
62862015-08-24 Pedro Alves <palves@redhat.com>
6287
6288 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
6289 * event-loop.c: Likewise.
6290 * remote-utils.c: Likewise.
6291 * tracepoint.c: Likewise.
6292
a8c6d4fc
PA
62932015-08-24 Pedro Alves <palves@redhat.com>
6294
6295 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
6296 ptid_get_lwp.
6297
99b0bb12
PA
62982015-08-21 Pedro Alves <palves@redhat.com>
6299
6300 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
6301 instead of literal 1.
6302
f8904751
PA
63032015-08-21 Pedro Alves <palves@redhat.com>
6304
6305 * tdesc.c (default_description): Explicitly zero-initialize.
6306
465a859e
PA
63072015-08-21 Pedro Alves <palves@redhat.com>
6308
6309 PR gdb/18749
6310 * inferiors.c (remove_thread): Discard any pending stop reply for
6311 this thread.
6312 * server.c (remove_all_on_match_pid): Rename to ...
6313 (remove_all_on_match_ptid): ... this. Work with a filter ptid
6314 instead of a pid.
6315 (discard_queued_stop_replies): Change parameter to a ptid. Now
6316 extern.
6317 (handle_v_kill, kill_inferior_callback, captured_main)
6318 (process_serial_event): Adjust.
6319 * server.h (discard_queued_stop_replies): Declare.
6320
f0db101d
PA
63212015-08-21 Pedro Alves <palves@redhat.com>
6322
6323 * linux-low.c (wait_for_sigstop): Always switch to no thread
6324 selected if the previously current thread dies.
6325 * lynx-low.c (lynx_request_interrupt): Use the first thread's
6326 process instead of the current thread's.
6327 * remote-utils.c (input_interrupt): Don't check if there's no
6328 current thread.
6329 * server.c (gdb_read_memory, gdb_write_memory): If setting the
6330 current thread to the general thread fails, error out.
6331 (handle_qxfer_auxv, handle_qxfer_libraries)
6332 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
6333 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
6334 (handle_query): Check if there's a thread selected instead of
6335 checking whether there's any thread in the thread list.
6336 (handle_qxfer_threads, handle_qxfer_btrace)
6337 (handle_qxfer_btrace_conf): Don't error out early if there's no
6338 thread in the thread list.
6339 (handle_v_cont, myresume): Don't set the current thread to the
6340 continue thread.
6341 (process_serial_event) <Hg handling>: Also set thread_id if the
6342 previous general thread is still alive.
6343 (process_serial_event) <g/G handling>: If setting the current
6344 thread to the general thread fails, error out.
6345 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
6346 thread's lwp instead of the current thread's.
6347 * target.c (set_desired_thread): If the desired thread was not
6348 found, leave the current thread pointing to NULL. Return an int
6349 (boolean) indicating success.
6350 * target.h (set_desired_thread): Change return type to int.
6351
40045d91
MF
63522015-08-20 Max Filippov <jcmvbkbc@gmail.com>
6353
6354 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
6355 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
6356 #includes.
6357 (ps_get_thread_area): New function.
6358
45face3b
GB
63592015-08-19 Gary Benson <gbenson@redhat.com>
6360
6361 * hostio.c (handle_pread): Do not attempt to read more data
6362 than hostio_reply_with_data can fit in a packet.
6363
16d5f642
JB
63642015-08-18 Joel Brobecker <brobecker@adacore.com>
6365
6366 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
6367
a738da3a
MF
63682015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
6369
6370 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
6371
33ebda9d
PA
63722015-08-06 Pedro Alves <palves@redhat.com>
6373
6374 * tracepoint.c (expr_eval_result): Now an int.
6375
a44892be
PA
63762015-08-06 Pedro Alves <palves@redhat.com>
6377
6378 * gdbthread.h (struct regcache): Forward declare.
6379 (struct thread_info) <regcache_data>: Now a struct regcache
6380 pointer.
6381 * inferiors.c (inferior_regcache_data)
6382 (set_inferior_regcache_data): Now work with struct regcache
6383 pointers.
6384 * inferiors.h (struct regcache): Forward declare.
6385 (inferior_regcache_data, set_inferior_regcache_data): Now work
6386 with struct regcache pointers.
6387 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
6388 (free_register_cache_thread): Remove struct regcache pointer
6389 casts.
6390
608a1e46
PA
63912015-08-06 Pedro Alves <palves@redhat.com>
6392
6393 * server.c (captured_main): On error, print the exception message
6394 to stderr, and if run_once is set, throw a quit.
6395
f0ce0d3a
PA
63962015-08-06 Pedro Alves <palves@redhat.com>
6397
6398 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
6399 the current thread.
6400
bf47e248
PA
64012015-08-06 Pedro Alves <palves@redhat.com>
6402
6403 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
6404 reading beyond the passed in buffer length.
6405
b6b9ffcc
PL
64062015-08-06 Pierre Langlois <pierre.langlois@arm.com>
6407
6408 * tracepoint.c (symbol_list) <required>: Remove.
6409
863d01bd
PA
64102015-08-06 Pedro Alves <palves@redhat.com>
6411
6412 * linux-low.c (handle_extended_wait): Set the fork child's suspend
6413 count if stopping and suspending threads.
6414 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
6415 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
6416 (linux_detach): Complete an ongoing step-over.
6417 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
6418 throughout.
6419 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
6420 (linux_wait_1): If passing a signal to the inferior after
6421 finishing a step-over, unsuspend and re-resume all lwps. If we
6422 see a single-step event but the thread should be continuing, don't
6423 pass the trap to gdb.
6424 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
6425 internal_error instead of gdb_assert.
6426 (enqueue_pending_signal): New function.
6427 (check_ptrace_stopped_lwp_gone): Add debug output.
6428 (start_step_over): Use internal_error instead of gdb_assert.
6429 (complete_ongoing_step_over): New function.
6430 (linux_resume_one_thread): Don't resume a suspended thread.
6431 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
6432 it stepping.
6433
00db26fa
PA
64342015-08-06 Pedro Alves <palves@redhat.com>
6435
6436 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
6437 (linux_thread_alive): Use lwp_is_marked_dead.
6438 (extended_event_reported): Delete.
6439 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
6440 instead of extended_event_reported.
6441 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
6442 as well.
6443 (lwp_is_marked_dead): New function.
6444 (lwp_running): Use lwp_is_marked_dead.
6445 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
6446 comment.
6447
ad071a30
PA
64482015-08-06 Pedro Alves <palves@redhat.com>
6449
6450 * linux-low.c (linux_wait_1): Move fork event output out of the
6451 !report_to_gdb check. Pass event_child->waitstatus to
6452 target_waitstatus_to_string instead of ourstatus.
6453
524b57e6
YQ
64542015-08-04 Yao Qi <yao.qi@linaro.org>
6455
6456 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
6457 if current_thread is 32 bit.
6458
6085d6f6
YQ
64592015-08-04 Yao Qi <yao.qi@linaro.org>
6460
6461 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
6462 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
6463 * server.c (extended_protocol): Remove "static".
6464 * server.h (extended_protocol): Declare it.
6465
8a7e4587
YQ
64662015-08-04 Yao Qi <yao.qi@linaro.org>
6467
6468 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
6469 both aarch64 and aarch32.
6470 (aarch64_set_pc): Likewise.
6471
3b53ae99
YQ
64722015-08-04 Yao Qi <yao.qi@linaro.org>
6473
6474 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
6475 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
6476 arm-with-neon.xml to srv_xmlfiles.
6477 * linux-aarch64-low.c: Include linux-aarch32-low.h.
6478 (is_64bit_tdesc): New function.
6479 (aarch64_linux_read_description): New function.
6480 (aarch64_arch_setup): Call aarch64_linux_read_description.
6481 (regs_info): Rename to regs_info_aarch64.
6482 (aarch64_regs_info): Return right regs_info.
6483 (initialize_low_arch): Call initialize_low_arch_aarch32.
6484
bd9e6534
YQ
64852015-08-04 Yao Qi <yao.qi@linaro.org>
6486
6487 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
6488 * linux-aarch32-low.c: New file.
6489 * linux-aarch32-low.h: New file.
6490 * linux-arm-low.c (arm_fill_gregset): Move it to
6491 linux-aarch32-low.c.
6492 (arm_store_gregset): Likewise.
6493 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
6494 (arm_store_vfpregset): Call arm_store_vfpregset_num.
6495 (arm_arch_setup): Check if PTRACE_GETREGSET works.
6496 (regs_info): Rename to regs_info_arm.
6497 (arm_regs_info): Return regs_info_aarch32 if
6498 have_ptrace_getregset is 1 and target description is
6499 arm_with_neon or arm_with_vfpv3.
6500 (initialize_low_arch): Don't call init_registers_arm_with_neon.
6501 Call initialize_low_arch_aarch32 instead.
6502
ded48a5e
YQ
65032015-08-04 Yao Qi <yao.qi@linaro.org>
6504
6505 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
6506 * linux-low.c: ... here.
6507 * linux-low.h (have_ptrace_getregset): Declare it.
6508
96e9210f
PA
65092015-08-04 Pedro Alves <palves@redhat.com>
6510
6511 * thread-db.c (struct thread_db): Use new typedefs.
6512 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
6513 CHK calls.
6514 (disable_thread_event_reporting): Cast result of dlsym to
6515 destination function pointer type.
6516 (thread_db_mourn): Use td_ta_delete_ftype.
6517
af60a1ef
SL
65182015-08-03 Sandra Loosemore <sandra@codesourcery.com>
6519
6520 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
6521 arch variant.
6522 (CDX_BREAKPOINT): Define for R2.
6523 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
6524 (the_low_target): Add comments.
6525
e8b41681
YQ
65262015-07-30 Yao Qi <yao.qi@linaro.org>
6527
6528 * linux-arm-low.c (arm_hwcap): Remove it.
6529 (arm_read_description): New local variable arm_hwcap. Don't
6530 set arm_hwcap to zero.
6531
89abb039
YQ
65322015-07-30 Yao Qi <yao.qi@linaro.org>
6533
6534 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
6535 Use regcache->tdesc instead.
6536 (arm_store_wmmxregset): Likewise.
6537 (arm_fill_vfpregset): Likewise.
6538 (arm_store_vfpregset): Likewise.
6539
deca266c
YQ
65402015-07-30 Yao Qi <yao.qi@linaro.org>
6541
6542 * linux-arm-low.c: Include arch/arm.h.
6543 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
6544 (arm_store_gregset): Likewise.
6545
aa58a496
SM
65462015-07-29 Simon Marchi <simon.marchi@ericsson.com>
6547
6548 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
6549 ptrace's 4th parameter.
6550
50904b25
YQ
65512015-07-27 Yao Qi <yao.qi@linaro.org>
6552
6553 * configure.srv (case aarch64*-*-linux*): Don't set
6554 srv_linux_usrregs.
6555
5826e159
PA
65562015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
6557
6558 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
6559 sys/ptrace.h.
6560 * linux-arm-low.c: Likewise.
6561 * linux-cris-low.c: Likewise.
6562 * linux-crisv32-low.c: Likewise.
6563 * linux-low.c: Likewise.
6564 * linux-m68k-low.c: Likewise.
6565 * linux-mips-low.c: Likewise.
6566 * linux-nios2-low.c: Likewise.
6567 * linux-s390-low.c: Likewise.
6568 * linux-sparc-low.c: Likewise.
6569 * linux-tic6x-low.c: Likewise.
6570 * linux-tile-low.c: Likewise.
6571 * linux-x86-low.c: Likewise.
6572
54019719
PA
65732015-07-24 Pedro Alves <palves@redhat.com>
6574
6575 * config.in: Regenerate.
6576 * configure: Regenerate.
6577
eb7aa561
PA
65782015-07-24 Pedro Alves <palves@redhat.com>
6579
6580 * acinclude.m4: Include ../ptrace.m4.
6581 * configure.ac: Call GDB_AC_PTRACE.
6582 * config.in, configure: Regenerate.
6583
55d7b841
YQ
65842015-07-24 Yao Qi <yao.qi@linaro.org>
6585
6586 * linux-low.c (linux_create_inferior): Remove setting to
6587 proc->priv->new_inferior.
6588 (linux_attach): Likewise.
6589 (linux_low_filter_event): Likewise.
6590 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
6591
c06cbd92
YQ
65922015-07-24 Yao Qi <yao.qi@linaro.org>
6593
6594 * linux-low.c (linux_arch_setup): New function.
6595 (linux_low_filter_event): If proc->tdesc is NULL and
6596 proc->attached is true, call the_low_target.arch_setup.
6597 Otherwise, keep status pending, and return.
6598 (linux_resume_one_lwp_throw): Don't call get_pc if
6599 thread->while_stepping isn't NULL. Don't call
6600 get_thread_regcache if proc->tdesc is NULL.
6601 (need_step_over_p): Return 0 if proc->tdesc is NULL.
6602 (linux_target_ops): Install arch_setup.
6603 * server.c (start_inferior): Call the_target->arch_setup.
6604 * target.h (struct target_ops) <arch_setup>: New field.
6605 (target_arch_setup): New marco.
6606 * lynx-low.c (lynx_target_ops): Update.
6607 * nto-low.c (nto_target_ops): Update.
6608 * spu-low.c (spu_target_ops): Update.
6609 * win32-low.c (win32_target_ops): Update.
6610
5ae3ebba
YQ
66112015-07-24 Yao Qi <yao.qi@linaro.org>
6612
6613 * linux-low.c (linux_add_process): Don't set
6614 proc->priv->new_inferior.
6615 (linux_create_inferior): Set proc->priv->new_inferior to 1.
6616 (linux_attach): Likewise.
6617
eb97750b
YQ
66182015-07-24 Yao Qi <yao.qi@linaro.org>
6619
6620 * server.c (start_inferior): Code refactor.
6621
51aee833
YQ
66222015-07-24 Yao Qi <yao.qi@linaro.org>
6623
6624 * server.c (process_serial_event): Set general_thread.
6625
af1b22f3
YQ
66262015-07-21 Yao Qi <yao.qi@linaro.org>
6627
6628 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
6629 aarch64_linux_get_debug_reg_capacity.
6630
554717a3
YQ
66312015-07-17 Yao Qi <yao.qi@linaro.org>
6632
6633 * Makefile.in (aarch64-linux-hw-point.o): New rule.
6634 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
6635 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
6636 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
6637 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
6638 (AARCH64_HWP_ALIGNMENT): Likewise.
6639 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
6640 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
6641 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
6642 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
6643 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
6644 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
6645 (struct aarch64_debug_reg_state): Likewise.
6646 (struct arch_lwp_info): Likewise.
6647 (aarch64_align_watchpoint): Likewise.
6648 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
6649 (aarch64_watchpoint_length): Likewise.
6650 (aarch64_point_encode_ctrl_reg): Likewise
6651 (aarch64_point_is_aligned): Likewise.
6652 (aarch64_align_watchpoint): Likewise.
6653 (aarch64_linux_set_debug_regs):
6654 (aarch64_dr_state_insert_one_point): Likewise.
6655 (aarch64_dr_state_remove_one_point): Likewise.
6656 (aarch64_handle_breakpoint): Likewise.
6657 (aarch64_handle_aligned_watchpoint): Likewise.
6658 (aarch64_handle_unaligned_watchpoint): Likewise.
6659 (aarch64_handle_watchpoint): Likewise.
6660
c67ca4de
YQ
66612015-07-17 Yao Qi <yao.qi@linaro.org>
6662
6663 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
6664 and don't aarch64_get_debug_reg_state. All callers update.
6665 (aarch64_handle_aligned_watchpoint): Likewise.
6666 (aarch64_handle_unaligned_watchpoint): Likewise.
6667 (aarch64_handle_watchpoint): Likewise.
6668 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
6669 (aarch64_remove_point): Likewise.
6670
25abf979
YQ
66712015-07-17 Yao Qi <yao.qi@linaro.org>
6672
6673 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
6674 debug_printf.
6675 (aarch64_handle_unaligned_watchpoint): Likewise.
6676
db1ff28b
JK
66772015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
6678
6679 Revert the previous 3 commits:
6680 Move gdb_regex* to common/
6681 Move linux_find_memory_regions_full & co.
6682 gdbserver build-id attribute generator
6683
700ca40f
JK
66842015-07-15 Aleksandar Ristovski <aristovski@qnx.com
6685 Jan Kratochvil <jan.kratochvil@redhat.com>
6686
6687 gdbserver build-id attribute generator.
6688 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
6689 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
6690 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
6691 (find_phdr): New.
6692 (get_dynamic): Use find_pdhr to traverse program headers.
6693 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
6694 (compare_mapping_entry_range, struct find_memory_region_callback_data)
6695 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
6696 (get_hex_build_id): New.
6697 (linux_qxfer_libraries_svr4): Add optional build-id attribute
6698 to reply XML document.
6699
9904185c
JK
67002015-07-15 Aleksandar Ristovski <aristovski@qnx.com
6701 Jan Kratochvil <jan.kratochvil@redhat.com>
6702
6703 * target.c: Include target/target-utils.h and fcntl.h.
6704 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
6705 (target_fileio_read_stralloc): New functions.
6706
6e5b4429
JK
67072015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
6708
6709 * Makefile.in (OBS): Add gdb_regex.o.
6710 (gdb_regex.o): New.
6711 * config.in: Rebuilt.
6712 * configure: Rebuilt.
6713
ddc98fbf
JK
67142015-07-15 Aleksandar Ristovski <aristovski@qnx.com
6715 Jan Kratochvil <jan.kratochvil@redhat.com>
6716
6717 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
6718 * Makefile.in (OBS): Add target-utils.o.
6719 (linux-maps.o, target-utils.o): New.
6720 * configure.srv (srv_linux_obj): Add linux-maps.o.
6721
e57bb7a0
PL
67222015-07-15 Pierre Langlois <pierre.langlois@arm.com>
6723
6724 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
6725 function, return 1.
6726 (the_low_target): Install it.
6727
586b02a9
PA
67282015-07-14 Pedro Alves <palves@redhat.com>
6729
6730 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
6731 Instead, ignore ECHILD, and throw an error for other errnos.
6732
58c1b36c
PA
67332015-07-10 Pedro Alves <palves@redhat.com>
6734
6735 * event-loop.c (struct callback_event) <data>: Change type to
6736 gdb_client_data instance instead of gdb_client_data pointer.
6737 (append_callback_event): Adjust.
6738
421530db
PL
67392015-07-10 Pierre Langlois <pierre.langlois@arm.com>
6740
6741 * linux-aarch64-low.c: Add comments for each linux_target_ops
6742 method. Remove comments already covered in target_ops and
6743 linux_target_ops definitions.
6744 (the_low_target): Add comments for each unimplemented method.
6745
c2d65f38
YQ
67462015-07-09 Yao Qi <yao.qi@linaro.org>
6747
6748 * linux-aarch64-low.c (aarch64_regmap): Remove.
6749 (aarch64_usrregs_info): Remove.
6750 (regs_info): Set field usrregs to NULL.
6751
b20a6524
MM
67522015-07-02 Markus Metzger <markus.t.metzger@intel.com>
6753
6754 * linux-low.c: Include "rsp-low.h"
6755 (linux_low_encode_pt_config, linux_low_encode_raw): New.
6756 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
6757 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
6758 (handle_btrace_enable_pt): New.
6759 (handle_btrace_general_set): Support "pt".
6760 (handle_btrace_conf_general_set): Support "pt:size".
6761
96c97461
PL
67622015-06-29 Pierre Langlois <pierre.langlois@arm.com>
6763
6764 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
6765 Z_PACKET_SW_BP.
6766
37d66942
PL
67672015-06-29 Pierre Langlois <pierre.langlois@arm.com>
6768
6769 * linux-aarch64-low.c: Remove comment about endianness.
6770 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
6771 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
6772 memcmp.
6773
dc06243f
GB
67742015-06-24 Gary Benson <gbenson@redhat.com>
6775
6776 * linux-i386-ipa.c (stdint.h): Do not include.
6777 * lynx-i386-low.c (stdint.h): Likewise.
6778 * lynx-ppc-low.c (stdint.h): Likewise.
6779 * mem-break.c (stdint.h): Likewise.
6780 * thread-db.c (stdint.h): Likewise.
6781 * tracepoint.c (stdint.h): Likewise.
6782 * win32-low.c (stdint.h): Likewise.
6783
124e13d9
SM
67842015-06-18 Simon Marchi <simon.marchi@ericsson.com>
6785
6786 * server.c (write_qxfer_response): Update call to
6787 remote_escape_output.
6788
909c2cda
JK
67892015-06-15 Aleksandar Ristovski <aristovski@qnx.com
6790 Jan Kratochvil <jan.kratochvil@redhat.com>
6791
6792 Merge multiple hex conversions.
6793 * gdbreplay.c (tohex): Rename to 'fromhex'.
6794 (logchar): Use fromhex.
6795
24c05f46
JK
67962015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
6797
6798 * server.c (handle_qxfer_libraries): Set `version' attribute for
6799 <library-list>.
6800
14d2069a
GB
68012015-06-10 Gary Benson <gbenson@redhat.com>
6802
6803 * target.h (struct target_ops) <multifs_open>: New field.
6804 <multifs_unlink>: Likewise.
6805 <multifs_readlink>: Likewise.
6806 * linux-low.c (nat/linux-namespaces.h): New include.
6807 (linux_target_ops): Initialize the_target->multifs_open,
6808 the_target->multifs_unlink and the_target->multifs_readlink.
6809 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
6810 * hostio.c (hostio_fs_pid): New static variable.
6811 (hostio_handle_new_gdb_connection): New function.
6812 (handle_setfs): Likewise.
6813 (handle_open): Use the_target->multifs_open as appropriate.
6814 (handle_unlink): Use the_target->multifs_unlink as appropriate.
6815 (handle_readlink): Use the_target->multifs_readlink as
6816 appropriate.
6817 (handle_vFile): Handle vFile:setfs packets.
6818 * server.c (handle_query): Call hostio_handle_new_gdb_connection
6819 after target_handle_new_gdb_connection.
6820
4b8b5e72
GB
68212015-06-10 Gary Benson <gbenson@redhat.com>
6822
6823 * configure.ac (AC_CHECK_FUNCS): Add setns.
6824 * config.in: Regenerate.
6825 * configure: Likewise.
6826 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
6827 (linux-namespaces.o): New rule.
6828 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
6829
3ac2e371
GB
68302015-06-09 Gary Benson <gbenson@redhat.com>
6831
6832 * hostio.c (handle_open): Process mode argument with
6833 fileio_to_host_mode.
6834
ca9b78ce
YQ
68352015-06-01 Yao Qi <yao.qi@linaro.org>
6836
6837 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
6838 * linux-x86-low.c: Likewise.
6839
bfacd19d
DB
68402015-05-28 Don Breazeal <donb@codesourcery.com>
6841
6842 * linux-low.c (handle_extended_wait): Initialize
6843 thread_info.last_resume_kind for new fork children.
6844
452003ef
PA
68452015-05-15 Pedro Alves <palves@redhat.com>
6846
6847 * target.h (target_handle_new_gdb_connection): Rewrite using if
6848 wrapped in do/while.
6849
1041a03c
JB
68502015-05-14 Joel Brobecker <brobecker@adacore.com>
6851
6852 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
6853 * configure, config.in: Regenerate.
6854 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
6855 Declare typedef.
6856
c269dbdb
DB
68572015-05-12 Don Breazeal <donb@codesourcery.com>
6858
6859 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
6860 PTRACE_EVENT_VFORK_DONE.
6861 (linux_low_ptrace_options, extended_event_reported): Add vfork
6862 events.
6863 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
6864 and "vforkdone" for RSP 'T' Stop Reply Packet.
6865 * server.h (report_vfork_events): Declare
6866 global variable.
6867
3a8a0396
DB
68682015-05-12 Don Breazeal <donb@codesourcery.com>
6869
6870 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
6871 (the_low_target) <new_fork>: Initialize new member.
6872 * linux-arm-low.c (arm_new_fork): New function.
6873 (the_low_target) <new_fork>: Initialize new member.
6874 * linux-low.c (handle_extended_wait): Call new target function
6875 new_fork.
6876 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
6877 * linux-mips-low.c (mips_add_watchpoint): New function
6878 extracted from mips_insert_point.
6879 (the_low_target) <new_fork>: Initialize new member.
6880 (mips_linux_new_fork): New function.
6881 (mips_insert_point): Call mips_add_watchpoint.
6882 * linux-x86-low.c (x86_linux_new_fork): New function.
6883 (the_low_target) <new_fork>: Initialize new member.
6884
de0d863e
DB
68852015-05-12 Don Breazeal <donb@codesourcery.com>
6886
6887 * linux-low.c (handle_extended_wait): Implement return value,
6888 rename argument 'event_child' to 'event_lwp', handle
6889 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
6890 (linux_low_ptrace_options): New function.
6891 (linux_low_filter_event): Call linux_low_ptrace_options,
6892 use different argument fo linux_enable_event_reporting,
6893 use return value from handle_extended_wait.
6894 (extended_event_reported): New function.
6895 (linux_wait_1): Call extended_event_reported and set
6896 status to report fork events.
6897 (linux_write_memory): Add pid to debug message.
6898 (reset_lwp_ptrace_options_callback): New function.
6899 (linux_handle_new_gdb_connection): New function.
6900 (linux_target_ops): Initialize new structure member.
6901 * linux-low.h (struct lwp_info) <waitstatus>: New member.
6902 * lynx-low.c: Initialize new structure member.
6903 * remote-utils.c (prepare_resume_reply): Implement stop reason
6904 "fork" for "T" stop message.
6905 * server.c (handle_query): Call handle_new_gdb_connection.
6906 * server.h (report_fork_events): Declare global flag.
6907 * target.h (struct target_ops) <handle_new_gdb_connection>:
6908 New member.
6909 (target_handle_new_gdb_connection): New macro.
6910 * win32-low.c: Initialize new structure member.
6911
ddcbc397
DB
69122015-05-12 Don Breazeal <donb@codesourcery.com>
6913
6914 * mem-break.c (APPEND_TO_LIST): Define macro.
6915 (clone_agent_expr): New function.
6916 (clone_one_breakpoint): New function.
6917 (clone_all_breakpoints): New function.
6918 * mem-break.h: Declare new functions.
6919
89245bc0
DB
69202015-05-12 Don Breazeal <donb@codesourcery.com>
6921
6922 * linux-low.c (linux_supports_fork_events): New function.
6923 (linux_supports_vfork_events): New function.
6924 (linux_target_ops): Initialize new structure members.
6925 (initialize_low): Call linux_check_ptrace_features.
6926 * lynx-low.c (lynx_target_ops): Initialize new structure
6927 members.
6928 * server.c (report_fork_events, report_vfork_events):
6929 New global flags.
6930 (handle_query): Add new features to qSupported packet and
6931 response.
6932 (captured_main): Initialize new global variables.
6933 * target.h (struct target_ops) <supports_fork_events>:
6934 New member.
6935 <supports_vfork_events>: New member.
6936 (target_supports_fork_events): New macro.
6937 (target_supports_vfork_events): New macro.
6938 * win32-low.c (win32_target_ops): Initialize new structure
6939 members.
6940
835205d0
GB
69412015-05-12 Gary Benson <gbenson@redhat.com>
6942
6943 * server.c (handle_qxfer_exec_file): Use current process
6944 if annex is empty.
6945
21e94bd9
SL
69462015-05-08 Sandra Loosemore <sandra@codesourcery.com>
6947
6948 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
6949 Remove HAVE_PTRACE_GETREGS conditionals.
6950 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
6951 instead of PTRACE_GETREGS and PTRACE_SETREGS.
6952
45614f15
YQ
69532015-05-08 Yao Qi <yao.qi@linaro.org>
6954
6955 * linux-low.c (linux_supports_conditional_breakpoints): New
6956 function.
6957 (linux_target_ops): Install new target method.
6958 * lynx-low.c (lynx_target_ops): Install NULL hook for
6959 supports_conditional_breakpoints.
6960 * nto-low.c (nto_target_ops): Likewise.
6961 * spu-low.c (spu_target_ops): Likewise.
6962 * win32-low.c (win32_target_ops): Likewise.
6963 * server.c (handle_query): Check
6964 target_supports_conditional_breakpoints.
6965 * target.h (struct target_ops) <supports_conditional_breakpoints>:
6966 New field.
6967 (target_supports_conditional_breakpoints): New macro.
6968
80ad801e
PA
69692015-05-06 Pedro Alves <palves@redhat.com>
6970
6971 PR server/18081
6972 * server.c (start_inferior): If the process exits, mourn it.
6973
819843c7
GB
69742015-04-21 Gary Benson <gbenson@redhat.com>
6975
6976 * hostio.c (fileio_open_flags_to_host): Factored out to
6977 fileio_to_host_openflags in common/fileio.c. Single use
6978 updated.
6979
a2d5a9d7
MF
69802015-04-17 Max Filippov <jcmvbkbc@gmail.com>
6981
6982 * linux-xtensa-low.c (xtensa_fill_gregset)
6983 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
6984 XCHAL_HAVE_LOOP.
6985
deb44829
MF
69862015-04-17 Max Filippov <jcmvbkbc@gmail.com>
6987
6988 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
6989 (regs_info): Replace usrregs pointer with NULL.
6990
e57f1de3
GB
69912015-04-17 Gary Benson <gbenson@redhat.com>
6992
6993 * target.h (struct target_ops) <pid_to_exec_file>: New field.
6994 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
6995 * server.c (handle_qxfer_exec_file): New function.
6996 (qxfer_packets): Add exec-file entry.
6997 (handle_query): Report qXfer:exec-file:read as supported packet.
6998
62828379
RN
69992015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
7000
7001 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
7002
b88bb450
GB
70032015-04-09 Gary Benson <gbenson@redhat.com>
7004
7005 * hostio-errno.c (errno_to_fileio_error): Remove function.
7006 Update caller to use remote_fileio_to_fio_error.
7007
c8f4bfdd
YQ
70082015-04-09 Yao Qi <yao.qi@linaro.org>
7009
7010 * linux-low.c (linux_insert_point): Call
7011 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
7012 (linux_remove_point): Call remove_memory_breakpoint if type is
7013 raw_bkpt_type_sw.
7014 * linux-x86-low.c (x86_insert_point): Don't call
7015 insert_memory_breakpoint.
7016 (x86_remove_point): Don't call remove_memory_breakpoint.
7017
41f98f02
PA
70182015-04-01 Pedro Alves <palves@redhat.com>
7019 Cleber Rosa <crosa@redhat.com>
7020
7021 * server.c (gdbserver_usage): Reorganize and extend the usage
7022 message.
7023
2bf6fb9d
PA
70242015-03-24 Pedro Alves <palves@redhat.com>
7025
7026 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
7027 output. Also dump TRAP_TRACE.
7028 (linux_low_filter_event): In debug output, distinguish a
7029 resume_stop SIGSTOP from a delayed SIGSTOP.
7030
369f6daa
GB
70312015-03-24 Gary Benson <gbenson@redhat.com>
7032
7033 * linux-x86-low.c (x86_linux_new_thread): Moved to
7034 nat/x86-linux.c.
7035 (x86_linux_prepare_to_resume): Likewise.
7036
8e5d4070
GB
70372015-03-24 Gary Benson <gbenson@redhat.com>
7038
7039 * Makefile.in (x86-linux-dregs.o): New rule.
7040 * configure.srv: Add x86-linux-dregs.o to relevant targets.
7041 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
7042 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
7043 (x86_linux_dr_get): Likewise.
7044 (x86_linux_dr_set): Likewise.
7045 (update_debug_registers_callback): Likewise.
7046 (x86_linux_dr_set_addr): Likewise.
7047 (x86_linux_dr_get_addr): Likewise.
7048 (x86_linux_dr_set_control): Likewise.
7049 (x86_linux_dr_get_control): Likewise.
7050 (x86_linux_dr_get_status): Likewise.
7051 (x86_linux_update_debug_registers): Likewise.
7052
2b95d440
GB
70532015-03-24 Gary Benson <gbenson@redhat.com>
7054
7055 * linux-x86-low.c (x86_linux_update_debug_registers):
7056 New function, factored out from...
7057 (x86_linux_prepare_to_resume): ...this.
7058
14b0bc68
GB
70592015-03-24 Gary Benson <gbenson@redhat.com>
7060
7061 * linux-x86-low.c (x86_linux_dr_get): Update comments.
7062 (x86_linux_dr_set): Likewise.
7063 (update_debug_registers_callback): Likewise.
7064 (x86_linux_dr_set_addr): Likewise.
7065 (x86_linux_dr_get_addr): Likewise.
7066 (x86_linux_dr_set_control): Likewise.
7067 (x86_linux_dr_get_control): Likewise.
7068 (x86_linux_dr_get_status): Likewise.
7069 (x86_linux_prepare_to_resume): Likewise.
7070
5dfe6ca8
GB
70712015-03-24 Gary Benson <gbenson@redhat.com>
7072
7073 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
7074 Use perror_with_name. Pass string through gettext.
7075 (x86_linux_dr_set): Likewise.
7076
d33472ad
GB
70772015-03-24 Gary Benson <gbenson@redhat.com>
7078
7079 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
7080 (x86_linux_dr_set_addr): ...this.
7081 (x86_dr_low_get_addr): Rename to...
7082 (x86_linux_dr_get_addr): ...this.
7083 (x86_dr_low_set_control): Rename to...
7084 (x86_linux_dr_set_control): ...this.
7085 (x86_dr_low_get_control): Rename to...
7086 (x86_linux_dr_get_control): ...this.
7087 (x86_dr_low_get_status): Rename to...
7088 (x86_linux_dr_get_status): ...this.
7089 (x86_dr_low): Update with new function names.
7090
4b134ca1
GB
70912015-03-24 Gary Benson <gbenson@redhat.com>
7092
7093 * Makefile.in (x86-linux.o): New rule.
7094 * configure.srv: Add x86-linux.o to relevant targets.
7095 * linux-low.c (lwp_set_arch_private_info): New function.
7096 (lwp_arch_private_info): Likewise.
7097 * linux-x86-low.c: Include nat/x86-linux.h.
7098 (arch_lwp_info): Removed structure.
7099 (update_debug_registers_callback):
7100 Use lwp_set_debug_registers_changed.
7101 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
7102 and lwp_set_debug_registers_changed.
7103 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
7104
34c703da
GB
71052015-03-24 Gary Benson <gbenson@redhat.com>
7106
7107 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
7108 * linux-arm-low.c (arm_new_thread): Likewise.
7109 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
7110 * linux-mips-low.c (mips_linux_new_thread): Likewise.
7111 * linux-x86-low.c (x86_linux_new_thread): Likewise.
7112 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
7113
cff068da
GB
71142015-03-24 Gary Benson <gbenson@redhat.com>
7115
7116 * linux-low.c (ptid_of_lwp): New function.
7117 (lwp_is_stopped): Likewise.
7118 (lwp_stop_reason): Likewise.
7119 * linux-x86-low.c (update_debug_registers_callback):
7120 Use lwp_is_stopped.
7121 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
7122 lwp_stop_reason.
7123
b2f7c7e8
GB
71242015-03-24 Gary Benson <gbenson@redhat.com>
7125
7126 * linux-low.h (linux_stop_lwp): Remove declaration.
7127
6d4ee8c6
GB
71282015-03-24 Gary Benson <gbenson@redhat.com>
7129
7130 * linux-low.h: Include nat/linux-nat.h.
7131 * linux-low.c (iterate_over_lwps_args): New structure.
7132 (iterate_over_lwps_filter): New function.
7133 (iterate_over_lwps): Likewise.
7134 * linux-x86-low.c (update_debug_registers_callback):
7135 Update signature to what iterate_over_lwps expects.
7136 Remove PID check that iterate_over_lwps now performs.
7137 (x86_dr_low_set_addr): Use iterate_over_lwps.
7138 (x86_dr_low_set_control): Likewise.
7139
70a0bb6b
GB
71402015-03-24 Gary Benson <gbenson@redhat.com>
7141
7142 * linux-x86-low.c (x86_debug_reg_state): New function.
7143 (x86_linux_prepare_to_resume): Use the above.
7144
7b669087
GB
71452015-03-24 Gary Benson <gbenson@redhat.com>
7146
7147 * linux-low.c (current_lwp_ptid): New function.
7148 * linux-x86-low.c: Include nat/linux-nat.h.
7149 (x86_dr_low_get_addr): Use current_lwp_ptid.
7150 (x86_dr_low_get_control): Likewise.
7151 (x86_dr_low_get_status): Likewise.
7152
eef49a3d
PA
71532015-03-20 Pedro Alves <palves@redhat.com>
7154
7155 * tracepoint.c (cmd_qtstatus): Make "str" const.
7156
b2333d22
PA
71572015-03-20 Pedro Alves <palves@redhat.com>
7158
7159 * server.c (handle_general_set): Make "req_str" const.
7160
23f238d3
PA
71612015-03-19 Pedro Alves <palves@redhat.com>
7162
7163 * linux-low.c (linux_resume_one_lwp): Rename to ...
7164 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
7165 instead call perror_with_name.
7166 (check_ptrace_stopped_lwp_gone): New function.
7167 (linux_resume_one_lwp): Reimplement as wrapper around
7168 linux_resume_one_lwp_throw that swallows errors if the LWP is
7169 gone.
7170
91baf43f
PA
71712015-03-19 Pedro Alves <palves@redhat.com>
7172
7173 * linux-low.c (count_events_callback, select_event_lwp_callback):
7174 No longer check whether the thread has resume_stop as last resume
7175 kind.
7176
8bf3b159
PA
71772015-03-19 Pedro Alves <palves@redhat.com>
7178
7179 * linux-low.c (count_events_callback, select_event_lwp_callback):
7180 Use the lwp's status_pending_p field, not the thread's.
7181
b90fc188
PA
71822015-03-19 Pedro Alves <palves@redhat.com>
7183
7184 * linux-low.c (select_event_lwp_callback): Update comments to
7185 no longer mention SIGTRAP.
7186
464b0089
GB
71872015-03-18 Gary Benson <gbenson@redhat.com>
7188
7189 * server.c (handle_query): Do not report vFile:fstat as supported.
7190
aa9e327f
GB
71912015-03-11 Gary Benson <gbenson@redhat.com>
7192
7193 * hostio.c (sys/types.h): New include.
7194 (sys/stat.h): Likewise.
7195 (common-remote-fileio.h): Likewise.
7196 (handle_fstat): New function.
7197 (handle_vFile): Handle vFile:fstat packets.
aa9e327f 7198
791c0056
GB
71992015-03-11 Gary Benson <gbenson@redhat.com>
7200
7201 * configure.ac (AC_CHECK_MEMBERS): Add checks for
7202 struct stat.st_blocks and struct stat.st_blksize.
7203 * configure: Regenerate.
7204 * config.in: Likewise.
7205 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
7206 (OBS): Add common-remote-fileio.o.
7207 (common-remote-fileio.o): New rule.
7208
9a9df970
PA
72092015-03-09 Pedro Alves <palves@redhat.com>
7210
7211 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
7212 'struct sockaddr' pointer in 'accept' call.
7213
9eb1356e
PA
72142015-03-09 Pedro Alves <palves@redhat.com>
7215
7216 Revert:
7217 2015-03-07 Pedro Alves <palves@redhat.com>
7218 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
7219 or <winsock2.h> here. Instead include "gdb_socket.h".
7220 (remote_open): Use union gdb_sockaddr_u.
7221 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
7222 or <winsock2.h> here. Instead include "gdb_socket.h".
7223 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
7224 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
7225 or <sys/un.h>.
7226 (init_named_socket, gdb_agent_helper_thread): Use union
7227 gdb_sockaddr_u.
7228
aac331e4
PA
72292015-03-07 Pedro Alves <palves@redhat.com>
7230
7231 * configure.ac (build_warnings): Move
7232 -Wdeclaration-after-statement to the C-specific set.
7233 * configure: Regenerate.
7234
366c75fc
PA
72352015-03-07 Pedro Alves <palves@redhat.com>
7236
7237 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
7238 or <winsock2.h> here. Instead include "gdb_socket.h".
7239 (remote_open): Use union gdb_sockaddr_u.
7240 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
7241 or <winsock2.h> here. Instead include "gdb_socket.h".
7242 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
7243 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
7244 or <sys/un.h>.
7245 (init_named_socket, gdb_agent_helper_thread): Use union
7246 gdb_sockaddr_u.
7247
492d29ea
PA
72482015-03-07 Pedro Alves <palves@redhat.com>
7249
7250 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
7251 instead.
7252
60a191ed
YQ
72532015-03-06 Yao Qi <yao.qi@linaro.org>
7254
7255 * linux-aarch64-low.c (aarch64_insert_point): Use
7256 show_debug_regs as a boolean.
7257 (aarch64_remove_point): Likewise.
7258
f5771b1d
PA
72592015-03-05 Pedro Alves <palves@redhat.com>
7260
7261 * lynx-low.c (lynx_target_ops): Install NULL hooks for
7262 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
7263 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
7264 * nto-low.c (nto_target_ops): Likewise.
7265 * spu-low.c (spu_target_ops): Likewise.
7266 * win32-low.c (win32_target_ops): Likewise.
7267
3e572f71
PA
72682015-03-04 Pedro Alves <palves@redhat.com>
7269
72f4393d 7270 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
3e572f71
PA
7271 Decide whether a breakpoint triggered based on the SIGTRAP's
7272 siginfo.si_code.
72f4393d
L
7273 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
7274 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
3e572f71
PA
7275 (linux_low_filter_event): Check for breakpoints before checking
7276 watchpoints.
7277 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
7278 siginfo.si_code.
72f4393d
L
7279 (linux_stopped_by_sw_breakpoint)
7280 (linux_supports_stopped_by_sw_breakpoint)
7281 (linux_stopped_by_hw_breakpoint)
7282 (linux_supports_stopped_by_hw_breakpoint): New functions.
7283 (linux_target_ops): Install new target methods.
3e572f71 7284
1ec68e26
PA
72852015-03-04 Pedro Alves <palves@redhat.com>
7286
7287 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
7288 * server.c (swbreak_feature, hwbreak_feature): New globals.
7289 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
7290 (captured_main): Clear swbreak_feature and hwbreak_feature.
7291 * server.h (swbreak_feature, hwbreak_feature): Declare.
7292 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
7293 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
7294 supports_stopped_by_hw_breakpoint>: New fields.
7295 (target_supports_stopped_by_sw_breakpoint)
7296 (target_stopped_by_sw_breakpoint)
7297 (target_supports_stopped_by_hw_breakpoint)
7298 (target_stopped_by_hw_breakpoint): Declare.
7299
15c66dd6
PA
73002015-03-04 Pedro Alves <palves@redhat.com>
7301
7302 enum lwp_stop_reason -> enum target_stop_reason
7303 * linux-low.c (check_stopped_by_breakpoint): Adjust.
7304 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
7305 (linux_wait_1, stuck_in_jump_pad_callback)
7306 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
7307 (linux_stopped_by_watchpoint):
7308 * linux-low.h (enum lwp_stop_reason): Delete.
7309 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
7310 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
7311
98fc70d6
YQ
73122015-03-04 Yao Qi <yao.qi@linaro.org>
7313
7314 * Makefile.in (SFILES): Add linux-aarch64-low.c.
7315
dd2ac174
GB
73162015-03-03 Gary Benson <gbenson@redhat.com>
7317
7318 * hostio.c (handle_vFile): Fix prefix lengths.
7319
d68e53f4
MM
73202015-03-03 Markus Metzger <markus.t.metzger@intel.com>
7321
7322 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
7323 ptr_bits.
7324
bf2d68ab
AA
73252015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
7326
7327 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
7328 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
7329 (clean): Add "rm -f" for above C files.
7330 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
7331 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
7332 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
7333 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
7334 * linux-s390-low.c (HWCAP_S390_VX): New macro.
7335 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
7336 (init_registers_s390x_vx_linux64)
7337 (init_registers_s390x_tevx_linux64)
7338 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
7339 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
7340 declarations.
7341 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
7342 (s390_store_vxrs_high): New functions.
7343 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
7344 NT_S390_VXRS_HIGH.
7345 (s390_arch_setup): Add logic for selecting one of the new target
7346 descriptions. Activate the new vector regsets if applicable.
7347 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
7348 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
7349 and init_registers_s390x_tevx_linux64.
7350
c966a859
PA
73512015-03-01 Pedro Alves <palves@redhat.com>
7352
7353 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
7354 parameter.
7355
4180215b
PA
73562015-02-27 Pedro Alves <palves@redhat.com>
7357
7358 * linux-x86-low.c (u_debugreg_offset): New function.
7359 (x86_linux_dr_get, x86_linux_dr_set): Use it.
7360
749bab01
PA
73612015-02-27 Pedro Alves <palves@redhat.com>
7362
7363 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
7364 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
7365 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
7366 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
7367 (ps_lsetfpregs, ps_getpid)
7368 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
7369 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
7370 (ps_lsetxregs, ps_plog): Declare.
7371
3c14e5a3
PA
73722015-02-27 Pedro Alves <palves@redhat.com>
7373
7374 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
7375 IP_AGENT_EXPORT_FUNC.
7376 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
7377 IP_AGENT_EXPORT_FUNC.
7378 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
7379 (IP_AGENT_EXPORT): Delete.
7380 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
7381 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
7382 (gdb_trampoline_buffer_error, collecting, gdb_collect)
7383 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
7384 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
7385 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
7386 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
7387 (traceframe_read_count, traceframe_write_count)
7388 (traceframes_created, trace_state_variables, get_raw_reg)
7389 (get_trace_state_variable_value, set_trace_state_variable_value)
7390 (ust_loaded, helper_thread_id, cmd_buf): Use
7391 IPA_SYM_EXPORTED_NAME.
7392 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
7393 (tracepoints) Use IP_AGENT_EXPORT_VAR.
7394 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
7395 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
7396 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
7397 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
7398 EXTERN_C_PUSH/EXTERN_C_POP.
7399 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
7400 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
7401 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
7402 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
7403 (traceframe_write_count, traceframe_read_count)
7404 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
7405 (about_to_request_buffer_space, get_trace_state_variable_value)
7406 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
7407 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
7408 EXTERN_C_PUSH/EXTERN_C_POP.
7409 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
7410 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
7411 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
7412 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
7413 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
7414 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
7415 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
7416 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
7417 Define.
7418 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
7419 (IP_AGENT_EXPORT_VAR_DECL): Define.
7420 (tracing): Declare.
7421 (gdb_agent_get_raw_reg): Declare.
7422
fe978cb0
PA
74232015-02-27 Tom Tromey <tromey@redhat.com>
7424 Pedro Alves <palves@redhat.com>
7425
7426 Rename symbols whose names are reserved C++ keywords throughout.
7427
3bc3d82a
PA
74282015-02-27 Pedro Alves <palves@redhat.com>
7429
7430 * Makefile.in (COMPILER): New, get it from autoconf.
7431 (CXX): Get from autoconf instead.
7432 (COMPILE.pre): Use COMPILER.
7433 (CC-LD): Rename to ...
7434 (CC_LD): ... this. Use COMPILER.
7435 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
7436 (CXX_FOR_TARGET): Default to g++ instead of gcc.
7437 * acinclude.m4: Include build-with-cxx.m4.
7438 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
7439 Disable -Werror by default if building in C++ mode.
7440 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
7441 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
7442 the C++ compiler. Save/restore CXXFLAGS too.
7443 * configure: Regenerate.
7444
07697489
PA
74452015-02-27 Pedro Alves <palves@redhat.com>
7446
7447 * acinclude.m4: Include libiberty.m4.
7448 * configure.ac: Call libiberty_INIT.
7449 * config.in, configure: Regenerate.
7450
9beb7c4e
PA
74512015-02-26 Pedro Alves <palves@redhat.com>
7452
7453 * linux-low.c (linux_wait_1): When incrementing the PC past a
7454 program breakpoint always use the_low_target.breakpoint_len as
7455 increment, rather than the maximum between that and
7456 the_low_target.decr_pc_after_break.
7457
8090aef2
PA
74582015-02-23 Pedro Alves <palves@redhat.com>
7459
7460 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
7461 thread was doing a step-over; always adjust the PC if
7462 we stepped over a permanent breakpoint.
7463 (linux_wait_1): If we stepped over breakpoint that was on top of a
7464 permanent breakpoint, manually advance the PC past it.
7465
bc9540e8
PA
74662015-02-23 Pedro Alves <palves@redhat.com>
7467
7468 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
7469 modes.
7470 (x86_fill_gregset, x86_store_gregset): Use it when handling
7471 $orig_eax.
7472
2db9a427
PA
74732015-02-20 Pedro Alves <palves@redhat.com>
7474
7475 * thread-db.c: Include "nat/linux-procfs.h".
7476 (thread_db_init): Skip listing new threads if the kernel supports
7477 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
7478
afa8d396
PA
74792015-02-20 Pedro Alves <palves@redhat.com>
7480
7481 * linux-low.c (status_pending_p_callback): Use ptid_match.
7482
c9587f88
AT
74832015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
7484
7485 PR breakpoints/16812
7486 * linux-low.c (wstatus_maybe_breakpoint): Remove.
7487 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
7488 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
7489
b05ec7a5
AT
74902015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
7491
7492 PR breakpoints/15956
7493 * tracepoint.c (cmd_qtinit): Add check for current_thread.
7494
d33501a5
MM
74952015-02-09 Markus Metzger <markus.t.metzger@intel.com>
7496
7497 * linux-low.c (linux_low_btrace_conf): Print size.
7498 * server.c (handle_btrace_conf_general_set): New.
7499 (hanle_general_set): Call handle_btrace_conf_general_set.
7500 (handle_query): Report Qbtrace-conf:bts:size as supported.
7501
f4abbc16
MM
75022015-02-09 Markus Metzger <markus.t.metzger@intel.com>
7503
7504 * linux-low.c (linux_low_enable_btrace): Update parameters.
7505 (linux_low_btrace_conf): New.
7506 (linux_target_ops)<to_btrace_conf>: Initialize.
7507 * server.c (current_btrace_conf): New.
7508 (handle_btrace_enable): Rename to ...
7509 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
7510 to target_enable_btrace. Update comment. Update users.
7511 (handle_qxfer_btrace_conf): New.
7512 (qxfer_packets): Add btrace-conf entry.
7513 (handle_query): Report qXfer:btrace-conf:read as supported packet.
7514 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
7515 (target_ops)<read_btrace_conf>: New.
7516 (target_enable_btrace): Update parameters.
7517 (target_read_btrace_conf): New.
7518
043c3577
MM
75192015-02-09 Markus Metzger <markus.t.metzger@intel.com>
7520
7521 * server.c (handle_btrace_general_set): Remove call to
7522 target_supports_btrace.
7523 (supported_btrace_packets): New.
7524 (handle_query): Call supported_btrace_packets.
7525 * target.h: include btrace-common.h.
7526 (btrace_target_info): Removed.
7527 (supports_btrace, target_supports_btrace): Update parameters.
7528
734b0e4b
MM
75292015-02-09 Markus Metzger <markus.t.metzger@intel.com>
7530
7531 * Makefile.in (SFILES): Add common/btrace-common.c.
7532 (OBS): Add common/btrace-common.o.
7533 (btrace-common.o): Add build rules.
7534 * linux-low: Include btrace-common.h.
7535 (linux_low_read_btrace): Use struct btrace_data. Call
7536 btrace_data_init and btrace_data_fini.
7537
d6c146e9
PA
75382015-02-06 Pedro Alves <palves@redhat.com>
7539
7540 * thread-db.c (find_new_threads_callback): Add debug output.
7541
20ba1ce6
PA
75422015-02-04 Pedro Alves <palves@redhat.com>
7543
7544 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
7545 (resume_stopped_resumed_lwps): New function.
7546 (linux_wait_for_event_filtered): Use it.
7547
8cc73a39
SDJ
75482015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
7549
7550 * Makefile.in (SFILES): Add linux-personality.c.
7551 (linux-personality.o): New rule.
7552 * configure.srv (srv_linux_obj): Add linux-personality.o to the
7553 list of objects to be built.
7554 * linux-low.c: Include nat/linux-personality.h.
7555 (linux_create_inferior): Remove code to disable address space
7556 randomization (moved to ../nat/linux-personality.c). Create
7557 cleanup to disable address space randomization.
7558
fb23d554
SDJ
75592015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
7560
7561 * Makefile.in (posix-strerror.o): New rule.
7562 (mingw-strerror.o): Likewise.
7563 * configure: Regenerated.
7564 * configure.ac: Source file ../common/common.host. Initialize new
7565 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
7566
cdf43629
YQ
75672015-01-14 Yao Qi <yao@codesourcery.com>
7568
7569 * Makefile.in (SFILES): Add nat/ppc-linux.c.
7570 (ppc-linux.o): New rule.
7571 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
7572 * configure.ac: AC_CHECK_FUNCS(getauxval).
7573 * config.in: Re-generated.
7574 * configure: Re-generated.
7575 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
7576 ppc64_64bit_inferior_p
7577
514c5338
YQ
75782015-01-14 Yao Qi <yao@codesourcery.com>
7579
7580 * linux-ppc-low.c: Include "nat/ppc-linux.h".
7581 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
7582 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
7583 (PT_ORIG_R3, PT_TRAP): Likewise.
7584 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
7585 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
7586 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
7587
3368c1e5
JB
75882015-01-10 Joel Brobecker <brobecker@adacore.com>
7589
7590 * i387-fp.c (i387_cache_to_xsave): In look over
7591 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
7592 zmmh_low_space field by use of zmmh_high_space.
7593
582511be
PA
75942015-01-09 Pedro Alves <palves@redhat.com>
7595
7596 * linux-low.c (step_over_bkpt): Move higher up in the file.
7597 (handle_extended_wait): Don't store the stop_pc here.
7598 (get_stop_pc): Adjust comments and rename to ...
7599 (check_stopped_by_breakpoint): ... this. Record whether the LWP
7600 stopped for a software breakpoint or hardware breakpoint.
7601 (thread_still_has_status_pending_p): New function.
7602 (status_pending_p_callback): Use
7603 thread_still_has_status_pending_p. If the event is no longer
7604 interesting, resume the LWP.
7605 (handle_tracepoints): Add assert.
7606 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
7607 (wstatus_maybe_breakpoint): New function.
7608 (cancel_breakpoint): Delete function.
7609 (check_stopped_by_watchpoint): New function, factored out from
7610 linux_low_filter_event.
7611 (lp_status_maybe_breakpoint): Delete function.
7612 (linux_low_filter_event): Remove filter_ptid argument.
7613 Leave thread group exits pending here. Store the LWP's stop PC.
7614 Always leave events pending.
7615 (linux_wait_for_event_filtered): Pull all events out of the
7616 kernel, and leave them all pending.
7617 (count_events_callback, select_event_lwp_callback): Consider all
7618 events.
7619 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
7620 (select_event_lwp): Only give preference to the stepping LWP in
7621 all-stop mode. Adjust comments.
7622 (ignore_event): New function.
7623 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
7624 references to cancel_breakpoints. Adjust to renames. Also give
7625 equal priority to all LWPs that have had events in non-stop mode.
7626 If reporting a software breakpoint event, unadjust the LWP's PC.
7627 (linux_wait): If linux_wait_1 returned an ignored event, retry.
7628 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
7629 Adjust.
7630 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
7631 (resume_status_pending_p): Use thread_still_has_status_pending_p.
7632 (linux_stopped_by_watchpoint): Adjust.
7633 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
7634 * linux-low.h (enum lwp_stop_reason): New.
7635 (struct lwp_info) <stop_pc>: Adjust comment.
7636 <stopped_by_watchpoint>: Delete field.
7637 <stop_reason>: New field.
7638 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
7639 * mem-break.c (software_breakpoint_inserted_here)
7640 (hardware_breakpoint_inserted_here): New function.
7641 * mem-break.h (software_breakpoint_inserted_here)
7642 (hardware_breakpoint_inserted_here): Declare.
7643 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
7644 (cancel_breakpoints): Delete.
7645 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
7646 (upload_fast_traceframes): Remove references to
7647 cancel_breakpoints.
7648
a33e3959
PA
76492015-01-09 Pedro Alves <palves@redhat.com>
7650
7651 * thread-db.c (find_new_threads_callback): Ignore thread if the
7652 kernel thread ID is -1.
7653
8784d563
PA
76542015-01-09 Pedro Alves <palves@redhat.com>
7655
7656 * linux-low.c (linux_attach_fail_reason_string): Move to
7657 nat/linux-ptrace.c, and rename.
7658 (linux_attach_lwp): Update comment.
7659 (attach_proc_task_lwp_callback): New function.
7660 (linux_attach): Adjust to rename and use
7661 linux_proc_attach_tgid_threads.
7662 (linux_attach_fail_reason_string): Delete declaration.
7663
76f2b779
JB
76642015-01-01 Joel Brobecker <brobecker@adacore.com>
7665
7666 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
7667 * server.c (gdbserver_version): Likewise.
7668
fafcc06a
SDJ
76692014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
7670
7671 * remote-utils.c: Include ctype.h.
7672 (input_interrupt): Explicitly handle the case when the char
7673 received is the NUL byte. Improve the printing of non-ASCII
7674 characters.
7675
beed38b8
JB
76762014-12-16 Joel Brobecker <brobecker@adacore.com>
7677
7678 * linux-low.c (linux_low_filter_event): Update call to
7679 linux_enable_event_reporting following the addition of
7680 a new parameter to that function.
7681
bf330350
CU
76822014-12-16 Catalin Udma <catalin.udma@freescale.com>
7683
7684 PR server/17457
7685 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
7686 (AARCH64_FPCR_REGNO): Likewise.
7687 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
7688 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
7689 (aarch64_store_fpregset): Likewise.
7690
5227d625
JB
76912014-12-15 Joel Brobecker <brobecker@adacore.com>
7692
7693 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
7694 Remove FIXME comment about assumption about N.
7695
f93b65a0
JB
76962014-12-13 Joel Brobecker <brobecker@adacore.com>
7697
7698 * configure.ac: If large-file support is disabled in GDBserver,
7699 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
7700 * configure: Regenerate.
7701
e5a9158d
AA
77022014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7703
7704 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
7705 warning upon ENODATA from ptrace.
7706 * linux-s390-low.c (s390_store_tdb): New.
7707 (s390_regsets): Add regset for NT_S390_TDB.
7708
feea5f36
AA
77092014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7710
7711 * linux-low.c (regsets_store_inferior_registers): Skip regsets
7712 without a fill_function.
7713 * linux-s390-low.c (s390_fill_last_break): Remove.
7714 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
7715 (s390_arch_setup): Use regset's size instead of fill_function for
7716 loop end condition.
7717
098dbe61
AA
77182014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7719
7720 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
7721 the regset's store function when ptrace returned an error.
7722 * regcache.c (get_thread_regcache): Invalidate register cache
7723 before fetching inferior's registers.
7724
28eef672
AA
77252014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7726
7727 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
7728 while-loop as for-loop.
7729 (regsets_store_inferior_registers): Likewise.
7730
bdca27a2
YQ
77312014-11-28 Yao Qi <yao@codesourcery.com>
7732
7733 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
7734 * config.in, configure: Re-generate.
7735 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
7736 is defined.
7737
9c232dda
YQ
77382014-11-21 Yao Qi <yao@codesourcery.com>
7739
7740 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
7741 (AC_CHECK_HEADERS): Remove malloc.h.
7742 * configure: Re-generated.
7743 * config.in: Re-generated.
7744 * server.h: Don't include alloca.h and malloc.h.
7745 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
7746 Don't include malloc.h.
7747
43968415
JB
77482014-11-17 Joel Brobecker <brobecker@adacore.com>
7749
7750 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
7751 corresponding ERRNO check in same block.
7752
40e91bc7
PA
77532014-11-12 Pedro Alves <palves@redhat.com>
7754
7755 * server.c (cont_thread): Update comment.
7756 (start_inferior, attach_inferior): No longer clear cont_thread.
7757 (handle_v_cont): No longer set cont_thread.
7758 (captured_main): Clear cont_thread each time a GDB connects.
7759
c2c118cf
PA
77602014-11-12 Pedro Alves <palves@redhat.com>
7761
7762 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
7763 thread, and don't resume all threads if the Hc thread has exited.
7764
78708b7c
PA
77652014-11-12 Pedro Alves <palves@redhat.com>
7766
7767 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
7768 the process group instead of to a specific LWP.
7769
a2abc7de
PA
77702014-10-15 Pedro Alves <palves@redhat.com>
7771
7772 PR server/17487
7773 * win32-arm-low.c (arm_set_thread_context): Remove current_event
7774 parameter.
7775 (arm_set_thread_context): Delete.
7776 (the_low_target): Adjust.
7777 * win32-i386-low.c (debug_registers_changed)
7778 (debug_registers_used): Delete.
7779 (update_debug_registers_callback): New function.
7780 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
7781 needing to update their debug registers.
7782 (win32_get_current_dr): New function.
7783 (x86_dr_low_get_addr, x86_dr_low_get_control)
7784 (x86_dr_low_get_status): Fetch the debug register from the thread
7785 record's context.
7786 (i386_initial_stuff): Adjust.
7787 (i386_get_thread_context): Remove current_event parameter. Don't
7788 clear debug_registers_changed nor copy DR values to
7789 debug_reg_state.
7790 (i386_set_thread_context): Delete.
7791 (i386_prepare_to_resume): New function.
7792 (i386_thread_added): Mark the thread as needing to update irs
7793 debug registers.
7794 (the_low_target): Remove i386_set_thread_context and install
7795 i386_prepare_to_resume.
7796 * win32-low.c (win32_get_thread_context): Adjust.
7797 (win32_set_thread_context): Use SetThreadContext
7798 directly.
7799 (win32_prepare_to_resume): New function.
7800 (win32_require_context): New function, factored out from ...
7801 (thread_rec): ... this.
7802 (continue_one_thread): Call win32_prepare_to_resume on each thread
7803 we're about to continue.
7804 (win32_resume): Call win32_prepare_to_resume on the event thread.
7805 * win32-low.h (struct win32_thread_info)
7806 <debug_registers_changed>: New field.
7807 (struct win32_target_ops): Change prototype of set_thread_context,
7808 delete set_thread_context and add prepare_to_resume.
7809 (win32_require_context): New declaration.
7810
a442d071
GB
78112014-10-08 Gary Benson <gbenson@redhat.com>
7812
7813 * server.h: Do not include common-exceptions.h.
7814
6f1947e8
GB
78152014-10-08 Gary Benson <gbenson@redhat.com>
7816
7817 * server.h: Do not include cleanups.h.
7818
63b434a4
JH
78192014-09-30 James Hogan <james.hogan@imgtec.com>
7820
7821 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
7822 mips64-dsp-linux.c.
7823
c4d9ceb6
YQ
78242014-09-23 Yao Qi <yao@codesourcery.com>
7825
7826 * linux-low.c (lp_status_maybe_breakpoint): New function.
7827 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
7828 (count_events_callback): Likewise.
7829 (select_event_lwp_callback): Likewise.
7830 (cancel_breakpoints_callback): Likewise.
7831
89a5711c
DB
78322014-09-19 Don Breazeal <donb@codesourcery.com>
7833
7834 * linux-low.c (handle_extended_wait): Call
7835 linux_ptrace_get_extended_event.
7836 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
7837 linux_is_extended_waitstatus.
7838
bffc0964
JB
78392014-09-16 Joel Brobecker <brobecker@adacore.com>
7840
7841 * Makefile.in (CPPFLAGS): Define.
7842 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
7843 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
7844
0bfdf32f
GB
78452014-09-16 Gary Benson <gbenson@redhat.com>
7846
7847 * inferiors.h (current_inferior): Renamed as...
7848 (current_thread): New variable. All uses updated.
7849 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
7850 (maybe_move_out_of_jump_pad): Likewise.
7851 (cancel_breakpoint): Likewise.
7852 (linux_low_filter_event): Likewise.
7853 (wait_for_sigstop): Likewise.
7854 (linux_resume_one_lwp): Likewise.
7855 (need_step_over_p): Likewise.
7856 (start_step_over): Likewise.
7857 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
7858 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
7859 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
7860 and save_inferior as saved_thread.
7861 * regcache.c (get_thread_regcache): Renamed saved_inferior as
7862 saved_thread.
7863 (regcache_invalidate_thread): Likewise.
7864 * remote-utils.c (prepare_resume_reply): Likewise.
7865 * thread-db.c (thread_db_get_tls_address): Likewise.
7866 (disable_thread_event_reporting): Likewise.
7867 (remove_thread_event_breakpoints): Likewise.
7868 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
7869 as saved_thread.
7870 * target.h (set_desired_inferior): Renamed as...
7871 (set_desired_thread): New declaration. All uses updated.
7872 * server.c (myresume): Updated comment to reference thread instead
7873 of inferior.
7874 (handle_serial_event): Likewise.
7875 (handle_target_event): Likewise.
7876
361c8ade
GB
78772014-09-12 Tom Tromey <tromey@redhat.com>
7878 Gary Benson <gbenson@redhat.com>
7879
7880 * regcache.h: Include common-regcache.h.
7881 (regcache_read_pc): Don't declare.
7882 * regcache.c (get_thread_regcache_for_ptid): New function.
7883
bd9269f7
GB
78842014-09-11 Tom Tromey <tromey@redhat.com>
7885 Gary Benson <gbenson@redhat.com>
7886
7887 * symbol.c: New file.
7888 * Makefile.in (SFILES): Add symbol.c.
7889 (OBS): Add symbol.o.
7890
f8c1d06b
GB
78912014-09-11 Gary Benson <gbenson@redhat.com>
7892
7893 * target.c (target_stop_ptid, target_continue_ptid): New
7894 functions.
7895
721ec300
GB
78962014-09-11 Tom Tromey <tromey@redhat.com>
7897 Gary Benson <gbenson@redhat.com>
7898
7899 * target.h: Include target/target.h.
7900 * target.c (target_read_memory, target_read_uint32)
7901 (target_write_memory): New functions.
7902
c5e92cca
GB
79032014-09-11 Gary Benson <gbenson@redhat.com>
7904
7905 * server.h (debug_hw_points): Don't declare.
7906 * server.c (debug_hw_points): Don't define. Replace all uses
7907 with show_debug_regs.
7908 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
7909 all uses with show_debug_regs.
7910
2e4bb98a
EBM
79112014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
7912
7913 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
7914 endianness into account.
7915 (ppc_supply_ptrace_register): Likewise.
7916
ac740bc7
JH
79172014-09-03 James Hogan <james.hogan@imgtec.com>
7918
7919 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
7920 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
7921
97ea6506
GB
79222014-09-03 Gary Benson <gbenson@redhat.com>
7923
7924 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
7925 ALL_DEBUG_ADDRESS_REGISTERS.
7926
df7e5265
GB
79272014-09-02 Gary Benson <gbenson@redhat.com>
7928
7929 * i386-low.h: Renamed as...
7930 * x86-low.h: New file. All type, function and variable name
7931 prefixes changed from "i386_" to "x86_". All references updated.
7932 * i386-low.c: Renamed as...
7933 * x86-low.c: New file. All type, function and variable name
7934 prefixes changed from "i386_" to "x86_". All references updated.
7935
ed859da7
GB
79362014-09-02 Gary Benson <gbenson@redhat.com>
7937
7938 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
7939 (x86_linux_new_thread): Likewise.
7940
860789c7
GB
79412014-08-29 Gary Benson <gbenson@redhat.com>
7942
7943 * server.h (setjmp.h): Do not include.
7944 (toplevel): Do not declare.
7945 (common-exceptions.h): Include.
7946 (cleanups.h): Likewise.
7947 * server.c (toplevel): Do not define.
7948 (exit_code): New static global.
7949 (detach_or_kill_for_exit_cleanup): New function.
7950 (main): New function. Original main renamed to...
7951 (captured_main): New function.
7952 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
7953
ff55e1b5
GB
79542014-08-29 Gary Benson <gbenson@redhat.com>
7955
7956 * Makefile.in (SFILES): Add common/common-exceptions.c.
7957 (OBS): Add common-exceptions.o.
7958 (common-exceptions.o): New rule.
7959 * utils.c (prepare_to_throw_exception): New function.
7960
e9bcb658
GB
79612014-08-29 Gary Benson <gbenson@redhat.com>
7962
7963 * config.in: Regenerate.
7964 * configure: Likewise.
7965
e3180625
GB
79662014-08-29 Gary Benson <gbenson@redhat.com>
7967
7968 * Makefile.in (SFILES): Add common/cleanups.c.
7969 (OBS): cleanups.o.
7970 (cleanups.o): New rule.
7971
e3d6ba5d
GB
79722014-08-29 Gary Benson <gbenson@redhat.com>
7973
7974 * utils.c (internal_vwarning): New function.
7975
7096e886
GB
79762014-08-28 Gary Benson <gbenson@redhat.com>
7977
7978 * utils.h (fatal): Remove declaration.
7979 * utils.c (fatal): Remove function.
7980
14ce3192
GB
79812014-08-28 Gary Benson <gbenson@redhat.com>
7982
7983 * tracepoint.c (gdb_agent_init): Replace fatal with
7984 perror_with_name.
7985 (initialize_tracepoint): Likewise.
7986
50278d59
GB
79872014-08-28 Gary Benson <gbenson@redhat.com>
7988
7989 * remote-utils.c (remote_prepare): Replace fatal with error.
7990
aa96c426
GB
79912014-08-28 Gary Benson <gbenson@redhat.com>
7992
7993 * linux-low.c (linux_async): Replace fatal with warning.
7994 Tidy up and return.
7995 (linux_start_non_stop): Return -1 if linux_async failed.
7996
f7160e97
GB
79972014-08-28 Gary Benson <gbenson@redhat.com>
7998
7999 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
8000 gdb_assert.
8001 (i386_dr_low_get_addr): Remove vague comment.
8002 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
8003 gdb_assert.
8004
38e08fca
GB
80052014-08-28 Gary Benson <gbenson@redhat.com>
8006
8007 * inferiors.c (get_thread_process): Replace check with gdb_assert.
8008 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
8009 internal_error.
8010 (linux_resume_one_lwp): Likewise.
8011 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
8012 gdb_assert.
8013 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
8014 with internal_error.
8015 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
8016 (init_register_cache): Replace fatal with gdb_assert_not_reached.
8017 (find_register_by_name): Replace fatal with internal_error.
8018 (find_regno): Likewise.
8019 * tdesc.c (init_target_desc): Replace check with gdb_assert.
8020 * thread-db.c (thread_db_create_event): Likewise.
8021 (thread_db_load_search): Likewise.
8022 (try_thread_db_load_1): Likewise.
8023 * tracepoint.c (get_jump_space_head): Replace fatal with
8024 internal_error.
8025 (claim_trampoline_space): Likewise.
8026 (have_fast_tracepoint_trampoline_buffer): Likewise.
8027 (cmd_qtstart): Likewise.
8028 (stop_tracing): Likewise.
8029 (fast_tracepoint_collecting): Likewise.
8030 (target_malloc): Likewise.
8031 (download_tracepoint): Likewise.
8032 (download_trace_state_variables): Replace check with gdb_assert.
8033 (upload_fast_traceframes): Replace fatal with internal_error.
8034
34abf635
GB
80352014-08-19 Tom Tromey <tromey@redhat.com>
8036 Gary Benson <gbenson@redhat.com>
8037
8038 * Makefile.in (SFILES): Add common/common-debug.c.
8039 (OBS): Add common-debug.o.
8040 (common-debug.o): New rule.
8041 * debug.h (debug_printf): Don't declare.
8042 * debug.c (debug_printf): Renamed and rewritten as...
8043 (debug_vprintf): New function.
8044
f6e94d78
GB
80452014-08-19 Gary Benson <gbenson@redhat.com>
8046
8047 * utils.h: Do not include print-utils.h.
8048
9239eeab
GB
80492014-08-19 Tom Tromey <tromey@redhat.com>
8050 Gary Benson <gbenson@redhat.com>
8051
8052 * server.h: Add static assertion.
8053 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
8054
ef87c8bb
GB
80552014-08-19 Tom Tromey <tromey@redhat.com>
8056 Gary Benson <gbenson@redhat.com>
8057
8058 * Makefile.in (SFILES): Add common/errors.c.
8059 (OBS): Add errors.o.
8060 (IPA_OBS): Add errors-ipa.o.
8061 (errors.o): New rule.
8062 (errors-ipa.o): Likewise.
8063 * utils.h (perror_with_name, error, warning): Don't declare.
8064 * utils.c (warning): Renamed and rewritten as...
8065 (vwarning): New function.
8066 (error): Renamed and rewritten as...
8067 (verror): New function.
8068 (internal_error): Renamed and rewritten as...
8069 (internal_verror): New function.
8070
bb974a24
GB
80712014-08-07 Gary Benson <gbenson@redhat.com>
8072
8073 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
8074 * configure: Regenerate.
8075 * config.in: Likewise.
8076 * server.h: Do not include errno.h.
8077 * event-loop.c: Likewise.
8078 * hostio-errno.c: Likewise.
8079 * linux-low.c: Likewise.
8080 * remote-utils.c: Likewise.
8081 * spu-low.c: Likewise.
8082 * utils.c: Likewise.
8083 * gdbreplay.c: Unconditionally include errno.h.
8084
6d3d12eb
GB
80852014-08-07 Gary Benson <gbenson@redhat.com>
8086
8087 * server.h: Do not include string.h.
8088 * event-loop.c: Likewise.
8089 * linux-low.c: Likewise.
8090 * regcache.c: Likewise.
8091 * remote-utils.c: Likewise.
8092 * spu-low.c: Likewise.
8093 * utils.c: Likewise.
8094
dccbb609
GB
80952014-08-07 Gary Benson <gbenson@redhat.com>
8096
8097 * server.h: Do not include gdb_assert.h.
8098
e76df0d0
GB
80992014-08-07 Gary Benson <gbenson@redhat.com>
8100
8101 * server.h: Do not include common-utils.h.
8102
4cb9c816
GB
81032014-08-07 Gary Benson <gbenson@redhat.com>
8104
8105 * server.h: Do not include ptid.h.
8106 * notif.h: Likewise.
8107
3995eeee
GB
81082014-08-07 Gary Benson <gbenson@redhat.com>
8109
8110 * server.h: Do not include gdb_locale.h.
8111
cb9f1a9b
GB
81122014-08-07 Gary Benson <gbenson@redhat.com>
8113
8114 * server.h: Do not include gdb/signals.h.
8115 * win32-low.c: Likewise.
8116
a5fceff8
GB
81172014-08-07 Gary Benson <gbenson@redhat.com>
8118
8119 * server.h: Do not include pathmax.h.
8120
b9391142
GB
81212014-08-07 Gary Benson <gbenson@redhat.com>
8122
8123 * server.h: Do not include libiberty.h.
8124 * linux-bfin-low.c: Likewise.
8125
0e443c87
GB
81262014-08-07 Gary Benson <gbenson@redhat.com>
8127
8128 * server.h: Do not include ansidecl.h.
8129
8ebb3f56
GB
81302014-08-07 Gary Benson <gbenson@redhat.com>
8131
8132 * linux-x86-low.c: Do not include stddef.h.
8133 * lynx-ppc-low.c: Likewise.
8134 * tracepoint.c: Likewise.
8135
8980bdf6
GB
81362014-08-07 Gary Benson <gbenson@redhat.com>
8137
8138 * server.h: Do not include stdarg.h.
8139 * nto-low.c: Likewise.
8140
d7096f71
GB
81412014-08-07 Gary Benson <gbenson@redhat.com>
8142
8143 * server.h: Do not include stdlib.h.
8144 * inferiors.c: Likewise.
8145 * linux-low.c: Likewise.
8146 * regcache.c: Likewise.
8147 * spu-low.c: Likewise.
8148 * tracepoint.c: Likewise.
8149 * utils.c: Likewise.
8150
d02f550d
GB
81512014-08-07 Gary Benson <gbenson@redhat.com>
8152
8153 * server.h: Do not include stdio.h.
8154 * linux-low.c: Likewise.
8155 * remote-utils.c: Likewise.
8156 * spu-low.c: Likewise.
8157 * utils.c: Likewise.
8158 * wincecompat.c: Likewise.
8159
87f6c4e3
GB
81602014-08-06 Gary Benson <gbenson@redhat.com>
8161
8162 * regcache.c (init_register_cache): Move conditionals inside if.
8163
7089dca4
GB
81642014-08-06 Gary Benson <gbenson@redhat.com>
8165
8166 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
8167
462f517e
GB
81682014-07-31 Gary Benson <gbenson@redhat.com>
8169
8170 * ax.h: Do not include server.h.
8171 * gdbthread.h: Likewise.
8172 * lynx-low.h: Likewise.
8173 * notif.h: Likewise.
8174
976411d6
GB
81752014-07-30 Gary Benson <gbenson@redhat.com>
8176
8177 * server.h: Include common-defs.h.
8178 Do not include config.h or build-gnulib-gdbserver/config.h.
8179
d41f6d8e
GB
81802014-07-30 Gary Benson <gbenson@redhat.com>
8181
8182 * hostio-errno.c: Move server.h to top of includes list.
8183 * inferiors.c: Likewise.
8184 * linux-x86-low.c: Likewise.
8185 * notif.c: Include server.h.
8186
314c6a35
TT
81872014-07-24 Tom Tromey <tromey@redhat.com>
8188 Gary Benson <gbenson@redhat.com>
8189
8190 * server.h (CORE_ADDR): Now unsigned.
8191
69ff6be5
PA
81922014-07-16 Pedro Alves <palves@redhat.com>
8193
8194 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
8195
ce9e3fe7
PA
81962014-07-15 Pedro Alves <palves@redhat.com>
8197
8198 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
8199 copy.
8200
e76126e8
PA
82012014-07-11 Pedro Alves <palves@redhat.com>
8202
8203 * linux-low.c (kill_wait_lwp): New function, based on
8204 kill_one_lwp_callback, but use my_waitpid directly.
8205 (kill_one_lwp_callback, linux_kill): Use it.
8206
8e9db26e
PA
82072014-06-23 Pedro Alves <palves@redhat.com>
8208
8209 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
8210 before setting DR0..DR3.
8211
698b3e08
GB
82122014-06-20 Gary Benson <gbenson@redhat.com>
8213
8214 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
8215 * configure: Regenerated.
8216 * config.in: Likewise.
8217
125f8a3d
GB
82182014-06-20 Gary Benson <gbenson@redhat.com>
8219
8220 * Makefile.in (SFILES): Update locations for files moved
8221 from common to nat.
8222 (object file files): Reordered.
8223
42995dbd
GB
82242014-06-20 Gary Benson <gbenson@redhat.com>
8225
8226 * i386-low.h (i386_dr_low_can_set_addr): Removed.
8227 (i386_dr_low_set_addr): Likewise.
8228 (i386_dr_low_get_addr): Likewise.
8229 (i386_dr_low_can_set_control): Likewise.
8230 (i386_dr_low_set_control): Likewise.
8231 (i386_dr_low_get_control): Likewise.
8232 (i386_dr_low_get_status): Likewise.
8233 (i386_get_debug_register_length): Likewise.
8234 * linux-x86-low.c (i386_dr_low_set_addr):
8235 Changed signature. Made static.
8236 (i386_dr_low_get_addr): Likewise.
8237 (i386_dr_low_set_control): Likewise.
8238 (i386_dr_low_get_control): Likewise.
8239 (i386_dr_low_get_status): Likewise.
8240 (i386_dr_low): New global variable.
8241 * win32-i386-low.c (i386_dr_low_set_addr):
8242 Changed signature. Made static.
8243 (i386_dr_low_get_addr): Likewise.
8244 (i386_dr_low_set_control): Likewise.
8245 (i386_dr_low_get_control): Likewise.
8246 (i386_dr_low_get_status): Likewise.
8247 (i386_dr_low): New global variable.
8248
e1d2394b
MS
82492014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
8250
8251 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
8252 * Makefile.in (AR, AR_FLAGS): Define.
8253 * configure: Regenerate.
8254
3a8ee006
GB
82552014-06-19 Gary Benson <gbenson@redhat.com>
8256
8257 * Makefile.in (i386-dregs.o): New rule.
8258 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
8259 * i386-low.c (target.h): Remove include.
8260 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
8261 (DR_CONTROL_SHIFT): Likewise.
8262 (DR_CONTROL_SIZE): Likewise.
8263 (DR_RW_EXECUTE): Likewise.
8264 (DR_RW_WRITE): Likewise.
8265 (DR_RW_READ): Likewise.
8266 (DR_RW_IORW): Likewise.
8267 (DR_LEN_1): Likewise.
8268 (DR_LEN_2): Likewise.
8269 (DR_LEN_4): Likewise.
8270 (DR_LEN_8): Likewise.
8271 (DR_LOCAL_ENABLE_SHIFT): Likewise.
8272 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
8273 (DR_ENABLE_SIZE): Likewise.
8274 (DR_LOCAL_SLOWDOWN): Likewise.
8275 (DR_GLOBAL_SLOWDOWN): Likewise.
8276 (DR_CONTROL_RESERVED): Likewise.
8277 (I386_DR_CONTROL_MASK): Likewise.
8278 (I386_DR_VACANT): Likewise.
8279 (I386_DR_LOCAL_ENABLE): Likewise.
8280 (I386_DR_GLOBAL_ENABLE): Likewise.
8281 (I386_DR_DISABLE): Likewise.
8282 (I386_DR_SET_RW_LEN): Likewise.
8283 (I386_DR_GET_RW_LEN): Likewise.
8284 (I386_DR_WATCH_HIT): Likewise.
8285 (i386_wp_op_t): Likewise.
8286 (i386_show_dr): Likewise.
8287 (i386_length_and_rw_bits): Likewise.
8288 (i386_insert_aligned_watchpoint): Likewise.
8289 (i386_remove_aligned_watchpoint): Likewise.
8290 (i386_handle_nonaligned_watchpoint): Likewise.
8291 i386_update_inferior_debug_regs(): Likewise.
8292 (i386_dr_insert_watchpoint): Likewise.
8293 (i386_dr_remove_watchpoint): Likewise.
8294 (i386_dr_region_ok_for_watchpoint): Likewise.
8295 (i386_dr_stopped_data_address): Likewise.
8296 (i386_dr_stopped_by_watchpoint): Likewise.
8297
8f26655c
GB
82982014-06-19 Gary Benson <gbenson@redhat.com>
8299
8300 * i386-low.c (i386_dr_show): Renamed to
8301 i386_show_dr and made static. All uses updated.
8302 (i386_dr_length_and_rw_bits): Renamed to
8303 i386_length_and_rw_bits and made static.
8304 All uses updated.
8305 (i386_dr_insert_aligned_watchpoint): Renamed to
8306 i386_insert_aligned_watchpoint and made static.
8307 All uses updated.
8308 (i386_dr_remove_aligned_watchpoint): Renamed to
8309 i386_remove_aligned_watchpoint and made static.
8310 All uses updated.
8311 (i386_dr_update_inferior_debug_regs): Renamed to
8312 i386_update_inferior_debug_regs and made static.
8313 All uses updated.
8314
b9228891
GB
83152014-06-18 Gary Benson <gbenson@redhat.com>
8316
5171def3
GB
8317 * i386-low.h (i386_dr_low_can_set_addr): New macro.
8318 (i386_dr_low_can_set_control): Likewise.
8319 (i386_get_debug_register_length): Likewise.
8320 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
8321 (i386_dr_low_can_set_control): Likewise.
8322 (i386_get_debug_register_length): Likewise.
8323
83242014-06-17 Gary Benson <gbenson@redhat.com>
8325
b9228891
GB
8326 * i386-low.h (i386-dregs.h): New include.
8327 (DR_FIRSTADDR): Now in i386-dregs.h.
8328 (DR_LASTADDR): Likewise.
8329 (DR_NADDR): Likewise.
8330 (DR_STATUS): Likewise.
8331 (DR_CONTROL): Likewise.
8332 (i386_debug_reg_state): Likewise.
8333 (i386_dr_insert_watchpoint): Likewise.
8334 (i386_dr_remove_watchpoint): Likewise.
8335 (i386_dr_region_ok_for_watchpoint): Likewise.
8336 (i386_dr_stopped_data_address): Likewise.
8337 (i386_dr_stopped_by_watchpoint): Likewise.
8338 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
8339
4be83cc2
GB
83402014-06-18 Gary Benson <gbenson@redhat.com>
8341
8342 * i386-low.h (i386_low_insert_watchpoint): Renamed to
8343 i386_dr_insert_watchpoint.
8344 (i386_low_remove_watchpoint): Renamed to
8345 i386_dr_remove_watchpoint.
8346 (i386_low_region_ok_for_watchpoint): Renamed to
8347 i386_dr_region_ok_for_watchpoint.
8348 (i386_low_stopped_data_address): Renamed to
8349 i386_dr_stopped_data_address.
8350 (i386_low_stopped_by_watchpoint): Renamed to
8351 i386_dr_stopped_by_watchpoint.
8352 * i386-low.c (i386_show_dr): Renamed to
8353 i386_dr_show and made nonstatic. All uses updated.
8354 (i386_length_and_rw_bits): Renamed to
8355 i386_dr_length_and_rw_bits and made nonstatic.
8356 All uses updated.
8357 (i386_insert_aligned_watchpoint): Renamed to
8358 i386_dr_insert_aligned_watchpoint and made nonstatic.
8359 All uses updated.
8360 (i386_remove_aligned_watchpoint): Renamed to
8361 i386_dr_remove_aligned_watchpoint and made nonstatic.
8362 All uses updated.
8363 (i386_update_inferior_debug_regs): Renamed to
8364 i386_dr_update_inferior_debug_regs and made nonstatic.
8365 All uses updated.
8366 (i386_low_insert_watchpoint): Renamed to
8367 i386_dr_insert_watchpoint. All uses updated.
8368 (i386_low_remove_watchpoint): Renamed to
8369 i386_dr_remove_watchpoint. All uses updated.
8370 (i386_low_region_ok_for_watchpoint): Renamed to
8371 i386_dr_region_ok_for_watchpoint. All uses updated.
8372 (i386_low_stopped_data_address): Renamed to
8373 i386_dr_stopped_data_address. All uses updated.
8374 (i386_low_stopped_by_watchpoint): Renamed to
8375 i386_dr_stopped_by_watchpoint. All uses updated.
8376
131aa0d4
GB
83772014-06-18 Gary Benson <gbenson@redhat.com>
8378
8379 * i386-low.c (i386_dr_low_can_set_addr): New macro.
8380 (i386_dr_low_can_set_control): Likewise.
8381 (i386_insert_aligned_watchpoint): New check.
8382
d9305f7f
GB
83832014-06-18 Gary Benson <gbenson@redhat.com>
8384
8385 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
8386 Renamed to state.
8387
e927c9fc
GB
83882014-06-18 Gary Benson <gbenson@redhat.com>
8389
8390 * i386-low.c (i386_length_and_rw_bits): Use internal_error
8391 instead of fatal and error.
8392 (i386_handle_nonaligned_watchpoint): Likewise.
8393
1b6d4134
GB
83942014-06-18 Gary Benson <gbenson@redhat.com>
8395
8396 * i386-low.c (i386_get_debug_register_length): New macro.
8397 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
8398 (i386_show_dr): Use debug_printf instead of fprintf. Use
8399 phex to format values.
8400
6e62758f
GB
84012014-06-18 Gary Benson <gbenson@redhat.com>
8402
8403 * i386-low.h: Comment changes.
8404 * i386-low.c: Likewise.
8405
fc6e2f03
GB
84062014-06-18 Gary Benson <gbenson@redhat.com>
8407
8408 * i386-low.c: Whitespace changes.
8409
f9d1eeed
TT
84102014-06-12 Tom Tromey <tromey@redhat.com>
8411
8412 * utils.c (freeargv): Remove.
8413
0b04e523
TT
84142014-06-12 Tom Tromey <tromey@redhat.com>
8415
8416 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
8417 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
8418 (parse_debug_format_options): Likewise.
8419 (gdbserver_usage): Likewise.
8420 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
8421 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
8422 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
8423 against libiberty.
8424 ($(LIBGNU)): Depend on libiberty.
8425 (all-lib): Recurse into all subdirs.
8426 (install-only): Invoke "install" target in subdirs.
8427 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
8428 targets.
8429 * configure: Rebuild.
8430 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
8431 for vasprintf, vsnprintf, or gettimeofday.
8432 * configure.srv: Don't add safe-ctype.o or lbasename.o to
8433 srv_tgtobj.
8434
270c9937
JB
84352014-06-05 Joel Brobecker <brobecker@adacore.com>
8436
8437 * development.sh: Delete.
8438 * Makefile.in (config.status): Adjust dependency on development.sh.
8439 * configure.ac: Adjust development.sh source call.
8440 * configure: Regenerate.
8441
0a261ed8
PA
84422014-06-02 Pedro Alves <palves@redhat.com>
8443
8444 * ax.c (gdb_free_agent_expr): New function.
8445 * ax.h (gdb_free_agent_expr): New declaration.
8446 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
8447 list.
8448 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
8449 static.
8450 (clear_breakpoint_conditions_and_commands): New function.
8451 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
8452 (clear_breakpoint_conditions_and_commands): New declaration.
8453
e9dae05e
RR
84542014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
8455
8456 * linux-aarch64-low.c (asm/ptrace.h): Include.
8457
5876f503
JK
84582014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
8459
8460 Fix TLS access for -static -pthread.
8461 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
8462 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
8463 (thread_db_load_search, try_thread_db_load_1): Initialize it.
8464
802e8e6d
PA
84652014-05-20 Pedro Alves <palves@redhat.com>
8466
8467 * linux-aarch64-low.c (aarch64_insert_point)
8468 (aarch64_remove_point): No longer check whether the type is
8469 supported here. Adjust to new interface.
8470 (the_low_target): Install aarch64_supports_z_point_type as
8471 supports_z_point_type method.
8472 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
8473 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
8474 instead of a Z packet char. Adjust.
8475 (arm_supports_z_point_type): New function.
8476 (arm_insert_point, arm_remove_point): Adjust to new interface.
8477 (the_low_target): Install arm_supports_z_point_type.
8478 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
8479 (cris_insert_point, cris_remove_point): Adjust to new interface.
8480 Don't check whether the type is supported here.
8481 (the_low_target): Install cris_supports_z_point_type.
8482 * linux-low.c (linux_supports_z_point_type): New function.
8483 (linux_insert_point, linux_remove_point): Adjust to new interface.
8484 * linux-low.h (struct linux_target_ops) <insert_point,
8485 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
8486 raw_breakpoint pointer parameter.
8487 <supports_z_point_type>: New method.
8488 * linux-mips-low.c (mips_supports_z_point_type): New function.
8489 (mips_insert_point, mips_remove_point): Adjust to new interface.
8490 Use mips_supports_z_point_type.
8491 (the_low_target): Install mips_supports_z_point_type.
8492 * linux-ppc-low.c (the_low_target): Install NULL as
8493 supports_z_point_type method.
8494 * linux-s390-low.c (the_low_target): Install NULL as
8495 supports_z_point_type method.
8496 * linux-sparc-low.c (the_low_target): Install NULL as
8497 supports_z_point_type method.
8498 * linux-x86-low.c (x86_supports_z_point_type): New function.
8499 (x86_insert_point): Adjust to new insert_point interface. Use
8500 insert_memory_breakpoint. Adjust to new
8501 i386_low_insert_watchpoint interface.
8502 (x86_remove_point): Adjust to remove_point interface. Use
8503 remove_memory_breakpoint. Adjust to new
8504 i386_low_remove_watchpoint interface.
8505 (the_low_target): Install x86_supports_z_point_type.
8506 * lynx-low.c (lynx_target_ops): Install NULL as
8507 supports_z_point_type callback.
8508 * nto-low.c (nto_supports_z_point_type): New.
8509 (nto_insert_point, nto_remove_point): Adjust to new interface.
8510 (nto_target_ops): Install nto_supports_z_point_type.
8511 * mem-break.c: Adjust intro comment.
8512 (struct raw_breakpoint) <raw_type, size>: New fields.
8513 <inserted>: Update comment.
8514 <shlib_disabled>: Delete field.
8515 (enum bkpt_type) <gdb_breakpoint>: Delete value.
8516 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
8517 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
8518 (raw_bkpt_type_to_target_hw_bp_type): New function.
8519 (find_enabled_raw_code_breakpoint_at): New function.
8520 (find_raw_breakpoint_at): New type and size parameters. Use them.
8521 (insert_memory_breakpoint): New function, based off
8522 set_raw_breakpoint_at.
8523 (remove_memory_breakpoint): New function.
8524 (set_raw_breakpoint_at): Reimplement.
8525 (set_breakpoint): New, based on set_breakpoint_at.
8526 (set_breakpoint_at): Reimplement.
8527 (delete_raw_breakpoint): Go through the_target->remove_point
8528 instead of assuming memory breakpoints.
8529 (find_gdb_breakpoint_at): Delete.
8530 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
8531 (find_gdb_breakpoint): New function.
8532 (set_gdb_breakpoint_at): Delete.
8533 (z_type_supported): New function.
8534 (set_gdb_breakpoint_1): New function, loosely based off
8535 set_gdb_breakpoint_at.
8536 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
8537 (delete_gdb_breakpoint_at): Delete.
8538 (delete_gdb_breakpoint_1): New function, loosely based off
8539 delete_gdb_breakpoint_at.
8540 (delete_gdb_breakpoint): New function.
8541 (clear_gdb_breakpoint_conditions): Rename to ...
8542 (clear_breakpoint_conditions): ... this. Don't handle a NULL
8543 breakpoint.
8544 (add_condition_to_breakpoint): Make static.
8545 (add_breakpoint_condition): Take a struct breakpoint pointer
8546 instead of an address. Adjust.
8547 (gdb_condition_true_at_breakpoint): Rename to ...
8548 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
8549 z_type parameter.
8550 (gdb_condition_true_at_breakpoint): Reimplement.
8551 (add_breakpoint_commands): Take a struct breakpoint pointer
8552 instead of an address. Adjust.
8553 (gdb_no_commands_at_breakpoint): Rename to ...
8554 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
8555 parameter. Return true if no breakpoint was found. Change debug
8556 output.
8557 (gdb_no_commands_at_breakpoint): Reimplement.
8558 (run_breakpoint_commands): Rename to ...
8559 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
8560 and change return type to boolean.
8561 (run_breakpoint_commands): New function.
8562 (gdb_breakpoint_here): Also check for Z1 breakpoints.
8563 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
8564 breakpoint. Go through the_target->remove_point instead of
8565 assuming memory breakpoint.
8566 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
8567 software and hardware breakpoints.
8568 (reinsert_raw_breakpoint): Go through the_target->insert_point
8569 instead of assuming memory breakpoint.
8570 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
8571 software and hardware breakpoints.
8572 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
8573 Check both software and hardware breakpoints.
8574 (validate_inserted_breakpoint): Assert the breakpoint is a
8575 software breakpoint. Set the inserted flag to -1 instead of
8576 setting shlib_disabled.
8577 (delete_disabled_breakpoints): Adjust.
8578 (validate_breakpoints): Only validate software breakpoints.
8579 Adjust to inserted flag change.
8580 (check_mem_read, check_mem_write): Skip breakpoint types other
8581 than software breakpoints. Adjust to inserted flag change.
8582 * mem-break.h (enum raw_bkpt_type): New enum.
8583 (raw_breakpoint, struct process_info): Forward declare.
8584 (Z_packet_to_target_hw_bp_type): Delete declaration.
8585 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
8586 (set_gdb_breakpoint, delete_gdb_breakpoint)
8587 (clear_breakpoint_conditions): New declarations.
8588 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
8589 (breakpoint_inserted_here): Update comment.
8590 (add_breakpoint_condition, add_breakpoint_commands): Replace
8591 address parameter with a breakpoint pointer parameter.
8592 (gdb_breakpoint_here): Update comment.
8593 (delete_gdb_breakpoint_at): Delete.
8594 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
8595 * server.c (process_point_options): Take a struct breakpoint
8596 pointer instead of an address. Adjust.
8597 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
8598 delete_gdb_breakpoint.
8599 * spu-low.c (spu_target_ops): Install NULL as
8600 supports_z_point_type method.
8601 * target.h: Include mem-break.h.
8602 (struct target_ops) <prepare_to_access_memory>: Update comment.
8603 <supports_z_point_type>: New field.
8604 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
8605 instead of a char. Also take a raw breakpoint pointer.
8606 * win32-arm-low.c (the_low_target): Install NULL as
8607 supports_z_point_type.
8608 * win32-i386-low.c (i386_supports_z_point_type): New function.
8609 (i386_insert_point, i386_remove_point): Adjust to new interface.
8610 (the_low_target): Install i386_supports_z_point_type.
8611 * win32-low.c (win32_supports_z_point_type): New function.
8612 (win32_insert_point, win32_remove_point): Adjust to new interface.
8613 (win32_target_ops): Install win32_supports_z_point_type.
8614 * win32-low.h (struct win32_target_ops):
8615 <supports_z_point_type>: New method.
8616 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
8617 instead of a char. Also take a raw breakpoint pointer.
8618
932539e3
PA
86192014-05-20 Pedro Alves <palves@redhat.com>
8620
8621 * mem-break.h: Include break-common.h.
8622 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
8623 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
8624 (Z_packet_to_target_hw_bp_type): New declaration.
8625 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
8626 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
8627 (Z_PACKET_ACCESS_WP): Delete macros.
8628 (Z_packet_to_hw_type): Delete function.
8629 * i386-low.h: Don't include break-common.h here.
8630 (Z_packet_to_hw_type): Delete declaration.
8631 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
8632 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
8633 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
8634 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
8635 * linux-aarch64-low.c: Don't include break-common.h here.
8636 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
8637 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
8638 (Z_packet_to_target_hw_bp_type): Delete function.
8639 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
8640 function.
8641 (mips_insert_point, mips_remove_point): Use
8642 Z_packet_to_target_hw_bp_type.
8643
4ff0d3d8
PA
86442014-05-20 Pedro Alves <palves@redhat.com>
8645
8646 * linux-aarch64-low.c: Include break-common.h.
8647 (enum target_point_type): Delete.
8648 (Z_packet_to_point_type): Rename to ...
8649 (Z_packet_to_target_hw_bp_type): ... this, and return a
8650 target_hw_bp_type instead.
8651 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
8652 instead of an enum target_point_type.
8653 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
8654 breakpoint type.
8655 (aarch64_dr_state_insert_one_point)
8656 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
8657 (aarch64_handle_aligned_watchpoint)
8658 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
8659 Take an enum target_hw_bp_type instead of an enum
8660 target_point_type.
8661 (aarch64_supports_z_point_type): New function.
8662 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
8663 use Z_packet_to_target_hw_bp_type.
8664
786dc519
JB
86652014-05-20 Joel Brobecker <brobecker@adacore.com>
8666
8667 * configure.ac: Only use -Werror by default when DEVELOPMENT
8668 is true.
8669 * configure: Regenerate.
8670
9e0aa64f
JK
86712014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
8672
8673 Fix gdbserver qGetTLSAddr for x86_64 -m32.
8674 * linux-x86-low.c (X86_64_USER_REGS): New.
8675 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
8676
2b577b92
YQ
86772014-04-28 Yao Qi <yao@codesourcery.com>
8678
8679 * Makefile.in (i386-avx512.c): Fix the typo of generated file
8680 name.
8681
94611da2
PA
86822014-04-25 Pedro Alves <palves@redhat.com>
8683
8684 PR server/16255
8685 * linux-low.c (linux_attach_fail_reason_string): New function.
8686 (linux_attach_lwp): Delete.
8687 (linux_attach_lwp_1): Rename to ...
8688 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
8689 argument. Remove "initial" parameter. Return int instead of
8690 void. Don't error or warn here.
8691 (linux_attach): Adjust to call linux_attach_lwp. Call error on
8692 failure to attach to the tgid. Call warning when failing to
8693 attach to an lwp.
8694 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
8695 argument. Remove "initial" parameter. Return int instead of
8696 void. Don't error or warn here.
8697 (linux_attach_fail_reason_string): New declaration.
8698 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
8699 interface change. Use linux_attach_fail_reason_string.
8700
01f9f808
MS
87012014-04-24 Michael Sturm <michael.sturm@mintel.com>
8702 Walfred Tedeschi <walfred.tedeschi@intel.com>
8703
8704 * Makefile.in: Added rules to handle new files
8705 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
8706 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
8707 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
8708 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
8709 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
8710 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
8711 x32-avx512-linux.o.
8712 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
8713 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
8714 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
8715 i386/x32-avx512.xml.
8716 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
8717 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
8718 i386/x32-avx512-linux.xml.
8719 * i387-fp.c (num_avx512_k_registers): New constant for number
8720 of K registers.
8721 (num_avx512_zmmh_low_registers): New constant for number of
8722 lower ZMM registers (0-15).
8723 (num_avx512_zmmh_high_registers): New constant for number of
8724 higher ZMM registers (16-31).
8725 (num_avx512_ymmh_registers): New contant for number of higher
8726 YMM registers (ymm16-31 added by avx521 on x86_64).
8727 (num_avx512_xmm_registers): New constant for number of higher
8728 XMM registers (xmm16-31 added by AVX512 on x86_64).
8729 (struct i387_xsave): Add space for AVX512 registers.
8730 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
8731 Add code to handle AVX512 registers.
8732 (i387_xsave_to_cache): Add code to handle AVX512 registers.
8733 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
8734 prototypei from generated file.
8735 (tdesc_amd64_avx512_linux): Likewise.
8736 (init_registers_x32_avx512_linux): Likewise.
8737 (tdesc_x32_avx512_linux): Likewise.
8738 (init_registers_i386_avx512_linux): Likewise.
8739 (tdesc_i386_avx512_linux): Likewise.
8740 (x86_64_regmap): Add AVX512 registers.
8741 (x86_linux_read_description): Add code to handle AVX512 XSTATE
8742 mask.
8743 (initialize_low_arch): Add code to initialize AVX512 registers.
8744
51aa91f9
PA
87452014-04-23 Pedro Alves <palves@redhat.com>
8746
8747 * mem-break.c (find_gdb_breakpoint_at): Make static.
8748 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
8749
a4165e94
PA
87502014-04-23 Pedro Alves <palves@redhat.com>
8751
8752 * i386-low.c: Don't include break-common.h here.
8753 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
8754 prototype to take target_hw_bp_type as argument instead of a Z
8755 packet char.
8756 * i386-low.h: Include break-common.h here.
8757 (Z_packet_to_hw_type): Declare.
8758 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
8759 prototypes.
8760 * linux-x86-low.c (x86_insert_point): Convert the packet number to
8761 a target_hw_bp_type before calling i386_low_insert_watchpoint.
8762 (x86_remove_point): Convert the packet number to a
8763 target_hw_bp_type before calling i386_low_remove_watchpoint.
8764 * win32-i386-low.c (i386_insert_point): Convert the packet number
8765 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
8766 (i386_remove_point): Convert the packet number to a
8767 target_hw_bp_type before calling i386_low_remove_watchpoint.
8768
b8acf843
PA
87692014-04-23 Pedro Alves <palves@redhat.com>
8770
8771 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
8772
d708bcd1
PA
87732014-04-10 Pedro Alves <palves@redhat.com>
8774
8775 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
8776 Check if the condition or command is NULL before checking if the
8777 breakpoint is known. On success, return true.
8778 * mem-break.h (add_breakpoint_condition): Document return.
8779 (add_breakpoint_commands): Add describing comment.
8780 * server.c (skip_to_semicolon): New function.
8781 (process_point_options): Use it.
8782
2eec7d5b
PA
87832014-04-09 Pedro Alves <palves@redhat.com>
8784
8785 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
8786 to lwpid_of.
8787
fa96cb38
PA
87882014-02-27 Pedro Alves <palves@redhat.com>
8789
8790 PR 12702
8791 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
8792 macros.
8793 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
8794 output.
8795 (last_thread_of_process_p): Take a PID argument instead of a
8796 thread pointer.
8797 (linux_wait_for_lwp): Delete.
8798 (num_lwps, check_zombie_leaders, not_stopped_callback): New
8799 functions.
8800 (linux_low_filter_event): New function, party factored out from
8801 linux_wait_for_event.
8802 (linux_wait_for_event): Rename to ...
8803 (linux_wait_for_event_filtered): ... this. Add new filter ptid
8804 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
8805 sigsuspend. Check for zombie leaders.
8806 (linux_wait_for_event): Reimplement as wrapper around
8807 linux_wait_for_event_filtered.
8808 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
8809 a normal or signal exit is seen, it's the whole process exiting.
8810 (wait_for_sigstop): No longer a for_each_inferior callback.
8811 Rewrite on top of linux_wait_for_event_filtered.
8812 (stop_all_lwps): Call wait_for_sigstop directly.
8813 * server.c (resume, handle_target_event): Handle
8814 TARGET_WAITKIND_NO_RESUMED.
8815
d763de10
JB
88162014-02-26 Joel Brobecker <brobecker@adacore.com>
8817
8818 * win32-low.c (psapi_get_dll_name,
8819 * win32_CreateToolhelp32Snapshot): Delete.
8820 (win32_CreateToolhelp32Snapshot, win32_Module32First)
8821 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
8822 Delete.
8823 (handle_load_dll): Add function description.
8824 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
8825
850a0f76
JB
88262014-02-26 Joel Brobecker <brobecker@adacore.com>
8827
8828 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
8829 Add comment.
8830 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
8831 base address when calling win32_add_one_solib.
8832 (handle_load_dll): Delete local variable load_addr.
8833 Remove 0x1000 offset applied to DLL base address when calling
8834 win32_add_one_solib.
8835 (handle_unload_dll): Add comment.
8836
f25b3fc3
JB
88372014-02-26 Joel Brobecker <brobecker@adacore.com>
8838
8839 * win32-low.c (win32_add_all_dlls): Renames
8840 win32_ensure_ntdll_loaded. Rewrite function documentation.
8841 Adjust implementation to always load all DLLs.
8842 Add 0x1000 offset to DLL base address when calling
8843 win32_add_one_solib.
8844 (child_initialization_done): New static global.
8845 (do_initial_child_stuff): Set child_initialization_done to
8846 zero during child initialization, and 1 after. Replace call
8847 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
8848 Add comment.
8849 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
8850 (handle_unload_dll): Add function documentation.
8851 (get_child_debug_event): Ignore load and unload DLL events
8852 during child initialization.
8853
d86d4aaf
DE
88542014-02-20 Doug Evans <dje@google.com>
8855
3bc32da3 8856 Remove global all_lwps.
d86d4aaf
DE
8857 * inferiors.h (ptid_of): Move here from linux-low.h.
8858 (pid_of, lwpid_of): Ditto.
8859 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
8860 parameter is a struct thread_info * now.
8861 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
8862 directly. Pass &all_threads to find_inferior instead of &all_lwps.
8863 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
8864 directly.
8865 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
8866 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
8867 * linux-arm-low.c (update_registers_callback): Update, "entry"
8868 parameter is a struct thread_info * now.
8869 Fetch lwpid from current_inferior directly.
8870 (arm_insert_point): Pass &all_threads to find_inferior instead of
8871 &all_lwps.
8872 (arm_remove_point): Ditto.
8873 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
8874 (arm_prepare_to_resume): Fetch pid from thread.
8875 (arm_read_description): Fetch lwpid from current_inferior directly.
8876 * linux-low.c (all_lwps): Delete.
8877 (delete_lwp): Delete call to remove_inferior.
8878 (handle_extended_wait): Fetch lwpid from thread.
8879 (add_lwp): Don't set lwp->entry.id. Remove call to
8880 add_inferior_to_list.
8881 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
8882 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
8883 (kill_one_lwp_callback): Ditto.
8884 (linux_kill): Don't dereference NULL pointer.
8885 Fetch ptid,lwpid from thread.
8886 (get_detach_signal): Fetch ptid from thread.
8887 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
8888 Simplify call to regcache_invalidate_thread.
8889 (delete_lwp_callback): Update, "entry" parameter is a
8890 struct thread_info * now. Fetch pid from thread.
8891 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
8892 (status_pending_p_callback): Update, "entry" parameter is a
8893 struct thread_info * now. Fetch ptid from thread.
8894 (find_lwp_pid): Update, "entry" parameter is a
8895 struct thread_info * now.
8896 (linux_wait_for_lwp): Fetch pid from thread.
8897 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
8898 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
8899 (enqueue_one_deferred_signal): Fetch lwpid from thread.
8900 (dequeue_one_deferred_signal): Ditto.
8901 (cancel_breakpoint): Fetch ptid from current_inferior.
8902 (linux_wait_for_event): Pass &all_threads to find_inferior,
8903 not &all_lwps. Fetch ptid, lwpid from thread.
8904 (count_events_callback): Update, "entry" parameter is a
8905 struct thread_info * now.
8906 (select_singlestep_lwp_callback): Ditto.
8907 (select_event_lwp_callback): Ditto.
8908 (cancel_breakpoints_callback): Ditto.
8909 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
8910 not &all_lwps.
8911 (select_event_lwp): Ditto. Fetch ptid from event_thread.
8912 (unsuspend_one_lwp): Update, "entry" parameter is a
8913 struct thread_info * now.
8914 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
8915 not &all_lwps.
8916 (linux_stabilize_threads): Ditto. And for for_each_inferior.
8917 Fetch lwpid from thread, not lwp.
8918 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
8919 Pass &all_threads to find_inferior, not &all_lwps.
8920 (send_sigstop): Fetch lwpid from thread, not lwp.
8921 (send_sigstop_callback): Update, "entry" parameter is a
8922 struct thread_info * now.
8923 (suspend_and_send_sigstop_callback): Ditto.
8924 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
8925 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
8926 struct thread_info * now.
8927 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
8928 from thread, lwp.
8929 (lwp_running): Update, "entry" parameter is a
8930 struct thread_info * now.
8931 (stop_all_lwps): Fetch ptid from thread.
8932 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
8933 (linux_resume_one_lwp): Fetch lwpid from thread.
8934 (linux_set_resume_request): Update, "entry" parameter is a
8935 struct thread_info * now. Fetch pid, lwpid from thread.
8936 (resume_status_pending_p): Update, "entry" parameter is a
8937 struct thread_info * now.
8938 (need_step_over_p): Ditto. Fetch lwpid from thread.
8939 (start_step_over): Fetch lwpid from thread.
8940 (linux_resume_one_thread): Update, "entry" parameter is a
8941 struct thread_info * now. Fetch lwpid from thread.
8942 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
8943 (proceed_one_lwp): Update, "entry" parameter is a
8944 struct thread_info * now. Fetch lwpid from thread.
8945 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
8946 struct thread_info * now.
8947 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
8948 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
8949 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
8950 directly.
8951 (regsets_store_inferior_registers): Ditto.
8952 (fetch_register, store_register): Ditto.
8953 (linux_read_memory, linux_write_memory): Ditto.
8954 (linux_request_interrupt): Ditto.
8955 (linux_read_auxv): Ditto.
8956 (linux_xfer_siginfo): Ditto.
8957 (linux_qxfer_spu): Ditto.
8958 (linux_qxfer_libraries_svr4): Ditto.
8959 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
8960 moved to inferiors.h.
8961 (get_lwp): Delete.
8962 (get_thread_lwp): Update.
8963 (struct lwp_info): Delete member "entry". Simplify comment for
8964 member "thread".
8965 (all_lwps): Delete.
8966 * linux-mips-low.c (mips_read_description): Fetch lwpid from
8967 current_inferior directly.
8968 (update_watch_registers_callback): Update, "entry" parameter is a
8969 struct thread_info * now. Fetch pid from thread.
8970 (mips_linux_prepare_to_resume): Fetch ptid from thread.
8971 (mips_insert_point): Fetch lwpid from current_inferior.
8972 Pass &all_threads to find_inferior, not &all_lwps.
8973 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
8974 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
8975 directly.
8976 (mips_stopped_data_address): Ditto.
8977 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
8978 directly.
8979 * linux-tile-low.c (tile_arch_setup): Ditto.
8980 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
8981 (update_debug_registers_callback): Update, "entry" parameter is a
8982 struct thread_info * now. Fetch pid from thread.
8983 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
8984 Pass &all_threads to find_inferior, not &all_lwps.
8985 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
8986 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
8987 Pass &all_threads to find_inferior, not &all_lwps.
8988 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
8989 (i386_dr_low_get_status): Ditto.
8990 (x86_linux_prepare_to_resume): Fetch ptid from thread.
8991 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
8992 (x86_linux_read_description): Ditto.
8993 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
8994
3b8361aa
DE
89952014-02-20 Doug Evans <dje@google.com>
8996
8997 * inferiors.c (get_first_inferior): Fix buglet.
8998
f7667f0d
DE
89992014-02-19 Doug Evans <dje@google.com>
9000
9001 * gdbthread.h (add_thread): Change result type to struct thread_info *.
9002 * inferiors.c (add_thread): Change result type to struct thread_info *.
9003 All callers updated.
9004 (add_lwp): Call add_thread here instead of in callers.
9005 All callers updated.
9006 * linux-low.h (get_lwp_thread): Rewrite.
9007 (struct lwp_info): New member "thread".
9008
b3312d80
DE
90092014-02-19 Doug Evans <dje@google.com>
9010
9011 * linux-low.c (add_lwp): Change result to struct lwp_info *.
9012 All callers updated.
9013
ecc6f45c
DE
90142014-02-19 Doug Evans <dje@google.com>
9015
9016 * inferiors.c (add_thread): Fix whitespace.
9017
649ebbca
DE
90182014-02-19 Doug Evans <dje@google.com>
9019
9020 * dll.c (clear_dlls): Replace accessing list implemention details
9021 with API function.
9022 * gdbthread.h (get_first_thread): Declare.
9023 * inferiors.c (for_each_inferior_with_data): New function.
9024 (get_first_thread): New function.
9025 (find_thread_ptid): Simplify.
9026 (get_first_inferior): New function.
9027 (clear_list): Delete.
9028 (one_inferior_p): New function.
9029 (clear_inferior_list): New function.
9030 (clear_inferiors): Update.
9031 * inferiors.h (for_each_inferior_with_data): Declare.
9032 (clear_inferior_list): Declare.
9033 (one_inferior_p): Declare.
9034 (get_first_inferior): Declare.
9035 * linux-low.c (linux_wait_for_event): Replace accessing list
9036 implemention details with API function.
9037 * server.c (target_running): Ditto.
9038 (accumulate_file_name_length): New function.
9039 (emit_dll_description): New function.
9040 (handle_qxfer_libraries): Replace accessing list implemention
9041 details with API function.
9042 (handle_qxfer_threads_worker): New function.
9043 (handle_qxfer_threads_proper): Replace accessing list implemention
9044 details with API function.
9045 (handle_query): Ditto.
9046 (visit_actioned_threads_callback_ftype): New typedef.
9047 (visit_actioned_threads_data): New struct.
9048 (visit_actioned_threads): Rewrite to be find_inferior callback.
9049 (resume): Call find_inferior.
9050 (handle_status): Replace accessing list implemention
9051 details with API function.
9052 (process_serial_event): Replace accessing list implemention details
9053 with API function.
9054 * target.c (set_desired_inferior): Replace accessing list implemention
9055 details with API function.
9056 * tracepoint.c (same_process_p): New function.
9057 (gdb_agent_about_to_close): Replace accessing list implemention
9058 details with API function.
9059 * win32-low.c (child_delete_thread): Replace accessing list
9060 implemention details with API function.
9061 (match_dll_by_basename): New function.
9062 (dll_is_loaded_by_basename): New function.
9063 (win32_ensure_ntdll_loaded): Replace accessing list implemention
9064 details call to dll_is_loaded_by_basename.
9065
80894984
DE
90662014-02-19 Doug Evans <dje@google.com>
9067
9068 * dll.h (struct dll_info): Add comment.
9069 * gdbthread.h (struct thread_info): Add comment.
9070 (current_ptid): Simplify.
9071 * inferiors.c (add_process): Update.
9072 (remove_process): Update.
9073 * inferiors.h (struct process_info): Rename member "head" to "entry".
9074 * linux-low.c (delete_lwp): Update.
9075 (add_lwp): Update.
9076 (last_thread_of_process_p): Update.
9077 (kill_one_lwp_callback, linux_kill): Update.
9078 (status_pending_p_callback): Update.
9079 (wait_for_sigstop): Update. Simplify read of ptid.
9080 (start_step_over): Update.
9081 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
9082 (get_lwp_thread): Update.
9083 (struct lwp_info): Rename member "head" to "entry".
9084 * regcache.h (inferior_list_entry): Delete.
9085 * server.c (kill_inferior_callback): Update.
9086 (detach_or_kill_inferior_callback): Update.
9087 (print_started_pid): Update.
9088 (print_attached_pid): Update.
9089 (process_serial_event): Simplify read of ptid.
9090 * thread-db.c (thread_db_create_event): Update.
9091 (thread_db_get_tls_address): Update.
9092 * win32-low.c (current_inferior_ptid): Simplify.
9093
46917d26
TT
90942014-02-19 Tom Tromey <tromey@redhat.com>
9095
9096 * target.h (struct target_ops) <supports_btrace>: Add target_ops
9097 argument.
9098 (target_supports_btrace): Update.
9099
0759a81e
YQ
91002014-02-14 Yao Qi <yao@codesourcery.com>
9101
9102 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
9103 (rsp-low-ipa.o): New target.
9104
a7191e8b
TT
91052014-02-12 Tom Tromey <tromey@redhat.com>
9106
9107 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
9108 convert_ascii_to_int.
9109 * regcache.c (registers_to_string): Likewise.
9110 * remote-utils.c (decode_M_packet): Likewise.
9111 * server.c (process_serial_event): Likewise.
9112
ff0e980e
TT
91132014-02-12 Tom Tromey <tromey@redhat.com>
9114
9115 * server.c (handle_query, handle_v_run): Use hex2bin, not
9116 unhexify.
9117 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
9118
e9371aff
TT
91192014-02-12 Tom Tromey <tromey@redhat.com>
9120
9121 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
9122 convert_int_to_ascii.
9123 * regcache.c (registers_to_string, collect_register_as_string):
9124 Likewise.
9125 * remote-utils.c (look_up_one_symbol, relocate_instruction):
9126 Likewise.
9127 * server.c (process_serial_event): Likewise.
9128 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
9129 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
9130
971dc0b8
TT
91312014-02-12 Tom Tromey <tromey@redhat.com>
9132
9133 * remote-utils.c (look_up_one_symbol, monitor_output): Use
9134 bin2hex, not hexify.
9135 * tracepoint.c (cmd_qtstatus): Likewise.
9136
0a822afb
TT
91372014-02-12 Tom Tromey <tromey@redhat.com>
9138
9139 * remote-utils.c (monitor_output): Pass explicit length to
9140 hexify.
9141
9c3d6531
TT
91422014-02-12 Tom Tromey <tromey@redhat.com>
9143
9144 * tracepoint.c: Include rsp-low.h.
9145 * server.c: Include rsp-low.h.
9146 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
9147 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
9148 declare.
9149 * remote-utils.c: Include rsp-low.h.
9150 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
9151 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
9152 (convert_int_to_ascii, convert_ascii_to_int): Move to
9153 common/rsp-low.c.
9154 * regcache.c: Include rsp-low.h.
9155 * ax.c: Include rsp-low.h.
9156 * Makefile.in (SFILES): Add common/rsp-low.c.
9157 (OBS): Add rsp-low.o.
9158 (rsp-low.o): New target.
9159
01fd3ea5
TT
91602014-02-12 Tom Tromey <tromey@redhat.com>
9161
9162 * utils.h (pulongest, plongest, phex_nz): Don't declare.
9163 Include print-utils.h.
9164 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
9165 (plongest, thirty_two, phex_nz): Remove.
9166 * Makefile.in (SFILES): Add common/print-utils.c.
9167 (OBS): Add print-utils.o.
9168 (print-utils-ipa.o): New target.
9169 (print-utils.o): New target.
9170 (IPA_OBJS): Add print-utils-ipa.o.
9171
e99dc820
TT
91722014-02-06 Tom Tromey <tromey@redhat.com>
9173
9174 * Makefile.in (SFILES): Fix indentation.
9175
ee1e2d4f
DE
91762014-02-05 Doug Evans <dje@google.com>
9177
9178 * linux-low.c (linux_wait_for_event): Improve comment.
9179 (linux_wait_1): Keep current_inferior in sync with event_child.
9180
f5a02773
DE
91812014-01-22 Doug Evans <dje@google.com>
9182
9183 * gdbthread.h (gdb_id_to_thread): Delete, unused.
9184
87ce2a04
DE
91852014-01-22 Doug Evans <dje@google.com>
9186
9187 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
9188 * configure: Regenerate.
9189 * config.in: Regenerate.
9190 * Makefile.in (SFILES): Add debug.c.
9191 (OBS): Add debug.o.
9192 * debug.c: New file.
9193 * debug.h: New file.
9194 * linux-aarch64-low.c (*): Update all debugging printfs to use
9195 debug_printf instead of fprintf.
9196 * linux-arm-low.c (*): Ditto.
9197 * linux-cris-low.c (*): Ditto.
9198 * linux-crisv32-low.c (*): Ditto.
9199 * linux-m32r-low.c (*): Ditto.
9200 * linux-sparc-low.c (*): Ditto.
9201 * linux-x86.c (*): Ditto.
9202 * linux-low.c (*): Ditto.
9203 (linux_wait_1): Add calls to debug_enter, debug_exit.
9204 (linux_wait): Remove redundant debugging printf.
9205 (stop_all_lwps): Add calls to debug_enter, debug_exit.
9206 (linux_resume, unstop_all_lwps): Ditto.
9207 * mem-break.c (*): Update all debugging printfs to use
9208 debug_printf instead of fprintf.
9209 * remote-utils.c (*): Ditto.
9210 * thread-db.c (*): Ditto.
9211 * server.c #include <ctype.h>, "gdb_vecs.h".
9212 (debug_threads): Moved to debug.c.
9213 (*): Update all debugging printfs to use debug_printf instead of
9214 fprintf.
9215 (start_inferior): Replace call to fflush with call to debug_flush.
9216 (monitor_show_help): Mention set debug-format.
9217 (parse_debug_format_options): New function.
9218 (handle_monitor_command): Handle "monitor set debug-format".
9219 (gdbserver_usage): Mention --debug-format.
9220 (main): Parse --debug-format.
9221 * server.h (debug_threads): Declaration moved to debug.h.
9222 #include "debug.h".
9223 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
9224 trace_debug_1 that uses debug_printf.
9225 (tracepoint_look_up_symbols): Update all debugging printfs to use
9226 debug_printf instead of fprintf.
9227
e671835b
BS
92282014-01-20 Baruch Siach <baruch@tkos.co.il>
9229
9230 * linux-xtensa-low.c: Include asm/ptrace.h instead of
9231 sys/ptrace.h.
9232
b5737fa9
PA
92332014-01-17 Pedro Alves <palves@redhat.com>
9234
ea38d2a9 9235 PR build/16445
c7faa97a
PA
9236 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
9237 defined after including gdb_proc_service.h.
b5737fa9 9238
40ed484e
DE
92392014-01-16 Doug Evans <dje@google.com>
9240
9241 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
9242 (match_dll): Use it.
9243
969c39fb
MM
92442014-01-16 Markus Metzger <markus.t.metzger@intel.com>
9245
9246 * target.h (target_ops) <read_btrace>: Change parameters and
9247 return type to allow error reporting.
9248 * server.c (handle_qxfer_btrace): Support delta reads. Pass
9249 trace reading errors on.
9250 * linux-low.c (linux_low_read_btrace): Pass trace reading
9251 errors on.
9252 (linux_low_disable_btrace): New.
9253
ab7f45ba
DE
92542014-01-15 Doug Evans <dje@google.com>
9255
9256 * inferiors.c (thread_id_to_gdb_id): Delete.
9257 * inferiors.h (thread_id_to_gdb_id): Delete.
9258
66af0f44
EZ
92592014-01-13 Eli Zaretskii <eliz@gnu.org>
9260
9261 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
9262 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
9263 versions.
9264
9939e131
PA
92652014-01-08 Pedro Alves <palves@redhat.com>
9266
9267 * server.c (handle_status): Don't discard previous queued stop
9268 replies or thread's pending status here.
9269 (main) <disconnection>: Do it here instead.
9270
b7ea362b
PA
92712014-01-08 Pedro Alves <palves@redhat.com>
9272
9273 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
9274 * server.c (visit_actioned_threads, handle_pending_status): New
9275 function.
9276 (handle_v_cont): Factor out parts to ...
9277 (resume): ... this new function. If in all-stop, and a thread
9278 being resumed has a pending status, report it without actually
9279 resuming.
9280 (myresume): Adjust to use the new 'resume' function.
9281 (clear_pending_status_callback, set_pending_status_callback)
9282 (find_status_pending_thread_callback): New functions.
9283 (handle_status): Handle the case of multiple threads having
9284 interesting statuses to report. Report threads' real last signal
9285 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
9286 with an interesting thread to report the status for, instead of
9287 always reporting the status of the first thread.
9288
28498c42
JB
92892014-01-01 Joel Brobecker <brobecker@adacore.com>
9290
9291 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
9292 * gdbreplay.c (gdbreplay_version): Likewise.
9293
f45c82da
YZ
92942013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
9295
9296 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
9297 iov.iov_len with the real length in use.
9298
379a5e2d
JB
92992013-12-13 Joel Brobecker <brobecker@adacore.com>
9300
9301 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
9302 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
9303 for all targets that use win32-low.c.
9304 * win32-low.c (win32_ensure_ntdll_loaded): New function.
9305 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
9306
4210d83e
PA
93072013-12-13 Pedro Alves <palves@redhat.com>
9308
9309 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
9310 if equal to TARGET_WAITKIND_LOADED.
9311 * win32-low.c (cached_status): New static global.
9312 (win32_wait): Add declaration.
9313 (do_initial_child_stuff): Flush all initial pending debug events
9314 up to the initial breakpoint.
9315 (win32_wait): If CACHED_STATUS was set, return that instead
9316 of doing a real wait. Remove the code resuming the execution
9317 of the inferior after receiving a TARGET_WAITKIND_LOADED event
9318 during the initial phase. Also remove the code changing
9319 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
9320 TARGET_WAITKIND_STOPPED.
9321
e7f0d979
YQ
93222013-12-11 Yao Qi <yao@codesourcery.com>
9323
9324 * notif.c (handle_notif_ack): Return 0 if no notification
9325 matches.
9326
ebcf782c
DE
93272013-11-20 Doug Evans <dje@google.com>
9328
9329 * linux-low.c (linux_set_resume_request): Fix comment.
9330
20ad9378
DE
93312013-11-20 Doug Evans <dje@google.com>
9332
9333 * linux-low.c (resume_status_pending_p): Tweak comment.
9334
a196ebeb
WT
93352013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
9336
9337 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
9338 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
9339 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
9340 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
9341 (srv_amd64_regobj): Add amd64-mpx.o.
9342 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
9343 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
9344 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
9345 * i387-fp.c (num_pl_bnd_register) Added constant.
9346 (num_pl_bnd_cfg_registers) Added constant.
9347 (struct i387_xsave) Added reserved area and MPX fields.
9348 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
9349 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
9350 function.
9351 (tdesc_i386_mpx_linux): Add MPX amd64 target.
9352 (init_registers_amd64_mpx_linux): Declare new function.
9353 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
9354 (x86_64_regmap): Add MPX registers.
9355 (x86_linux_read_description): Add MPX case.
9356 (initialize_low_arch): Initialize MPX targets.
9357
0080a2f6
TT
93582013-11-18 Tom Tromey <tromey@redhat.com>
9359
9360 * configure: Rebuild.
9361 * configure.ac: Don't check for stdlib.h.
9362 * gdbreplay.c: Unconditionally include stdlib.h.
9363
2978b111
TT
93642013-11-18 Tom Tromey <tromey@redhat.com>
9365
9366 * config.in: Rebuild.
9367 * configure: Rebuild.
9368 * configure.ac: Don't use AC_HEADER_DIRENT.
9369
a3d08894
TT
93702013-11-18 Tom Tromey <tromey@redhat.com>
9371
9372 * server.h: Don't check HAVE_STRING_H.
9373 * gdbreplay.c: Don't check HAVE_STRING_H.
9374 * configure: Rebuild.
9375
0a5dd17d
TT
93762013-11-18 Tom Tromey <tromey@redhat.com>
9377
9378 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
9379 LIBGNU.
9380
1bd2f0ba
TT
93812013-11-08 Tom Tromey <tromey@redhat.com>
9382
9383 * configure, config.in: Rebuild.
9384 * configure.ac: Remove unused configury.
9385
3266f10b
TT
93862013-11-08 Tom Tromey <tromey@redhat.com>
9387
9388 * acinclude.m4: Include common.m4, codeset.m4.
9389 * configure, config.in: Rebuild.
9390 * configure.ac: Use GDB_AC_COMMON.
9391
6682d959
AA
93922013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
9393
9394 * linux-s390-low.c (HWCAP_S390_TE): New define.
9395 (s390_arch_setup): Consider the TE field in the HWCAP for
9396 determining 'have_regset_tdb'.
9397
fd0a4d76
SDJ
93982013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
9399
9400 PR gdb/16014
9401 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
9402 call to sizeof.
9403
1a3d890b
PA
94042013-10-02 Pedro Alves <palves@redhat.com>
9405
9406 * server.c (process_serial_event): Don't output "GDBserver
9407 exiting" if GDB is connected through stdio.
9408 * target.c (mywait): Likewise, be silent if GDB is connected
9409 through stdio.
9410
97ad4581
JB
94112013-10-01 Joel Brobecker <brobecker@adacore.com>
9412
9413 * lynx-low.c (lynx_add_threads_after_attach): New function.
9414 (lynx_attach): Remove call to add_thread. Add call to
9415 lynx_add_threads_after_attach instead.
9416
5b4e221c
MF
94172013-09-28 Mike Frysinger <vapier@gentoo.org>
9418
9419 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
9420 * config.in, configure: Regenerated.
9421
ee47b2f8
YQ
94222013-09-18 Yao Qi <yao@codesourcery.com>
9423
9424 PR server/15959
9425 * server.c (start_inferior): Clear 'resume_info'.
9426
d6707650 94272013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 9428
d6707650
JW
9429 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
9430 for each register.
9431
9243dd0e 94322013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 9433
9243dd0e
JW
9434 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
9435 linux-tile-low.o to srv_tgtobj.
9436
c623a6ef
WN
94372013-09-16 Will Newton <will.newton@linaro.org>
9438
9439 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
9440 out regs.
9441
fb71d39e
PA
94422013-09-06 Pedro Alves <palves@redhat.com>
9443
9444 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
9445 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
9446 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
9447 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
9448 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
9449 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
9450
8e7e9910
PA
94512013-09-06 Pedro Alves <palves@redhat.com>
9452
9453 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
9454 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
9455
7c3a12ca
PA
94562013-09-06 Pedro Alves <palves@redhat.com>
9457
9458 * linux-amd64-ipa.c: Include tracepoint.h.
9459 * linux-i386-ipa.c: Include tracepoint.h.
9460
8eb3d7b6
RW
94612013-09-06 Ricard Wanderlof <ricardw@axis.com>
9462
9463 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
9464 (ps_get_thread_area): New function.
9465
eddddb9d
RW
94662013-09-06 Ricard Wanderlof <ricardw@axis.com>
9467
9468 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
9469 (initialize_low_arch): Call init_registers_crisv32 rather than
9470 init_register_crisv32.
9471
533b0600
PA
94722013-09-05 Pedro Alves <palves@redhat.com>
9473
9474 * server.h (handle_vFile, hostio_last_error_from_errno): Move
9475 to ...
9476 * hostio.h: ... this new file.
9477 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
9478 win32-low.c: Include hostio.h.
9479
0ce3d3b5
PA
94802013-09-05 Pedro Alves <palves@redhat.com>
9481
9482 * server.h (gdb_client_data, handler_func, callback_handler_func)
9483 (delete_file_handler, add_file_handler, append_callback_event)
9484 (delete_callback_event, start_event_loop, initialize_event_loop):
9485 Move to event-loop.h and include it.
9486 * event-loop.h: New file.
9487
799cdc37
PA
94882013-09-05 Pedro Alves <palves@redhat.com>
9489
9490 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
9491 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
9492 (loaded_dll, unloaded_dll): Move to ...
9493 * dll.h: ... this new file.
9494 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
9495
6a6bbd9d
PA
94962013-09-05 Pedro Alves <palves@redhat.com>
9497
9498 * server.h (current_process, get_thread_process, all_processes)
9499 (add_inferior_to_list, for_each_inferior, current_inferior)
9500 (remove_inferior, add_process, remove_process, find_process_pid)
9501 (have_started_inferiors_p, have_attached_inferiors_p)
9502 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
9503 (clear_inferiors, find_inferior, find_inferior_id)
9504 (inferior_target_data, set_inferior_target_data)
9505 (inferior_regcache_data, set_inferior_regcache_data): Move to
9506 inferiors.h, and include it.
9507 * inferiors.h: New file.
9508
f699aaba
PA
95092013-09-05 Pedro Alves <palves@redhat.com>
9510
9511 * server.h (struct emit_ops, current_insn_ptr, emit_error):
9512 Move ...
72f4393d 9513 * ax.h: ... here.
f699aaba 9514
c144c7a0
PA
95152013-09-05 Pedro Alves <palves@redhat.com>
9516
9517 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
9518 tracepoint.h.
9519 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
9520 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
9521 (handle_tracepoint_general_set, handle_tracepoint_query)
9522 (tracepoint_finished_step, tracepoint_was_hit)
9523 (release_while_stepping_state_list, current_traceframe)
9524 (in_readonly_region, traceframe_read_mem)
9525 (fetch_traceframe_registers, traceframe_read_sdata)
9526 (traceframe_read_info, struct fast_tpoint_collect_status)
9527 (fast_tracepoint_collecting, force_unlock_trace_buffer)
9528 (handle_tracepoit_bkpts, initialize_low_tracepoint)
9529 (supply_fast_tracepoint_registers)
9530 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
9531 (ipa_tdesc, claim_trampoline_space)
9532 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
9533 (agent_mem_read, agent_get_trace_state_variable_value)
9534 (agent_set_trace_state_variable_value, agent_tsv_read)
9535 (agent_mem_read_string, get_raw_reg_func_addr)
9536 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
9537 * tracepoint.h: ... this new file.
9538
ff42e6ab
PA
95392013-09-05 Pedro Alves <palves@redhat.com>
9540
9541 * server.h (perror_with_name, error, fatal, warning, paddress)
9542 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
9543 include it.
9544 * utils.h: New file.
9545
541af0f4
PA
95462013-09-05 Pedro Alves <palves@redhat.com>
9547
9548 * server.h (remote_debug, noack_mode, transport_is_reliable)
9549 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
9550 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
9551 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
9552 (write_enn, initialize_async_io, enable_async_io)
9553 (disable_async_io, check_remote_input_interrupt_request)
9554 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
9555 (dead_thread_notify, prepare_resume_reply)
9556 (decode_address_to_semicolon, decode_address, decode_m_packet)
9557 (decode_M_packet, decode_X_packet, decode_xfer_write)
9558 (decode_search_memory_packet, unhexify, hexify)
9559 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
9560 (look_up_one_symbol, relocate_instruction)
9561 (monitor_output): Move to remote-utils.h, and include it.
9562 * remote-utils.h: New file.
9563
eebdf26b
PA
95642013-09-05 Pedro Alves <palves@redhat.com>
9565
9566 * server.h (_): Delete.
9567
3aafd2ff
PA
95682013-09-02 Pedro Alves <palves@redhat.com>
9569
9570 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
9571 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
9572 allocated.
9573 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
9574
cee83bcb
PM
95752013-09-02 Pierre Muller <muller@sourceware.org>
9576
9577 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
9578 or WriteProcessMemory complete successfully and handle
9579 ERROR_PARTIAL_COPY error.
9580
9a13b2fa
PA
95812013-09-02 Pedro Alves <palves@redhat.com>
9582
9583 * server.c (gdb_read_memory): Return -1 on traceframe memory read
9584 error instead of EIO.
9585
602e3198
JK
95862013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9587
9588 PR server/15604
9589 * linux-low.c: Include filestuff.h.
9590 (linux_create_inferior) <pid == 0>: Call close_most_fds.
9591 * lynx-low.c: Include filestuff.h.
9592 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
9593 * server.c: Include filestuff.h.
9594 (main): Call notice_open_fds.
9595 * spu-low.c: Include filestuff.h.
9596 (spu_create_inferior) <pid == 0>: Call close_most_fds.
9597
96d7229d
LM
95982013-08-22 Luis Machado <lgustavo@codesourcery.com>
9599
9600 * Makefile.in: Explain why ../target and ../nat are not
9601 listed as include file search paths.
9602 (linux-waitpid.o): New object file rule.
9603 * configure.srv (srv_native_linux_obj): New variable.
9604 Replace all occurrences of linux native object files with
9605 $srv_native_linux_obj.
9606 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
9607 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
9608 (linux_enable_event_reporting): Remove declaration.
9609 (my_waitpid): Moved to common/linux-waitpid.c.
9610 (linux_wait_for_event): Pass ptid when calling
9611 linux_enable_event_reporting.
9612 (linux_supports_tracefork_flag): Remove.
9613 (linux_enable_event_reporting): Likewise.
9614 (linux_tracefork_grandchild): Remove.
9615 (STACK_SIZE): Moved to common/linux-ptrace.c.
9616 (linux_tracefork_child): Remove.
9617 (linux_test_for_tracefork): Remove.
9618 (linux_look_up_symbols): Call linux_supports_traceclone.
9619 (initialize_low): Remove call to linux_test_for_tracefork.
9620 * linux-low.h (PTRACE_TYPE_ARG3): Move to
9621 common/linux-ptrace.h.
9622 (PTRACE_TYPE_ARG4): Likewise.
9623 Include linux-ptrace.h.
9624
32940073
PA
96252013-08-21 Pedro Alves <palves@redhat.com>
9626
9627 * config.in: Renegerate.
9628
33b60d58 96292013-08-19 Luis Machado <lgustavo@codesourcery.com>
a261b8f5 9630
33b60d58
LM
9631 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
9632 (SFILES): Remove $(srcdir)/common/target-common.c and
9633 add $(srcdir)/target/waitstatus.c.
9634 (OBS): Remove target-common.o and add waitstatus.o.
9635 (server_h): Remove $(srcdir)/../common/target-common.h and
9636 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
9637 and $(srcdir)/../target/waitstatus.h.
9638 (target-common.o): Remove.
9639 (waitstatus.o): New target object file.
9640 * target.h: Do not include target-common.h and
9641 include target/resume.h, target/wait.h and
9642 target/waitstatus.h.
9643
b8e1b30e
LM
96442013-08-13 Luis Machado <lgustavo@codesourcery.com>
9645
9646 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
9647 to PTRACE_TYPE_ARG3.
9648 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
9649 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
9650 PTRACE_TYPE_ARG4.
9651 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
9652 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
9653
7a60ad40
YQ
96542013-07-27 Jie Zhang <jie@codesourcery.com>
9655 Daniel Jacobowitz <dan@codesourcery.com>
9656 Yao Qi <yao@codesourcery.com>
9657
9658 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
9659 (mips-linux-watch.o): New rule.
9660 (mips_linux_watch_h): New variable.
9661 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
9662 srv_tgtobj.
9663 * linux-mips-low.c: Include mips-linux-watch.h.
9664 (struct arch_process_info, struct arch_lwp_info): New.
9665 (update_watch_registers_callback): New function.
9666 (mips_linux_new_process, mips_linux_new_thread) New functions.
9667 (mips_linux_prepare_to_resume, mips_insert_point): New
9668 functions.
9669 (mips_remove_point, mips_stopped_by_watchpoint): New
9670 functions.
9671 (rsp_bp_type_to_target_hw_bp_type): New function.
9672 (mips_stopped_data_address): New function.
9673 (the_low_target): Add watchpoint support functions.
9674
de6f69ad
YQ
96752013-07-27 Yao Qi <yao@codesourcery.com>
9676
9677 * i386-low.c: Include break-common.h.
9678 (enum target_hw_bp_type): Remove.
9679
3360c0bf
LM
96802013-07-24 Luis Machado <lgustavo@codesourcery.com>
9681
9682 * Makefile.in (SFILES): /common/target-common.c.
9683 (OBS): Add target-common.o.
9684 (server_h): Add $(srcdir)/../common/target-common.h.
9685 (target-common.o): New target.
9686 * server.c (queue_stop_reply_callback): Free
9687 status string after use.
9688 * target.c (target_waitstatus_to_string): Remove.
9689 * target.h: Include target-common.h.
9690 (resume_kind): Likewise.
9691 (target_waitkind): Likewise.
9692 (target_waitstatus): Likewise.
9693 (TARGET_WNOHANG): Likewise.
9694
bd885420
YQ
96952013-07-04 Yao Qi <yao@codesourcery.com>
9696
9697 * Makefile.in (host_alias): Use @host_noncanonical@.
9698 (target_alias): Use @target_noncanonical@.
9699 * configure.ac: Use ACX_NONCANONICAL_TARGET and
9700 ACX_NONCANONICAL_HOST.
9701 * configure: Regenerated.
9702
9703 Revert:
9704 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
9705
9706 * configure.ac (version_host, version_target): Set and AC_SUBST them.
9707 * configure: Rebuild.
9708 * Makefile.in (version_host, version_target): Get from configure.
9709 (version.c): Use $(version_host) and $(version_target).
9710
17ef446e
PA
97112013-07-03 Pedro Alves <palves@redhat.com>
9712
9713 * Makefile.in (config.status): Depend on development.sh.
9714 * acinclude.m4: Include libmcheck.m4.
9715 * configure: Regenerate.
9716
7a9a7487
MG
97172013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
9718
9719 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
9720 attribute inside the parentheses.
9721 (winapi_DebugSetProcessKillOnExit): Ditto.
9722 (winapi_DebugBreakProcess): Ditto.
9723 (winapi_GenerateConsoleCtrlEvent): Ditto.
a261b8f5 9724
49b64de6
MG
97252013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
9726
9727 * notif.h (notif_event): Add a dummy member to avoid compiler
9728 errors.
9729
d5749ee7
PA
97302013-07-01 Pedro Alves <palves@redhat.com>
9731
9732 * hostio.c (HOSTIO_PATH_MAX): Define.
9733 (require_filename, handle_open, handle_unlink, handle_readlink):
9734 Use it.
9735
d8d2a3ee
PA
97362013-07-01 Pedro Alves <palves@redhat.com>
9737
9738 * server.h: Include "pathmax.h".
9739 * linux-low.c: Don't include sys/param.h.
9740 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
9741 MAXPATHLEN.
9742 * win32-low.c: Don't include sys/param.h.
9743 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
9744
bc7dea8d
PA
97452013-07-01 Pedro Alves <palves@redhat.com>
9746
9747 * event-loop.c: Don't check HAVE_UNISTD_H before including
9748 <unistd.h>.
9749 * gdbreplay.c: Likewise.
9750 * remote-utils.c: Likewise.
9751 * server.c: Likewise.
9752 * configure.ac: Don't check for unistd.h.
9753 * configure: Regenerate.
9754
d6c2da54
TT
97552013-06-28 Tom Tromey <tromey@redhat.com>
9756
9757 * Makefile.in (version.c): Use version.in, not
9758 common/version.in.
9759
257b6bec
MG
97602013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
9761
9762 * configure.ac (version_host, version_target): Set and AC_SUBST them.
9763 * configure: Rebuild.
9764 * Makefile.in (version_host, version_target): Get from configure.
9765 (version.c): Use $(version_host) and $(version_target).
9766
86ebe149
DK
97672013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
9768
9769 Fix trace-status to output user name without trailing colon.
9770 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
9771
f30aa5af
DK
97722013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
9773
9774 Fix trace-status to output proper start-time and stop-time.
9775 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
9776 output start time and stop time in hex as gdb expects.
9777
28a93511
YQ
97782013-06-26 Pedro Alves <pedro@codesourcery.com>
9779
9780 * tracepoint.c (build_traceframe_info_xml): Output trace state
9781 variables present in the trace buffer.
9782
01208463
TT
97832013-06-24 Tom Tromey <tromey@redhat.com>
9784
9785 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
9786 create-version.sh.
9787 (version.o): Remove.
9788 * gdbreplay.c: Include version.h.
9789 (version, host_name): Don't declare.
9790 * server.h: Include version.h.
9791 (version, host_name): Don't declare.
9792
760256f9
PA
97932013-06-12 Pedro Alves <palves@redhat.com>
9794
9795 * linux-x86-low.c (linux_is_elf64): Delete global.
9796 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
9797 with local linux_pid_exe_is_elf_64_file use.
9798
030031ee
PA
97992013-06-11 Pedro Alves <palves@redhat.com>
9800
9801 * linux-low.c (regset_disabled, disable_regset): New functions.
9802 (regsets_fetch_inferior_registers)
9803 (regsets_store_inferior_registers): Use them.
9804 (initialize_regsets_info); Don't allocate the disabled_regsets
9805 array here.
9806 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
9807 comment.
9808
5da6eb0a
PA
98092013-06-11 Pedro Alves <palves@redhat.com>
9810
9811 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
9812 xmalloc.
9813
7e5aaa09
PA
98142013-06-11 Pedro Alves <palves@redhat.com>
9815
9816 * linux-x86-low.c (initialize_low_arch): Call
9817 init_registers_x32_avx_linux.
9818
d878444c
JK
98192013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
9820
9821 Fix compatibility with Android Bionic.
9822 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
9823 it is not empty.
9824
3aee8918
PA
98252013-06-07 Pedro Alves <palves@redhat.com>
9826
5f2b57b5 9827 PR server/14823
3aee8918
PA
9828 * Makefile.in (OBS): Add tdesc.o.
9829 (IPA_OBJS): Add tdesc-ipa.o.
9830 (tdesc-ipa.o): New rule.
9831 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
9832 interface.
9833 * linux-low.c (new_inferior): Delete.
9834 (disabled_regsets, num_regsets): Delete.
9835 (linux_add_process): Adjust to set the new per-process
9836 new_inferior flag.
9837 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
9838 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
9839 was a stop. When calling arch_setup, switch the current inferior
9840 to the thread that got an event.
9841 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
9842 (regsets_fetch_inferior_registers)
9843 (regsets_store_inferior_registers): New regsets_info parameter.
9844 Adjust to use it.
9845 (linux_register_in_regsets): New regs_info parameter. Adjust to
9846 use it.
9847 (register_addr, fetch_register, store_register): New usrregs_info
9848 parameter. Adjust to use it.
9849 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
9850 parameter regs_info. Adjust to use it.
9851 (linux_fetch_registers): Get the current inferior's regs_info, and
9852 adjust to use it.
9853 (linux_store_registers): Ditto.
9854 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
9855 (initialize_low): Don't initialize the target_regsets here. Call
9856 initialize_low_arch.
9857 * linux-low.h (target_regsets): Delete declaration.
9858 (struct regsets_info): New.
9859 (struct usrregs_info): New.
9860 (struct regs_info): New.
9861 (struct process_info_private) <new_inferior>: New field.
9862 (struct linux_target_ops): Delete the num_regs, regmap, and
9863 regset_bitmap fields. New field regs_info.
9864 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
9865 * i387-fp.c (num_xmm_registers): Delete.
9866 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
9867 calls to new interface.
9868 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
9869 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
9870 Infer the number of xmm registers from the regcache's target
9871 description.
9872 * i387-fp.h (num_xmm_registers): Delete.
9873 * inferiors.c (add_thread): Don't install the thread's regcache
9874 here.
9875 * proc-service.c (gregset_info): Fetch the current inferior's
9876 regs_info. Adjust to use it.
9877 * regcache.c: Include tdesc.h.
9878 (register_bytes, reg_defs, num_registers)
9879 (gdbserver_expedite_regs): Delete.
9880 (get_thread_regcache): If the thread doesn't have a regcache yet,
9881 create one, instead of aborting gdbserver.
9882 (regcache_invalidate_one): Rename to ...
9883 (regcache_invalidate_thread): ... this.
9884 (regcache_invalidate_one): New.
9885 (regcache_invalidate): Only invalidate registers of the current
9886 process.
9887 (init_register_cache): Add target_desc parameter, and use it.
9888 (new_register_cache): Ditto. Assert the target description has a
9889 non zero registers_size.
9890 (regcache_cpy): Add assertions. Adjust.
9891 (realloc_register_cache, set_register_cache): Delete.
9892 (registers_to_string, registers_from_string): Adjust.
9893 (find_register_by_name, find_regno, find_register_by_number)
9894 (register_cache_size): Add target_desc parameter, and use it.
9895 (free_register_cache_thread, free_register_cache_thread_one)
9896 (regcache_release, register_cache_size): New.
9897 (register_size): Add target_desc parameter, and use it.
9898 (register_data, supply_register, supply_register_zeroed)
9899 (supply_regblock, supply_register_by_name, collect_register)
9900 (collect_register_as_string, collect_register_by_name): Adjust.
9901 * regcache.h (struct target_desc): Forward declare.
9902 (struct regcache) <tdesc>: New field.
9903 (init_register_cache, new_register_cache): Add target_desc
9904 parameter.
9905 (regcache_invalidate_thread): Declare.
9906 (regcache_invalidate_one): Delete declaration.
9907 (regcache_release): Declare.
9908 (find_register_by_number, register_cache_size, register_size)
9909 (find_regno): Add target_desc parameter.
9910 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
9911 declarations.
9912 * remote-utils.c: Include tdesc.h.
9913 (outreg, prepare_resume_reply): Adjust.
9914 * server.c: Include tdesc.h.
9915 (gdbserver_xmltarget): Delete declaration.
9916 (get_features_xml, process_serial_event): Adjust.
9917 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
9918 declare.
9919 (struct process_info) <tdesc>: New field.
9920 (ipa_tdesc): Declare.
9921 * tdesc.c: New file.
9922 * tdesc.h: New file.
9923 * tracepoint.c: Include tdesc.h.
9924 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
9925 (get_context_regcache): Adjust to pass ipa_tdesc down.
9926 (do_action_at_tracepoint): Adjust to get the register cache size
9927 from the context regcache's description.
9928 (traceframe_walk_blocks): Adjust to get the register cache size
9929 from the current trace frame's description.
9930 (traceframe_get_pc): Adjust to get current trace frame's
9931 description and pass it down.
9932 (gdb_collect): Adjust to get the register cache size from the
9933 IPA's description.
9934 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
9935 (gdbserver_xmltarget): Delete.
9936 (initialize_low_tracepoint): Set the ipa's target description.
9937 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
9938 (initialize_low_tracepoint): Set the ipa's target description.
9939 * linux-x86-low.c: Include tdesc.h.
9940 [__x86_64__] (is_64bit_tdesc): New.
9941 (ps_get_thread_area, x86_get_thread_area): Use it.
9942 (i386_cannot_store_register): Rename to ...
9943 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
9944 (i386_cannot_fetch_register): Rename to ...
9945 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
9946 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
9947 to new interface.
9948 (target_regsets): Rename to ...
9949 (x86_regsets): ... this.
9950 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
9951 interface.
9952 (x86_siginfo_fixup): Use is_64bit_tdesc.
9953 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
9954 (tdesc_x32_avx_linux, tdesc_x32_linux)
9955 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
9956 Declare.
9957 (x86_linux_update_xmltarget): Delete.
9958 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
9959 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
9960 (AMD64_LINUX_USER64_CS): New.
9961 (x86_linux_read_description): New, based on
9962 x86_linux_update_xmltarget.
9963 (same_process_callback): New.
9964 (x86_arch_setup_process_callback): New.
9965 (x86_linux_update_xmltarget): New.
9966 (x86_regsets_info): New.
9967 (amd64_linux_regs_info): New.
9968 (i386_linux_usrregs_info): New.
9969 (i386_linux_regs_info): New.
9970 (x86_linux_regs_info): New.
9971 (x86_arch_setup): Reimplement.
9972 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
9973 (x86_emit_ops): Ditto.
9974 (the_low_target): Adjust. Install x86_linux_regs_info,
9975 x86_cannot_fetch_register, and x86_cannot_store_register.
9976 (initialize_low_arch): New.
9977 * linux-ia64-low.c (tdesc_ia64): Declare.
9978 (ia64_fetch_register): Adjust.
9979 (ia64_usrregs_info, regs_info): New globals.
9980 (ia64_regs_info): New function.
9981 (the_low_target): Adjust.
9982 (initialize_low_arch): New function.
9983 * linux-sparc-low.c (tdesc_sparc64): Declare.
9984 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
9985 Adjust.
9986 (sparc_arch_setup): New function.
9987 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
9988 (the_low_target): Adjust.
9989 (initialize_low_arch): New function.
9990 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
9991 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
9992 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
9993 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
9994 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
9995 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
9996 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
9997 (tdesc_powerpc_isa205_vsx64l): Declare.
9998 (ppc_cannot_store_register, ppc_collect_ptrace_register)
9999 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
10000 (ppc_set_pc, ppc_get_hwcap): Adjust.
10001 (ppc_usrregs_info): Forward declare.
10002 (!__powerpc64__) ppc_regmap_adjusted: New global.
10003 (ppc_arch_setup): Adjust to the current process'es target
10004 description.
10005 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
10006 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
10007 (ppc_store_evrregset): Adjust.
10008 (target_regsets): Rename to ...
10009 (ppc_regsets): ... this, and make static.
10010 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
10011 (ppc_regs_info): New function.
10012 (the_low_target): Adjust.
10013 (initialize_low_arch): New function.
10014 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
10015 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
10016 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
10017 (tdesc_s390x_linux64v2): Declare.
10018 (s390_collect_ptrace_register, s390_supply_ptrace_register)
10019 (s390_fill_gregset, s390_store_last_break): Adjust.
10020 (target_regsets): Rename to ...
10021 (s390_regsets): ... this, and make static.
10022 (s390_get_pc, s390_set_pc): Adjust.
10023 (s390_get_hwcap): New target_desc parameter, and use it.
10024 [__s390x__] (have_hwcap_s390_high_gprs): New global.
10025 (s390_arch_setup): Adjust to set the current process'es target
10026 description. Don't adjust the regmap.
10027 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
10028 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
10029 (regs_info_3264): New globals.
10030 (s390_regs_info): New function.
10031 (the_low_target): Adjust.
10032 (initialize_low_arch): New function.
10033 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
10034 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
10035 [__mips64] (init_registers_mips_linux)
10036 (init_registers_mips_dsp_linux): Delete defines.
10037 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
10038 (have_dsp): New global.
10039 (mips_read_description): New, based on mips_arch_setup.
10040 (mips_arch_setup): Reimplement.
10041 (get_usrregs_info): New function.
10042 (mips_cannot_fetch_register, mips_cannot_store_register)
10043 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
10044 (mips_fill_fpregset, mips_store_fpregset): Adjust.
10045 (target_regsets): Rename to ...
10046 (mips_regsets): ... this, and make static.
10047 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
10048 (dsp_regs_info, regs_info): New globals.
10049 (mips_regs_info): New function.
10050 (the_low_target): Adjust.
10051 (initialize_low_arch): New function.
10052 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
10053 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
10054 Declare.
10055 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
10056 (arm_read_description): New, with bits factored from
10057 arm_arch_setup.
10058 (arm_arch_setup): Reimplement.
10059 (target_regsets): Rename to ...
10060 (arm_regsets): ... this, and make static.
10061 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
10062 (arm_regs_info): New function.
10063 (the_low_target): Adjust.
10064 (initialize_low_arch): New function.
10065 * linux-m68k-low.c (tdesc_m68k): Declare.
10066 (target_regsets): Rename to ...
10067 (m68k_regsets): ... this, and make static.
10068 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
10069 (m68k_regs_info): New function.
10070 (m68k_arch_setup): New function.
10071 (the_low_target): Adjust.
10072 (initialize_low_arch): New function.
10073 * linux-sh-low.c (tdesc_sharch): Declare.
10074 (target_regsets): Rename to ...
10075 (sh_regsets): ... this, and make static.
10076 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
10077 (sh_regs_info, sh_arch_setup): New functions.
10078 (the_low_target): Adjust.
10079 (initialize_low_arch): New function.
10080 * linux-bfin-low.c (tdesc_bfin): Declare.
10081 (bfin_arch_setup): New function.
10082 (bfin_usrregs_info, regs_info): New globals.
10083 (bfin_regs_info): New function.
10084 (the_low_target): Adjust.
10085 (initialize_low_arch): New function.
10086 * linux-cris-low.c (tdesc_cris): Declare.
10087 (cris_arch_setup): New function.
10088 (cris_usrregs_info, regs_info): New globals.
10089 (cris_regs_info): New function.
10090 (the_low_target): Adjust.
10091 (initialize_low_arch): New function.
10092 * linux-cris-low.c (tdesc_crisv32): Declare.
10093 (cris_arch_setup): New function.
10094 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
10095 (cris_regs_info): New function.
10096 (the_low_target): Adjust.
10097 (initialize_low_arch): New function.
10098 * linux-m32r-low.c (tdesc_m32r): Declare.
10099 (m32r_arch_setup): New function.
10100 (m32r_usrregs_info, regs_info): New globals.
10101 (m32r_regs_info): Adjust.
10102 (initialize_low_arch): New function.
10103 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
10104 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
10105 (tic6x_usrregs_info): Forward declare.
10106 (tic6x_read_description): New function, based on ...
10107 (tic6x_arch_setup): ... this. Reimplement.
10108 (target_regsets): Rename to ...
10109 (tic6x_regsets): ... this, and make static.
10110 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
10111 (tic6x_regs_info): New function.
10112 (the_low_target): Adjust.
10113 (initialize_low_arch): New function.
10114 * linux-xtensa-low.c (tdesc_xtensa): Declare.
10115 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
10116 (target_regsets): Rename to ...
10117 (xtensa_regsets): ... this, and make static.
10118 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
10119 globals.
10120 (xtensa_arch_setup, xtensa_regs_info): New functions.
10121 (the_low_target): Adjust.
10122 (initialize_low_arch): New function.
10123 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
10124 (nios2_arch_setup): Set the current process'es tdesc.
10125 (target_regsets): Rename to ...
10126 (nios2_regsets): ... this.
10127 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
10128 (nios2_regs_info): New function.
10129 (the_low_target): Adjust.
10130 (initialize_low_arch): New function.
a261b8f5
PA
10131 * linux-aarch64-low.c (tdesc_aarch64): Declare.
10132 (aarch64_arch_setup): Set the current process'es tdesc.
10133 (target_regsets): Rename to ...
10134 (aarch64_regsets): ... this.
10135 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
10136 (aarch64_regs_info): New function.
10137 (the_low_target): Adjust.
10138 (initialize_low_arch): New function.
3aee8918
PA
10139 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
10140 globals.
10141 (target_regsets): Rename to ...
10142 (tile_regsets): ... this.
10143 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
10144 (tile_regs_info): New function.
10145 (tile_arch_setup): Set the current process'es tdesc.
10146 (the_low_target): Adjust.
10147 (initialize_low_arch): New function.
10148 * spu-low.c (tdesc_spu): Declare.
10149 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
10150 * win32-arm-low.c (tdesc_arm): Declare.
10151 (arm_arch_setup): New function.
10152 (the_low_target): Install arm_arch_setup instead of
10153 init_registers_arm.
10154 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
10155 (init_windows_x86): Rename to ...
10156 (i386_arch_setup): ... this. Set `win32_tdesc'.
10157 (the_low_target): Adjust.
10158 * win32-low.c (win32_tdesc): New global.
10159 (child_add_thread): Don't create the thread cache here.
10160 (do_initial_child_stuff): Set the new process'es tdesc.
10161 * win32-low.h (struct target_desc): Forward declare.
10162 (win32_tdesc): Declare.
10163 * lynx-i386-low.c (tdesc_i386): Declare global.
10164 (lynx_i386_arch_setup): Set `lynx_tdesc'.
10165 * lynx-low.c (lynx_tdesc): New global.
10166 (lynx_add_process): Set the new process'es tdesc.
10167 * lynx-low.h (struct target_desc): Forward declare.
10168 (lynx_tdesc): Declare global.
10169 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
10170 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
10171 * nto-low.c (nto_tdesc): New global.
10172 (do_attach): Set the new process'es tdesc.
10173 * nto-low.h (struct target_desc): Forward declare.
10174 (nto_tdesc): Declare.
10175 * nto-x86-low.c (tdesc_i386): Declare.
10176 (nto_x86_arch_setup): Set `nto_tdesc'.
10177
b1fbec62
GB
101782013-06-04 Gary Benson <gbenson@redhat.com>
10179
10180 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
10181 to qSupported response when appropriate.
10182 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
10183 with nonzero-length annex.
10184 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
10185 arguments supplied in annex.
10186
d1ec4ce7
DE
101872013-05-31 Doug Evans <dje@google.com>
10188
ac44adcb 10189 PR server/15594
d1ec4ce7
DE
10190 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
10191 64 bits in 64-cross-32 environment.
10192
9b25f2d3
PA
101932013-05-28 Pedro Alves <palves@redhat.com>
10194
10195 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
10196 (aarch64-without-fpu.c): Delete rule.
10197 * configure.srv (aarch64*-*-linux*): Remove references to
10198 aarch64-without-fpu.o and aarch64-without-fpu.xml.
10199 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
10200 declaration.
10201
6740dc9c
PA
102022013-05-24 Pedro Alves <palves@redhat.com>
10203
10204 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
10205 instead of strchr/decode_address. Error if the range isn't split
10206 with a ','. Don't assume there's be a ':' in the action.
10207
c2d6af84
PA
102082013-05-23 Yao Qi <yao@codesourcery.com>
10209 Pedro Alves <palves@redhat.com>
10210
10211 * linux-low.c (lwp_in_step_range): New function.
10212 (linux_wait_1): If the thread was range stepping and stopped
10213 outside the stepping range, report the stop to GDB. Otherwise,
10214 continue stepping. Add range stepping debug output.
10215 (linux_set_resume_request): Copy the step range from the resume
10216 request to the lwp.
10217 (linux_supports_range_stepping): New.
10218 (linux_target_ops) <supports_range_stepping>: Set to
10219 linux_supports_range_stepping.
10220 * linux-low.h (struct linux_target_ops)
10221 <supports_range_stepping>: New field.
10222 (struct lwp_info) <step_range_start, step_range_end>: New fields.
10223 * linux-x86-low.c (x86_supports_range_stepping): New.
10224 (the_low_target) <supports_range_stepping>: Set to
10225 x86_supports_range_stepping.
10226 * server.c (handle_v_cont): Handle 'r' action.
10227 (handle_v_requests): Append ";r" if the target supports range
10228 stepping.
10229 * target.h (struct thread_resume) <step_range_start,
10230 step_range_end>: New fields.
10231 (struct target_ops) <supports_range_stepping>:
10232 New field.
10233 (target_supports_range_stepping): New macro.
10234
58794e1a
JB
102352013-05-17 Joel Brobecker <brobecker@adacore.com>
10236
10237 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
10238 confusion in comment.
10239
d631c5a7
JB
102402013-05-17 Joel Brobecker <brobecker@adacore.com>
10241
10242 * lynx-low.c (struct process_info_private): New type.
10243 (lynx_add_process): New function.
10244 (lynx_create_inferior, lynx_attach): Replace calls to
10245 add_process by calls to lynx_add_process.
10246 (lynx_resume): If PTID is null, then try using
10247 current_process()->private->last_wait_event_ptid.
10248 Add comments.
10249 (lynx_clear_inferiors): Delete. The contents of that function
10250 has been inlined in lynx_mourn;
10251 (lynx_wait_1): Save the ptid in the process's private data.
10252 (lynx_mourn): Free the process' private data. Replace call
10253 to lynx_clear_inferiors by call to clear_inferiors.
10254
96f7a20f
YQ
102552013-05-17 Yao Qi <yao@codesourcery.com>
10256
10257 * i386-low.c (i386_length_and_rw_bits): Move the comment to
10258 the right place.
10259
db0dfaa0
LM
102602013-05-16 Luis Machado <lgustavo@codesourcery.com>
10261
10262 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
10263 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
10264 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
10265 PT_TEXT_END_ADDR guards. Update comments.
10266 (linux_target_op) <read_offsets>: Conditionally define to
10267 linux_read_offsets if the target is UCLIBC and if it defines
10268 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
10269
68f5f838
SL
102702013-05-06 Sandra Loosemore <sandra@codesourcery.com>
10271 Andrew Jenner <andrew@codesourcery.com>
10272
10273 * Makefile.in (SFILES): Add linux-nios2-low.c.
10274 (clean): Add action to delete nios2-linux.c.
10275 (nios2-linux.c): New rule.
10276 * configure.srv: Add nios2*-*-linux*.
10277 * linux-nios2-low.c: New.
10278
1ebff1fd
HAQ
102792013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
10280
10281 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
10282
f6150862
HZ
102832013-04-25 Hui Zhu <hui@codesourcery.com>
10284
10285 PR gdb/15186
f6150862
HZ
10286 * ax.c (ax_printf): Add fflush.
10287
614c279d
TT
102882013-04-22 Tom Tromey <tromey@redhat.com>
10289
10290 * Makefile.in (SFILES): Add filestuff.c.
10291 (OBS): Add filestuff.o.
10292 (filestuff.o): New target.
10293 * config.in, configure: Rebuild.
10294 * configure.ac: Check for fdwalk, pipe2.
10295
7d4e5717
PA
102962013-04-17 Pedro Alves <palves@redhat.com>
10297
10298 * configure.ac (USE_THREAD_DB): Delete variable.
10299 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
10300 Don't AC_SUBST USE_THREAD_DB.
10301 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
10302 * config.in, configure: Regenerate.
10303
d5c93e41
PA
103042013-04-16 Pedro Alves <palves@redhat.com>
10305
10306 * linux-low.h (struct lwp_info) <thread_known>: Move under
10307 the USE_THREAD_DB #ifdef.
10308
04f5fe89
PA
103092013-04-16 Pedro Alves <palves@redhat.com>
10310
10311 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
10312 (linux-low.o): Delete rule.
10313 * linux-low.h: Always include "gdb_thread_db.h" instead of
10314 conditionally including thread_db.h.
10315 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
10316 HAVE_THREAD_DB_H.
10317
480b27bf
JK
103182013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
10319
10320 * Makefile.in (install-only): Fix make install regression.
10321
43662968
JK
103222013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
10323
10324 Convert man pages to texinfo, new gdbinit.5 texinfo page.
10325 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
10326 installation.
10327 * gdbserver.1: Remove.
10328
3e74e146
PA
103292013-03-22 Pedro Alves <palves@redhat.com>
10330
10331 * linux-low.c (handle_extended_wait): Don't call
10332 linux_enable_event_reporting.
10333
a8347a2a
TT
103342013-03-15 Tony Theodore <tonyt@logyst.com>
10335
10336 PR build/9098:
10337 * Makefile.in (SHELL): Use @SHELL@.
10338
eeb56fa7
SDJ
103392013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
10340
10341 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
10342 compiler warning.
10343
4fa7e2ff
JB
103442013-03-13 Joel Brobecker <brobecker@adacore.com>
10345
10346 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
10347 Remove extraneous NULL element.
10348
8ddb1965
YQ
103492013-03-13 Yao Qi <yao@codesourcery.com>
10350
10351 * tracepoint.c (traceframe_read_tsv): Look for the last matched
10352 'V' block in trace frame.
10353
9accd112
MM
103542013-03-11 Markus Metzger <markus.t.metzger@intel.com>
10355
10356 * target.h (struct target_ops): Add btrace ops.
10357 (target_supports_btrace): New macro.
10358 (target_enable_btrace): New macro.
10359 (target_disable_btrace): New macro.
10360 (target_read_btrace): New macro.
10361 * gdbthread.h (struct thread_info): Add btrace field.
10362 * server.c: Include btrace-common.h.
10363 (handle_btrace_general_set): New function.
10364 (handle_btrace_enable): New function.
10365 (handle_btrace_disable): New function.
10366 (handle_general_set): Call handle_btrace_general_set.
10367 (handle_qxfer_btrace): New function.
10368 (struct qxfer qxfer_packets[]): Add btrace entry.
10369 * inferiors.c (remove_thread): Disable btrace.
10370 * linux-low: Include linux-btrace.h.
10371 (linux_low_enable_btrace): New function.
10372 (linux_low_read_btrace): New function.
10373 (linux_target_ops): Add btrace ops.
10374 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
10375 Add srv_linux_btrace=yes.
10376 (x86_64-*-linux*): Add linux-btrace.o.
10377 Add srv_linux_btrace=yes.
10378 * configure.ac: Define HAVE_LINUX_BTRACE.
10379 * config.in: Regenerated.
10380 * configure: Regenerated.
10381
5cc22e4c
MM
103822013-03-11 Markus Metzger <markus.t.metzger@intel.com>
10383
10384 * server.c (handle_qxfer): Preserve error message if -3 is
10385 returned.
10386 (qxfer): Document the -3 return value.
10387
7c97f91e
MM
103882013-03-11 Markus Metzger <markus.t.metzger@intel.com>
10389
10390 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
10391 (linux_btrace_h): New variable.
10392 (linux-btrace.o): New rule.
10393
be9a119c 103942013-03-08 Stan Shebs <stan@codesourcery.com>
f6f899bf
HAQ
10395 Hafiz Abid Qadeer <abidh@codesourcery.com>
10396
10397 * tracepoint.c (trace_buffer_size): New global.
10398 (DEFAULT_TRACE_BUFFER_SIZE): New define.
10399 (init_trace_buffer): Change to one-argument function. Allocate
10400 trace buffer memory.
10401 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
10402 handle QTBuffer:size packet.
10403 (cmd_bigqtbuffer_size): New function.
10404 (initialize_tracepoint): Call init_trace_buffer with
10405 DEFAULT_TRACE_BUFFER_SIZE.
10406 * server.c (handle_query): Add QTBuffer:size in the
10407 supported packets.
10408
e64f7499
YQ
104092013-03-07 Yao Qi <yao@codesourcery.com>
10410
10411 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
10412 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
10413 of -1.
10414 (cmd_qtsp): Adjust condition. Do post increment.
10415 Set cur_action and cur_step_action back to 0.
10416
f0ae6fc3
PA
104172013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
10418
10419 PR server/15236
10420 * linux-low.c (linux_write_memory): Return early success if LEN is
10421 zero.
10422
b5b0b0af
CV
104232013-03-05 Corinna Vinschen <vinschen@redhat.de>
10424
334ad4a8 10425 * configure.srv: Add x86_64-*-cygwin* as target.
b5b0b0af 10426
589bc927
TT
104272013-02-28 Tom Tromey <tromey@redhat.com>
10428
10429 * configure.ac: Invoke AC_SYS_LARGEFILE.
10430 * configure, config.in: Rebuild.
10431
dfe07582
CV
104322013-02-28 Corinna Vinschen <vinschen@redhat.com>
10433
10434 * win32-low.c: Throughout, fix format strings and casts of
10435 printf-like functions to avoid type related warnings on all
10436 platforms.
10437 (get_child_debug_event): Print dwDebugEventCode as hex since
10438 that's how it's usually documented.
10439
736cd585
YQ
104402013-02-28 Yao Qi <yao@codesourcery.com>
10441
10442 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
10443 pulongest.
10444
e1f58301
JW
104452013-02-27 Jiong Wang <jiwang@tilera.com>
10446
10447 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
10448 (reg-tilegx32.c): New rule.
10449 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
10450 * linux-tile-low.c (tile_arch_setup): New function. Invoke
10451 different register info initializer according to elf class.
10452 (init_registers_tilgx32): New function. The tilegx32 register info
10453 initializer.
10454 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
10455 (tile_store_gregset): Likewise.
10456
d171ca78
YQ
104572013-02-27 Yao Qi <yao@codesourcery.com>
10458
10459 * server.c (process_point_options): Print debug message when
10460 debug_threads is true.
10461
282bbdf3
YQ
104622013-02-26 Yao Qi <yao@codesourcery.com>
10463
10464 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
10465
aca22551
PA
104662013-02-19 Pedro Alves <palves@redhat.com>
10467 Kai Tietz <ktietz@redhat.com>
10468
10469 PR gdb/15161
10470
10471 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
10472 instead of strtoul to extract address from packet.
10473 (process_serial_event) <'z'>: Likewise.
10474
4f3cee1c
YQ
104752013-02-18 Yao Qi <yao@codesourcery.com>
10476
10477 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
10478
8e1d55a3
PA
104792013-02-14 Pedro Alves <palves@redhat.com>
10480
10481 Plug memory leak.
10482
10483 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
10484 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
10485
458820da
PA
104862013-02-14 Pedro Alves <palves@redhat.com>
10487
10488 * tracepoint.c (cmd_qtdpsrc): Use savestring.
10489
baea0dae
PA
104902013-02-14 Pedro Alves <palves@redhat.com>
10491
10492 * tracepoint.c (save_string): Delete.
10493 (add_tracepoint_action): Use savestring instead of save_string.
10494
0b1afbb3
PA
104952013-02-12 Pedro Alves <palves@redhat.com>
10496
10497 * linux-xtensa-low.c: Ditto.
10498 * xtensa-xtregs.c: Ditto.
10499
8a4ac37e
PA
105002013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
10501
10502 * thread-db.c (thread_db_get_tls_address): NULL pointer check
10503 thread_db.
10504
148de6bb
MS
105052013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
10506
10507 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
10508 aarch64_num_wp_regs and aarch64_num_bp_regs to
10509 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
10510
55fac6e0
MS
105112013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
10512
10513 * linux-aarch64-low.c (ps_get_thread_area): Replace
10514 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
10515
176eb98c
MS
105162013-02-04 Jim MacArthur <jim.macarthur@arm.com>
10517 Marcus Shawcroft <marcus.shawcroft@arm.com>
10518 Nigel Stephens <nigel.stephens@arm.com>
10519 Yufeng Zhang <yufeng.zhang@arm.com>
10520
10521 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
10522 (aarch64.c, aarch64-without-fpu.c): New targets.
10523 * configure.srv (aarch64*-*-linux*): New.
10524 * linux-aarch64-low.c: New file.
10525
56f7af9c
MS
105262013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
10527
43aaf8b6 10528 * linux-low.c (handle_extended_wait, linux_create_inferior)
56f7af9c
MS
10529 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
10530 (dequeue_one_deferred_signal, linux_resume_one_thread)
10531 (fetch_register, linux_write_memory, linux_enable_event_reporting)
10532 (linux_tracefork_grandchild, linux_test_for_tracefork)
10533 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
10534 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
10535 where the argument is 0.
10536
60f662b0
YQ
105372013-01-25 Yao Qi <yao@codesourcery.com>
10538
10539 * event-loop.c: Include "queue.h".
10540 (gdb_event_p): New typedef.
10541 (struct gdb_event) <next_event>: Remove.
10542 (event_queue): Change to QUEUE(gdb_event_p).
10543 (async_queue_event): Remove.
10544 (gdb_event_xfree): New.
10545 (initialize_event_loop): New.
10546 (process_event): Use API from QUEUE.
10547 (wait_for_event): Likewise.
10548 * server.c (main): Call initialize_event_loop.
10549 * server.h (initialize_event_loop): Declare.
10550
5ae4861a
YQ
105512013-01-18 Yao Qi <yao@codesourcery.com>
10552
10553 * ax.h (struct eval_agent_expr_context): New.
10554 (gdb_eval_agent_expr): Update declaration.
10555 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
10556 TFRAME. Add new argument CTX.
10557 * server.h (struct eval_agent_expr_context): Declare.
10558 (agent_mem_read, agent_tsv_read): Update declaration.
10559 (agent_mem_read_string): Likewise.
10560 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
10561 (add_traceframe_block): Add new argument TPOINT.
10562 Increase TPOINT->traceframe_usage.
10563 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
10564 eval_tracepoint_agent_expr.
10565 (condition_true_at_tracepoint): Likewise.
10566 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
10567 (agent_mem_read_string, agent_tsv_read): Likewise.
10568
85e00e85
YQ
105692013-01-16 Yao Qi <yao@codesourcery.com>
10570
10571 * linux-low.c (linux_resume_one_lwp): Don't check
10572 'lwp->bp_reinsert != 0'.
10573
4039cf45
JB
105742013-01-07 Joel Brobecker <brobecker@adacore.com>
10575 Pedro Alves <palves@redhat.com>
10576
10577 * lynx-low.c (ptrace_request_to_str): Define a temporary
10578 macro and use it to simplify this function's implementation.
10579
9044dee2
JB
105802013-01-07 Joel Brobecker <brobecker@adacore.com>
10581
10582 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
10583 sets errno.
10584
e6352c8f
JB
105852013-01-07 Joel Brobecker <brobecker@adacore.com>
10586
10587 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
10588
50681a27
JB
105892013-01-07 Joel Brobecker <brobecker@adacore.com>
10590
10591 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
10592
3f6e77ef
JB
105932013-01-07 Joel Brobecker <brobecker@adacore.com>
10594
10595 * lynx-low.c (lynx_resume): Use the resume_info parameter
10596 to determine the ptid for the lynx_ptrace call, unless
10597 it is equal to minus_one_ptid, in which case we use the
10598 ptid of the current_inferior.
10599 (lynx_wait_1): After having received a thread create/exit
10600 event, resume the inferior's execution using the signaling
10601 thread's ptid, rather than the old ptid.
10602
7fda33ae
JB
106032013-01-07 Joel Brobecker <brobecker@adacore.com>
10604
10605 * lynx-low.c (lynx_resume): Delete variable ret.
10606
b9786c74
JB
106072013-01-01 Joel Brobecker <brobecker@adacore.com>
10608
10609 * gdbreplay.c (gdbreplay_version): Update copyright year.
10610 * server.c (gdbserver_version): Likewise.
10611
8b93d60f
JB
106122012-12-17 Joel Brobecker <brobecker@adacore.com>
10613
10614 * lynx-low.c (lynx_wait_1): Add debug trace before adding
10615 new thread.
10616
037335a7
JB
106172012-12-17 Joel Brobecker <brobecker@adacore.com>
10618
10619 * lynx-low.c (ptrace_request_to_str): Add handling for
10620 PTRACE_GETTRACESIG.
10621
52d4cbd8
JB
106222012-12-17 Joel Brobecker <brobecker@adacore.com>
10623
10624 * lynx-low.c (lynx_attach): Delete variable new_process.
10625
ab8f6ca9
JB
106262012-12-17 Joel Brobecker <brobecker@adacore.com>
10627
10628 * lynx-low.c (lynx_create_inferior): Delete variable
10629 new_process.
10630
78cbc024
JB
106312012-12-17 Joel Brobecker <brobecker@adacore.com>
10632
10633 * lynx-low.c (ptrace_request_to_str): Do not handle
10634 PTRACE_GETTHREADLIST if this macro does not exist.
10635
14a00470
YQ
106362012-12-15 Yao Qi <yao@codesourcery.com>
10637
10638 * Makefile.in (OBS): Add notif.o.
10639 * notif.c, notif.h: New.
10640 * server.c: Include "notif.h".
10641 (struct vstop_notif) <next>: Remove.
10642 <base>: New field.
10643 (queue_stop_reply): Update.
10644 (push_event, send_next_stop_reply): Remove.
10645 (discard_queued_stop_replies): Update.
10646 (notif_stop): New variable.
10647 (handle_v_stopped): Remove.
10648 (handle_v_requests): Don't call handle_v_stopped. Call
10649 handle_ack_notif instead.
10650 (queue_stop_reply_callback): Call notif_event_enque instead
10651 of queue_stop_reply.
10652 (handle_status): Don't call send_next_stop_reply, call
10653 notif_write_event instead.
10654 (kill_inferior_callback): Likewise.
10655 (detach_or_kill_inferior_callback): Likewise.
10656 (main): Call initialize_notif.
10657 (process_serial_event): Call QUEUE_is_empty.
10658 (handle_target_event): Call notif_push instead of push event.
10659 * server.h (push_event): Remove declaration.
10660
61c125b9
TT
106612012-12-10 Tom Tromey <tromey@redhat.com>
10662
10663 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
10664 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
10665 macros.
10666 (.c.o): Rewrite.
10667 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
10668 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
10669 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
10670 (amd64-linux-ipa.o, ax.o): Rewrite.
10671 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
10672 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
10673 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
10674 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
10675 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
10676 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
10677 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
10678 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
10679 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
10680 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
10681 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
10682 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
10683 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
10684 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
10685 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
10686 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
10687 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
10688 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
10689 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
10690 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
10691 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
10692 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
10693 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
10694 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
10695 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
10696 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
10697 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
10698 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
10699 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
10700 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
10701 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
10702 (reg-tilegx.o): Remove.
10703 (all_object_files): New macro.
10704 Include .deps files.
10705 * aclocal.m4, configure: Rebuild.
10706 * acinclude.m4: Include depstand.m4, lead-dot.m4.
10707 * configure.ac: Invoke ZW_CREATE_DEPDIR,
10708 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
10709
e90e9ad9
TT
107102012-12-05 Tom Tromey <tromey@redhat.com>
10711
10712 PR gdb/14917:
10713 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
10714
02d403bf 107152012-11-28 Markus Metzger <markus.t.metzger@intel.com>
945bf713
MM
10716
10717 * configure.ac: Check for linux/perf_event.h.
10718 * config.in: Regenerated.
10719 * configure: Regenerated.
10720
0270a750
PA
107212012-11-26 Maxime Villard <rustyBSD@gmx.fr>
10722
10723 * hostio.c (handle_readlink): Decrease buffer size
10724 parameter passed to readlink by one byte.
10725
8c29b58e
YQ
107262012-11-26 Yao Qi <yao@codesourcery.com>
10727
10728 * configure.ac (build_warnings): Append '-Wempty-body'.
10729 * configure: Regenerated.
10730 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
10731 body.
10732
8bdce1ff
PM
107332012-11-15 Pierre Muller <muller@sourceware.org>
10734
10735 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
10736 * config.in: Regenerate.
10737 * configure: Regenerate.
10738 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
10739 Use "gdb_wait.h" header instead of <sys/wait.h> header.
10740 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
10741 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
10742 header.
10743 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
10744 instead of <sys/wait.h> header.
10745 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
10746
02d403bf 107472012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3ba6ad0f
MM
10748
10749 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
10750 (various make rules): Remove -DGDBSERVER
10751
fbd5db48
YQ
107522012-11-09 Yao Qi <yao@codesourcery.com>
10753
10754 * spu-low.c (current_ptid): Move it to ..
10755 * gdbthread.h: ... here. New.
10756 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
10757 * server.c (myresume, process_serial_event): Likewise.
10758 * thread-db.c (thread_db_find_new_threads): Likewise.
10759 * tracepoint.c (run_inferior_command): Likewise.
10760
b3dc46ff
AB
107612012-10-01 Andrew Burgess <aburgess@broadcom.com>
10762
10763 * server.c (handle_search_memory_1): Include access length in
10764 warning message.
10765
07c04788
HPN
107662012-09-05 Michael Brandt <michael.brandt@axis.com>
10767
10768 * linux-crisv32-low.c: Fix compile errors.
10769
918d227b
YQ
107702012-09-04 Yao Qi <yao@codesourcery.com>
10771
10772 * tracepoint.c (cmd_qtsv): Adjust debug message.
10773 Don't check CUR_TPOINT.
10774
18c1b81a
YQ
107752012-08-28 Yao Qi <yao@codesourcery.com>
10776
10777 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
10778 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
10779 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
10780 Remove declarations of xmalloc, xreallloc, xstrdup and
10781 freeargv.
10782 * Makefile.in (libiberty_h): New.
10783 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
10784 (linux-bfin-low.o): Append dependency 'libiberty.h'.
10785
dc82f37b
YQ
107862012-08-23 Yao Qi <yao@codesourcery.com>
10787
10788 * server.h: Remove declaration of 'xsnprintf'.
10789
406b1477
KS
107902012-08-22 Keith Seitz <keiths@redhat.com>
10791
10792 * server.h: Include build-gnulib-gbserver/config.h.
10793 * gdbreplay.c: Likewise.
10794
e6712ff1
DE
107952012-08-08 Doug Evans <dje@google.com>
10796
10797 * Makefile.in (SFILES): Add gdb_vecs.c.
10798 (OBS): Add gdb_vecs.o.
10799 (gdb_vecs_h, host_defs_h): New variables.
10800 (thread-db.o): Add $(gdb_vecs_h) dependency.
10801 (gdb_vecs.o): New rule.
10802 * thread-db.c: #include "gdb_vecs.h".
10803 (thread_db_load_search): Use a vector to iterate over path elements.
10804 Handle text appearing after "$pdir".
10805
10806 * configure.ac: Add check for strstr.
10807 * config.in: Regenerate.
10808 * configure: Regenerate.
10809
7c3270ae
UW
108102012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
10811
10812 * hostio.c (handle_pread): If pread fails, fall back to attempting
10813 lseek/read.
10814 (handle_pwrite): Likewise for pwrite.
10815
b62e2b27
UW
108162012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
10817
10818 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
10819 between unsupported TYPE and unimplementable ADDR/LEN combination.
10820 (arm_insert_point): Act on new return value.
10821
78a99e91
PA
108222012-07-31 Pedro Alves <palves@redhat.com>
10823
10824 * server.c (process_point_options): Only skip tokens if we find
10825 one that is unrecognized. Don't treat 'X' specially while
10826 skipping unrecognized tokens.
10827
fcf303ab
UW
108282012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
10829
10830 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
10831 to 4-byte-align HW breakpoint addresses for Thumb.
10832
7255706c
YQ
108332012-07-27 Yao Qi <yao@codesourcery.com>
10834
10835 PR remote/14161.
10836
10837 * server.h: Declare gdb_agent_about_to_close.
10838 * target.c (kill_inferior): Include "agent.h".
10839 New. Send command 'kill'.
10840 * target.h (kill_inferior): Removed macro.
10841 * tracepoint.c (gdb_agent_about_to_close): New.
10842 (gdb_agent_helper_thread): Handle command 'close'.
10843 Wait endlessly until the inferior stops.
10844 Install gdb_agent_remove_socket to atexit hook.
10845 (agent_socket_name): New static variable.
10846 (gdb_agent_socket_init): Replace local variable 'name' with
10847 'agent_socket_name'.
10848 (gdb_agent_remove_socket): New.
10849
5a3f286f
YQ
108502012-07-27 Yao Qi <yao@codesourcery.com>
10851
10852 * server.c (process_point_options): Stop at 'X' when parsing.
10853
961bd387
ME
108542012-07-19 Michael Eager <eager@eagercon.com>
10855
a261b8f5 10856 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
961bd387
ME
10857 to hw_execute.
10858 * linux-x86-low.c (x86_insert_point, x86_remove_point):
10859 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
10860 hardware breakpoint.
10861
aa7c7447
JK
108622012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
10863
10864 * gdbserver/linux-low.c (initialize_low): Call
10865 linux_ptrace_init_warnings.
10866
7f216e7c
DE
108672012-07-02 Doug Evans <dje@google.com>
10868
10869 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
10870 pointer to int.
10871
d3ce09f5
SS
108722012-07-02 Stan Shebs <stan@codesourcery.com>
10873
10874 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
10875 (ax.o): Add it to build rule.
10876 (ax-ipa.o): Ditto.
10877 (OBS): Add format.o.
10878 (IPA_OBS): Add format.o.
10879 * server.c (handle_query): Claim support for breakpoint commands.
10880 (process_point_options): Add command case.
10881 (process_serial_event): Leave running if there are printfs in
10882 effect.
10883 * mem-break.h (any_persistent_commands): Declare.
10884 (add_breakpoint_commands): Declare.
10885 (gdb_no_commands_at_breakpoint): Declare.
10886 (run_breakpoint_commands): Declare.
10887 * mem-break.c (struct point_command_list): New struct.
10888 (struct breakpoint): New field command_list.
10889 (any_persistent_commands): New function.
10890 (add_commands_to_breakpoint): New function.
10891 (add_breakpoint_commands): New function.
10892 (gdb_no_commands_at_breakpoint): New function.
10893 (run_breakpoint_commands): New function.
10894 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
10895 locally.
10896 * ax.c: Include format.h.
10897 (ax_printf): New function.
10898 (gdb_eval_agent_expr): Add printf opcode.
10899
2f8f6aed
YQ
109002012-06-13 Yao Qi <yao@codesourcery.com>
10901
10902 * server.c (start_inferior): Remove duplicated writes to fields
10903 'last_resume_kind' and 'last_status' of 'current_inferior'.
10904
0c9070b3
YQ
109052012-06-12 Yao Qi <yao@codesourcery.com>
10906 Pedro Alves <palves@redhat.com>
10907
10908 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
10909 comment.
10910 * server.c (handle_v_cont): Extend comment.
10911
c52daf70
YQ
109122012-06-11 Yao Qi <yao@codesourcery.com>
10913
10914 * linux-low.c (linux_attach): Add 'static'.
10915
d38bbb0a
YQ
109162012-06-06 Yao Qi <yao@codesourcery.com>
10917
10918 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
10919
89dc0afd
JK
109202012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
10921
10922 Fix gcc -flto compilation warning.
10923 * server.c (main): Make variable multi_mode and attach volatile.
10924
75f62ce7
TJB
109252012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10926
10927 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
10928 if the platform doesn't know about it.
10929
65f479b6
PA
109302012-05-30 Jeff Kenton <jkenton@tilera.com>
10931
10932 * Makefile.in (SFILES): Add linux-tile-low.c.
10933 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
10934 * configure.srv: Handle tilegx-*-linux*.
10935 * linux-tile-low.c: New file.
10936
0c5bf5a9
JK
109372012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10938
10939 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
10940
a493e3e2
PA
109412012-05-24 Pedro Alves <palves@redhat.com>
10942
10943 PR gdb/7205
10944
43aaf8b6 10945 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
a493e3e2 10946
2ea28649
PA
109472012-05-24 Pedro Alves <palves@redhat.com>
10948
10949 PR gdb/7205
10950
10951 Replace target_signal with gdb_signal throughout.
10952
8d409d16
MR
109532012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
10954
10955 * linux-low.c (linux_store_registers): Avoid the copying sequence
10956 when no data has been retrieved by ptrace.
10957
23512c01
MGD
109582012-05-22 Will Deacon <will.deacon@arm.com>
10959
10960 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
10961 Include asm/ptrace.h.
10962 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
10963 already defined.
10964
4934b29e
MR
109652012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
10966
10967 * linux-low.c (linux_store_registers): Don't re-retrieve data
10968 with ptrace that has already been obtained from /proc. Always
10969 copy any data retrieved with ptrace to the buffer supplied.
10970
bde24c0a
PA
109712012-05-11 Yao Qi <yao@codesourcery.com>
10972 Pedro Alves <palves@redhat.com>
10973
10974 * linux-low.c (enum stopping_threads_kind): New.
10975 (stopping_threads): Change type to `enum stopping_threads_kind'.
10976 (handle_extended_wait): If stopping and suspending threads, leave
10977 the new_lwp suspended too.
10978 (linux_wait_for_event): Adjust.
10979 (stop_all_lwps): Set `stopping_threads' to
10980 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
10981 whether we're suspending threads or just stopping them. Assert no
10982 recursion happens.
10983
623b6bdf
YQ
109842012-04-29 Yao Qi <yao@codesourcery.com>
10985
10986 * server.h: Move some code to ...
10987 * gdbthread.h: ... here. New.
10988 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
10989 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
10990 (nto-low.o, win32-low.o): Likewise.
10991 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
10992 * regcache.c, remote-utils.c, server.c: Likewise.
10993 * target.c, tracepoint.c, win32-low.c: Likewise.
10994
f15f9948
TJB
109952012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10996
10997 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
10998 (PTRACE_ARG4_TYPE): Likewise.
10999 (PTRACE_XFER_TYPE): Likewise.
11000 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
11001 ptrace to PTRACE_ARG3_TYPE.
11002 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
11003 (PTRACE_ARG4_TYPE): Likewise.
11004 (PTRACE_XFER_TYPE): Likewise.
11005 (linux_detach_one_lwp): Cast fourth argument of
11006 ptrace to long then PTRACE_ARG4_TYPE.
11007 (regsets_fetch_inferior_registers): Cast third argument of
11008 ptrace to long then PTRACE_ARG3_TYPE.
11009 (regsets_store_inferior_registers): Likewise.
11010
38ea300a
PA
110112012-04-20 Pedro Alves <palves@redhat.com>
11012
11013 * configure: Regenerate.
11014
c971b7fa
PA
110152012-04-19 Pedro Alves <palves@redhat.com>
11016
43aaf8b6 11017 * Makefile.in (GNULIB_BUILDDIR): New.
c971b7fa 11018 (LIBGNU, INCGNU, GNULIB_H): Adjust.
43aaf8b6
PA
11019 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
11020 (all, install-only, uninstall, clean-info, all-lib, clean): No
11021 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
11022 (maintainer-clean realclean distclean): Use subdir_do.
11023 (subdir_do): New.
11024 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
c971b7fa 11025 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
43aaf8b6
PA
11026 * acinclude.m4: Include acx_configure_dir.m4.
11027 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
11028 calls. Call AC_PROG_RANLIB. Configure gnulib using
11029 ACX_CONFIGURE_DIR.
11030 (GNULIB): New.
11031 (GNULIB_STDINT_H): Adjust.
11032 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
11033 * gdbreplay.c: Include build-gnulib/config.h.
11034 * server.h: Likewise.
11035 * aclocal.m4: Regenerate.
11036 * config.in: Regenerate.
11037 * configure: Regenerate.
c971b7fa 11038
809277f8
PA
110392012-04-19 Pedro Alves <palves@redhat.com>
11040
11041 * Makefile.in (LIBGNU, INCGNU): Adjust.
11042 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
11043 (all, install-only, uninstall, clean-info, all-lib, clean)
11044 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
11045 * configure.ac: Adjust AC_OUTPUT output.
11046 * aclocal.m4: Regenerate.
11047 * configure: Regenerate.
11048
fd9bb8b8
PA
110492012-04-19 Pedro Alves <palves@redhat.com>
11050
11051 * Makefile.in (generated_files): New.
11052 (server_h): Remove the explicit dependency on config.h, and depend
11053 on $generated_files.
11054
1c298c66
PA
110552012-04-19 Pedro Alves <palves@redhat.com>
11056
11057 * Makefile.in (INCGNU): Add -Ignulib.
11058
57c4b50b
PA
110592012-04-19 Pedro Alves <palves@redhat.com>
11060
11061 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
11062 (INCGNU): ... this, and spell out -I here.
11063 (GNULIB_LIB): Rename to ...
11064 (LIBGNU): ... this.
11065 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
11066
1030e047
PA
110672012-04-19 Pedro Alves <palves@redhat.com>
11068
11069 * config.in: Regenerate.
11070
447d4319
PA
110712012-04-19 Pedro Alves <palves@redhat.com>
11072
11073 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
11074 * server.h (memmem): Remove declaration.
11075 * config.in: Regenerate.
11076 * configure: Regenerate.
11077
aad9eab9
YQ
110782012-04-19 Yao Qi <yao@codesourcery.com>
11079
11080 * Makefile.in (SFILES): Add common/vec.c.
11081 (OBS): Add vec.o.
11082 (vec.o): New rule.
11083
3e10640f
YQ
110842012-04-19 Yao Qi <yao@codesourcery.com>
11085
11086 * remote-utils.c (prepare_resume_reply): Replace with macro
11087 target_core_of_thread.
11088 * server.c (handle_qxfer_threads_proper): Likewise.
11089 * target.h (traget_core_of_thread): New macro.
11090
71622373
PA
110912012-04-18 Pedro Alves <palves@redhat.com>
11092
11093 * aclocal.m4: Regenerate.
11094 * configure: Regenerate.
11095
80d26939
YQ
110962012-04-16 Yao Qi <yao@codesourcery.com>
11097
11098 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
11099 duplicated on address.
11100
42476b70
YQ
111012012-04-16 Yao Qi <yao@codesourcery.com>
11102
11103 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
11104 (struct tracepoint_action_ops) <send>: New field.
11105 (m_tracepoint_action_send, r_tracepoint_action_send): New.
11106 (agent_expr_send, x_tracepoint_action_send): New.
11107 (l_tracepoint_action_send): New.
11108 (cmd_qtdp): Download and install tracepoint
11109 according to `use_agent'.
11110 (run_inferior_command): Add one more parameter `len'.
11111 Update callers.
11112 (tracepoint_send_agent): New.
11113 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
11114
7bc83639
YQ
111152012-04-16 Yao Qi <yao@codesourcery.com>
11116
11117 * tracepoint.c (download_tracepoints): Moved to ...
11118 (cmd_qtstart): ... here.
11119
5f18041e
YQ
111202012-04-14 Yao Qi <yao@codesourcery.com>
11121
11122 * tracepoint.c: Include inttypes.h.
11123 (struct collect_memory_action): Use sized types.
11124 (struct tracepoint): Likewise.
11125 (cmd_qtdp, stop_tracing): Update print specifiers.
11126 (cmd_qtp, response_tracepoint): Likewise.
11127 (collect_data_at_tracepoint): Likewise.
11128 (collect_data_at_step): Likewise.
11129
55a8c076
YQ
111302012-04-14 Yao Qi <yao@codesourcery.com>
11131
11132 Import gnulib module inttypes.
11133 * aclocal.m4, config.in, configure: Regenerated.
11134
dc750257
YQ
111352012-04-14 Yao Qi <yao@codesourcery.com>
11136
11137 * Makefile.in (maintainer-clean, realclean, distclean): Remove
11138 Makefile and config.status at last.
11139
0ab5faf9
YQ
111402012-04-13 Yao Qi <yao@codesourcery.com>
11141
11142 * tracepoint.c: Include stdint.h unconditionally.
11143
18f5fd81
TJB
111442012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
11145
11146 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
11147 on BFD_HAVE_SYS_PROCFS_TYPE.
11148 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
11149 * configure: Regenerate.
11150 * config.in: Likewise.
11151
4d47af5c
L
111522012-04-13 H.J. Lu <hongjiu.lu@intel.com>
11153
11154 * Makefile.in (clean): Also remove x32.c x32-linux.c
11155 x32-avx.c x32-avx-linux.c.
11156 (x32.o): New target.
11157 (x32.c): Likewise.
11158 (x32-linux.o): Likewise.
11159 (x32-linux.c): Likewise.
11160 (x32-avx.o): Likewise.
11161 (x32-avx.c): Likewise.
11162 (x32-avx-linux.o): Likewise.
11163 (x32-avx-linux.c): Likewise.
11164
11165 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
11166 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
11167 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
11168 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
11169 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
11170 i386/x32-avx-linux.xml.
11171
11172 * linux-x86-low.c (init_registers_x32_linux): New prototype.
11173 (init_registers_x32_avx_linux): Likwise.
11174 (x86_linux_update_xmltarget): Call init_registers_x32_linux
11175 or init_registers_x32_avx_linux if linux_is_elf64 is false.
11176
ecedbe58
PA
111772012-04-13 Pedro Alves <palves@redhat.com>
11178
11179 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
11180 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
11181 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
11182 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
11183 the sub-make.
11184
c92b5177
L
111852012-04-12 H.J. Lu <hongjiu.lu@intel.com>
11186
11187 * linux-x86-low.c (compat_x32_clock_t): New.
11188 (compat_x32_siginfo_t): Likewise.
11189 (compat_x32_siginfo_from_siginfo): Likewise.
11190 (siginfo_from_compat_x32_siginfo): Likewise.
11191 (linux_is_elf64): Likewise.
11192 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
11193 and siginfo_from_compat_x32_siginfo for x32.
11194 (x86_arch_setup): Set linux_is_elf64.
11195
214d508e
L
111962012-04-12 H.J. Lu <hongjiu.lu@intel.com>
11197
11198 PR gdb/13969
11199 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
11200 e_machine field.
11201 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
11202 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
11203 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
11204 compatible with process.
11205
c9a1864a
YQ
112062012-04-12 Yao Qi <yao@codesourcery.com>
11207
11208 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
11209 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
11210 (install-only, install-info, clean): Handle sub dir gnulib.
11211 (all-lib, am--refresh): New targets.
11212 (memmem.o): Remove target.
11213 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
11214 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
11215 (AC_REPLACE_FUNCS): Remove memmem.
11216 Invoke gl_INIT and AM_INIT_AUTOMAKE.
11217 (AC_OUTPUT): Generate Makefile in gnulib/.
11218 * aclocal.m4, config.in, configure: Regenerated.
11219
367ba2c2
MR
112202012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
11221
11222 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
11223
9d236627
PA
112242012-04-05 Pedro Alves <palves@redhat.com>
11225
11226 -Werror=strict-aliasing
11227
11228 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
11229 pointer.
11230
111217b3
PA
112312012-04-04 Pedro Alves <palves@redhat.com>
11232
11233 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
11234 (sparc_store_gregset_from_stack, sparc_store_gregset)
11235 (sparc_breakpoint_at): Fix formatting.
11236
8365dcf5
TJB
112372012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
11238
11239 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
11240 are available.
11241 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
11242 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
11243 * config.in: Regenerate.
11244 * configure: Likewise.
11245
689cc2ae
PA
112462012-03-29 Pedro Alves <palves@redhat.com>
11247
11248 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
11249 Correct ptrace arguments.
11250
c14dfd32
PA
112512012-03-28 Pedro Alves <palves@redhat.com>
11252
11253 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
11254 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
11255 (IA64_FR1_REGNUM): New defines.
11256 (ia64_fetch_register): New.
11257 (the_low_target): Install it.
11258 * linux-low.h (struct linux_target_ops) <fetch_register>: New
11259 field.
11260 * linux-low.c (linux_fetch_registers): Try the
11261 the_low_target.fetch_register hook first.
11262
11263 * linux-arm-low.c (the_low_target): Adjust.
11264 * linux-bfin-low.c (the_low_target): Adjust.
11265 * linux-cris-low.c (the_low_target): Adjust.
11266 * linux-crisv32-low.c (the_low_target): Adjust.
11267 * linux-m32r-low.c (the_low_target): Adjust.
11268 * linux-m68k-low.c (the_low_target): Adjust.
11269 * linux-mips-low.c (the_low_target): Adjust.
11270 * linux-ppc-low.c (the_low_target): Adjust.
11271 * linux-s390-low.c (the_low_target): Adjust.
11272 * linux-sh-low.c (the_low_target): Adjust.
11273 * linux-sparc-low.c (the_low_target): Adjust.
11274 * linux-tic6x-low.c (the_low_target): Adjust.
11275 * linux-x86-low.c (the_low_target): Adjust.
11276 * linux-xtensa-low.c (the_low_target): Adjust.
11277
63c88e13
PA
112782012-03-26 Pedro Alves <palves@redhat.com>
11279
11280 * server.c (handle_qxfer_libraries): Don't bail early if
11281 the_target->qxfer_libraries_svr4 is not NULL.
11282
fb723180
PA
112832012-03-26 Pedro Alves <palves@redhat.com>
11284
11285 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
11286
0afae3cf
PA
112872012-03-23 Pedro Alves <palves@redhat.com>
11288
11289 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
11290 "library-list-svr4" element's start tag when the the DSO list is
11291 empty.
11292
485f1ee4
PA
112932012-03-23 Pedro Alves <palves@redhat.com>
11294
11295 * linux-low.c (read_one_ptr): Read the inferior's pointer through
11296 a variable whose type size is the same as the inferior's pointer
11297 size.
11298
a5362b9a
TS
112992012-03-21 Thomas Schwinge <thomas@codesourcery.com>
11300
11301 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
11302 struct siginfo.
11303 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
11304 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
11305 * linux-low.h: Include <signal.h>.
11306 (struct siginfo): Remove forward declaration.
11307 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
11308 struct siginfo.
11309
d226c142
MF
113102012-03-21 Mike Frysinger <vapier@gentoo.org>
11311
11312 * .gitignore: Ignore more files.
11313
122f36ef
PA
113142012-03-19 Pedro Alves <palves@redhat.com>
11315 Jan Kratochvil <jan.kratochvil@redhat.com>
11316
11317 * server.c (cont_thread, general_thread): Add describing comments.
11318 (start_inferior): Clear `cont_thread'.
11319 (handle_v_cont): Don't set `cont_thread' if resuming all threads
11320 of a process.
11321
fc3e5175
YQ
113222012-03-15 Yao Qi <yao@codesourcery.com>
11323
11324 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
11325 handling to ...
11326 (cmd_qtdp): ... here.
11327
8d0d92cd
YQ
113282012-03-15 Yao Qi <yao@codesourcery.com>
11329
11330 * tracepoint.c (struct tracepoint_action_ops): New.
11331 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
11332 (m_tracepoint_action_download): New.
11333 (r_tracepoint_action_download): New.
11334 (x_tracepoint_action_download): New.
11335 (l_tracepoint_action_download): New.
11336 (add_tracepoint_action): Install `action->ops' according type.
11337 (download_tracepoint_1): Move code `download' function pointer
11338 of various tracepoint_action_ops.
11339
87b0bb13
JK
113402012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
11341
11342 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
11343 linux_ptrace_attach_warnings.
11344
5f572dec
JK
113452012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
11346
11347 * Makefile.in (linux-ptrace.o): New.
11348 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
11349 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
11350 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
11351 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
11352 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
11353 of these targets.
11354 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
11355
f4647387
YQ
113562012-03-08 Yao Qi <yao@codesourcery.com>
11357 Pedro Alves <palves@redhat.com>
11358
11359 Fix PR server/13392.
11360 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
11361 offset of JMP insn.
11362 * tracepoint.c (remove_tracepoint): New.
11363 (cmd_qtdp): Call remove_tracepoint when failed to install.
11364
9b224c5e
PA
113652012-03-07 Pedro Alves <palves@redhat.com>
11366
11367 * linux-low.c (get_detach_signal): New.
11368 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
11369 Pass on pending signals to PTRACE_DETACH. Check the result of the
11370 ptrace call.
11371 * server.c (program_signals, program_signals_p): New.
11372 (handle_general_set): Handle QProgramSignals.
11373 * server.h (program_signals, program_signals_p): Declare.
11374
e237a7e2
JK
113752012-03-05 Pedro Alves <palves@redhat.com>
11376 Jan Kratochvil <jan.kratochvil@redhat.com>
11377
11378 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
11379 New comment why.
11380
5808517f
YQ
113812012-03-03 Yao Qi <yao@codesourcery.com>
11382
11383 * tracepoint.c (tracepoint_look_up_symbols): Update call to
11384 agent_look_up_symbols.
11385
58b4daa5
YQ
113862012-03-03 Yao Qi <yao@codesourcery.com>
11387
11388 * Makefile.in (linux-low.o): Keep dependence on agent.h.
11389 (linux-x86-low.o): Likewise.
11390 * server.h: Remove in_process_agent_loaded.
11391 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
11392 common/agent.c.
11393 Update callers.
11394
8ffcbaaf
YQ
113952012-03-03 Yao Qi <yao@codesourcery.com>
11396
11397 * tracepoint.c (gdb_agent_capability): New global.
11398 (in_process_agent_loaded_ust): Renamed to
11399 `in_process_agent_supports_ust'.
11400 Update callers.
11401 (in_process_agent_supports_ust): Call agent_capability_check.
11402 (clear_installed_tracepoints): Assert that agent supports
11403 agent.
11404
d1feda86
YQ
114052012-03-03 Yao Qi <yao@codesourcery.com>
11406
11407 * linux-low.c (linux_supports_agent): New.
11408 (linux_target_ops): Initialize field `supports_agent' with
11409 linux_supports_agent.
11410 * target.h (struct target_ops) <supports_agent>: New.
11411 (target_supports_agent): New macro.
11412 * server.c (handle_general_set): Handle packet 'QAgent'.
11413 (handle_query): Send `QAgent+'.
11414 * Makefile.in (server.o): Depends on agent.h.
11415
2fa291ac
YQ
114162012-03-03 Yao Qi <yao@codesourcery.com>
11417
11418 * Makefile.in (OBS): Add agent.o.
11419 Add new rule for agent.o.
11420 Track dependence of tracepoint.c on agent.h.
11421 * tracepoint.c (run_inferior_command_1):
11422 (run_inferior_command): Call agent_run_command.
11423 (gdb_ust_connect_sync_socket): Deleted. Move it to
11424 common/agent.c.
11425 (resume_thread, stop_thread): Likewise.
11426 (gdb_ust_socket_init): Renamed to ...
11427 (gdb_agent_socket_init): ... New.
11428 (gdb_ust_thread): Renamed to ...
11429 (gdb_agent_helper_thread): ... New.
11430 (gdb_ust_init): Move some code to ...
11431 (gdb_agent_init): ... here. New.
11432 [HAVE_UST]: Call gdb_ust_init.
11433 (initialize_tracepoint_ftlib): Call gdb_agent_init.
11434 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
11435 * config.in, configure: Regenerated.
11436
05044653
PA
114372012-03-02 Pedro Alves <palves@redhat.com>
11438
11439 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
11440 * linux-low.c (struct simple_pid_list): New.
11441 (stopped_pids): New a struct simple_pid_list pointer.
11442 (add_to_pid_list, pull_pid_from_list): New.
11443 (handle_extended_wait): Don't assume the first signal new children
11444 report is SIGSTOP. Adjust call to pull_pid_from_list.
11445 (linux_wait_for_lwp): Adjust.
11446
8d00225b
YQ
114472012-03-02 Yao Qi <yao@codesourcery.com>
11448
11449 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
11450 debug log.
11451
19560ba5
YQ
114522012-03-02 Yao Qi <yao@codesourcery.com>
11453
11454 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
11455 `stop_pc' and `tpoint'. Update caller.
11456
1faeff08
MR
114572012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
11458
11459 * linux-low.h (linux_target_ops): Add regset_bitmap member.
11460 * linux-low.c (use_linux_regsets): New macro.
11461 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
11462 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
11463 (linux_register_in_regsets): New function.
11464 (usr_fetch_inferior_registers): Skip registers covered by
11465 regsets.
11466 (usr_store_inferior_registers): Likewise.
11467 (usr_fetch_inferior_registers): New macro.
11468 (usr_store_inferior_registers): Likewise.
11469 (linux_fetch_registers): Handle mixed regset/non-regset targets.
11470 (linux_store_registers): Likewise.
11471 * linux-mips-low.c (init_registers_mips_dsp_linux): New
11472 prototype.
11473 (init_registers_mips64_dsp_linux): Likewise.
11474 (init_registers_mips_linux): New macro.
11475 (init_registers_mips_dsp_linux): Likewise.
11476 (mips_dsp_num_regs): Likewise.
11477 (DSP_BASE, DSP_CONTROL): New fallback macros.
11478 (mips_base_regs): New macro.
11479 (mips_regmap): Use it. Fix the size.
11480 (mips_dsp_regmap): New variable.
11481 (mips_dsp_regset_bitmap): Likewise.
11482 (mips_arch_setup): New function.
11483 (mips_cannot_fetch_register): Use the_low_target.regmap rather
11484 than mips_regmap.
11485 (mips_cannot_store_register): Likewise.
11486 (the_low_target): Update .arch_setup, .num_regs and .regmap
11487 initializers. Add .regset_bitmap initializer.
11488 * linux-arm-low.c (the_low_target): Add .regset_bitmap
11489 initializer.
11490 * linux-bfin-low.c (the_low_target): Likewise.
11491 * linux-cris-low.c (the_low_target): Likewise.
11492 * linux-crisv32-low.c (the_low_target): Likewise.
11493 * linux-ia64-low.c (the_low_target): Likewise.
11494 * linux-m32r-low.c (the_low_target): Likewise.
11495 * linux-m68k-low.c (the_low_target): Likewise.
11496 * linux-ppc-low.c (the_low_target): Likewise.
11497 * linux-s390-low.c (the_low_target): Likewise.
11498 * linux-sh-low.c (the_low_target): Likewise.
11499 * linux-sparc-low.c (the_low_target): Likewise.
11500 * linux-tic6x-low.c (the_low_target): Likewise.
11501 * linux-x86-low.c (the_low_target): Likewise.
11502 * linux-xtensa-low.c (the_low_target): Likewise.
11503 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
11504 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
11505 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
11506 srv_xmlfiles.
11507 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
11508 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
11509
c03e6ccc
YQ
115102012-02-29 Yao Qi <yao@codesourcery.com>
11511 Pedro Alves <palves@redhat.com>
11512
11513 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
11514 `step_over_finished' is true.
11515
644cebc9
PA
115162012-02-27 Pedro Alves <palves@redhat.com>
11517
11518 * linux-low.c (pid_is_stopped): Delete, moved to common/.
11519 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
11520
c14d7ab2
PA
115212012-02-27 Pedro Alves <palves@redhat.com>
11522
11523 PR server/9684
11524 * linux-low.c (pid_is_stopped): New.
11525 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
11526
412c89dd
LM
115272012-02-25 Luis Machado <lgustavo@codesourcery.com>
11528
11529 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
11530 of conditions.
11531
b745defe
MR
115322012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
11533
11534 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
11535
9f3a5c85
LM
115362012-02-24 Luis Machado <lgustavo@codesourcery>
11537
11538 * server.c (handle_query): Advertise support for target-side
11539 breakpoint condition evaluation.
11540 (process_point_options): New function.
11541 (process_serial_event): When inserting a breakpoint, check for
11542 a target-side condition that should be evaluated.
11543
11544 * mem-break.c: Include regcache.h and ax.h.
11545 (point_cond_list_t): New data structure.
11546 (breakpoint) <cond_list>: New field.
11547 (find_gdb_breakpoint_at): Make non-static.
11548 (delete_gdb_breakpoint_at): Clear any target-side
11549 conditions.
11550 (clear_gdb_breakpoint_conditions): New function.
11551 (add_condition_to_breakpoint): Likewise.
11552 (add_breakpoint_condition): Likewise.
11553 (gdb_condition_true_at_breakpoint): Likewise.
11554 (gdb_breakpoint_here): Return result directly instead
11555 of going through a local variable.
11556
11557 * mem-break.h (find_gdb_breakpoint_at): New prototype.
11558 (clear_gdb_breakpoint_conditions): Likewise.
11559 (add_breakpoint_condition): Likewise.
11560 (gdb_condition_true_at_breakpoint): Likewise.
11561
11562 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
11563 (need_step_over_p): Take target-side breakpoint condition into
11564 consideration.
11565
5e1dc496
LM
115662012-02-24 Luis Machado <lgustavo@codesourcery>
11567
11568 * server.h: Include tracepoint.h.
11569 (agent_mem_read, agent_get_trace_state_variable_value,
11570 agent_set_trace_state_variable_value,
11571 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
11572 get_set_tsv_func_addr): New prototypes.
11573
11574 * ax.h: New include file.
11575 * ax.c: New source file.
11576
11577 * tracepoint.c: Include ax.h.
11578 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
11579 agent_expr, eval_result_type): Move to ax.h.
11580 (parse_agent_expr): Rename to ...
11581 (gdb_parse_agent_expr): ... this, make it non-static and move
11582 to ax.h.
11583 (unparse_agent_expr) Rename to ...
11584 (gdb_unparse_agent_expr): ... this, make it non-static and move
11585 to ax.h.
11586 (eval_agent_expr): Rename to ...
11587 (eval_tracepoint_agent_expr): ... this.
11588 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
11589 forward declarations.
11590 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
11591 (agent_get_trace_state_variable_value): New function.
11592 (agent_set_trace_state_variable_value): New function.
11593 (cmd_qtdp): Call gdb_parse_agent_expr (...).
11594 (response_tracepoint): Call gdb_unparse_agent_expr (...).
11595 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
11596 (condition_true_at_tracepoint): Likewise.
11597 (parse_agent_expr): Rename to ...
11598 (gdb_parse_agent_expr): ... this and move to ax.c.
11599 (unparse_agent_expr): Rename to ...
11600 (gdb_unparse_agent_expr): ... this and move to ax.c.
11601 (gdb_agent_op_name): Move to ax.c.
11602 (eval_agent_expr): Rename to ...
11603 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
11604 and move to ax.c.
11605 (eval_tracepoint_agent_expr): New function.
11606 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
43aaf8b6 11607 non-static.
5e1dc496
LM
11608 (current_insn_ptr, emit_error, struct bytecode_address): Move to
11609 ax.c.
11610 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
11611 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
11612 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
11613 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
11614 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
11615 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
11616 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
11617 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
11618 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
11619 (compile_bytecodes): Remove forward declaration.
11620 (is_goto_target): Move to ax.c.
11621 (compile_bytecodes): Move to ax.c and call
11622 agent_get_trace_state_variable_value (...) and
11623 agent_set_trace_state_variable_value (...).
11624
11625 * Makefile.in: Update ax.c and IPA dependencies.
11626
277e4e52
PA
116272012-02-24 Pedro Alves <palves@redhat.com>
11628
11629 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
11630 (cmd_bigqtbuffer_circular): ... this. Only handle
11631 'QTBuffer:circular:'.
11632 (handle_tracepoint_general_set): Adjust.
11633
bf4c19f7
YQ
116342012-02-16 Yao Qi <yao@codesourcery.com>
11635
11636 * inferiors.c: Move code to ...
11637 * dll.c: .... here. New.
11638 * server.h: Declare clear_dlls.
11639 * Makefile.in (SFILES): Add dll.c.
11640 (OBS): Add dll.o
11641 (dll.o): New rule.
11642
d73f2619
YQ
116432012-02-11 Yao Qi <yao@codesourcery.com>
11644
11645 * server.c: (handle_monitor_command): Add a new parameter
11646 `own_buf'.
11647 (handle_query): Update caller.
11648
f8255c2a
JB
116492012-02-09 Joel Brobecker <brobecker@adacore.com>
11650
11651 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
11652 * configure, config.in: Regenerate.
11653 * hostio.c: Provide an alternate implementation if HAVE_READLINK
11654 is not defined.
11655
da84f473
PA
116562012-02-02 Pedro Alves <palves@redhat.com>
11657
11658 Try SIGKILL first, then PTRACE_KILL.
11659 * linux-low.c (linux_kill_one_lwp): New.
11660 (linux_kill_one_lwp): Rename to ...
11661 (kill_one_lwp_callback): ... this. Use the new
11662 linux_kill_one_lwp.
11663
e886a173
PA
116642012-02-02 Pedro Alves <palves@redhat.com>
11665
11666 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
11667 inferior.
11668
be07f1a2
PA
116692012-01-27 Pedro Alves <palves@redhat.com>
11670
11671 * linux-low.c (linux_child_pid_to_exec_file): Delete.
11672 (elf_64_file_p): Make static.
11673 (linux_pid_exe_is_elf_64_file): New.
11674 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
11675 Delete declarations.
11676 (linux_pid_exe_is_elf_64_file): Declare.
11677 * linux-x86-low.c (x86_arch_setup): Use
11678 linux_pid_exe_is_elf_64_file.
11679
d8301ad1
JK
116802012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
11681
11682 * linux-low.c (linux_wait_for_event_1): Rename to ...
11683 (linux_wait_for_event): ... here and merge it with former
11684 linux_wait_for_event - new variable wait_ptid, use it.
11685 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
11686
01b17894
PA
116872012-01-23 Pedro Alves <palves@redhat.com>
11688
11689 * server.c (main): Avoid yet another case of infinite loop while
11690 detaching/killing after a longjmp.
11691
e825046f
JK
116922012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
11693
11694 Code cleanup.
11695 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
11696
b9e7b9c3
UW
116972012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
11698
11699 * hostio.c (handle_readlink): New function.
11700 (handle_vFile): Call it to handle "vFile:readlink" packets.
11701
901f9912
UW
117022012-01-20 Pedro Alves <palves@redhat.com>
11703 Ulrich Weigand <ulrich.weigand@linaro.org>
11704
11705 * server.c (handle_v_requests): Only support vAttach and vRun to
11706 start multiple processes when in extended protocol mode.
11707
fc1ab1a0
PA
117082012-01-17 Pedro Alves <palves@redhat.com>
11709
11710 * tracepoint.c (initialize_tracepoint): Use mmap instead of
11711 memalign plus mprotect to allocate the scratch buffer.
11712
7d5d4e98
PA
117132012-01-13 Pedro Alves <palves@redhat.com>
11714
11715 * server.c (attach_inferior): Clear `cont_thread'.
11716
f128d5e9
PA
117172012-01-13 Pedro Alves <palves@redhat.com>
11718
11719 * server.c (main): Avoid infinite loop while detaching/killing
11720 after a longjmp.
11721
06db92f0
DE
117222012-01-09 Doug Evans <dje@google.com>
11723
11724 * server.c (start_inferior): Set last_ptid in --wrapper case.
11725
32d92999
YQ
117262012-01-06 Yao Qi <yao@codesourcery.com>
11727
11728 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
11729 defined.
11730 [IN_PROCESS_AGENT] (debug_agent): New global variable.
11731
5e0a92a9
YQ
117322012-01-04 Yao Qi <yao@codesourcery.com>
11733
11734 * tracepoint.c (cmd_qtdp): Print debug message
11735 for static tracepoint.
11736
ae639e8c
YQ
117372012-01-04 Yao Qi <yao@codesourcery.com>
11738
11739 * tracepoint.c (trace_vdebug): Differentiate debug message
11740 between gdbserver and IPA.
11741
f72429c5
YQ
117422012-01-03 Yao Qi <yao@codesourcery.com>
11743
11744 * tracepoint.c (tracepoint_was_hit): Don't collect for
11745 static tracepoint.
11746
12c3e59c
JB
117472012-01-02 Joel Brobecker <brobecker@adacore.com>
11748
11749 * terminal.h: Reformat copyright header.
11750
67827812
JB
117512012-01-02 Joel Brobecker <brobecker@adacore.com>
11752
11753 * server.c (gdbserver_version): Update copyright year.
11754 * gdbreplay.c (gdbreplay_version): Likewise.
11755
3e52c33d
JK
117562011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
11757
11758 * linux-low.c (linux_create_inferior): Put empty if clause for write.
11759
11760 Revert:
11761 2011-12-18 Hui Zhu <teawater@gmail.com>
11762 * linux-low.c (linux_create_inferior): Save return value to ret.
11763
66f1260e
HZ
117642011-12-18 Hui Zhu <teawater@gmail.com>
11765
11766 * linux-low.c (linux_create_inferior): Save return value to ret.
11767
e77616d7
DE
117682011-12-16 Doug Evans <dje@google.com>
11769
e7b06c57
DE
11770 * linux-low.c (linux_create_inferior): If stdio connection,
11771 redirect stdin from /dev/null, stdout to stderr.
11772 * remote-utils.c (remote_is_stdio): New static global.
11773 (remote_connection_is_stdio): New function.
11774 (remote_prepare): Handle stdio connection.
11775 (remote_open): Ditto.
11776 (remote_close): Don't close stdin for stdio connections.
11777 (read_prim,write_prim): New functions. Replace all calls to
11778 read/write to these.
11779 * server.c (main): Watch for "-" argument. Move call to
11780 remote_prepare before start_inferior.
11781 * server.h (STDIO_CONNECTION_NAME): New macro.
11782 (remote_connection_is_stdio): Declare.
11783
e77616d7
DE
11784 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
11785 in debugging output.
11786
82067193
YQ
117872011-12-15 Yao Qi <yao@codesourcery.com>
11788
11789 * tracepoint.c: Include sys/syscall.h.
11790 (gdb_ust_thread): Remove preprocessor conditional.
11791
82bfbe7e
PA
117922011-12-14 Pedro Alves <pedro@codesourcery.com>
11793
11794 * linux-low.c (linux_detach_one_lwp): Call
11795 the_low_target.prepare_to_resume before detaching.
11796
712c6575
YQ
117972011-12-14 Yao Qi <yao@codesourcery.com>
11798
11799 * tracepoint.c (gdb_ust_thread): Don't ignore return value
11800 of write.
11801
d54d1edf
YQ
118022011-12-14 Yao Qi <yao@codesourcery.com>
11803
11804 * i386-low.c (i386_low_stopped_data_address): Initialize local
11805 variable `control'.
11806
6210a125
PA
118072011-12-13 Pedro Alves <pedro@codesourcery.com>
11808
11809 PR remote/13492
11810
11811 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
11812 DR_CONTROL unless necessary. Extend comments.
11813 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
11814 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
11815
2ece8244
YQ
118162011-12-13 Yao Qi <yao@codesourcery.com>
11817
11818 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
11819 macros.
11820 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
11821
784867a5
JK
118222011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
11823
11824 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
11825 Print new debug message for such case.
11826
6bf36717
JK
118272011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
11828
11829 Fix overlapping memcpy.
11830 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
11831 the read_inferior_memory transfer.
11832 (delete_fast_tracepoint_jump): New variable buf. Use it for the
11833 write_inferior_memory transfer.
11834 (set_fast_tracepoint_jump): New variable buf. Use it for the
11835 read_inferior_memory and write_inferior_memory transfers.
11836 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
11837 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
11838 Use it for the write_inferior_memory transfer.
11839 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
11840 buffers.
11841
50275556
MR
118422011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
11843
11844 * linux-low.c (fetch_register, store_register): Make code
11845 consistent, fix formatting.
11846
7325beb4
MR
118472011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
11848
11849 * linux-low.c (usr_store_inferior_registers): Factor out code
11850 to handle individual registers into...
11851 (store_register): ... this new function.
11852
c642a434
UW
118532011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
11854
11855 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
11856 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
11857 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
11858 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
11859 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
11860 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
11861 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
11862 (srv_xmlfiles): Add new XML files.
11863
11864 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
11865 and <sys/uio.h>.
11866 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
11867 (init_registers_s390_linux32v1): Add prototype.
11868 (init_registers_s390_linux32v2): Likewise.
11869 (init_registers_s390_linux64v1): Likewise.
11870 (init_registers_s390_linux64v2): Likewise.
11871 (init_registers_s390x_linux64v1): Likewise.
11872 (init_registers_s390x_linux64v2): Likewise.
11873 (s390_num_regs): Increment to 52.
11874 (s390_regmap): Add orig_r2 register.
11875 (s390_num_regs_3264): Increment to 68.
11876 (s390_regmap_3264): Add orig_r2 register.
11877 (s390_collect_ptrace_register): Handle orig_r2 register.
11878 (s390_supply_ptrace_register): Likewise.
11879 (s390_fill_last_break): New function.
11880 (s390_store_last_break): Likewise.
11881 (s390_fill_system_call): New function.
11882 (s390_store_system_call): Likewise.
11883 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
11884 register sets.
11885 (s390_check_regset): New function.
11886 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
11887 NT_S390_SYSTEM_CALL regsets and use appropriate description.
11888 Update target_regsets for available register sets.
11889
2268b414
JK
118902011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
11891 Jan Kratochvil <jan.kratochvil@redhat.com>
11892
11893 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
11894 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
11895 New.
11896 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
11897 * linux-low.h (struct process_info_private): New member r_debug.
11898 * server.c (handle_qxfer_libraries): Call
11899 the_target->qxfer_libraries_svr4.
11900 (handle_qxfer_libraries_svr4): New function.
11901 (qxfer_packets): New entry "libraries-svr4".
11902 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
11903 * target.h (struct target_ops): New member qxfer_libraries_svr4.
11904 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
11905 PACKET_qXfer_libraries_svr4.
11906
d6db1fab
UW
119072011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
11908
11909 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
11910 PSW address/mask between 8-byte and 16-byte formats.
11911 (s390_supply_ptrace_register): Likewise.
11912 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
11913 basic addressing mode bit.
11914
242f5f1c
SS
119152011-11-24 Stan Shebs <stan@codesourcery.com>
11916
11917 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
11918
f196051f
SS
119192011-11-17 Stan Shebs <stan@codesourcery.com>
11920
11921 * tracepoint.c (struct tracepoint): New field traceframe_usage.
11922 (tracing_start_time): New global.
11923 (tracing_stop_time): New global.
11924 (tracing_user_name): New global.
11925 (tracing_notes): New global.
11926 (tracing_stop_note): New global.
11927 (cmd_qtstart): Set traceframe_usage, start_time.
11928 (stop_tracing): Set stop_time.
11929 (cmd_qtstatus): Report additional status.
11930 (cmd_qtp): New function.
11931 (handle_tracepoint_query): Call it.
11932 (cmd_qtnotes): New function.
11933 (handle_tracepoint_general_set): Call it.
11934 (get_timestamp): Rename from tsv_get_timestamp.
11935
405f8e94
SS
119362011-11-14 Stan Shebs <stan@codesourcery.com>
11937 Kwok Cheung Yeung <kcy@codesourcery.com>
11938
11939 * linux-x86-low.c (small_jump_insn): New.
11940 (i386_install_fast_tracepoint_jump_pad): Add arguments for
11941 trampoline and error message, build a trampoline and issue a small
11942 jump instruction to it.
11943 (x86_install_fast_tracepoint_jump_pad): Add arguments for
11944 trampoline and error message.
11945 (x86_get_min_fast_tracepoint_insn_len): New.
11946 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
11947 * linux-low.h (struct linux_target_ops): Add arguments to
11948 install_fast_tracepoint_jump_pad operation, add new operation.
11949 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
11950 arguments.
11951 (linux_get_min_fast_tracepoint_insn_len): New function.
11952 (linux_target_op): Add new operation.
11953 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
11954 (gdb_trampoline_buffer_end): Ditto.
11955 (gdb_trampoline_buffer_error): Ditto.
11956 (struct ipa_sym_addresses): Add fields for new IPA variables.
11957 (symbol_list): Add entries for new IPA variables.
11958 (struct tracepoint): Add fields to hold the address range of the
11959 trampoline used by the tracepoint.
11960 (trampoline_buffer_head): New static variable.
11961 (trampoline_buffer_tail): Ditto.
11962 (claim_trampoline_space): New function.
11963 (have_fast_tracepoint_trampoline_buffer): New function.
11964 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
11965 structure.
11966 (install_fast_tracepoint): Ditto, also add error buffer argument.
11967 (cmd_qtminftpilen): New function.
11968 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
11969 (fast_tracepoint_from_trampoline_address): New function.
11970 (fast_tracepoint_collecting): Handle trampoline as part of jump
11971 pad space.
11972 (set_trampoline_buffer_space): New function.
11973 (initialize_tracepoint): Initialize new IPA variables.
11974 * target.h (struct target_ops): Add arguments to
11975 install_fast_tracepoint_jump_pad operation, add new
11976 get_min_fast_tracepoint_insn_len operation.
11977 (target_get_min_fast_tracepoint_insn_len): New.
11978 (install_fast_tracepoint_jump_pad): Add arguments.
11979 * server.h (IPA_BUFSIZ): Define.
11980 * linux-i386-ipa.c: Include extra header files.
11981 (initialize_fast_tracepoint_trampoline_buffer): New function.
11982 (initialize_low_tracepoint): Call it.
11983 * server.h (set_trampoline_buffer_space): Declare.
11984 (claim_trampoline_space): Ditto.
11985 (have_fast_tracepoint_trampoline_buffer): Ditto.
11986
1e4d1764
YQ
119872011-11-14 Yao Qi <yao@codesourcery.com>
11988
11989 * server.c (handle_query): Handle InstallInTrace for qSupported.
11990 * tracepoint.c (add_tracepoint): Sort list.
11991 (install_tracepoint, download_tracepoint): New.
11992 (cmd_qtdp): Call them to install and download tracepoints.
11993 (sort_tracepoints): Removed.
11994 (cmd_qtstart): Update.
11995
5c73ff4e
YQ
119962011-11-14 Yao Qi <yao@codesourcery.com>
11997
11998 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
11999 * mem-break.h: Declare.
12000 * tracepoint.c (cmd_qtstart): Move some code to ...
12001 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
12002 New.
12003 (download_tracepoints): Move some code to ...
12004 (download_tracepoint_1): ... here. New.
12005
86a30030
YQ
120062011-11-08 Yao Qi <yao@codesourcery.com>
12007
12008 * remote-utils.c (relocate_instruction): A comment fix.
12009
8d26e50c
JB
120102011-11-07 Joel Brobecker <brobecker@adacore.com>
12011
12012 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
12013 (i386_dr_low_get_control, i386_dr_low_get_status): Use
12014 dr_status_mirror and dr_control_mirror from debug_reg_state.
12015 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
12016 (i386_initial_stuff): Remove use of deleted globals.
12017 (i386_get_thread_context, i386_set_thread_context,
12018 i386_thread_added): Use dr_status_mirror and dr_control_mirror
12019 from debug_reg_state.
12020
a59306a3
YQ
120212011-11-05 Yao Qi <yao@codesourcery.com>
12022
12023 * tracepoint.c (gdb_collect): Loop over tracepoints of same
12024 address as TPOINT's.
12025
3065dfb6
SS
120262011-11-02 Stan Shebs <stan@codesourcery.com>
12027
12028 * tracepoint.c (agent_mem_read_string): New function.
12029 (eval_agent_expr): Call it for tracenz.
12030 * server.c (handle_query): Report support for tracenz.
12031
fd0d8c7c
YQ
120322011-11-02 Yao Qi <yao@codesourcery.com>
12033
12034 * tracepoint.c (cmd_qtstart): Remove unused local variables.
12035
609086b1
YQ
120362011-11-02 Yao Qi <yao@codesourcery.com>
12037
12038 * target.h: Fix a typo in comment.
12039
b9fd1791
PA
120402011-10-31 Pedro Alves <pedro@codesourcery.com>
12041
12042 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
12043 clobber the breakpoints' shadows with fast tracepoint jumps.
12044 * mem-break.h (check_mem_write): Add `myaddr' parameter.
12045 * target.c (write_inferior_memory): Also pass MYADDR down to
12046 check_mem_write.
12047
03583c20
UW
120482011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
12049
12050 * configure.ac: Check support for personality routine.
12051 * configure: Regenerate.
12052 * config.in: Likewise.
12053 * linux-low.c: Include <sys/personality.h>.
12054 Define ADDR_NO_RANDOMIZE if necessary.
12055 (linux_create_inferior): Disable address space randomization when
12056 forking inferior, if requested.
12057 (linux_supports_disable_randomization): New function.
12058 (linux_target_ops): Install it.
12059 * server.h (disable_randomization): Declare.
12060 * server.c (disable_randomization): New global variable.
12061 (handle_general_set): Handle QDisableRandomization.
12062 (handle_query): Likewise for qSupported.
12063 (main): Support --disable-randomization and --no-disable-randomization
12064 command line arguments.
12065 * target.h (struct target_ops): Add supports_disable_randomization.
12066 (target_supports_disable_randomization): New macro.
12067
723b724b
MF
120682011-09-29 Mike Frysinger <vapier@gentoo.org>
12069
12070 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
12071 ifdef check.
12072 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
12073 [!PT_GETDSBT] (target_loadmap): New definition.
12074 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
12075 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
12076 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
12077 and PT_GETDSBT to LINUX_LOADMAP.
12078 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
12079 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
12080
55329a5c 120812011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
12082
12083 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
12084 (arm_linux_hwbp_cap): New static variable.
12085 (arm_linux_get_hwbp_cap): Replace by ...
12086 (arm_linux_init_hwbp_cap): ... this new function.
12087 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
12088 (arm_linux_get_hw_watchpoint_count): Likewise.
12089 (arm_linux_get_hw_watchpoint_max_length): Likewise.
12090 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
12091 (arm_prepare_to_resume): Use perror_with_name instead of error.
12092
55329a5c 120932011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
12094
12095 * linux-arm-low.c: Include <signal.h>.
12096 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
12097 (struct arm_linux_hwbp_cap): New data type.
12098 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
12099 (struct arm_linux_hw_breakpoint): New data type.
12100 (MAX_BPTS, MAX_WPTS): Define.
12101 (struct arch_process_info, struct arch_lwp_info): New data types.
12102 (arm_linux_get_hwbp_cap): New function.
12103 (arm_linux_get_hw_breakpoint_count): Likewise.
12104 (arm_linux_get_hw_watchpoint_count): Likewise.
12105 (arm_linux_get_hw_watchpoint_max_length): Likewise.
12106 (arm_hwbp_control_initialize): Likewise.
12107 (arm_hwbp_control_is_enabled): Likewise.
12108 (arm_hwbp_control_is_initialized): Likewise.
12109 (arm_hwbp_control_disable): Likewise.
12110 (arm_linux_hw_breakpoint_equal): Likewise.
12111 (arm_linux_hw_point_initialize): Likewise.
12112 (struct update_registers_data): New data structure.
12113 (update_registers_callback: New function.
12114 (arm_insert_point): Likewise.
12115 (arm_remove_point): Likewise.
12116 (arm_stopped_by_watchpoint): Likewise.
12117 (arm_stopped_data_address): Likewise.
12118 (arm_new_process): Likewise.
12119 (arm_new_thread): Likewise.
12120 (arm_prepare_to_resume): Likewise.
12121 (the_low_target): Register arm_insert_point, arm_remove_point,
12122 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
12123 arm_new_thread, and arm_prepare_to_resume.
12124
6b9801d4
SS
121252011-09-15 Stan Shebs <stan@codesourcery.com>
12126
12127 * server.h (struct emit_ops): Add compare-goto fields.
12128 * tracepoint.c (gdb_agent_op_sizes): New table.
12129 (emit_eq_goto): New function.
12130 (emit_ne_goto): New function.
12131 (emit_lt_goto): New function.
12132 (emit_le_goto): New function.
12133 (emit_gt_goto): New function.
12134 (emit_ge_goto): New function.
12135 (is_goto_target): New function.
12136 (compile_bytecodes): Recognize special cases of compare-goto
12137 combinations and call specialized emitters for them.
12138 * linux-x86-low.c (amd64_emit_eq_goto): New function.
12139 (amd64_emit_ne_goto): New function.
12140 (amd64_emit_lt_goto): New function.
12141 (amd64_emit_le_goto): New function.
12142 (amd64_emit_gt_goto): New function.
12143 (amd64_emit_ge_goto): New function.
12144 (amd64_emit_ops): Add the new functions.
12145 (i386_emit_eq_goto): New function.
12146 (i386_emit_ne_goto): New function.
12147 (i386_emit_lt_goto): New function.
12148 (i386_emit_le_goto): New function.
12149 (i386_emit_gt_goto): New function.
12150 (i386_emit_ge_goto): New function.
12151 (i386_emit_ops): Add the new functions.
12152
bf15cbda
SS
121532011-09-08 Stan Shebs <stan@codesourcery.com>
12154
12155 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
12156 (i386_emit_epilogue): Restore %ebx.
12157
943ca1dd
JZ
121582011-08-31 Jie Zhang <jzhang918@gmail.com>
12159
12160 * server.c (step_thread): Remove definition.
12161 (process_serial_event): Don't handle Hs.
12162 * server.h (step_thread): Remove declaration.
12163 * target.c (set_desired_inferior): Remove use of step_thread.
12164
e3deef73
LM
121652011-08-24 Luis Machado <lgustavo@codesourcery.com>
12166
12167 * linux-low.c: Include linux-procfs.h.
12168 (linux_attach_lwp_1): Update comments.
12169 (linux_attach): Scan for existing threads when attaching to a
12170 process that is the tgid.
12171 * Makefile.in: Update dependencies.
12172
13da1c97
LM
121732011-08-24 Luis Machado <lgustavo@codesourcery.com>
12174
12175 * configure.srv: Add linux-procfs.o dependencies.
12176
881127c9
YQ
121772011-08-14 Yao Qi <yao@codesourcery.com>
12178
12179 * target.h (struct target_ops): Fix indent.
12180 * win32-low.c (win32_target_ops): Fix comment.
12181
58dbd541
YQ
121822011-08-14 Andrew Jenner <andrew@codesourcery.com>
12183 Yao Qi <yao@codesourcery.com>
12184
12185 * Makefile.in (clean): Remove tic6x-*.c files.
12186 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
12187 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
12188 (tic6x-c64xp-linux.c): Likewise.
12189 * configure.srv: Add support for tic6x-*-uclinux.
12190 * linux-tic6x-low.c: New.
12191 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
12192
78d85199
YQ
121932011-08-14 Andrew Stubbs <ams@codesourcery.com>
12194 Yao Qi <yao@codesourcery.com>
12195
12196 * target.h (struct target_ops): Add read_loadmap.
12197 * linux-low.c (struct target_loadseg): New type.
12198 (struct target_loadmap): New type.
12199 (linux_read_loadmap): New function.
12200 (linux_target_ops): Add linux_read_loadmap.
12201 * server.c (handle_query): Support qXfer:fdpic:read packet.
43aaf8b6
PA
12202 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
12203 to NULL.
78d85199 12204
a959a88d
EZ
122052011-08-05 Eli Zaretskii <eliz@gnu.org>
12206
12207 * win32-low.c: Include <stdint.h>.
12208
1ced966e
PA
122092011-07-22 Pedro Alves <pedro@codesourcery.com>
12210
12211 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
12212 to the inferior here.
12213 (i386_remove_aligned_watchpoint): Ditto.
12214 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
12215 fit part of the watchpoint in the debug registers.
12216 (i386_update_inferior_debug_regs): New.
12217 (i386_low_insert_watchpoint): Work on a local mirror of the debug
12218 registers, and only update the inferior on success.
12219 (i386_low_remove_watchpoint): Ditto.
12220
d26e3629
KY
122212011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
12222
12223 * linux-low.c (compare_ints, unique, list_threads, show_process,
12224 linux_core_of_thread): Delete.
12225 (linux_target_ops): Change linux_core_of_thread to
12226 linux_common_core_of_thread.
12227 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
12228 * utils.c (malloc_failure): Change type of argument.
12229 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
12230 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
12231 common/linux-osdata.c, common/ptid.c and common/buffer.c.
12232 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
12233 (IPA_OBJS): Add common-utils-ipa.o.
12234 (ptid_h, linux_osdata_h): New macros.
12235 (server_h): Add common/common-utils.h, common/xml-utils.h,
12236 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
12237 common/ptid.h.
12238 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
12239 ptid.o, buffer.o): New rules.
12240 (linux-low.o): Add common/linux-osdata.h as a dependency.
12241 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
12242 * configure.ac: Add AC_HEADER_DIRENT check.
12243 * config.in: Regenerate.
12244 * configure: Regenerate.
12245 * remote-utils.c (xml_escape_text): Delete.
12246 (buffer_grow, buffer_free, buffer_init, buffer_finish,
12247 buffer_xml_printf): Move to common/buffer.c.
12248 * server.c (main): Remove call to initialize_inferiors.
12249 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
12250 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
12251 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
12252 internal_error, gdb_assert, gdb_assert_fail): Delete.
12253 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
12254 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
12255 common/buffer.h.
12256 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
12257 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
12258 initialize_inferiors): Delete.
12259
2275a1a7
PA
122602011-07-20 Pedro Alves <pedro@codesourcery.com>
12261
12262 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
12263 symbol error.
12264
0a5b1e09
PA
122652011-05-31 Pedro Alves <pedro@codesourcery.com>
12266
12267 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
12268 assertion.
12269 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
12270
6938fd34
YQ
122712011-05-26 Yao Qi <yao@codesourcery.com>
12272
12273 * Makefile.in (thread-db.o): Track dependence to
12274 common/gdb_thread_db.h.
12275 * thread-db.c: include gdb_thread_db.h from right place.
12276
b481f9e0
TT
122772011-05-16 Adrian Cornish <gnu@bluedreamer.com>
12278
12279 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
12280 __FILE__ and __LINE__ to internal_error.
12281
98a5dd13
DE
122822011-05-13 Doug Evans <dje@google.com>
12283
12284 * thread-db.c (try_thread_db_load_from_sdir): New function.
12285 (try_thread_db_load_from_dir): New function.
12286 (thread_db_load_search): Handle $sdir, ignore $pdir.
12287 Remove trying of system directories if search of
12288 libthread-db-search-path fails, that is now done via $sdir.
12289
d248b706
KY
122902011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
12291
12292 * server.c (handle_query): Add EnableDisableTracepoints to the list
12293 of supported features.
43aaf8b6 12294 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
d248b706 12295 tracepoints.
43aaf8b6
PA
12296 (cmd_qtenable_disable): New.
12297 (cmd_qtstart): Install tracepoints even if disabled.
12298 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
12299 receiving a QTEnable or QTDisable packet.
12300 (gdb_collect): Skip data collection if fast tracepoint is disabled.
12301 (ust_marker_to_static_tracepoint): Do not ignore disabled static
12302 tracepoints.
12303 (gdb_probe): Skip data collection if static tracepoint is disabled.
d248b706 12304
84e578fb
DE
123052011-05-10 Doug Evans <dje@google.com>
12306
12307 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
12308
71f55dd8
DE
123092011-05-04 Doug Evans <dje@google.com>
12310
12311 * linux-low.c (linux_join): Skip process lookup.
12312 * spu-low.c (spu_join): Ditto.
12313 * server.c (join_inferiors_callback): Delete.
12314 (process_serial_event): For 'D' packet (detach) call join_inferior
12315 directly.
12316
4d393d60
JM
123172011-05-04 Joseph Myers <joseph@codesourcery.com>
12318
12319 * README: Don't mention xscale*-*-linux*.
12320 * configure.srv (xscale*-*-linux*): Don't handle target.
12321
b00ad6ff
NF
123222011-04-27 Nathan Froyd <froydnj@codesourcery.com>
12323
12324 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
12325 casting pointers.
12326 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
12327 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
12328 (i386_emit_void_call_2): Likewise.
12329
af96c192
YQ
123302011-04-26 Yao Qi <yao@codesourcery.com>
12331
43aaf8b6
PA
12332 * linux-low.c: Move common macros to linux-ptrace.h.
12333 Include linux-ptrace.h.
af96c192
YQ
12334 * Makefile.in (linux_ptrace_h): New.
12335 (linux-low.o): Depends on linux-ptrace.h.
12336
03f2bd59
JK
123372011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
12338
12339 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
12340 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
12341 (remote_prepare): New function with most of the TCP code from ...
12342 (remote_open): ... here. Detect PORT here unconditionally. Move also
12343 setting transport_is_reliable.
12344 * server.c (run_once): New variable.
12345 (gdbserver_usage): Document it.
12346 (main): Set run_once for `--once'. Call remote_prepare. Exit after
12347 the first run if RUN_ONCE.
12348 * server.h (run_once, remote_prepare): New declarations.
12349
7a9dd1b2
TT
123502011-04-19 Tom Tromey <tromey@redhat.com>
12351
12352 * win32-low.c (handle_load_dll): Remove duplicate "the".
12353
81239425
PM
123542011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
12355
12356 Remove support for old Cygwin 1.5 versions.
12357 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
12358 function to avoid warning.
12359 (win32_add_one_solib): Use cygwin_conv_path function to avoid
12360 warning.
12361
9e0627f1
PM
123622011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
12363
12364 * gdbserver/server.h (Macro _): Define it if not available.
12365
588eebee
MS
123662011-03-14 Michael Snyder <msnyder@vmware.com>
12367
348af9f7 12368 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 12369
43f70d4c
JB
123702011-03-10 Joel Brobecker <brobecker@adacore.com>
12371
12372 * Makefile.in (maintainer-clean realclean distclean): Remove
12373 "make ... subdir_do" command.
12374
348af9f7
MS
123752011-03-10 Michael Snyder <msnyder@vmware.com>
12376
12377 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
12378
12379 * server.c (handle_v_run): Free alloced buffer on early return.
12380
e637a4f5
YQ
123812011-03-09 Yao Qi <yao@codesourcery.com>
12382
12383 Revert:
12384 2011-03-04 Yao Qi <yao@codesourcery.com>
12385
12386 * Makefile.in: Remove GNU make feature --directory.
12387
12388 2011-03-05 Yao Qi <yao@codesourcery.com>
12389
12390 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
12391 (subdir_do): New make target. Copied from gdb/Makefile.
12392 (maintainer-clean, realclean, distclean, clean): Call corresponding
12393 make targets in common/Makefile.
12394
12395 2011-02-11 Yao Qi <yao@codesourcery.com>
12396
12397 * configure.ac: Call AC_PROG_RANLIB.
12398 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
12399 * configure: Regenerate.
12400
e6edda56
JK
124012011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
12402
12403 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
12404
e5141119
JB
124052011-03-06 Yao Qi <yao@codesourcery.com>
12406
12407 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
12408
64794aa4
JB
124092011-03-05 Yao Qi <yao@codesourcery.com>
12410
12411 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
12412 (subdir_do): New make target. Copied from gdb/Makefile.
12413 (maintainer-clean, realclean, distclean, clean): Call corresponding
12414 make targets in common/Makefile.
12415
7a762829
YQ
124162011-03-04 Yao Qi <yao@codesourcery.com>
12417
12418 * Makefile.in: Remove GNU make feature --directory.
12419
348af9f7
MS
124202011-03-04 Michael Snyder <msnyder@vmware.com>
12421
12422 * server.c (queue_stop_reply): Call xmalloc not malloc.
12423
124242011-03-02 Michael Snyder <msnyder@vmware.com>
12425
12426 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
12427
9f72fee2
MS
124282011-02-28 Michael Snyder <msnyder@vmware.com>
12429
588eebee
MS
12430 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
12431 (cmd_qtframe): Ditto.
12432 (cmd_qtbuffer): Ditto.
12433 (cmd_bigqtbuffer): Ditto.
12434
9f72fee2
MS
12435 * utils.c (decimal2str): Initialize 'width' to nine, then
12436 don't mess with it.
12437
8040bd49
UW
124382011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
12439
12440 * hostio.c (require_data): Free *data, not data.
12441
7e52cbd0
JK
124422011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
12443
12444 * hostio.c (require_data): Use free, not xfree.
12445
9130f83e
MS
124462011-02-27 Michael Snyder <msnyder@vmware.com>
12447
4b812f4e
MS
12448 * server.c (handle_query): Discard unused value.
12449
9130f83e
MS
12450 * hostio.c (require_data): Free malloc memory before returning
12451 error.
12452
69d37113
MS
124532011-02-26 Michael Snyder <msnyder@vmware.com>
12454
12455 * linux-low.c (list_threads): Call closedir for dirent.
12456
35f5825a
MS
124572011-02-27 Michael Snyder <msnyder@vmware.com>
12458
2a589cef
MS
12459 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
12460 a case statement falls through.
12461
0adea5f7
MS
12462 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
12463
35f5825a
MS
12464 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
12465 in comparison.
12466
238f1c74
MS
124672011-02-26 Michael Snyder <msnyder@vmware.com>
12468
12469 * utils.c (decimal2str): Eliminate dead code and dead param.
12470 (pulongest): Drop dead param from call to decimal2str.
12471 (plongest): Ditto.
12472
633ff500
JB
124732011-02-24 Joel Brobecker <brobecker@adacore.com>
12474
12475 Revert the following patch (not approved yet):
12476 2011-02-21 Hui Zhu <teawater@gmail.com>
12477 * tracepoint.c (tp_printf): New function.
12478 (eval_agent_expr): Handle gdb_agent_op_printf.
12479
f9c6ff72
HZ
124802011-02-21 Hui Zhu <teawater@gmail.com>
12481
12482 * tracepoint.c (tp_printf): New function.
12483 (eval_agent_expr): Handle gdb_agent_op_printf.
12484
94d5e490
TT
124852011-02-18 Tom Tromey <tromey@redhat.com>
12486
12487 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
12488 (tracepoint.o): Likewise.
12489 * tracepoint.c (enum gdb_agent_op): Use ax.def.
12490 (gdb_agent_op_names): Likewise.
12491
c7f96d2b
TT
124922011-02-18 Tom Tromey <tromey@redhat.com>
12493
12494 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
12495 gdb_agent_op_rot>: New constants.
12496 (gdb_agent_op_names): Add pick and roll.
12497 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
12498 cases.
12499
0feedb2c
JK
125002011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
12501
12502 * aclocal.m4: Regenerated with aclocal-1.11.1.
12503
b3b9301e
PA
125042011-02-14 Pedro Alves <pedro@codesourcery.com>
12505
12506 * server.c (handle_qxfer_traceframe_info): New.
12507 (qxfer_packets): Register "traceframe-info".
12508 (handle_query): Report support for qXfer:traceframe-info:read+.
12509 * tracepoint.c (match_blocktype): New.
12510 (traceframe_find_block_type): Rename to ...
12511 (traceframe_walk_blocks): ... this. Add callback filter argument,
12512 and use it.
12513 (traceframe_find_block_type): New, reimplemented on top of
12514 traceframe_walk_blocks.
12515 (build_traceframe_info_xml): New.
12516 (traceframe_read_info): New.
12517 * server.h (traceframe_read_info): Declare.
12518
4f3e6fb7
YQ
125192011-02-11 Yao Qi <yao@codesourcery.com>
12520
12521 * configure.ac: Call AC_PROG_RANLIB.
12522 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
12523 * configure: Regenerate.
12524
764880b7
PA
125252011-02-07 Pedro Alves <pedro@codesourcery.com>
12526
12527 * server.c (gdb_read_memory): Change return semantics to allow
12528 partial transfers.
12529 (handle_search_memory_1): Adjust.
12530 (process_serial_event) <'m' packet>: Handle partial transfers.
12531 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
12532
1c79eb8a
PA
125332011-01-28 Pedro Alves <pedro@codesourcery.com>
12534
12535 * regcache.c (init_register_cache): Initialize
12536 regcache->register_status.
12537 (free_register_cache): Release regcache->register_status.
12538 (regcache_cpy): Copy register_status.
12539 (registers_to_string): Print 'x's for unavailable registers.
12540 (supply_register): Mark the register's status valid or
12541 unavailable, depending on whether a buffer was passed in or not.
12542 (supply_register_zeroed): New.
12543 (supply_regblock): Mark the registers' status valid or
12544 unavailable, depending on whether a buffer was passed in or not.
12545 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
12546 (struct regcache): New `register_status' field.
12547 (supply_register_zeroed): Declare.
12548 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
12549 supply_register_zeroed, rather than passing a NULL buffer to
12550 supply_register.
12551 * tracepoint.c (fetch_traceframe_registers): Update comment.
12552
85724a0e
PA
125532011-01-28 Pedro Alves <pedro@codesourcery.com>
12554
12555 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
12556 buffer explicit.
12557
d08aafef
PA
125582011-01-25 Pedro Alves <pedro@codesourcery.com>
12559
12560 * server.h (decode_xfer_write): Change prototype.
12561 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
12562 and don't extract the annex here.
12563 * server.c (decode_xfer_read): Remove `annex' parameter,
12564 and don't extract the annex here.
12565 (decode_xfer): New.
12566 (struct qxfer): New.
12567 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
12568 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
12569 (handle_qxfer_statictrace): New functions, abstracted out from
12570 handle_query, and made to use the struct qxfer interface.
12571 (handle_threads_qxfer_proper): Rename to ...
12572 (handle_qxfer_threads_proper): ... this.
12573 (handle_threads_qxfer): Rename to ...
12574 (handle_qxfer_threads): ... this. Adjust.
12575 (qxfer_packets): New array.
12576 (handle_qxfer): New function.
12577 (handle_query): Use handle_qxfer.
12578
493e2a69
MS
125792011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
12580
12581 * gdbreplay.c: Shorten lines of >= 80 columns.
12582 * linux-low.c: Ditto.
12583 * linux-ppc-low.c: Ditto.
12584 * linux-s390-low.c: Ditto.
12585 * linux-sparc-low.c: Ditto.
12586 * linux-x86-low.c: Ditto.
12587 * linux-xtensa-low.c: Ditto.
12588 * mem-break.c: Ditto.
12589 * nto-low.c: Ditto.
12590 * regcache.h: Ditto.
12591 * remote-utils.c: Ditto.
12592 * server.c: Ditto.
12593 * server.h: Ditto.
12594 * thread-db.c: Ditto.
12595 * tracepoint.c: Ditto.
12596 * utils.c: Ditto.
12597 * win32-low.h: Ditto.
12598
44944448
JB
125992011-01-05 Joel Brobecker <brobecker@adacore.com>
12600
12601 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
12602 update.
12603
71ce852c
JB
126042011-01-01 Joel Brobecker <brobecker@adacore.com>
12605
12606 * server.c (gdbserver_version): Update copyright year in version
12607 output.
12608 * gdbreplay.c (gdbreplay_version): Ditto.
12609
eb826dc6
MF
126102010-12-29 Jie Zhang <jie.zhang@analog.com>
12611
12612 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
12613 * linux-bfin-low.c: New file.
12614 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
12615 PT_DATA_ADDR for BFIN targets.
12616 * Makefile.in (SFILES): Add linux-bfin-low.c.
12617 (clean): Remove reg-bfin.c.
12618 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
12619 * README: Mention supported Blackfin targets.
12620
39ab222a
MF
126212010-12-23 Mike Frysinger <vapier@gentoo.org>
12622
12623 * .gitignore: New file.
12624
a1f2ce7d
MF
126252010-11-16 Mike Frysinger <vapier@gentoo.org>
12626
12627 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
12628
f474844c
JZ
126292010-10-22 Jie Zhang <jie@codesourcery.com>
12630
12631 * Makefile.in: Add FLAGS_TO_PASS variable.
12632 (install): Remove dependency of install-only and recursively
12633 invoke make for install-only.
12634
f1048712
DE
126352010-10-04 Doug Evans <dje@google.com>
12636
12637 * Makefile.in (uninstall): Use $(DESTDIR).
12638
b53a1623
PA
126392010-09-24 Pedro Alves <pedro@codesourcery.com>
12640
e6ee044d
PA
12641 PR gdb/11842
12642
b53a1623
PA
12643 * linux-x86-low.c (compat_siginfo_from_siginfo)
12644 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
12645 si_code is < 0. Check for si_code == SI_TIMER before checking for
12646 si_code < 0.
12647
fa1bd1e4
JB
126482010-09-13 Joel Brobecker <brobecker@adacore.com>
12649
12650 * lynx-i386-low.c: New file.
12651 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
12652
47fac8f8
JB
126532010-09-13 Joel Brobecker <brobecker@adacore.com>
12654
12655 * lynx-low.c (ptrace_request_to_str): Remove handling for
12656 request values that have been removed in LynxOS 5.x.
12657
1adfc54d
JB
126582010-09-13 Joel Brobecker <brobecker@adacore.com>
12659
12660 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
12661 <ptrace.h>
12662
c2a66c29
NS
126632010-09-09 Nathan Sidwell <nathan@codesourcery.com>
12664
12665 * configure.ac: Add --enable-inprocess-agent option.
12666 * configure: Rebuilt.
12667
32fcada3
YQ
126682010-09-06 Yao Qi <yao@codesourcery.com>
12669
12670 * linux-low.c (linux_kill): Remove unused variable.
12671 (linux_stabilize_threads): Likewise.
12672 * server.c (start_inferior): Likewise.
12673 (queue_stop_reply_callback): Likewise.
12674 * tracepoint.c (do_action_at_tracepoint): Likewise.
12675
0cccb683
YQ
126762010-09-06 Yao Qi <yao@codesourcery.com>
12677
12678 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
12679 on return.
12680
423ec54c
JK
126812010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
12682
12683 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
12684
12ac6819
PA
126852010-09-06 Pedro Alves <pedro@codesourcery.com>
12686
12687 * Makefile.in (install-only): Replace $IPA_DEPFILES with
12688 "$(IPA_DEPFILES)".
12689
8ed54b31
JB
126902010-09-01 Joel Brobecker <brobecker@adacore.com>
12691
12692 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
12693 gdbserver/lynx-ppc-low.c: New files.
12694 * Makefile.in (lynx_low_h): New variable.
12695 (lynx-low.o, lynx-ppc-low.o): New rules.
12696 * configure.ac: On LynxOS, link with -lnetinet.
12697 * configure.srv: Add handling of powerpc-*-lynxos* targets.
12698 * configure: regenerate.
12699
bb0116a4
JB
127002010-09-01 Joel Brobecker <brobecker@adacore.com>
12701
12702 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
12703 * configure.ac: Add check for vasprintf and vsnprintf.
12704 * configure, config.in: Regenerate.
12705 * server.h (vasprintf, vsnprintf): Add conditional declarations.
12706
a778ab81 127072010-09-01 Joel Brobecker <brobecker@adacore.com>
12708
12709 * gdbreplay.c: Move include of alloca.h up, next to include of
12710 malloc.h.
12711 * server.h: Add include of malloc.h.
12712 * mem-break.c: Remove include of malloc.h.
12713 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
12714
8b034a19 127152010-09-01 Joel Brobecker <brobecker@adacore.com>
12716
12717 * Makefile.in (memmem.o): Build with -Wno-error.
12718
127192010-09-01 Joel Brobecker <brobecker@adacore.com>
12720
12721 * utils.c (xsnprintf): Make non-static.
12722 * server.h: Add xsnprintf declaration.
12723 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
12724 replace calls to snprintf by calls to xsnprintf throughout.
12725
127262010-09-01 Joel Brobecker <brobecker@adacore.com>
12727
12728 * configure.ac: Add configure check for alloca.
12729 * configure, config.in: Regenerate.
12730 * server.h: Include alloca.h if it exists.
12731 * gdbreplay.c: Include alloca.h if it exists.
12732
1a981360
PA
127332010-08-28 Pedro Alves <pedro@codesourcery.com>
12734
12735 * linux-low.c (__SIGRTMIN): Define if not already defined.
12736 (linux_create_inferior): Check for __ANDROID__ rather than
12737 __SIGRTMIN.
12738 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
12739 are already deferred.
12740 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
12741 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
12742 stopped and already has a pending signal to report.
12743 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
12744 a pending signal to report or is moving out of a jump pad.
12745 (linux_init_signals): Check for __ANDROID__ rather than
12746 __SIGRTMIN.
12747
b4d51a55
PA
127482010-08-28 Pedro Alves <pedro@codesourcery.com>
12749
12750 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
12751 debug_threads check. Avoid a linear search when not doing debug
12752 output.
12753
ec48365d
PA
127542010-08-27 Pedro Alves <pedro@codesourcery.com>
12755
12756 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
12757 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
12758 (struct file_handler) <fd>: Change type to gdb_fildes_t.
12759 (process_event): Change local fd's type to gdb_fildes_t.
12760 (create_file_handler): Adjust prototype.
12761 (delete_file_handler): Adjust prototype.
12762 (handle_file_event): Adjust prototype. Use pfildes.
12763 (create_file_event): Adjsut prototype.
12764 * remote-utils.c (remote_desc, listen_desc): Change type to
12765 gdb_fildes_t.
12766 * server.h: New gdb_fildes_t typedef.
12767 [USE_WIN32API]: Include winsock2.h.
12768 (delete_file_handler, add_file_handler): Adjust prototypes.
12769 (pfildes): Declare.
12770 * utils.c (pfildes): New.
12771
854d88f0
PA
127722010-08-27 Pedro Alves <pedro@codesourcery.com>
12773
12774 * configure.ac (build_warnings): Add -Wno-char-subscripts.
12775 * configure: Regenerate.
12776
0146f85b
PA
127772010-08-27 Pedro Alves <pedro@codesourcery.com>
12778
12779 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
12780 (linux_done_accessing_memory): ... this.
12781 (linux_target_ops): Adjust.
12782 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
12783 * nto-low.c (nto_target_ops): Adjust comment.
12784 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
12785 * spu-low.c (spu_target_ops): Adjust comment.
12786 * target.h (target_ops): Rename unprepare_to_access_memory field
12787 to done_accessing_memory.
12788 (unprepare_to_access_memory): Rename to ...
12789 (done_accessing_memory): ... this.
12790
90d74c30
PA
127912010-08-26 Pedro Alves <pedro@codesourcery.com>
12792
12793 * linux-low.c (linux_prepare_to_access_memory): New.
12794 (linux_unprepare_to_access_memory): New.
12795 (linux_target_ops): Install them.
12796 * server.c (read_memory): Rename to ...
12797 (gdb_read_memory): ... this. Use
12798 prepare_to_access_memory/prepare_to_access_memory.
12799 (write_memory): Rename to ...
12800 (gdb_write_memory): ... this. Use
12801 prepare_to_access_memory/prepare_to_access_memory.
12802 (handle_search_memory_1): Adjust.
12803 (process_serial_event): Adjust.
12804 * target.h (struct target_ops): New fields
12805 prepare_to_access_memory and unprepare_to_access_memory.
12806 (prepare_to_access_memory, unprepare_to_access_memory): New.
12807 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
12808 prepare_to_access_memory/prepare_to_access_memory.
12809 * nto-low.c (nto_target_ops): Adjust.
12810 * spu-low.c (spu_target_ops): Adjust.
12811 * win32-low.c (win32_target_ops): Adjust.
12812
fd467969
PA
128132010-08-26 Pedro Alves <pedro@codesourcery.com>
12814
12815 * Makefile.in (WARN_CFLAGS): Get it from configure.
12816 (WERROR_CFLAGS): New.
12817 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
12818 * configure.ac: Introduce --enable-werror, which adds -Werror to
12819 the compiler command line. Enabled by default. Disable with
12820 --disable-werror. Add -Wdeclaration-after-statement
12821 Wpointer-arith and -Wformat-nonliteral to warning flags.
12822 * configure: Regenerate.
12823
331e2f5f
PA
128242010-08-26 Pedro Alves <pedro@codesourcery.com>
12825
12826 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
12827
e581f2b4
PA
128282010-08-26 Pedro Alves <pedro@codesourcery.com>
12829
12830 * gdbreplay.c (remote_error): New.
12831 (gdbchar): New.
12832 (expect): Use gdbchar. Check for error reading from GDB.
12833 Clarify sync error output.
12834 (play): Check for errors writing to GDB.
12835 * linux-low.c (sigchld_handler): Really ignore `write' errors.
12836 * remote-utils.c (getpkt): Check for errors writing to the remote
12837 descriptor.
12838
3c11dd79
PA
128392010-08-25 Pedro Alves <pedro@codesourcery.com>
12840
12841 * linux-low.c (linux_wait_1): Move non-debugging code out of
12842 `debug_threads' control.
12843
d20a8ad9
PA
128442010-08-25 Pedro Alves <pedro@codesourcery.com>
12845
12846 * linux-low.c (linux_wait_1): Don't set last_status here.
12847 * server.c (push_event, queue_stop_reply_callback): Assert we're
12848 not pushing a TARGET_WAITKIND_IGNORE event.
12849 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
12850 (myresume, handle_target_event): Set the thread's last_resume_kind
12851 and last_status from the target returned status.
12852
964e4306
PA
128532010-08-25 Pedro Alves <pedro@codesourcery.com>
12854
12855 PR threads/10729
12856
12857 * linux-x86-low.c (update_debug_registers_callback): New.
12858 (i386_dr_low_set_addr): Use it.
12859 (i386_dr_low_get_addr): New.
12860 (i386_dr_low_set_control): Use update_debug_registers_callback.
12861 (i386_dr_low_get_control): New.
12862 (i386_dr_low_get_status): Adjust.
12863 * linux-low.c (linux_stop_lwp): New.
12864 * linux-low.h (linux_stop_lwp): Declare.
12865
12866 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
12867 argument instead of a i386_debug_reg_state.
12868 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
12869 a i386_debug_reg_state.
12870 (i386_insert_aligned_watchpoint): Adjust.
12871 (i386_remove_aligned_watchpoint): Adjust.
12872 (i386_low_stopped_data_address): Read the debug registers from the
12873 inferior instead of from the mirrors.
12874 * i386-low.h (struct i386_debug_reg_state): Extend comment.
12875 (i386_dr_low_get_addr): Declare.
12876 (i386_dr_low_get_control): Declare.
12877 (i386_dr_low_get_status): Change prototype.
12878
12879 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
12880 (i386_dr_low_get_addr): New.
12881 (i386_dr_low_get_control): New.
12882 (i386_dr_low_get_status): Adjust prototype. Return
12883 dr_status_mirror.
12884 (i386_initial_stuff): Clear dr_status_mirror and
12885 dr_control_mirror.
12886 (i386_get_thread_context): Adjust.
12887 (i386_set_thread_context): Adjust.
12888 (i386_thread_added): Adjust.
12889
5f21a75b
PA
128902010-08-24 Pedro Alves <pedro@codesourcery.com>
12891
12892 * linux-low.h (linux_thread_area): Delete declaration.
12893
3e4c1235
TS
128942010-08-11 Thomas Schwinge <thomas@codesourcery.com>
12895
12896 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
12897 after its termination.
12898
1971b033
PA
128992010-08-09 Pedro Alves <pedro@codesourcery.com>
12900
12901 * linux-low.c (gdb_wants_lwp_stopped): Delete.
12902 (gdb_wants_all_stopped): Delete.
12903 (linux_wait_1): Don't call them.
12904 * server.c (handle_v_cont): Tag all threads as want-stopped.
12905 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
12906 stopped as "client-wants-stopped".
12907
310444ac
PA
129082010-07-31 Pedro Alves <pedro@codesourcery.com>
12909
12910 * Makefile.in (signals_h): New.
12911 (server_h): Depend on it.
12912 (server.o): Don't depend on $(signals_def).
12913 (signals.o): Depend on $(signals_def).
12914
a19cae16
JK
129152010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
12916
12917 * Makefile.in (signals_def): New.
12918 (server_h): Append include/gdb/signals.h and signals_def.
12919 (server.o): Append signals_def.
12920
30d50328
JK
129212010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
12922
12923 * server.c (handle_target_event): Use target_signal_to_host for
12924 resume_info.sig initialization.
12925 * target.h (struct thread_resume) <sig>: New comment.
12926
5c3216e2
OS
129272010-07-20 Ozkan Sezer <sezeroz@gmail.com>
12928
c6f46ca0
OS
12929 * server.c (handle_query): strcpy() the returned string from paddress()
12930 instead of sprintf().
5c3216e2
OS
12931 * utils.c (paddress): Return phex_nz().
12932
6bd31874
JB
129332010-07-07 Joel Brobecker <brobecker@adacore.com>
12934
12935 * server.c (handle_v_cont): Call mourn_inferior if process
12936 just exited.
12937 (myresume): Likewise.
12938
0fb4aa4b
PA
129392010-07-01 Pedro Alves <pedro@codesourcery.com>
12940
12941 Static tracepoints, and integration with UST.
12942
12943 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
12944 * mem-break.c (uninsert_all_breakpoints)
12945 (reinsert_all_breakpoints): New.
12946 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
12947 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
12948 (gdb_agent_ust_loaded, helper_thread_id)
12949 (gdb_agent_helper_thread_id): New macros.
12950 (struct ipa_sym_addresses): Add addr_ust_loaded,
12951 addr_helper_thread_id, addr_cmd_buf.
12952 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
12953 (in_process_agent_loaded_ust): New.
12954 (write_e_ust_not_loaded): New.
12955 (maybe_write_ipa_ust_not_loaded): New.
12956 (struct collect_static_trace_data_action): New.
12957 (enum tracepoint_type) <static_tracepoint>: New.
12958 (struct tracepoint) <handle>: Mention static tracepoints.
12959 (struct static_tracepoint_ctx): New.
12960 (CMD_BUF_SIZE): New.
12961 (add_tracepoint_action): Handle static tracepoint actions.
12962 (unprobe_marker_at): New.
12963 (clear_installed_tracepoints): Handle static tracepoints.
12964 (cmd_qtdp): Handle static tracepoints.
12965 (probe_marker_at): New.
12966 (cmd_qtstart): Handle static tracepoints.
12967 (response_tracepoint): Handle static tracepoints.
12968 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
12969 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
12970 (get_context_regcache): Handle static tracepoints.
12971 (do_action_at_tracepoint): Handle static tracepoint actions.
12972 (traceframe_find_block_type): Handle static trace data blocks.
12973 (traceframe_read_sdata): New.
12974 (download_tracepoints): Download static tracepoint actions.
12975 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
12976 (GDB_PROBE_NAME): New.
12977 (ust_ops): New.
12978 (GET_UST_SYM): New.
12979 (USTF): New.
12980 (dlsym_ust): New.
12981 (ust_marker_to_static_tracepoint): New.
12982 (gdb_probe): New.
12983 (collect_ust_data_at_tracepoint): New.
12984 (gdb_ust_probe): New.
12985 (UNIX_PATH_MAX, SOCK_DIR): New.
12986 (gdb_ust_connect_sync_socket): New.
12987 (resume_thread, stop_thread): New.
12988 (run_inferior_command): New.
12989 (init_named_socket): New.
12990 (gdb_ust_socket_init): New.
12991 (cstr_to_hexstr): New.
12992 (next_st): New.
12993 (first_marker, next_marker): New.
12994 (response_ust_marker): New.
12995 (cmd_qtfstm, cmd_qtsstm): New.
12996 (unprobe_marker_at, probe_marker_at): New.
12997 (cmd_qtstmat, gdb_ust_thread): New.
12998 (gdb_ust_init): New.
12999 (initialize_tracepoint_ftlib): Call gdb_ust_init.
13000 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
13001 (ST_REGENTRY): New.
13002 (x86_64_st_collect_regmap): New.
13003 (X86_64_NUM_ST_COLLECT_GREGS): New.
13004 (AMD64_RIP_REGNUM): New.
13005 (supply_static_tracepoint_registers): New.
13006 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
13007 (ST_REGENTRY): New.
13008 (i386_st_collect_regmap): New.
13009 (i386_NUM_ST_COLLECT_GREGS): New.
13010 (supply_static_tracepoint_registers): New.
13011 * server.c (handle_query): Handle qXfer:statictrace:read.
13012 <qSupported>: Report support for StaticTracepoints, and
13013 qXfer:statictrace:read features.
13014 * server.h (traceframe_read_sdata)
13015 (supply_static_tracepoint_registers): Declare.
13016 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
13017 (unpack_varlen_hex): Include in IPA build.
13018 * Makefile.in (ustlibs, ustinc): New.
13019 (IPA_OBJS): Add remote-utils-ipa.o.
13020 ($(IPA_LIB)): Link -ldl and -lpthread.
13021 (UST_CFLAGS): New.
13022 (IPAGENT_CFLAGS): Add UST_CFLAGS.
13023 * config.in, configure: Regenerate.
13024
9e4344e5
PA
130252010-06-20 Ian Lance Taylor <iant@google.com>
13026 Pedro Alves <pedro@codesourcery.com>
13027
13028 * linux-x86-low.c (always_true): Delete.
13029 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
13030 trying to fool the compiler with always_true.
13031
c6beb2cb
PA
130322010-06-20 Pedro Alves <pedro@codesourcery.com>
13033
13034 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
13035 conditions in gdbserver.
13036
d2ed6730
UW
130372010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
13038
13039 * spu-low.c (spu_read_memory): Wrap around local store limit.
13040 (spu_write_memory): Likewise.
13041
4e29fb54
PA
130422010-06-15 Pedro Alves <pedro@codesourcery.com>
13043
13044 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
13045 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
13046 LONGEST uses.
13047 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
13048 uses.
13049 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
13050 uses with LONGEST uses.
13051
6a271cae
PA
130522010-06-14 Stan Shebs <stan@codesourcery.com>
13053 Pedro Alves <pedro@codesourcery.com>
13054
13055 Bytecode compiler.
13056
13057 * linux-x86-low.c: Include limits.h.
13058 (add_insns): New.
13059 (always_true): New.
13060 (EMIT_ASM): New.
13061 (EMIT_ASM32): New.
13062 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
13063 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
13064 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
13065 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
13066 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
13067 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
13068 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
13069 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
13070 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
13071 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
13072 (amd64_emit_void_call_2): New.
13073 (amd64_emit_ops): New.
13074 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
13075 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
13076 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
13077 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
13078 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
13079 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
13080 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
13081 (i386_emit_call, i386_emit_reg, i386_emit_pop)
13082 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
13083 (i386_emit_stack_adjust, i386_emit_int_call_1)
13084 (i386_emit_void_call_2): New.
13085 (i386_emit_ops): New.
13086 (x86_emit_ops): New.
13087 (the_low_target): Install x86_emit_ops.
13088 * server.h (struct emit_ops): New.
13089 (get_raw_reg_func_addr): Declare.
13090 (current_insn_ptr, emit_error): Declare.
13091 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
13092 (set_trace_state_variable_value): New defines.
13093 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
13094 addr_get_trace_state_variable_value and
13095 addr_set_trace_state_variable_value.
13096 (symbol_list): New fields for get_raw_reg,
13097 get_trace_state_variable_value and set_trace_state_variable_value.
13098 (condfn): New typedef.
13099 (struct tracepoint): New field `compiled_cond'.
13100 (do_action_at_tracepoint): Clear compiled_cond.
13101 (get_trace_state_variable_value, set_trace_state_variable_value):
13102 Export in the IPA.
13103 (condition_true_at_tracepoint): If there's a compiled condition,
13104 run that.
13105 (current_insn_ptr, emit_error): New globals.
13106 (struct bytecode_address): New.
13107 (get_raw_reg_func_addr): New.
13108 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
13109 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
13110 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
13111 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
13112 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
13113 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
13114 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
13115 (compile_tracepoint_condition, compile_bytecodes): New.
13116 * target.h (emit_ops): Forward declare.
13117 (struct target_ops): New field emit_ops.
13118 (target_emit_ops): New.
13119 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
13120 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
13121 * linux-low.c (linux_emit_ops): New.
13122 (linux_target_ops): Install it.
13123 * linux-low.h (struct linux_target_ops): New field emit_ops.
13124
92b72907
UW
131252010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
13126
13127 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
13128 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
13129
fa593d66
PA
131302010-06-01 Pedro Alves <pedro@codesourcery.com>
13131 Stan Shebs <stan@codesourcery.com>
13132
13133 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
13134 (all): Depend on $(extra_libraries).
13135 (install-only): Install the IPA.
13136 (IPA_OBJS, IPA_LIB): New.
13137 (clean): Remove the IPA lib.
13138 (IPAGENT_CFLAGS): New.
13139 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
13140 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
13141 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
13142 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
13143 * configure.ac: Check for atomic builtins support in the compiler.
13144 (IPA_DEPFILES, extra_libraries): Define.
13145 * configure.srv (ipa_obj): Add description.
13146 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
13147 (i[34567]86-*-linux*): Set ipa_obj.
13148 (x86_64-*-linux*): Set ipa_obj.
13149 * linux-low.c (stabilizing_threads): New.
13150 (supports_fast_tracepoints): New.
13151 (linux_detach): Stabilize threads before detaching.
13152 (handle_tracepoints): Handle internal tracing breakpoints. Assert
13153 the lwp is either not stabilizing, or is moving out of a jump pad.
13154 (linux_fast_tracepoint_collecting): New.
13155 (maybe_move_out_of_jump_pad): New.
13156 (enqueue_one_deferred_signal): New.
13157 (dequeue_one_deferred_signal): New.
13158 (linux_wait_for_event_1): If moving out of a jump pad, defer
13159 pending signals to later.
13160 (linux_stabilize_threads): New.
13161 (linux_wait_1): Check if threads need moving out of jump pads, and
13162 do it if so.
13163 (stuck_in_jump_pad_callback): New.
13164 (move_out_of_jump_pad_callback): New.
13165 (lwp_running): New.
13166 (linux_resume_one_lwp): Handle moving out of jump pads.
13167 (linux_set_resume_request): Dequeue deferred signals.
13168 (need_step_over_p): Also step over fast tracepoint jumps.
13169 (start_step_over): Also uninsert fast tracepoint jumps.
13170 (finish_step_over): Also reinsert fast tracepoint jumps.
13171 (linux_install_fast_tracepoint_jump): New.
13172 (linux_target_ops): Install linux_stabilize_threads and
13173 linux_install_fast_tracepoint_jump_pad.
13174 * linux-low.h (linux_target_ops) <get_thread_area,
13175 install_fast_tracepoint_jump_pad>: New fields.
13176 (struct lwp_info) <collecting_fast_tracepoint,
13177 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
13178 (linux_get_thread_area): Declare.
13179 * linux-x86-low.c (jump_insn): New.
13180 (x86_get_thread_area): New.
13181 (append_insns): New.
13182 (push_opcode): New.
13183 (amd64_install_fast_tracepoint_jump_pad): New.
13184 (i386_install_fast_tracepoint_jump_pad): New.
13185 (x86_install_fast_tracepoint_jump_pad): New.
13186 (the_low_target): Install x86_get_thread_area and
13187 x86_install_fast_tracepoint_jump_pad.
13188 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
13189 (struct fast_tracepoint_jump): New.
13190 (fast_tracepoint_jump_insn): New.
13191 (fast_tracepoint_jump_shadow): New.
13192 (find_fast_tracepoint_jump_at): New.
13193 (fast_tracepoint_jump_here): New.
13194 (delete_fast_tracepoint_jump): New.
13195 (set_fast_tracepoint_jump): New.
13196 (uninsert_fast_tracepoint_jumps_at): New.
13197 (reinsert_fast_tracepoint_jumps_at): New.
13198 (set_breakpoint_at): Use write_inferior_memory.
13199 (uninsert_raw_breakpoint): Use write_inferior_memory.
13200 (check_mem_read): Mask out fast tracepoint jumps.
13201 (check_mem_write): Mask out fast tracepoint jumps.
13202 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
13203 (set_fast_tracepoint_jump): Declare.
13204 (delete_fast_tracepoint_jump)
13205 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
13206 (reinsert_fast_tracepoint_jumps_at): Declare.
13207 * regcache.c: Don't compile many functions when building the
13208 in-process agent library.
13209 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
13210 the register buffer in the heap.
13211 (free_register_cache): If the register buffer isn't owned by the
13212 regcache, don't free it.
13213 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
13214 pre-existing register caches.
13215 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
13216 type.
13217 (convert_ascii_to_int): : Constify `from' parameter type.
13218 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
13219 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
13220 the needed buffer in-place.
13221 (relocate_instruction): New.
13222 * server.c (handle_query) <qSymbols>: If the target supports
13223 tracepoints, give it a chance of looking up symbols. Report
13224 support for fast tracepoints.
13225 (handle_status): Stabilize threads.
13226 (process_serial_event): Adjust.
13227 * server.h (struct fast_tracepoint_jump): Forward declare.
13228 (struct process_info) <fast_tracepoint_jumps>: New field.
13229 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
13230 (decode_X_packet, decode_M_packet): Adjust.
13231 (relocate_instruction): Declare.
13232 (in_process_agent_loaded): Declare.
13233 (tracepoint_look_up_symbols): Declare.
13234 (struct fast_tpoint_collect_status): Declare.
13235 (fast_tracepoint_collecting): Declare.
13236 (force_unlock_trace_buffer): Declare.
13237 (handle_tracepoint_bkpts): Declare.
13238 (initialize_low_tracepoint)
13239 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
13240 * target.h (struct target_ops) <stabilize_threads,
13241 install_fast_tracepoint_jump_pad>: New fields.
13242 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
13243 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
13244 [HAVE_STDINT_H]: Include stdint.h.
13245 (trace_debug_1): Rename to ...
13246 (trace_vdebug): ... this.
13247 (trace_debug): Rename to ...
13248 (trace_debug_1): ... this. Add `level' parameter.
13249 (trace_debug): New.
13250 (ATTR_USED, ATTR_NOINLINE): New.
13251 (IP_AGENT_EXPORT): New.
13252 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
13253 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
13254 (about_to_request_buffer_space, trace_buffer_is_full)
13255 (stopping_tracepoint, expr_eval_result, error_tracepoint)
13256 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
13257 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
13258 (traceframe_write_count, traceframes_created)
13259 (trace_state_variables)
13260 New renaming defines.
13261 (struct ipa_sym_addresses): New.
13262 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
13263 (symbol_list): New.
13264 (ipa_sym_addrs): New.
13265 (all_tracepoint_symbols_looked_up): New.
13266 (in_process_agent_loaded): New.
13267 (write_e_ipa_not_loaded): New.
13268 (maybe_write_ipa_not_loaded): New.
13269 (tracepoint_look_up_symbols): New.
13270 (debug_threads) [IN_PROCESS_AGENT]: New.
13271 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
13272 (UNKNOWN_SIDE_EFFECTS): New.
13273 (stop_tracing): New.
13274 (flush_trace_buffer): New.
13275 (stop_tracing_bkpt): New.
13276 (flush_trace_buffer_bkpt): New.
13277 (read_inferior_integer): New.
13278 (read_inferior_uinteger): New.
13279 (read_inferior_data_pointer): New.
13280 (write_inferior_data_pointer): New.
13281 (write_inferior_integer): New.
13282 (write_inferior_uinteger): New.
13283 (struct collect_static_trace_data_action): Delete.
13284 (enum tracepoint_type): New.
13285 (struct tracepoint) <type>: New field `type'.
43aaf8b6
PA
13286 <actions_str, step_actions, step_actions_str>: Only include in
13287 GDBserver.
fa593d66
PA
13288 <orig_size, obj_addr_on_target, adjusted_insn_addr>
13289 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
13290 (tracepoints): Use IP_AGENT_EXPORT.
13291 (last_tracepoint): Don't include in the IPA.
13292 (stopping_tracepoint): Use IP_AGENT_EXPORT.
13293 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
13294 (alloced_trace_state_variables): New.
13295 (trace_state_variables): Use IP_AGENT_EXPORT.
13296 (traceframe_t): Delete unused variable.
13297 (circular_trace_buffer): Don't include in the IPA.
13298 (trace_buffer_start): Delete.
13299 (struct trace_buffer_control): New.
13300 (trace_buffer_free): Delete.
13301 (struct ipa_trace_buffer_control): New.
13302 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
13303 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
13304 New.
13305 (trace_buffer_ctrl): New.
13306 (TRACE_BUFFER_CTRL_CURR): New.
13307 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
13308 Reimplement as macros.
13309 (trace_buffer_wrap): Delete.
13310 (traceframe_write_count, traceframe_read_count)
13311 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
13312 (struct tracepoint_hit_ctx) <type>: New field.
13313 (struct fast_tracepoint_ctx): New.
13314 (memory_barrier): New.
13315 (cmpxchg): New.
13316 (record_tracepoint_error): Update atomically in the IPA.
13317 (clear_inferior_trace_buffer): New.
13318 (about_to_request_buffer_space): New.
13319 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
13320 updating the same buffer.
13321 (add_tracepoint): Default the tracepoint's type to trap
13322 tracepoint, and orig_size to -1.
13323 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
13324 internal variables.
13325 (create_trace_state_variable): New parameter `gdb'. Handle it.
13326 (clear_installed_tracepoints): Clear fast tracepoint jumps.
13327 (cmd_qtdp): Handle fast tracepoints.
13328 (cmd_qtdv): Adjust.
13329 (max_jump_pad_size): New.
13330 (gdb_jump_pad_head): New.
13331 (get_jump_space_head): New.
13332 (claim_jump_space): New.
13333 (sort_tracepoints): New.
13334 (MAX_JUMP_SIZE): New.
13335 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
13336 IPA.
13337 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
13338 support. Upload fast traceframes, and delete internal IPA
13339 breakpoints.
13340 (stop_tracing_handler): New.
13341 (flush_trace_buffer_handler): New.
13342 (cmd_qtstop): Upload fast tracepoints.
13343 (response_tracepoint): Handle fast tracepoints.
13344 (tracepoint_finished_step): Upload fast traceframes. Set the
13345 tracepoint hit context's tracepoint type.
13346 (handle_tracepoint_bkpts): New.
13347 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
13348 type. Add comment about fast tracepoints.
13349 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
13350 non-existing action_str field.
13351 (get_context_regcache): Handle fast tracepoints.
13352 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
13353 to the regcache.
13354 (fast_tracepoint_from_jump_pad_address): New.
13355 (fast_tracepoint_from_ipa_tpoint_address): New.
13356 (collecting_t): New.
13357 (force_unlock_trace_buffer): New.
13358 (fast_tracepoint_collecting): New.
13359 (collecting): New.
13360 (gdb_collect): New.
13361 (write_inferior_data_ptr): New.
13362 (target_tp_heap): New.
13363 (target_malloc): New.
13364 (download_agent_expr): New.
13365 (UALIGN): New.
13366 (download_tracepoints): New.
13367 (download_trace_state_variables): New.
13368 (upload_fast_traceframes): New.
13369 (IPA_FIRST_TRACEFRAME): New.
13370 (IPA_NEXT_TRACEFRAME_1): New.
13371 (IPA_NEXT_TRACEFRAME): New.
13372 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
13373 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
13374 (gdb_jump_pad_buffer_end): New.
13375 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
13376 (initialize_tracepoint): Adjust.
13377 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
13378 buffer. Initialize the low module.
13379 * utils.c (PREFIX, TOOLNAME): New.
13380 (malloc_failure): Use PREFIX.
13381 (error): In the IPA, an error causes an exit.
13382 (fatal, warning): Use PREFIX.
13383 (internal_error): Use TOOLNAME.
13384 (NUMCELLS): Increase to 10.
13385 * configure, config.in: Regenerate.
13386
d149dd1d
PA
133872010-06-01 Pedro Alves <pedro@codesourcery.com>
13388
13389 * server.c (handle_query) <qSupported>: Do two passes over the
13390 qSupported string to avoid nesting strtok.
13391
f6528abd
JK
133922010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
13393
13394 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
13395 (CDEPS): New.
13396 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
13397 -Wl,--dynamic-list.
13398 * configure: Regenerate.
13399 * proc-service.list: New.
13400
ca2a87a0
JK
134012010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
13402
13403 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
13404 New comment.
13405
363a6e9f
OS
134062010-05-26 Ozkan Sezer <sezeroz@gmail.com>
13407
13408 * gdbreplay.c (remote_open): Check error return from socket() call by
13409 its equality to -1 not by it being negative.
13410 * remote-utils.c (remote_open): Likewise.
13411
d23b6cb1
PA
134122010-05-23 Pedro Alves <pedro@codesourcery.com>
13413
13414 * config.h: Regenerate.
13415
28d3cf85
MK
134162010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
13417
13418 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
13419 doesn't provide PTRACE_GET_THREAD_AREA.
13420
fea36a59
MK
134212010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
13422
13423 * linux-m68k-low.c: Include <asm/ptrace.h>
13424 (ps_get_thread_area): Implement.
13425
24b066ba
DE
134262010-05-03 Doug Evans <dje@google.com>
13427
13428 * event-loop.c (struct callback_event): New struct.
13429 (callback_list): New global.
13430 (append_callback_event, delete_callback_event): New functions.
13431 (process_callback): New function.
13432 (start_event_loop): Call it.
13433 * remote-utils.c (NOT_SCHEDULED): Define.
13434 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
13435 moved out of readchar.
13436 (readchar): Rewrite. Call reschedule before returning.
13437 (reset_readchar): New function.
13438 (remote_close): Call it.
13439 (process_remaining, reschedule): New functions.
13440 * server.h (callback_handler_func): New typedef.
13441 (append_callback_event, delete_callback_event): Declare.
13442
9836d6ea
PA
134432010-05-03 Pedro Alves <pedro@codesourcery.com>
13444
13445 * proc-service.c (ps_pglobal_lookup): Use
13446 thread_db_look_up_one_symbol.
13447 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
13448 parameter. Use it instead of all_symbols_looked_up.
13449 * server.h (struct process_info) <all_symbols_looked_up>: Delete
13450 field.
13451 (all_symbols_looked_up): Don't declare.
13452 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
13453 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
13454 field.
13455 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
13456 Set all_symbols_looked_up here.
13457 (thread_db_look_up_one_symbol): New.
13458 (thread_db_get_tls_address): Adjust.
13459 (thread_db_load_search, try_thread_db_load_1): Always allocate the
13460 thread_db object on the heap, and tentatively set it in the
13461 process structure.
13462 (thread_db_init): Don't set all_symbols_looked_up here.
13463 * linux-low.h (thread_db_look_up_one_symbol): Declare.
13464
7984d532
PA
134652010-05-03 Pedro Alves <pedro@codesourcery.com>
13466
13467 * linux-low.c (linux_kill, linux_detach): Adjust.
13468 (status_pending_p_callback): Remove redundant statement. Check
13469 for !TARGET_WAITIKIND_IGNORE, instead of
13470 TARGET_WAITKIND_STOPPED.
13471 (handle_tracepoints): Make sure LWP is locked. Adjust.
13472 (linux_wait_for_event_1): Adjust.
13473 (linux_cancel_breakpoints): New.
13474 (unsuspend_one_lwp): New.
13475 (unsuspend_all_lwps): New.
13476 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
13477 (send_sigstop_callback): Change return type to int, add new
13478 `except' parameter and handle it.
13479 (suspend_and_send_sigstop_callback): New.
13480 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
13481 pass them down. If SUSPEND, also increment the lwp's suspend
13482 count.
13483 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
13484 (need_step_over_p): Don't consider suspended LWPs.
13485 (start_step_over): Adjust.
13486 (proceed_one_lwp): Change return type to int, add new `except'
13487 parameter and handle it.
13488 (unsuspend_and_proceed_one_lwp): New.
13489 (proceed_all_lwps): Use find_inferior instead of
13490 for_each_inferior.
13491 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
13492 also decrement the suspend count of LWPs. Pass `except' down,
13493 instead of hacking its suspend count.
13494 (linux_pause_all): Add `freeze' parameter. Adjust.
13495 (linux_unpause_all): New.
13496 (linux_target_ops): Install linux_unpause_all.
13497 * server.c (handle_status): Adjust.
13498 * target.h (struct target_ops): New fields `unpause_all' and
13499 `cancel_breakpoints'. Add new parameter to `pause_all'.
13500 (pause_all): Add new `freeze' parameter.
13501 (unpause_all): New.
13502 (cancel_breakpoints): New.
13503 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
13504 cancel breakpoints.
13505 (cmd_qtstart): Pause threads.
13506 (stop_tracing): Pause threads, and cancel breakpoints.
13507 * win32-low.c (win32_target_ops): Adjust.
13508
e471f25b
PA
135092010-05-03 Pedro Alves <pedro@codesourcery.com>
13510
13511 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
13512 the inferior right away from here...
13513 (linux_wait_1): ... to here, and adjust to check the thread's
13514 last_resume_kind instead of the lwp's step or stop_expected flags.
13515
1915ef4f
PA
135162010-05-02 Pedro Alves <pedro@codesourcery.com>
13517
13518 * README: Use consistent `GDB' and `GDBserver' spellings.
13519
f9e39928
PA
135202010-05-02 Pedro Alves <pedro@codesourcery.com>
13521
13522 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
13523 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
13524 (linux_detach_one_lwp): Assume the lwp is stopped.
13525 (any_thread_of): Delete.
13526 (linux_detach): Stop all lwps here. Don't blindly delete all
13527 breakpoints.
13528 (delete_lwp_callback): New.
13529 (linux_mourn): Delete all lwps of the process that is gone.
13530 (linux_wait_1): Don't delete the last lwp of the process here.
13531 * mem-break.h (mark_breakpoints_out): Declare.
13532 * mem-break.c (mark_breakpoints_out): New.
13533 (free_all_breakpoints): Use it.
13534 * server.c (handle_target_event): If the process is gone, mark
13535 breakpoints out.
13536 * thread-db.c (struct thread_db) <create_bp>: New field.
13537 (thread_db_enable_reporting): Fix prototype. Store a thread event
13538 breakpoint reference in the thread_db struct.
13539 (thread_db_load_search): Clear the thread_db object.
13540 (try_thread_db_load_1): Ditto.
13541 (switch_to_process): New.
13542 (disable_thread_event_reporting): Use it.
13543 (remove_thread_event_breakpoints): New.
13544 (thread_db_detach, thread_db_mourn): Use it.
13545
1e7fc18c
PA
135462010-05-01 Pedro Alves <pedro@codesourcery.com>
13547
13548 * linux-low.c (linux_enable_event_reporting): New.
13549 (linux_wait_for_event_1, handle_extended_wait): Use it.
13550
02fc4de7
PA
135512010-04-30 Pedro Alves <pedro@codesourcery.com>
13552
13553 * linux-low.c (linux_kill_one_lwp, linux_kill)
13554 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
13555 (send_sigstop): Take an lwp_info as parameter instead. Queue a
13556 SIGSTOP even if the LWP is stopped.
13557 (send_sigstop_callback): New.
13558 (stop_all_lwps): Use send_sigstop_callback instead.
13559 (linux_resume_one_thread): Adjust.
13560 (proceed_one_lwp): Still proceed an LWP that the client has
13561 requested to stop, if we haven't reported it as stopped yet. Make
13562 sure that LWPs the client want stopped, have a pending SIGSTOP.
13563
bc3b5632
DE
135642010-04-26 Doug Evans <dje@google.com>
13565
ae1ada35
DE
13566 * server.c (handle_general_set): Make static.
13567
bc3b5632
DE
13568 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
13569 Print received char after testing for error/eof instead of before.
13570 (input_interrupt): Tweak comment.
13571
65730243
DE
135722010-04-23 Doug Evans <dje@google.com>
13573
13574 * server.c (start_inferior): Print inferior argv if --debug.
13575
a8ae7dc0
AR
135762010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
13577
13578 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
13579 * nto-x86-low.c: Include server.h
13580
1c07cc19
PM
135812010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
13582
13583 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
13584 be consistent with other sources of this directory.
13585 (init_registers_amd64): Correct name of source file of this function
13586 in the comment.
13587
e0a61e09
PM
135882010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
13589
13590 * configure.srv (x86_64-*-mingw*): New configuration for Windows
13591 64-bit executables.
13592
54709339
PM
135932010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
13594
13595 * win32-i386-low.c: Add 64-bit support.
13596 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
13597 (init_registers_amd64): Declare.
13598 (mappings): Add 64-bit version of array.
13599 (init_windows_x86): New function.
13600 (the_low_target): Change init_arch field to init_windows_x86.
13601
e8f0053d
PM
136022010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
13603
13604 * win32-low.c: Adapt to support also 64-bit architecture.
13605 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
13606 (get_image_name): Use SIZE_T type for local variable `done'.
13607 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
13608 (toolhelp_get_dll_name): Idem.
13609 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
13610 Use uintptr_t typecast to avoid warning.
13611 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
13612 (handle_exception): Use phex_nz to avoid warning.
13613 (win32_wait): Remove unused local variable `process'.
13614
c481e77e
PM
136152010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
13616
13617 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
13618 `amd64-avx.o'.
13619
12ea4b69
PM
136202010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
13621
13622 * configure.ac: Use `ws2_32' library for srv_mingw.
13623 * configure: Regenerate.
13624 * gdbreplay.c: Include winsock2.h instead of winsock.h.
13625 * remote-utils.c: Likewise.
13626
f6d1620c
L
136272010-04-17 H.J. Lu <hongjiu.lu@intel.com>
13628
13629 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
13630 if __x86_64__ is defined.
13631
8e642873
PM
136322010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
13633
13634 * configure: Regenerate.
13635
711e434b
PM
136362010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
13637
13638 * server.c (handle_query): Handle 'qGetTIBAddr' query.
13639 * target.h (target_ops): New get_tib_address field.
13640 * win32-low.h (win32_thread_info): Add thread_local_base field.
13641 * win32-low.c (child_add_thread): Add tlb argument.
13642 Set thread_local_base field to TLB.
13643 (get_child_debug_event): Adapt to child_add_thread change.
13644 (win32_get_tib_address): New function.
13645 (win32_target_ops): Set get_tib_address field to
13646 win32_get_tib_address.
13647 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
13648
505106cd
PA
136492010-04-12 Pedro Alves <pedro@codesourcery.com>
13650
505106cd
PA
13651 * linux-low.c (linux_mourn): Also remove the process.
13652 * server.c (handle_target_event): Don't remove the process here.
13653 * nto-low.c (nto_mourn): New.
13654 (nto_target_ops): Install it.
13655 * spu-low.c (spu_mourn): New.
13656 (spu_target_ops): Install it.
13657 * win32-low.c (win32_mourn): New.
13658 (win32_target_ops): Install it.
13659
e8470a06
PA
136602010-04-12 Pedro Alves <pedro@codesourcery.com>
13661
13662 * server.h (buffer_xml_printf): Remove redundant `;'.
13663
45ba0d02
PA
136642010-04-12 Pedro Alves <pedro@codesourcery.com>
13665
13666 * regcache.c (set_register_cache): Invalidate regcaches before
13667 changing the register cache layout.
13668 (regcache_invalidate_one): Allow a NULL regcache.
13669 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
13670 regcaches before changing the register cache layout or the target
13671 regsets.
13672
59e04013
L
136732010-04-12 H.J. Lu <hongjiu.lu@intel.com>
13674
13675 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
13676 variable warning on Linux/x86-64.
13677
8336d594
PA
136782010-04-11 Pedro Alves <pedro@codesourcery.com>
13679
13680 GDBserver disconnected tracing support.
13681
13682 * linux-low.c (linux_remove_process): Delete.
13683 (add_lwp): Don't set last_resume_kind here.
13684 (linux_kill): Use `mourn'.
13685 (linux_detach): Use `thread_db_detach', and `mourn'.
13686 (linux_mourn): New.
13687 (linux_attach_lwp_1): Adjust comment.
13688 (linux_attach): last_resume_kind moved the thread_info; adjust.
13689 (status_pending_p_callback): Adjust.
13690 (linux_wait_for_event_1): Adjust.
13691 (count_events_callback, select_singlestep_lwp_callback)
13692 (select_event_lwp_callback, cancel_breakpoints_callback)
13693 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
13694 (proceed_one_lwp): Adjust.
13695 (linux_async): Add debug output.
13696 (linux_thread_stopped): New.
13697 (linux_pause_all): New.
13698 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
13699 linux_pause_all.
13700 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
13701 (thread_db_free): Delete declaration.
13702 (thread_db_detach, thread_db_mourn): Declare.
13703 * thread-db.c (thread_db_init): Use thread_db_mourn.
13704 (thread_db_free): Delete, split in two.
13705 (disable_thread_event_reporting): New.
13706 (thread_db_detach): New.
13707 (thread_db_mourn): New.
13708
13709 * server.h (struct thread_info) <last_resume_kind>: New field.
13710 <attached>: Add comment.
13711 <gdb_detached>: New field.
13712 (handler_func): Change return type to int.
13713 (handle_serial_event, handle_target_event): Ditto.
13714 (gdb_connected): Declare.
13715 (tracing): Delete.
13716 (disconnected_tracing): Declare.
13717 (stop_tracing): Declare.
13718
13719 * server.c (handle_query) <qSupported>: Report support for
13720 disconnected tracing.
13721 (queue_stop_reply_callback): Account for running threads.
13722 (gdb_wants_thread_stopped): New.
13723 (gdb_wants_all_threads_stopped): New.
13724 (gdb_reattached_process): New.
13725 (handle_status): Clear the `gdb_detached' flag of all processes.
13726 In all-stop, stop all threads.
13727 (main): Be sure to leave tfind mode. Handle disconnected tracing.
13728 (process_serial_event): If the remote connection breaks, or if an
13729 exit was forced with "monitor exit", force an event loop exit.
13730 Handle disconnected tracing on detach.
13731 (handle_serial_event): Adjust.
13732 (handle_target_event): If GDB isn't connected, forward events back
13733 to the inferior, unless the last process exited, in which case,
13734 exit gdbserver. Adjust interface.
13735
13736 * remote-utils.c (remote_open): Don't block in accept. Instead
13737 register an event loop source on the listen socket file
13738 descriptor. Refactor bits into ...
13739 (listen_desc): ... this new global.
13740 (gdb_connected): ... this new function.
13741 (enable_async_notification): ... this new function.
13742 (handle_accept_event): ... this new function.
13743 (remote_close): Clear remote_desc.
13744
13745 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
13746
13747 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
13748 New fields.
13749 (mourn_inferior): Define.
13750 (target_process_qsupported): Avoid the dangling else problem.
13751 (thread_stopped): Define.
13752 (pause_all): Define.
13753 (target_waitstatus_to_string): Declare.
13754 * target.c (target_waitstatus_to_string): New.
13755
13756 * tracepoint.c (tracing): Make extern.
13757 (disconnected_tracing): New.
13758 (stop_tracing): Make extern. Handle tracing stops due to GDB
13759 disconnecting.
13760 (cmd_qtdisconnected): New.
13761 (cmd_qtstatus): Report disconnected tracing status in trace reply.
13762 (handle_tracepoint_general_set): Handle QTDisconnected.
13763
13764 * event-loop.c (event_handler_func): Change return type to int.
13765 (process_event): Bail out if the event handler wants the event
13766 loop to stop.
13767 (handle_file_event): Ditto.
13768 (start_event_loop): Bail out if the event handler wants the event
13769 loop to stop.
13770
13771 * nto-low.c (nto_target_ops): Adjust.
13772 * spu-low.c (spu_wait): Don't remove the process here.
13773 (spu_target_ops): Adjust.
13774 * win32-low.c (win32_wait): Don't remove the process here.
13775 (win32_target_ops): Adjust.
13776
5d267c4c
PA
137772010-04-11 Pedro Alves <pedro@codesourcery.com>
13778
13779 * regcache.c (realloc_register_cache): Invalidate inferior's
13780 regcache before recreating it.
13781
623ccd72
PA
137822010-04-09 Pedro Alves <pedro@codesourcery.com>
13783
13784 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
13785
219f2f23
PA
137862010-04-09 Stan Shebs <stan@codesourcery.com>
13787 Pedro Alves <pedro@codesourcery.com>
13788
13789 * server.h (LONGEST): New.
13790 (struct thread_info) <while_stepping>: New field.
13791 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
13792 Declare.
13793 (initialize_tracepoint, handle_tracepoint_general_set)
13794 (handle_tracepoint_query, tracepoint_finished_step)
13795 (tracepoint_was_hit, release_while_stepping_state_list):
13796 (current_traceframe): Declare.
13797 * server.c (handle_general_set): Handle tracepoint packets.
13798 (read_memory): New.
13799 (write_memory): New.
13800 (handle_search_memory_1): Use read_memory.
13801 (handle_query): Report support for conditional tracepoints, trace
13802 state variables, and tracepoint sources. Handle tracepoint
13803 queries.
13804 (main): Initialize the tracepoints module.
13805 (process_serial_event): Handle traceframe reads/writes.
13806
13807 * linux-low.c (handle_tracepoints): New.
13808 (linux_wait_1): Call it.
13809 (linux_resume_one_lwp): Handle while-stepping.
13810 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
13811 (linux_target_ops): Install them.
13812 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
13813 New field.
13814 * linux-x86-low.c (x86_supports_tracepoints): New.
13815 (the_low_target). Install it.
13816
13817 * mem-break.h (delete_breakpoint): Declare.
13818 * mem-break.c (delete_breakpoint): Make external.
13819
13820 * target.h (struct target_ops): Add `supports_tracepoints',
13821 `read_pc', and `write_pc' fields.
13822 (target_supports_tracepoints): Define.
13823 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
13824 (phex_nz): New.
13825
13826 * regcache.h (struct regcache) <registers_owned>: New field.
13827 (init_register_cache, regcache_cpy): Declare.
13828 (regcache_read_pc, regcache_write_pc): Declare.
13829 (register_cache_size): Declare.
13830 (supply_regblock): Declare.
13831 * regcache.c (init_register_cache): New.
13832 (new_register_cache): Use it.
13833 (regcache_cpy): New.
13834 (register_cache_size): New.
13835 (supply_regblock): New.
13836 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 13837
219f2f23
PA
13838 * tracepoint.c: New.
13839
13840 * Makefile.in (OBS): Add tracepoint.o.
13841 (tracepoint.o): New rule.
13842
3a13a53b
L
138432010-04-08 H.J. Lu <hongjiu.lu@intel.com>
13844
13845 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
13846 (i386-mmx.o): New.
13847 (i386-mmx.c): Likewise.
13848 (i386-mmx-linux.o): Likewise.
13849 (i386-mmx-linux.c): Likewise.
13850
13851 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
13852 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
13853 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
13854 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
13855
13856 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
13857 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
13858 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
13859
1570b33e
L
138602010-04-07 H.J. Lu <hongjiu.lu@intel.com>
13861
13862 * Makefile.in (clean): Updated.
13863 (i386-avx.o): New.
13864 (i386-avx.c): Likewise.
13865 (i386-avx-linux.o): Likewise.
13866 (i386-avx-linux.c): Likewise.
13867 (amd64-avx.o): Likewise.
13868 (amd64-avx.c): Likewise.
13869 (amd64-avx-linux.o): Likewise.
13870 (amd64-avx-linux.c): Likewise.
13871
13872 * configure.srv (srv_i386_regobj): Add i386-avx.o.
13873 (srv_i386_linux_regobj): Add i386-avx-linux.o.
13874 (srv_amd64_regobj): Add amd64-avx.o.
13875 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
13876 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
13877 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
13878 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
13879 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
13880 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
13881 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
13882
13883 * i387-fp.c: Include "i386-xstate.h".
13884 (i387_xsave): New.
13885 (i387_cache_to_xsave): Likewise.
13886 (i387_xsave_to_cache): Likewise.
13887 (x86_xcr0): Likewise.
13888
13889 * i387-fp.h (i387_cache_to_xsave): Likewise.
13890 (i387_xsave_to_cache): Likewise.
13891 (x86_xcr0): Likewise.
13892
13893 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
13894 * linux-crisv32-low.c (target_regsets): Likewise.
13895 * linux-m68k-low.c (target_regsets): Likewise.
13896 * linux-mips-low.c (target_regsets): Likewise.
13897 * linux-ppc-low.c (target_regsets): Likewise.
13898 * linux-s390-low.c (target_regsets): Likewise.
13899 * linux-sh-low.c (target_regsets): Likewise.
13900 * linux-sparc-low.c (target_regsets): Likewise.
13901 * linux-xtensa-low.c (target_regsets): Likewise.
13902
13903 * linux-low.c: Include <sys/uio.h>.
13904 (regsets_fetch_inferior_registers): Support nt_type.
13905 (regsets_store_inferior_registers): Likewise.
13906 (linux_process_qsupported): New.
13907 (linux_target_ops): Add linux_process_qsupported.
13908
13909 * linux-low.h (regset_info): Add nt_type.
13910 (linux_target_ops): Add process_qsupported.
13911
13912 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
13913 and <sys/uio.h>.
13914 (init_registers_i386_avx_linux): New.
13915 (init_registers_amd64_avx_linux): Likewise.
13916 (xmltarget_i386_linux_no_xml): Likewise.
13917 (xmltarget_amd64_linux_no_xml): Likewise.
13918 (PTRACE_GETREGSET): Likewise.
13919 (PTRACE_SETREGSET): Likewise.
13920 (x86_fill_xstateregset): Likewise.
13921 (x86_store_xstateregset): Likewise.
13922 (use_xml): Likewise.
13923 (x86_linux_update_xmltarget): Likewise.
13924 (x86_linux_process_qsupported): Likewise.
13925 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
13926 (x86_arch_setup): Don't call init_registers_amd64_linux nor
13927 init_registers_i386_linux here. Call
13928 x86_linux_update_xmltarget.
13929 (the_low_target): Add x86_linux_process_qsupported.
13930
13931 * server.c (handle_query): Call target_process_qsupported.
13932
13933 * target.h (target_ops): Add process_qsupported.
13934 (target_process_qsupported): New.
13935
fc7238bb
PA
139362010-04-03 Pedro Alves <pedro@codesourcery.com>
13937
13938 * inferiors.c (add_thread): Set last_status kind to
13939 TARGET_WAITKIND_IGNORE.
13940 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
13941 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
13942 (linux_wait_1): Move `thread' local definition to block that uses
13943 it. Don't NULL initialize `event_child'.
13944 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
13945 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
13946 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
13947
bdabb078
PA
139482010-04-01 Pedro Alves <pedro@codesourcery.com>
13949
13950 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
13951 an extended waitstatus, or by a watchpoint.
13952 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
13953 thread was stepping or has been stopped by a watchpoint.
13954
d3bbe7a0
PA
139552010-04-01 Pedro Alves <pedro@codesourcery.com>
13956
13957 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
13958 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
13959 of another, then delete the previous, and validate all
13960 breakpoints.
13961 (validate_inserted_breakpoint): New.
13962 (delete_disabled_breakpoints): New.
13963 (validate_breakpoints): New.
13964 (check_mem_read): Validate breakpoints before trusting their
13965 shadow. Delete disabled breakpoints.
13966 (check_mem_write): Validate breakpoints before trusting they
13967 should be inserted. Delete disabled breakpoints.
13968 * mem-break.h (validate_breakpoints):
13969 * server.c (handle_query): Validate breakpoints when we see a
13970 qSymbol query.
13971
8b07ae33
PA
139722010-04-01 Pedro Alves <pedro@codesourcery.com>
13973
13974 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
13975 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
13976 if we could tell there's a GDB breakpoint at stop_pc.
13977 (need_step_over_p): Don't do a step over if we find a GDB
13978 breakpoint at the resume PC.
13979
13980 * mem-break.c (struct raw_breakpoint): New.
13981 (enum bkpt_type): New type `gdb_breakpoint'.
13982 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
13983 fields. New field `raw'.
13984 (find_raw_breakpoint_at): New.
13985 (set_raw_breakpoint_at): Handle refcounting. Create a raw
13986 breakpoint instead.
13987 (set_breakpoint_at): Adjust.
13988 (delete_raw_breakpoint): New.
13989 (release_breakpoint): New.
13990 (delete_breakpoint): Rename to...
13991 (delete_breakpoint_1): ... this. Add proc parameter. Use
13992 release_breakpoint. Return ENOENT.
13993 (delete_breakpoint): Reimplement.
13994 (find_breakpoint_at): Delete.
13995 (find_gdb_breakpoint_at): New.
13996 (delete_breakpoint_at): Delete.
13997 (set_gdb_breakpoint_at): New.
13998 (delete_gdb_breakpoint_at): New.
13999 (gdb_breakpoint_here): New.
14000 (set_reinsert_breakpoint): Use release_breakpoint.
14001 (uninsert_breakpoint): Rename to ...
14002 (uninsert_raw_breakpoint): ... this.
14003 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
14004 (reinsert_raw_breakpoint): Change parameter type to
14005 raw_breakpoint.
14006 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
14007 instead.
14008 (check_breakpoints): Adjust. Use release_breakpoint.
14009 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
14010 (breakpoint_inserted_here): Ditto.
14011 (check_mem_read): Adjust to iterate over raw breakpoints instead.
14012 Don't trust the breakpoint's shadow if it is not inserted.
14013 (check_mem_write): Adjust to iterate over raw breakpoints instead.
14014 (delete_all_breakpoints): Adjust.
14015 (free_all_breakpoints): Mark all breakpoints as uninserted, and
14016 use delete_breakpoint_1.
14017
14018 * mem-break.h (breakpoints_supported): Delete declaration.
14019 (set_gdb_breakpoint_at): Declare.
14020 (gdb_breakpoint_here): Declare.
14021 (delete_breakpoint_at): Delete.
14022 (delete_gdb_breakpoint_at): Declare.
14023
14024 * server.h (struct raw_breakpoint): Forward declare.
14025 (struct process_info): New field `raw_breakpoints'.
14026
14027 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
14028 breakpoints.
14029
6bf5e0ba
PA
140302010-03-24 Pedro Alves <pedro@codesourcery.com>
14031
14032 * linux-low.c (status_pending_p_callback): Fix comment.
14033 (linux_wait_for_event_1): Move most of the internal breakpoint
14034 handling from here...
14035 (linux_wait_1): ... to here.
14036 (count_events_callback): New.
14037 (select_singlestep_lwp_callback): New.
14038 (select_event_lwp_callback): New.
14039 (cancel_breakpoints_callback): New.
14040 (select_event_lwp): New.
14041 (linux_wait_1): Simplify internal breakpoint handling. Give equal
14042 priority to all LWPs that have had events that should be reported
14043 to the client. Cancel breakpoints when about to reporting the
14044 event to the client, not while stopping lwps. No longer cancel
14045 finished single-steps here.
14046 (cancel_finished_single_step): Delete.
14047 (cancel_finished_single_steps): Delete.
14048
414a389f
PA
140492010-03-24 Pedro Alves <pedro@codesourcery.com>
14050
14051 * mem-break.c (enum bkpt_type): New.
14052 (struct breakpoint): New field `type'.
14053 (set_breakpoint_at): Change return type to struct breakpoint
14054 pointer. Set type to `other_breakpoint' by default.
14055 (delete_breakpoint): Rewrite, supporting more than one breakpoint
14056 in the breakpoint list.
14057 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
14058 (reinsert_breakpoint): Rename to ...
14059 (reinsert_raw_breakpoint): ... this.
14060 (reinsert_breakpoints_at): Adjust.
14061 * mem-break.h (struct breakpoint): Declare.
14062 (set_breakpoint_at): Change return type to struct breakpoint
14063 pointer.
14064
2280c721
PA
140652010-03-24 Pedro Alves <pedro@codesourcery.com>
14066
14067 * server.c (handle_query): Assign, not compare.
14068
d50171e4
PA
140692010-03-24 Pedro Alves <pedro@codesourcery.com>
14070
14071 Teach linux gdbserver to step-over-breakpoints.
14072
14073 * linux-low.c (can_hardware_single_step): New.
14074 (supports_breakpoints): New.
14075 (handle_extended_wait): If stopping threads, read the stop pc of
14076 the new cloned LWP.
14077 (get_pc): New.
14078 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
14079 low target doesn't support retrieving the PC.
14080 (add_lwp): Set last_resume_kind to resume_continue.
14081 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
14082 (linux_attach): Don't clear stop_expected. Set the lwp's
14083 last_resume_kind to resume_stop.
14084 (linux_detach_one_lwp): Don't check for removed breakpoints.
14085 (check_removed_breakpoint): Delete.
14086 (status_pending_p): Rename to ...
14087 (status_pending_p_callback): ... this. Don't check for removed
14088 breakpoints. Don't consider threads that are stopped from GDB's
14089 perspective.
14090 (linux_wait_for_lwp): Always read the stop_pc here.
14091 (cancel_breakpoint): New.
14092 (step_over_bkpt): New global.
14093 (linux_wait_for_event_1): Implement stepping over breakpoints.
14094 (gdb_wants_lwp_stopped): New.
14095 (gdb_wants_all_stopped): New.
14096 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
14097 single-step traps here. Store the thread's last reported target
14098 wait status.
14099 (send_sigstop): Don't clear stop_expected. Always set it,
14100 instead.
14101 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
14102 (cancel_finished_single_step): New.
14103 (cancel_finished_single_steps): New.
14104 (wait_for_sigstop): Don't cancel finished single-step traps here.
14105 (linux_resume_one_lwp): Don't check for removed breakpoints.
14106 Don't set `step' on non-hardware step archs.
14107 (linux_set_resume_request): Ignore resume_stop requests if already
14108 stopping or stopped. Set the lwp's last_resume_kind.
14109 (resume_status_pending_p): Don't check for removed breakpoints.
14110 (need_step_over_p): New.
14111 (start_step_over): New.
14112 (finish_step_over): New.
14113 (linux_resume_one_thread): Always queue a sigstop for resume_stop
14114 requests. Clear the thread's last reported target waitstatus.
14115 Don't use the `suspended' flag. Don't consider pending breakpoints.
14116 (linux_resume): Start a step-over if necessary.
14117 (proceed_one_lwp): New.
14118 (proceed_all_lwps): New.
14119 (unstop_all_lwps): New.
14120 * linux-low.h (struct lwp_info): Rewrite comment for the
14121 `suspended' flag. Add the `stop_pc' field. Delete the
14122 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
14123 Add `'last_resume_kind' and `need_step_over' fields.
14124 * inferiors.c (struct thread_info): Delete, moved elsewhere.
14125 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
14126 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
14127 (set_raw_breakpoint_at): New.
14128 (set_breakpoint_at): Rewrite to use it.
14129 (reinsert_breakpoint_handler): Delete.
14130 (set_reinsert_breakpoint): New.
14131 (reinsert_breakpoint_by_bp): Delete.
14132 (delete_reinsert_breakpoints): New.
14133 (uninsert_breakpoint): Rewrite.
14134 (uninsert_breakpoints_at): New.
14135 (reinsert_breakpoint): Rewrite.
14136 (reinsert_breakpoints_at): New.
14137 (check_breakpoints): Rewrite.
14138 (breakpoint_here): New.
14139 (breakpoint_inserted_here): New.
14140 (check_mem_read): Adjust.
14141 * mem-break.h (breakpoints_supported, breakpoint_here)
14142 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
14143 (reinsert_breakpoint_by_bp): Delete declaration.
14144 (delete_reinsert_breakpoints): Declare.
14145 (reinsert_breakpoint): Delete declaration.
14146 (reinsert_breakpoints_at): Declare.
14147 (uninsert_breakpoint): Delete declaration.
14148 (uninsert_breakpoints_at): Declare.
14149 (check_breakpoints): Adjust prototype.
14150 * server.h: Adjust include order.
14151 (struct thread_info): Declare here. Add a `last_status' field.
14152
30ba68cb
MS
141532010-03-23 Michael Snyder <msnyder@vmware.com>
14154
14155 * server.c (crc32): New function.
14156 (handle_query): Add handling for 'qCRC:' request.
14157
b9a881c2
PA
141582010-03-23 Pedro Alves <pedro@codesourcery.com>
14159
14160 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
14161 lwp had been stopped by a watchpoint.
14162
e92d13d5
PA
141632010-03-16 Pedro Alves <pedro@codesourcery.com>
14164
14165 * server.h (internal_error): Declare.
14166 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
14167 * utils.c (internal_error): New function.
14168
64daa791
AS
141692010-03-15 Andreas Schwab <schwab@redhat.com>
14170
14171 * configure.srv: Fix typo setting srv_regobj.
14172
f52cd8cd
PA
141732010-03-15 Pedro Alves <pedro@codesourcery.com>
14174
14175 * linux-low.c (fetch_register): Avoid passing a non string literal
14176 format to `error'.
14177 (usr_store_inferior_registers): Ditto.
14178
93ae6fdc
PA
141792010-03-14 Pedro Alves <pedro@codesourcery.com>
14180
14181 * linux-low.c (linux_write_memory): Bail out early if peeking
14182 memory failed.
14183
c3adc08c
PA
141842010-03-14 Pedro Alves <pedro@codesourcery.com>
14185
14186 * linux-low.h (struct lwp_info): New fields
14187 `stopped_by_watchpoint' and `stopped_data_address'.
14188 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
14189 here, and cache them in the lwp object.
14190 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
14191 directly.
14192 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
14193 field.
14194 (linux_stopped_by_watchpoint): Rewrite.
14195 (linux_stopped_data_address): Rewrite.
14196
bce522a2
PA
141972010-03-06 Simo Melenius <simo.melenius@iki.fi>
14198
14199 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
14200 switching the current inferior, not before.
14201
90884b2b
L
142022010-03-01 H.J. Lu <hongjiu.lu@intel.com>
14203
14204 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
14205 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
14206 i386-linux.c and amd64-linux.c.
14207 (reg-i386.o): Removed.
14208 (reg-i386.c): Likewise.
14209 (reg-i386-linux.o): Likewise.
14210 (reg-i386-linux.c): Likewise.
14211 (reg-x86-64.o): Likewise.
14212 (reg-x86-64.c): Likewise.
14213 (reg-x86-64-linux.o): Likewise.
14214 (reg-x86-64-linux.c): Likewise.
14215 (i386.o): New.
14216 (i386.c): Likewise.
14217 (i386-linux.o): Likewise.
14218 (i386-linux.c): Likewise.
14219 (amd64.o): Likewise.
14220 (amd64.c): Likewise.
14221 (amd64-linux.o): Likewise.
14222 (amd64-linux.c): Likewise.
14223
14224 * configure.srv (srv_i386_regobj): New.
14225 (srv_i386_linux_regobj): Likewise.
14226 (srv_amd64_regobj): Likewise.
14227 (srv_amd64_linux_regobj): Likewise.
14228 (srv_i386_32bit_xmlfiles): Likewise.
14229 (srv_i386_64bit_xmlfiles): Likewise.
14230 (srv_i386_xmlfiles): Likewise.
14231 (srv_amd64_xmlfiles): Likewise.
14232 (srv_i386_linux_xmlfiles): Likewise.
14233 (srv_amd64_linux_xmlfiles): Likewise.
14234 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
14235 srv_xmlfiles to $srv_i386_xmlfiles.
14236 (i[34567]86-*-mingw32ce*): Likewise.
14237 (i[34567]86-*-mingw*): Likewise.
14238 (i[34567]86-*-nto*): Likewise.
14239 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
14240 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
14241 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
14242 (x86_64-*-linux*): Likewise.
14243
14244 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
14245 (init_registers_amd64_linux): New.
14246 (x86_arch_setup): Replace init_registers_x86_64_linux with
14247 init_registers_amd64_linux.
14248
193f13e6
MK
142492010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
14250
14251 * configure.ac: Check for libdl. If it is not available link against
14252 static libthread_db.
14253 * configure: Regenerate.
14254
85d721b8
PA
142552010-02-22 Pedro Alves <pedro@codesourcery.com>
14256
14257 PR9605
14258
14259 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
14260 handing a read watchpoint.
14261 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
14262
6076632b
DE
142632010-02-12 Doug Evans <dje@google.com>
14264
14265 * linux-low.c (linux_supports_tracefork_flag): Document.
14266 (linux_look_up_symbols): Add comment.
14267
3327ccf7
L
142682010-02-03 H.J. Lu <hongjiu.lu@intel.com>
14269
14270 * regcache.c (supply_register): Clear regcache if buf is NULL.
14271
0718675c 142722010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 14273 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
14274
14275 * inferiors.c (find_inferior): Add function documentation.
14276 (unloaded_dll): Handle the case where the unloaded dll has not
14277 been previously registered in the dll list.
14278
177321bd
DJ
142792010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
14280
14281 * linux-arm-low.c (thumb_breakpoint_len): Delete.
14282 (thumb2_breakpoint): New.
14283 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
14284
2b009048
DJ
142852010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
14286
14287 * linux-low.c (get_stop_pc): Check for SIGTRAP.
14288 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
14289 breakpoints.
14290
3be029c7
PA
142912010-01-21 Pedro Alves <pedro@codesourcery.com>
14292
14293 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
14294
18f5de3b
JK
142952010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
14296
14297 * linux-s390-low.c (s390_collect_ptrace_register)
14298 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
14299
3743bb4f
DE
143002010-01-21 Doug Evans <dje@google.com>
14301
14ce3065
DE
14302 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
14303 (PTRACE_ARG4_TYPE): New macro.
14304 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
14305 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
14306 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
14307 (usr_store_inferior_registers): Ditto.
14308 (linux_read_memory, linux_write_memory): Ditto.
14309 (linux_test_for_tracefork): Ditto.
14310
3743bb4f
DE
14311 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
14312 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
14313
8b315be5
PA
143142010-01-21 Pedro Alves <pedro@codesourcery.com>
14315
14316 * proc-service.c (ps_lgetregs): Don't refetch registers from the
14317 target.
14318
85492558
PA
143192010-01-21 Pedro Alves <pedro@codesourcery.com>
14320
14321 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
14322 prototype to take a regcache. Adjust.
14323
442ea881
PA
143242010-01-20 Pedro Alves <pedro@codesourcery.com>
14325
14326 * regcache.h (struct thread_info): Forward declare.
14327 (struct regcache): New.
14328 (new_register_cache): Adjust prototype.
14329 (get_thread_regcache): Declare.
14330 (free_register_cache): Adjust prototype.
14331 (registers_to_string, registers_from_string): Ditto.
14332 (supply_register, supply_register_by_name, collect_register)
14333 (collect_register_as_string, collect_register_by_name): Ditto.
14334 * regcache.c (struct inferior_regcache_data): Delete.
14335 (get_regcache): Rename to ...
14336 (get_thread_regcache): ... this. Adjust. Switch inferior before
14337 fetching registers.
14338 (regcache_invalidate_one): Adjust.
14339 (regcache_invalidate): Fix prototype.
14340 (new_register_cache): Return the new register cache.
14341 (free_register_cache): Change prototype.
14342 (realloc_register_cache): Adjust.
14343 (registers_to_string): Change prototype to take a regcache. Adjust.
14344 (registers_from_string): Ditto.
14345 (register_data): Ditto.
14346 (supply_register): Ditto.
14347 (supply_register_by_name): Ditto.
14348 (collect_register): Ditto.
14349 (collect_register_as_string): Ditto.
14350 (collect_register_by_name): Ditto.
14351 * server.c (process_serial_event): Adjust.
14352 * linux-low.h (regset_fill_func, regset_store_func): Change
14353 prototype.
14354 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
14355 Change prototype.
14356 * linux-low.c (get_stop_pc): Adjust.
14357 (check_removed_breakpoint): Adjust.
14358 (linux_wait_for_event): Adjust.
14359 (linux_resume_one_lwp): Adjust.
14360 (fetch_register): Add regcache parameter. Adjust.
14361 (usr_store_inferior_registers): Ditto.
14362 (regsets_fetch_inferior_registers): Ditto.
14363 (regsets_store_inferior_registers): Ditto.
14364 (linux_fetch_registers, linux_store_registers): Ditto.
14365 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
14366 regcache. Adjust.
43aaf8b6
PA
14367 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
14368 Ditto.
442ea881
PA
14369 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
14370 prototype to take a regcache.
14371 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
14372 * remote-utils.c (convert_ascii_to_int, outreg)
14373 (prepare_resume_reply): Change prototype to take a regcache.
14374 Adjust.
14375 * target.h (struct target_ops) <fetch_registers, store_registers>:
14376 Change prototype to take a regcache.
14377 (fetch_inferior_registers, store_inferior_registers): Change
14378 prototype to take a regcache. Adjust.
14379 * proc-service.c (ps_lgetregs): Adjust.
14380 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
14381 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
14382 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
14383 take a regcache. Adjust.
14384 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
14385 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
14386 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
14387 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
14388 * linux-cris-low.c (cris_get_pc, cris_set_pc)
14389 (cris_cannot_fetch_register):
14390 (cris_breakpoint_at): Change prototype to take a regcache.
14391 Adjust.
14392 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
14393 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
14394 to take a regcache. Adjust.
14395 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
14396 Adjust.
14397 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
14398 take a regcache. Adjust.
14399 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
14400 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
14401 (m68k_set_pc): Change prototype to take a regcache. Adjust.
14402 * linux-mips-low.c (mips_get_pc):
14403 (mips_set_pc): Change prototype to take a regcache. Adjust.
14404 (mips_reinsert_addr): Adjust.
14405 (mips_collect_register): Change prototype to take a regcache.
14406 Adjust.
14407 (mips_supply_register):
14408 (mips_collect_register_32bit, mips_supply_register_32bit)
14409 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
14410 (mips_store_fpregset): Ditto.
43aaf8b6
PA
14411 * linux-ppc-low.c (ppc_supply_ptrace_register)
14412 (ppc_supply_ptrace_register): Ditto.
442ea881
PA
14413 (parse_spufs_run): Adjust.
14414 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
14415 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
14416 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
14417 take a regcache. Adjust.
14418 * linux-s390-low.c (s390_collect_ptrace_register)
14419 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
14420 (s390_set_pc): Change prototype to take a regcache. Adjust.
14421 (s390_arch_setup): Adjust.
14422 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
14423 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
14424 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
14425 (sparc_fill_gregset, sparc_store_gregset_from_stack)
14426 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
14427 regcache. Adjust.
14428 (sparc_breakpoint_at): Adjust.
14429 * linux-xtensa-low.c (xtensa_fill_gregset):
14430 (xtensa_store_gregset):
14431 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
14432 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
14433 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
14434 prototype to take a regcache. Adjust.
14435 * win32-arm-low.c (arm_fetch_inferior_register)
14436 (arm_store_inferior_register): Change prototype to take a
14437 regcache. Adjust.
14438 * win32-i386-low.c (i386_fetch_inferior_register)
14439 (i386_store_inferior_register): Change prototype to take a
14440 regcache. Adjust.
14441 * win32-low.c (child_fetch_inferior_registers)
14442 (child_store_inferior_registers): Change prototype to take a
14443 regcache. Adjust.
14444 (win32_wait): Adjust.
14445 (win32_fetch_inferior_registers): Change prototype to take a
14446 regcache. Adjust.
14447 (win32_store_inferior_registers): Adjust.
14448 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
14449 store_inferior_register>: Change prototype to take a regcache.
14450
60c3d7b0
DE
144512010-01-20 Doug Evans <dje@google.com>
14452
14453 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
14454 #ifdef.
14455 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 14456 (W_STOPCODE): Provide definition if missing.
60c3d7b0 14457
dc146f7c
VP
144582010-01-13 Vladimir Prus <vladimir@codesourcery.com>
14459
14460 * linux-low.c (linux_core_of_thread): New.
14461 (compare_ints, show_process, list_threads): New.
14462 (linux_qxfer_osdata): Report threads and cores.
14463 (linux_target_op): Register linux_core_of_thread.
14464 * remote-utils.c (prepare_resume_reply): Report the core.
14465 (buffer_xml_printf): Support %d specifier.
14466 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
14467 New.
14468 (handle_query): Handle qXfer:threads. Announce availability
14469 thereof.
14470 * target.h (struct target_ops): New field core_of_thread.
14471
7803799a
UW
144722010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
14473
14474 * Makefile.in (clean): Remove new generated files.
14475 (reg-s390.o, reg-s390.c): Remove rules.
14476 (reg-s390x.o, reg-s390x.c): Likewise.
14477 (s390-linux32.o, s390-linux32.c): Add rules.
14478 (s390-linux64.o, s390-linux64.c): Likewise.
14479 (s390x-linux64.o, s390x-linux64.c): Likewise.
14480 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
14481 * linux-s390-low.c: Include <elf.h>.
14482 (HWCAP_S390_HIGH_GPRS): Define if undefined.
14483 (init_registers_s390): Remove prototype.
14484 (init_registers_s390x): Likewise.
14485 (init_registers_s390_linux32): Add prototype.
14486 (init_registers_s390_linux64): Likewise.
14487 (init_registers_s390x_linux64): Likewise.
14488 (s390_num_regs_3264): New define.
14489 (s390_regmap_3264): New global variable.
14490 (s390_cannot_fetch_register): Remove obsolete check.
14491 (s390_cannot_store_register): Likewise.
14492 (s390_collect_ptrace_register): Handle upper/lower register halves.
14493 (s390_supply_ptrace_register): Likewise.
14494 (s390_fill_gregset): Update to register number changes.
14495 (s390_get_hwcap): New routine.
14496 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
14497 Install appropriate regmap and register set.
14498
6e7ffa39
JB
144992010-01-01 Joel Brobecker <brobecker@adacore.com>
14500
14501 * server.c (gdbserver_version): Update copyright year to 2010.
14502 * gdbreplay.c (gdbreplay_version): Likewise.
14503
957f3f49
DE
145042009-12-28 Doug Evans <dje@google.com>
14505
14506 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
14507 elf/external.h. Include <elf.h> instead but only if necessary.
14508
ca5c370d
PA
145092009-12-28 Pedro Alves <pedro@codesourcery.com>
14510
14511 * linux-low.c (linux_remove_process): Remove `detaching'
14512 parameter. Don't release/detach from thread_db here.
14513 (linux_kill): Release/detach from thread_db here, ...
14514 (linux_detach): ... and here, before actually detaching.
14515 (linux_wait_1): ... and here, when a process exits.
14516 * thread-db.c (any_thread_of): New.
14517 (thread_db_free): Switch the current inferior to a thread of the
14518 passed in process.
14519
4ee62156
DE
145202009-12-21 Doug Evans <dje@google.com>
14521
d90e6a88
DE
14522 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
14523
c5f62d5f
DE
14524 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
14525 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
14526 warning ifndef __NR_tkill. Move setting of errno there too.
14527 Delete unnecessary resetting of errno after syscall.
14528 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
14529
10e86dd7
DE
14530 * configure.ac: Check for dladdr.
14531 * config.in: Regenerate.
14532 * configure: Regenerate.
14533 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
14534 (try_thread_db_load): Update.
14535
4ee62156
DE
14536 * linux-low.c (my_waitpid): Delete unnecessary prototype.
14537
00f515da
DE
145382009-12-18 Doug Evans <dje@google.com>
14539
e9464885
DE
14540 * event-loop.c: Include unistd.h if it exists.
14541
07d4f67e
DE
14542 * linux-low.c (my_waitpid): Move definition away from being in
14543 between linux_tracefork_child/linux_test_for_tracefork.
14544
00f515da
DE
14545 * gdb_proc_service.h (psaddr_t): Fix type.
14546 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
14547 signature to match glibc.
14548
1de1badb
DE
145492009-12-16 Doug Evans <dje@google.com>
14550
14551 * linux-low.c (linux_read_memory): Fix argument to read.
14552
aeeb81d1
PA
145532009-11-26 Pedro Alves <pedro@codesourcery.com>
14554
14555 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
14556 events, don't leave current_inferior pointing at null.
14557
10357975
PA
145582009-11-26 Pedro Alves <pedro@codesourcery.com>
14559
14560 * win32-low.c (LOG): Delete.
14561 (OUTMSG): Output to stderr.
14562 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
14563 on compile time LOG macro.
14564 (win32_wait): Fix debug output.
14565
cf6e3471
PA
145662009-11-26 Pedro Alves <pedro@codesourcery.com>
14567
14568 * win32-low.c (win32_add_one_solib): If the dll name is
14569 "ntdll.dll", prepend the system directory to the dll path.
14570
0c85e18e
MK
145712009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
14572
14573 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
14574
9ac544ce 145752009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 14576 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
14577
14578 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
14579 * configure.ac: Check for __mcoldfire__ and set
14580 gdb_cv_m68k_is_coldfire.
14581 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
14582 reg-cf.o and reg-m68k.o.
14583 * configure: Regenerated.
14584
fd7dd3e6
PA
145852009-11-16 Pedro Alves <pedro@codesourcery.com>
14586
14587 * linux-low.c (linux_remove_process): Add `detaching' parameter.
14588 Pass it to thread_db_free.
14589 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
14590 proper `detaching' argument to linux_remove_process.
14591 * linux-low.h (thread_db_free): Add `detaching' parameter.
14592 * thread-db.c (thread_db_init): Pass false as `detaching' argument
14593 to thread_db_free.
14594 (thread_db_free): Add `detaching' parameter. Only
14595 call td_ta_clear_event if detaching from process.
14596
75aa492e
MK
145972009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
14598
14599 * thread-db.c (thread_db_free): Fix typo.
14600
21e1bee4
PP
146012009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
14602
14603 PR gdb/10838
14604 * thread-db.c (thread_db_free): Call td_ta_clear_event.
14605
8838b45e
NS
146062009-11-03 Nathan Sidwell <nathan@codesourcery.com>
14607
14608 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
14609 with an i686 compiler.
14610 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
14611 needed.
14612 * configure: Rebuilt.
14613
8a35fb51
SL
146142009-10-29 Sandra Loosemore <sandra@codesourcery.com>
14615
14616 PR gdb/10783
14617
14618 * server.c (handle_search_memory_1): Correct read_addr initialization
14619 in loop for searching subsequent chunks.
14620
96f15937
PP
146212009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
14622
14623 * configure.ac: New --with-libthread-db option.
14624 * thread-db.c: Allow direct dependence on libthread_db.
14625 (thread_db_free): Adjust.
14626 * config.in: Regenerate.
14627 * configure: Likewise.
889bf7c5 14628
5f7d1694
PP
146292009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
14630
14631 PR gdb/10757
14632 * thread-db.c (attach_thread): New function.
14633 (maybe_attach_thread): Return success/failure.
14634 (find_new_threads_callback): Adjust.
889bf7c5
PA
14635 (thread_db_find_new_threads): Loop until no new threads.
14636
88e3b899
PA
146372009-10-13 Pedro Alves <pedro@codesourcery.com>
14638
14639 * proc-service.c (ps_lgetregs): Formatting.
14640
cdbfd419
PP
146412009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
14642
14643 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
14644 * configure.ac: Adjust.
14645 * linux-low.h (struct process_info_private): Move members to struct
14646 thread_db.
14647 (thread_db_free, thread_db_handle_monitor_command): New prototype.
14648 * linux-low.c (linux_remove_process): Adjust.
14649 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
14650 * server.c (handle_query): Move code ...
14651 (handle_monitor_command): ... here. New function.
14652 * target.h (struct target_ops): New member.
14653 * thread-db.c (struct thread_db): New.
14654 (libthread_db_search_path): New variable.
14655 (thread_db_create_event, thread_db_enable_reporting)
14656 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
14657 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
14658 (try_thread_db_load_1, dladdr_to_soname): New functions.
14659 (try_thread_db_load, thread_db_load_search): New functions.
14660 (thread_db_init): Search for libthread_db.
14661 (thread_db_free): New function.
14662 (thread_db_handle_monitor_command): Likewise.
14663 * config.in: Regenerate.
14664 * configure: Regenerate.
889bf7c5 14665
4168d2d6
UW
146662009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
14667
14668 * spu-low.c (spu_kill): Wait for inferior to terminate.
14669 Call clear_inferiors.
14670 (spu_detach): Call clear_inferiors.
14671
81ecdfbb
RW
146722009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
14673
14674 * aclocal.m4: Regenerate.
14675 * config.in: Likewise.
14676 * configure: Likewise.
14677
0b9ff2c0
UW
146782009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
14679
14680 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
14681 (parse_spufs_run): New function.
14682 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
14683 (ppc_breakpoint_at): Handle SPU breakpoints.
14684
efcbbd14
UW
146852009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
14686
14687 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
14688 (SPUFS_MAGIC): Define.
14689 (spu_enumerate_spu_ids): New function.
14690 (linux_qxfer_spu): New function.
14691 (linux_target_ops): Install linux_qxfer_spu.
14692
f4d9bade
UW
146932009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
14694
14695 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
14696 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
14697 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
14698 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
14699 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
14700 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
14701 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
14702 (init_registers_powerpc_cell32l): Add prototype.
14703 (init_registers_powerpc_cell64l): Likewise.
14704 (ppc_arch_setup): Detect Cell/B.E. architecture.
14705
96e946ca
RW
147062009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
14707
14708 * Makefile.in (datarootdir): New variable.
14709
58d6951d
DJ
147102009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
14711
14712 * linux-low.c (linux_write_memory): Update debugging output.
14713 * Makefile.in (clean): Add new descriptions.
14714 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
14715 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
14716 * configure.srv: Add new files for arm*-*-linux*.
14717 * linux-arm-low.c: Add new declarations.
14718 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
14719 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
14720 (HWCAP_VFPv3D16): New.
14721 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
14722 instead of __IWMMXT__.
14723 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
14724 (arm_arch_setup): New.
14725 (target_regsets): Remove #ifdef. Add VFP regset.
14726 (the_low_target): Use arm_arch_setup.
14727
12b42a12
DJ
147282009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
14729
14730 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
14731 the main thread again.
14732
ac8c974e
AR
147332009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
14734
14735 Adding Neutrino gdbserver.
14736 * configure: Regenerated.
14737 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
14738 * configure.srv (i[34567]86-*-nto*): New target.
14739 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
14740 * remote-utils.c [__QNX__]: Include sys/iomgr.h
14741 (nto_comctrl) [__QNX__]: New function.
14742 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
14743
4424e0c3 147442009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
14745
14746 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
14747 srv_tgtobj.
14748
912cf4ba
PA
147492009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
14750 Pedro Alves <pedro@codesourcery.com>
14751
14752 * win32-i386-low.c (i386_get_thread_context): Handle systems that
14753 don't support CONTEXT_EXTENDED_REGISTERS.
14754 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
14755 (the_low_target): Install them.
14756 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
14757 failing with ERROR_PIPE_NOT_CONNECTED.
14758
aa5ca48f
DE
147592009-06-30 Doug Evans <dje@google.com>
14760 Pierre Muller <muller@ics.u-strasbg.fr>
14761
14762 Add h/w watchpoint support to x86-linux, win32-i386.
14763 * Makefile.in (SFILES): Add i386-low.c
14764 (i386_low_h): Define.
14765 (i386-low.o): Add dependencies.
14766 (linux-x86-low.o): Add i386-low.h dependency.
14767 (win32-i386-low.o): Ditto.
14768 * i386-low.c: New file.
14769 * i386-low.h: New file.
14770 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
14771 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
14772 * linux-low.c (linux_add_process): Initialize arch_private.
14773 (linux_remove_process): Free arch_private.
14774 (add_lwp): Initialize arch_private.
14775 (delete_lwp): Free arch_private.
14776 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
14777 provided.
14778 * linux-low.h (process_info_private): New member arch_private.
14779 (lwp_info): New member arch_private.
14780 (linux_target_ops): New members new_process, new_thread,
14781 prepare_to_resume.
14782 (ptid_of): New macro.
14783 * linux-x86-low.c: Include stddef.h, i386-low.h.
14784 (arch_process_info): New struct.
14785 (arch_lwp_info): New struct.
14786 (x86_linux_dr_get, x86_linux_dr_set): New functions.
14787 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
14788 (i386_dr_low_get_status): New function.
14789 (x86_insert_point, x86_remove_point): New functions.
14790 (x86_stopped_by_watchpoint): New function.
14791 (x86_stopped_data_address): New function.
14792 (x86_linux_new_process, x86_linux_new_thread): New functions.
14793 (x86_linux_prepare_to_resume): New function.
14794 (the_low_target): Add entries for insert_point, remove_point,
14795 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
14796 prepare_to_resume.
14797 * server.c (debug_hw_points): New global.
14798 (monitor_show_help): Document set debug-hw-points.
14799 (handle_query): Process "set debug-hw-points".
14800 * server.h (debug_hw_points): Declare.
14801 (paddress): Declare.
14802 * utils.c (NUMCELLS, CELLSIZE): New macros.
14803 (get_sell, xsnprintf, paddress): New functions.
14804 * win32-arm-low.c (the_low_target): Add entries for insert_point,
14805 remove_point, stopped_by_watchpoint, stopped_data_address.
14806 * win32-i386-low.c: Include i386-low.h.
14807 (debug_reg_state): Replaces dr.
14808 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
14809 (i386_dr_low_get_status): New function.
14810 (i386_insert_point, i386_remove_point): New functions.
14811 (i386_stopped_by_watchpoint): New function.
14812 (i386_stopped_data_address): New function.
14813 (i386_initial_stuff): Update.
14814 (get_thread_context,set_thread_context,i386_thread_added): Update.
14815 (the_low_target): Add entries for insert_point,
14816 remove_point, stopped_by_watchpoint, stopped_data_address.
14817 * win32-low.c (win32_insert_watchpoint): New function.
14818 (win32_remove_watchpoint): New function.
14819 (win32_stopped_by_watchpoint): New function.
14820 (win32_stopped_data_address): New function.
14821 (win32_target_ops): Add entries for insert_watchpoint,
14822 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
14823 * win32-low.h (win32_target_ops): New members insert_point,
14824 remove_point, stopped_by_watchpoint, stopped_data_address.
14825
d993e290
PA
148262009-06-25 Pedro Alves <pedro@codesourcery.com>
14827
14828 * server.c (process_serial_event): Re-return unsupported, not
14829 error, if the type isn't recognized. Re-allow supporting only
14830 insert or remove packets. Also call require_running for
14831 breakpoints. Add missing break statement to default case. Tidy.
14832 * target.h (struct target_ops): Rename insert_watchpoint to
14833 insert_point, and remove_watchpoint to remove_point.
14834
14835 * linux-low.h (struct linux_target_ops): Likewise.
14836 * linux-low.c (linux_insert_watchpoint): Rename to ...
14837 (linux_insert_point): ... this. Adjust.
14838 (linux_remove_watchpoint): Rename to ...
14839 (linux_remove_point): ... this. Adjust.
14840 (linux_target_ops): Adjust.
14841 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
14842 (cris_insert_point): ... this.
14843 (cris_remove_watchpoint): Rename to ...
14844 (cris_remove_point): ... this.
14845 (the_low_target): Adjust.
14846
0f54c268
PM
148472009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
14848
14849 * server.c (handle_v_kill): Pass signal_pid to
14850 kill_inferior if multi_process is zero.
14851
c6314022
AR
148522009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
14853
14854 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
14855 * target.h (target_ops): Comment for *_watchpoint to make it clear
14856 the functions can get types '0' and '1'.
14857
4463ce24
AR
148582009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
14859
14860 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
14861 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
14862 * regcache.c (get_regcache): Likewise.
14863 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
14864 * win32-low.c (child_fetch_inferior_registers): Remove check for
14865 regno 0.
14866
cf8fd78b
PA
148672009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
14868 Pedro Alves <pedro@codesourcery.com>
14869
14870 * target.h (struct target_ops) <supports_multi_process>: New
14871 callback.
14872 (target_supports_multi_process): New.
14873 * server.c (handle_query): Even if GDB reports support, only
14874 enable multi-process if the target also supports it. Report
14875 multi-process support only if the target backend supports it.
14876 * linux-low.c (linux_supports_multi_process): New function.
14877 (linux_target_ops): Install it as target_supports_multi_process
14878 callback.
14879
47c0c975
DE
148802009-05-24 Doug Evans <dje@google.com>
14881
e09875d4
DE
14882 Global renaming of find_thread_pid to find_thread_ptid.
14883 * server.h (find_thread_ptid): Renamed from find_thread_pid.
14884 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
14885 All callers updated.
14886
e27d73f6
DE
14887 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
14888 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
14889 directly.
14890
47c0c975
DE
14891 * linux-low.c (get_stop_pc): Print pc if debug_threads.
14892 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
14893 (linux_resume_one_lwp): Ditto.
14894
2acc282a
DE
148952009-05-23 Doug Evans <dje@google.com>
14896
14897 * linux-low.c (linux_resume_one_lwp): Change type of first arg
14898 from struct inferior_list_entry * to struct lwp_info *.
14899 All callers updated.
14900
9f1036c1
DE
149012009-05-13 Doug Evans <dje@google.com>
14902
14903 * linux-x86-low.c: Don't include assert.h.
14904 (x86_siginfo_fixup): Use fatal, not assert.
14905 (x86_arch_setup): Fix comment.
14906
d0722149
DE
149072009-05-12 Doug Evans <dje@google.com>
14908
14909 Biarch support for i386/amd64 gdbserver.
14910 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
14911 Add linux-x86-low.c.
14912 (linux-i386-low.o, linux-x86-64-low.o): Delete.
14913 (linux-x86-low.o): Add.
14914 * linux-x86-64-low.c: Delete.
14915 * linux-i386-low.c: Delete.
14916 * linux-x86-low.c: New file.
14917 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
14918 linux-x86-low.o.
14919 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
14920 linux-x86-low.o.
14921 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
14922 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
14923 (linux_child_pid_to_exec_file): New function.
14924 (elf_64_header_p, elf_64_file_p): New functions.
14925 (siginfo_fixup): New function.
14926 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
14927 give target a chance to convert layout.
14928 * linux-low.h (linux_target_ops): New member siginfo_fixup.
14929 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
14930
fdeb2a12
DE
149312009-05-07 Doug Evans <dje@google.com>
14932
14933 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
14934 (regsets_store_inferior_registers): Ditto.
14935
a6dbe5df
PA
149362009-05-06 Pedro Alves <pedro@codesourcery.com>
14937
14938 PR server/10048
14939
14940 * linux-low.c (must_set_ptrace_flags): Delete.
14941 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
14942 of the global.
14943 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
14944 `lwp->must_set_ptrace_flags' instead.
ba42693b 14945 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
14946 (linux_wait_1): ... not here.
14947
5091eb23
DE
149482009-04-30 Doug Evans <dje@google.com>
14949
9f767825
DE
14950 * inferiors.c (started_inferior_callback): New function.
14951 (attached_inferior_callback): New function.
14952 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
14953 * server.c (print_started_pid, print_attached_pid): New functions.
14954 (detach_or_kill_for_exit): New function.
14955 (main): Call it instead of for_each_inferior (kill_inferior_callback).
14956 * server.h (have_started_inferiors_p): Declare.
14957 (have_attached_inferiors_p): Declare.
14958
5091eb23
DE
14959 * inferiors.c (remove_process): Fix memory leak, free process.
14960 * linux-low.c (linux_remove_process): New function.
14961 (linux_kill): Call it instead of remove_process.
14962 (linux_detach, linux_wait_1): Ditto.
14963
155c8968
PA
149642009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
14965
14966 * configure.srv: Add x86 Windows CE target.
14967
7fe519cb
UW
149682009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
14969
14970 * inferiors.c (get_thread_process): Make global.
14971 * server.h (get_thread_process): Add prototype.
14972 * thread-db.c (find_one_thread): Use get_thread_process
14973 instead of current_process.
14974 (thread_db_get_tls_address): Do not crash if called when
14975 thread layer is not yet initialized.
14976
5472f405
UW
149772009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
14978
14979 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
14980 * spu-low.c (current_tid): Rename to ...
14981 (current_ptid): ... this.
14982 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
14983 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
14984 ptid_get_lwp (current_ptid) instead of current_tid.
14985 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
14986 instead of current_tid. Use find_process_pid to verify pid
14987 argument is valid. Pass proper argument to remove_process.
14988 (spu_thread_alive): Compare current_ptid instead of current_tid.
14989 (spu_resume): Likewise.
14990
55ac2b99
PA
149912009-04-02 Pedro Alves <pedro@codesourcery.com>
14992
14993 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
14994 variable.
14995
95954743
PA
149962009-04-01 Pedro Alves <pedro@codesourcery.com>
14997
14998 Implement the multiprocess extensions, and add linux multiprocess
14999 support.
15000
15001 * server.h (ULONGEST): Declare.
15002 (struct ptid, ptid_t): New.
15003 (minus_one_ptid, null_ptid): Declare.
15004 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
15005 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
15006 (struct inferior_list_entry): Change `id' type from unsigned from
15007 to ptid_t.
15008 (struct sym_cache, struct breakpoint, struct
15009 process_info_private): Forward declare.
15010 (struct process_info): Declare.
15011 (current_process): Declare.
15012 (all_processes): Declare.
15013 (initialize_inferiors): Declare.
15014 (add_thread): Adjust to use ptid_t.
15015 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
15016 (add_process, remove_process, find_thread_pid): Declare.
15017 (find_inferior_id): Adjust to use ptid_t.
15018 (cont_thread, general_thread, step_thread): Change type to ptid_t.
15019 (multi_process): Declare.
15020 (push_event): Adjust to use ptid_t.
15021 (read_ptid, write_ptid): Declare.
15022 (prepare_resume_reply): Adjust to use ptid_t.
15023 (clear_symbol_cache): Declare.
15024 * inferiors.c (all_processes): New.
15025 (null_ptid, minus_one_ptid): New.
15026 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
15027 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
15028 (add_thread): Change unsigned long to ptid. Remove gdb_id
15029 parameter. Adjust.
15030 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
15031 (gdb_id_to_thread): Rename to ...
15032 (find_thread_pid): ... this. Change unsigned long to ptid.
15033 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
15034 (loaded_dll, pull_pid_from_list): Adjust.
15035 (add_process, remove_process, find_process_pid)
15036 (get_thread_process, current_process, initialize_inferiors): New.
15037 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
15038 (struct target_waitstatus) <related_pid>: Ditto.
15039 (struct target_ops) <kill, detach>: Add `pid' argument. Change
15040 return type to int.
15041 (struct target_ops) <join>: Add `pid' argument.
15042 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
15043 (struct target_ops) <wait>: Add `ptid' field. Change return type
15044 to ptid.
15045 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
15046 (mywait): Add `ptid' argument. Change return type to ptid_t.
15047 (target_pid_to_str): Declare.
15048 * target.c (set_desired_inferior): Adjust to use ptids.
15049 (mywait): Add new `ptid' argument. Adjust.
15050 (target_pid_to_str): New.
15051 * mem-break.h (free_all_breakpoints): Declare.
15052 * mem-break.c (breakpoints): Delelete.
15053 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
15054 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
15055 to use per-process breakpoint list.
15056 (free_all_breakpoints): New.
15057 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
15058 (symbol_cache, all_symbols_looked_up): Delete.
15059 (hexchars): New.
15060 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
15061 read_ptid): New.
15062 (prepare_resume_reply): Change ptid argument's type from unsigned
15063 long to ptid_t. Adjust. Implement W;process and X;process.
15064 (free_sym_cache, clear_symbol_cache): New.
15065 (look_up_one_symbol): Adjust to per-process symbol cache. *
15066 * server.c (cont_thread, general_thread, step_thread): Change type
15067 to ptid_t.
15068 (attached): Delete.
15069 (multi_process): New.
15070 (last_ptid): Change type to ptid_t.
15071 (struct vstop_notif) <ptid>: Change type to ptid_t.
15072 (queue_stop_reply, push_event): Change `ptid' argument's type to
15073 ptid_t.
15074 (discard_queued_stop_replies): Add `pid' argument.
15075 (start_inferior): Adjust to use ptids. Adjust to mywait interface
15076 changes. Don't reference the `attached' global.
15077 (attach_inferior): Adjust to mywait interface changes.
15078 (handle_query): Adjust to use ptids. Parse GDB's qSupported
15079 features. Handle and report "multiprocess+". Handle
15080 "qAttached:PID".
15081 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
15082 changes.
15083 (handle_v_kill): New.
15084 (handle_v_stopped): Adjust to use target_pid_to_str.
15085 (handle_v_requests): Allow multiple attaches and runs when
15086 multiprocess extensions are in effect. Handle "vKill".
15087 (myresume): Adjust to use ptids.
15088 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
15089 (handle_status): Adjust to discard_queued_stop_replies interface
15090 change.
15091 (first_thread_of, kill_inferior_callback)
15092 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
15093 (main): Call initialize_inferiors. Adjust to use ptids, killing
15094 and detaching from all inferiors. Handle multiprocess packet
15095 variants.
15096 * linux-low.h: Include gdb_proc_service.h.
15097 (struct process_info_private): New.
15098 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
15099 <lwpid_of>: Use ptid_get_lwp.
15100 (get_lwp_thread): Adjust.
15101 (struct lwp_info): Add `dead' member.
15102 (find_lwp_pid): Declare.
15103 * linux-low.c (thread_db_active): Delete.
15104 (new_inferior): Adjust comment.
15105 (inferior_pid): Delete.
15106 (linux_add_process): New.
15107 (handle_extended_wait): Adjust.
15108 (add_lwp): Change unsigned long to ptid.
15109 (linux_create_inferior): Add process to processes table. Adjust
15110 to use ptids. Don't set new_inferior here.
15111 (linux_attach_lwp): Rename to ...
15112 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
15113 it. Adjust to use ptids.
15114 (linux_attach_lwp): New.
15115 (linux_attach): Add process to processes table. Don't set
15116 new_inferior here.
15117 (struct counter): New.
15118 (second_thread_of_pid_p, last_thread_of_process_p): New.
15119 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
15120 multiple processes.
15121 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
15122 processes. Remove process from process table.
15123 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
15124 to multiple processes.
15125 (any_thread_of): New.
15126 (linux_detach): Add `pid' argument, and handle it. Remove process
15127 from processes table.
15128 (linux_join): Add `pid' argument. Handle it.
15129 (linux_thread_alive): Change unsighed long argument to ptid_t.
15130 Consider dead lwps as not being alive.
15131 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
15132 threads we're not interested in.
15133 (same_lwp, find_lwp_pid): New.
15134 (linux_wait_for_lwp): Change `pid' argument's type from int to
15135 ptid_t. Adjust.
15136 (linux_wait_for_event): Rename to ...
15137 (linux_wait_for_event_1): ... this. Change `pid' argument's type
15138 from int to ptid_t. Adjust.
15139 (linux_wait_for_event): New.
15140 (linux_wait_1): Add `ptid' argument. Change return type to
15141 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
15142 that exit from the process table.
15143 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
15144 Adjust.
15145 (mark_lwp_dead): New.
15146 (wait_for_sigstop): Adjust to use ptids. If a process exits while
15147 stopping all threads, mark its main lwp as dead.
15148 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
15149 ptids.
15150 (fetch_register, usr_store_inferior_registers)
15151 (regsets_fetch_inferior_registers)
15152 (regsets_store_inferior_registers, linux_read_memory)
15153 (linux_write_memory): Inline `inferior_pid'.
15154 (linux_look_up_symbols): Adjust to use per-process
15155 `thread_db_active'.
15156 (linux_request_interrupt): Adjust to use ptids.
15157 (linux_read_auxv): Inline `inferior_pid'.
15158 (initialize_low): Don't reference thread_db_active.
15159 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
15160 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
15161 (ps_getpid): Return the pid of the current inferior.
15162 * thread-db.c (proc_handle, thread_agent): Delete.
15163 (thread_db_create_event, thread_db_enable_reporting): Adjust to
15164 per-process data.
15165 (find_one_thread): Change argument type to ptid_t. Adjust to
15166 per-process data.
15167 (maybe_attach_thread): Adjust to per-process data and ptids.
15168 (thread_db_find_new_threads): Ditto.
15169 (thread_db_init): Ditto.
15170 * spu-low.c (spu_create_inferior, spu_attach): Add process to
15171 processes table. Adjust to use ptids.
15172 (spu_kill, spu_detach): Adjust interface. Remove process from
15173 processes table.
15174 (spu_join, spu_thread_alive): Adjust interface.
15175 (spu_wait): Adjust interface. Remove process from processes
15176 table. Adjust to use ptids.
15177 * win32-low.c (current_inferior_tid): Delete.
15178 (current_inferior_ptid): New.
15179 (debug_event_ptid): New.
15180 (thread_rec): Take a ptid. Adjust.
15181 (child_add_thread): Add `pid' argument. Adjust to use ptids.
15182 (child_delete_thread): Ditto.
15183 (do_initial_child_stuff): Add `attached' argument. Add process to
15184 processes table.
15185 (child_fetch_inferior_registers, child_store_inferior_registers):
15186 Adjust.
15187 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
15188 (win32_attach): Pass 1 to do_initial_child_stuff.
15189 (win32_kill): Adjust interface. Remove process from processes
15190 table.
15191 (win32_detach): Ditto.
15192 (win32_join): Adjust interface.
15193 (win32_thread_alive): Take a ptid.
15194 (win32_resume): Adjust to use ptids.
15195 (get_child_debug_event): Ditto.
15196 (win32_wait): Adjust interface. Remove exiting process from
15197 processes table.
15198
bd99dc85
PA
151992009-04-01 Pedro Alves <pedro@codesourcery.com>
15200
15201 Non-stop mode support.
15202
15203 * server.h (non_stop): Declare.
15204 (gdb_client_data, handler_func): Declare.
15205 (delete_file_handler, add_file_handler, start_event_loop):
15206 Declare.
15207 (handle_serial_event, handle_target_event, push_event)
15208 (putpkt_notif): Declare.
15209 * target.h (enum resume_kind): New.
15210 (struct thread_resume): Replace `step' field by `kind' field.
15211 (TARGET_WNOHANG): Define.
15212 (struct target_ops) <wait>: Add `options' argument.
15213 <supports_non_stop, async, start_non_stop>: New fields.
15214 (target_supports_non_stop, target_async): New.
15215 (start_non_stop): Declare.
15216 (mywait): Add `options' argument.
15217 * target.c (mywait): Add `options' argument. Print child exit
15218 notifications here.
15219 (start_non_stop): New.
15220 * server.c (non_stop, own_buf, mem_buf): New globals.
15221 (struct vstop_notif): New.
15222 (notif_queue): New global.
15223 (queue_stop_reply, push_event, discard_queued_stop_replies)
15224 (send_next_stop_reply): New.
15225 (start_inferior): Adjust to use resume_kind. Adjust to mywait
15226 interface changes.
15227 (attach_inferior): In non-stop mode, don't wait for the target
15228 here.
15229 (handle_general_set): Handle QNonStop.
15230 (handle_query): When handling qC, return the current general
15231 thread, instead of the first thread of the list.
15232 (handle_query): If the backend supports non-stop mode, include
15233 QNonStop+ in the qSupported query response.
15234 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
15235 and non-stop mode.
15236 (handle_v_attach, handle_v_run): Handle non-stop mode.
15237 (handle_v_stopped): New.
15238 (handle_v_requests): Report support for vCont;t. Handle vStopped.
15239 (myresume): Adjust to use resume_kind. Handle non-stop.
15240 (queue_stop_reply_callback): New.
15241 (handle_status): Handle non-stop mode.
15242 (main): Clear non_stop flag on reconnection. Use the event-loop.
15243 Refactor serial protocol handling from here ...
15244 (process_serial_event): ... to this new function. When GDB
15245 selects any thread, select one here. In non-stop mode, wait until
15246 GDB acks all pending events before exiting.
15247 (handle_serial_event, handle_target_event): New.
15248 * remote-utils.c (remote_open): Install remote_desc in the event
15249 loop.
15250 (remote_close): Remove remote_desc from the event loop.
15251 (putpkt_binary): Rename to...
15252 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
15253 (putpkt_binary): New as wrapper around putpkt_binary_1.
15254 (putpkt_notif): New.
15255 (prepare_resume_reply): In non-stop mode, don't change the
15256 general_thread.
15257 * event-loop.c: New.
15258 * Makefile.in (OBJ): Add event-loop.o.
15259 (event-loop.o): New rule.
15260
15261 * linux-low.h (pid_of): Moved here.
15262 (lwpid_of): New.
15263 (get_lwp_thread): Use lwpid_of.
15264 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
15265 * linux-low.c (pid_of): Delete.
15266 (inferior_pid): Use lwpid_of.
15267 (linux_event_pipe): New.
15268 (target_is_async_p): New.
15269 (delete_lwp): New.
15270 (handle_extended_wait): Use lwpid_of.
15271 (add_lwp): Don't set lwpid field.
15272 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
15273 (linux_kill_one_lwp): If killing a running lwp, stop it first.
15274 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
15275 (linux_detach_one_lwp): If detaching from a running lwp, stop it
15276 first. Adjust to linux_wait_for_event interface changes. Use
15277 lwpid_of.
15278 (linux_detach): Don't delete the main lwp here.
15279 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
15280 (status_pending_p): Don't consider explicitly suspended lwps.
15281 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
15282 pointer. Add OPTIONS argument. Change return type to int. Use
15283 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
15284 (linux_wait_for_event): Take an integer pid instead of a lwp_info
15285 pointer. Add status pointer argument. Return a pid instead of a
15286 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
15287 changes. In non-stop mode, don't switch to a random thread.
15288 (linux_wait): Rename to...
15289 (linux_wait_1): ... this. Add target_options argument, and handle
15290 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
15291 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
15292 clean exit and signal exit code. Don't stop all threads in
15293 non-stop mode. In all-stop mode, only stop all threads when
15294 reporting a stop to GDB. Handle explicit thread stop requests.
15295 (async_file_flush, async_file_mark): New.
15296 (linux_wait): New.
15297 (send_sigstop): Use lwpid_of.
15298 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
15299 interface changes. In non-stop mode, don't switch to a random
15300 thread.
15301 (linux_resume_one_lwp): Use lwpid_of.
15302 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
15303 (linux_resume_one_thread): ... this. Handle resume_stop. In
15304 non-stop mode, don't look for pending flag in all threads.
15305 (resume_status_pending_p): Don't consider explicitly suspended
15306 threads.
15307 (my_waitpid): Reimplement. Emulate __WALL.
15308 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
15309 Use lwpid_of.
15310 (sigchld_handler, linux_supports_non_stop, linux_async)
15311 (linux_start_non_stop): New.
15312 (linux_target_ops): Register linux_supports_non_stop, linux_async
15313 and linux_start_non_stop.
15314 (initialize_low): Install SIGCHLD handler.
15315 * thread-db.c (thread_db_create_event, find_one_thread)
15316 (thread_db_get_tls_address): Use lwpid_of.
15317 * win32-low.c (win32_detach): Adjust to use resume_kind.
15318 (win32_wait): Add `options' argument.
15319 * spu-low.c (spu_resume): Adjust to use resume_kind.
15320 (spu_wait): Add `options' argument.
15321
5b1c542e
PA
153222009-04-01 Pedro Alves <pedro@codesourcery.com>
15323
15324 Decouple target code from remote protocol.
15325
15326 * target.h (enum target_waitkind): New.
15327 (struct target_waitstatus): New.
15328 (struct target_ops) <wait>: Return an unsigned long. Take a
15329 target_waitstatus pointer instead of a char pointer.
15330 (mywait): Likewise.
15331 * target.c (mywait): Change prototype to return an unsigned long.
15332 Take a target_waitstatus pointer instead of a char pointer. Adjust.
15333 * server.h (thread_from_wait, old_thread_from_wait): Delete
15334 declarations.
15335 (prepare_resume_reply): Change prototype to take a
15336 target_waitstatus.
15337 * server.c (thread_from_wait, old_thread_from_wait): Delete.
15338 (last_status, last_ptid): New.
15339 (start_inferior): Remove "statusptr" argument. Adjust. Return a
15340 pid instead of a signal.
15341 (attach_inferior): Remove "status" and "signal" parameters.
15342 Adjust.
15343 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
15344 not as an address.
15345 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
15346 (handle_v_requests, myresume): Remove "status" and "signal"
15347 parameters. Adjust.
15348 (handle_status): New.
15349 (main): Delete local `status'. Adjust.
15350 * remote-utils.c: Include target.h.
15351 (prepare_resume_reply): Change prototype to take a
15352 target_waitstatus. Adjust.
15353
15354 * linux-low.c (linux_wait): Adjust to new target_ops->wait
15355 interface.
15356 * spu-low.c (spu_wait): Adjust.
15357 * win32-low.c (enum target_waitkind, struct target_waitstatus):
15358 Delete.
15359 (win32_wait): Adjust.
15360
2bd7c093
PA
153612009-04-01 Pedro Alves <pedro@codesourcery.com>
15362
15363 * target.h (struct thread_resume): Delete leave_stopped member.
15364 (struct target_ops): Add a `n' argument to the `resume' callback.
15365 * server.c (start_inferior): Adjust.
15366 (handle_v_cont, myresume): Adjust.
15367 * linux-low.c (check_removed_breakpoint): Adjust to resume
15368 interface change, and to removed leave_stopped field.
15369 (resume_ptr): Delete.
15370 (struct thread_resume_array): New.
15371 (linux_set_resume_request): Add new `arg' parameter. Adjust to
15372 resume interface change.
15373 (linux_continue_one_thread, linux_queue_one_thread)
15374 (resume_status_pending_p): Check if the resume field is NULL
15375 instead of checking the leave_stopped member.
15376 (linux_resume): Adjust to the target resume interface change.
15377 * spu-low.c (spu_resume): Adjust to the target resume interface
15378 change.
15379 * win32-low.c (win32_detach, win32_resume): Ditto.
15380
c35fafde
PA
153812009-04-01 Pedro Alves <pedro@codesourcery.com>
15382
15383 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
15384 flag.
15385 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
15386 pending.
15387 (linux_continue_one_thread): Only preserve the stepping flag if
15388 there's a pending breakpoint.
15389
0a59d50b
PA
153902009-03-31 Pedro Alves <pedro@codesourcery.com>
15391
15392 * server.c (main): After the inferior having exited, call
15393 remote_close before exiting gdbserver.
15394
f04c6d38
TJB
153952009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
15396
15397 Fix size of FPSCR in Power 7 processors.
15398 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
15399 (PPC_FEATURE_HAS_DFP): New #define.
15400 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
15401 size of the FPSCR.
15402
78e5cee6
PA
154032009-03-23 Pedro Alves <pedro@codesourcery.com>
15404
15405 * server.c (handle_query) Whitespace and formatting.
15406
1b3f6016
PA
154072009-03-22 Pedro Alves <pedro@codesourcery.com>
15408
15409 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
15410 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
15411 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
15412 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
15413 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
15414 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
15415 Makefile.in, configure.ac: Fix whitespace throughout.
15416 * configure: Regenerate.
15417
a07b2135
PA
154182009-03-22 Pedro Alves <pedro@codesourcery.com>
15419
15420 * inferiors.c (find_inferior): Make it safe for the callback
15421 function to delete the currently iterated inferior.
15422
67cc2626
PA
154232009-03-22 Pedro Alves <pedro@codesourcery.com>
15424
15425 * Makefile.in (linuw_low_h): Move higher.
15426 (thread-db.o): Depend on $(linux_low_h).
15427
54a0b537
PA
154282009-03-17 Pedro Alves <pedro@codesourcery.com>
15429
15430 Rename "process" to "lwp" throughout.
15431
15432 * linux-low.c (all_processes): Rename to...
15433 (all_lwps): ... this.
15434 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
15435 (add_process): Rename to ...
15436 (add_lwp): ... this. Adjust.
15437 (linux_create_inferior): Adjust.
15438 (linux_attach_lwp): Adjust.
15439 (linux_attach): Adjust.
15440 (linux_kill_one_process): Rename to ...
15441 (linux_kill_one_lwp): ... this. Adjust.
15442 (linux_kill): Adjust.
15443 (linux_detach_one_process): Rename to ...
15444 (linux_detach_one_lwp): ... this. Adjust.
15445 (linux_detach): Adjust.
15446 (check_removed_breakpoint): Adjust.
15447 (status_pending_p): Adjust.
15448 (linux_wait_for_process): Rename to ...
15449 (linux_wait_for_lwp): ... this. Adjust.
15450 (linux_wait_for_event): Adjust.
15451 (send_sigstop): Adjust.
15452 (wait_for_sigstop): Adjust.
15453 (stop_all_processes): Rename to ...
15454 (stop_all_lwps): ... this.
15455 (linux_resume_one_process): Rename to ...
15456 (linux_resume_one_lwp): ... this. Adjust.
15457 (linux_set_resume_request, linux_continue_one_thread)
15458 (linux_queue_one_thread, resume_status_pending_p)
15459 (usr_store_inferior_registers, regsets_store_inferior_registers)
15460 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
15461 Adjust.
15462 * linux-low.h (get_process): Rename to ...
15463 (get_lwp): ... this. Adjust.
15464 (get_thread_process): Rename to ...
15465 (get_thread_lwp): ... this. Adjust.
15466 (get_process_thread): Rename to ...
15467 (get_lwp_thread): ... this. Adjust.
15468 (struct process_info): Rename to ...
15469 (struct lwp_info): ... this.
15470 (all_processes): Rename to ...
15471 (all_lwps): ... this.
15472 * proc-service.c (ps_lgetregs): Adjust.
15473 * thread-db.c (thread_db_create_event, find_one_thread)
15474 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
15475
0b16c5cf
PA
154762009-03-14 Pedro Alves <pedro@codesourcery.com>
15477
15478 * server.c (handle_query): Handle "qAttached".
15479
32de4b9d
NS
154802009-03-13 Nathan Sidwell <nathan@codesourcery.com>
15481
15482 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
15483 GPLv3, update license URL.
15484
2aecd87f
DE
154852009-03-01 Doug Evans <dje@google.com>
15486
93efd302 15487 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
15488 (server_h): Add gdb_signals.h.
15489 (signals.o): Update.
15490 * server.h (target_signal_from_host,target_signal_to_host_p)
15491 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
15492
86b1f9c5
PM
154932009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
15494
15495 * remote-utils.c (getpkt): Also generate remote-debug
15496 information if noack_mode is set.
15497
4aa995e1
PA
154982009-02-06 Pedro Alves <pedro@codesourcery.com>
15499
15500 * server.c (handle_query): Report qXfer:siginfo:read and
15501 qXfer:siginfo:write as supported and handle them.
15502 * target.h (struct target_ops) <qxfer_siginfo>: New field.
15503 * linux-low.c (linux_xfer_siginfo): New.
15504 (linux_target_ops): Set it.
15505
62709adf
PA
155062009-01-26 Pedro Alves <pedro@codesourcery.com>
15507
15508 * server.c (gdbserver_usage): Mention --remote-debug.
15509 (main): Accept '--remote-debug' switch.
15510
aef93bd7
DE
155112009-01-18 Doug Evans <dje@google.com>
15512
15513 * regcache.c (new_register_cache): No need to check result of xcalloc.
15514 * server.c (handle_search_memory): Back out calls to xmalloc,
15515 result is checked and error is returned to user upon failure.
15516 (handle_query): Ditto. Add more checks for result of malloc.
15517 (handle_v_cont): Check result of malloc, report error back to
15518 user upon failure.
15519 (handle_v_run): Ditto. Call freeargv.
15520 * server.h (freeargv): Declare.
15521 * utils.c (freeargv): New fn.
15522
54363045
DE
155232009-01-15 Doug Evans <dje@google.com>
15524
f626972c
DE
15525 * gdbreplay.c (perror_with_name): Make arg const char *.
15526 * server.h (target_signal_to_name): Make return type const char *.
0842e787 15527 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 15528 * utils.c (perror_with_name): Make arg const char *.
54363045 15529
18aae699
PA
155302009-01-14 Pedro Alves <pedro@codesourcery.com>
15531
15532 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
15533 when handling a EXIT_PROCESS_DEBUG_EVENT.
15534
ff703abe
JB
155352009-01-06 Joel Brobecker <brobecker@adacore.com>
15536
15537 * gdbreplay.c (gdbreplay_version): Update copyright year.
15538 * server.c (gdbserver_version): Likewise.
15539
f21cc1a2 155402009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
15541
15542 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 15543 (handle_extended_wait): Improve comment.
0e21c1ec 15544
bca929d3
DE
155452008-12-13 Doug Evans <dje@google.com>
15546
15547 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
15548 * server.h (ATTR_MALLOC): New macro.
15549 (xmalloc,xcalloc,xstrdup): Declare.
15550 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
15551 * inferiors.c: Ditto.
15552 * linux-low.c: Ditto.
15553 * mem-break.c: Ditto.
15554 * regcache.c: Ditto.
15555 * remote-utils.c: Ditto.
15556 * server.c: Ditto.
15557 * target.c: Ditto.
15558 * win32-low.c: Ditto.
15559
97438e3f
DE
155602008-12-12 Doug Evans <dje@google.com>
15561
896c7fbb
DE
15562 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
15563 in debugging printf.
15564
97438e3f
DE
15565 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
15566
e3b886f8
DE
155672008-12-09 Doug Evans <dje@google.com>
15568
15569 * linux-low.h (struct process_info): Delete member tid, unused.
15570 * thread-db.c (find_one_thread): Update.
15571 (maybe_attach_thread): Update.
15572
07e059b5
VP
155732008-12-02 Pedro Alves <pedro@codesourcery.com>
15574
889bf7c5
PA
15575 * target.h (struct target_ops): Add qxfer_osdata member.
15576 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
15577 and dirent.h.
15578 (linux_qxfer_osdata): New functions.
15579 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
15580 callback.
15581 * server.c (handle_query): Handle "qXfer:osdata:read:".
15582 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
15583 (buffer_xml_printf): New functions.
15584 * server.h (struct buffer): New.
15585 (buffer_grow_str, buffer_grow_str0): New macros.
15586 (buffer_grow, buffer_free, buffer_init, buffer_finish)
15587 (buffer_xml_printf): Declare.
07e059b5 15588
4cab47ab
DE
155892008-11-24 Doug Evans <dje@google.com>
15590
15591 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
15592
f142445f
DJ
155932008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
15594
15595 * server.c (handle_v_run): Always use the supplied argument list.
15596
d0107bb6 155972008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 15598
d0107bb6
BW
15599 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
15600 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 15601
2c4ad781
TJB
156022008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
15603
15604 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
15605 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
15606 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
15607 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
15608 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
15609 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
15610 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
15611 XML target descriptions.
15612 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
15613 when inferior is running on an ISA 2.05 or later processor. Add
15614 special case to return offset for full 64-bit slot of FPSCR when
15615 in 32-bits.
15616
dfb64f85
DJ
156172008-11-14 Daniel Gutson <dgutson@codesourcery.com>
15618
15619 * Makefile.in (SFILES, clean): Added sparc64 files.
15620 (reg-sparc64.o, reg-sparc64.c): New.
15621 * configure.srv (sparc*-*-linux*): New configuration.
15622 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
15623 syscall arguments for SPARC.
15624 (regsets_store_inferior_registers): Likewise.
15625 * linux-sparc-low.c: New file.
15626
66b6e1dd
DE
156272008-10-21 Doug Evans <dje@google.com>
15628
15629 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
15630 (READLINE_DIR,READLINE_DEP): Delete.
15631 (INTERNAL_CFLAGS): Update.
15632 (LINTFLAGS): Update.
15633
9b710a42
PA
156342008-10-10 Pedro Alves <pedro@codesourcery.com>
15635
15636 * server.c (handle_v_run): If GDB didn't specify an argv, use the
15637 whole argv from the last run, not just argv[0].
15638
5822d809
PA
156392008-09-08 Pedro Alves <pedro@codesourcery.com>
15640
15641 * regcache.c (new_register_cache): Return NULL if the register
15642 cache size isn't known yet.
15643 (free_register_cache): Avoid dereferencing a NULL regcache.
15644
74aac56f
DJ
156452008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
15646
15647 * configure.srv: Merge MIPS and MIPS64.
15648
400b20f5
MR
156492008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
15650
15651 * Makefile.in (uninstall): Apply $(EXEEXT) too.
15652
677c5bb1
LM
156532008-08-18 Luis Machado <luisgpm@br.ibm.com>
15654
15655 * Makefile.in: Add required vsx dependencies.
15656
15657 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
15658 Declare init_registers_powerpc_vsx32l.
15659 Declare init_registers_powerpc_vsx64l.
15660 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
15661 (ppc_arch_setup): Check for VSX in hwcap.
15662 (ppc_fill_vsxregset): New function.
15663 (ppc_store_vsxregset): New function.
15664 Add new VSX entry in regset_info target_regsets.
15665
15666 * configure.srv: Add new VSX dependencies.
15667
a6f3e723
SL
156682008-08-12 Pedro Alves <pedro@codesourcery.com>
15669
15670 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
15671 (remote_open): Set or clear transport_is_reliable.
15672 (putpkt_binary): Don't expect acks in noack mode.
15673 (getpkt): Don't send ack/nac in noack mode.
15674 * server.c (handle_general_set): Handle QStartNoAckMode.
15675 (handle_query): If connected by tcp pass QStartNoAckMode+ in
15676 qSupported.
15677 (main): Reset noack_mode on every connection.
15678 * server.h (noack_mode): Declare.
15679
a417dc56
RW
156802008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
15681
15682 * Makefile.in (GDBREPLAY_OBS): New variable.
15683 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
15684
3221518c
UW
156852008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
15686 Daniel Jacobowitz <dan@codesourcery.com>
15687
15688 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
15689 (usr_store_inferior_registers): Likewise.
15690 (regsets_store_inferior_registers): Likewise.
15691
ec56be1b
PA
156922008-07-31 Rolf Jansen <rj@surtec.com>
15693 Pedro Alves <pedro@codesourcery.com>
15694
15695 * configure.ac: Check for memmem declaration.
15696 * server.c [HAVE_MALLOC_H]: Include malloc.h.
15697 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
15698 (disable_packet_qfThreadInfo): Unconditionally compile.
15699 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
15700 * configure, config.in: Regenerate.
15701
2fe5e3ff
DE
157022008-07-28 Doug Kwan <dougkwan@google.com>
15703
15704 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
15705 (linux_write_memory): Remove declaration of errno.
15706
836acd6d
UW
157072008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
15708
15709 * linux-low.c (handle_extended_wait): Do not use "status"
15710 variable uninitialized.
15711
aeba519e
PA
157122008-07-07 Pedro Alves <pedro@codesourcery.com>
15713
15714 * server.c (handle_v_attach): Inhibit reporting dll changes.
15715
db42f210
PA
157162008-06-27 Pedro Alves <pedro@codesourcery.com>
15717
15718 * remote-utils.c (prepare_resume_reply): If requested, don't
15719 output "thread:TID" in the T stop reply.
15720
15721 * server.c (disable_packet_vCont, disable_packet_Tthread)
15722 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
15723 (handle_query): If requested, disable support for qC, qfThreadInfo
15724 and qsThreadInfo.
15725 (handle_v_requests): If requested, disable support for vCont.
15726 (gdbserver_show_disableable): New.
15727 (main): Handle --disable-packet and --disable-packet=LIST.
15728
15729 * server.h (disable_packet_vCont, disable_packet_Tthread)
15730 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
15731
8e4c5421
CD
157322008-06-20 Carlos O'Donell <carlos@codesourcery.com>
15733
15734 * server.c (gdbserver_usage): Mention --version.
15735
6e23a804
DJ
157362008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
15737
15738 * Makefile.in (gdbreplay.o): New rule.
15739
90aa6a40
JM
157402008-06-06 Joseph Myers <joseph@codesourcery.com>
15741
15742 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
15743 message, not gdbserver.
15744
c16158bc 157452008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
15746 Nathan Sidwell <nathan@codesourcery.com>
15747 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
15748
15749 * acinclude.m4: Include ../../config/acx.m4.
15750 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
15751 * configure, config.in: Regenerate.
15752 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
15753 * server.c (gdbserver_version): Print PKGVERSION.
15754 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
15755 (main): Adjust gdbserver_usage calls.
15756 * gdbreplay.c (version, host_name): Add declarations.
15757 (gdbreplay_version, gdbreplay_usage): New.
15758 (main): Accept --version and --help options.
15759
aeb75bf5
DJ
157602008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
15761
15762 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
15763 (arm_breakpoint_at): Handle Thumb.
15764 (the_low_target): Add comment.
15765
76b233dd
UW
157662008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
15767
15768 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
15769
08388c79
DE
157702008-05-09 Doug Evans <dje@google.com>
15771
a3c83fae
DE
15772 * server.h (decode_search_memory_packet): Declare.
15773 * remote-utils.c (decode_search_memory_packet): New fn.
15774 * server.c (handle_search_memory_1): New fn.
08388c79
DE
15775 (handle_search_memory): New fn.
15776 (handle_query): Process qSearch:memory packets.
15777
bb9c3d36
UW
157782008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
15779
15780 * regcache.c (registers_length): Remove.
15781 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
15782 full register packet.
15783 * regcache.h (registers_length): Remove prototype.
15784 * server.h (PBUFSIZ): Define to 16384.
15785
7284e1be
UW
157862008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
15787
15788 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
15789 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
15790 powerpc-64l.o, and powerpc-altivec64l.o.
15791 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
15792 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
15793 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
15794 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
15795 rs6000/power-linux.xml, and rs6000/power64-linux.xml
15796 to srv_xmlfiles.
15797
15798 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
15799 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
15800 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
15801 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
15802 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
15803 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
15804 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
15805 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
15806 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
15807 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
15808 (clean): Update.
15809
15810 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
15811 (init_registers_powerpc_32l): ... this new prototype.
15812 (init_registers_powerpc_32): Remove, replace by ...
15813 (init_registers_powerpc_altivec32l): ... this new prototype.
15814 (init_registers_powerpc_e500): Remove, replace by ...
15815 (init_registers_powerpc_e500l): ... this new prototype.
15816 (init_registers_ppc64): Remove, replace by ...
15817 (init_registers_powerpc_64l): ... this new prototype.
15818 (init_registers_powerpc_64): Remove, replace by ...
15819 (init_registers_powerpc_altivec64l): ... this new prototype.
15820 (ppc_num_regs): Set to 73.
15821 (PT_ORIG_R3, PT_TRAP): Define if necessary.
15822 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
15823 (ppc_cannot_store_register): Handle orig_r3 and trap.
15824 (ppc_arch_setup): Update init_registers_... calls.
15825 (ppc_fill_gregset): Handle orig_r3 and trap.
15826
15827 * inferiors.c (clear_inferiors): Reset current_inferior.
15828
fdc59709
PB
158292008-04-23 Paolo Bonzini <bonzini@gnu.org>
15830
889bf7c5
PA
15831 * acinclude.m4: Add override.m4.
15832 * configure: Regenerate.
fdc59709 15833
c9b2f845
UW
158342008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
15835
15836 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
15837 initial call to init_register_ppc64.
15838
550512b8
UW
158392008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
15840
43aaf8b6
PA
15841 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
15842 single powerpc*-*-linux* case.
550512b8
UW
15843 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
15844
b6430ec3
UW
158452008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
15846
15847 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 15848 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
15849 from reg_xmlfiles.
15850 * linux-ppc-low.c: Include <elf.h>.
15851 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
15852 (ppc_hwcap): New global variable.
15853 (ppc_regmap): Remove __SPE__ #ifdef sections.
15854 (ppc_regmap_e500): New global variable.
15855 (ppc_cannot_store_register): Update __SPE__ special case.
15856 (ppc_get_hwcap): New function.
15857 (ppc_arch_setup): Use it to determine whether inferior supports
15858 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
15859 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
15860 Do not access registers if target does not support AltiVec.
15861 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
15862 Do not access registers if target does not support SPE.
15863 (target_regsets): Unconditionally include AltiVec and SPE regsets.
15864
52fa2412
UW
158652008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
15866
15867 * linux-low.c (disabled_regsets, num_regsets): New.
15868 (use_regsets_p): Delete.
15869 (linux_wait_for_process): Clear disabled_regsets.
15870 (regsets_fetch_inferior_registers): Check and set it.
15871 (regsets_store_inferior_registers): Likewise.
15872 (linux_fetch_registers, linux_store_registers): Do not use
15873 use_regsets_p.
15874 (initialize_low): Allocate disabled_regsets.
15875
e28b3332
DJ
158762008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
15877
15878 * Makefile.in (LIBOBJS): New.
15879 (OBS): Use LIBOBJS.
15880 (memmem.o): New rule.
15881 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
15882 * configure: Regenerated.
15883
4536995d
UW
158842008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
15885
15886 * server.c (handle_query): Never return "unsupported" for
15887 qXfer:features:read queries.
15888
221c031f
UW
158892008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
15890
15891 * server.c (get_features_xml): Fix inverted condition.
15892 (handle_query): Always support qXfer:feature:read.
15893
ccd213ac
DJ
158942008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
15895
15896 * server.c (wrapper_argv): New.
15897 (start_inferior): Handle wrapper_argv. If set, expect an extra
15898 trap.
15899 (gdbserver_usage): Document --wrapper.
15900 (main): Parse --wrapper.
15901
6fe305f7
UW
159022008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
15903
15904 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
15905 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
15906 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
15907 (ppc_set_pc): Likewise.
15908 (ppc_arch_setup): New function.
15909 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
15910 of collect_register.
889bf7c5 15911 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 15912
5b0a002e
UW
159132008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
15914
15915 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
15916 instead of linux-ppc64-low.o.
15917 * linux-ppc64-low.c: Remove file.
15918 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
15919 (linux-ppc64-low.o): Remove rule.
15920
15921 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
15922 (init_registers_powerpc_64): Likewise.
15923 (ppc_regmap): Conditionally define depending on __powerpc64__.
15924 (ppc_cannot_store_register): Do not special-case "fpscr" when
15925 compiled on __powerpc64__.
15926 (ppc_collect_ptrace_register): New function.
15927 (ppc_supply_ptrace_register): New function.
15928 (ppc_breakpoint): Change type to "unsigned int".
15929 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
15930 (the_low_target): Conditionally provide initializers for the
889bf7c5 15931 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
15932 collect_ptrace_register and supply_ptrace_register members.
15933
9b4b61c8
UW
159342008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
15935
15936 * regcache.h (gdbserver_xmltarget): Add extern declaration.
15937 * server.c (gdbserver_xmltarget): Define.
15938 (get_features_xml): Use it to replace "target.xml" and arch_string.
15939
15940 * configure.srv: Remove srv_xmltarget. Add XML files that were
15941 mentioned there to srv_xmlfiles instead. Remove conditional tests
15942 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
15943 srv_xmlfiles and srv_regobj to include all possible choices.
15944 * configure.ac (srv_xmltarget): Remove.
15945 (srv_xmlfiles): Do not add "target.xml".
15946 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
15947 checks for supplementary target information.
15948 * configure: Regenerate.
15949 * Makefile.in (XML_TARGET): Remove.
15950 (target.xml): Remove rule.
15951 (clean): Do not clean up target.xml.
15952 (.PRECIOUS): Do not mention target.xml.
15953
15954 * target.h (struct target_ops): Remove arch_string member.
15955 * linux-low.c (linux_arch_string): Remove.
15956 (linux_target_ops): Remove arch_string initializer.
15957 * linux-low.h (struct linux_target_ops): Remove arch_string member.
15958 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
15959 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
15960 * spu-low.c (spu_arch_string): Remove.
15961 (spu_target_ops): Remove arch_string initializer.
15962 * win32-low.c (win32_arch_string): Remove.
15963 (win32_target_ops): Remove arch_string initializer.
15964 * win32-low.h (struct win32_target_ops): Remove arch_string member.
15965 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
15966 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
15967
ee1a7ae4
UW
159682008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
15969
15970 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
15971 by collect_ptrace_register and supply_ptrace_register hooks.
15972 * linux-low.c (fetch_register): Use supply_ptrace_register callback
15973 instead of checking for the_low_target.left_pad_xfer.
15974 (usr_store_inferior_registers): Use collect_ptrace_register callback
15975 instead of checking for the_low_target.left_pad_xfer.
15976
15977 * linux-s390-low.c (s390_collect_ptrace_register): New function.
15978 (s390_supply_ptrace_register): Likewise.
15979 (s390_fill_gregset): Call s390_collect_ptrace_register.
15980 (the_low_target): Update.
15981
15982 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
15983 (ppc_supply_ptrace_register): Likewise.
15984 (the_low_target): Update.
15985
15986 * linux-i386-low.c (the_low_target): Update.
15987 * linux-x86-64-low.c (the_low_target): Update.
15988
d61ddec4
UW
159892008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
15990
15991 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
15992 reg-s390.o and reg-s390x.o.
15993
15994 * linux-low.c (new_inferior): New global variable.
15995 (linux_create_inferior, linux_attach): Set it.
15996 (linux_wait_for_process): Call the_low_target.arch_setup after the
15997 target has stopped for the first time.
15998 (initialize_low): Do not call the_low_target.arch_setup.
15999
16000 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
16001 (s390_set_pc): Likewise.
16002 (s390_arch_setup): New function.
16003 (the_low_target): Use s390_arch_setup as arch_setup routine.
16004
16005 * regcache.c (realloc_register_cache): New function.
16006 (set_register_cache): Call it for each existing regcache.
16007
d05b4ac3
UW
160082008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
16009
16010 * server.h (init_registers): Remove prototype.
16011
16012 * linux-low.h (struct linux_target_ops): Add arch_setup field.
16013 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
16014 instead of init_registers ().
16015 * linux-arm-low.c (init_registers_arm): Add prototype.
16016 (init_registers_arm_with_iwmmxt): Likewise.
16017 (the_low_target): Add initializer for arch_setup field.
16018 * linux-cris-low.c (init_registers_cris): Add prototype.
16019 (the_low_target): Add initializer for arch_setup field.
16020 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
16021 (the_low_target): Add initializer for arch_setup field.
16022 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
16023 (the_low_target): Add initializer for arch_setup field.
16024 * linux-ia64-low.c (init_registers_ia64): Add prototype.
16025 (the_low_target): Add initializer for arch_setup field.
16026 * linux-m32r-low.c (init_registers_m32r): Add prototype.
16027 (the_low_target): Add initializer for arch_setup field.
16028 * linux-m68k-low.c (init_registers_m68k): Add prototype.
16029 (the_low_target): Add initializer for arch_setup field.
16030 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
16031 (init_registers_mips64_linux): Likewise.
16032 (the_low_target): Add initializer for arch_setup field.
16033 * linux-ppc-low.c (init_registers_ppc): Add prototype.
16034 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
16035 (the_low_target): Add initializer for arch_setup field.
16036 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
16037 (init_registers_powerpc_64): Likewise.
16038 (the_low_target): Add initializer for arch_setup field.
16039 * linux-s390-low.c (init_registers_s390): Add prototype.
16040 (init_registers_s390x): Likewise.
16041 (the_low_target): Add initializer for arch_setup field.
16042 * linux-sh-low.c (init_registers_sh): Add prototype.
16043 (the_low_target): Add initializer for arch_setup field.
16044 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
16045 (the_low_target): Add initializer for arch_setup field.
16046 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
16047 (the_low_target): Add initializer for arch_setup field.
16048
16049 * win32-low.h (struct win32_target_ops): Add arch_setup field.
16050 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
16051 instead of init_registers ().
16052 * win32-arm-low.c (init_registers_arm): Add prototype.
16053 (the_low_target): Add initializer for arch_setup field.
16054 * win32-i386-low.c (init_registers_i386): Add prototype.
16055 (the_low_target): Add initializer for arch_setup field.
16056
16057 * spu-low.c (init_registers_spu): Add prototype.
16058 (initialize_low): Call initialie_registers_spu () instead of
16059 initialize_registers ().
16060
fd96d250
PA
160612008-02-19 Pedro Alves <pedro@codesourcery.com>
16062
16063 * server.c (handle_v_requests): When handling the vRun and vAttach
16064 packets, if already debugging a process, don't kill it. Return an
16065 error instead.
16066
d41b6bb4
DJ
160672008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
16068
16069 * server.c (handle_query): Correct length check.
16070
5ac588cf
PA
160712008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
16072
16073 * win32-low.c (do_initial_child_stuff): Add process handle
16074 parameter. Set current_process_handle and current_process_id from the
16075 parameters. Clear globals.
16076 (win32_create_inferior): Don't set current_process_handle and
16077 current_process_id here. Instead pass them on the call to
16078 do_initial_child_stuff.
16079 (win32_attach): Likewise.
16080 (win32_clear_inferiors): New.
16081 (win32_kill): Don't close the current process handle or the
16082 current thread handle here. Instead call win32_clear_inferiors.
16083 (win32_detach): Don't open a new handle to the process. Call
16084 win32_clear_inferiors.
16085 (win32_join): Don't rely on current_process_handle; open a new
16086 handle using the process id.
16087 (win32_wait): Call win32_clear_inferiors when the inferior process
16088 has exited.
16089
ecd7ecbc
DJ
160902008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
16091
16092 * server.c (monitor_show_help): Add "exit".
16093
1525d545
MG
160942008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
16095
ecd7ecbc 16096 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
16097 (clean): Add reg-xtensa.c.
16098 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
16099 * configure.srv (xtensa*-*-linux*) New target.
16100 * linux-xtensa-low.c: New.
16101 * xtensa-xtregs.c: New.
1525d545 16102
59a016f0
PA
161032008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
16104
16105 * hostio.c: Don't include errno.h.
16106 (errno_to_fileio_errno): Move to hostio-errno.
16107 * hostio.c: (hostio_error): Remove the error parameter. Defer the
16108 error number outputting to the target->hostio_last_error callback.
16109 (hostio_packet_error): Use FILEIO_EINVAL directly.
16110 (handle_open, handle_pread, hostio_error, handle_unlink): Update
16111 calls to hostio_error.
16112 * hostio-errno.c: New.
16113 * server.h (hostio_last_error_from_errno): Declare.
16114 * target.h (target_ops): Add hostio_last_error member.
16115 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
16116 as hostio_last_error handler.
889bf7c5 16117 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
16118 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
16119 (wince_hostio_last_error): New functions.
16120 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
16121 as hostio_last_error handler.
16122 (win32_target_ops) [!_WIN32_WCE]: Register
16123 hostio_last_error_from_errno as hostio_last_error handler.
16124 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
16125 (hostio-errno.o): New rule.
16126 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
16127 * configure.srv (srv_hostio_err_objs): New variable. Default to
16128 hostio-errno.o.
16129 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
16130 * configure: Regenerate.
16131
2d717e4f
DJ
161322008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
16133
16134 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
16135 (linux_kill, linux_detach): Clean up the process list.
16136 * remote-utils.c (remote_open): Improve port number parsing.
16137 (putpkt_binary, input_interrupt): Only send interrupts if the target
16138 is running.
16139 * server.c (extended_protocol): Make static.
16140 (attached): Define earlier.
16141 (exit_requested, response_needed, program_argv): New variables.
16142 (target_running): New.
16143 (start_inferior): Clear attached here.
16144 (attach_inferior): Set attached here.
16145 (require_running): Define.
16146 (handle_query): Use require_running and target_running. Implement
16147 "monitor exit".
16148 (handle_v_attach, handle_v_run): New.
16149 (handle_v_requests): Use require_running. Handle vAttach and vRun.
16150 (gdbserver_usage): Update.
16151 (main): Redo argument parsing. Handle --debug and --multi. Handle
16152 --attach along with other options or after the port. Save
16153 program_argv. Support no initial program. Resynchronize
16154 communication with GDB after an error. Handle "monitor exit".
16155 Use require_running and target_running. Always allow the extended
16156 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
16157 restart in extended mode.
16158 * README: Refer to the GDB manual. Update --attach usage.
16159
7407e2de
AS
161602007-12-20 Andreas Schwab <schwab@suse.de>
16161
16162 * linux-low.c (STACK_SIZE): Define.
16163 (linux_tracefork_child): Use it. Use __clone2 on ia64.
16164 (linux_test_for_tracefork): Likewise.
16165
b65d95c5
DJ
161662007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
16167
16168 * linux-low.c (linux_wait_for_event): Update messages. Do not
16169 reinsert auto-delete breakpoints.
16170 * mem-break.c (struct breakpoint): Change return type of handler to
16171 int.
16172 (set_breakpoint_at): Update handler type.
16173 (reinsert_breakpoint_handler): Return 1 instead of calling
16174 delete_breakpoint.
16175 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
16176 setting a new one.
16177 (check_breakpoints): Delete auto-delete breakpoints and return 2.
16178 * mem-break.h (set_breakpoint_at): Update handler type.
16179 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
16180 * win32-low.c (auto_delete_breakpoint): New.
16181 (get_child_debug_event): Use it.
16182
4e799345
DJ
161832007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
16184
16185 * configure.ac: Check for pread and pwrite.
16186 * hostio.c (handle_pread): Fall back to lseek and read.
16187 (handle_pwrite): Fall back to lseek and write.
16188 * config.in, configure: Regenerated.
16189
27524b67
DJ
161902007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
16191
16192 * server.c (myresume): Add own_buf argument.
16193 (main): Update calls.
16194
a20d5e98
DJ
161952007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
16196
16197 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
16198 * remote-utils.c (remote_open): Do not call disable_async_io.
16199 (block_async_io): Delete.
16200 (unblock_async_io): Make static.
16201 (initialize_async_io): New.
16202 * server.c (handle_v_cont): Handle async I/O here.
16203 (myresume): Likewise. Move other common resume tasks here...
16204 (main): ... from here. Call initialize_async_io. Disable async
16205 I/O before the main loop.
16206 * server.h (initialize_async_io): Declare.
16207 (block_async_io, unblock_async_io): Delete prototypes.
16208 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
16209
b79d787e
DJ
162102007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
16211
16212 * remote-utils.c (readchar): Allow binary data in received messages.
16213
d97903b2
PA
162142007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
16215
16216 * win32-low.c (attaching): New global.
16217 (win32_create_inferior): Clear the `attaching' global.
16218 (win32_attach): Set the `attaching' global.
16219 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
16220 attaching. Only set a breakpoint at the entry point if not
16221 attaching.
16222
311de423
PA
162232007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
16224
16225 * server.c (main): Don't report dll events on the initial
16226 connection on attaches.
16227
6c2d16d2
PA
162282007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
16229
16230 * server.c (main): Relax numerical bases supported for the pid of
16231 the --attach command line argument.
16232
5ca906e6
PA
162332007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
16234
16235 * win32-low.c (win32_attach): Call OpenProcess before
16236 DebugActiveProcess, not after. Add last error output to error
16237 call.
16238
9c6c8194
PA
162392007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
16240
16241 * win32-low.c (win32_get_thread_context)
16242 (win32_set_thread_context): New functions.
16243 (thread_rec): Use win32_get_thread_context.
16244 (continue_one_thread, win32_resume): Use win32_set_thread_context.
16245 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
16246 field.
16247
4d5d1aaa
PA
162482007-12-03 Leo Zayas
16249 Pedro Alves <pedro_alves@portugalmail.pt>
16250
16251 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
16252 global variables.
16253 (child_add_thread): Minor cleanup.
16254 (child_continue): Resume artificially suspended threads before
16255 calling ContinueDebugEvent.
16256 (suspend_one_thread): New.
16257 (fake_breakpoint_event): New.
16258 (get_child_debug_event): Change return type to int. Check here if
16259 gdb sent an interrupt request. If a soft interrupt was requested,
16260 fake a breakpoint event. Return 0 if there is no event to handle,
16261 and 1 otherwise.
16262 (win32_wait): Don't check here if gdb sent an interrupt request.
16263 Ensure there is a valid event to handle.
16264 (win32_request_interrupt): Add soft interruption method as last
16265 resort.
16266
c436e841
PA
162672007-12-03 Leo Zayas
16268 Pedro Alves <pedro_alves@portugalmail.pt>
16269
16270 * win32-low.h (win32_thread_info): Add descriptions to the
16271 structure members. Replace `suspend_count' counter by a
16272 `suspended' flag.
16273 * win32-low.c (thread_rec): Update condition of when to get the
16274 context from the inferior. Rely on ContextFlags being set if it
16275 has already been retrieved. Only suspend the inferior thread if
16276 we haven't already. Warn if that fails.
16277 (continue_one_thread): s/suspend_count/suspended/. Only call
16278 ResumeThread once. Warn if that fails.
16279
e7b5fa67
PA
162802007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
16281
16282 * win32-low.c (win32_wait): Don't read from the inferior when it
16283 has already exited.
16284
a385171d
PA
162852007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
16286
16287 * Makefile.in (win32_low_h): New variable.
16288 (win32-low.o): Add dependency on $(win32_low_h).
16289 (win32-arm-low.o, win32-i386-low.o): New rules.
16290
f80c84b3
DJ
162912007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
16292
16293 * hostio.c: Correct copyright year.
16294
a6b151f1
DJ
162952007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
16296
16297 * Makefile.in (OBS): Add hostio.o.
16298 (hostio.o): New rule.
16299 * server.h (handle_vFile): Declare.
16300 * hostio.c: New file.
16301 * server.c (handle_v_requests): Take packet_len and new_packet_len
16302 for binary packets. Call handle_vFile.
16303 (main): Update call to handle_v_requests.
16304
f9387fc3
DJ
163052007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
16306
16307 * linux-low.c: Include <sched.h>.
16308
51c2684e
DJ
163092007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
16310
16311 * linux-low.c (linux_tracefork_grandchild): New.
16312 (linux_tracefork_child): Use clone.
16313 (linux_test_for_tracefork): Use clone; allocate and free a stack.
16314
75f83163
JB
163152007-10-31 Joel Brobecker <brobecker@adacore.com>
16316
16317 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
16318
da5898ce
DJ
163192007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
16320
16321 * linux-low.c (handle_extended_wait): Handle unexpected signals.
16322
24a09b5f
DJ
163232007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
16324
16325 * inferiors.c (change_inferior_id): Delete.
16326 (add_pid_to_list, pull_pid_from_list): New.
16327 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
16328 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
16329 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
16330 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
16331 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
16332 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
16333 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
16334 (using_threads): Always set to 1.
16335 (handle_extended_wait): New.
16336 (add_process): Do not set TID.
16337 (linux_create_inferior): Set must_set_ptrace_flags.
16338 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
16339 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
16340 (linux_thread_alive): Rename TID argument to LWPID.
16341 (linux_wait_for_process): Handle unknown processes. Do not use TID.
16342 (linux_wait_for_event): Do not use TID or check using_threads. Update
16343 call to dead_thread_notify. Call handle_extended_wait.
16344 (linux_create_inferior): Use PTRACE_SETOPTIONS.
16345 (send_sigstop): Delete sigstop_sent.
16346 (wait_for_sigstop): Avoid TID.
16347 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
16348 (linux_test_for_tracefork): New.
16349 (linux_lookup_signals): Use thread_db_active and
16350 linux_supports_tracefork_flag.
16351 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
16352 * linux-low.h (get_process_thread): Avoid TID.
16353 (struct process_ifo): Move thread_known and tid to the end. Remove
16354 sigstop_sent.
16355 (linux_attach_lwp, thread_db_init): Update prototypes.
16356 * server.h (change_inferior_id): Delete prototype.
16357 (add_pid_to_list, pull_pid_from_list): New prototypes.
16358 * thread-db.c (thread_db_use_events): New.
16359 (find_first_thread): Rename to...
16360 (find_one_thread): ...this. Update callers and messages. Do not
16361 call fatal. Check thread_db_use_events. Do not call
16362 change_inferior_id or new_thread_notify.
16363 (maybe_attach_thread): Update. Do not call new_thread_notify.
16364 (thread_db_init): Set thread_db_use_events. Check use_events.
16365 * utils.c (fatal, warning): Correct message prefix.
16366
30ed0a8f
DJ
163672007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
16368
16369 * Makefile.in (clean): Remove new files.
16370 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
16371 (powerpc-64.o, powerpc-64.c): New rules.
16372 * configure.srv: Use alternate register sets for powerpc64-*-linux*
16373 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
16374 with SPE.
16375 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
16376 SPE targets.
16377 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
16378 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
16379 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
16380 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
16381 (target_regsets): Add AltiVec and SPE register sets.
16382 * configure.ac: Check for AltiVec and SPE.
16383 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
16384 (ppc_fill_vrregset, ppc_store_vrregset): New.
16385 (target_regsets): Add AltiVec register set.
16386 * configure: Regenerated.
16387
fd462a61
DJ
163882007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
16389
16390 * linux-low.c (O_LARGEFILE): Define.
16391 (linux_read_memory): Use /proc/PID/mem.
16392 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
16393 * configure, config.in: Regenerated.
16394
69f223ed
DJ
163952007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
16396
16397 * linux-low.c (linux_wait_for_event): Do not pass signals while
16398 single-stepping.
16399
aec18585
PA
164002007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
16401
16402 * win32-low.c (create_process): New.
16403 (win32_create_inferior): Use create_process instead of
16404 CreateProcess. If create_process failed retry appending an ".exe"
16405 suffix. Store the GetLastError result immediatelly after
16406 create_process calls and use it on the call to error.
16407
34d86ddd
PA
164082007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
16409
16410 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
16411
5a0e3bd0
JB
164122007-08-23 Joel Brobecker <brobecker@adacore.com>
16413
16414 * configure.ac: Switch license to GPLv3.
16415
f88c79e6
MS
164162007-08-01 Michael Snyder <msnyder@access-company.com>
16417
16418 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
16419
6b3d9b83
PA
164202007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
16421
16422 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
16423 typedef.
16424 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
16425 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
16426 CloseToolhelp32Snapshot.
16427 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
16428 CloseToolhelp32Snapshot.
16429
c588c53c
MS
164302007-07-27 Michael Snyder <michael.snyder@access-company.com>
16431
16432 * server.c (main): Check for inferior exit before main loop.
16433
aa0403d9
PA
164342007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
16435
16436 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
16437 instead of on tmp_desc.
16438
255e7678
DJ
164392007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
16440 Daniel Jacobowitz <dan@codesourcery.com>
16441
16442 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
16443 (add_thread): Minor cleanups.
16444 (clear_inferiors): Move lower in the file. Clear the DLL
16445 list.
16446 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
16447 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
16448 (xml_escape_text): New.
16449 * server.c (handle_query): Handle qXfer:libraries:read. Report it
16450 for qSupported.
16451 (handle_v_cont): Report errors.
16452 (gdbserver_version): Update.
16453 (main): Correct size of own_buf. Do not report initial DLL events.
16454 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
16455 (unloaded_dll, xml_escape_text): New.
16456 * win32-low.c (enum target_waitkind): Update comments.
16457 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
16458 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
16459 (win32_EnumProcessModules, win32_GetModuleInformation)
16460 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
16461 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
16462 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
16463 (win32_Module32First, win32_Module32Next, load_toolhelp)
16464 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
16465 (get_child_debug_event): Handle DLL events.
16466 (win32_wait): Likewise.
16467
0d37add9
DJ
164682007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
16469
16470 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
16471 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
16472
45e2715e
PA
164732007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
16474
16475 * win32-low.c (handle_output_debug_string): Ignore event if not
16476 waiting.
16477
c5674cf1
PA
164782007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
16479
16480 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
16481
2bbe3cc1
DJ
164822007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
16483
16484 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
16485
ae13219e
DJ
164862007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
16487
16488 * inferiors.c (change_inferior_id): Add comment.
16489 * linux-low.c (check_removed_breakpoint): Add an early
16490 prototype. Improve debug output.
16491 (linux_attach): Doc update.
16492 (linux_detach_one_process, linux_detach): Clean up before releasing
16493 each process.
16494 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
16495 * linux-low.h (struct process_info): Doc improvement.
16496 * mem-break.c (delete_all_breakpoints): New.
16497 * mem-break.h (delete_all_breakpoints): New prototype.
16498 * thread-db.c (find_first_thread): New.
16499 (thread_db_create_event): Call it instead of
16500 thread_db_find_new_threads. Clean up unused variables.
16501 (maybe_attach_thread): Remove first thread handling.
16502 (thread_db_find_new_threads): Use find_first_thread.
16503 (thread_db_get_tls_address): Likewise.
16504
4105de34
DJ
165052007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
16506
16507 * thread-db.c (thread_db_find_new_threads): Add prototype.
16508 (thread_db_create_event): Check for the main thread before adding
16509 a new thread.
16510 (maybe_attach_thread): Only enable event reporting if TID == 0.
16511 (thread_db_get_tls_address): Check for new threads.
16512
2b876972
DJ
165132007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
16514
16515 * linux-low.c (linux_create_inferior): Try execv before execvp.
16516 * spu-low.c (spu_create_inferior): Likewise.
16517
7a245884
DJ
165182007-06-13 Mike Frysinger <vapier@gentoo.org>
16519
16520 * linux-low.c (linux_create_inferior): Change execv to execvp.
16521 * spu-low.c (spu_create_inferior): Likewies.
16522
117ce543
DJ
165232007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
16524
16525 * Makefile.in (clean): Clean new files instead of deleted ones.
16526 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
16527 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
16528 rules.
16529 * configure.srv: Specify XML files and new regformats for MIPS and
16530 MIPS64 GNU/Linux.
16531 * linux-mips-low.c (mips_num_regs): Set to only used registers.
16532 (mips_regmap): Do not fetch $0. Remove unused registers. Add
16533 an entry for the restart register.
16534 (mips_cannot_fetch_register, mips_cannot_store_register)
16535 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
16536 register names to match the XML descriptions.
16537 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
16538 restart register instead of $0.
16539
0e7f50da
UW
165402007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
16541 Markus Deuling <deuling@de.ibm.com>
16542
16543 * remote-utils.c (decode_xfer_write): New function.
16544 * server.h (decode_xfer_write): Add prototype.
16545 * server.c (handle_query): Add PACKET_LEN argument. Support
16546 qXfer:spu:read and qXfer:spu:write packets.
16547 (main): Pass packet_len to handle_query.
16548 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
16549 * target.h (target_ops): Add qxfer_spu.
16550
374c1d38
UW
165512007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
16552
16553 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
16554 accessing non-seekable spufs files.
16555
bb63802a
UW
165562007-05-16 Markus Deuling <deuling@de.ibm.com>
16557
889bf7c5 16558 * server.c (handle_query): Add reply for qC packet.
bb63802a 16559
7390519e
PA
165602007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16561 Leo Zayas <lerele@champenstudios@com>
16562
16563 * server.h (check_remote_input_interrupt_request): New function.
16564 * remote_utils.c (INVALID_DESCRIPTOR): New define.
16565 (remote_desc): Initialize with INVALID_DESCRIPTOR.
16566 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
16567 (check_remote_input_interrupt_request): New function.
16568 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 16569 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
16570 winapi_GenerateConsoleCtrlEvent): New typedefs.
16571 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
16572 to 250 ms.
16573 (win32_wait): Check for remote interrupt request
16574 with check_remote_input_interrupt_request.
16575 (win32_request_interrupt): New function.
16576 (win32_target_op): Set request_interrupt to win32_request_interrupt.
16577
34b34921
PA
165782007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16579
16580 * win32-low.c (debug_registers_changed,
16581 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
16582 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
16583 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
16584 (thread_rec): Get context using the low target.
16585 (child_add_thread): Call thread_added on the low target,
16586 which does the same thing.
16587 (regptr): Delete.
16588 (do_initial_child_stuff): Remove debug registers references.
16589 Set context using the low target. Resume threads after
16590 setting the contexts.
16591 (child_continue): Remove dead variable. Remove debug
16592 registers references.
16593 (child_fetch_inferior_registers): Go through the low target.
16594 (do_child_store_inferior_registers): Remove.
16595 (child_store_inferior_registers): Go through the low target.
16596 (win32_resume): Remove debug registers references.
16597 Set context using the low target.
16598 (handle_exception): Change return type to void. Don't record
16599 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
16600 first chance exception.
889bf7c5 16601 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
16602 goto loop. Always return after waiting for debug event.
16603 (win32_wait): Convert to switch statement. Handle spurious
16604 events.
16605
16606 * win32-i386-low.c (debug_registers_changed,
16607 debug_registers_used): New.
16608 (initial_stuff): Rename to ...
16609 (i386_initial_stuff): ... this. Clear debug registers
16610 state variables.
16611 (store_debug_registers): Delete.
16612 (i386_get_thread_context): New.
16613 (load_debug_registers): Delete.
16614 (i386_set_thread_context): New.
16615 (i386_thread_added): New.
16616 (single_step): Rename to ...
16617 (i386_single_step): ... this.
16618 (do_fetch_inferior_registers): Rename to ...
16619 (i386_fetch_inferior_register): ... this.
16620 (i386_store_inferior_register): New.
16621 (the_low_target): Adapt to new interface.
16622
16623 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
16624 (arm_get_thread_context): New.
16625 (arm_set_thread_context): New.
16626 (regptr): New.
16627 (do_fetch_inferior_registers): Rename to ...
16628 (arm_fetch_inferior_register): ... this.
16629 (arm_store_inferior_register): New.
16630 (arm_wince_breakpoint): Reimplement as unsigned long.
16631 (arm_wince_breakpoint_len): Define.
16632 (the_low_target): Adapt to new interface.
16633
16634 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
16635 load_debug_registers. Add get_thread_context, set_thread_context,
16636 thread_added and store_inferior_register. Rename
16637 fetch_inferior_registers to fetch_inferior_register.
16638 (regptr): Remove declaration.
16639
dd6953e1
PA
166402007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16641
16642 * linux-low.c (linux_detach): Change return type to int. Return 0.
16643 * spu-low.c (spu_detach): Likewise.
16644
444d6139
PA
166452007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16646
16647 * target.h (target_ops): Change return type of detach to int.
16648 Add join.
16649 (join_inferior): New.
16650 * server.c (main): Don't skip detach support on mingw32.
16651 If the inferior doesn't support detaching return error.
16652 Call join_inferior instead of using waitpid.
16653 * linux-low.c (linux_join): New.
16654 (linux_target_op): Add linux_join.
16655 * spu-low.c (spu_join): New.
16656 (spu_target_ops): Add spu_join.
16657 * win32-low.c (win32_detach): Adapt to new interface.
16658 Reopen current_process_handle before detaching. Issue a child
16659 resume before detaching.
16660 (win32_join): New.
16661 (win32_target_op): Add win32_join.
16662
1d5315fe
PA
166632007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16664
16665 * win32-low.c (win32-attach): Fix return value.
16666 * target.h (target_ops): Describe ATTACH return values.
16667
bf914831
PA
166682007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16669
16670 * win32-low.c (GETPROCADDRESS): Define.
16671 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
16672 (winapi_DebugSetProcessKillOnExit): Likewise.
16673 (win32_create_inferior): Force usage of ansi CreateProcessA.
16674 (win32_attach): Use GETPROCADDRESS.
16675 (win32_detach): Likewise.
16676
f72f3e60
PA
166772007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16678
16679 * win32-low.c (win32_wait): Don't use WSTOPSIG.
16680
ed50f18f
PA
166812007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
16682
16683 * win32-low.c: Commit leftover changes from 2007-03-29.
16684
0c2ead7e
DJ
166852007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
16686
16687 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
16688 fields short instead of int. Add explicit padding.
16689 (i387_cache_to_fsave): Remove unnecessary casts.
16690 (i387_fsave_to_cache): Doc fix.
16691 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
16692
73725ff3
DJ
166932007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
16694
16695 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
16696 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
16697
d99f33d8
PA
166982007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
16699
16700 * configure.srv (arm*-*-mingw32ce*): Move near the other
16701 arm targets.
16702
68070c10
PA
167032007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
16704
2482afc6 16705 * configure.ac: Add errno checking.
68070c10
PA
16706 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
16707 sys/file.h and malloc.h.
16708 (AC_CHECK_DECLS): Add perror.
16709 (srv_mingwce): Handle.
2482afc6 16710 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
16711 win32-i386-low.o to srv_tgtobj.
16712 (i[34567]86-*-mingw*): Likewise.
16713 (arm*-*-mingw32ce*): Add case.
16714 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
16715 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
16716 [__MINGW32CE__] (strerror): New function.
16717 [__MINGW32CE__] (errno): Define to GetLastError.
16718 [__MINGW32CE__] (COUNTOF): New macro.
16719 (remote_open): Remove extra close call.
16720 * mem-break.c (delete_breakpoint_at): New function.
16721 * mem-break.h (delete_breakpoint_at): Declare.
16722 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
16723 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
16724 [USE_WIN32API] (read, write): Add char* casts.
16725 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
16726 * server.h: Include wincecompat.h on Windows CE.
16727 [HAVE_ERRNO_H]: Check.
16728 (perror): Declare if not declared.
16729 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
16730 (perror_with_name): Remove errno declaration.
16731 * wincecompat.h: New.
16732 * wincecompat.c: New.
16733 * win32-low.h: New.
16734 * win32-arm-low.c: New.
16735 * win32-i386-low.c: New.
16736 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
16737 (OUTMSG2): Make it safe.
16738 (_T): New macro.
16739 (COUNTOF): New macro.
16740 (NUM_REGS): Get it from the low target.
16741 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
16742 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
16743 (thread_rec): Let low target handle debug registers.
16744 (child_add_thread): Likewise.
16745 (child_init_thread_list): Likewise.
16746 (continue_one_thread): Likewise.
16747 (regptr): New.
16748 (do_child_fetch_inferior_registers): Move to ...
16749 * win32-i386-low.c: ... here, and rename to ...
16750 (do_fetch_inferior_registers): ... this.
889bf7c5 16751 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
16752 Go through the low target.
16753 (do_child_store_inferior_registers): Use regptr.
16754 (strwinerror): New function.
16755 (win32_create_inferior): Handle Windows CE.
16756 Use strwinerror instead of strerror on Windows error
16757 codes. Add program to the error output.
16758 Don't close the main thread handle on Windows CE.
16759 (win32_attach): Use coredll.dll on Windows CE.
16760 (win32_kill): Close current process and current
16761 thread handles.
16762 (win32_detach): Use coredll.dll on Windows CE.
16763 (win32_resume): Let low target handle debug registers, and
16764 step request.
16765 (handle_exception): Add/Remove initial breakpoint. Avoid
16766 non-existant WSTOPSIG on Windows CE.
16767 (win32_read_inferior_memory): Cast to remove warning.
16768 (win32_arch_string): Go through the low target.
16769 (initialize_low): Call set_breakpoint_data with the low
16770 target's breakpoint.
16771 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
16772 FOP_REGNUM, mappings): Move to ...
16773 * win32-i386-low.c: ... here.
16774 * win32-low.c (win32_thread_info): Move to ...
16775 * win32-low.h: ... here.
16776 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
16777 win32-arm-low.c and wincecompat.c.
16778 (all:): Add $EXEEXT.
16779 (install-only:): Likewise.
16780 (gdbserver:): Likewise.
16781 (gdbreplay:): Likewise.
16782 * config.in: Regenerate.
16783 * configure: Regenerate.
16784
41093d81
PA
167852007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
16786
16787 * win32-low.c: Rename typedef thread_info to
16788 win32_thread_info throughout.
16789
544afa54
PA
167902007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
16791
16792 * win32-i386-low.c: Rename to ...
16793 * win32-low.c: ... this.
16794 * configure.srv: Replace win32-i386-low.o with win32-low.o.
16795 * Makefile.in: Likewise.
16796
bce7165d
PA
167972007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
16798
16799 * remote-utils.c (monitor_output): Constify msg parameter.
16800 * server.h (monitor_output): Likewise.
16801 * win32-i386-low.c (handle_output_debug_string): New.
16802 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
16803 handle_output_debug_string.
16804 (get_child_debug_event): Likewise.
16805
506c7aa0
DJ
168062007-03-27 Mat Hostetter <mat@lcs.mit.edu>
16807
16808 * server.c (main): Correct strtoul check.
16809
42c81e2a
DJ
168102007-03-27 Jon Ringle <jon@ringle.org>
16811
16812 * linux-low.c: Check __ARCH_HAS_MMU__ also.
16813
9453113a
DJ
168142007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
16815
16816 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
16817
64a69107
DJ
168182007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
16819
16820 * terminal.h: Check HAVE_SGTTY_H.
16821
168222007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
16823
16824 * remote-utils.c (remote_open): Print out the assigned port number.
16825
c74d0ad8
DJ
168262007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
16827
16828 * remote-utils.c (monitor_output): New function.
16829 * server.c (debug_threads): Define here.
16830 (monitor_show_help): New function.
16831 (handle_query): Handle qRcmd.
16832 (main): Do not handle 'd' packet.
16833 * server.h (debug_threads, remote_debug, monitor_output): Declare.
16834 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
16835 of debug_threads.
16836
de7c3b4a
PA
168372007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
16838
16839 * Makefile.in (EXEEXT): New.
16840 (clean): Use $(EXEEXT).
16841
ef57601b
PA
168422007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
16843
16844 * target.h (target_ops): Rename send_signal to request_interrupt,
16845 and remove enum target_signal parameter.
16846 * linux-low.c (linux_request_interrupt): Rename from
16847 linux_send_signal, and always send SIGINT.
16848 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
16849 and always send SIGINT.
16850 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
16851 of send_signal.
16852 (input_interrupt): Likewise.
16853
820f2bda
PA
168542007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
16855
16856 * server.c (get_features_xml): Check if target implemented
16857 arch_string.
16858 * win32-i386-low.c (win32_arch_string): New.
16859 (win32_target_ops): Add win32_arch_string as arch_string member.
16860
ab39bf24
UW
168612007-02-22 Markus Deuling <deuling@de.ibm.com>
16862
16863 * spu-low.c (spu_arch_string): New.
16864 (spu_target_ops): Add spu_arch_string.
16865
61ff6e04
DJ
168662007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
16867
16868 * remote-utils.c: Remove HAVE_TERMINAL_H check.
16869 * configure.ac: Do not check for terminal.h.
16870 * configure, config.in: Regenerated.
16871
fb1e4ffc
DJ
168722007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
16873
16874 * Makefile.in (OBS): Add $(XML_BUILTIN).
16875 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
16876 (clean): Update.
16877 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
16878 (arm-with-iwmmxt.c): New.
16879 * config.in, configure: Regenerate.
16880 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
16881 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
16882 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
16883 (arm*-*-linux*): Add iWMMXt and regset support.
16884 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
16885 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
16886 (arm_store_wmmxregset, target_regsets): New.
16887 * server.c (get_features_xml): Take annex argument. Check builtin
16888 XML documents.
16889 (handle_query): Handle multiple annexes.
16890
0f48aa01
DJ
168912007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
16892
16893 * remote-utils.c [USE_WIN32API] (read, write): Define.
16894 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
16895 write.
16896
23181151
DJ
168972007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
16898
16899 * linux-i386-low.c (the_low_target): Set arch_string.
16900 * linux-x86-64-low.c (the_low_target): Likewise.
16901 * linux-low.c (linux_arch_string): New.
16902 (linux_target_ops): Add it.
16903 * linux-low.h (struct linux_target_ops): Add arch_string.
16904 * server.c (write_qxfer_response): Use const void * for DATA.
16905 (get_features_xml): New.
16906 (handle_query): Handle qXfer:features:read. Report it for qSupported.
16907 * target.h (struct target_ops): Add arch_string method.
16908
9d606399
DJ
169092007-01-03 Denis Pilat <denis.pilat@st.com>
16910 Daniel Jacobowitz <dan@codesourcery.com>
16911
16912 * linux-low.c (linux_kill): Handle being called with no threads.
16913 * win32-i386-low.c (win32_kill): Likewise.
16914 (get_child_debug_event): Clear current_process_handle.
16915
169162006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
16917 Daniel Jacobowitz <dan@codesourcery.com>
16918
16919 * remote-utils.c (remote_open): Check the type of specified
16920 serial port devices before opening them.
16921 * server.c (main): Kill the inferior if an error occurs during
16922 the first remote_open.
16923
a5e13d24
DJ
169242006-12-05 Markus Deuling <deuling@de.ibm.com>
16925
16926 * README: Update supported targets.
16927
186947f7
DJ
169282006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
16929
16930 * Makefile.in (clean): Remove reg-mips64.c.
16931 (reg-mips64.c, reg-mips64.o): New rules.
16932 * configure.srv: Handle mips64. Include regset support for mips.
16933 * linux-mips-low.c (union mips_register): New.
16934 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
16935 (mips_breakpoint, mips_breakpoint_at): Use int.
16936 (mips_collect_register, mips_supply_register)
16937 (mips_collect_register_32bit, mips_supply_register_32bit)
16938 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
16939 (mips_store_fpregset, target_regsets): New.
16940 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
16941
a13e2c95
UW
169422006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
16943
16944 * configure.srv: Add target "spu*-*-*".
16945 * Makefile.in (clean): Remove reg-spu.c.
16946 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
16947 * spu-low.c: New file.
16948
cb7283db
DJ
169492006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
16950
16951 * configure.ac: Correct td_thr_tls_get_addr test.
16952 * configure: Regenerated.
16953
89be2091
DJ
169542006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
16955
16956 * linux-low.c (linux_wait_for_event): Reformat. Use the
16957 pass_signals array.
16958 * remote-utils.c (decode_address_to_semicolon): New.
16959 * server.c (pass_signals, handle_general_set): New.
16960 (handle_query): Mention QPassSignals for qSupported.
16961 (main): Call handle_general_set.
16962 * server.h (pass_signals, decode_address_to_semicolon): New.
16963
000ef4f0
DJ
169642006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
16965
16966 * server.c (handle_query): Correct error handling for read_auxv.
16967
b7149293
UW
169682005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
16969
16970 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
16971 and srv_linux_thread_db to yes.
16972 * linux-s390-low.c (s390_fill_gregset): New function.
16973 (target_regsets): Define data structure.
16974
dae5f5cf
DJ
169752006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
16976
16977 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
16978 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
16979 * config.in, configure: Regenerated.
16980 * inferiors.c (gdb_id_to_thread): New function.
16981 (gdb_id_to_thread_id): Use it.
16982 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
16983 * linux-low.h (struct process_info): Add th member.
16984 (thread_db_get_tls_address): New prototype.
16985 * remote-utils.c (decode_address): Make non-static.
16986 * server.c (handle_query): Handle qGetTLSAddr.
16987 * server.h (gdb_id_to_thread, decode_address): New prototypes.
16988 * target.h (struct target_ops): Add get_tls_address.
16989 * thread-db.c (maybe_attach_thread): Save the thread handle.
16990 (thread_db_get_tls_address): New.
16991
32ca6d61
DJ
169922006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
16993
16994 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
16995 (linux_resume_one_process): Take a siginfo_t *. Update all
16996 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
16997 (struct pending_signals): Add a siginfo_t.
16998 (linux_wait_for_process): Always set last_status.
16999 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
17000 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
17001 * linux-low.h (struct process_info): Add last_status.
17002
5ffff7c1
DJ
170032006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
17004
17005 * remote-utils.c (try_rle): New function.
17006 (putpkt_binary): Use it.
17007
8695c747
DJ
170082006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
17009
17010 * Makefile.in (clean): Clean reg-x86-64-linux.c.
17011 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
17012 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
17013 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
17014 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
17015 point registers.
17016
290fadea
RS
170172006-08-08 Richard Sandiford <richard@codesourcery.com>
17018
17019 * server.c (terminal_fd): New variable.
17020 (old_foreground_pgrp): Likewise.
17021 (restore_old_foreground_pgrp): New function.
17022 (start_inferior): Record the terminal file descriptor in terminal_fd
17023 and its original foreground group in old_foreground_pgrp. Register
17024 restore_old_foreground_pgrp with atexit().
17025
9f2e1e63
DJ
170262006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
17027
17028 * server.c (handle_query): Correct qPart to qXfer.
17029
b80864fb
DJ
170302006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
17031
17032 * configure.ac: Check for more headers which are missing on
17033 Windows. Automatically supply -lwsock32 and USE_WIN32API.
17034 * configure.srv: Add Cygwin and mingw32.
17035 * remote-utils.c: Don't include headers unconditionally which
17036 are missing on mingw32. Include <winsock.h> for mingw32.
17037 (remote_open): Adjust for mingw32 support. Flush
17038 standard error after writing to it.
17039 (remote_close, putpkt_binary, input_interrupt, block_async_io)
17040 (unblock_async_io, enable_async_io, disable_async_io)
17041 (readchar, getpkt): Update for Winsock support.
17042 (prepare_resume_reply): Expect a protocol signal number.
17043 * server.c: Disable <sys/wait.h> on mingw32.
17044 (start_inferior): Adjust for mingw32 support. Flush
17045 standard error after writing to it.
17046 (attach_inferior): Likewise. Use protocol signal
17047 numbers.
17048 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
17049 and names.
17050 * win32-i386-low.c: New file.
17051 * Makefile.in (XM_CLIBS): Set.
17052 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
17053 (win32-i386-low.o): New dependency rule.
17054 * linux-low.c (linux_wait): Use target signal numbers.
17055 * target.h (struct target_ops): Doc fix.
17056 * server.h (target_signal_to_name): New prototype.
17057 * gdbreplay.c: Don't include headers unconditionally which
17058 are missing on mingw32. Include <winsock.h> for mingw32.
17059 (remote_close, remote_open): Adjust for Winsock support.
17060 * configure, config.in: Regenerated.
17061
0876f84a
DJ
170622006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
17063
17064 * server.c (decode_xfer_read, write_qxfer_response): New.
17065 (handle_query): Take a packet length argument. Handle
17066 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
17067 the qSupported response.
17068 (main): Update call to handle_query.
17069
01f9e8fa
DJ
170702006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
17071
17072 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
17073 (putpkt_binary): Renamed from putpkt and adjusted for binary
17074 data.
17075 (putpkt): New wrapper for putpkt_binary.
17076 (readchar): Don't mask off the high bit.
17077 (decode_X_packet): New function.
17078 * server.c (main): Call putpkt_binary if a handler sets the packet
17079 length. Save the length of the incoming packet. Handle 'X'.
17080 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
17081
be2a5f71
DJ
170822006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
17083
17084 * server.c (handle_query): Handle qSupported.
17085
ea025f5f
DJ
170862006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
17087
17088 * remote-utils.c (all_symbols_looked_up): New variable.
17089 (look_up_one_symbol): Check it.
17090 * server.h (look_up_one_symbol): New declaration.
17091 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
17092
9308fc88
DJ
170932006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
17094
17095 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 17096 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
17097 (PTRACE_GET_THREAD_AREA): Define.
17098 (ps_get_thread_area): New function.
17099
52fb6437
NS
171002006-05-09 Nathan Sidwell <nathan@codesourcery.com>
17101
17102 * configure.srv (m68k*-*-uclinux*): New target.
17103 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
17104 (linux_resume_one_process): Remove extraneous cast.
17105 (linux_read_offsets): New.
17106 (linux_target_op): Add linux_read_offsets on mmuless systems.
17107 * server.c (handle_query): Add qOffsets logic.
17108 * target.h (struct target_ops): Add read_offsets.
17109
21b0f40c
DJ
171102006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
17111
17112 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
17113 (PTRACE_GET_THREAD_AREA): Define.
17114 (ps_get_thread_area): New function.
17115 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
17116 (linux-x86-64-low.o): Update.
17117
0050a760
DJ
171182006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
17119
17120 * configure.ac: Remove checks for prfpregset_t.
17121 * gdb_proc_service.h: New file.
17122 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
17123 new "gdb_proc_service.h".
17124 * proc-service.c: Likewise.
17125 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
17126 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
17127 * Makefile.in (gdb_proc_service_h): Updated.
17128 * configure, config.in: Regenerated.
17129
b92a518e
DJ
171302006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
17131
17132 * remote-utils.c (prepare_resume_reply): Move declaration
17133 of gdb_id_from_wait to the top of the block.
17134
545587ee
DJ
171352006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
17136
17137 * linux-low.c (regsets_store_inferior_registers): Read the regset
17138 from the target before filling it.
17139
9db87ebd
DJ
171402006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
17141
17142 * server.c (attach_inferior): Return SIGTRAP for a successful
17143 attach.
17144
dd24457d
DJ
171452006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
17146
17147 * Makefile.in (OBS): Add version.o.
17148 (STAGESTUFF): Delete.
17149 (version.o): Add dependencies.
17150 (version.c): Replace rule.
17151 (clean): Remove version.c.
17152 * server.c (gdbserver_version): New.
17153 (gdbserver_usage): Use printf.
17154 (main): Handle --version and --help.
17155 * server.h (version, host_name): Add declarations.
17156
6f0f660e
EZ
171572005-12-23 Eli Zaretskii <eliz@gnu.org>
17158
889bf7c5
PA
17159 * linux-arm-low.c:
17160 * linux-arm-low.c:
17161 * inferiors.c:
17162 * i387-fp.h:
17163 * i387-fp.c:
17164 * gdbreplay.c:
17165 * regcache.c:
17166 * proc-service.c:
17167 * mem-break.h:
17168 * mem-break.c:
17169 * linux-x86-64-low.c:
17170 * linux-sh-low.c:
17171 * linux-s390-low.c:
17172 * linux-ppc64-low.c:
17173 * linux-ppc-low.c:
17174 * linux-mips-low.c:
17175 * linux-m68k-low.c:
17176 * linux-m32r-low.c:
17177 * linux-low.h:
17178 * linux-low.c:
17179 * linux-ia64-low.c:
17180 * linux-i386-low.c:
17181 * linux-crisv32-low.c:
17182 * thread-db.c:
17183 * terminal.h:
17184 * target.h:
17185 * target.c:
17186 * server.h:
17187 * server.c:
17188 * remote-utils.c:
17189 * regcache.h:
17190 * utils.c:
17191 * Makefile.in:
17192 * configure.ac:
6f0f660e
EZ
17193 * gdbserver.1: Add (C) after Copyright. Update the FSF
17194 address.
17195
9d1fb177
DJ
171962005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
17197
17198 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
17199 (arm_breakpoint_at): Recognize both breakpoints.
17200 (the_low_target): Use the correct breakpoint instruction.
17201
011a70c2
DJ
172022005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
17203
17204 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
17205 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
17206 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
17207 (the_low_target): Update.
17208
7fb85e41
AS
172092005-10-25 Andreas Schwab <schwab@suse.de>
17210
17211 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
17212
17213 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
17214 (ia64_num_regs): Reduce to 462.
17215
3db0444b
DJ
172162005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
17217
17218 * acinclude.m4: Correct quoting.
17219 * aclocal.m4: Regenerated.
17220
17221 Suggested by SZOKOVACS Robert <szo@ies.hu>:
17222 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
17223 (thread_db_init): Call thread_db_err_str.
17224 * configure.ac: Check for TD_VERSION.
17225 * config.in, configure: Regenerated.
17226
bee0189a
DJ
172272005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
17228
17229 * server.h (error, fatal, warning): Add ATTR_FORMAT.
17230
e9d25b98
DJ
172312005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
17232
17233 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
17234 is not available. Define HAVE_PTRACE_GETREGS if it is.
17235 * config.in, configure: Regenerated.
17236 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
17237 * linux-i386-low.c, linux-m68k-low.c: Update to use
17238 HAVE_PTRACE_GETREGS.
17239 * linux-low.c (regsets_fetch_inferior_registers)
17240 (regsets_store_inferior_registers): Only return 0 if we processed
17241 GENERAL_REGS.
17242 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
17243 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
17244
a06660f7
DJ
172452005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
17246
17247 * inferiors.c (struct thread_info): Add gdb_id.
17248 (add_thread): Add gdb_id argument.
17249 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
17250 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
17251 calls to add_thread.
17252 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
17253 * server.c (handle_query): Use thread_to_gdb_id.
17254 (handle_v_cont, main): Use gdb_id_to_thread_id.
17255 * server.h (add_thread): Update prototype.
17256 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
17257 prototypes.
17258
5a1f5858
DJ
172592005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
17260
17261 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
17262 left-padded registers.
17263 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
17264 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
17265
e122f1f5
SE
172662005-07-01 Steve Ellcey <sje@cup.hp.com>
17267
17268 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
17269 * configure: Regenerate.
17270 * config.in: Regenerate.
17271 * server.h (NEED_DECLARATION_STRERROR):
17272 Replace with !HAVE_DECL_STRERROR.
17273
d592fa2f
DJ
172742005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
17275
17276 * linux-low.c (linux_wait, linux_send_signal): Don't test
17277 an unsigned long variable for > 0 if it could be MAX_ULONG.
17278 * server.c (myresume): Likewise.
17279 * target.c (set_desired_inferior): Likewise.
17280
ccbd4912
MK
172812005-06-13 Mark Kettenis <kettenis@gnu.org>
17282
17283 * configure.ac: Simplify and improve check for socklen_t.
17284 * configure, config.in: Regenerate.
17285
f450004a
DJ
172862005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
17287
17288 * acconfig.h: Remove.
17289 * configure.ac: Add a test for socklen_t. Use three-argument
17290 AC_DEFINE throughout.
17291 * config.in: Regenerated using autoheader 2.59.
17292 * configure: Regenerated.
17293
17294 * gdbreplay.c (socklen_t): Provide a default.
17295 (remote_open): Use socklen_t.
17296 * remote-utils.c (socklen_t): Provide a default.
17297 (remote_open): Use socklen_t.
17298 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
17299 unsigned char.
17300
17301 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
17302 char for buffers.
17303 * linux-low.c (linux_read_memory, linux_write_memory)
17304 (linux_read_auxv): Likewise.
17305 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
17306 (check_mem_write): Likewise.
17307 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
17308 Likewise.
17309 * regcache.c (struct inferior_rgcache_data, registers_to_string)
17310 (registers_from_string, register_data): Likewise.
17311 * server.c (handle_query, main): Likewise.
17312 * server.h (convert_ascii_to_int, convert_int_to_ascii)
17313 (decode_M_packet): Likewise.
17314 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
17315 * target.h (struct target_ops): Update read_memory, write_memory,
17316 and read_auxv.
17317 (read_inferior_memory, write_inferior_memory): Update.
17318 * linux-low.h (struct linux_target_ops): Change type of breakpoint
17319 to unsigned char *.
17320 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
17321 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
17322 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
17323 linux-s390-low.c, linux-sh-low.c: Update for changes in
17324 read_inferior_memory and the_low_target->breakpoint.
17325
eee84df1
DJ
173262005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
17327
17328 * Makefile.in (SFILES): Add linux-ppc64-low.c.
17329 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
17330 * configure.srv: Add powerpc64-*-linux*.
17331 * linux-ppc64-low.c: New file.
17332
45b134e5
OF
173332005-05-23 Orjan Friberg <orjanf@axis.com>
17334
17335 * linux-cris-low.c: New file with support for CRIS.
17336 * linux-crisv32-low.c: Ditto for CRISv32.
17337 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
17338 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 17339 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
17340 reg-crisv32.o, and reg-crisv32.c to make rules.
17341 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
17342 recognized targets.
17343
48d93c75
UW
173442005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
17345
17346 * linux-low.c (fetch_register): Ensure buffer size is a multiple
17347 of sizeof (PTRACE_XFER_TYPE).
17348 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
17349
e013ee27
OF
173502005-05-12 Orjan Friberg <orjanf@axis.com>
17351
889bf7c5 17352 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
17353 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
17354 pointers for hardware watchpoint support.
17355 * linux-low.h (struct linux_target_ops): Ditto.
17356 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
17357 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
17358 to linux_target_ops.
17359 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
17360 reply packet.
17361 * server.c (main): Recognize 'Z' and 'z' packets.
17362
b0ded00b
UW
173632005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
17364
17365 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
17366 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
17367 (the_low_target): Add new members.
17368
8643e2ad
DJ
173692005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
17370
17371 * proc-service.c (ps_lgetregs): Search all_processes instead of
17372 all_threads.
17373
fc620387
DJ
173742005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
17375
17376 * server.c (start_inferior): Change return type to int.
17377 (attach_inferior): Change sigptr to int *.
17378 (handle_v_cont, handle_v_requests): Change signal to int *.
17379 (main): Change signal to int.
17380
173812005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
17382
17383 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
17384 * configure.srv: Add m32r*-*-linux*.
17385 * linux-m32r-low.c: New file.
17386
e0e76420
DJ
173872005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
17388
17389 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
17390
a1928bad
DJ
173912005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
17392
17393 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
17394 Take unsigned long arguments for PIDs.
17395 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
17396 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
17397 (wait_for_sigstop, linux_resume_one_process)
17398 (regsets_fetch_inferior_registers, linux_send_signal)
17399 (linux_read_auxv): Likewise. Update the types of variables holding
17400 PIDs. Update format string specifiers.
17401 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
17402 * remote-utils.c (prepare_resume_reply): Likewise.
17403 * server.c (cont_thread, general_thread, step_thread)
17404 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
17405 unsigned long.
17406 (handle_query): Update format specifiers.
17407 (handle_v_cont, main): Use strtoul for thread IDs.
17408 * server.h (struct inferior_list_entry): Use unsigned long for ID.
17409 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
17410 (general_thread, step_thread, thread_from_wait)
17411 (old_thread_from_wait): Update.
17412 * target.h (struct thread_resume): Use unsigned long for THREAD.
17413 (struct target_ops): Use unsigned long for arguments to attach and
17414 thread_alive.
17415
dcdb98d2
DJ
174162005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
17417
17418 * acinclude.m4: Include bfd/bfd.m4 directly.
17419 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
17420 <agriffis@toolchain.org>.
17421 * aclocal.m4, configure: Regenerated.
17422
bec39cab
AC
174232005-01-07 Andrew Cagney <cagney@gnu.org>
17424
17425 * configure.ac: Rename configure.in, require autoconf 2.59.
17426 * configure: Re-generate.
17427
434c4c77
DJ
174282004-12-08 Daniel Jacobowitz <dan@debian.org>
17429
17430 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
17431 LIBS when finished.
17432 * aclocal.m4: Regenerated.
17433 * configure: Regenerated.
17434
db1d3e1b
AS
174352004-11-21 Andreas Schwab <schwab@suse.de>
17436
17437 * linux-m68k-low.c (m68k_num_gregs): Define.
17438 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
17439 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
17440 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
17441 (m68k_breakpoint_at): New. Add to the_low_target.
17442
17443 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
17444 srv_linux_thread_db to yes.
17445
43360365
JB
174462004-10-20 Joel Brobecker <brobecker@gnat.com>
17447
17448 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
17449 (ARCH_SET_FS): Likewise.
17450 (ARCH_GET_FS): Likewise.
17451 (ARCH_GET_GS): Likewise.
17452
fd500816
DJ
174532004-10-16 Daniel Jacobowitz <dan@debian.org>
17454
17455 * linux-i386-low.c (ps_get_thread_area): New.
17456 * linux-x86-64-low.c (ps_get_thread_area): New.
17457 * linux-low.c: Include <sys/syscall.h>.
17458 (linux_kill_one_process): Don't kill the first thread here.
17459 (linux_kill): Kill the first thread here.
17460 (kill_lwp): New function.
17461 (send_sigstop, linux_send_signal): Use it.
17462 * proc-service.c: Clean up #ifdefs.
17463 (fpregset_info): Delete.
17464 (ps_lgetregs): Update and enable implementation.
17465 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
17466 implementations.
17467 * remote-utils.c (struct sym_cache, symbol_cache): New.
17468 (input_interrupt): Print a clearer message.
17469 (async_io_enabled): New variable.
17470 (enable_async_io, disable_async_io): Use it. Update comments.
17471 (look_up_one_symbol): Use the symbol cache.
17472 * thread-db.c (thread_db_look_up_symbols): New function.
17473 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
17474
f6de3c42
DJ
174752004-10-16 Daniel Jacobowitz <dan@debian.org>
17476
17477 * configure.in: Test for -rdynamic.
17478 * configure: Regenerated.
17479 * Makefile (INTERNAL_LDFLAGS): New.
17480 (gdbserver, gdbreplay): Use it.
17481
2c0fc042
AC
174822004-09-02 Andrew Cagney <cagney@gnu.org>
17483
17484 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
17485
075b3282
DJ
174862004-03-23 Daniel Jacobowitz <drow@mvista.com>
17487
17488 * linux-low.c (linux_wait): Clear all_processes list also.
17489
fa6a77dc
DJ
174902004-03-12 Daniel Jacobowitz <drow@mvista.com>
17491
17492 * linux-low.c: Include <errno.h>. Remove extern declaration of
17493 errno.
17494
6d782a97
DJ
174952004-03-12 Daniel Jacobowitz <drow@mvista.com>
17496
17497 * gdbreplay.c, server.h, utils.c: Update copyright years.
17498
3a7fb99b
DJ
174992004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
17500
17501 * server.c (main): Print child status or termination signal from
17502 variable 'signal', not 'sig'.
17503
c3e735a6
DJ
175042004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
17505
17506 * linux-low.c (linux_read_memory): Change return type to
17507 int. Check for and return error from ptrace().
17508 * target.c (read_inferior_memory): Change return type to int. Pass
17509 back return status from the_target->read_memory().
17510 * target.h (struct target_ops): Adapt *read_memory() prototype.
17511 Update comment.
17512 (read_inferior_memory): Adapt prototype.
17513 * server.c (main): Return an error packet if
17514 read_inferior_memory() returns an error.
17515
a59d1c82
DJ
175162004-03-04 Daniel Jacobowitz <drow@mvista.com>
17517
17518 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
17519 Unify with other clean targets.
17520
dc3f8883
DJ
175212004-02-29 Daniel Jacobowitz <drow@mvista.com>
17522
17523 * server.c (handle_v_cont): Call set_desired_inferior.
17524
89a208da
DJ
175252004-02-29 Daniel Jacobowitz <drow@mvista.com>
17526
17527 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
17528
62ea82f5
DJ
175292004-02-29 Daniel Jacobowitz <drow@mvista.com>
17530
17531 * linux-low.c (linux_wait): Unblock async I/O.
17532 (linux_resume): Block and enable async I/O.
17533 * remote-utils.c (block_async_io, unblock_async_io): New functions.
17534 * server.h (block_async_io, unblock_async_io): Add prototypes.
17535
6910d122
DJ
175362004-02-29 Daniel Jacobowitz <drow@mvista.com>
17537
17538 * remote-utils.c (remote_open): Print a status notice after
17539 opening a TCP port.
17540 * server.c (attach_inferior): Print a status notice after
17541 attaching.
17542
175432004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
17544
17545 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
17546
c89dc5d4
DJ
175472004-02-26 Daniel Jacobowitz <drow@mvista.com>
17548
17549 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
17550 error packet.
17551 * server.c, target.h: Update copyright years.
17552
4b8dad4a
RM
175532004-02-25 Roland McGrath <roland@redhat.com>
17554
17555 * target.h (struct target_ops): New member `read_auxv'.
17556 * server.c (handle_query): Handle qPart:auxv:read: query using that.
17557 * linux-low.c (linux_read_auxv): New function.
17558 (linux_target_ops): Initialize `read_auxv' member to that.
17559
d7446758
JB
175602004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
17561
17562 Committed by Jim Blandy <jimb@redhat.com>.
17563
17564 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 17565 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
17566 instead of GPR_SIZE to distiguish s390 and s390x targets.
17567
5544ad89
DJ
175682004-01-31 Daniel Jacobowitz <drow@mvista.com>
17569
17570 * linux-low.c: Update copyright year.
17571 (check_removed_breakpoint): Clear pending_is_breakpoint.
17572 (linux_set_resume_request, linux_queue_one_thread)
17573 (resume_status_pending_p): New functions.
17574 (linux_continue_one_thread): Use process->resume.
17575 (linux_resume): Only resume threads if there are no pending events.
17576 * linux-low.h (struct process_info): Add resume request
17577 pointer.
17578
2a68b70e
DJ
175792004-01-30 Daniel Jacobowitz <drow@mvista.com>
17580
17581 * regcache.c (new_register_cache): Clear the allocated register
17582 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
17583
64386c31
DJ
175842003-10-13 Daniel Jacobowitz <drow@mvista.com>
17585
17586 * linux-low.c (linux_resume): Take a struct thread_resume *
17587 argument.
17588 (linux_wait): Update call.
17589 (resume_ptr): New static variable.
17590 (linux_continue_one_thread): Renamed from
17591 linux_continue_one_process. Use resume_ptr.
17592 (linux_resume): Use linux_continue_one_thread.
17593 * server.c (handle_v_cont, handle_v_requests): New functions.
17594 (myresume): New function.
17595 (main): Handle 'v' case.
17596 * target.h (struct thread_resume): New type.
17597 (struct target_ops): Change argument of "resume" to struct
17598 thread_resume *.
17599 (myresume): Delete macro.
17600
c938e9b0
L
176012003-08-08 H.J. Lu <hongjiu.lu@intel.com>
17602
17603 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
17604 (uninstall): Support DESTDIR.
17605
7f313d07
BC
17606Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
17607
17608 * configure.srv: Add xscale*linux copy of arm*linux entry.
17609
3b2fc2ea
DJ
176102003-07-24 Daniel Jacobowitz <drow@mvista.com>
17611
17612 * linux-arm-low.c (arm_reinsert_addr): New function.
17613 (the_low_target): Add arm_reinsert_addr.
17614
1c0a559e
MK
176152003-07-08 Mark Kettenis <kettenis@gnu.org>
17616
17617 * mem-break.c: Remove whitespace at end of file.
17618
43d5792c
DJ
176192003-06-28 Daniel Jacobowitz <drow@mvista.com>
17620
17621 * configure.in: Check whether we need to prototype strerror.
17622 * server.h: Optionally prototype strerror.
17623 * gdbreplay.c (perror_with_name): Use strerror.
17624 * linux-low.c (linux_attach_lwp): Use strerror.
17625 * utils.c (perror_with_name): Use strerror.
17626 * config.in, configure: Regenerated.
17627
c8a86edf
DJ
176282003-06-28 Daniel Jacobowitz <drow@mvista.com>
17629
17630 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
17631 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
17632
73d37363
DJ
176332003-06-20 Daniel Jacobowitz <drow@mvista.com>
17634
17635 * Makefile.in (SFILES): Update.
17636 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
17637 low-sun3.c: Remove files.
17638
6ad8ae5c
DJ
176392003-06-17 Daniel Jacobowitz <drow@mvista.com>
17640
17641 * linux-low.c: Move comment to linux_thread_alive where it belonged.
17642 (linux_detach_one_process, linux_detach): New functions.
17643 (linux_target_ops): Add linux_detach.
17644 * server.c (main): Handle 'D' packet.
17645 * target.h (struct target_ops): Add "detach" member.
17646 (detach_inferior): Define.
17647
1581182a
MK
176482003-06-13 Mark Kettenis <kettenis@gnu.org>
17649
17650 From Kelley Cook <kelleycook@wideopenwest.com>:
17651 * configure.srv: Accept i[34567]86 variants.
17652
e5379b03
DJ
176532003-06-05 Daniel Jacobowitz <drow@mvista.com>
17654
17655 * linux-low.c (linux_wait_for_event): Correct comment typos.
17656 (linux_resume_one_process): Call check_removed_breakpoint.
17657 (linux_send_signal): New function.
17658 (linux_target_ops): Add linux_send_signal.
17659 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
17660 of kill.
17661 * target.h (struct target_ops): Add send_signal.
17662
2ff29de4
JB
176632003-05-29 Jim Blandy <jimb@redhat.com>
17664
17665 * linux-low.c (usr_store_inferior_registers): Transfer buf in
17666 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
17667 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
17668 away part of the register's value.
17669
254787d4
DJ
176702003-03-26 Daniel Jacobowitz <drow@mvista.com>
17671
17672 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
17673 (linux_wait_for_event, linux_init_signals): Likewise.
17674
94e10508
DJ
176752003-03-17 Daniel Jacobowitz <drow@mvista.com>
17676
17677 * configure.in: Check for stdlib.h.
17678 * configure: Regenerated.
17679 * config.in: Regenerated.
17680
4c0711e0
DJ
176812003-01-04 Andreas Schwab <schwab@suse.de>
17682
17683 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
17684
ef66e766
AC
176852003-01-02 Andrew Cagney <ac131313@redhat.com>
17686
17687 * Makefile.in: Remove obsolete code.
17688
a1358604
DJ
176892002-11-20 Daniel Jacobowitz <drow@mvista.com>
17690
17691 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
17692 defined(PT_FPR0_HI).
17693
23ce3b1c
DJ
176942002-11-17 Stuart Hughes <seh@zee2.com>
17695
17696 * linux-arm-low.c (arm_num_regs): Increase.
17697 (arm_regmap): Include status register.
17698
176992002-11-17 Daniel Jacobowitz <drow@mvista.com>
17700
17701 * linux-low.c (register_addr): Remove incorrect -1 check.
17702
a9fa9f7d
DJ
177032002-08-29 Daniel Jacobowitz <drow@mvista.com>
17704
17705 * linux-low.c (linux_create_inferior): Call setpgid. Return
17706 the new PID.
17707 (unstopped_p, linux_signal_pid): Remove.
17708 (linux_target_ops): Remove linux_signal_pid.
17709 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
17710 global instead of target method.
17711 * target.h (struct target_ops): Remove signal_pid. Update comment
17712 for create_inferior.
17713 * server.c (signal_pid): New variable.
17714 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 17715 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
17716 (attach_inferior): Set signal_pid.
17717
17574093
DJ
177182002-08-23 Daniel Jacobowitz <drow@mvista.com>
17719
17720 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
17721
177222002-08-20 Jim Blandy <jimb@redhat.com>
17723
17724 * Makefile.in (LDFLAGS): Allow the configure script to establish a
17725 default for this.
17726
177272002-08-01 Andrew Cagney <cagney@redhat.com>
17728
17729 * Makefile.in: Make chill references obsolete.
17730
177312002-07-24 Kevin Buettner <kevinb@redhat.com>
17732
17733 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
17734 * configure: Regenerate.
17735 * config.in: Regenerate.
17736
177372002-07-09 David O'Brien <obrien@FreeBSD.org>
17738
17739 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
17740 (perror_with_name, remote_close, remote_open, expect, play): Static.
17741
177422002-07-04 Michal Ludvig <mludvig@suse.cz>
17743
4b8dad4a 17744 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
17745 byte offsets instead of an array of indexes.
17746 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
17747
177482002-06-13 Daniel Jacobowitz <drow@mvista.com>
17749
17750 * regcache.c: Add comment.
17751
177522002-06-11 Daniel Jacobowitz <drow@mvista.com>
17753
17754 * thread-db.c: New file.
17755 * proc-service.c: New file.
17756 * acinclude.m4: New file.
17757 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
17758 proc-service.o, and thread-db.o.
17759 (linux-low.o): Add USE_THREAD_DB.
17760 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
17761 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
17762 * aclocal.m4: Regenerated.
17763 * config.in: Regenerated.
17764 * configure: Regenerated.
17765 * configure.in: Check for proc_service.h, sys/procfs.h,
17766 thread_db.h, and linux/elf.h headrs.
17767 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
17768 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
17769 Check for -lthread_db and thread support.
17770 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
17771 PowerPC, and SuperH.
17772 * i387-fp.c: Constify arguments.
17773 * i387-fp.h: Likewise.
17774 * inferiors.c: (struct thread_info): Renamed from
17775 `struct inferior_info'. Remove PID member. Use generic inferior
17776 list header. All uses updated.
17777 (inferiors, signal_pid): Removed.
17778 (all_threads): New variable.
17779 (get_thread): Define.
17780 (add_inferior_to_list): New function.
17781 (for_each_inferior): New function.
17782 (change_inferior_id): New function.
17783 (add_inferior): Removed.
17784 (remove_inferior): New function.
17785 (add_thread): New function.
17786 (free_one_thread): New function.
17787 (remove_thread): New function.
17788 (clear_inferiors): Use for_each_inferior and free_one_thread.
17789 (find_inferior): New function.
17790 (find_inferior_id): New function.
17791 (inferior_target_data): Update argument type.
17792 (set_inferior_target_data): Likewise.
17793 (inferior_regcache_data): Likewise.
17794 (set_inferior_regcache_data): Likewise.
17795 * linux-low.c (linux_bp_reinsert): Remove.
17796 (all_processes, stopping_threads, using_thrads)
17797 (struct pending_signals, debug_threads, pid_of): New.
17798 (inferior_pid): Replace with macro.
17799 (struct inferior_linux_data): Remove.
17800 (get_stop_pc, add_process): New functions.
17801 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
17802 Use add_process and add_thread.
17803 (linux_attach_lwp): New function, based on old linux_attach. Use
17804 add_process and add_thread. Set stop_expected for new threads.
17805 (linux_attach): New function.
17806 (linux_kill_one_process): New function.
17807 (linux_kill): Kill all LWPs.
17808 (linux_thread_alive): Use find_inferior_id.
17809 (check_removed_breakpoints, status_pending_p): New functions.
17810 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
17811 Update. Use WNOHANG. Wait for cloned processes also. Update process
17812 struct for the found process.
17813 (linux_wait_for_event): New function.
17814 (linux_wait): Use it. Support LWPs.
17815 (send_sigstop, wait_for_sigstop, stop_all_processes)
17816 (linux_resume_one_process, linux_continue_one_process): New functions.
17817 (linux_resume): Support LWPs.
17818 (REGISTER_RAW_SIZE): Remove.
17819 (fetch_register): Use register_size instead. Call supply_register.
17820 (usr_store_inferior_registers): Likewise. Call collect_register.
17821 Fix recursive case.
17822 (regsets_fetch_inferior_registers): Improve error message.
17823 (regsets_store_inferior_registers): Add debugging.
17824 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
17825 (unstopped_p, linux_signal_pid): New functions.
17826 (linux_target_ops): Add linux_signal_pid.
17827 (linux_init_signals): New function.
17828 (initialize_low): Call it. Initialize using_threads.
17829 * regcache.c (inferior_regcache_data): Add valid
17830 flag.
17831 (get_regcache): Fetch registers lazily. Add fetch argument
17832 and update all callers.
17833 (regcache_invalidate_one, regcache_invalidate): New
17834 functions.
17835 (new_register_cache): Renamed from create_register_cache.
17836 Return the new regcache.
17837 (free_register_cache): Change argument to a void *.
17838 (registers_to_string, registers_from_string): Call get_regcache
17839 with fetch flag set.
17840 (register_data): Make static. Pass fetch flag to get_regcache.
17841 (supply_register): Call get_regcache with fetch flag clear.
17842 (collect_register): Call get_regcache with fetch flag set.
17843 (collect_register_as_string): New function.
17844 * regcache.h: Update.
17845 * remote-utils.c (putpkt): Flush after debug output and use
17846 stderr.
17847 Handle input interrupts while waiting for an ACK.
17848 (input_interrupt): Use signal_pid method.
17849 (getpkt): Flush after debug output and use stderr.
17850 (outreg): Use collect_register_as_string.
17851 (new_thread_notify, dead_thread_notify): New functions.
17852 (prepare_resume_reply): Check using_threads. Set thread_from_wait
17853 and general_thread.
17854 (look_up_one_symbol): Flush after debug output.
17855 * server.c (step_thread, server_waiting): New variables.
17856 (start_inferior): Don't use signal_pid. Update call to mywait.
17857 (attach_inferior): Update call to mywait.
17858 (handle_query): Handle qfThreadInfo and qsThreadInfo.
17859 (main): Don't fetch/store registers explicitly. Use
17860 set_desired_inferior. Support proposed ``Hs'' packet. Update
17861 calls to mywait.
17862 * server.h: Update.
17863 (struct inferior_list, struct_inferior_list_entry): New.
17864 * target.c (set_desired_inferior): New.
17865 (write_inferior_memory): Constify.
17866 (mywait): New function.
17867 * target.h: Update.
17868 (struct target_ops): New signal_pid method.
17869 (mywait): Removed macro, added prototype.
17870
17871 * linux-low.h (regset_func): Removed.
17872 (regset_fill_func, regset_store_func): New.
17873 (enum regset_type): New.
17874 (struct regset_info): Add type field. Use new operation types.
17875 (struct linux_target_ops): stop_pc renamed to get_pc.
17876 Add decr_pc_after_break and breakpoint_at.
17877 (get_process, get_thread_proess, get_process_thread)
17878 (strut process_info, all_processes, linux_attach_lwp)
17879 (thread_db_init): New.
17880
17881 * linux-arm-low.c (arm_get_pc, arm_set_pc,
17882 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
17883 (the_low_target): Add new members.
17884 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
17885 (i386_store_fpxregset): Constify.
17886 (target_regsets): Add new kind identifier.
17887 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
17888 (i386_set_pc): Add debugging.
17889 (i386_breakpoint_at): New function.
17890 (the_low_target): Add new members.
17891 * linux-mips-low.c (mips_get_pc, mips_set_pc)
17892 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
17893 (mips_breakpoint_at): New.
17894 (the_low_target): Add new members.
17895 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
17896 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
17897 (the_low_target): Add new members.
17898 * linux-sh-low.c (sh_get_pc, sh_set_pc)
17899 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
17900 (the_low_target): Add new members.
17901 * linux-x86-64-low.c (target_regsets): Add new kind
17902 identifier.
17903
179042002-05-15 Daniel Jacobowitz <drow@mvista.com>
17905
17906 From Martin Pool <mbp@samba.org>:
17907 * server.c (gdbserver_usage): New function.
17908 (main): Call it.
17909
179102002-05-14 Daniel Jacobowitz <drow@mvista.com>
17911
17912 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
17913 stop_at -> stop_pc.
17914
179152002-05-04 Andrew Cagney <ac131313@redhat.com>
17916
17917 * Makefile.in: Remove obsolete code.
17918
179192002-04-24 Michal Ludvig <mludvig@suse.cz>
17920
17921 * linux-low.c (regsets_fetch_inferior_registers),
17922 (regsets_store_inferior_registers): Removed cast to int from
17923 ptrace() calls.
17924 * regcache.h: Added declaration of struct inferior_info.
17925
179262002-04-20 Daniel Jacobowitz <drow@mvista.com>
17927
17928 * inferiors.c (struct inferior_info): Add regcache_data.
17929 (add_inferior): Call create_register_cache.
17930 (clear_inferiors): Call free_register_cache.
17931 (inferior_regcache_data, set_inferior_regcache_data): New functions.
17932 * regcache.c (struct inferior_regcache_data): New.
17933 (registers): Remove.
17934 (get_regcache): New function.
17935 (create_register_cache, free_register_cache): New functions.
17936 (set_register_cache): Don't initialize the register cache here.
17937 (registers_to_string, registers_from_string, register_data): Call
17938 get_regcache.
17939 * regcache.h: Add prototypes.
17940 * server.h: Likewise.
17941
179422002-04-20 Daniel Jacobowitz <drow@mvista.com>
17943
17944 * mem-break.c: New file.
17945 * mem-break.h: New file.
17946 * Makefile.in: Add mem-break.o rule; update server.h
17947 dependencies.
17948 * inferiors.c (struct inferior_info): Add target_data
17949 member.
17950 (clear_inferiors): Free target_data member if set.
17951 (inferior_target_data, set_inferior_target_data): New functions.
17952 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
17953 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
17954 * linux-low.c (linux_bp_reinsert): New variable.
17955 (struct inferior_linux_data): New.
17956 (linux_create_inferior): Use set_inferior_target_data.
17957 (linux_attach): Likewise. Call add_inferior.
17958 (linux_wait_for_one_inferior): New function.
17959 (linux_wait): Call it.
17960 (linux_write_memory): Add const.
17961 (initialize_low): Call set_breakpoint_data.
17962 * linux-low.h (struct linux_target_ops): Add breakpoint
17963 handling members.
17964 * server.c (attach_inferior): Remove extra add_inferior
17965 call.
17966 * server.h: Include mem-break.h. Update inferior.c
17967 prototypes.
17968 * target.c (read_inferior_memory)
17969 (write_inferior_memory): New functions.
17970 * target.h (read_inferior_memory)
17971 (write_inferior_memory): Change macros to prototypes.
17972 (struct target_ops): Update comments. Add const to write_memory
17973 definition.
17974
179752002-04-11 Daniel Jacobowitz <drow@mvista.com>
17976
17977 * linux-low.c (usr_store_inferior_registers): Support
17978 registers which are allowed to fail to store.
17979 * linux-low.h (linux_target_ops): Likewise.
17980 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
17981 (ppc_cannot_store_register): FPSCR may not be storable.
17982
179832002-04-09 Daniel Jacobowitz <drow@mvista.com>
17984
17985 * server.h: Include <string.h> if HAVE_STRING_H.
17986 * ChangeLog: Correct paths in last ChangeLog entry.
17987
179882002-04-09 Daniel Jacobowitz <drow@mvista.com>
17989
17990 * linux-low.h: Remove obsolete prototypes.
17991 (struct linux_target_ops): New.
17992 (extern the_low_target): New.
17993 * linux-low.c (num_regs, regmap): Remove declarations.
17994 (register_addr): Use the_low_target explicitly.
17995 (fetch_register): Likewise.
17996 (usr_fetch_inferior_registers): Likewise.
17997 (usr_store_inferior_registers): Likewise.
17998 * linux-arm-low.c (num_regs): Remove.
17999 (arm_num_regs): Define.
18000 (arm_regmap): Renamed from regmap, made static.
18001 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
18002 made static.
18003 (arm_cannot_store_register): Renamed from cannot_store_register,
18004 made static.
18005 (the_low_target): New.
18006 * linux-i386-low.c (num_regs): Remove.
18007 (i386_num_regs): Define.
18008 (i386_regmap): Renamed from regmap, made static.
18009 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
18010 made static.
18011 (i386_cannot_store_register): Renamed from cannot_store_register,
18012 made static.
18013 (the_low_target): New.
18014 * linux-ia64-low.c (num_regs): Remove.
18015 (ia64_num_regs): Define.
18016 (ia64_regmap): Renamed from regmap, made static.
18017 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
18018 made static.
18019 (ia64_cannot_store_register): Renamed from cannot_store_register,
18020 made static.
18021 (the_low_target): New.
18022 * linux-m68k-low.c (num_regs): Remove.
18023 (m68k_num_regs): Define.
18024 (m68k_regmap): Renamed from regmap, made static.
18025 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
18026 made static.
18027 (m68k_cannot_store_register): Renamed from cannot_store_register,
18028 made static.
18029 (the_low_target): New.
18030 * linux-mips-low.c (num_regs): Remove.
18031 (mips_num_regs): Define.
18032 (mips_regmap): Renamed from regmap, made static.
18033 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
18034 made static.
18035 (mips_cannot_store_register): Renamed from cannot_store_register,
18036 made static.
18037 (the_low_target): New.
18038 * linux-ppc-low.c (num_regs): Remove.
18039 (ppc_num_regs): Define.
18040 (ppc_regmap): Renamed from regmap, made static.
18041 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
18042 made static.
18043 (ppc_cannot_store_register): Renamed from cannot_store_register,
18044 made static.
18045 (the_low_target): New.
18046 * linux-s390-low.c (num_regs): Remove.
18047 (s390_num_regs): Define.
18048 (s390_regmap): Renamed from regmap, made static.
18049 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
18050 made static.
18051 (s390_cannot_store_register): Renamed from cannot_store_register,
18052 made static.
18053 (the_low_target): New.
18054 * linux-sh-low.c (num_regs): Remove.
18055 (sh_num_regs): Define.
18056 (sh_regmap): Renamed from regmap, made static.
18057 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
18058 made static.
18059 (sh_cannot_store_register): Renamed from cannot_store_register,
18060 made static.
18061 (the_low_target): New.
18062 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
18063 (the_low_target): New.
18064
180652002-04-09 Daniel Jacobowitz <drow@mvista.com>
18066
18067 * Makefile.in: Add stamp-h target.
18068 * configure.in: Create stamp-h.
18069 * configure: Regenerated.
18070
180712002-04-09 Daniel Jacobowitz <drow@mvista.com>
18072
18073 * inferiors.c: New file.
18074 * target.c: New file.
18075 * target.h: New file.
18076 * Makefile.in: Add target.o and inferiors.o. Update
18077 dependencies.
18078 * linux-low.c (inferior_pid): New static variable,
18079 moved from server.c.
18080 (linux_create_inferior): Renamed from create_inferior.
18081 Call add_inferior. Return 0 on success instead of a PID.
18082 (linux_attach): Renamed from myattach.
18083 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
18084 (linux_thread_alive): Renamed from mythread_alive.
18085 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
18086 child dies.
18087 (linux_resume): Renamed from myresume. Add missing ``return 0''.
18088 (regsets_store_inferior_registers): Correct error message.
18089 Add missing ``return 0''.
18090 (linux_fetch_registers): Renamed from fetch_inferior_registers.
18091 (linux_store_registers): Renamed from store_inferior_registers.
18092 (linux_read_memory): Renamed from read_inferior_memory.
18093 (linux_write_memory): Renamed from write_inferior_memory.
18094 (linux_target_ops): New structure.
18095 (initialize_low): Call set_target_ops ().
18096 * remote-utils.c (unhexify): New function.
18097 (hexify): New function.
18098 (input_interrupt): Send signals to ``signal_pid''.
18099 * server.c (inferior_pid): Remove.
18100 (start_inferior): Update create_inferior call.
18101 (attach_inferior): Call add_inferior.
18102 (handle_query): New function.
18103 (main): Call handle_query for `q' packets.
18104 * server.h: Include "target.h". Remove obsolete prototypes.
18105 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
18106
181072002-04-09 Daniel Jacobowitz <drow@mvista.com>
18108
18109 * Makefile.in: Add WARN_CFLAGS. Update configury
18110 dependencies.
18111 * configure.in: Check for <string.h>
18112 * configure: Regenerate.
18113 * config.in: Regenerate.
18114 * gdbreplay.c: Include needed system headers.
18115 (remote_open): Remove strchr prototype.
18116 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
18117 * regcache.c (supply_register): Change buf argument to const void *.
18118 (supply_register_by_name): Likewise.
18119 (collect_register): Change buf argument to void *.
18120 (collect_register_by_name): Likewise.
18121 * regcache.h: Add missing prototypes.
18122 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
18123 * server.c (handle_query): New function.
18124 (attached): New static variable, moved out of main.
18125 (main): Quiet longjmp clobber warnings.
18126 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
18127 * utils.c (error): Remove NORETURN.
18128 (fatal): Likewise.