]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdbserver/ChangeLog
gdb/riscv: Update API for looking up target descriptions
[thirdparty/binutils-gdb.git] / gdbserver / ChangeLog
CommitLineData
1a627e7e
TT
12020-02-14 Tom Tromey <tom@tromey.com>
2
3 * acinclude.m4: Don't include acx_configure_dir.m4.
4 * Makefile.in (LIBIBERTY_BUILDDIR, GNULIB_BUILDDIR): Update.
5 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): Remove.
6 (all, install-only, uninstall, clean-info, clean)
7 (maintainer-clean): Don't recurse.
8 (subdir_do, all-lib): Remove.
9 ($(LIBGNU) $(LIBIBERTY) $(GNULIB_H)): Remove rule.
10 (GNULIB_H): Remove.
11 (generated_files): Update.
12 ($(GNULIB_BUILDDIR)/Makefile): Remove rule.
13 * configure: Rebuild.
14 * configure.ac: Don't configure gnulib or libiberty.
15 (GNULIB): Update.
16
a9b34532
EZ
172020-02-14 Eli Zaretskii <eliz@gnu.org>
18
19 * win32-low.c (create_process): Prepend PROGRAM to ARGS when
20 preparing the command line for CreateProcess.
21 (win32_create_inferior): Reflect the program name in debugging
22 output that shows the process and its command line.
23
feacfcac
SM
242020-02-13 Simon Marchi <simon.marchi@efficios.com>
25
26 * Makefile.in: Rename source files from .c to .cc.
27 * %.c: Rename to %.cc.
28 * configure.ac: Rename server.c to server.cc.
29 * configure: Re-generate.
30
06b3c5bd
SM
312020-02-13 Simon Marchi <simon.marchi@efficios.com>
32
33 * Makefile.in: Rename gdbsupport source files from .c to .cc.
34
052793ad
HD
352020-02-12 Hannes Domani <ssbssa@yahoo.de>
36
37 * win32-low.c (win32_create_inferior): Set signal_pid.
38
f20e3e82
MR
392020-02-12 Maciej W. Rozycki <macro@wdc.com>
40 Pedro Alves <palves@redhat.com>
41
42 Skip building gdbserver in a cross-configuration.
43 * configure.srv: Set $gdbserver_host depending on whether $target
44 is $host. Use $gdbserver_host instead of $host.
45
8ddd8e0e
SM
462020-02-11 Simon Marchi <simon.marchi@efficios.com>
47
48 * configure: Re-generate.
49
898e7f60
SM
502020-02-11 Simon Marchi <simon.marchi@efficios.com>
51
52 * configure: Re-generate.
53
58df732b
SM
542020-02-11 Simon Marchi <simon.marchi@efficios.com>
55
56 * acinclude.m4: Update warning.m4 path.
57
7928d571
HD
582020-02-09 Hannes Domani <ssbssa@yahoo.de>
59
60 * win32-low.c (win32_clear_inferiors): Reset siginfo_er.
61 (handle_exception): Set siginfo_er.
62 (win32_xfer_siginfo): New function.
63
919adfe8
TT
642020-02-07 Tom Tromey <tom@tromey.com>
65 Pedro Alves <palves@redhat.com>
66
67 * README: Update build documentation.
68 * configure.srv: Set UNSUPPORTED if host is unsupported. Check
69 host, not target.
70 * configure.ac: Update paths.
71 * configure: Rebuild.
72 * acinclude.m4: Update paths.
73 * Makefile.in: Update include paths.
74 (depcomp, INCLUDE_DIR, INCGNU, INCSUPPORT, INCLUDE_CFLAGS)
75 (SFILES, XML_DIR, n, $(GNULIB_BUILDDIR)/Makefile, config.status)
76 (version-generated.c, stamp-xml, regdat_sh, arch/%-ipa.o)
77 (gdbsupport/%-ipa.o, %-ipa.o, arch/%.o, gdbsupport/%.o, %.o)
78 (%-generated.c): Update paths.
79 * Move entire directory from ../gdb/gdbserver.
80
287c844a
MR
812020-01-29 Maciej W. Rozycki <macro@wdc.com>
82
83 * configure.srv <i[34567]86-*-mingw*>: Fix whitespace damage.
84
548a204f
PFC
852020-01-29 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
86
87 * configure.srv (powerpc*-*-linux*): Use srv_tgtobj in second
88 assignment instead of srv_linux_obj.
89
a2236a08
HD
902020-01-28 Hannes Domani <ssbssa@yahoo.de>
91
92 * server.c (handle_qxfer_libraries): Write segment-address with
93 paddress.
94
bdaed379
HD
952020-01-24 Hannes Domani <ssbssa@yahoo.de>
96
97 * Makefile.in (install-strip): New target.
98 (install_sh, INSTALL_STRIP_PROGRAM, STRIP): New variables.
99 * aclocal.m4: Regenerate.
100 * configure: Regenerate.
101 * configure.ac: Add AM_PROG_INSTALL_STRIP.
102
42cd72aa
MR
1032020-01-24 Maciej W. Rozycki <macro@wdc.com>
104
105 * Makefile.in (SFILES): Adjust paths to point to real files.
106 (OBS): Move waitstatus.o to target/waitstatus.o.
107 (TAGS): Transform paths appropriately.
108 (%.o): Rename to...
109 (nat/%.o): ... this pattern rule.
110 (%.o): Rename to...
111 (target/%.o): ... this pattern rule.
112 * configure.srv: Adjust paths throughout to include nat/ prefix
113 with the revant files.
114 * configure.ac: Add `nat' and `target' to CONFIG_SRC_SUBDIR.
115 * configure: Regenerate.
116
42ba50ec
MR
1172020-01-24 Maciej W. Rozycki <macro@wdc.com>
118
119 * Makefile.in (TAGS): Remove config files from the recipe.
120
05ea2a05
TT
1212020-01-14 Tom Tromey <tom@tromey.com>
122
123 * configure: Rebuild.
124 * configure.ac: Remove any checks that were added to common.m4.
125 * acinclude.m4: Include lib-ld.m4, lib-prefix.m4, and
126 lib-link.m4.
127
01027315
TT
1282020-01-14 Tom Tromey <tom@tromey.com>
129
130 * server.h: Include config.h.
131 * gdbreplay.c: Include config.h.
132 * configure: Rebuild.
133 * configure.ac: Don't source common.host.
134 * acinclude.m4: Update path.
135 * Makefile.in (INCSUPPORT): New variable.
136 (INCLUDE_CFLAGS): Add INCSUPPORT.
137 (SFILES): Update paths.
138 (version-generated.c): Update path to create-version.sh.
139 (gdbsupport/%-ipa.o, gdbsupport/%.o): Update paths.
140
b2ceabe8
TT
1412020-01-14 Tom Tromey <tom@tromey.com>
142
143 * configure.ac (LIBS): Use WIN32APILIBS.
144 (USE_WIN32API): Don't define.
145 * configure: Rebuild.
146
25c51f71
TT
1472020-01-14 Tom Tromey <tom@tromey.com>
148
149 * configure: Rebuild.
150
c0bd321d
SM
1512020-01-13 Simon Marchi <simon.marchi@efficios.com>
152
153 * Makefile.in (%-generated.c): Remove rule for files from
154 regformats/i386.
155
bb564c58
SM
1562020-01-13 Simon Marchi <simon.marchi@efficios.com>
157
158 * configure: Re-generate.
159
6e37c371
SM
1602020-01-13 Simon Marchi <simon.marchi@efficios.com>
161
162 * tracepoint.h (IP_AGENT_EXPORT_FUNC) [!IN_PROCESS_AGENT]:
163 Define to static.
164 * tracepoint.c (stop_tracing, flush_trace_buffer,
165 about_to_request_buffer_space, get_trace_state_variable_value,
166 set_trace_state_variable_value, gdb_collect): Add declaration.
167
df4a0200
SM
1682020-01-13 Simon Marchi <simon.marchi@efficios.com>
169
170 * linux-x86-low.c (x86_linux_regs_info, amd64_emit_eq_goto,
171 amd64_emit_ne_goto, amd64_emit_lt_goto, amd64_emit_le_goto,
172 amd64_emit_gt_goto, amd64_emit_ge_goto, amd64_emit_ge_goto,
173 i386_emit_eq_goto, i386_emit_ne_goto, i386_emit_lt_goto,
174 i386_emit_le_goto, i386_emit_gt_goto, i386_emit_ge_goto): Make
175 static.
176
89e94ec9
SM
1772020-01-13 Simon Marchi <simon.marchi@efficios.com>
178
179 * inferiors.c: Include gdbsupport/common-inferior.h.
180
2552728a
SM
1812020-01-13 Simon Marchi <simon.marchi@efficios.com>
182
183 * hostio-errno.c: Include hostio.h.
184
4025fa09
SM
1852020-01-13 Simon Marchi <simon.marchi@efficios.com>
186
187 * Makefile.in (%-generated.c): Make $(regdat_sh) a regular
188 prerequisite.
189
c0b0a142
SM
1902020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
191
192 * linux-arm-tdesc.c: Include linux-arm-tdesc.h.
193 * linux-arm-tdesc.h: Include arch/arm.h.
194
bb1183e2
SM
1952020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
196
197 * linux-aarch64-low.c (aarch64_write_goto_address): Make static.
198
f5df0b5f
SM
1992020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
200
201 * linux-aarch32-tdesc.c: Include linux-aarch32-tdesc.h.
202 * linux-aarch64-tdesc.c: Include linux-aarch64-tdesc.h.
203
5b6d1e4f
PA
2042020-01-10 Pedro Alves <palves@redhat.com>
205
206 * fork-child.c (post_fork_inferior): Pass target down to
207 startup_inferior.
208 * inferiors.c (switch_to_thread): Add process_stratum_target
209 parameter.
210 * lynx-low.c (lynx_target_ops): Now a process_stratum_target.
211 * nto-low.c (nto_target_ops): Now a process_stratum_target.
212 * linux-low.c (linux_target_ops): Now a process_stratum_target.
213 * remote-utils.c (prepare_resume_reply): Pass the target to
214 switch_to_thread.
215 * target.c (the_target): Now a process_stratum_target.
216 (done_accessing_memory): Pass the target to switch_to_thread.
217 (set_target_ops): Ajust to use process_stratum_target.
218 * target.h (struct target_ops): Rename to ...
219 (struct process_stratum_target): ... this.
220 (the_target, set_target_ops): Adjust.
221 (prepare_to_access_memory): Adjust comment.
222 * win32-low.c (child_xfer_memory): Adjust to use
223 process_stratum_target.
224 (win32_target_ops): Now a process_stratum_target.
225
559e7e50
EZ
2262020-01-06 Eli Zaretskii <eliz@gnu.org>
227 Pedro Alves <palves@redhat.com>
228
229 * win32-low.c (get_child_debug_event): Extract the fatal exception
230 from the exit status and convert to the equivalent Posix signal
231 number.
232 (win32_wait): Allow TARGET_WAITKIND_SIGNALLED status as well.
233 * Makefile.in (OBS, SFILES): Add gdb_wait.[co].
234
48189bec
HD
2352020-01-01 Hannes Domani <ssbssa@yahoo.de>
236
237 * Makefile.in: Use INSTALL_PROGRAM_ENV.
238
5dd8bf88
JB
2392020-01-01 Joel Brobecker <brobecker@adacore.com>
240
241 * server.c (gdbserver_version): Change copyright year to 2020.
242 * gdbreplay.c (gdbreplay_version): Likewise.
243
0ad6b8ee
CB
2442019-12-19 Christian Biesinger <cbiesinger@google.com>
245
246 * configure: Regenerate.
247 * configure.ac: Quote variable arguments of test.
248
1ee7b812
BE
2492019-12-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
250
251 * Makefile.in: Fix build with GNU Make 3.81
252
d9fa87f4
TT
2532019-12-16 Tom Tromey <tromey@adacore.com>
254
255 * server.c (get_exec_file): Constify result.
256
ab7d13f0
CB
2572019-12-10 Christian Biesinger <cbiesinger@google.com>
258
259 * Makefile.in: Add safe-strerror.c to gdbreplay and IPA, and change
260 UNDO_GNULIB_CFLAGS to undo strerror_r instead of strerror.
261 * config.in: Regenerate.
262 * configure: Regenerate.
263 * configure.ac: Don't check for strerror.
264 * linux-i386-ipa.c (initialize_fast_tracepoint_trampoline_buffer):
265 Call safe_strerror instead of strerror.
266 * server.h (strerror): Remove this now-unnecessary declaration.
267 * tracepoint.c (init_named_socket): Call safe_strerror instead of
268 strerror.
269 (gdb_agent_helper_thread): Likewise.
270 * utils.c (perror_with_name): Likewise.
271
4da8c3a8
TT
2722019-11-26 Tom Tromey <tom@tromey.com>
273
274 * configure, config.in: Rebuild.
275
21987b9c
TT
2762019-11-26 Tom Tromey <tom@tromey.com>
277
278 * remote-utils.c (block_unblock_async_io): Use gdb_sigmask.
279 * linux-low.c (linux_wait_for_event_filtered, linux_async): Use
280 gdb_sigmask.
281 * configure, config.in: Rebuild.
282
5e030278
TT
2832019-11-26 Tom Tromey <tom@tromey.com>
284
285 * Makefile.in (PTHREAD_CFLAGS, PTHREAD_LIBS): New variables.
286 (INTERNAL_CFLAGS_BASE): Use PTHREAD_CFLAGS.
287 (GDBSERVER_LIBS): Use PTHREAD_LIBS.
288 * acinclude.m4: Include ax_pthread.m4.
289 * config.in, configure: Rebuild.
290
6d91ce9a
CB
2912019-11-26 Christian Biesinger <cbiesinger@google.com>
292
293 * debug.c (debug_set_output): Call safe_strerror instead of
294 strerror.
295 * linux-low.c (attach_proc_task_lwp_callback): Likewise.
296 (linux_kill_one_lwp): Likewise.
297 (linux_detach_one_lwp): Likewise.
298 (linux_wait_for_event_filtered): Likewise.
299 (store_register): Likewise.
300 * lynx-low.c (lynx_attach): Likewise.
301 * mem-break.c (insert_memory_breakpoint): Likewise.
302 (remove_memory_breakpoint): Likewise.
303 (delete_fast_tracepoint_jump): Likewise.
304 (set_fast_tracepoint_jump): Likewise.
305 (uninsert_fast_tracepoint_jumps_at): Likewise.
306 (reinsert_fast_tracepoint_jumps_at): Likewise.
307 * nto-low.c (nto_xfer_memory): Likewise.
308 (nto_resume): Likewise.
309
6cdd651f
LM
3102019-11-20 Luis Machado <luis.machado@linaro.org>
311
312 * linux-aarch64-low.c (is_sve_tdesc): Check against target feature
313 instead of register count.
314 * tdesc.c (tdesc_contains_feature): New function.
315 * tdesc.h (tdesc_contains_feature): New prototype.
316
cd850b40
CB
3172019-11-15 Christian Biesinger <cbiesinger@google.com>
318
319 * Makefile.in: Add safe-strerror.c.
320 * configure: Regenerate.
321 * configure.ac: Don't source common.host.
322
5abebf3c
CB
3232019-11-15 Christian Biesinger <cbiesinger@google.com>
324
325 * config.in: Regenerate.
326 * configure: Regenerate.
327
e06f3d6e
AB
3282019-11-12 Andrew Burgess <andrew.burgess@embecosm.com>
329
330 * ax.c (ax_printf): Handle size_t_arg.
331
ca3a04f6
CB
3322019-11-06 Christian Biesinger <cbiesinger@google.com>
333
334 * linux-tdep.c (linux_info_proc): Use strtok_r instead of strtok.
335 * mi/mi-main.c (output_cores): Likewise.
336 * nat/linux-osdata.c (linux_xfer_osdata_cpus): Likewise.
337 (linux_xfer_osdata_modules): Likewise.
338 * remote.c (register_remote_support_xml): Likewise.
339 * sparc64-tdep.c (adi_is_addr_mapped): Likewise.
340 * xml-syscall.c (syscall_create_syscall_desc): Likewise.
341
e48f6033
CB
3422019-11-01 Christian Biesinger <cbiesinger@google.com>
343
344 * configure: Regenerate.
345 * configure.ac: Remove check for strerror_r.
346
e7e97a2e
CB
3472019-10-31 Christian Biesinger <cbiesinger@google.com>
348
349 * config.in: Regenerate.
350 * configure: Regenerate.
351 * configure.ac: Also check for strerror_r.
352
75cafaa6
CB
3532019-10-31 Christian Biesinger <cbiesinger@google.com>
354
355 * ax.h (debug_agent): Remove duplicate declaration.
356
30baf67b
TV
3572019-10-26 Tom de Vries <tdevries@suse.de>
358
359 * linux-aarch64-low.c: Fix typos in comments.
360 * linux-arm-low.c: Same.
361 * linux-low.c: Same.
362 * linux-ppc-low.c: Same.
363 * proc-service.c: Same.
364 * regcache.h: Same.
365 * server.c: Same.
366 * tracepoint.c: Same.
367 * win32-low.c: Same.
368
52c64cf7
TT
3692019-10-25 Tom Tromey <tromey@adacore.com>
370
371 * utils.c (xstrdup): Remove.
372
c12d372d
TT
3732019-10-23 Tom Tromey <tom@tromey.com>
374
375 * configure, config.in: Rebuild.
376
4d0b984b
TT
3772019-10-23 Tom Tromey <tom@tromey.com>
378
379 * configure: Rebuild.
380 * acinclude.m4: Use m4_include, not sinclude.
381
c5adaa19
TT
3822019-10-17 Tom Tromey <tromey@adacore.com>
383
384 * configure: Rebuild.
385 * configure.ac: Use AC_CONFIG_HEADERS. Create stamp-h there, not
386 in AC_CONFIG_FILES invocation.
387 * Makefile.in (stamp-h, Makefile): Use new-style config.status
388 invocation.
389
fec4e896
CB
3902019-10-16 Christian Biesinger <cbiesinger@google.com>
391
392 * server.c: Include xml-builtin.h.
393 (get_xml_features): Don't declare xml_builtins here.
394
00975ff6
AB
3952019-10-15 Andrew Burgess <andrew.burgess@embecosm.com>
396
397 * Makefile.in: Remove references to vec-ipa.o.
398
0dc32745
AB
3992019-10-15 Andrew Burgess <andrew.burgess@embecosm.com>
400
401 * Makefile.in: Remove references to vec.c.
402
3e6ec53a
CB
4032019-10-02 Christian Biesinger <cbiesinger@google.com>
404
405 * server.c (server_waiting): Change to bool.
406 (extended_protocol): Likewise.
407 (response_needed): Likewise.
408 (exit_requested): Likewise.
409 (run_once): Likewise.
410 (report_no_resumed): Likewise.
411 (non_stop): Likewise.
412 (disable_packet_vCont): Likewise.
413 (disable_packet_Tthread): Likewise.
414 (disable_packet_qC): Likewise.
415 (disable_packet_qfThreadInfo): Likewise.
416 (handle_general_set): Update.
417 (handle_detach): Update.
418 (handle_monitor_command): Update.
419 (handle_query): Update.
420 (captured_main): Update.
421 (process_serial_event): Update.
422 * server.h (server_waiting): Change to bool.
423 (disable_packet_vCont): Likewise.
424 (disable_packet_Tthread): Likewise.
425 (disable_packet_qC): Likewise.
426 (disable_packet_qfThreadInfo): Likewise.
427 (run_once): Likewise.
428 (non_stop): Likewise.
429 * target.c (target_stop_and_wait): Update.
430
80fd2826
TT
4312019-10-02 Tom Tromey <tromey@adacore.com>
432
433 * Makefile.in (SFILES): Add common-inferior.c.
434 (OBS): Add common-inferior.o.
435 * server.c (startup_with_shell): Don't define.
436
46f29a9a
AB
4372019-10-02 Andrew Burgess <andrew.burgess@embecosm.com>
438
439 * linux-low.c (linux_low_read_btrace): Update for change to
440 std::vector.
441
f9d949fb
CB
4422019-09-20 Christian Biesinger <cbiesinger@google.com>
443
444 * debug.c (debug_threads): Remove comment in favor of the header.
445 * debug.h (using_threads): Add declaration.
446 (debug_threads): Add comment.
447 * linux-aarch64-low.c: Include debug.h and remove declaration of
448 debug_threads.
449 * nto-low.c: Likewise.
450 * remote-utils.c: Likewise.
451 * thread-db.c: Likewise.
452
abf516c6
UW
4532019-09-20 Ulrich Weigand <uweigand@de.ibm.com>
454
455 * configure.srv (ipa_ppc_linux_regobj): Remove powerpc-cell32l-ipa.o
456 and powerpc-cell64l-ipa.o.
457 (powerpc*-*-linux*): Remove powerpc-cell32l.o and powerpc-cell64l.o
458 from srv_regobj. Remove rs6000/powerpc-cell32l.xml and
459 rs6000/powerpc-cell64l.xml from srv_xmlfiles.
460 (spu*-*-*): Remove.
461
462 * spu-low.c: Remove file.
463
464 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Remove.
465 (parse_spufs_run): Remove.
466 (ppc_get_pc): Remove Cell/B.E. support.
467 (ppc_set_pc): Likewise.
468 (ppc_breakpoint_at): Likewise.
469 (ppc_arch_setup): Likewise.
470 (ppc_get_ipa_tdesc_idx): Do not handle tdesc_powerpc_cell64l or
471 tdesc_powerpc_cell32l.
472 (initialize_low_arch): Do not call init_registers_powerpc_cell64l
473 or init_registers_powerpc_cell32l.
474 * linux-ppc-ipa.c (get_ipa_tdesc): Do not handle PPC_TDESC_CELL.
475 (initialize_low_tracepoint): Do not call init_registers_powerpc_cell64l
476 or init_registers_powerpc_cell32l.
477 * linux-ppc-tdesc-init.h (PPC_TDESC_CELL): Mark as unused.
478 (init_registers_powerpc_cell32l): Remove prototype.
479 (init_registers_powerpc_cell64l): Likewise.
480
481 * target.h (struct target_ops): Remove qxfer_spu member.
482 * server.c (handle_qxfer_spu): Remove.
483 (qxfer_packets): Remove entry for "spu".
484 (handle_query): No longer support qXfer:spu:read or qXfer:spu:write.
485 * linux-low.c (SPUFS_MAGIC): Remove.
486 (spu_enumerate_spu_ids): Remove.
487 (linux_qxfer_spu): Remove.
488 (linux_target_ops): Remove qxfer_spu member.
489 * lynx-low.c (lynx_target_ops): Remove qxfer_spu member.
490 * nto-low.c (nto_target_ops): Remove qxfer_spu member.
491 * win32-low.c (win32_target_ops): Remove qxfer_spu member.
492
2d41fa11
SDJ
4932019-08-23 Sergio Durigan Junior <sergiodj@redhat.com>
494
495 * Makefile.in (SFILES): Add 'gdbsupport/gdb-dlfcn.c'.
496 (OBS): Add 'gdbsupport/gdb-dlfcn.o'.
497 * config.in: Regenerate.
498 * configure: Regenerate.
499
d59b55f0
TT
5002019-08-15 Tom Tromey <tromey@adacore.com>
501
502 * target.c (target_write_memory): Use gdb::byte_vector.
503
4196ab2a
TT
5042019-08-15 Tom Tromey <tromey@adacore.com>
505
506 * tracepoint.c (write_inferior_data_pointer)
507 (write_inferior_integer, write_inferior_int8)
508 (write_inferior_uinteger, m_tracepoint_action_download)
509 (r_tracepoint_action_download, x_tracepoint_action_download)
510 (l_tracepoint_action_download, clear_inferior_trace_buffer)
511 (download_agent_expr, download_tracepoint_1)
512 (download_trace_state_variables, upload_fast_traceframes): Update.
513 * server.c (gdb_write_memory): Update.
514 * remote-utils.c (relocate_instruction): Update.
515 * proc-service.c (ps_pdwrite): Update.
516 * mem-break.c (remove_memory_breakpoint)
517 (delete_fast_tracepoint_jump, set_fast_tracepoint_jump)
518 (uninsert_fast_tracepoint_jumps_at)
519 (reinsert_fast_tracepoint_jumps_at): Update.
520 * linux-x86-low.c (append_insns)
521 (i386_install_fast_tracepoint_jump_pad)
522 (amd64_write_goto_address, i386_write_goto_address): Update.
523 * linux-s390-low.c (append_insns, s390_write_goto_address):
524 Update.
525 * linux-ppc-low.c (ppc_relocate_instruction)
526 (ppc_install_fast_tracepoint_jump_pad, emit_insns)
527 (ppc_write_goto_address): Update.
528 * linux-aarch64-low.c (append_insns): Update.
529 * target.h (struct target_ops): Update.
530 (write_inferior_memory): Don't declare.
531 * target.c (target_write_memory): Rename from
532 write_inferior_memory. Remove old target_write_memory.
533
c6778d00
TT
5342019-08-15 Tom Tromey <tromey@adacore.com>
535
536 * target.c (write_inferior_memory): Use std::vector.
537
404f2902
FCE
5382019-08-06 Frank Ch. Eigler <fche@redhat.com>
539
540 PR build/24886
541 * configure.ac: Drop enable-libmcheck support.
542 * configure, config.in: Rebuild.
543 * acinclude.m4: Don't include it.
544
4c5aa8e0
AH
5452019-07-19 Alan Hayward <alan.hayward@arm.com>
546
547 * configure.srv: Remove Arm xml files.
548
7cc17433
AH
5492019-07-19 Alan Hayward <alan.hayward@arm.com>
550
551 * configure.srv: Add new files. Remove xml generated files.
552 * linux-aarch32-low.c (initialize_low_arch_aarch32): Don't init
553 registers.
554 * linux-aarch32-low.h (tdesc_arm_with_neon): Remove.
555 * linux-aarch32-tdesc.c: New file.
556 * linux-aarch32-tdesc.h: New file.
557 * linux-aarch64-low.c (aarch64_arch_setup): Call aarch32_linux_read_description.
558 * linux-arm-low.c (init_registers_arm, tdesc_arm)
559 (init_registers_arm_with_iwmmxt, tdesc_arm_with_iwmmxt)
560 (init_registers_arm_with_vfpv2, tdesc_arm_with_vfpv2)
561 (init_registers_arm_with_vfpv3, tdesc_arm_with_vfpv3): Remove.
562 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
563 (arm_store_vfpregset): Call arm_linux_get_tdesc_fp_type.
564 (arm_read_description): Call arm_linux_read_description.
565 (initialize_low_arch): Don't init registers.
566 * linux-arm-tdesc.c: New file.
567 * linux-arm-tdesc.h: New file.
568
166a82be
AH
5692019-07-10 Alan Hayward <alan.hayward@arm.com>
570
571 * linux-arm-low.c (arm_fill_wmmxregset, arm_store_wmmxregset):
572 Move counter inside for.
573 (arm_read_description): Check ptrace earlier.
574 (arm_arch_setup): Call arm_linux_init_hwbp_cap here.
575
268a13a5
TT
5762019-07-09 Tom Tromey <tom@tromey.com>
577
578 * configure: Rebuild.
579 * configure.ac: Change common to gdbsupport.
580 * acinclude.m4: Change common to gdbsupport.
581 * Makefile.in (SFILES, OBS, GDBREPLAY_OBS, IPA_OBJS)
582 (version-generated.c, gdbsupport/%-ipa.o, gdbsupport/%.o): Change
583 common to gdbsupport.
584 * ax.c, event-loop.c, fork-child.c, gdb_proc_service.h,
585 gdbreplay.c, gdbthread.h, hostio-errno.c, hostio.c, i387-fp.c,
586 inferiors.c, inferiors.h, linux-aarch64-tdesc-selftest.c,
587 linux-amd64-ipa.c, linux-i386-ipa.c, linux-low.c,
588 linux-tic6x-low.c, linux-x86-low.c, linux-x86-tdesc-selftest.c,
589 linux-x86-tdesc.c, lynx-i386-low.c, lynx-low.c, mem-break.h,
590 nto-x86-low.c, regcache.c, regcache.h, remote-utils.c, server.c,
591 server.h, spu-low.c, symbol.c, target.h, tdesc.c, tdesc.h,
592 thread-db.c, tracepoint.c, win32-i386-low.c, win32-low.c: Change
593 common to gdbsupport.
594
350fab54
AH
5952019-07-04 Alan Hayward <alan.hayward@arm.com>
596
597 * linux-aarch32-low.c (arm_read_description, arm_regsets): Use new
598 defines.
599 * linux-arm-low.c (arm_read_description, arm_regsets): Likewise.
600
2b40fda7
AH
6012019-07-04 Alan Hayward <alan.hayward@arm.com>
602
603 * configure.srv: Remove legacy xml.
604 * linux-aarch64-low.c (initialize_low_arch): Remove
605 initialize_low_tdesc call.
606 * linux-aarch64-tdesc-selftest.c: Remove file.
607 * linux-aarch64-tdesc.h (initialize_low_tdesc): Remove.
608 * linux-x86-low.c (initialize_low_arch): Remove
609 initialize_low_tdesc call.
610 * linux-x86-tdesc-selftest.c: Remove file.
611 * linux-x86-tdesc.h (initialize_low_tdesc): Remove.
612
7d10623d
TV
6132019-06-20 Tom de Vries <tdevries@suse.de>
614
615 * linux-s390-ipa.c (get_ipa_tdesc)[!__s390x__]: Use
616 s390_te_linux64_ft_collect_regmap for S390_TDESC_GS.
617
8d6a48df
TV
6182019-06-19 Tom de Vries <tdevries@suse.de>
619
620 * debug.h (debug_write): Change return type to ssize_t.
621 * debug.c (debug_write): Same.
622
73cc7272
TT
6232019-06-14 Tom Tromey <tom@tromey.com>
624
625 * configure.ac: Use new path to gnulib.
626 * configure: Rebuild.
627 * Makefile.in (INCGNU, $(GNULIB_BUILDDIR)/Makefile): Use new path
628 to gnulib.
629
08f10e02
TT
6302019-06-11 Tom Tromey <tom@tromey.com>
631
632 * Makefile.in (SFILES): Add alloc.c.
633 (OBS): Add alloc.o.
634 (IPA_OBJS): Add alloc-ipa.o.
635 (alloc-ipa.o): New target.
636 (%.o: ../%.c): New pattern rule.
637
422186a9
TT
6382019-06-10 Tom Tromey <tromey@adacore.com>
639
640 * remote-utils.c (look_up_one_symbol, relocate_instruction): Don't
641 end warning with a newline.
642 * linux-s390-low.c (s390_get_wordsize): Don't end warning with a
643 newline.
644 * thread-db.c (attach_thread): Don't end warning with a newline.
645 (thread_db_notice_clone): Likewise.
646 * tracepoint.c (gdb_agent_helper_thread): Don't end warning with a
647 newline.
648 * linux-x86-low.c (x86_get_min_fast_tracepoint_insn_len): Don't
649 end warning with a newline.
650
b02f78f9
PA
6512019-06-04 Pedro Alves <palves@redhat.com>
652
653 * server.c (captured_main): Use make_unique_xstrdup.
654
88ed7edb
TT
6552019-06-02 Tom Tromey <tom@tromey.com>
656
657 * gdbreplay.c (fromhex): Remove.
658 * Makefile.in (GDBREPLAY_OBS): Add rsp-low.o.
659
33a6bc35
TT
6602019-05-29 Tom Tromey <tromey@adacore.com>
661
662 * configure: Rebuild.
663
e90a813d
KB
6642019-05-06 Kevin Buettner <kevinb@redhat.com>
665
666 * linux-x86-low.c (x86_fill_gregset): Don't compile 64-bit
667 sign extension code on 32-bit builds.
668
353ea2d1
EZ
6692019-05-03 Eli Zaretskii <eliz@gnu.org>
670
671 * remote-utils.c:
672 * gdbreplay.c [USE_WIN32API]: Remove the _WIN32_WINNT override.
673
b494cdff
TT
6742019-04-19 Tom Tromey <tom@tromey.com>
675
676 * server.c (struct vstop_notif): Derive from notif_event.
677 <base>: Remove.
678 (queue_stop_reply): Update.
679 (remove_all_on_match_ptid): Change type. Rewrite.
680 (discard_queued_stop_replies): Rewrite.
681 (in_queued_stop_replies_ptid): Change type.
682 (in_queued_stop_replies): Rewrite.
683 (notif_stop): Update.
684 (queue_stop_reply_callback): Update.
685 (captured_main): Don't call initialize_notif.
686 (push_stop_notification): Update.
687 * notif.c (notif_write_event, handle_notif_ack)
688 (notif_event_enque, notif_push): Update.
689 (notif_event_xfree, initialize_notif): Remove.
690 * notif.h (struct notif_event): Include <list>, not
691 "common/queue.h".
692 (struct notif_server) <queue>: Now a std::list.
693 (notif_event_p): Remove typedef.
694 (initialize_notif): Don't declare.
695 (struct notif_event): Add virtual destructor.
696
a7e559cc
AH
6972019-04-17 Alan Hayward <alan.hayward@arm.com>
698
699 * ax.c (ax_vdebug): Call debug_printf.
700 * debug.c (debug_write): New function.
701 * debug.h (debug_write): New declaration.
702 * linux-low.c (sigchld_handler): Call debug_write.
703
aeb2e706
AH
7042019-04-17 Alan Hayward <alan.hayward@arm.com>
705
706 * debug.c (debug_set_output): New function.
707 (debug_vprintf): Send output to debug_file.
708 (debug_flush): Likewise.
709 * debug.h (debug_set_output): New declaration.
710 * server.c (handle_monitor_command): Add debug-file option.
711 (captured_main): Likewise.
712
c1bc0935
AH
7132019-04-17 Alan Hayward <alan.hayward@arm.com>
714
715 * debug.c (remote_debug): Add definition.
716 * debug.h (remote_debug): Add declaration.
717 * hostio.c (remote_debug): Remove declaration.
718 * remote-utils.c (struct ui_file): Likewise.
719 (remote_debug): Likewise.
720 * remote-utils.h (remote_debug): Likewise,
721 * server.c (remote_debug): Remove definition.
722
3f52fdbc
KB
7232019-04-10 Kevin Buettner <kevinb@redhat.com>
724
725 * linux-x86-low.c (x86_fill_gregset): Sign extend EAX value
726 when using a 64-bit gdbserver.
727
b0319eaa
TT
7282019-04-09 Tom Tromey <tromey@adacore.com>
729
730 * linux-low.c (select_event_lwp): Use find_thread_in_random.
731
eedc3f4f
TT
7322019-04-08 Tom Tromey <tom@tromey.com>
733
734 * linux-low.c (linux_detach_one_lwp): Replace throw_exception with
735 throw.
736 (linux_resume_one_lwp): Likewise.
737
230d2906
TT
7382019-04-08 Tom Tromey <tom@tromey.com>
739
740 * gdbreplay.c: Update.
741 * linux-low.c: Update.
742 * server.c: Update.
743
a70b8144
TT
7442019-04-08 Tom Tromey <tom@tromey.com>
745
746 * server.c: Use C++ exception handling.
747 * linux-low.c: Use C++ exception handling.
748 * gdbreplay.c: Use C++ exception handling.
749
3d6e9d23
TT
7502019-04-08 Tom Tromey <tom@tromey.com>
751
752 * server.c (handle_btrace_general_set, handle_qxfer_btrace)
753 (handle_qxfer_btrace_conf, detach_or_kill_for_exit_cleanup)
754 (captured_main, main): Update.
755 * gdbreplay.c (main): Update.
756
0570503d
PFC
7572019-04-05 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
758
759 * linux-low.c (linux_get_auxv): Remove static. Return auxv entry
760 value in argument pointer, return 1 if the entry is found and 0
761 otherwise. Move comment.
762 (linux_get_hwcap, linux_get_hwcap2): Use modified linux_get_auxv.
763 * linux-low.h (linux_get_auxv): Declare.
764 * linux-ppc-low.c (is_elfv2_inferior): Use linux_get_auxv.
765
227a9e65
TT
7662019-04-05 Tom Tromey <tromey@adacore.com>
767
768 * server.c (gdbserver_usage): Use upper-case for metasyntactic
769 variables.
770
69f4c9cc
AH
7712019-03-28 Alan Hayward <alan.hayward@arm.com>
772
773 * linux-low.c (AT_HWCAP2): Add define if not already included.
774
974c89e0
AH
7752019-03-26 Alan Hayward <alan.hayward@arm.com>
776
777 * linux-aarch64-low.c (aarch64_get_hwcap): Remove function.
778 (aarch64_arch_setup): Call linux_get_hwcap.
779 * linux-arm-low.c (arm_get_hwcap): Remove function.
780 (arm_read_description): Call linux_get_hwcap.
781 * linux-low.c (linux_get_auxv): New function.
782 (linux_get_hwcap): Likewise.
783 (linux_get_hwcap2): Likewise.
784 * linux-low.h (linux_get_hwcap): New declaration.
785 (linux_get_hwcap2): Likewise.
786 * linux-ppc-low.c (ppc_get_auxv): Remove function.
787 (ppc_arch_setup): Call linux_get_hwcap.
788 * linux-s390-low.c (s390_get_hwcap): Remove function.
789 (s390_arch_setup): Call linux_get_hwcap.
790
1ef53e6b
AH
7912019-03-22 Alan Hayward <alan.hayward@arm.com>
792 Jiong Wang <jiong.wang@arm.com>
793
794 * linux-aarch64-low.c (aarch64_store_pauthregset): New function.
795 * linux-low.c (regsets_store_inferior_registers): Allow optional reads
796 to fail.
797 * linux-low.h (enum regset_type): Add OPTIONAL_REGS.
798
ee4fbcfa
AH
7992019-03-22 Alan Hayward <alan.hayward@arm.com>
800 Jiong Wang <jiong.wang@arm.com>
801
802 * linux-aarch64-low.c (AARCH64_HWCAP_PACA): New define.
803 (aarch64_get_hwcap): New function.
804 (aarch64_arch_setup): Read APIA hwcap.
805
6dc0ebde
AH
8062019-03-22 Alan Hayward <alan.hayward@arm.com>
807 Jiong Wang <jiong.wang@arm.com>
808
809 * linux-aarch64-ipa.c (get_ipa_tdesc): Add pauth param.
810 (initialize_low_tracepoint): Likewise.
811 * linux-aarch64-low.c (aarch64_arch_setup): Likewise.
812 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Likewise.
813 * linux-aarch64-tdesc.c (struct target_desc): Likewise.
814 (aarch64_linux_read_description): Likewise.
815 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Likewise.
816
1163a4b7
JB
8172019-03-12 John Baldwin <jhb@FreeBSD.org>
818
819 * linux-x86-tdesc.c (i386_linux_read_description): Update call to
820 i386_create_target_description for 'segments' parameter.
821 * lynx-i386-low.c (lynx_i386_arch_setup): Likewise.
822 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
823 * win32-i386-low.c (i386_arch_setup): Likewise.
824
d3a70e03
TT
8252019-03-12 Tom Tromey <tromey@adacore.com>
826
827 * linux-low.c (iterate_over_lwps): Update.
828
37991b4f
TT
8292019-03-06 Tom Tromey <tom@tromey.com>
830
831 * server.c (detach_or_kill_for_exit_cleanup): Remove parameter.
832 (captured_main): Use SCOPE_EXIT.
833
45950eb6
SDJ
8342019-03-04 Sergio Durigan Junior <sergiodj@redhat.com>
835
836 * configure.srv: Use '$enable_unittest' instead of '$development'
837 when checking whether to fill 'srv_regobj' on 'aarch64*-*-linux*'
838 case.
839
43ac54fc
TT
8402019-02-27 Tom Tromey <tromey@adacore.com>
841
842 * gdbreplay.c (logchar): Handle \r\n.
843
df0da8a2
AH
8442019-02-07 Alan Hayward <alan.hayward@arm.com>
845
846 * linux-low.c (linux_attach): Add process before lwp.
847 * server.c (attach_inferior): Check if already attached.
848
1a5c2598
TT
8492019-02-07 Tom Tromey <tom@tromey.com>
850
851 * x86-tdesc.h: Rename include guard.
852 * x86-low.h: Add include guard.
853 * wincecompat.h: Rename include guard.
854 * win32-low.h: Add include guard.
855 * utils.h: Rename include guard.
856 * tracepoint.h: Rename include guard.
857 * tdesc.h: Rename include guard.
858 * target.h: Rename include guard.
859 * server.h: Rename include guard.
860 * remote-utils.h: Rename include guard.
861 * regcache.h: Rename include guard.
862 * nto-low.h: Rename include guard.
863 * notif.h: Add include guard.
864 * mem-break.h: Rename include guard.
865 * lynx-low.h: Add include guard.
866 * linux-x86-tdesc.h: Add include guard.
867 * linux-s390-tdesc.h: Add include guard.
868 * linux-ppc-tdesc-init.h: Add include guard.
869 * linux-low.h: Add include guard.
870 * linux-aarch64-tdesc.h: Add include guard.
871 * linux-aarch32-low.h: Add include guard.
872 * inferiors.h: Rename include guard.
873 * i387-fp.h: Rename include guard.
874 * hostio.h: Rename include guard.
875 * gdbthread.h: Rename include guard.
876 * gdb_proc_service.h: Rename include guard.
877 * event-loop.h: Rename include guard.
878 * dll.h: Rename include guard.
879 * debug.h: Rename include guard.
880 * ax.h: Rename include guard.
881
956cc47c
SN
8822018-01-30 Szabolcs Nagy <szabolcs.nagy@arm.com>
883
884 PR gdb/23985
885 * Makefile.in (IPAGENT_CFLAGS): Add UNDO_GNULIB_CFLAGS.
886 (UNDO_GNULIB_CFLAGS): Undo gnulib replacements.
887
a0707f3c
TT
8882019-01-25 Tom Tromey <tom@tromey.com>
889
890 * Makefile.in (INCLUDE_CFLAGS): Don't add -I for common.
891
0747795c
TT
8922019-01-25 Tom Tromey <tom@tromey.com>
893
894 * win32-low.c: Fix common/ includes.
895 * win32-i386-low.c: Fix common/ includes.
896 * tracepoint.c: Fix common/ includes.
897 * thread-db.c: Fix common/ includes.
898 * target.h: Fix common/ includes.
899 * symbol.c: Fix common/ includes.
900 * spu-low.c: Fix common/ includes.
901 * server.h: Fix common/ includes.
902 * server.c: Fix common/ includes.
903 * remote-utils.c: Fix common/ includes.
904 * regcache.h: Fix common/ includes.
905 * regcache.c: Fix common/ includes.
906 * nto-x86-low.c: Fix common/ includes.
907 * notif.h: Fix common/ includes.
908 * mem-break.h: Fix common/ includes.
909 * lynx-low.c: Fix common/ includes.
910 * lynx-i386-low.c: Fix common/ includes.
911 * linux-x86-tdesc-selftest.c: Fix common/ includes.
912 * linux-x86-low.c: Fix common/ includes.
913 * linux-low.c: Fix common/ includes.
914 * inferiors.h: Fix common/ includes.
915 * i387-fp.c: Fix common/ includes.
916 * hostio.c: Fix common/ includes.
917 * hostio-errno.c: Fix common/ includes.
918 * gdbthread.h: Fix common/ includes.
919 * gdbreplay.c: Fix common/ includes.
920 * fork-child.c: Fix common/ includes.
921 * event-loop.c: Fix common/ includes.
922 * ax.c:
923 (enum gdb_agent_op): Fix common/ includes.
924
be6d4f74
TT
9252019-01-21 Tom Tromey <tom@tromey.com>
926
927 * tracepoint.c: Fix includes.
928 * remote-utils.c: Fix includes.
929 * linux-x86-low.c: Fix includes.
930
66d91b39
JB
9312019-01-01 Joel Brobecker <brobecker@adacore.com>
932
933 * gdbreplay.c (gdbreplay_version): Update copyright year in
934 version message.
935 * server.c (gdbserver_version): Likewise.
936
754e3168
AH
9372018-12-05 Alan Hayward <alan.hayward@arm.com>
938
939 * linux-low.c (add_lwp): Switch ordering.
940
d105de22
TT
9412018-11-29 Tom Tromey <tom@tromey.com>
942
943 * win32-low.c (win32_join): Take pid, not process.
944 * target.h (struct target_ops) <join>: Change argument type.
945 (join_inferior): Change argument name.
946 * spu-low.c (spu_join): Take pid, not process.
947 * server.c (handle_detach): Preserve pid before destroying
948 process.
949 * lynx-low.c (lynx_join): Take pid, not process.
950 * linux-low.c (linux_join): Take pid, not process.
951
50138245
AH
9522018-11-23 Alan Hayward <alan.hayward@arm.com>
953
954 * linux-aarch64-low.c (aarch64_cannot_store_register): Remove.
955 (aarch64_cannot_fetch_register): Likewise.
956 (struct linux_target_ops): Update references.
957
64f57f3d
PFC
9582018-10-31 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
959
960 * linux-ppc-low.c: Include nat/linux-ptrace.h.
961
8d619c01
EBM
9622018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
963
964 * configure.srv (ipa_ppc_linux_regobj): Add
965 powerpc-isa207-htm-vsx32l-ipa.o and
966 powerpc-isa207-htm-vsx64l-ipa.o.
967 (powerpc*-*-linux*): Add powerpc-isa207-htm-vsx32l.o and
968 powerpc-isa207-htm-vsx64l.o to srv_regobj. Add
969 rs6000/power-htm-spr.xml, rs6000/power-htm-core.xml,
970 rs6000/power64-htm-core.xml, rs6000/power-htm-fpu.xml,
971 rs6000/power-htm-altivec.xml, rs6000/power-htm-vsx.xml,
972 rs6000/power-htm-ppr.xml, rs6000/power-htm-dscr.xml,
973 rs6000/power-htm-tar.xml, rs6000/powerpc-isa207-htm-vsx32l.xml,
974 and rs6000/powerpc-isa207-htm-vsx64l.xml to srv_xmlfiles.
975 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
976 <PPC_TDESC_ISA207_HTM_VSX>: New enum value.
977 (init_registers_powerpc_isa207_htm_vsx32l)
978 (init_registers_powerpc_isa207_htm_vsx64l): Declare.
979 * linux-ppc-low.c (ppc_fill_tm_sprregset, ppc_store_tm_sprregset)
980 (ppc_store_tm_cgprregset, ppc_store_tm_cfprregset)
981 (ppc_store_tm_cvrregset, ppc_store_tm_cvsxregset)
982 (ppc_store_tm_cpprregset, ppc_store_tm_cdscrregset)
983 (ppc_store_tm_ctarregset): New functions.
984 (ppc_regsets): Add entries for HTM regsets.
985 (ppc_arch_setup): Set htm in features struct when needed. Set
986 sizes for the HTM regsets.
987 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_HTM_VSX.
988 (initialize_low_arch): Call
989 init_registers_powerpc_isa207_htm_vsx32l and
990 init_registers_powerpc_isa207_htm_vsx64l.
991 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
992 PPC_TDESC_ISA207_HTM_VSX.
993 (initialize_low_tracepoint): Call
994 init_registers_powerpc_isa207_htm_vsx32l and
995 init_registers_powerpc_isa207_htm_vsx64l.
996
232bfb86
EBM
9972018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
998
999 * configure.srv (powerpc*-*-linux*): Add rs6000/power-ebb.xml and
1000 rs6000/power-linux-pmu.xml to srv_xmlfiles.
1001 * linux-ppc-low.c (ppc_store_ebbregset, ppc_fill_pmuregset)
1002 (ppc_store_pmuregset): New functions.
1003 (ppc_regsets): Add entries for ebb and pmu regsets.
1004 (ppc_arch_setup): Set isa207 in features struct if the ebb and
1005 pmu regsets are available. Set sizes for these regsets.
1006
f2cf6173
EBM
10072018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1008
1009 * configure.srv (ipa_ppc_linux_regobj): Add
1010 powerpc-isa207-vsx64l-ipa.o and powerpc-isa207-vsx32l-ipa.o.
1011 (powerpc*-*-linux*): Add powerpc-isa207-vsx32l.o and
1012 powerpc-isa207-vsx64l.o to srv_regobj, add rs6000/power-tar.xml,
1013 rs6000/powerpc-isa207-vsx32l.xml, and
1014 rs6000/powerpc-isa207-vsx64l.xml to srv_xmlfiles.
1015 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
1016 <PPC_TDESC_ISA207_VSX>: New enum value.
1017 (init_registers_powerpc_isa207_vsx32l): Declare.
1018 (init_registers_powerpc_isa207_vsx64l): Declare.
1019 * linux-ppc-low.c (ppc_fill_tarregset): New function.
1020 (ppc_store_tarregset): New function.
1021 (ppc_regsets): Add entry for the TAR regset.
1022 (ppc_arch_setup): Set isa207 in features struct when needed. Set
1023 size for the TAR regsets.
1024 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_VSX.
1025 (initialize_low_arch): Call init_registers_powerpc_isa207_vsx32l
1026 and init_registers_powerpc_isa207_vsx64l.
1027 * linux-ppc-ipa.c (get_ipa_tdesc): Handle PPC_TDESC_ISA207_VSX.
1028 (initialize_low_tracepoint): Call
1029 init_registers_powerpc_isa207_vsx32l and
1030 init_registers_powerpc_isa207_vsx64l.
1031
7ca18ed6
EBM
10322018-10-26 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
1033 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1034
1035 * configure.srv (ipa_ppc_linux_regobj): Add
1036 powerpc-isa205-ppr-dscr-vsx32l-ipa.o and
1037 powerpc-isa205-ppr-dscr-vsx64l-ipa.o.
1038 (powerpc*-*-linux*): Add powerpc-isa205-ppr-dscr-vsx32l.o and
1039 powerpc-isa205-ppr-dscr-vsx64l.o to srv_regobj, add
1040 rs6000/power-dscr.xml, rs6000/power-ppr.xml,
1041 rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml and
1042 rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml to srv_xmlfiles.
1043 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
1044 <PPC_TDESC_ISA205_PPR_DSCR_VSX>: New enum value.
1045 (init_registers_powerpc_isa205_ppr_dscr_vsx32l)
1046 (init_registers_powerpc_isa205_ppr_dscr_vsx64l): Declare.
1047 * linux-ppc-low.c: Include "elf/common.h" and <sys/uio.h>.
1048 (ppc_hwcap): Add comment.
1049 (ppc_hwcap2): New global.
1050 (ppc_check_regset, ppc_fill_pprregset, ppc_store_pprregset)
1051 (ppc_fill_dscrregset, ppc_store_dscrregset): New functions.
1052 (ppc_regsets): Add entries for the DSCR and PPR regsets.
1053 (ppc_arch_setup): Get AT_HWCAP2. Set ppr_dscr in features struct
1054 when needed. Set sizes for the the DSCR and PPR regsets.
1055 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA205_PPR_DSCR_VSX.
1056 (initialize_low_arch): Call
1057 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
1058 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
1059 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
1060 PPC_TDESC_ISA205_PPR_DSCR_VSX.
1061 (initialize_low_tracepoint): Call
1062 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
1063 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
1064
5c849b22
PFC
10652018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1066
1067 * linux-ppc-low.c (ppc_fill_vrregset): Remove memset calls.
1068
8ecfd7bd
SDJ
10692018-10-10 Sergio Durigan Junior <sergiodj@redhat.com>
1070 Simon Marchi <simark@simark.ca>
1071
1072 * acinclude.m4: Include "../selftest.m4".
1073 * configure: Regenerate.
1074 * configure.ac: Use "GDB_AC_SELFTEST".
1075 * configure.srv: Use "$enable_unittests" instead of
1076 "$development" when checking whether unit tests have been
1077 enabled.
1078 * server.c (captured_main): Update message informing that
1079 selftests have been disabled.
1080
96643e35
TT
10812018-10-04 Tom Tromey <tom@tromey.com>
1082
1083 * configure: Rebuild.
1084
da4ae14a
TT
10852018-10-04 Tom Tromey <tom@tromey.com>
1086
1087 * server.c (handle_status): Rename inner "thread".
1088 (process_serial_event): Declare "res" in 'm' case.
1089 * linux-low.c (last_thread_of_process_p, find_lwp_pid)
1090 (iterate_over_lwps): Rename inner "thread".
1091 (linux_qxfer_libraries_svr4): Rename inner "len".
1092 * gdbthread.h (find_thread_in_random): Rename inner "thread".
1093
7c619dbd
GB
10942018-10-01 Gary Benson <gbenson@redhat.com>
1095
1096 * gdb_proc_service.h: Moved common code to
1097 common/gdb_proc_service.h.
1098
3795e814
GB
10992018-10-01 Gary Benson <gbenson@redhat.com>
1100
1101 * gdb_proc_service.h: Synchronize comments and whitespace with
1102 GDB's version of this file.
1103
49b036f1
TT
11042018-09-25 Tom Tromey <tom@tromey.com>
1105
1106 * configure: Rebuild.
1107 * configure.ac (WARN_CFLAGS): Don't remove -Wmissing-prototypes.
1108
8ff03f0b
SM
11092018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
1110
1111 * Makefile.in (gdbserver$(EXEEXT)): Sort OBS.
1112 (gdbreplay$(EXEEXT)): Sort GDBREPLAY_OBS.
1113 ($(IPA_LIB)): Sort IPA_OBJS.
1114
a1cd91dc
SM
11152018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
1116
1117 * Makefile.in: Remove references to $(ADD_DEPS).
1118
752312ba
TT
11192018-09-16 Tom Tromey <tom@tromey.com>
1120
1121 * remote-utils.c (remote_open): Use GNU style for metasyntactic
1122 variables.
1123 * gdbreplay.c (gdbreplay_usage): Use GNU style for metasyntactic
1124 variables.
1125
f1628857
TT
11262018-09-05 Tom Tromey <tom@tromey.com>
1127
1128 * configure: Rebuild.
1129
ad202fcc
SM
11302018-08-28 Simon Marchi <simon.marchi@polymtl.ca>
1131
1132 PR build/23399
1133 * tracepoint.c (IPA_SYM_STRUCT_NAME): Define.
1134
d3d8724a
TT
11352018-08-27 Tom Tromey <tom@tromey.com>
1136
1137 PR build/23087:
1138 * configure: Rebuild.
1139
b4f183d2
TT
11402018-08-27 Tom Tromey <tom@tromey.com>
1141
1142 * linux-s390-low.c (s390_emit_ext, s390_emit_litpool)
1143 (s390_emit_const, s390_emit_reg, s390_emit_zero_ext)
1144 (s390_emit_stack_adjust, s390_emit_set_r2, s390x_emit_ext)
1145 (s390x_emit_const, s390x_emit_reg, s390x_emit_zero_ext)
1146 (s390x_emit_stack_adjust): Add casts to unsigned char.
1147
4e2aa472
SM
11482018-08-22 Simon Marchi <simon.marchi@ericsson.com>
1149
1150 PR gdb/23374
1151 PR gdb/23375
1152 * server.h (struct client_state) <disable_randomization>:
1153 Initialize to 1.
1154
cf4088a9
SM
11552018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
1156
1157 * linux-mips-low.c (mips_collect_ptrace_register): Remove unused
1158 variable.
1159 (mips_supply_ptrace_register): Likewise.
1160
a0de763e
TT
11612018-07-22 Tom Tromey <tom@tromey.com>
1162
1163 * configure: Rebuild.
1164
b0a7723d
TT
11652018-07-22 Tom Tromey <tom@tromey.com>
1166
1167 * win32-low.c (win32_create_inferior): Remove unused variables.
1168 * gdbreplay.c (remote_open): Remove unused variable.
1169 * remote-utils.c (remote_prepare): Remove unused variable.
1170 * x86-tdesc.h (X86_TDESC_H): Define.
1171 (amd64_expedite_regs): Define conditionally.
1172 (i386_expedite_regs): Mark ATTRIBUTE_UNUSED.
1173 * linux-x86-tdesc.c (i386_tdescs): Move inside #if.
1174 * remote-utils.c (readchar): Remove unused variable.
1175
a780ef4f
PA
11762018-07-13 Pedro Alves <palves@redhat.com>
1177
1178 * linux-low.c (linux_kill): Change parameter to process_info
1179 pointer instead of pid. Adjust.
1180 * lynx-low.c (lynx_kill): Likewise.
1181 * nto-low.c (nto_kill): Likewise.
1182 * spu-low.c (spu_kill): Likewise.
1183 * win32-low.c (win32_kill): Likewise.
1184 * server.c (handle_v_kill, kill_inferior_callback)
1185 (detach_or_kill_for_exit): Adjust.
1186 * target.c (kill_inferior): Change parameter to process_info
1187 pointer instead of pid. Adjust.
1188 * target.h (struct target_ops) <kill>: Change parameter to
1189 process_info pointer instead of pid. Adjust all implementations
1190 and callers.
1191 (kill_inferior): Likewise.
1192
ef2ddb33
PA
11932018-07-13 Pedro Alves <palves@redhat.com>
1194
1195 * linux-low.c (linux_detach, linux_join): Change parameter to
1196 process_info pointer instead of pid. Adjust.
1197 * lynx-low.c (lynx_detach, lynx_join): Likewise.
1198 * nto-low.c (nto_detach): Likewise.
1199 * spu-low.c (spu_detach, spu_join): Likewise.
1200 * win32-low.c (win32_detach, win32_join): Likewise.
1201 * server.c (handle_detach, detach_or_kill_for_exit): Adjust.
1202 * target.h (struct target_ops) <detach, join>: Change parameter to
1203 process_info pointer instead of pid. Adjust all implementations
1204 and callers.
1205 (detach_inferior, join_inferior): Rename 'pid' parameter to
1206 'proc'.
1207
c7ab0aef
SDJ
12082018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
1209 Jan Kratochvil <jan.kratochvil@redhat.com>
1210 Paul Fertser <fercerpav@gmail.com>
1211 Tsutomu Seki <sekiriki@gmail.com>
1212
1213 * Makefile.in (SFILES): Add '$(srcdir)/common/netstuff.c'.
1214 (OBS): Add 'common/netstuff.o'.
1215 (GDBREPLAY_OBS): Likewise.
1216 * gdbreplay.c: Include 'wspiapi.h' and 'netstuff.h'.
1217 (remote_open): Implement support for IPv6
1218 connections.
1219 * remote-utils.c: Include 'netstuff.h', 'filestuff.h'
1220 and 'wspiapi.h'.
1221 (handle_accept_event): Accept connections from IPv6 sources.
1222 (remote_prepare): Handle IPv6-style hostnames; implement
1223 support for IPv6 connections.
1224 (remote_open): Implement support for printing connections from
1225 IPv6 sources.
1226
31445d10
PA
12272018-07-11 Pedro Alves <palves@redhat.com>
1228
1229 PR gdb/23377
1230 * mem-break.c (any_persistent_commands): Add process_info
1231 parameter and use it instead of relying on the current process.
1232 Change return type to bool.
1233 * mem-break.h (any_persistent_commands): Add process_info
1234 parameter and change return type to bool.
1235 * server.c (handle_detach): Remove require_running_or_return call.
1236 Look up the process_info for the process we're about to detach.
1237 If not found, return back error to GDB. Adjust
1238 any_persistent_commands call to pass down a process pointer.
1239
cb197132
PA
12402018-07-11 Pedro Alves <palves@redhat.com>
1241
1242 * i387-fp.c (i387_cache_to_fsave, cache_to_fxsave)
1243 (i387_cache_to_xsave): Use regcache_raw_get_unsigned_by_name
1244 instead of collect_register_by_name.
1245 * regcache.c (regcache_raw_get_unsigned_by_name): New.
1246 * regcache.h (regcache_raw_get_unsigned_by_name): New.
1247
1b919490
VB
12482018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
1249 Pedro Alves <palves@redhat.com>
1250
1251 * linux-low.c (initialize_low): Call linux_proc_init_warnings.
1252
d7e15655
TT
12532018-07-03 Tom Tromey <tom@tromey.com>
1254
1255 * linux-low.c: Update.
1256 * lynx-low.c: Update.
1257 * mem-break.c: Update.
1258 * nto-low.c: Update.
1259 * remote-utils.c: Update.
1260 * server.c: Update.
1261 * spu-low.c: Update.
1262 * target.c: Update.
1263 * win32-low.c: Update.
1264
26a57c92
TT
12652018-07-03 Tom Tromey <tom@tromey.com>
1266
1267 * server.c: Update.
1268
0e998d96
TT
12692018-07-03 Tom Tromey <tom@tromey.com>
1270
1271 * linux-low.c: Update.
1272
cc6bcb54
TT
12732018-07-03 Tom Tromey <tom@tromey.com>
1274
1275 * target.c: Update.
1276
e38504b3
TT
12772018-07-03 Tom Tromey <tom@tromey.com>
1278
1279 * linux-low.c: Update.
1280 * linux-mips-low.c: Update.
1281 * lynx-low.c: Update.
1282 * nto-low.c: Update.
1283 * remote-utils.c: Update.
1284 * server.c: Update.
1285 * spu-low.c: Update.
1286 * target.c: Update.
1287 * thread-db.c: Update.
1288
e99b03dc
TT
12892018-07-03 Tom Tromey <tom@tromey.com>
1290
1291 * linux-low.c: Update.
1292 * linux-mips-low.c: Update.
1293 * lynx-low.c: Update.
1294 * mem-break.c: Update.
1295 * nto-low.c: Update.
1296 * remote-utils.c: Update.
1297 * server.c: Update.
1298 * spu-low.c: Update.
1299 * target.c: Update.
1300 * tracepoint.c: Update.
1301
f2907e49
TT
13022018-07-03 Tom Tromey <tom@tromey.com>
1303
1304 * linux-low.c: Update.
1305 * linux-ppc-low.c: Update.
1306 * linux-x86-low.c: Update.
1307 * proc-service.c: Update.
1308 * server.c: Update.
1309 * spu-low.c: Update.
1310 * thread-db.c: Update.
1311 * win32-low.c: Update.
1312
fd79271b
TT
13132018-07-03 Tom Tromey <tom@tromey.com>
1314
1315 * linux-low.c: Update.
1316 * lynx-low.c: Update.
1317 * nto-low.c: Update.
1318 * remote-utils.c: Update.
1319 * spu-low.c: Update.
1320 * thread-db.c: Update.
1321 * win32-low.c: Update.
1322
c0867626
SDJ
13232018-06-29 Joel Brobecker <brobecker@adacore.com>
1324
1325 * linux-x86-tdesc.c (amd64_linux_read_description): Add missing
1326 parameter in call to 'amd64_create_target_description'.
1327
2512d7ef
JK
13282018-06-28 Jan Kratochvil <jan.kratochvil@redhat.com>
1329
1330 * x86-tdesc.h: Remove executable permission flag.
1331
d0ac1c44
SM
13322018-06-19 Simon Marchi <simon.marchi@ericsson.com>
1333
1334 * configure.ac: Remove AC_PREREQ, add missing quoting.
1335 * configure: Re-generate.
1336 * config.in: Re-generate.
1337 * aclocal.m4: Re-generate.
1338
c4eb05ff
SM
13392018-06-18 Simon Marchi <simon.marchi@ericsson.com>
1340
1341 * tracepoint.h (current_traceframe): Remove declaration.
1342
02895270
AH
13432018-06-18 Alan Hayward <alan.hayward@arm.com>
1344
1345 * linux-aarch64-low.c (is_sve_tdesc): New function.
1346 (aarch64_sve_regs_copy_to_regcache): Likewise.
1347 (aarch64_sve_regs_copy_from_regcache): Likewise.
1348 (aarch64_regs_info): Add SVE checks.
1349 (initialize_low_arch): Initialize SVE.
1350
e9902bfc
AH
13512018-06-18 Alan Hayward <alan.hayward@arm.com>
1352
1353 * Makefile.in: Add aarch64-sve-linux-ptrace.c.
1354
fefa175e
AH
13552018-06-11 Alan Hayward <alan.hayward@arm.com>
1356
1357 * linux-aarch64-ipa.c (get_ipa_tdesc): Add null VQ param.
1358 (initialize_low_tracepoint): Likewise
1359 * linux-aarch64-low.c (aarch64_arch_setup): Get VQ.
1360 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Add null VQ
1361 param.
1362 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add VQ
1363 checks.
1364 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Add VQ.
1365
b91ad3ff
AH
13662018-06-11 Alan Hayward <alan.hayward@arm.com>
1367
1368 * server.h (PBUFSIZ): Increase size
1369
f868386e
AH
13702018-06-11 Alan Hayward <alan.hayward@arm.com>
1371
1372 * regcache.c (regcache::raw_compare): New function.
1373 * regcache.h (regcache::raw_compare): New declaration.
1374
9c861883
AH
13752018-06-11 Alan Hayward <alan.hayward@arm.com>
1376
1377 * regcache.c (new_register_cache): Use new.
1378 (free_register_cache): Use delete.
1379 (register_data): Use const.
1380 (supply_register): Move body inside regcache.
1381 (regcache::raw_supply): New override function.
1382 (collect_register): Move body inside regcache.
1383 (regcache::raw_collect): New override function.
1384 (regcache::get_register_status): New override function.
1385 * regcache.h (struct regcache): Inherit from reg_buffer_common.
1386
40591844
TT
13872018-06-09 Tom Tromey <tom@tromey.com>
1388
1389 * event-loop.c (gdb_event, gdb_event_p): Remove typedefs. Don't
1390 declare queue.
1391 (event_queue): Use std::queue.
1392 (gdb_event_xfree): Remove.
1393 (initialize_event_loop, process_event, wait_for_event): Update.
1394
6341380d
SC
13952018-06-08 Stan Cox <scox@redhat.com>
1396
1397 * win32-low.c (win32_create_inferior): last_ptid and last_status
1398 moved to client_state.
1399
03349c93
PA
14002018-06-08 Pedro Alves <palves@redhat.com>
1401
1402 * Makefile.in (GDBREPLAY_OBS): Add common/cleanups.o,
1403 common/common-exceptions.o, common/common-utils.o,
1404 common/errors.o, common/print-utils.o and utils.o.
1405 * gdbreplay.c: Include "common-defs.h" instead of the two
1406 'config.h's here. Don't include stdio.h, errno.h, stdlib.h,
1407 string.h or alloca.h.
1408 (perror_with_name): Delete.
1409 (remote_open): Use xstrdup instead of strdup.
1410 (main): Rename to ...
1411 (captured_main): ... this.
1412 (main): New.
1413
8dcc53b3
TT
14142018-06-08 Tom Tromey <tom@tromey.com>
1415
1416 * linux-low.c (linux_low_read_btrace): Update.
1417
c12a5089
SC
14182018-06-04 Stan Cox <scox@redhat.com>
1419
1420 * server.h (struct client_state): New.
1421 * server.c (cont_thread, general_thread, multi_process)
1422 (report_fork_events, report_vfork_events, report_exec_events)
1423 (report_thread_events, swbreak_feature, hwbreak_feature)
1424 (vCont_supported, disable_randomization, pass_signals)
1425 (program_signals, program_signals_p, last_status, last_ptid, own_buf):
1426 Moved to client_state.
1427 * remote-utils.c (remote_debug, noack_mode)
1428 (transport_is_reliable): Moved to client_state.
1429 * tracepoint.c (current_traceframe): Moved to client_state.
1430
1431 Update all callers.
1432 * server.c, remote-utils.c, tracepoint.c, fork-child.c,
1433 linux-low.c, remote-utils.h, target.c: Use client_state.
1434
122394f1
AH
14352018-05-31 Alan Hayward <alan.hayward@arm.com>
1436
1437 * configure.srv: Add new c/h file.
1438
95228a0d
AH
14392018-05-31 Alan Hayward <alan.hayward@arm.com>
1440
1441 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add
1442 null VQ.
1443
d8dab6c3
MR
14442018-05-25 Maciej W. Rozycki <macro@mips.com>
1445
1446 * gdb.arch/mips-fpregset-core.exp: New test.
1447 * gdb.arch/mips-fpregset-core.c: New test source.
1448
81e25b7c
EK
14492018-05-23 Erik Kurzinger <ekurzinger@nvidia.com>
1450
1451 PR server/23198
1452 * hostio.c (require_int): Do not report overflow for integers
1453 between 0xfffffff and 0x7fffffff.
1454
7e947ad3
MR
14552018-05-22 Maciej W. Rozycki <macro@mips.com>
1456
1457 * linux-mips-low.c [HAVE_PTRACE_GETREGS] (mips_collect_register)
1458 (mips_supply_register): Move outside HAVE_PTRACE_GETREGS.
1459 (mips_collect_ptrace_register, mips_supply_ptrace_register): New
1460 functions.
1461 (the_low_target): Wire them.
1462
1d75a658
PFC
14632018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1464
1465 * linux-ppc-low.c (ppc_fill_vrregset): Add vscr_offset variable.
1466 Set vscr_offset to 0 in little-endian mode and 12 in big-endian
1467 mode. Call collect_register_by_name with vscr using
1468 vscr_offset. Zero-pad vscr and vrsave fields in collector buffer.
1469 (ppc_store_vrregset): Add and set vscr_offset variable as in
1470 ppc_fill_vrregset. Call supply_register_by_name with vscr using
1471 vscr_offset.
1472
d078308a
PFC
14732018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1474
1475 * linux-ppc-low.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
1476 (ppc_arch_setup): Change SIZEOF_VRREGS and SIZEOF_VSXREGS to
1477 PPC_LINUX_SIZEOF_VRREGSET and PPC_LINUX_SIZEOF_VSXREGSET.
1478
7273b5fc
PFC
14792018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1480
1481 * linux-ppc-low.c (ppc_fill_vsxregset): Remove ppc_hwcap check.
1482 (ppc_store_vsxregset): Likewise.
1483 (ppc_fill_vrregset): Likewise.
1484 (ppc_store_vrregset): Likewise.
1485 (ppc_fill_evrregset): Likewise.
1486 (ppc_store_evrregset): Likewise.
1487 (ppc_regsets): Set VSX/VR/EVR regset sizes to 0.
1488 (ppc_arch_setup): Iterate through ppc_regsets and set sizes when
1489 needed.
1490
2e077f5e
PFC
14912018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1492
1493 * linux-ppc-low.c (ppc_arch_setup): Remove code for getting the
1494 wordsize of the inferior. Call ppc_linux_target_wordsize.
1495
bd64614e
PFC
14962018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1497
1498 * configure.srv (srv_tgtobj): Add arch/ppc-linux-common.o.
1499 * Makefile.in (SFILES): Add arch/ppc-linux-common.c.
1500 * linux-ppc-tdesc.h: Rename to linux-ppc-tdesc-init.h.
1501 * linux-ppc-tdesc-init.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
1502 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
1503 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
1504 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
1505 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
1506 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
1507 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
1508 (tdesc_powerpc_e500l): Remove.
1509 * linux-ppc-ipa.c: Include arch/ppc-linux-tdesc.h and
1510 linux-ppc-tdesc-init.h. Don't include linux-ppc-tdesc.h.
1511 * linux-ppc-low.c: Include arch/ppc-linux-common.h,
1512 arch/ppc-linux-tdesc.h, and linux-ppc-tdesc-init.h. Don't include
1513 linux-ppc-tdesc.h.
1514 (ppc_arch_setup): Remove target description matching code. Fill a
1515 ppc_linux_features struct and call ppc_linux_match_description
1516 with it.
1517
75d74cca
MR
15182018-05-22 Maciej W. Rozycki <macro@mips.com>
1519
1520 * linux-mips-low.c (mips_cannot_fetch_register): Return 1 if the
1521 width of the requested register exceeds the width of the
1522 `ptrace' data type.
1523 (mips_cannot_store_register): Likewise.
1524
e4439e43
MR
15252018-05-21 Maciej W. Rozycki <macro@mips.com>
1526
1527 * linux-mips-low.c (mips_fetch_register): New function. Update
1528 preceding comment.
1529 (mips_store_gregset): Supply 0 rather than $restart for $zero.
1530 (the_low_target): Wire `mips_fetch_register'.
1531
55271bf9
JB
15322018-05-10 Joel Brobecker <brobecker@adacore.com>
1533
1534 * lynx-i386-low.c (LYNXOS_178): New macro.
1535 [LYNXOS_178] (usr_fcontext_t): Provide a definition that matches
1536 the layout on LynxOS-178.
1537 (lynx_i386_fill_fpregset, lynx_i386_store_fpregset): Do not
1538 handle floating point registers that are not supported by
1539 LynxOS-178.
1540
1a34f210
TT
15412018-05-10 Tom Tromey <tom@tromey.com>
1542
1543 * configure: Rebuild.
1544
190852c8
JB
15452018-05-10 Joel Brobecker <brobecker@adacore.com>
1546
1547 PR server/23158:
1548 * tdesc.h (init_target_desc) <expedite_regs>: New parameter.
1549 * tdesc.c (init_target_desc) <expedite_regs>: New parameter.
1550 Use it to set the expedite_regs field in the given tdesc.
1551 * x86-tdesc.h: New file.
1552 * linux-aarch64-tdesc.c (aarch64_linux_read_description):
1553 Adjust following the addition of the new expedite_regs parameter
1554 to init_target_desc.
1555 * linux-tic6x-low.c (tic6x_read_description): Likewise.
1556 * linux-x86-tdesc.c: #include "x86-tdesc.h".
1557 (i386_linux_read_description, amd64_linux_read_description):
1558 Adjust following the addition of the new expedite_regs parameter
1559 to init_target_desc.
1560 * lynx-i386-low.c: #include "x86-tdesc.h".
1561 (lynx_i386_arch_setup): Adjust following the addition of the new
1562 expedite_regs parameter to init_target_desc.
1563 * nto-x86-low.c: #include "x86-tdesc.h".
1564 (nto_x86_arch_setup): Adjust following the addition of the new
1565 expedite_regs parameter to init_target_desc.
1566 * win32-i386-low.c: #include "x86-tdesc.h".
1567 (i386_arch_setup): Adjust following the addition of the new
1568 expedite_regs parameter to init_target_desc.
1569
7dbac825
JB
15702018-05-10 Joel Brobecker <brobecker@adacore.com>
1571
1572 PR server/23158:
1573 * win32-low.c (win32_create_inferior): Add call to my_wait
1574 setting last_status global.
1575
906994d9
JB
15762018-05-10 Joel Brobecker <brobecker@adacore.com>
1577
1578 PR server/23158:
1579 * win32-low.c (create_process): Only call gdb_tilde_expand if
1580 inferior_cwd is not NULL.
1581
8ee22052
AB
15822018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
1583
1584 * i387-fp.c (i387_cache_to_xsave): Only write x87 control
1585 registers to the cache if their values have changed.
1586 (i387_xsave_to_cache): Provide default values for x87 control
1587 registers when these features are available, but disabled.
1588 * regcache.c (supply_register_by_name_zeroed): New function.
1589 * regcache.h (supply_register_by_name_zeroed): Declare new
1590 function.
1591
aff689d3
TT
15922018-05-07 Tom Tromey <tom@tromey.com>
1593
1594 * configure: Rebuild.
1595
85e26832
TT
15962018-05-04 Tom Tromey <tom@tromey.com>
1597
1598 * configure: Rebuild.
1599
a3b60e45
JK
16002018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
1601 Pedro Alves <palves@redhat.com>
1602
1603 * linux-aarch64-low.c (aarch64_stopped_data_address):
1604 Likewise.
1605
632e107b
TT
16062018-04-27 Tom Tromey <tom@tromey.com>
1607
1608 * configure: Rebuild.
1609
458412c3
TT
16102018-04-23 Tom Tromey <tom@tromey.com>
1611
1612 * configure: Rebuild.
1613
f31c089e
SM
16142018-04-19 Simon Marchi <simon.marchi@ericsson.com>
1615
1616 * Makefile.in (depcomp): Add "..".
1617 (all_deps_files): New and use it.
1618
b319b098
AH
16192018-04-18 Alan Hayward <alan.hayward@arm.com>
1620
1621 * configure.srv (aarch64*-*-linux*): Don't include xml.
1622 (i[34567]86-*-cygwin*): Likewise.
1623 (i[34567]86-*-linux*): Likewise.
1624 (i[34567]86-*-lynxos*): Likewise.
1625 (i[34567]86-*-mingw32ce*): Likewise.
1626 (i[34567]86-*-mingw*): Likewise.
1627 (i[34567]86-*-nto*): Likewise.
1628 (tic6x-*-uclinux): Likewise.
1629 (x86_64-*-linux*): Likewise.
1630 (x86_64-*-mingw*): Likewise.
1631 (x86_64-*-cygwin*): Likewise.
1632
3b74854b
AH
16332018-04-18 Alan Hayward <alan.hayward@arm.com>
1634
1635 * tdesc.c: Remove xml parameter.
1636
e98577a9
AH
16372018-04-18 Alan Hayward <alan.hayward@arm.com>
1638
1639 * server.c (get_features_xml): Remove cast.
1640 * tdesc.c (void target_desc::accept): Fill in function.
1641 (tdesc_get_features_xml): Remove old xml creation.
1642 (print_xml_feature::visit_pre): Add xml vistor.
1643 * tdesc.h (struct target_desc): Make xmltarget mutable.
1644 (tdesc_get_features_xml): Remove declaration.
1645
d278f585
AH
16462018-04-18 Alan Hayward <alan.hayward@arm.com>
1647
1648 * tdesc.c (tdesc_architecture_name): Add new function.
1649 (tdesc_osabi_name): Likewise.
1650 (tdesc_get_features_xml): Use new functions.
1651
eee8a18d
AH
16522018-04-18 Alan Hayward <alan.hayward@arm.com>
1653
1654 * tdesc.c (tdesc_create_flags): Remove.
1655 (tdesc_add_flag): Likewise.
1656 (tdesc_named_type): Likewise.
1657 (tdesc_create_union): Likewise.
1658 (tdesc_create_struct): Likewise.
1659 (tdesc_create_vector): Likewise.
1660 (tdesc_add_bitfield): Likewise.
1661 (tdesc_add_field): Likewise.
1662 (tdesc_set_struct_size): Likewise.
1663
82ec9bc7
AH
16642018-04-18 Alan Hayward <alan.hayward@arm.com>
1665
1666 * tdesc.c (~target_desc): Remove implictly deleted items.
1667 (init_target_desc): Iterate all features.
1668 (tdesc_get_features_xml): Use vector.
1669 (tdesc_create_feature): Create feature.
1670 * tdesc.h (tdesc_feature) Remove
1671 (target_desc): Add features.
1672
ea3e7d71
AH
16732018-04-18 Alan Hayward <alan.hayward@arm.com>
1674
1675 * Makefile.in: Add common/tdesc.c
1676 * tdesc.c (init_target_desc): init all reg_defs from register
1677 vector.
1678 (tdesc_create_reg): Create tdesc_reg.
1679 * tdesc.h (tdesc_feature): Add register vector.
1680
17d08cd4
SM
16812018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
1682
1683 * tdesc.h (struct target_desc) <features>: Change type to
1684 std::vector<std::string>.
1685 * tdesc.c (target_desc::~target_desc): Adjust to std::vector
1686 changes.
1687 (tdesc_get_features_xml): Likewise.
1688 (tdesc_create_feature): Likewise.
1689
5cd3e386
AH
16902018-03-26 Alan Hayward <alan.hayward@arm.com>
1691
1692 * regcache.c (find_register_by_number): Return a ref.
1693 (find_regno): Use references.
1694 (register_size): Likewise.
1695 (register_data): Likewise.
1696 * tdesc.c (target_desc::~target_desc): Remove free calls.
1697 (target_desc::operator==): Use std::vector compare.
1698 (init_target_desc): Use reference.
1699 (tdesc_create_reg): Use reg constructors.
1700 * tdesc.h (struct target_desc): Replace pointer with object.
1701
dff7492c
AH
17022018-03-23 Alan Hayward <alan.hayward@arm.com>
1703
1704 * regcache.c (find_register_by_number): Make static.
1705 (find_regno): Use find_register_by_number
1706 * regcache.h (struct reg): Remove declaration.
1707
d80e5242
AH
17082018-03-23 Alan Hayward <alan.hayward@arm.com>
1709
1710 * tdesc.c (target_desc::~target_desc): Move to here.
1711 (target_desc::operator==): Likewise.
1712 * tdesc.h (target_desc::~target_desc): Move from here.
1713 (target_desc::operator==): Likewise.
1714
f69c5afb
AA
17152018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
1716
1717 * linux-s390-low.c (s390_get_wordsize): Correct brace style.
1718
ce29f843
AA
17192018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1720
1721 * linux-s390-ipa.c (get_ipa_tdesc): Add handling for
1722 S390_TDESC_GS.
1723 * linux-s390-low.c (s390_get_ipa_tdesc_idx): Likewise.
1724 (initialize_low_tracepoint): Call init_registers_s390x_gs_linux64
1725 and init_registers_s390_gs_linux64.
1726
c49bd90b
AA
17272018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1728
1729 * linux-s390-low.c (s390_fill_gs): Remove function.
1730 (s390_fill_gsbc): Remove function.
1731 (s390_regsets): Set fill functions for the guarded storage regsets
1732 to NULL.
1733
7edb9bd3
AA
17342018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1735
1736 * linux-s390-low.c (s390_get_hwcap): Replace tdesc parameter by
1737 the word size. Add comment.
1738 (s390_get_wordsize): New function.
1739 (s390_arch_setup): No longer select a temporary tdesc to fetch the
1740 pswm with it. Instead, use s390_get_wordsize to determine the
1741 word size first and derive the correct tdesc from that directly.
1742
39be3c7e
SM
17432018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
1744
1745 * Makefile.in: Include silent-rules.mk.
1746 (srcdir, abs_top_srcdir, abs_srcdir, VPATH): Move up.
1747 (COMPILE): Add ECHO_CXX.
1748 (gdbserver$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
1749 (gdbreplay$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
1750 ($(IPA_LIB)): Add SILENCE and ECHO_CXXLD.
1751 (version-generated.c): Add ECHO_GEN.
1752 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN_GENERATED.
1753 (IPAGENT_COMPILE): Add ECHO_CXX.
1754 (%-generated.c): Add ECHO_REGDAT.
1755
3ae9ce5d
TT
17562018-03-14 Tom Tromey <tom@tromey.com>
1757
1758 PR cli/14977:
1759 * ax.c (ax_printf): Special case for NULL.
1760
e6a58aa8
SM
17612018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
1762
1763 * linux-low.c (linux_qxfer_libraries_svr4): Use
1764 xml_escape_text_append.
1765
f6e8a41e
SM
17662018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
1767
1768 * linux-low.c (linux_qxfer_libraries_svr4): Use std::string.
1769
b9671caf
SM
17702018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
1771
1772 * server.c (handle_general_set): Remove unnecessary xstrdup.
1773
e80aaf61
SM
17742018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
1775
1776 * server.c (parse_debug_format_options): Adjust to
1777 delim_string_to_char_ptr_vec changes.
1778 * thread-db.c (thread_db_load_search): Adjust to
1779 dirnames_to_char_ptr_vec changes.
1780
b1223e78
MM
17812018-03-01 Markus Metzger <markus.t.metzger@intel.com>
1782
1783 * target.h (target_enable_btrace, target_disable_btrace)
1784 (target_read_btrace, target_read_btrace_conf): Turn macro into
1785 inline function. Throw error if target method is not defined.
1786 * server.c (handle_qxfer_btrace handle_qxfer_btrace_conf): Remove
1787 check for btrace target method. Be prepared to handle exceptions
1788 from btrace target methods.
1789
81561546
SDJ
17902018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
1791
1792 * server.c (captured_main): Change order of error message printed
1793 when the current working directory cannot be found.
1794
25e3c82c
SDJ
17952018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
1796
1797 * server.c: Include "filenames.h" and "pathstuff.h".
1798 (program_name): Delete variable.
1799 (program_path): New anonymous class.
1800 (get_exec_wrapper): Use "program_path" instead of
1801 "program_name".
1802 (handle_v_run): Likewise.
1803 (captured_main): Likewise.
1804 (process_serial_event): Likewise.
1805
b4987c95
SDJ
18062018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
1807
1808 * Makefile.in (SFILES): Add "$(srcdir)/common/pathstuff.c".
1809 (OBJS): Add "pathstuff.o".
1810 * server.c (current_directory): New global variable.
1811 (captured_main): Initialize "current_directory".
1812
f46cd62a
AH
18132018-02-26 Alan Hayward <alan.hayward@arm.com>
1814
1815 * tdesc.c: Use common/tdesc.h.
1816 * tdesc.h: Likewise.
1817
a543c5ca
AH
18182018-02-20 Alan Hayward <alan.hayward@arm.com>
1819 Simon Marchi <simon.marchi@ericsson.com>
1820
1821 * Makefile.in: Switch order of make rules.
1822
b5884fa7
AH
18232018-02-19 Alan Hayward <alan.hayward@arm.com>
1824
1825 * Makefile.in: Add common directory in build.
1826 * configure.ac: Add common reference.
1827 * configure: Regenerate.
1828
de6242d3
MM
18292018-02-09 Markus Metzger <markus.t.metzger@intel.com>
1830
1831 * linux-low.c (linux_target_ops): Remove linux_supports_btrace.
1832 * nto-low.c (nto_target_ops): Remove NULL for supports_btrace.
1833 * spu-low.c (spu_target_ops): Likewise.
1834 * win32-low.c (win32_target_ops): Likewise.
1835 * server.c (supported_btrace_packets): Report packets unconditionally.
1836 * target.h (target_ops) <supports_btrace>: Remove.
1837 (target_supports_btrace): Remove.
1838
9ee23a85
MM
18392018-02-09 Markus Metzger <markus.t.metzger@intel.com>
1840
1841 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt)
1842 (handle_btrace_disable): Change return type to void. Use exceptions
1843 to report errors.
1844 (handle_btrace_general_set): Catch exception and copy message to
1845 return message.
1846
8ce47547
TT
18472018-02-08 Tom Tromey <tom@tromey.com>
1848
1849 * linux-low.c (install_software_single_step_breakpoints): Use
1850 make_scoped_restore.
1851 * inferiors.c (make_cleanup_restore_current_thread): Remove.
1852 (do_restore_current_thread_cleanup): Remove.
1853 * gdbthread.h (make_cleanup_restore_current_thread): Don't
1854 declare.
1855
45dd3607
TT
18562018-02-08 Tom Tromey <tom@tromey.com>
1857
1858 * mem-break.c (set_raw_breakpoint_at): Use
1859 gdb::unique_xmalloc_ptr.
1860
e671cd59
PA
18612018-01-30 Pedro Alves <palves@redhat.com>
1862
1863 PR gdb/13211
1864 * target.c (target_terminal::terminal_state): Rename to ...
1865 (target_terminal::m_terminal_state): ... this.
1866
a0aad537
JC
18672018-01-19 James Clarke <jrtc27@jrtc27.com>
1868
1869 * linux-low.c (handle_extended_wait): Surround call to
1870 thread_db_notice_clone with #ifdef USE_THREAD_DB.
1871
4d9b86e1
SM
18722018-01-17 Simon Marchi <simon.marchi@ericsson.com>
1873
1874 * linux-low.c (attach_proc_task_lwp_callback): Adjust to
1875 linux_ptrace_attach_fail_reason_string now returning an
1876 std::string.
1877 (linux_attach): Likewise.
1878 * thread-db.c (attach_thread): Likewise.
1879
f517c180
EA
18802018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
1881
1882 PR gdb/21559
1883 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
1884 checking for fs_base/gs_base fields in struct user_regs_struct.
1885 * configure: Regenerate.
1886
9a70f35c
YQ
18872018-01-16 Yao Qi <yao.qi@linaro.org>
1888
1889 PR gdb/18749
1890 * linux-low.c (fetch_register): Call supply_register instead of
1891 error.
1892
605fd3c6
YQ
18932018-01-08 Yao Qi <yao.qi@linaro.org>
1894 Simon Marchi <simon.marchi@ericsson.com>
1895
1896 * Makefile.in (OBS): Remove selftest.o.
1897 * configure.ac: Set srv_selftest_objs if $development is true.
1898 (GDBSERVER_DEPFILES): Append $srv_selftest_objs.
1899 * configure: Re-generated.
1900 * server.c (captured_main): Wrap variable selftest_filter with
1901 GDB_SELF_TEST.
1902
2cc05030
SM
19032018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
1904
1905 * server.c (parse_debug_format_options): Return std::string.
1906 (handle_monitor_command, captured_main): Adjust.
1907
e379cee6
PA
19082018-01-05 Pedro Alves <palves@redhat.com>
1909
1910 PR gdb/18653
1911 * server.c (captured_main): Pass quiet=false to
1912 save_original_signals_state.
1913
82e1e79a
JB
19142018-01-01 Joel Brobecker <brobecker@adacore.com>
1915
1916 * gdbreplay.c (gdbreplay_version): Update copyright year in
1917 version message.
1918 * server.c (gdbserver_version): Likewise.
1919
8e481c3b
TT
19202017-12-08 Tom Tromey <tom@tromey.com>
1921
1922 * ax.c (ax_printf): Update.
1923
a8806230
YQ
19242017-12-07 Yao Qi <yao.qi@linaro.org>
1925
1926 * linux-aarch64-ipa.c (initialize_low_tracepoint): Call
1927 aarch64_linux_read_description.
1928 * linux-amd64-ipa.c (idx2mask): New array.
1929 (get_ipa_tdesc): Move idx2mask out.
1930 (initialize_low_tracepoint): Initialize target descriptions.
1931 * linux-i386-ipa.c (idx2mask): New array.
1932 (get_ipa_tdesc): Move idx2mask out.
1933 (initialize_low_tracepoint): Initialize target descriptions.
1934
d4a0e8b5
SM
19352017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
1936
1937 * tdesc.c (struct tdesc_type): Change return type.
1938 (tdesc_add_flag): Change parameter type.
1939 (tdesc_add_bitfield): Likewise.
1940 (tdesc_add_field): Likewise.
1941 (tdesc_set_struct_size): Likewise.
1942
798a7429
SM
19432017-12-05 Simon Marchi <simon.marchi@ericsson.com>
1944
1945 * regcache.c (registers_to_string): Remove unused variable.
1946
c0e15c9b
SM
19472017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1948
1949 * inferiors.c (for_each_inferior_with_data): Remove.
1950 * inferiors.h (for_each_inferior_with_data): Remove.
1951 * server.c (handle_qxfer_threads_worker): Change parameter type.
1952 (handle_qxfer_threads_proper): Use for_each_thread.
1953
f0045347
SM
19542017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1955
1956 * inferiors.c (for_each_inferior): Remove.
1957 (clear_inferiors): Use for_each_thread.
1958 * inferiors.h (for_each_inferior): Remove.
1959 * linux-low.c (linux_wait_for_event_filtered): Use
1960 for_each_thread.
1961 (linux_stabilize_threads): Likewise.
1962 * regcache.c (regcache_release): Likewise.
1963 * server.c (gdb_wants_all_threads_stopped): Likewise.
1964 (clear_pending_status_callback): Remove.
1965 (handle_status): Use for_each_thread.
1966 (captured_main): Likewise.
1967 * win32-low.c (child_init_thread_list): Likewise.
1968 (win32_clear_inferiors): Likewise.
1969 (fake_breakpoint_event): Likewise.
1970
9521758b
SM
19712017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1972
1973 * inferiors.h (find_inferior): Remove.
1974 * inferiors.c (find_inferior): Remove.
1975
8f86d7aa
SM
19762017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1977
1978 * linux-low.c (resume_status_pending_p): Update comment.
1979 (need_step_over_p): Update comment.
1980
e2b44075
SM
19812017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1982
1983 * linux-low.c (proceed_one_lwp): Return void, change parameter
1984 type.
1985 (unsuspend_and_proceed_one_lwp): Likewise.
1986 (proceed_all_lwps): Use for_each_thread.
1987 (unstop_all_lwps): Likewise.
1988
c80825ff
SM
19892017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1990
1991 * linux-low.c (linux_resume_one_thread): Return void, take
1992 parameter directly.
1993 (linux_resume): Use for_each_thread.
1994
df3e4dbe
SM
19952017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1996
1997 * linux-low.c (send_sigstop_callback): Return void, change
1998 parameter type. Rename to...
1999 (send_sigstop): ... this.
2000 (suspend_and_send_sigstop_callback): Return void, change parameter
2001 type. Rename to...
2002 (suspend_and_send_sigstop): ... this.
2003 (stop_all_lwps): Use for_each_thread.
2004
5a6b0a41
SM
20052017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2006
2007 * linux-low.c (lwp_running): Return bool, remove unused
2008 argument.
2009 (linux_stabilize_threads): Use find_thread.
2010
39a64da5
SM
20112017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2012
2013 * linux-low.c (select_singlestep_lwp_callback): Remove.
2014 (count_events_callback): Remove.
2015 (select_event_lwp_callback): Remove.
2016 (select_event_lwp): Use find_thread/for_each_thread.
2017
a1385b7b
SM
20182017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2019
2020 * linux-low.c (not_stopped_callback): Return bool, take filter
2021 argument directly.
2022 (linux_wait_for_event_filtered): Use find_thread.
2023 (linux_wait_1): Likewise.
2024
454296a2
SM
20252017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2026
2027 * linux-low.c (same_lwp): Remove.
2028 (find_lwp_pid): Use find_thread.
2029
6b2a85da
SM
20302017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2031
2032 * linux-low.c (delete_lwp_callback): Remove.
2033 (linux_mourn): Use for_each_thread.
2034
798a38e8
SM
20352017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2036
2037 * linux-low.c (linux_detach_lwp_callback): Return void, remove
2038 args parameter, don't check for pid.
2039 (linux_detach): Use for_each_thread.
2040
e4eb0dec
SM
20412017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2042
2043 * linux-low.c (struct counter): Remove.
2044 (second_thread_of_pid_p): Remove.
2045 (last_thread_of_process_p): Use find_thread.
2046
83e1b6c1
SM
20472017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2048
2049 * inferiors.c (find_inferior_in_random): Remove.
2050 * inferiors.h (find_inferior_in_random): Remove.
2051 * linux-low.c (status_pending_p_callback): Return bool, accept
2052 parameter ptid directly.
2053 (linux_wait_for_event_filtered): Use find_thread_in_random.
2054 (linux_wait_1): Likewise.
2055
8dc7b443
SM
20562017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2057
2058 * inferiors.c (find_inferior_id): Remove.
2059 (find_thread_ptid): Move implemention from find_inferior_id to
2060 here.
2061 * inferiors.h (find_inferior_id): Remove.
2062 * server.c (handle_status): Use find_thread_ptid.
2063 (process_serial_event): Likewise.
2064 * thread-db.c (find_one_thread): Likewise.
2065 (thread_db_thread_handle): Likewise.
2066 * win32-low.c (thread_rec): Likewise.
2067 (child_delete_thread): Likewise.
2068 (win32_thread_alive): Likewise.
2069 (get_child_debug_event): Likewise.
2070
da25033c
SM
20712017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2072
2073 * linux-mips-low.c (update_watch_registers_callback): Return
2074 void, remove pid_p parameter, don't check for pid.
2075 (mips_insert_point, mips_remove_point): Use for_each_thread.
2076
c91bb56b
SM
20772017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2078
2079 * lynx.low (lynx_delete_thread_callback): Remove.
2080 (lynx_mourn): Use for_each_thread.
2081
634a3254
SM
20822017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2083
2084 * regcache.c (regcache_invalidate_one): Remove.
2085 (regcache_invalidate_pid): use for_each_thread.
2086
41272101
TT
20872017-11-26 Tom Tromey <tom@tromey.com>
2088
2089 * linux-low.c (linux_create_inferior): Update.
2090
f5291a6f
UW
20912017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
2092
2093 * spu-low.c (spu_create_inferior): Fix typo in argument name.
2094
6654d750
AH
20952017-11-24 Alan Hayward <alan.hayward@arm.com>
2096
2097 * configure.srv: Add linux-aarch64-tdesc-selftest.o.
2098 * linux-aarch64-low.c (initialize_low_arch): Call init func.
2099 * linux-aarch64-tdesc-selftest.c: New file.
2100 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
2101
21022017-11-24 Alan Hayward <alan.hayward@arm.com>
2103
2104 * configure.srv: Add new file.
2105 * linux-aarch64-low.c (initialize_low_arch): Call init func.
2106 * linux-aarch64-tdesc-selftest.c: New file.
2107 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
2108
49bdb7ee
AH
21092017-11-24 Alan Hayward <alan.hayward@arm.com>
2110
2111 * linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init.
2112 * linux-aarch64-low.c (initialize_low_arch): Remove init.
2113 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
2114
d6d7ce56
AH
21152017-11-24 Alan Hayward <alan.hayward@arm.com>
2116
2117 * configure.srv: Add new files.
2118 * linux-aarch64-ipa.c (get_ipa_tdesc): Call
2119 aarch64_linux_read_description.
2120 * linux-aarch64-low.c (aarch64_linux_read_description):
2121 Merge with aarch64_arch_setup.
2122 (aarch64_arch_setup): Call aarch64_linux_read_description.
2123 * linux-aarch64-tdesc.c: New file.
2124 * linux-aarch64-tdesc.h: New file.
2125
506fe5f4
YQ
21262017-11-24 Yao Qi <yao.qi@linaro.org>
2127
2128 * configure.srv: Set $srv_regobj for tic6x-linux.
2129 * linux-tic6x-low.c: Include "arch/tic6x.h" and "tdesc.h".
2130 (tic6x_read_description): Move some code to tic6x_arch_setup.
2131 (tic6x_tdesc_test): New function.
2132 (initialize_low_arch): Call selftests::register_test.
2133
29f9a567
YQ
21342017-11-22 Yao Qi <yao.qi@linaro.org>
2135
2136 * remote-utils.c (prepare_resume_reply): Use memcpy.
2137
578290ec
SM
21382017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2139
2140 * linux-low.c (kill_one_lwp_callback): Return void, take
2141 argument directly, don't filter on pid.
2142 (linux_kill): Use for_each_thread.
2143
eca55aec
SM
21442017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2145
2146 * linux-low.c (need_step_over_p): Return bool, remove dummy
2147 argument.
2148 (linux_resume, proceed_all_lwps): Use find_thread.
2149
25c28b4d
SM
21502017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2151
2152 * linux-low.c (resume_status_pending_p): Return bool, remove
2153 flag_p argument.
2154 (linux_resume): Use find_thread.
2155
5fdda392
SM
21562017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2157
2158 * linux-low.c (struct thread_resume_array): Remove.
2159 (linux_set_resume_request): Return void, take arguments
2160 directly.
2161 (linux_resume): Use for_each_thread.
2162
fcb056a5
SM
21632017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2164
2165 * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
2166 return bool, remove data argument.
2167 (linux_stabilize_threads): Use find_thread.
2168
139720c5
SM
21692017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2170
2171 * linux-low.c (unsuspend_one_lwp): Remove.
2172 (unsuspend_all_lwps): Use for_each_thread, inline code from
2173 unsuspend_one_lwp.
2174
6d1e5673
SM
21752017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2176
2177 * gdbthread.h (find_thread): Add overload with ptid_t filter.
2178 * linux-low.c (struct iterate_over_lwps_args): Remove.
2179 (iterate_over_lwps_filter): Remove.
2180 (iterate_over_lwps): Use find_thread.
2181
bbf550d5
SM
21822017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2183
2184 * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
2185 (linux_handle_new_gdb_connection): Use for_each_thread, inline
2186 code from reset_lwp_ptrace_options_callback.
2187
00192f77
SM
21882017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2189
2190 * linux-arm-low.c (struct update_registers_data): Remove.
2191 (update_registers_callback): Return void, take arguments
2192 directly, don't check thread's pid.
2193 (arm_insert_point, arm_remove_point): Use for_each_thread.
2194
2bee2b6c
SM
21952017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2196
2197 * win32-low.c (continue_one_thread): Return void, take argument
2198 directly.
2199 (child_continue): Use for_each_thread.
2200
0b360f19
SM
22012017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2202
2203 * win32-i386-low.c (update_debug_registers_callback): Rename
2204 to ...
2205 (update_debug_registers): ... this, return void, remove pid_p arg.
2206 (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
2207
f27866ba
SM
22082017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
2209
2210 * inferiors.h (struct process_info): Add constructor, initialize
2211 fields..
2212 <syscalls_to_catch>: Change type to std::vector<int>.
2213 * inferiors.c (add_process): Allocate process_info with new.
2214 (remove_process): Free process_info with delete.
2215 * linux-low.c (handle_extended_wait): Adjust.
2216 (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
2217 * server.c (handle_general_set): Adjust.
2218
e849ea89
PA
22192017-11-16 Pedro Alves <palves@redhat.com>
2220
2221 * remote-utils.c (remote_close): Block SIGIO signals instead of
2222 uninstalling the SIGIO handler.
2223
1d0aa65c
AH
22242017-11-16 Alan Hayward <alan.hayward@arm.com>
2225
2226 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
2227
3491a34c
YQ
22282017-11-16 Yao Qi <yao.qi@linaro.org>
2229
2230 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
2231 (tic6x_store_gregset): Likewise.
2232 (tic6x_usrregs_info): Move it up.
2233
a602f924
AH
22342017-11-15 Alan Hayward <alan.hayward@arm.com>
2235
2236 * Makefile.in: Update arch rules.
2237 * configure.srv: Explicitly mark arch/ files.
2238
5616b6c3
AS
22392017-11-13 Andreas Schwab <schwab@suse.de>
2240
2241 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
2242 function.
2243 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2244
d1928160
PA
22452017-11-06 Pedro Alves <palves@redhat.com>
2246
2247 * config.in, configure: Regenerate.
2248
bac608e7
SM
22492017-10-27 Simon Marchi <simon.marchi@ericsson.com>
2250
2251 * target.c (struct thread_search): Remove.
2252 (thread_search_callback): Remove.
2253 (prepare_to_access_memory): Use for_each_thread instead of
2254 find_inferior. Inline code from thread_search_callback.
2255
eaddb425
SM
22562017-10-27 Simon Marchi <simon.marchi@ericsson.com>
2257
2258 * server.c (struct visit_actioned_threads_data): Remove.
2259 (visit_actioned_threads): Change prototype to take arguments
2260 directly.
2261 (resume): Use find_thread instead of find_inferior.
2262
99078d34
SM
22632017-10-27 Simon Marchi <simon.marchi@ericsson.com>
2264
2265 * server.c (queue_stop_reply_callback): Change prototype, return
2266 void.
2267 (find_status_pending_thread_callback): Remove.
2268 (handle_status): Replace find_inferior with find_thread and
2269 for_each_thread.
2270
cc628f3d
AH
22712017-10-25 Alan Hayward <alan.hayward@arm.com>
2272
2273 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
2274 with REGNO.
2275 (aarch64_store_gregset): Likewise.
2276 (aarch64_fill_fpregset): Likewise.
2277 (aarch64_store_fpregset): Likewise.
2278
4d3bb80e
SM
22792017-10-21 Simon Marchi <simon.marchi@ericsson.com>
2280
2281 * gdbthread.h (find_thread, for_each_thread): New functions.
2282 * inferiors.c (thread_of_pid): Remove.
2283 (find_any_thread_of_pid): Use find_thread.
2284 * linux-low.c (num_lwps): Use for_each_thread.
2285
7a7cdfa0
YQ
22862017-10-17 Yao Qi <yao.qi@linaro.org>
2287
2288 * Makefile.in: Remove one rule.
2289 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
2290
e675d170
YQ
22912017-10-17 Yao Qi <yao.qi@linaro.org>
2292
2293 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
2294 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
2295
7eb4e0f9
YQ
22962017-10-17 Yao Qi <yao.qi@linaro.org>
2297
2298 * configure.srv: Rename arm.o with arch/arm.o.
2299
60d6cfc9
YQ
23002017-10-17 Yao Qi <yao.qi@linaro.org>
2301
2302 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
2303 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
2304 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
2305 (arch-i386.o, arch-amd64.o): Remove rules.
2306 (arch/%.o): New rule.
2307 Update POSTCOMPILE and COMPILE.pre.
2308 * configure.ac: Invoke AC_CONFIG_COMMANDS.
2309 * configure: Re-generated.
2310 * configure.srv: Replace arch-i386.o with arch/i386.o.
2311 Replace arch-amd64.o with arch/amd64.o.
2312
5bfda255
YQ
23132017-10-16 Yao Qi <yao.qi@linaro.org>
2314
2315 * configure: Regenerated.
2316
9c80ecd6
SM
23172017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
2318
2319 * inferiors.h: (struct inferior_list): Remove.
2320 (struct inferior_list_entry); Remove.
2321 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
2322 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
2323 get_first_inferior): Remove.
2324 (for_each_inferior, for_each_inferior_with_data, find_inferior,
2325 find_inferior_id, find_inferior_in_random): Change signature.
2326 * inferiors.c (all_threads): Change type to
2327 std::list<thread_info *>.
2328 (get_thread): Remove macro.
2329 (find_inferior, find_inferior_id): Change signature, implement
2330 using find_thread.
2331 (find_inferior_in_random): Change signature, implement using
2332 find_thread_in_random.
2333 (for_each_inferior, for_each_inferior_with_data): Change
2334 signature, implement using for_each_thread.
2335 (add_inferior_to_list, remove_inferior): Remove.
2336 (add_thread, get_first_thread, thread_of_pid,
2337 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
2338 (get_first_inferior, one_inferior_p, clear_inferior_list):
2339 Remove.
2340 (clear_inferiors, get_thread_process): Update.
2341 * gdbthread.h: Include <list>.
2342 (struct thread_info) <entry>: Remove field.
2343 <id>: New field.
2344 (all_threads): Change type to std::list<thread_info *>.
2345 (get_first_inferior): Add doc.
2346 (find_thread, for_each_thread, find_thread_in_random): New
2347 functions.
2348 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
2349 * linux-arm-low.c (update_registers_callback): Update.
2350 * linux-low.c (second_thread_of_pid_p): Update.
2351 (kill_one_lwp_callback, linux_detach_lwp_callback,
2352 delete_lwp_callback, status_pending_p_callback, same_lwp,
2353 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
2354 iterate_over_lwps, not_stopped_callback,
2355 resume_stopped_resumed_lwps, count_events_callback,
2356 select_singlestep_lwp_callback, select_event_lwp_callback,
2357 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
2358 suspend_and_send_sigstop_callback, wait_for_sigstop,
2359 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
2360 lwp_running, linux_set_resume_request, resume_status_pending_p,
2361 need_step_over_p, start_step_over, linux_resume_one_thread,
2362 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
2363 reset_lwp_ptrace_options_callback): Update.
2364 * linux-mips-low.c (update_watch_registers_callback): Update.
2365 * regcache.c (regcache_invalidate_one, regcache_invalidate):
2366 Update.
2367 (free_register_cache_thread_one): Remove.
2368 (regcache_release): Update.
2369 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
2370 handle_qxfer_threads_worker): Update.
2371 (handle_query): Update, use list iterator.
2372 (visit_actioned_threads, handle_pending_status,
2373 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
2374 clear_pending_status_callback, set_pending_status_callback,
2375 find_status_pending_thread_callback, handle_status,
2376 process_serial_event): Update.
2377 * target.c (thread_search_callback): Update.
2378 * thread-db.c (thread_db_get_tls_address): Update.
2379 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
2380 Update.
2381 * win32-i386-low.c (update_debug_registers_callback): Update.
2382 * win32-low.c (delete_thread_info, child_delete_thread,
2383 continue_one_thread, suspend_one_thread,
2384 get_child_debug_event): Adjust.
2385
9179355e
SM
23862017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
2387
2388 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
2389 * inferiors.h: Include <list>.
2390 (struct process_info) <entry>: Remove field.
2391 <pid>: New field.
2392 (pid_of): Change macro to function.
2393 (ptid_of, lwpid_of): Remove macro.
2394 (all_processes): Change type to std::list<process_info *>.
2395 (ALL_PROCESSES): Remove macro.
2396 (for_each_process, find_process): New function.
2397 * inferiors.c (all_processes): Change type to
2398 std::list<process_info *>.
2399 (find_thread_process): Adjust.
2400 (add_process): Likewise.
2401 (remove_process): Likewise.
2402 (find_process_pid): Likewise.
2403 (get_first_process): Likewise.
2404 (started_inferior_callback): Remove.
2405 (have_started_inferiors_p): Adjust.
2406 (attached_inferior_callback): Remove.
2407 (have_attached_inferiors_p): Adjust.
2408 * linux-low.c (check_zombie_leaders): Likewise.
2409 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
2410 (x86_linux_update_xmltarget): Adjust.
2411 * server.c (handle_query): Likewise.
2412 (gdb_reattached_process): Remove.
2413 (handle_status): Adjust.
2414 (kill_inferior_callback): Likewise.
2415 (detach_or_kill_inferior): Remove.
2416 (print_started_pid): Likewise.
2417 (print_attached_pid): Likewise.
2418 (detach_or_kill_for_exit): Update.
2419 (process_serial_event): Likewise.
2420 * linux-arm-low.c (arm_new_fork): Likewise.
2421
c9cb8905
SM
24222017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
2423
2424 * dll.h: Include <list>.
2425 (struct dll_info): Add constructor.
2426 <entry>: Remove field.
2427 (all_dlls): Change type to std::list<dll_info>.
2428 * dll.c: Include <algorithm>.
2429 (get_dll): Remove macro.
2430 (all_dlls): Change type to std::list<dll_info *>.
2431 (free_one_dll): Remove.
2432 (match_dll): Likewise.
2433 (loaded_dll): Adjust.
2434 (unloaded_dll): Adjust to all_dlls type change, use
2435 std::find_if. Inline code from match_dll.
2436 (clear_dlls): Adjust to all_dlls type change.
2437 * server.c (emit_dll_description): Remove.
2438 (handle_qxfer_libraries): Adjust to all_dlls type change,
2439 integrate emit_dll_description's functionality.
2440
04ec7890
SM
24412017-10-12 Simon Marchi <simon.marchi@ericsson.com>
2442
2443 * linux-low.h (struct linux_target_ops) <delete_process>: New
2444 field.
2445 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
2446 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
2447 (struct linux_target_ops): Add delete_process callback.
2448 * linux-arm-low.c (arm_delete_process): New.
2449 (struct linux_target_ops): Add delete_process callback.
2450 * linux-bfin-low.c (struct linux_target_ops): Likewise.
2451 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
2452 * linux-m32r-low.c (struct linux_target_ops): Likewise.
2453 * linux-mips-low.c (mips_linux_delete_process): New.
2454 (struct linux_target_ops): Add delete_process callback.
2455 * linux-ppc-low.c (struct linux_target_ops): Likewise.
2456 * linux-s390-low.c (struct linux_target_ops): Likewise.
2457 * linux-sh-low.c (struct linux_target_ops): Likewise.
2458 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
2459 * linux-tile-low.c (struct linux_target_ops): Likewise.
2460 * linux-x86-low.c (x86_linux_delete_process): New.
2461 (struct linux_target_ops): Add delete_process callback.
2462 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
2463
466eecee
SM
24642017-10-12 Simon Marchi <simon.marchi@ericsson.com>
2465
2466 * linux-aarch64-low.c (the_low_target): Add thread delete
2467 callback.
2468 * linux-arm-low.c (arm_delete_thread): New function.
2469 (the_low_target): Add thread delete callback.
2470 * linux-bfin-low.c (the_low_target): Likewise.
2471 * linux-crisv32-low.c (the_low_target): Likewise.
2472 * linux-low.c (delete_lwp): Invoke delete_thread callback if
2473 set.
2474 * linux-low.h (struct linux_target_ops) <delete_thread>: New
2475 field.
2476 * linux-m32r-low.c (the_low_target): Add thread delete callback.
2477 * linux-mips-low.c (mips_linux_delete_thread): New function.
2478 (the_low_target): Add thread delete callback.
2479 * linux-ppc-low.c (the_low_target): Likewise.
2480 * linux-s390-low.c (the_low_target): Likewise.
2481 * linux-sh-low.c (the_low_target): Likewise.
2482 * linux-tic6x-low.c (the_low_target): Likewise.
2483 * linux-tile-low.c (the_low_target): Likewise.
2484 * linux-x86-low.c (the_low_target): Likewise.
2485 * linux-xtensa-low.c (the_low_target): Likewise.
2486
b79f7801
YZ
24872017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
2488
2489 * win32-low.c: Include "common-inferior.h".
2490
bc3b087d
SDJ
24912017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
2492
2493 * inferiors.c (set_inferior_cwd): New function.
2494 * server.c (handle_general_set): Handle QSetWorkingDir packet.
2495 (handle_query): Inform that QSetWorkingDir is supported.
2496 * win32-low.c (create_process): Pass the inferior's cwd to
2497 CreateProcess.
2498
d092c5a2
SDJ
24992017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
2500
2501 * inferiors.c (current_inferior_cwd): New global variable.
2502 (get_inferior_cwd): New function.
2503 * inferiors.h (struct process_info) <cwd>: New field.
2504
7da0a886
SDJ
25052017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
2506
2507 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
2508 (OBS): Add gdb_tilde_expand.o.
2509
289a6840
SM
25102017-10-02 Simon Marchi <simon.marchi@ericsson.com>
2511
2512 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
2513 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
2514
256642e8
PA
25152017-09-29 Pedro Alves <palves@redhat.com>
2516
2517 * ax.c (gdb_parse_agent_expr): Constify.
2518 * ax.h (gdb_parse_agent_expr): Constify.
2519 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
2520 Constify.
2521 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
2522 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
2523 * remote-utils.h (read_ptid): Constify.
2524 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
2525 (process_point_options, process_serial_event): Constify.
2526 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
2527 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
2528 (cmd_qtbuffer): Constify.
2529
5b9ca4d4
PA
25302017-09-29 Pedro Alves <palves@redhat.com>
2531
2532 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
2533 fails.
2534
94c207e0
PA
25352017-09-29 Pedro Alves <palves@redhat.com>
2536
2537 * linux-low.c (handle_extended_wait): Pass parent thread instead
2538 of process to thread_db_notice_clone.
2539 * linux-low.h (thread_db_notice_clone): Replace parent process
2540 parameter with parent thread parameter.
2541 * thread-db.c (find_one_thread): Add comment.
2542 (thread_db_notice_clone): Replace parent process parameter with
2543 parent thread parameter. Temporarily switch to the parent thread.
2544
75352e28
SDJ
25452017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
2546
2547 * gdbthread.h: Include "common-gdbthread.h".
2548 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
2549 "if" when validating the ptid.
2550 * remote-utils.c: Include "gdbthread.h".
2551 (prepare_resume_reply): Use "switch_to_thread".
2552 * target.c (done_accessing_memory): Likewise.
2553
ad339634
AA
25542017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
2555
2556 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
2557 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
2558 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
2559 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
2560 s390x-gs-linux64-ipa.o to ipa_obj.
2561 * linux-s390-low.c (HWCAP_S390_GS): New define.
2562 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
2563 New functions.
2564 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
2565 (s390_arch_setup): Check for guarded-storage support and choose
2566 appropriate tdesc.
2567 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
2568 init_registers_s390x_gs_linux64.
2569 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
2570 enum value.
2571 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
2572 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
2573
cc4d742f
SM
25742017-09-22 Simon Marchi <simon.marchi@ericsson.com>
2575
2576 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
2577
f6327dcb
KB
25782017-09-21 Kevin Buettner <kevinb@redhat.com>
2579
2580 * linux-low.h (struct lwp_info): Add new field, thread_handle.
2581 (thread_db_thread_handle): Declare.
2582 * linux-low.c (linux_target_ops): Initialize thread_handle.
2583 * server.c (handle_qxfer_threads_worker): Add support for
2584 "handle" attribute.
2585 * target.h (struct target_ops): Add new function pointer,
2586 thread_handle.
2587 (target_thread_handle): Define.
2588 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
2589 field in lwp.
2590 (thread_db_thread_handle): New function.
2591
86299109
KB
25922017-09-21 Kevin Buettner <kevinb@redhat.com>
2593
2594 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
2595 * linux-low.h (thread_db_notice_clone): Declare.
2596 * thread-db.c (thread_db_notice_clone): New function.
2597
f557a88a
PA
25982017-09-21 Pedro Alves <palves@redhat.com>
2599
2600 * server.c (gdb_read_memory, handle_status, process_serial_event)
2601 (handle_serial_event, handle_target_event): Adjust to
2602 set_desired_thread prototype change.
2603 * target.c (set_desired_thread): Remove 'use_general' parameter
2604 and adjust.
2605 * target.h (set_desired_thread): Remove 'use_general' parameter.
2606
223ffa71
TT
26072017-09-20 Tom Tromey <tom@tromey.com>
2608
2609 * target.c (target_terminal::terminal_state): Define.
2610 (target_terminal::init): Rename from target_terminal_init.
2611 (target_terminal::inferior): Rename from
2612 target_terminal_inferior.
2613 (target_terminal::ours): Rename from target_terminal_ours.
2614 (target_terminal::ours_for_output, target_terminal::info): New.
2615
04fd3ba9
SM
26162017-09-16 Simon Marchi <simon.marchi@ericsson.com>
2617
2618 * server.c (accumulate_file_name_length): Remove.
2619 (emit_dll_description): Adjust to std::string change.
2620 (handle_qxfer_libraries): Use std::string to hold document.
2621
5e187554
SM
26222017-09-16 Simon Marchi <simon.marchi@ericsson.com>
2623
2624 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
2625 return type of xml_escape_text.
2626 * server.c (emit_dll_description): Likewise.
2627
1526853e
SM
26282017-09-16 Simon Marchi <simon.marchi@ericsson.com>
2629
2630 * server.c (captured_main): Accept argument for --selftest.
2631 Update run_tests call.
2632 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
2633 when registering selftests.
2634
c4dfafab
SDJ
26352017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
2636
2637 * regcache.c (get_thread_regcache): Update code to use "std::vector"
2638 instead of "VEC" for "target_desc.reg_defs".
2639 (regcache_cpy): Likewise.
2640 (registers_to_string): Likewise.
2641 (registers_from_string): Likewise.
2642 (find_regno): Likewise.
2643 (supply_regblock): Likewise.
2644 (regcache_raw_read_unsigned): Likewise.
2645 * tdesc.c (init_target_desc): Likewise.
2646 (tdesc_create_reg): Likewise.
2647 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
2648 (struct target_desc) <reg_defs>: Convert to "std::vector".
2649 (target_desc): Do not initialize "reg_defs".
2650 (~target_desc): Update code to use "std::vector" instead of "VEC"
2651 for "target_desc.reg_defs".
2652 (operator==): Likewise.
2653
124aceb4
SM
26542017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2655
2656 * inferiors.h (thread_to_gdb_id): Remove.
2657 * inferiors.c (thread_to_gdb_id): Remove.
2658 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
2659 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
2660 lynx_store_registers, lynx_read_memory, lynx_write_memory):
2661 Likewise.
2662 * nto-low.c (nto_fetch_registers, nto_store_registers,
2663 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
2664
96cde54f
SM
26652017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2666
2667 * inferiors.h (gdb_id_to_thread_id): Remove.
2668 * inferiors.c (gdb_id_to_thread_id): Remove.
2669 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
2670 removal. Move pid declaration closer to where it's used.
2671
e8ca139e
SM
26722017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2673
2674 * server.c (handle_detach): New function.
2675 (process_serial_event): Move code out, call handle_detach.
2676
f8a4e119
SM
26772017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2678
2679 * server.c (require_running): Rename to ...
2680 (require_running_or_return): ... this ...
2681 (require_running_or_break): ... and this.
2682 (handle_query, process_serial_event): Adjust.
2683
0eb0a407
SM
26842017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2685
2686 * linux-low.c (linux_set_resume_request): Remove unused
2687 variables.
2688
785922a5
SM
26892017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2690
2691 * server.c (first_thread_of): Remove.
2692 (process_serial_event): Replace usage of first_thread_of with
2693 find_any_thread_of_pid.
2694 * tracepoint.c (same_process_p): Remove.
2695 (gdb_agent_about_to_close): Replace usage of same_process_p with
2696 find_any_thread_of_pid.
2697 * linux-x86-low.c (same_process_callback): Remove.
2698 (x86_arch_setup_process_callback): Replace usage of
2699 same_process_callback with find_any_thread_of_pid.
2700 * thread-db.c (any_thread_of): Remove.
2701 (switch_to_process): Replace usage of any_thread_of with
2702 find_any_thread_of_pid.
2703 * inferiors.c (thread_pid_matches_callback): Remove.
2704 (find_thread_process): Adjust to use find_any_thread_of_pid.
2705
a059f00c
SDJ
27062017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
2707
2708 * regcache.c (get_thread_regcache): Guard calls to "memset"
e79be6e5 2709 with "!VEC_empty".
a059f00c 2710
cc397f3a
SDJ
27112017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
2712
2713 * linux-low.c (handle_extended_wait): Use
2714 "allocate_target_description" instead of "XNEW".
2715 * linux-x86-low.c (initialize_low_arch): Likewise.
2716
22916b07
YQ
27172017-09-05 Yao Qi <yao.qi@linaro.org>
2718
2719 * configure.srv (srv_i386_regobj): Remove.
2720 (srv_amd64_regobj): Remove.
2721 (srv_regobj): Set it to "" for x86 non-linux targets.
2722 * linux-x86-tdesc.c (i386_linux_read_description):
2723 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
2724 (init_registers_i386): Remove the declaration.
2725 (tdesc_i386): Remove the declaration.
2726 (lynx_i386_arch_setup): Call i386_create_target_description.
2727 * nto-x86-low.c: Likewise.
2728 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
2729 [!__x86_64__]: include arch/i386.h.
2730 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
2731
38602d55
YQ
27322017-09-05 Yao Qi <yao.qi@linaro.org>
2733
2734 * configure.srv (srv_amd64_linux_xmlfiles): Remove
2735 i386/amd64-XXX-linux from it.
2736
44b886ff
YQ
27372017-09-05 Yao Qi <yao.qi@linaro.org>
2738
2739 * configure.srv: Empty srv_amd64_linux_regobj if $development is
2740 false.
2741 (ipa_amd64_linux_regobj): Remove.
2742 (ipa_x32_linux_regobj): Remove.
2743
b4570e4b
YQ
27442017-09-05 Yao Qi <yao.qi@linaro.org>
2745
2746 * Makefile.in (arch-amd64.o): New rule.
2747 * configure.srv: Append arch-amd64.o.
2748 * linux-amd64-ipa.c: Include common/x86-xstate.h.
2749 (get_ipa_tdesc): Call amd64_linux_read_description.
2750 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
2751 and init_registers_amd64_XXX.
2752 * linux-x86-low.c (x86_linux_read_description): Call
2753 amd64_linux_read_description.
2754 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
2755 (initialize_low_arch): Don't call init_registers_x32_XXX and
2756 init_registers_amd64_XXX.
2757 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
2758 and tdesc_amd64_XXX.
2759 [__x86_64__] (amd64_tdesc_test): New function.
2760 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
2761 and init_registers_amd64_XXX.
2762 * linux-x86-tdesc.c: Include arch/amd64.h.
2763 (xcr0_to_tdesc_idx): New function.
2764 (i386_linux_read_description): New function.
2765 (amd64_get_ipa_tdesc_idx): New function.
2766 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
2767 (amd64_get_ipa_tdesc): Declare.
2768
d1f28ea2
YQ
27692017-09-05 Yao Qi <yao.qi@linaro.org>
2770
2771 * configure.srv (srv_i386_linux_xmlfiles): Remove
2772 i386/i386-XXX-linux.xml from it.
2773
25a93583
YQ
27742017-09-05 Yao Qi <yao.qi@linaro.org>
2775
2776 * configure.srv: Set srv_i386_linux_regobj empty if $development
2777 is false.
2778 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
2779 initialize_low_tdesc.
2780 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
2781 with #if initialize_low_tdesc.
2782 * linux-x86-tdesc-selftest.c: New file.
2783 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
2784
5f035c07
YQ
27852017-09-05 Yao Qi <yao.qi@linaro.org>
2786
2787 * Makefile.in (arch-i386.o): New rule.
2788 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
2789 (x86_64-*-linux*): Likewise.
2790 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
2791 include arch/i386.h.
2792 (i386_linux_read_description): Remove code and call
2793 i386_create_target_description.
2794 * tdesc.c (allocate_target_description): New function.
2795 * tdesc.h (set_tdesc_architecture): Remove declaration.
2796 (set_tdesc_osabi): Likewise.
2797
0abe8a89
YQ
27982017-09-05 Yao Qi <yao.qi@linaro.org>
2799
2800 * linux-x86-tdesc.c: Don't include <inttypes.h>.
2801 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
2802 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
2803 .xmltarget.
2804 * server.c (get_features_xml): Call tdesc_get_features_xml.
2805 * tdesc.c (set_tdesc_architecture): New function.
2806 (set_tdesc_osabi): New function.
2807 (tdesc_get_features_xml): New function.
2808 (tdesc_create_feature): Add an argument.
2809 * tdesc.h (struct target_desc) <features>: New field.
2810 <arch, osabi>: New field.
2811 (~target_desc): xfree features, arch, and osabi.
2812 (target_desc::oerator==): Don't compare .xmltarget.
2813 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
2814 (set_tdesc_osabi): Likewise.
2815 (tdesc_get_features_xml): Likewise.
2816
0a188386
YQ
28172017-09-05 Yao Qi <yao.qi@linaro.org>
2818
2819 * linux-x86-tdesc.c: Include selftest.h.
2820 (i386_tdesc_test): New function.
2821 (initialize_low_tdesc): Call selftests::register_test.
2822 * tdesc.h: Include regdef.h.
2823 (target_desc): Override operator == and !=.
2824
f49ff000
YQ
28252017-09-05 Yao Qi <yao.qi@linaro.org>
2826
2827 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
2828 (ipa_obj): Likewise.
2829 * linux-i386-ipa.c: Include common/x86-xstate.h
2830 (get_ipa_tdesc): Call i386_linux_read_description.
2831 (initialize_low_tracepoint): Don't call init_registers_XXX
2832 functions, call initialize_low_tdesc instead.
2833 * linux-x86-low.c (x86_linux_read_description): Call
2834 i386_linux_read_description.
2835 (initialize_low_arch): Don't call init_registers_i386_XXX
2836 functions, call initialize_low_tdesc.
2837 * linux-x86-tdesc.c: New file.
2838 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
2839 (i386_get_ipa_tdesc_idx): Declare.
2840 (i386_get_ipa_tdesc): Declare.
2841 (initialize_low_tdesc): Declare.
2842
2b68ef2f
YQ
28432017-09-05 Yao Qi <yao.qi@linaro.org>
2844
2845 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
2846 instead of 0.
2847
f7000548
YQ
28482017-09-05 Yao Qi <yao.qi@linaro.org>
2849
2850 * Makefile.in (IPA_OBJS): Add vec-ipa.o
2851 * regcache.c (get_thread_regcache): Use VEC_length.
2852 (init_register_cache): Likewise.
2853 (regcache_cpy): Likewise.
2854 (registers_to_string): Iterate reg_defs via VEC_iterate.
2855 (find_regno): Likewise.
2856 (find_register_by_number): Use VEC_index.
2857 (register_size): Call find_register_by_number.
2858 (register_data): Call find_register_by_number.
2859 (supply_regblock): Use VEC_length.
2860 (regcache_raw_read_unsigned): Likewise.
2861 * tdesc.c (init_target_desc): Iterate reg_defs via
2862 VEC_iterate.
2863 (default_description): Update initializer.
2864 (copy_target_description): Don't update field num_registers.
2865 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
2866 <num_registers>: Remove.
2867
50a421ac
SM
28682017-09-04 Simon Marchi <simon.marchi@ericsson.com>
2869
2870 * Makefile.in (.SECONDARY): Define target.
2871
23fdd69e
SM
28722017-09-03 Simon Marchi <simon.marchi@ericsson.com>
2873
2874 * linux-low.c (linux_wait_1): Adjust.
2875 * server.c (queue_stop_reply_callback): Adjust.
2876
0a2dde4a
SDJ
28772017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
2878
2879 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
2880 QEnvironmentUnset and QEnvironmentReset packets.
2881 (handle_query): Inform remote that QEnvironmentHexEncoded,
2882 QEnvironmentUnset and QEnvironmentReset are supported.
2883
6afd337d
SM
28842017-08-25 Simon Marchi <simon.marchi@ericsson.com>
2885
2886 * inferiors.h (inferior_target_data): Rename to ...
2887 (thread_target_data): ... this.
2888 (inferior_regcache_data): Rename to ...
2889 (thread_regcache_data): ... this.
2890 (set_inferior_regcache_data): Rename to ...
2891 (set_thread_regcache_data): ... this.
2892 * inferiors.c (inferior_target_data): Rename to ...
2893 (thread_target_data): ... this.
2894 (inferior_regcache_data): Rename to ...
2895 (thread_regcache_data): ... this.
2896 (set_inferior_regcache_data): Rename to ...
2897 (set_thread_regcache_data): ... this.
2898 (free_one_thread): Update.
2899 * linux-low.h (get_thread_lwp): Update.
2900 * regcache.c (get_thread_regcache): Update.
2901 (regcache_invalidate_thread): Update.
2902 (free_register_cache_thread): Update.
2903 * win32-i386-low.c (update_debug_registers_callback): Update.
2904 (win32_get_current_dr): Update.
2905 * win32-low.c (thread_rec): Update.
2906 (delete_thread_info): Update.
2907 (continue_one_thread): Update.
2908 (suspend_one_thread): Update.
2909
a160cc46
SM
29102017-08-24 Simon Marchi <simon.marchi@ericsson.com>
2911
2912 * inferiors.c (set_inferior_target_data): Remove.
2913 * inferiors.h (set_inferior_target_data): Remove.
2914
6d580b63
YQ
29152017-08-18 Yao Qi <yao.qi@linaro.org>
2916
2917 * Makefile.in (OBS): Add selftest.o.
2918 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
2919 * configure, config.in: Re-generated.
2920 * server.c: Include common/sefltest.h.
2921 (captured_main): Handle option --selftest.
2922
f5a29eb0
YQ
29232017-08-09 Yao Qi <yao.qi@linaro.org>
2924
2925 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
2926 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
2927 i386-avx-mpx.o and i386-mmx.o.
2928 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
2929 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
2930 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
2931 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
2932 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
2933 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
2934 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
2935 i386/amd64-avx-mpx.xml.
2936
57757c2f
YQ
29372017-08-09 Yao Qi <yao.qi@linaro.org>
2938
2939 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
2940 and x32-avx-avx512.o.
2941 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
2942 i386/x32-avx-avx512.xml.
2943
229d26fc
SM
29442017-07-26 Simon Marchi <simon.marchi@ericsson.com>
2945
2946 * tracepoint.h (enum class fast_tpoint_collect_result): New
2947 enumeration.
2948 (fast_tracepoint_collecting): Change return type to
2949 fast_tpoint_collect_result.
2950 * tracepoint.c (fast_tracepoint_collecting): Likewise.
2951 * linux-low.h: Include tracepoint.h.
2952 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
2953 fast_tpoint_collect_result.
2954 * linux-low.c (handle_tracepoints): Adjust.
2955 (linux_fast_tracepoint_collecting): Change return type to
2956 fast_tpoint_collect_result.
2957 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
2958 linux_wait_1, stuck_in_jump_pad_callback,
2959 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
2960 proceed_one_lwp): Adjust to type change.
2961
2e1e43e1
YQ
29622017-07-10 Yao Qi <yao.qi@linaro.org>
2963
2964 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
2965
adc764e7
YQ
29662017-06-29 Yao Qi <yao.qi@linaro.org>
2967
2968 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
2969 Remove.
2970 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
2971
a206891a
SM
29722017-06-20 Simon Marchi <simon.marchi@ericsson.com>
2973
2974 * Makefile.in (IPA_OBJS): Sort and format one item per line.
2975
9a6c7d9c
SDJ
29762017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
2977
2978 * linux-low.c (linux_create_inferior): Adjust code to access the
2979 environment information via 'gdb_environ' class.
2980 * lynx-low.c (lynx_create_inferior): Likewise.
2981 * server.c (our_environ): Make it an instance of 'gdb_environ'.
2982 (get_environ): Return a pointer to 'our_environ'.
2983 (captured_main): Initialize 'our_environ'.
2984 * server.h (get_environ): Adjust prototype.
2985 * spu-low.c (spu_create_inferior): Adjust code to access the
2986 environment information via 'gdb_environ' class.
2987
ae3e2ccf
SM
29882017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2989
2990 * linux-low.c (linux_read_memory, linux_write_memory): Remove
2991 usage of "register" keyword.
2992
3e019bdc
SM
29932017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2994
2995 * configure: Re-generate.
2996
8465943a
SM
29972017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2998
2999 * configure: Re-generate.
3000
cf0dd6f0
SM
30012017-06-17 Simon Marchi <simon.marchi@ericsson.com>
3002
3003 * Makefile.in (COMPILE.pre): Add "-x c++".
3004
9845682b
SDJ
30052017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
3006
3007 * fork-child.c: Conditionally include <signal.h>.
3008
aefd8b33
SDJ
30092017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
3010
3011 * server.c (handle_general_set): Handle new packet
3012 "QStartupWithShell".
3013 (handle_query): Add "QStartupWithShell" to the list of supported
3014 packets.
3015 (gdbserver_usage): Add help text explaining the
3016 new "--startup-with-shell" and "--no-startup-with-shell" CLI
3017 options.
3018 (captured_main): Recognize and act upon the presence of the new
3019 CLI options.
3020
2090129c
SDJ
30212017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
3022 Pedro Alves <palves@redhat.com>
3023
3024 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
3025 * configure: Regenerate.
3026 * configure.srv (srv_linux_obj): Add "fork-child.o" and
3027 "fork-inferior.o".
3028 (i[34567]86-*-lynxos*): Likewise.
3029 (spu*-*-*): Likewise.
3030 * fork-child.c: New file.
3031 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
3032 and "environ.h".
3033 (linux_ptrace_fun): New function.
3034 (linux_create_inferior): Adjust function prototype to reflect
3035 change on "target.h". Adjust function code to use
3036 "fork_inferior".
3037 (linux_request_interrupt): Delete "signal_pid".
3038 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
3039 (lynx_ptrace_fun): New function.
3040 (lynx_create_inferior): Adjust function prototype to reflect
3041 change on "target.h". Adjust function code to use
3042 "fork_inferior".
3043 * nto-low.c (nto_create_inferior): Adjust function prototype and
3044 code to reflect change on "target.h". Update comments.
3045 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
3046 "common-terminal.h" and "environ.h".
3047 (terminal_fd): Moved to fork-child.c.
3048 (old_foreground_pgrp): Likewise.
3049 (restore_old_foreground_pgrp): Likewise.
3050 (last_status): Make it global.
3051 (last_ptid): Likewise.
3052 (our_environ): New variable.
3053 (startup_with_shell): Likewise.
3054 (program_name): Likewise.
3055 (program_argv): Rename to...
3056 (program_args): ...this.
3057 (wrapper_argv): New variable.
3058 (start_inferior): Delete function.
3059 (get_exec_wrapper): New function.
3060 (get_exec_file): Likewise.
3061 (get_environ): Likewise.
3062 (prefork_hook): Likewise.
3063 (post_fork_inferior): Likewise.
3064 (postfork_hook): Likewise.
3065 (postfork_child_hook): Likewise.
3066 (handle_v_run): Update code to deal with arguments coming from the
3067 remote host. Update calls from "start_inferior" to
3068 "create_inferior".
3069 (captured_main): Likewise. Initialize environment variable. Call
3070 "have_job_control".
3071 * server.h (post_fork_inferior): New prototype.
3072 (get_environ): Likewise.
3073 (last_status): Declare.
3074 (last_ptid): Likewise.
3075 (signal_pid): Likewise.
3076 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
3077 (spu_ptrace_fun): New function.
3078 (spu_create_inferior): Adjust function prototype to reflect change
3079 on "target.h". Adjust function code to use "fork_inferior".
3080 * target.c (target_terminal_init): New function.
3081 (target_terminal_inferior): Likewise.
3082 (target_terminal_ours): Likewise.
3083 * target.h: Include <vector>.
3084 (struct target_ops) <create_inferior>: Update prototype.
3085 (create_inferior): Update macro.
3086 * utils.c (gdb_flush_out_err): New function.
3087 * win32-low.c (win32_create_inferior): Adjust function prototype
3088 and code to reflect change on "target.h".
3089
043a4934
SDJ
30902017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
3091
3092 * inferiors.c (switch_to_thread): New function.
3093
15652511
SDJ
30942017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
3095
3096 * Makefile.in (SFILE): Add "common/job-control.c".
3097 (OBS): Add "job-control.o".
3098
21ea5acd
SDJ
30992017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
3100
3101 * Makefile: Remove "@host_makefile_frag@".
3102
e13cb306
PA
31032017-05-05 Pedro Alves <palves@redhat.com>
3104
3105 * configure: Regenerate.
3106
c94fee56
SDJ
31072017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
3108
3109 * configure: Regenerate.
3110
a0ff9e1a
SM
31112017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
3112
3113 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
3114 software_single_step change of return type to
3115 std::vector<CORE_ADDR>.
3116 * linux-low.c (install_software_single_step_breakpoints):
3117 Likewise.
3118 * linux-low.h (install_software_single_step_breakpoints):
3119 Likewise.
3120
be628ab8
SDJ
31212017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
3122
3123 * remote-utils.c: Include "gdb_termios.h" instead of
3124 "terminal.h".
3125 * terminal.h: Delete file.
3126
7c5ded6a
SDJ
31272017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
3128
3129 * server.c: Include <vector>.
3130 <program_argv, wrapper_argv>: Convert to std::vector.
3131 (start_inferior): Rewrite function to use C++.
3132 (handle_v_run): Likewise. Update code that calculates the argv
3133 based on the vRun packet; use C++.
3134 (captured_main): Likewise.
3135
436252de
SM
31362017-04-06 Simon Marchi <simon.marchi@ericsson.com>
3137
3138 * server.c (handle_v_cont): Initialize thread_resume::thread
3139 with null_ptid.
3140
9bf2a700
PA
31412017-04-05 Pedro Alves <palves@redhat.com>
3142
3143 * configure: Regenerate.
3144
a121b7c1
PA
31452017-04-05 Pedro Alves <palves@redhat.com>
3146
3147 * gdbreplay.c (sync_error): Constify.
3148 * linux-x86-low.c (push_opcode): Constify.
3149
21c8a587
PA
31502017-04-05 Pedro Alves <palves@redhat.com>
3151
3152 * win32-low.c (get_child_debug_event)
3153 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
3154 Report TARGET_WAITKIND_SPURIOUS instead.
3155
fb32b4f7
PA
31562017-04-05 Pedro Alves <palves@redhat.com>
3157
e79be6e5
SM
3158 * remote-utils.c (remote_prepare, remote_open): Constify.
3159 * remote-utils.h (remote_prepare, remote_open): Constify.
3160 * server.c (captured_main): Constify 'port' handling.
fb32b4f7 3161
65dd1e59
SM
31622017-04-04 Simon Marchi <simon.marchi@ericsson.com>
3163
3164 * Makefile.in (clean): Clear .deps.
3165
8fa5b777
SM
31662017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
3167
3168 * .gitignore: Remove generated files, replace with wildcard.
3169 * (clean): Replace removal of generated files with wildcard.
3170 (version.c): Replace with...
3171 (version-generated.c): ...this.
3172 (xml-builtin.c): Replace with...
3173 (xml-builtin-generated.c): ...this.
3174 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
3175 (%.c: *regformats*): Replace with...
3176 (%-generated.c: *regformats*): ...this.
3177
a12e714b
MF
31782017-03-27 Max Filippov <jcmvbkbc@gmail.com>
3179
3180 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
3181 (xtensa_fill_gregset): Call collect_register_by_name for
3182 threadptr register.
3183 (xtensa_store_gregset): Call supply_register_by_name for
3184 threadptr register.
3185
1a09b50a
MF
31862017-03-27 Max Filippov <jcmvbkbc@gmail.com>
3187
3188 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
3189 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
3190 (xtensa_store_gregset): Call supply_register for all registers in
3191 a0_regnum..a0_regnum + C0_NREGS range.
3192
1a01e7c6
SM
31932017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3194
3195 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
3196 (ax-ipa.o: ax.c): Remove.
3197 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
3198 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
3199 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
3200 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
3201 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
3202
36bc18a8
SM
32032017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3204
3205 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
3206 (print-utils-ipa.o: ../common/print-utils.c): Remove.
3207 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
3208 (errors-ipa.o: ../common/errors.c): Remove.
3209 (format-ipa.o: ../common/format.c): Remove.
3210 (common-utils-ipa.o: ../common/common-utils.c): Remove.
3211
a8ebe3d5
SM
32122017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3213
3214 * Makefile.in (%-ipa.o: %.c): New rule.
3215 (tracepoint-ipa.o: tracepoint.c): Remove.
3216 (utils-ipa.o: utils.c): Remove.
3217 (remote-utils-ipa.o: remote-utils.c): Remove.
3218 (regcache-ipa.o: regcache.c): Remove.
3219 (i386-linux-ipa.o: i386-linux.c): Remove.
3220 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
3221 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
3222 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
3223 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
3224 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
3225 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
3226 (amd64-linux-ipa.o: amd64-linux.c): Remove.
3227 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
3228 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
3229 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
3230 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
3231 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
3232 (aarch64-ipa.o: aarch64.c): Remove.
3233 (s390-linux32-ipa.o: s390-linux32.c): Remove.
3234 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
3235 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
3236 (s390-linux64-ipa.o: s390-linux64.c): Remove.
3237 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
3238 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
3239 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
3240 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
3241 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
3242 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
3243 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
3244 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
3245 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
3246 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
3247 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
3248 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
3249 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
3250 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
3251 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
3252 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
3253 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
3254 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
3255 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
3256 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
3257 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
3258 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
3259 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
3260 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
3261 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
3262 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
3263 (tdesc-ipa.o: tdesc.c): Remove.
3264 (x32-linux-ipa.o: x32-linux.c): Remove.
3265 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
3266 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
3267
50cfacb7
SM
32682017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3269
3270 * Makefile.in (%.o: ../arch/%.c): New rule.
3271 (arm.o: ../arch/arm.c): Remove.
3272 (arm-linux.o: ../arch/arm-linux.c): Remove.
3273 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
3274 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
3275
c5a22423
SM
32762017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3277
3278 * Makefile.in (%.o: ../nat/%.c): New rule.
3279 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
3280 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
3281 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
3282 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
3283 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
3284 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
3285 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
3286 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
3287 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
3288 (linux-personality.o: ../nat/linux-personality.c): Remove.
3289 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
3290 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
3291 (x86-linux.o: ../nat/x86-linux.c): Remove.
3292 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
3293 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
3294
6bda016b
SM
32952017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3296
3297 * Makefile.in (%.o: ../common/%.c): New rule.
3298 (signals.o: ../common/signals.c): Remove.
3299 (print-utils.o: ../common/print-utils.c): Remove.
3300 (rsp-low.o: ../common/rsp-low.c): Remove.
3301 (common-utils.o: ../common/common-utils.c): Remove.
3302 (posix-strerror.o: ../common/posix-strerror.c): Remove.
3303 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
3304 (vec.o: ../common/vec.c): Remove.
3305 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
3306 (xml-utils.o: ../common/xml-utils.c): Remove.
3307 (ptid.o: ../common/ptid.c): Remove.
3308 (buffer.o: ../common/buffer.c): Remove.
3309 (format.o: ../common/format.c): Remove.
3310 (filestuff.o: ../common/filestuff.c): Remove.
3311 (agent.o: ../common/agent.c): Remove.
3312 (errors.o: ../common/errors.c): Remove.
3313 (environ.o: ../common/environ.c): Remove.
3314 (common-debug.o: ../common/common-debug.c): Remove.
3315 (cleanups.o: ../common/cleanups.c): Remove.
3316 (common-exceptions.o: ../common/common-exceptions.c): Remove.
3317 (fileio.o: ../common/fileio.c): Remove.
3318 (common-regcache.o: ../common/common-regcache.c): Remove.
3319 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
3320 (new-op.o: ../common/new-op.c): Remove.
3321 (btrace-common.o: ../common/btrace-common.c): Remove.
3322
21122961
SM
33232017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3324
3325 * Makefile.in (%.o: ../target/%.c): New rule.
3326 (waitstatus.o: ../target/waitstatus.c): Remove.
3327
c362e621
SM
33282017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3329
3330 * Makefile.in
3331 (%.c: ../regformats/%.dat,
3332 (%.c: ../regformats/arm/%.dat,
3333 (%.c: ../regformats/i386/%.dat,
3334 (%.c: ../regformats/rs6000/%.dat): New rules.
3335 (aarch64.c): Remove.
3336 (reg-arm.c): Remove.
3337 (arm-with-iwmmxt.c): Remove.
3338 (arm-with-vfpv2.c): Remove.
3339 (arm-with-vfpv3.c): Remove.
3340 (arm-with-neon.c): Remove.
3341 (reg-bfin.c): Remove.
3342 (reg-cris.c): Remove.
3343 (reg-crisv32.c): Remove.
3344 (i386.c): Remove.
3345 (i386-linux.c): Remove.
3346 (i386-avx.c): Remove.
3347 (i386-avx-linux.c): Remove.
3348 (i386-avx-avx512.c): Remove.
3349 (i386-avx-avx512-linux.c): Remove.
3350 (i386-mpx.c): Remove.
3351 (i386-mpx-linux.c): Remove.
3352 (i386-avx-mpx-avx512-pku.c): Remove.
3353 (i386-avx-mpx-avx512-pku-linux.c): Remove.
3354 (i386-avx-mpx.c): Remove.
3355 (i386-avx-mpx-linux.c): Remove.
3356 (i386-mmx.c): Remove.
3357 (i386-mmx-linux.c): Remove.
3358 (reg-ia64.c): Remove.
3359 (reg-m32r.c): Remove.
3360 (reg-m68k.c): Remove.
3361 (reg-cf.c): Remove.
3362 (mips-linux.c): Remove.
3363 (mips-dsp-linux.c): Remove.
3364 (mips64-linux.c): Remove.
3365 (mips64-dsp-linux.c): Remove.
3366 (nios2-linux.c): Remove.
3367 (powerpc-32.c): Remove.
3368 (powerpc-32l.c): Remove.
3369 (powerpc-altivec32l.c): Remove.
3370 (powerpc-cell32l.c): Remove.
3371 (powerpc-vsx32l.c): Remove.
3372 (powerpc-isa205-32l.c): Remove.
3373 (powerpc-isa205-altivec32l.c): Remove.
3374 (powerpc-isa205-vsx32l.c): Remove.
3375 (powerpc-e500l.c): Remove.
3376 (powerpc-64l.c): Remove.
3377 (powerpc-altivec64l.c): Remove.
3378 (powerpc-cell64l.c): Remove.
3379 (powerpc-vsx64l.c): Remove.
3380 (powerpc-isa205-64l.c): Remove.
3381 (powerpc-isa205-altivec64l.c): Remove.
3382 (powerpc-isa205-vsx64l.c): Remove.
3383 (s390-linux32.c): Remove.
3384 (s390-linux32v1.c): Remove.
3385 (s390-linux32v2.c): Remove.
3386 (s390-linux64.c): Remove.
3387 (s390-linux64v1.c): Remove.
3388 (s390-linux64v2.c): Remove.
3389 (s390-te-linux64.c): Remove.
3390 (s390-vx-linux64.c): Remove.
3391 (s390-tevx-linux64.c): Remove.
3392 (s390x-linux64.c): Remove.
3393 (s390x-linux64v1.c): Remove.
3394 (s390x-linux64v2.c): Remove.
3395 (s390x-te-linux64.c): Remove.
3396 (s390x-vx-linux64.c): Remove.
3397 (s390x-tevx-linux64.c): Remove.
3398 (tic6x-c64xp-linux.c): Remove.
3399 (tic6x-c64x-linux.c): Remove.
3400 (tic6x-c62x-linux.c): Remove.
3401 (reg-sh.c): Remove.
3402 (reg-sparc64.c): Remove.
3403 (reg-spu.c): Remove.
3404 (amd64.c): Remove.
3405 (amd64-linux.c): Remove.
3406 (amd64-avx.c): Remove.
3407 (amd64-avx-linux.c): Remove.
3408 (amd64-avx-avx512.c): Remove.
3409 (amd64-avx-avx512-linux.c): Remove.
3410 (amd64-mpx.c): Remove.
3411 (amd64-mpx-linux.c): Remove.
3412 (amd64-avx-mpx-avx512-pku.c): Remove.
3413 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
3414 (amd64-avx-mpx.c): Remove.
3415 (amd64-avx-mpx-linux.c): Remove.
3416 (x32.c): Remove.
3417 (x32-linux.c): Remove.
3418 (x32-avx.c): Remove.
3419 (x32-avx-linux.c): Remove.
3420 (x32-avx-avx512.c): Remove.
3421 (x32-avx-avx512-linux.c): Remove.
3422 (reg-xtensa.c): Remove.
3423 (reg-tilegx.c): Remove.
3424 (reg-tilegx32.c): Remove.
3425
1672e0d9
SDJ
34262017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
3427
3428 * Makefile.in (SFILES): Add "common/environ.c".
3429 (OBJS): Add "common/environ.h".
3430
239b6d10
WT
34312017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
3432
3433 * configure.ac: Check if the fs_base and gs_base members of
3434 `struct user_regs_struct' exist.
3435 * config.in: Regenerated.
3436 * configure: Likewise.
3437
694b382c
AT
34382017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
3439
3440 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
3441 target_read_memory.
3442 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
3443 (get_next_pcs_syscall_next_pc): Likewise.
3444
7dc53023
LM
34452016-12-23 Luis Machado <lgustavo@codesourcery.com>
3446
3447 * win32-i386-low.c: Fix incorrect reference to a couple source files.
3448 * nto-x86-low.c: Likewise.
3449
ad02e4fe
SM
34502016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
3451
3452 * Makefile.in: Include disable-implicit-rules.mk.
3453
dcb07cfa
PA
34542016-11-23 Pedro Alves <palves@redhat.com>
3455
3456 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
3457 (debug_vprintf): Use std::chrono::steady_clock instead of
3458 gettimeofday. Use '.' instead of ':'.
3459 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
3460 (get_timestamp): Use std::chrono::steady_clock instead of
3461 gettimeofday.
3462
8629c02c
SM
34632016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
3464
3465 * Makefile.in: Fix whitespace formatting.
3466
b593ecca
SM
34672016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
3468
3469 * Makefile.in (SFILES, OBS): Flatten list and order
3470 alphabetically.
3471
9986ba08
PA
34722016-11-23 Pedro Alves <palves@redhat.com>
3473
3474 * event-loop.c (handle_file_event): Use warning.
3475 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
3476 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
3477 Use warning.
3478
4eefa7bc
PA
34792016-11-23 Pedro Alves <palves@redhat.com>
3480
3481 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
3482 output.
3483 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
3484 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
3485 debug_printf and debug_flush for debug output.
3486 * server.c (handle_general_set): Likewise.
3487 * thread-db.c (try_thread_db_load): Use debug_printf for debug
3488 output.
3489
5443506e
SM
34902016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
3491
3492 * Makefile.in (.c.o): Replace rule with ...
3493 (%.o: %.c): ... this one.
3494
3b165252
SM
34952016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
3496
3497 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
3498 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
3499 make.
3500 * configure.ac: Remove checks for the make program.
3501 * configure: Re-generate.
3502
0bcda685
PA
35032016-10-28 Pedro Alves <palves@redhat.com>
3504
3505 * Makefile.in (CXX_DIALECT): Get from configure.
3506 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
3507 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
3508 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
3509 * config.in: Regenerate.
3510 * configure: Regenerate.
3511
c3805894
YQ
35122016-10-27 Yao Qi <yao.qi@linaro.org>
3513
3514 * linux-low.c (linux_supports_range_stepping): Return true if
3515 can_software_single_step return true.
3516
89342618
YQ
35172016-10-27 Yao Qi <yao.qi@linaro.org>
3518
3519 * inferiors.c (find_inferior_in_random): New function.
3520 * inferiors.h (find_inferior_in_random): Declare.
3521 * linux-low.c (linux_wait_for_event_filtered): Call
3522 find_inferior_in_random instead of find_inferior.
3523
e3652c84
YQ
35242016-10-27 Yao Qi <yao.qi@linaro.org>
3525
3526 * linux-low.c (linux_wait_1): If single-step breakpoints are
3527 inserted, remove them.
3528
5a04c4cf
PA
35292016-10-26 Pedro Alves <palves@redhat.com>
3530
3531 * linux-low.c (handle_extended_wait): Link parent/child fork
3532 threads.
3533 (linux_wait_1): Unlink them.
3534 (linux_set_resume_request): Ignore resume requests for
3535 already-resumed and unhandled fork child threads.
3536 * linux-low.h (struct lwp_info) <fork_relative>: New field.
3537 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
3538 New functions.
3539 (handle_v_requests) <vCont>: Don't call require_running.
3540 * server.h (in_queued_stop_replies): New declaration.
3541
cb93dc7f
YQ
35422016-10-24 Yao Qi <yao.qi@linaro.org>
3543
3544 PR server/20733
3545 * linux-aarch64-low.c (append_insns): Cast the return value to
3546 'uint32_t *'.
3547
a1078bea
YQ
35482016-10-10 Yao Qi <yao.qi@linaro.org>
3549
3550 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
3551
1fb77080
SDJ
35522016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
3553
3554 * target.c (target_supports_multi_process): New function, moved
3555 from...
3556 * target.h (target_supports_multi_process): ... here. Remove
3557 macro.
3558
39b5a3b9
TT
35592016-10-05 Tom Tromey <tom@tromey.com>
3560
3561 PR remote/20655:
3562 * tracepoint.c (handle_tracepoint_bkpts): Check
3563 ipa_error_tracepoint, not ipa_stopping_tracepoint.
3564
c1d0b70a
YQ
35652016-10-05 Yao Qi <yao.qi@linaro.org>
3566
3567 * configure.srv: Update the path of arm-*.xml files.
3568
0a69eedb
YQ
35692016-10-05 Terry Guo <terry.guo@arm.com>
3570 Yao Qi <yao.qi@linaro.org>
3571
3572 * Makefile.in: Adjust the path of rules.
3573 * configure.srv: Update the path of xml files.
3574 * regformats/arm-with-iwmmxt.dat: Regenerated.
3575 * regformats/arm-with-neon.dat: Likewise.
3576 * regformats/arm-with-vfpv2.dat: Likewise.
3577 * regformats/arm-with-vfpv3.dat Likewise.
3578
17e16485
YQ
35792016-09-30 Yao Qi <yao.qi@linaro.org>
3580
3581 PR gdbserver/20627
3582 * target.c (target_stop_and_wait): Don't call
3583 target_continue_no_signal, use resume_stop instead.
3584
edeeb602
YQ
35852016-09-26 Yao Qi <yao.qi@linaro.org>
3586
3587 * linux-low.c (linux_wait_1): Call debug_exit.
3588
503b1c39
PA
35892016-09-23 Pedro Alves <palves@redhat.com>
3590
3591 * Makefile.in (SFILES): Add common/new-op.c.
3592 (OBS): Add common/new-op.o.
3593 (new-op.o): New rule.
3594
74172ecf
SM
35952016-09-21 Simon Marchi <simon.marchi@ericsson.com>
3596
3597 * .gitinore: Ignore more files.
3598
fc6cda2e
YQ
35992016-09-21 Yao Qi <yao.qi@linaro.org>
3600
3601 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
3602 23.
3603
bc1e6c81
SDJ
36042016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
3605
3606 * server.c (start_inferior): Call target_mourn_inferior instead of
3607 mourn_inferior; pass ptid_t argument to it.
3608 (resume): Likewise.
3609 (handle_target_event): Likewise.
3610 * target.c (target_mourn_inferior): New function.
3611 * target.h (mourn_inferior): Delete macro.
3612
0e00e962
AA
36132016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
3614
3615 * linux-low.c (lwp_is_stepping): New function.
3616
1d8cb77d
CL
36172016-09-06 Carl Love <cel@us.ibm.com>
3618
3619 * server.c (start_inferior): Fixed comment, requested comment change
3620 didn't get updated correctly. Removed reference to ptrace () call as
3621 it is only true on Linux systems.
3622
7313bced
CL
36232016-09-06 Carl Love <cel@us.ibm.com>
3624
3625 * server.c (start_inferior): Do not call
3626 function target_post_create_inferior () if the
3627 inferior process has already exited.
3628
cf6de44d
PA
36292016-09-05 Pedro Alves <palves@redhat.com>
3630
3631 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
3632 (COMPILE.pre, CC_LD): Use CXX directly.
3633 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
3634 * acinclude.m4: Don't include build-with-cxx.m4.
3635 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
3636 * configure: Regenerate.
3637
c1da6748
AT
36382016-09-02 Akash Trehan <akash.trehan123@gmail.com>
3639
3640 PR gdb/19495
3641 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
3642 call writing data to own_buf.
3643
f2b9e3df
SDJ
36442016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
3645
3646 * target.c (mywait): Call target_wait instead of
3647 the_target->wait.
3648 (target_wait): New function.
3649
049a8570
SDJ
36502016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
3651
3652 * server.c (start_inferior): New variable 'ptid'. Replace calls
3653 to the_target->resume by target_continue{,_no_signal}, depending
3654 on the case.
3655 * target.c (target_stop_and_wait): Call target_continue_no_signal
3656 instead of the_target->resume.
3657 (target_continue): New function.
3658
3aa5cfa0
AT
36592016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
3660
3661 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
3662
754653a7
AZ
36632016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
3664
3665 PR server/20491
3666 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
3667 ps_prochandle.
3668 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
3669 * linux-arm-low.c (ps_get_thread_area): Likewise.
3670 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
3671 * linux-m68k-low.c (ps_get_thread_area): Likewise.
3672 * linux-mips-low.c (ps_get_thread_area): Likewise.
3673 * linux-nios2-low.c (ps_get_thread_area): Likewise.
3674 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
3675 * linux-x86-low.c (ps_get_thread_area): Likewise.
3676 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
3677
ed036b40
PA
36782016-08-19 Pedro Alves <palves@redhat.com>
3679
3680 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
3681
c8ef42ee
PA
36822016-08-19 Pedro Alves <palves@redhat.com>
3683
3684 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
3685 comment. Use memcpy instead of casting through unsigned long.
3686
9c235a72
PA
36872016-08-19 Pedro Alves <palves@redhat.com>
3688
3689 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
3690 allocating around 0x80000000.
3691
201506da
PA
36922016-08-19 Pedro Alves <palves@redhat.com>
3693
3694 PR gdb/20415
3695 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
3696 (x32-avx512-linux-ipa.o): New rules.
3697 * configure.ac (x86_64-*-linux*): New x32 check.
3698 * configure.srv (ipa_x32_linux_regobj): New.
3699 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
3700 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
3701 descriptions.
3702 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
3703 descriptions.
3704 * configure: Regenerate.
3705
f348d89a
PA
37062016-08-09 Pedro Alves <palves@redhat.com>
3707
3708 PR gdb/18653
3709 * Makefile.in (OBS): Add signals-state-save-restore.o.
3710 (signals-state-save-restore.o): New rule.
3711 * config.in: Regenerate.
3712 * configure: Regenerate.
3713 * linux-low.c: Include "signals-state-save-restore.h".
3714 (linux_create_inferior): Call
3715 restore_original_signals_state.
3716 * server.c: Include "dispositions-save-restore.h".
3717 (captured_main): Call save_original_signals_state.
3718
1baf5149
PA
37192016-08-05 Pedro Alves <palves@redhat.com>
3720
3721 * configure: Regenerate.
3722
fcd4a73d
YQ
37232016-08-04 Yao Qi <yao.qi@linaro.org>
3724
3725 * linux-low.c (regsets_fetch_inferior_registers): Check
3726 errno is ESRCH or not.
3727
979659d0
YQ
37282016-08-02 Yao Qi <yao.qi@linaro.org>
3729
3730 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
3731 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
3732 (thread_db_load_search): Update.
3733 (try_thread_db_load_1): Don't look for td_ta_event_addr,
3734 td_ta_set_event and td_ta_event_getmsg.
3735
6598661d
PA
37362016-07-26 Pedro Alves <palves@redhat.com>
3737
3738 PR server/20414
3739 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
3740 of unsigned long for 64-bit registers and use uint32_t instead of
3741 unsigned int for 32-bit registers.
3742
9cf12d57
PA
37432016-07-26 Pedro Alves <palves@redhat.com>
3744
3745 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
3746 to 'ptrace'.
3747
305450ed
TT
37482016-07-21 Tom Tromey <tom@tromey.com>
3749
3750 * configure: Rebuild.
3751
2583da7c
YQ
37522016-07-21 Yao Qi <yao.qi@linaro.org>
3753
3754 * mem-break.c (find_gdb_breakpoint): Cast bp to
3755 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
3756
21536b36
YQ
37572016-07-21 Yao Qi <yao.qi@linaro.org>
3758
3759 * server.c (handle_v_requests): Support s and S actions
3760 if target_supports_software_single_step return true.
3761
8901d193
YQ
37622016-07-21 Yao Qi <yao.qi@linaro.org>
3763
3764 * linux-low.c (resume_stopped_resumed_lwps): If resume request
3765 is resume_step, call maybe_hw_step.
3766 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
3767 and unstop them.
3768 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
3769 breakpoints or not.
3770 (proceed_one_lwp): If resume request is resume_step, install
3771 reinsert breakpoints and call maybe_hw_step.
3772
0e9a339e
YQ
37732016-07-21 Yao Qi <yao.qi@linaro.org>
3774
3775 * linux-low.c (proceed_one_lwp): Declare.
3776 (linux_resume_one_thread): Remove local variable 'step'.
3777 Lift code enqueue signal. Call proceed_one_lwp instead of
3778 linux_resume_one_lwp.
3779
4281b351
YQ
37802016-07-21 Yao Qi <yao.qi@linaro.org>
3781
3782 * linux-low.c (linux_resume_one_thread): Call
3783 enqueue_pending_signal.
3784
984a2c04
YQ
37852016-07-21 Yao Qi <yao.qi@linaro.org>
3786
3787 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
3788 * inferiors.c (do_restore_current_thread_cleanup): New function.
3789 (make_cleanup_restore_current_thread): Likewise.
3790 * linux-low.c (install_software_single_step_breakpoints): Call
3791 make_cleanup_restore_current_thread. Switch current_thread to
3792 thread.
3793
bec903c9
YQ
37942016-07-21 Yao Qi <yao.qi@linaro.org>
3795
3796 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
3797 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
3798 (clone_one_breakpoint): Likewise.
3799 (delete_reinsert_breakpoints): Change parameter to thread.
3800 Callers updated.
3801 (has_reinsert_breakpoints): Likewise.
3802 (uninsert_reinsert_breakpoints): Likewise.
3803 (reinsert_reinsert_breakpoints): Likewise.
3804 * mem-break.h (set_reinsert_breakpoint): Update declaration.
3805 (delete_reinsert_breakpoints): Likewise.
3806 (reinsert_reinsert_breakpoints): Likewise.
3807 (uninsert_reinsert_breakpoints): Likewise.
3808 (has_reinsert_breakpoints): Likewise.
3809
63c40ec7
YQ
38102016-07-21 Yao Qi <yao.qi@linaro.org>
3811
3812 * inferiors.c (get_thread_process): Make parameter const.
3813 * inferiors.h (get_thread_process): Update declaration.
3814 * mem-break.c (clone_all_breakpoints): Remove all parameters.
3815 Add new parameters child_thread and parent_thread. Callers
3816 updated.
3817 * mem-break.h (clone_all_breakpoints): Update declaration.
3818
9aa76cd0
YQ
38192016-07-21 Yao Qi <yao.qi@linaro.org>
3820
3821 * mem-break.c (struct breakpoint) <cond_list>: Remove.
3822 <command_list, handler>: Remove.
3823 (struct gdb_breakpoint): New.
3824 (struct other_breakpoint): New.
3825 (struct reinsert_breakpoint): New.
3826 (is_gdb_breakpoint): New function.
3827 (any_persistent_commands): Update command_list if
3828 is_gdb_breakpoint returns true.
3829 (set_breakpoint): Create breakpoints according to their types.
3830 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
3831 (set_gdb_breakpoint_1): Likewise.
3832 (set_gdb_breakpoint): Likewise.
3833 (clear_breakpoint_conditions): Change parameter type to
3834 'struct gdb_breakpoint *'.
3835 (clear_breakpoint_commands): Likewise.
3836 (clear_breakpoint_conditions_and_commands): Likewise.
3837 (add_condition_to_breakpoint): Likewise.
3838 (add_breakpoint_condition): Likewise.
3839 (add_commands_to_breakpoint): Likewise.
3840 (check_breakpoints): Check other_breakpoint.
3841 (clone_one_breakpoint): Clone breakpopint according to its type.
3842 * mem-break.h (struct gdb_breakpoint): Declare.
3843 (set_gdb_breakpoint): Update declaration.
3844 (clear_breakpoint_conditions_and_commands): Likewise.
3845 (add_breakpoint_condition): Likewise.
3846 (add_breakpoint_commands): Likewise.
3847 * server.c (process_point_options): Change parameter type to
3848 'struct gdb_breakpoint *'.
3849
811f8301
YQ
38502016-07-21 Yao Qi <yao.qi@linaro.org>
3851
3852 * mem-break.c (set_breakpoint_at): Rename it to ...
3853 (set_breakpoint_type_at): ... it.
3854 (set_breakpoint_at): Call set_breakpoint_type_at.
3855 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
3856 * mem-break.h (set_breakpoint_at): Update comments.
3857
b1c51e36
CLT
38582016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
3859
3860 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
3861 to buf parameter.
3862 (nios2_store_gregset): Likewise.
3863
ced2dffb
PA
38642016-07-01 Pedro Alves <palves@redhat.com>
3865 Antoine Tremblay <antoine.tremblay@ericsson.com>
3866
3867 * linux-low.c: Change interface to take the target lwp_info
3868 pointer directly and return void. Handle detaching from a zombie
3869 thread.
3870 (linux_detach_lwp_callback): New function.
3871 (linux_detach): Detach from the leader thread after detaching from
3872 the clone threads.
3873
2ac09a5b
YQ
38742016-06-28 Yao Qi <yao.qi@linaro.org>
3875
3876 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
3877 for variable new_offset.
3878 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
3879 (aarch64_ftrace_insn_reloc_cb): Likewise.
3880 (aarch64_ftrace_insn_reloc_tb): Likewise.
3881 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
3882 PRIx64 instead of PRIx32.
3883
79e7fd4f
YQ
38842016-06-28 Yao Qi <yao.qi@linaro.org>
3885
3886 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
3887 (the_low_target): Install arm_get_syscall_trapinfo.
3888
061fc021
YQ
38892016-06-28 Yao Qi <yao.qi@linaro.org>
3890
3891 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
3892 function.
3893 (the_low_target): Install aarch64_get_syscall_trapinfo.
3894
4cc32bec
YQ
38952016-06-28 Yao Qi <yao.qi@linaro.org>
3896
3897 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
3898 Callers updated.
3899 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
3900 Remove parameter sysno.
3901 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
3902 sysret.
3903
782c1122
AA
39042016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
3905
3906 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
3907 (s390_emit_ne_goto): Likewise.
3908 (s390_emit_lt_goto): Likewise.
3909 (s390_emit_le_goto): Likewise.
3910 (s390_emit_gt_goto): Likewise.
3911 (s390_emit_ge_goto): Likewise.
3912 (s390x_emit_eq_goto): Likewise.
3913 (s390x_emit_ne_goto): Likewise.
3914 (s390x_emit_lt_goto): Likewise.
3915 (s390x_emit_le_goto): Likewise.
3916 (s390x_emit_gt_goto): Likewise.
3917 (s390x_emit_ge_goto): Likewise.
3918 (s390_emit_ops_impl): Mark variable static.
3919 (s390x_emit_ops): Likewise.
3920
2e7b624b
YQ
39212016-06-17 Yao Qi <yao.qi@linaro.org>
3922
3923 * linux-low.c (handle_extended_wait): Call
3924 uninsert_reinsert_breakpoints for the parent process. Remove
3925 reinsert breakpoints from the child process. Reinsert them to
3926 the parent process when vfork is done.
3927 * mem-break.c (uninsert_reinsert_breakpoints): New function.
3928 (reinsert_reinsert_breakpoints): New function.
3929 * mem-break.h (uninsert_reinsert_breakpoints): Declare
3930 (reinsert_reinsert_breakpoints): Declare.
3931
8a81c5d7
YQ
39322016-06-17 Yao Qi <yao.qi@linaro.org>
3933
3934 * linux-low.c (handle_extended_wait): If the parent is doing
3935 step-over, remove the reinsert breakpoints from the forked child.
3936
f50bf8e5
YQ
39372016-06-17 Yao Qi <yao.qi@linaro.org>
3938
3939 * linux-low.c (unsuspend_all_lwps): Declare.
3940 (linux_low_filter_event): If thread exited, call finish_step_over.
3941 If step-over is finished, unsuspend other threads.
3942
8376a3cb
YQ
39432016-06-17 Yao Qi <yao.qi@linaro.org>
3944
3945 * linux-low.c (linux_resume_one_lwp_throw): Assert
3946 has_reinsert_breakpoints returns false.
3947 * mem-break.c (delete_disabled_breakpoints): Assert
3948 bp type isn't reinsert_breakpoint.
3949
f79b145d
YQ
39502016-06-17 Yao Qi <yao.qi@linaro.org>
3951
3952 * linux-low.c (maybe_hw_step): New function.
3953 (linux_resume_one_lwp_throw): Call maybe_hw_step.
3954 (finish_step_over): Switch current_thread to lwp temporarily,
3955 and assert has_reinsert_breakpoints returns true.
3956 (proceed_one_lwp): Call maybe_hw_step.
3957 * mem-break.c (has_reinsert_breakpoints): New function.
3958 * mem-break.h (has_reinsert_breakpoints): Declare.
3959
0ae534d2
JT
39602016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
3961
3962 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
3963
fcdad592
YQ
39642016-05-17 Yao Qi <yao.qi@linaro.org>
3965
3966 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
3967 instead of find_inferior.
3968
9e784964
YQ
39692016-05-05 Yao Qi <yao.qi@linaro.org>
3970
3971 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
3972 Initialize res to zero.
3973
cf2ebb6e
YQ
39742016-05-05 Yao Qi <yao.qi@linaro.org>
3975
3976 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
3977 to uint32_t.
3978
c1aebf87
UW
39792016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
3980
3981 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
3982 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
3983 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
3984
35fd2deb 39852016-04-28 Par Olsson <par.olsson@windriver.com>
cbe14bcf 3986 Simon Marchi <simon.marchi@ericsson.com>
35fd2deb
PO
3987
3988 * tracepoint.c (write_inferior_int8): New function.
3989 (cmd_qtenable_disable): Write enable flag using
3990 write_inferior_int8.
3991
484b3c32
YQ
39922016-04-25 Yao Qi <yao.qi@linaro.org>
3993
3994 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
3995 (need_step_over_p): Return zero if the LWP has pending signals
3996 can be delivered on software single step target.
3997
85ba7d86
YQ
39982016-04-25 Yao Qi <yao.qi@linaro.org>
3999
4000 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
4001 return instead of error.
4002
3539aa13
YQ
40032016-04-22 Yao Qi <yao.qi@linaro.org>
4004
4005 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
4006 to 23.
4007
5b061e98
YQ
40082016-04-22 Yao Qi <yao.qi@linaro.org>
4009
4010 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
4011 signal when stepping over breakpoint with software single
4012 step.
4013
3451269c
PA
40142016-04-21 Pedro Alves <palves@redhat.com>
4015
4016 * linux-s390-low.c (s390_collect_ptrace_register)
4017 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
4018 add casts.
4019 (s390_check_regset): Use void * instead of gdb_byte *.
4020
a2358508
PA
40212016-04-20 Pedro Alves <palves@redhat.com>
4022
4023 * configure: Renegerate.
4024
6885166d
YQ
40252016-04-20 Yao Qi <yao.qi@linaro.org>
4026
4027 * linux-aarch32-low.c: Include "arch/arm-linux.h".
4028 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
4029 number 16.
4030 (arm_store_gregset): Likewise.
4031
2b863f51
WT
40322016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
4033
4034 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
4035 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
4036 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
4037 (amd64-avx-mpx-linux.c): New rules.
4038 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
4039 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
4040 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
4041 (srv_amd64_regobj): Add amd64-avx-mpx.o.
4042 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
4043 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
4044 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
4045 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
4046 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
4047 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
4048 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
4049 * linux-x86-low.c (x86_linux_read_description): Add case for
4050 X86_XSTATE_AVX_MPX_MASK.
4051 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
4052 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
4053 init_registers_i386_avx_mpx_linux.
4054 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
4055 (initialize_low_tracepoint): Call
4056 init_registers_i386_avx_mpx_linux.
4057 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
4058 (initialize_low_tracepoint): Call
4059 init_registers_amd64_avx_mpx_linux.
4060 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
4061 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
4062 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
4063 declarations.
4064
9b30624b
PA
40652016-04-18 Pedro Alves <palves@redhat.com>
4066
4067 * configure: Regenerate.
4068
45e3745e
AT
40692016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
4070
4071 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
4072 (aarch64_emit_sub): Likewise.
4073
2afc13ff
PA
40742016-04-12 Pedro Alves <palves@redhat.com>
4075
4076 * utils.c (prepare_to_throw_exception): Delete.
4077
6e774b13
SM
40782016-04-05 Simon Marchi <simon.marchi@ericsson.com>
4079
4080 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
4081
4dca19f8
MK
40822016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
4083
4084 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
4085
d0a9981f
MK
40862016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
4087
4088 * linux-aarch64-ipa.c: Add <elf.h> include.
4089 * linux-ppc-ipa.c: Add <elf.h> include.
4090 * linux-s390-ipa.c: Add <elf.h> include.
4091
252db07e
MK
40922016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
4093
4094 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
4095 (get_raw_reg_ptr): Likewise.
4096 (get_trace_state_variable_value_ptr): Likewise.
4097 (set_trace_state_variable_value_ptr): Likewise.
4098 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
4099 char *.
4100
14e2b6d9
MK
41012016-03-31 Wei-cheng Wang <cole945@gmail.com>
4102 Marcin Kościelnicki <koriakin@0x04.net>
4103
4104 PR/17221
4105 * linux-ppc-low.c (emit_insns): New function.
4106 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
4107 (ppc_emit_prologue): New function.
4108 (ppc_emit_epilogue): New function.
4109 (ppc_emit_add): New function.
4110 (ppc_emit_sub): New function.
4111 (ppc_emit_mul): New function.
4112 (ppc_emit_lsh): New function.
4113 (ppc_emit_rsh_signed): New function.
4114 (ppc_emit_rsh_unsigned): New function.
4115 (ppc_emit_ext): New function.
4116 (ppc_emit_zero_ext): New function.
4117 (ppc_emit_log_not): New function.
4118 (ppc_emit_bit_and): New function.
4119 (ppc_emit_bit_or): New function.
4120 (ppc_emit_bit_xor): New function.
4121 (ppc_emit_bit_not): New function.
4122 (ppc_emit_equal): New function.
4123 (ppc_emit_less_signed): New function.
4124 (ppc_emit_less_unsigned): New function.
4125 (ppc_emit_ref): New function.
4126 (ppc_emit_const): New function.
4127 (ppc_emit_reg): New function.
4128 (ppc_emit_pop): New function.
4129 (ppc_emit_stack_flush): New function.
4130 (ppc_emit_swap): New function.
4131 (ppc_emit_stack_adjust): New function.
4132 (ppc_emit_call): New function.
4133 (ppc_emit_int_call_1): New function.
4134 (ppc_emit_void_call_2): New function.
4135 (ppc_emit_if_goto): New function.
4136 (ppc_emit_goto): New function.
4137 (ppc_emit_eq_goto): New function.
4138 (ppc_emit_ne_goto): New function.
4139 (ppc_emit_lt_goto): New function.
4140 (ppc_emit_le_goto): New function.
4141 (ppc_emit_gt_goto): New function.
4142 (ppc_emit_ge_goto): New function.
4143 (ppc_write_goto_address): New function.
4144 (ppc_emit_ops_impl): New static variable.
4145 (ppc64v1_emit_prologue): New function.
4146 (ppc64v2_emit_prologue): New function.
4147 (ppc64_emit_epilogue): New function.
4148 (ppc64_emit_add): New function.
4149 (ppc64_emit_sub): New function.
4150 (ppc64_emit_mul): New function.
4151 (ppc64_emit_lsh): New function.
4152 (ppc64_emit_rsh_signed): New function.
4153 (ppc64_emit_rsh_unsigned): New function.
4154 (ppc64_emit_ext): New function.
4155 (ppc64_emit_zero_ext): New function.
4156 (ppc64_emit_log_not): New function.
4157 (ppc64_emit_bit_and): New function.
4158 (ppc64_emit_bit_or): New function.
4159 (ppc64_emit_bit_xor): New function.
4160 (ppc64_emit_bit_not): New function.
4161 (ppc64_emit_equal): New function.
4162 (ppc64_emit_less_signed): New function.
4163 (ppc64_emit_less_unsigned): New function.
4164 (ppc64_emit_ref): New function.
4165 (ppc64_emit_const): New function.
4166 (ppc64v1_emit_reg): New function.
4167 (ppc64v2_emit_reg): New function.
4168 (ppc64_emit_pop): New function.
4169 (ppc64_emit_stack_flush): New function.
4170 (ppc64_emit_swap): New function.
4171 (ppc64v1_emit_call): New function.
4172 (ppc64v2_emit_call): New function.
4173 (ppc64v1_emit_int_call_1): New function.
4174 (ppc64v2_emit_int_call_1): New function.
4175 (ppc64v1_emit_void_call_2): New function.
4176 (ppc64v2_emit_void_call_2): New function.
4177 (ppc64_emit_if_goto): New function.
4178 (ppc64_emit_eq_goto): New function.
4179 (ppc64_emit_ne_goto): New function.
4180 (ppc64_emit_lt_goto): New function.
4181 (ppc64_emit_le_goto): New function.
4182 (ppc64_emit_gt_goto): New function.
4183 (ppc64_emit_ge_goto): New function.
4184 (ppc64v1_emit_ops_impl): New static variable.
4185 (ppc64v2_emit_ops_impl): New static variable.
4186 (ppc_emit_ops): New function.
4187 (linux_low_target): Wire in ppc_emit_ops.
4188
a2174ba4
MK
41892016-03-31 Wei-cheng Wang <cole945@gmail.com>
4190 Marcin Kościelnicki <koriakin@0x04.net>
4191
4192 PR/17221
4193 * Makefile.in: Add powerpc-*-ipa.o
4194 * configure.srv: Add ipa_obj for powerpc*-linux.
4195 * linux-ppc-ipa.c: New file.
4196 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
4197 includes.
4198 (PPC_FIELD): New macro.
4199 (PPC_SEXT): New macro.
4200 (PPC_OP6): New macro.
4201 (PPC_BO): New macro.
4202 (PPC_LI): New macro.
4203 (PPC_BD): New macro.
4204 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
4205 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
4206 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
4207 (ppc_get_thread_area): New function.
4208 (is_elfv2_inferior): New function.
4209 (gen_ds_form): New function.
4210 (GEN_STD): New macro.
4211 (GEN_STDU): New macro.
4212 (GEN_LD): New macro.
4213 (GEN_LDU): New macro.
4214 (gen_d_form): New function.
4215 (GEN_ADDI): New macro.
4216 (GEN_ADDIS): New macro.
4217 (GEN_LI): New macro.
4218 (GEN_LIS): New macro.
4219 (GEN_ORI): New macro.
4220 (GEN_ORIS): New macro.
4221 (GEN_LWZ): New macro.
4222 (GEN_STW): New macro.
4223 (GEN_STWU): New macro.
4224 (gen_xfx_form): New function.
4225 (GEN_MFSPR): New macro.
4226 (GEN_MTSPR): New macro.
4227 (GEN_MFCR): New macro.
4228 (GEN_MTCR): New macro.
4229 (GEN_SYNC): New macro.
4230 (GEN_LWSYNC): New macro.
4231 (gen_x_form): New function.
4232 (GEN_OR): New macro.
4233 (GEN_MR): New macro.
4234 (GEN_LWARX): New macro.
4235 (GEN_STWCX): New macro.
4236 (GEN_CMPW): New macro.
4237 (gen_md_form): New function.
4238 (GEN_RLDICL): New macro.
4239 (GEN_RLDICR): New macro.
4240 (gen_i_form): New function.
4241 (GEN_B): New macro.
4242 (GEN_BL): New macro.
4243 (gen_b_form): New function.
4244 (GEN_BNE): New macro.
4245 (GEN_LOAD): New macro.
4246 (GEN_STORE): New macro.
4247 (gen_limm): New function.
4248 (gen_atomic_xchg): New function.
4249 (gen_call): New function.
4250 (ppc_relocate_instruction): New function.
4251 (ppc_install_fast_tracepoint_jump_pad): New function.
4252 (ppc_get_min_fast_tracepoint_insn_len): New function.
4253 (ppc_get_ipa_tdesc_idx): New function.
4254 (the_low_target): Wire in the new functions.
4255 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
4256 tdescs.
4257 * linux-ppc-tdesc.h: New file.
4258
a13c4696
MK
42592016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
4260
4261 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
4262 (alloc_jump_pad_buffer): New function.
4263 * linux-amd64-ipa.c: Add <sys/mman.h> include.
4264 (alloc_jump_pad_buffer): New function.
4265 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
4266 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
4267 (alloc_jump_pad_buffer): New function.
4268 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
4269 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
4270 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
4271 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
4272
1cda1512
MK
42732016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
4274
4275 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
4276 * linux-amd64-ipa.c: Likewise.
4277 * linux-i386-ipa.c: Likewise.
4278 * linux-s390-ipa.c: Likewise.
4279 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
4280 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
4281 set_trace_state_variable_value_ptr.
4282 (struct ipa_sym_addresses): Likewise.
4283 (symbol_list): Likewise.
4284 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
4285 accessing gdb_collect directly.
4286 (gdb_collect_ptr_type): New typedef.
4287 (get_raw_reg_ptr_type): New typedef.
4288 (get_trace_state_variable_value_ptr_type): New typedef.
4289 (set_trace_state_variable_value_ptr_type): New typedef.
4290 (gdb_collect_ptr): New global.
4291 (get_raw_reg_ptr): New global.
4292 (get_trace_state_variable_value_ptr): New global.
4293 (set_trace_state_variable_value_ptr): New global.
4294 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
4295 accessing get_raw_reg directly.
4296 (get_get_tsv_func_addr): Likewise for
4297 get_trace_state_variable_value_ptr.
4298 (get_set_tsv_func_addr): Likewise for
4299 set_trace_state_variable_value_ptr.
4300 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
4301
72fb5488
SM
43022016-03-30 Simon Marchi <simon.marchi@ericsson.com>
4303
4304 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
4305
28170b88
MK
43062016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
4307
4308 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
4309 packets.
4310 (relocate_instruction): Remove own_buf.
4311 * server.c (own_buf): Make global.
4312 (handle_v_requests): Make global.
4313 * server.h (own_buf): New declaration.
4314 (handle_v_requests): New prototype.
4315
f39e8743
MK
43162016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
4317
4318 PR 18377
4319 * linux-s390-low.c (add_insns): New function.
4320 (s390_emit_prologue): New function.
4321 (s390_emit_epilogue): New function.
4322 (s390_emit_add): New function.
4323 (s390_emit_sub): New function.
4324 (s390_emit_mul): New function.
4325 (s390_emit_lsh): New function.
4326 (s390_emit_rsh_signed): New function.
4327 (s390_emit_rsh_unsigned): New function.
4328 (s390_emit_ext): New function.
4329 (s390_emit_log_not): New function.
4330 (s390_emit_bit_and): New function.
4331 (s390_emit_bit_or): New function.
4332 (s390_emit_bit_xor): New function.
4333 (s390_emit_bit_not): New function.
4334 (s390_emit_equal): New function.
4335 (s390_emit_less_signed): New function.
4336 (s390_emit_less_unsigned): New function.
4337 (s390_emit_ref): New function.
4338 (s390_emit_if_goto): New function.
4339 (s390_emit_goto): New function.
4340 (s390_write_goto_address): New function.
4341 (s390_emit_litpool): New function.
4342 (s390_emit_const): New function.
4343 (s390_emit_call): New function.
4344 (s390_emit_reg): New function.
4345 (s390_emit_pop): New function.
4346 (s390_emit_stack_flush): New function.
4347 (s390_emit_zero_ext): New function.
4348 (s390_emit_swap): New function.
4349 (s390_emit_stack_adjust): New function.
4350 (s390_emit_set_r2): New function.
4351 (s390_emit_int_call_1): New function.
4352 (s390_emit_void_call_2): New function.
4353 (s390_emit_eq_goto): New function.
4354 (s390_emit_ne_goto): New function.
4355 (s390_emit_lt_goto): New function.
4356 (s390_emit_le_goto): New function.
4357 (s390_emit_gt_goto): New function.
4358 (s390_emit_ge_goto): New function.
4359 (s390x_emit_prologue): New function.
4360 (s390x_emit_epilogue): New function.
4361 (s390x_emit_add): New function.
4362 (s390x_emit_sub): New function.
4363 (s390x_emit_mul): New function.
4364 (s390x_emit_lsh): New function.
4365 (s390x_emit_rsh_signed): New function.
4366 (s390x_emit_rsh_unsigned): New function.
4367 (s390x_emit_ext): New function.
4368 (s390x_emit_log_not): New function.
4369 (s390x_emit_bit_and): New function.
4370 (s390x_emit_bit_or): New function.
4371 (s390x_emit_bit_xor): New function.
4372 (s390x_emit_bit_not): New function.
4373 (s390x_emit_equal): New function.
4374 (s390x_emit_less_signed): New function.
4375 (s390x_emit_less_unsigned): New function.
4376 (s390x_emit_ref): New function.
4377 (s390x_emit_if_goto): New function.
4378 (s390x_emit_const): New function.
4379 (s390x_emit_call): New function.
4380 (s390x_emit_reg): New function.
4381 (s390x_emit_pop): New function.
4382 (s390x_emit_stack_flush): New function.
4383 (s390x_emit_zero_ext): New function.
4384 (s390x_emit_swap): New function.
4385 (s390x_emit_stack_adjust): New function.
4386 (s390x_emit_int_call_1): New function.
4387 (s390x_emit_void_call_2): New function.
4388 (s390x_emit_eq_goto): New function.
4389 (s390x_emit_ne_goto): New function.
4390 (s390x_emit_lt_goto): New function.
4391 (s390x_emit_le_goto): New function.
4392 (s390x_emit_gt_goto): New function.
4393 (s390x_emit_ge_goto): New function.
4394 (s390_emit_ops): New function.
4395 (struct linux_target_ops): Fill in emit_ops hook.
4396
abd9baf9
MK
43972016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
4398
4399 PR 18377
4400 * Makefile.in: Add s390 IPA files.
4401 * configure.srv: Build IPA for s390.
4402 * linux-s390-ipa.c: New file.
4403 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
4404 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
4405 (tdesc_s390_linux32): Likewise.
4406 (init_registers_s390_linux32v1): Likewise.
4407 (tdesc_s390_linux32v1): Likewise.
4408 (init_registers_s390_linux32v2): Likewise.
4409 (tdesc_s390_linux32v2): Likewise.
4410 (init_registers_s390_linux64): Likewise.
4411 (tdesc_s390_linux64): Likewise.
4412 (init_registers_s390_linux64v1): Likewise.
4413 (tdesc_s390_linux64v1): Likewise.
4414 (init_registers_s390_linux64v2): Likewise.
4415 (tdesc_s390_linux64v2): Likewise.
4416 (init_registers_s390_te_linux64): Likewise.
4417 (tdesc_s390_te_linux64): Likewise.
4418 (init_registers_s390_vx_linux64): Likewise.
4419 (tdesc_s390_vx_linux64): Likewise.
4420 (init_registers_s390_tevx_linux64): Likewise.
4421 (tdesc_s390_tevx_linux64): Likewise.
4422 (init_registers_s390x_linux64): Likewise.
4423 (tdesc_s390x_linux64): Likewise.
4424 (init_registers_s390x_linux64v1): Likewise.
4425 (tdesc_s390x_linux64v1): Likewise.
4426 (init_registers_s390x_linux64v2): Likewise.
4427 (tdesc_s390x_linux64v2): Likewise.
4428 (init_registers_s390x_te_linux64): Likewise.
4429 (tdesc_s390x_te_linux64): Likewise.
4430 (init_registers_s390x_vx_linux64): Likewise.
4431 (tdesc_s390x_vx_linux64): Likewise.
4432 (init_registers_s390x_tevx_linux64): Likewise.
4433 (tdesc_s390x_tevx_linux64): Likewise.
4434 (have_hwcap_s390_vx): New static variable.
4435 (s390_arch_setup): Fill have_hwcap_s390_vx.
4436 (s390_get_thread_area): New function.
4437 (s390_ft_entry_gpr_esa): New const.
4438 (s390_ft_entry_gpr_zarch): New const.
4439 (s390_ft_entry_misc): New const.
4440 (s390_ft_entry_fr): New const.
4441 (s390_ft_entry_vr): New const.
4442 (s390_ft_main_31): New const.
4443 (s390_ft_main_64): New const.
4444 (s390_ft_exit_fr): New const.
4445 (s390_ft_exit_vr): New const.
4446 (s390_ft_exit_misc): New const.
4447 (s390_ft_exit_gpr_esa): New const.
4448 (s390_ft_exit_gpr_zarch): New const.
4449 (append_insns): New function.
4450 (s390_relocate_instruction): New function.
4451 (s390_install_fast_tracepoint_jump_pad): New function.
4452 (s390_get_min_fast_tracepoint_insn_len): New function.
4453 (s390_get_ipa_tdesc_idx): New function.
4454 (struct linux_target_ops): Wire in the above functions.
4455 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
4456 * linux-s390-tdesc.h: New file.
4457
a4105d04
MK
44582016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
4459
4460 * linux-s390-low.c (s390_supports_tracepoints): New function.
4461 (struct linux_target_ops): Fill supports_tracepoints hook.
4462
35ac8b3e
YQ
44632016-03-18 Yao Qi <yao.qi@linaro.org>
4464
4465 * linux-low.c (lwp_signal_can_be_delivered): New function.
4466 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
4467
94610ec4
YQ
44682016-03-18 Yao Qi <yao.qi@linaro.org>
4469
4470 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
4471 0 if signal is enqueued. Remove 'signal' from one debugging
4472 message. Move one debugging message to some lines below.
4473 Remove code setting 'signal' to 0.
4474
80aea927
YQ
44752016-03-18 Yao Qi <yao.qi@linaro.org>
4476
4477 * linux-low.c (linux_low_filter_event): Remove redundant
4478 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
4479
b04fd3be
MK
44802016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
4481
4482 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
4483 (struct linux_target_ops): Wire in the above.
4484
c40c8d4b
YQ
44852016-03-03 Yao Qi <yao.qi@linaro.org>
4486
4487 * linux-low.c: Update comments to start_step_over.
4488
0f8288ae
YQ
44892016-03-03 Yao Qi <yao.qi@linaro.org>
4490
4491 PR server/19736
4492 * linux-low.c (handle_extended_wait): Set child suspended
4493 if event_lwp->bp_reinsert isn't zero.
4494
fdbd04a8
YQ
44952016-03-02 Yao Qi <yao.qi@linaro.org>
4496
4497 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
4498 enqueue_pending_signal.
4499
6896a8fa
MK
45002016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
4501
4502 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
4503 is actually loaded.
4504
ab503087
MK
45052016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
4506
4507 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
4508 (s390_regmap_3264) [!__s390x__]: New global.
4509 (s390_collect_ptrace_register): Skip map entries containing -1.
4510 (s390_supply_ptrace_register): Ditto.
4511 (s390_fill_gprs_high): New function.
4512 (s390_store_gprs_high): New function.
4513 (s390_regsets): Add NT_S390_HIGH_GPRS.
4514 (s390_get_hwcap): Enable on 31-bit.
4515 (have_hwcap_s390_high_gprs): Enable on 31-bit.
4516 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
4517 Detect NT_S390_HIGH_GPRS.
4518 (s390_usrregs_info_3264): Enable on 31-bit.
4519 (s390_regs_info): Enable regs_info_3264 on 31-bit.
4520 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
4521
ae91f625
MK
45222016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
4523
4524 PR gdb/13808
4525 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
4526 * configure.srv: Ditto.
4527 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
4528 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
4529 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
4530 (init_registers_amd64_linux): Remove prototype.
4531 (tdesc_amd64_linux): Remove declaration.
4532 (get_ipa_tdesc): New function.
4533 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
4534 initialize remaining tdescs.
4535 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
4536 (init_registers_i386_linux): Remove prototype.
4537 (tdesc_i386_linux): Remove declaration.
4538 (get_ipa_tdesc): New function.
4539 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
4540 initialize remaining tdescs.
4541 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
4542 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
4543 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
4544 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
4545 (x86_get_ipa_tdesc_idx): New function.
4546 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
4547 * linux-x86-tdesc.h: New file.
4548 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
4549 (target_get_ipa_tdesc_idx): New macro.
4550 * tracepoint.c (ipa_tdesc_idx): New macro.
4551 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
4552 (symbol_list): Add ipa_tdesc_idx.
4553 (cmd_qtstart): Write ipa_tdesc_idx in the target.
4554 (ipa_tdesc): Remove.
4555 (ipa_tdesc_idx): New variable.
4556 (get_context_regcache): Use get_ipa_tdesc.
4557 (gdb_collect): Ditto.
4558 (gdb_probe): Ditto.
4559 * tracepoint.h (get_ipa_tdesc): New prototype.
4560 (ipa_tdesc): Remove.
4561
e7ad2f14
PA
45622016-02-24 Pedro Alves <palves@redhat.com>
4563
4564 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
4565 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
4566 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
4567 Factor out common code between the USE_SIGTRAP_SIGINFO and
4568 !USE_SIGTRAP_SIGINFO blocks.
4569 (linux_low_filter_event): Call save_stop_reason instead of
4570 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
4571 Update comments.
4572 (linux_wait_1): Update comments.
4573
657f9cde
WW
45742016-02-24 Wei-cheng Wang <cole945@gmail.com>
4575
4576 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
4577 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
4578 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
4579 ppc_insert_point, ppc_remove_point.
4580
b00b61e1
MK
45812016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
4582
4583 * linux-s390-low.c (s390_supports_z_point_type): New function.
4584 (struct linux_target_ops): Wire s390_supports_z_point_type in.
4585
553cb527
YQ
45862016-02-16 Yao Qi <yao.qi@linaro.org>
4587
4588 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
4589 PC. Get pc from regcache_read_pc.
4590
a5652c21
YQ
45912016-02-12 Yao Qi <yao.qi@linaro.org>
4592
4593 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
4594 or linux_get_pc_32bit.
4595 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
4596
ed443b61
YQ
45972016-02-12 Yao Qi <yao.qi@linaro.org>
4598
4599 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
4600 arm_linux_get_next_pcs_fixup.
4601
020ecd38
MK
46022016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
4603
4604 * tracepoint.c (x_tracepoint_action_download): Change
4605 write_inferior_data_ptr to write_inferior_data_pointer.
4606 (cmd_qtstart): Likewise.
4607 (write_inferior_data_ptr): Remove.
4608 (download_agent_expr): Change write_inferior_data_ptr to
4609 write_inferior_data_pointer.
4610 (download_tracepoint_1): Likewise.
4611 (download_tracepoint): Likewise.
4612 (download_trace_state_variables): Likewise.
4613
7cae9051
WW
46142016-02-11 Wei-cheng Wang <cole945@gmail.com>
4615 Marcin Kościelnicki <koriakin@0x04.net>
4616
4617 * tracepoint.c (struct tracepoint_action_ops): Remove.
4618 (struct tracepoint_action): Remove ops.
4619 (m_tracepoint_action_download, r_tracepoint_action_download)
4620 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
4621 size and offset accordingly.
4622 (m_tracepoint_action_ops, r_tracepoint_action_ops)
4623 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
4624 (tracepoint_action_send, tracepoint_action_download): New functions.
4625 Helpers for trace action handlers.
4626 (add_tracepoint_action): Remove setup actions ops.
4627 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
4628
9f6a71b4
YQ
46292016-02-10 Yao Qi <yao.qi@linaro.org>
4630
4631 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
4632
1e94266c
SM
46332016-02-09 Simon Marchi <simon.marchi@ericsson.com>
4634
4635 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
4636 to AC_OUTPUT.
4637 * configure: Regenerate.
4638
8adce034
SM
46392016-02-09 Simon Marchi <simon.marchi@ericsson.com>
4640
4641 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
4642 void * to gdb_byte *.
4643 * linux-low.c (siginfo_fixup): Likewise.
4644 (linux_xfer_siginfo): Likewise.
4645 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
4646 Likewise.
4647 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
4648
93813b37
WT
46492016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
4650
4651 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
4652 to srv_tgtobj.
4653 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
4654 to srv_tgtobj.
4655 * linux-x86-low.c [__x86_64__]: Include
4656 "nat/amd64-linux-siginfo.h".
4657 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
4658 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
4659 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
4660 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
4661 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
4662 (cpt_si_fd, si_timerid, si_overrun): Move from
4663 nat/amd64-linux-siginfo.c.
4664 * Makefile.in (amd64-linux-siginfo.o:): New rule.
4665
8424cc97
SM
46662016-01-28 Simon Marchi <simon.marchi@ericsson.com>
4667
4668 * server.c (skip_to_semicolon): Remove.
4669 (process_point_options): Use strchrnul instead of
4670 skip_to_semicolon.
4671
4d18591b
YQ
46722016-01-26 Yao Qi <yao.qi@linaro.org>
4673
4674 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
4675 * linux-low.c (install_software_single_step_breakpoints): Don't
4676 call regcache_read_pc.
4677 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
4678 argument pc.
4679
d8020970
YQ
46802016-01-26 Yao Qi <yao.qi@linaro.org>
4681
4682 * linux-low.c (install_software_single_step_breakpoints): Call
4683 regcache_read_pc instead of get_pc.
4684
8b207339
YQ
46852016-01-26 Yao Qi <yao.qi@linaro.org>
4686
4687 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
4688 (unblock_async_io): Rename to ...
4689 (block_unblock_async_io): ... it. New function.
4690 (enable_async_io): Don't install SIGIO handler. Unblock it
4691 instead.
4692 (disable_async_io): Don't ignore SIGIO. Block it instead.
4693 (initialize_async_io): Install SIGIO handler. Don't call
4694 unblock_async_io.
4695
18879fef
YQ
46962016-01-26 Yao Qi <yao.qi@linaro.org>
4697
4698 * remote-utils.c (getpkt): If the buffer isn't empty, and the
4699 first character is '\003', call *the_target->request_interrupt.
4700
a0f8e08a
YQ
47012016-01-25 Yao Qi <yao.qi@linaro.org>
4702
4703 * remote-utils.c (new_thread_notify): Remove.
4704 (dead_thread_notify): Likewise.
4705 * remote-utils.h (new_thread_notify): Remove declaration.
4706 (dead_thread_notify): Likewise.
4707
cc5fd9ab
MK
47082016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
4709
4710 * gdb.trace/pending.exp: Fix expected message on continue.
4711
99e8eb11
MK
47122016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
4713
4714 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
4715 it works properly on big-endian machines where sizeof (CORE_ADDR)
4716 != sizeof (void *).
4717
a994041d
PA
47182016-01-21 Pedro Alves <palves@redhat.com>
4719
4720 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
4721 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
4722 * configure: Regenerate.
4723
f7a6a40d
YQ
47242016-01-21 Yao Qi <yao.qi@linaro.org>
4725
4726 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
4727 is_thumb and set it according to CPSR saved on the stack.
4728 (get_next_pcs_syscall_next_pc): Pass is_thumb to
4729 arm_sigreturn_next_pc.
4730
6f69e520
YQ
47312016-01-18 Yao Qi <yao.qi@linaro.org>
4732
4733 * linux-low.c (linux_set_pc_64bit): New function.
4734 (linux_get_pc_64bit): New function.
4735 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
4736 Declare.
4737 * linux-sparc-low.c (debug_threads): Remove declaration.
4738 (sparc_get_pc): Remove.
4739 (the_low_target): Use linux_get_pc_64bit instead of
4740 sparc_get_pc.
4741 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
4742 (the_low_target): Use linux_get_pc_64bit and
4743 linux_set_pc_64bit.
4744
276d4552
YQ
47452016-01-18 Yao Qi <yao.qi@linaro.org>
4746
4747 * linux-arm-low.c (debug_threads): Remove declaration.
4748 (arm_get_pc, arm_set_pc): Remove.
4749 (the_low_target): Use linux_get_pc_32bit and
4750 linux_set_pc_32bit.
4751 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
4752 (the_low_target): Use linux_get_pc_32bit and
4753 linux_set_pc_32bit.
4754 * linux-cris-low.c (debug_threads): Remove declaration.
4755 (cris_get_pc, cris_set_pc,): Remove.
4756 (the_low_target): Use linux_get_pc_32bit and
4757 linux_set_pc_32bit.
4758 * linux-crisv32-low.c (debug_threads): Remove declaration.
4759 (cris_get_pc, cris_set_pc): Remove.
4760 (the_low_target): Use linux_get_pc_32bit and
4761 linux_set_pc_32bit.
4762 * linux-low.c: Include inttypes.h.
4763 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
4764 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
4765 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
4766 (the_low_target): Use linux_get_pc_32bit and
4767 linux_set_pc_32bit.
4768 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
4769 (the_low_target): Use linux_get_pc_32bit and
4770 linux_set_pc_32bit.
4771 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
4772 (the_low_target): Use linux_get_pc_32bit and
4773 linux_set_pc_32bit.
4774 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
4775 (the_low_target): Use linux_get_pc_32bit and
4776 linux_set_pc_32bit.
4777 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
4778 (the_low_target): Use linux_get_pc_32bit and
4779 linux_set_pc_32bit.
4780
eb0edac8
GB
47812016-01-18 Gary Benson <gbenson@redhat.com>
4782
4783 * configure.ac (AC_FUNC_FORK): New check.
4784 * config.in: Regenerate.
4785 * configure: Likewise.
4786
1b451dda
YQ
47872016-01-14 Yao Qi <yao.qi@linaro.org>
4788
4789 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
4790 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
4791 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
4792 arm_get_next_pcs_ctor.
4793
82075af2
JS
47942016-01-12 Josh Stone <jistone@redhat.com>
4795 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4796
4797 * inferiors.h: Include "gdb_vecs.h".
4798 (struct process_info): Add syscalls_to_catch.
4799 * inferiors.c (remove_process): Free syscalls_to_catch.
4800 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
4801 syscall_return stops.
4802 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
4803 * server.c (handle_general_set): Handle QCatchSyscalls.
4804 (handle_query): Report support for QCatchSyscalls.
4805 * target.h (struct target_ops): Add supports_catch_syscall.
4806 (target_supports_catch_syscall): New macro.
4807 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
4808 (struct lwp_info): Add syscall_state.
4809 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
4810 Maintain syscall_state and syscalls_to_catch across exec.
4811 (get_syscall_trapinfo): New function, proxy to the_low_target.
4812 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
4813 (linux_low_filter_event): Toggle syscall_state entry/return for
4814 syscall traps, and set it ignored for all others.
4815 (gdb_catching_syscalls_p): New function.
4816 (gdb_catch_this_syscall_p): New function.
4817 (linux_wait_1): Handle SYSCALL_SIGTRAP.
4818 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
4819 (linux_supports_catch_syscall): New function.
4820 (linux_target_ops): Install it.
4821 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
4822 (the_low_target): Install it.
4823
8f13a3ce
MF
48242016-01-12 Mike Frysinger <vapier@gentoo.org>
4825
4826 * acinclude.m4: Include new ../warning.m4 file.
4827 * configure: Regenerated.
4828 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
4829
5b3da067
MF
48302016-01-12 Mike Frysinger <vapier@gentoo.org>
4831
4832 * ax.c (is_goto_target): Mark static.
4833 * linux-low.c (register_addr): Likewise.
4834 (linux_fetch_registers, linux_store_registers): Likewise.
4835 * mem-break.c (any_persistent_commands): Fix old prototype.
4836 (add_commands_to_breakpoint): Mark static.
4837 * regcache.c (find_register_by_name): Delete unused func.
4838 * remote-utils.c (hex_or_minus_one): Mark static.
4839 * server.c (monitor_show_help): Mark static.
4840 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
4841 handle_v_requests): Likewise.
4842
bc504a31
PA
48432016-01-12 Pedro Alves <palves@redhat.com>
4844
4845 Remove use of the registered trademark symbol throughout.
4846
5a0dd67a
YQ
48472016-01-08 Yao Qi <yao.qi@linaro.org>
4848
4849 * remote-utils.c (getpkt): If c is '\003', call target hook
4850 request_interrupt.
4851
b2ca446f
YQ
48522016-01-06 Yao Qi <yao.qi@linaro.org>
4853
4854 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
4855 linux-aarch32-low.c.
4856 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4857 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
4858 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
4859 (thumb2_breakpoint): Declare.
4860 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
4861 linux-aarch32-low.h.
4862 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4863 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
4864 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
4865
edd88788
JB
48662016-01-01 Joel Brobecker <brobecker@adacore.com>
4867
4868 * gdbreplay.c (gdbreplay_version): Change copyright year in
4869 version message.
4870 * server.c (gdbserver_version): Likewise.
4871
65da7f14
PP
48722015-12-28 Patrick Palka <patrick@parcs.ath.cx>
4873
4874 * server.c (crc32_table): Delete.
4875 (crc32): Use libiberty's xcrc32 function.
4876
4abd5ed2
JB
48772015-12-22 Joel Brobecker <brobecker@adacore.com>
4878
4879 * lynx-low.c (lynx_delete_thread_callback): New function.
4880 (lynx_mourn): Properly delete our process and all of its
4881 threads. Remove call to clear_inferiors.
4882
0e50fe5c
JB
48832015-12-22 Joel Brobecker <brobecker@adacore.com>
4884
4885 * target.c (thread_search_callback): Add check that
4886 the thread_stopped target callback is not NULL before
4887 calling it.
4888
35adc03f
YQ
48892015-12-21 Yao Qi <yao.qi@linaro.org>
4890
4891 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
4892 arm breakpoint.
4893
bd2b2909
AT
48942015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4895
4896 * server.c (handle_query): Call target_supports_software_single_step.
4897
7fe5e27e
AT
48982015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4899
4900 * linux-low.c (single_step): New function.
4901 (linux_resume_one_lwp_throw): Call single_step.
4902 (start_step_over): Likewise.
4903
d9311bfa
AT
49042015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4905
4906 * Makefile.in (SFILES): Append arch/arm-linux.c,
4907 arch/arm-get-next-pcs.c.
4908 (arm-linux.o): New rule.
4909 (arm-get-next-pcs.o): New rule.
4910 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
4911 arm-linux.o.
4912 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
4913 to linux-aarch32-low.c.
4914 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4915 (arm_breakpoint_len, thumb_breakpoint): Likewise.
4916 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
4917 (thumb2_breakpoint_len): Likewise.
4918 (arm_is_thumb_mode): Make non-static.
4919 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
4920 from linux-aarch32-low.c.
4921 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4922 (arm_breakpoint_len, thumb_breakpoint): Likewise.
4923 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
4924 (thumb2_breakpoint_len): Likewise.
4925 (arm_is_thumb_mode): New declaration.
4926 * linux-arm-low.c: Include arch/arm-linux.h
4927 aarch/arm-get-next-pcs.h, sys/syscall.h.
4928 (get_next_pcs_ops): New struct.
4929 (get_next_pcs_addr_bits_remove): New function.
4930 (get_next_pcs_is_thumb): New function.
4931 (get_next_pcs_read_memory_unsigned_integer): Likewise.
4932 (arm_sigreturn_next_pc): Likewise.
4933 (get_next_pcs_syscall_next_pc): Likewise.
4934 (arm_gdbserver_get_next_pcs): Likewise.
4935 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
4936 Initialize.
4937 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
4938 * server.h: Include gdb_vecs.h.
4939
68ce2059
AT
49402015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4941
4942 * Makefile.in (SFILES): Append common/common-regcache.c.
4943 (OBS): Append common-regcache.o.
4944 (common-regcache.o): New rule.
4945 * regcache.c (init_register_cache): Initialize cache to
4946 REG_UNAVAILABLE.
4947 (regcache_raw_read_unsigned): New function.
4948 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
4949 register_status enum.
4950
fa5308bd
AT
49512015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4952
4953 * linux-aarch64-low.c (the_low_targets): Rename
4954 breakpoint_reinsert_addr to get_next_pcs.
4955 * linux-arm-low.c (the_low_targets): Likewise.
4956 * linux-bfin-low.c (the_low_targets): Likewise.
4957 * linux-cris-low.c (the_low_targets): Likewise.
4958 * linux-crisv32-low.c (the_low_targets): Likewise.
4959 * linux-low.c (can_software_single_step): Likewise.
4960 (install_software_single_step_breakpoints): New function.
4961 (start_step_over): Use install_software_single_step_breakpoints.
4962 * linux-low.h: New CORE_ADDR vector.
4963 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
4964 get_next_pcs.
4965 * linux-mips-low.c (the_low_targets): Likewise.
4966 * linux-nios2-low.c (the_low_targets): Likewise.
4967 * linux-sparc-low.c (the_low_targets): Likewise.
4968
4a6ed09b
PA
49692015-12-17 Pedro Alves <palves@redhat.com>
4970
4971 * linux-low.c (linux_kill_one_lwp): Remove references to
4972 LinuxThreads.
4973 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
4974 to 'kill'.
4975 (linux_init_signals): Delete.
4976 (initialize_low): Adjust.
4977 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
4978
7544db95
PA
49792015-12-16 Pedro Alves <palves@redhat.com>
4980
4981 * configure.ac (compiler warning flags): When testing a
4982 -Wno-foo option, check whether -Wfoo works instead.
4983 * configure: Regenerate.
4984
8020350c
DB
49852015-12-11 Don Breazeal <donb@codesourcery.com>
4986
4987 * server.c (process_serial_event): Don't exit from gdbserver
4988 in remote mode if there are still active inferiors.
4989
db91f502
YQ
49902015-12-11 Yao Qi <yao.qi@linaro.org>
4991
4992 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
4993 arm_breakpoint_at if the process is 32-bit.
4994
b37a6290
YQ
49952015-12-11 Yao Qi <yao.qi@linaro.org>
4996
4997 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
4998 arm breakpoint.
4999
17b1509a
YQ
50002015-12-07 Yao Qi <yao.qi@linaro.org>
5001
5002 * configure.srv: Append arm.o to srv_tgtobj for
5003 aarch64*-*-linux* target.
5004 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
5005 from linux-arm-low.c.
5006 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
5007 (arm_breakpoint_len, thumb_breakpoint): Likewise.
5008 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
5009 (thumb2_breakpoint_len): Likewise.
5010 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
5011 (arm_breakpoint_kinds): Likewise.
5012 (arm_breakpoint_kind_from_pc): Likewise.
5013 (arm_sw_breakpoint_from_kind): Likewise.
5014 (arm_breakpoint_kind_from_current_state): Likewise.
5015 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
5016 (arm_sw_breakpoint_from_kind): Declare.
5017 (arm_breakpoint_kind_from_current_state): Declare.
5018 (arm_breakpoint_at): Declare.
5019 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
5020 arm_sw_breakpoint_from_kind if process is 32-bit.
5021 (aarch64_breakpoint_kind_from_pc): New function.
5022 (aarch64_breakpoint_kind_from_current_state): New function.
5023 (the_low_target): Initialize fields breakpoint_kind_from_pc
5024 and breakpoint_kind_from_current_state.
5025 * linux-arm-low.c (arm_breakpoint_kinds): Move to
5026 linux-aarch32-low.c.
5027 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
5028 (arm_breakpoint, arm_breakpoint_len): Likewise.
5029 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
5030 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
5031 (arm_is_thumb_mode): Likewise.
5032 (arm_breakpoint_at): Likewise.
5033 (arm_breakpoint_kind_from_pc): Likewise.
5034 (arm_sw_breakpoint_from_kind): Likewise.
5035 (arm_breakpoint_kind_from_current_state): Likewise.
5036
5037 Revert:
5038 2015-08-04 Yao Qi <yao.qi@linaro.org>
5039
5040 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
5041 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
5042 * server.c (extended_protocol): Remove "static".
5043 * server.h (extended_protocol): Declare it.
5044
ece66d65
JS
50452015-12-04 Josh Stone <jistone@redhat.com>
5046
5047 * target.h (struct target_ops) <arch_setup>: Rename to ...
5048 (struct target_ops) <post_create_inferior>: ... this.
5049 (target_arch_setup): Rename to ...
5050 (target_post_create_inferior): ... this, calling post_create_inferior.
5051 * server.c (start_inferior): Update target_arch_setup calls to
5052 target_post_create_inferior.
5053 * linux-low.c (linux_low_ptrace_options): Forward declare.
5054 (linux_arch_setup): Update its comment for general use.
5055 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
5056 (struct linux_target_ops): Use linux_post_create_inferior.
5057 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
5058 to post_create_inferior.
5059 * nto-low.c (struct nto_target_ops): Likewise.
5060 * spu-low.c (struct spu_target_ops): Likewise.
5061 * win32-low.c (struct win32_target_ops): Likewise.
5062
e58c48b4
AT
50632015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
5064
5065 * linux-arm-low.c: Remove duplicate arch/arm.h include.
5066
fbec8956
AT
50672015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
5068
5069 * linux-arm-low.c (arm_reinsert_addr): Remove function.
5070 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
5071 * linux-cris-low.c (cris_reinsert_addr> Remove function.
5072 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
5073 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
5074 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
5075 * linux-mips-low.c (mips_reinsert_addr): Remove function.
5076 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
5077 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
5078 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
5079 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
5080 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
5081
9b4c5f87
AT
50822015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
5083
5084 * linux-low.c (linux_look_up_symbols): Don't call
5085 linux_supports_traceclone.
5086 * linux-low.h (thread_db_init): Remove use_events argument.
5087 * thread-db.c (thread_db_use_event): Remove global variable.
5088 (struct thread_db) <td_thr_event_enable_p>: Remove field.
5089 (struct thread_db) <td_create_bp>: Remove field.
5090 (thread_db_create_event): Remove function.
5091 (thread_db_enable_reporting): Likewise.
5092 (find_one_thread): Don't check for thread_db_use_events.
5093 (attach_thread): Likewise.
5094 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
5095 (try_thread_db_load_1): Don't check for thread_db_use_events.
5096 (thread_db_init): Remove use_events argument and thread events
5097 handling.
5098 (remove_thread_event_breakpoints): Remove function.
5099 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
5100
7d00775e
AT
51012015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
5102
5103 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
5104 New function.
5105 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5106 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
5107 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5108 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
5109 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
5110 Initialize.
5111 * linux-crisv32-low.c (cris_supports_hardware_single_step):
5112 New function.
5113 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5114 * linux-low.c (can_hardware_single_step): Use
5115 supports_hardware_single_step.
5116 (can_software_single_step): New function.
5117 (start_step_over): Call can_software_single_step.
5118 (linux_supports_hardware_single_step): New function.
5119 (struct target_ops) <supports_software_single_step>: Initialize.
5120 * linux-low.h (struct linux_target_ops)
5121 <supports_hardware_single_step>: Initialize.
5122 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
5123 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5124 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
5125 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
5126 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
5127 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5128 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
5129 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5130 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
5131 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
5132 Initialize.
5133 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
5134 (struct linux_target_ops) <tile_supports_hardware_single_step>:
5135 Initialize.
5136 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
5137 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5138 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
5139 New function.
5140 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5141 * target.h (struct target_ops): <supports_software_single_step>:
5142 New field.
5143 (target_supports_software_single_step): New macro.
5144
2d97cd35
AT
51452015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
5146
5147 * linux-low.c (linux_wait_1): Fix pc advance condition.
5148 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
5149 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
5150
769ef81f
AT
51512015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
5152
5153 * linux-arm-low.c (arm_is_thumb_mode): New function.
5154 (arm_breakpoint_at): Use arm_is_thumb_mode.
5155 (arm_breakpoint_kind_from_current_state): New function.
5156 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
5157 Initialize.
5158 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
5159 (linux_breakpoint_kind_from_current_state): New function.
5160 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
5161 * linux-low.h (struct linux_target_ops)
5162 <breakpoint_kind_from_current_state>: New field.
5163 * target.h (struct target_ops): Likewise.
5164 (target_breakpoint_kind_from_current_state): New macro.
5165
1bebeeca
PA
51662015-11-30 Pedro Alves <palves@redhat.com>
5167
5168 * linux-low.c (linux_resume): Wake up the event loop before
5169 returning.
5170
a67a9fae
PA
51712015-11-30 Pedro Alves <palves@redhat.com>
5172
5173 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
5174 check.
5175 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
5176 to -1.
5177 * target.c (struct thread_search): New structure.
5178 (thread_search_callback): New function.
5179 (prev_general_thread): New global.
5180 (prepare_to_access_memory, done_accessing_memory): New functions.
5181 * target.h (prepare_to_access_memory, done_accessing_memory):
5182 Replace macros with function declarations.
5183
f2faf941
PA
51842015-11-30 Pedro Alves <palves@redhat.com>
5185
5186 PR 14618
5187 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
5188 report TARGET_WAITKIND_NO_RESUMED.
5189 * remote-utils.c (prepare_resume_reply): Handle
5190 TARGET_WAITKIND_NO_RESUMED.
5191 * server.c (report_no_resumed): New global.
5192 (handle_query) <qSupported>: Handle "no-resumed+". Report
5193 "no-resumed+" support.
5194 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
5195 return error if the client doesn't support no-resumed events.
5196 (push_stop_notification): New function.
5197 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
5198 events if the client supports them.
5199
a681f9c9
PA
52002015-11-30 Pedro Alves <palves@redhat.com>
5201
5202 * linux-low.c (thread_still_has_status_pending_p): Don't check
5203 vCont;t here.
5204 (lwp_resumed): New function.
5205 (status_pending_p_callback): Return early if the LWP is not
5206 supposed to be resumed.
5207
65706a29
PA
52082015-11-30 Pedro Alves <palves@redhat.com>
5209
5210 * linux-low.c (handle_extended_wait): Assert that the LWP's
5211 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
5212 thread create events, leave the new child's status pending.
5213 (linux_low_filter_event): If GDB wants to hear about thread exit
5214 events, leave the LWP marked dead and don't delete it.
5215 (linux_wait_for_event_filtered): Don't check for thread exit.
5216 (filter_exit_event): New function.
5217 (linux_wait_1): Use it, when returning an exit event.
5218 (linux_resume_one_lwp_throw): Assert that the LWP's
5219 waitstatus is TARGET_WAITKIND_IGNORE.
5220 * remote-utils.c (prepare_resume_reply): Handle
5221 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
5222 * server.c (report_thread_events): New global.
5223 (handle_general_set): Handle QThreadEvents.
5224 (handle_query) <qSupported>: Handle and report QThreadEvents+;
5225 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
5226 TARGET_WAITKIND_THREAD_EXITED.
5227 * server.h (report_thread_events): Declare.
5228
56cf4bed
PA
52292015-11-30 Pedro Alves <palves@redhat.com>
5230
5231 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
5232 the thread's last_resume_kind was resume_stop.
5233
500c1d85
PA
52342015-11-30 Pedro Alves <palves@redhat.com>
5235
5236 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
5237 before returning.
5238
de979965
PA
52392015-11-30 Pedro Alves <palves@redhat.com>
5240
5241 * server.c (handle_v_requests): Handle vCtrlC.
5242
34c65914
PA
52432015-11-30 Pedro Alves <palves@redhat.com>
5244
5245 * gdbthread.h (find_any_thread_of_pid): Declare.
5246 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
5247 functions.
5248 * server.c (handle_query): If current_thread is NULL, look for
5249 another thread of the selected process.
5250
79efa585 52512015-11-26 Daniel Colascione <dancol@dancol.org>
01a49af8 5252 Simon Marchi <simon.marchi@ericsson.com>
79efa585
SM
5253
5254 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
5255 * server.c (handle_qxfer_threads_worker): Refactor to include thread
5256 name in reply.
5257 * target.h (struct target_ops) <thread_name>: New field.
5258 (target_thread_name): New macro.
5259
80d82c19
JB
52602015-11-23 Joel Brobecker <brobecker@adacore.com>
5261
5262 * regcache.h (regcache_invalidate_pid): Add declaration.
5263 * regcache.c (regcache_invalidate_pid): New function, extracted
5264 from regcache_invalidate.
5265 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
5266 Add trivial documentation comment.
5267 * lynx-low.c: Use regcache_invalidate_pid instead of
5268 regcache_invalidate.
5269
64da5dd5
JB
52702015-11-23 Joel Brobecker <brobecker@adacore.com>
5271
5272 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
5273 and Elf64_auxv_t if the target is Android.
5274
37ce4055
DE
52752015-11-22 Doug Evans <xdje42@gmail.com>
5276
5277 * target.h: #include <sys/types.h>.
5278
06e03fff
PA
52792015-11-19 Pedro Alves <palves@redhat.com>
5280
5281 * linux-low.c (linux_process_qsupported): Change prototype.
5282 Adjust.
5283 * linux-low.h (struct linux_target_ops) <process_qsupported>:
5284 Change prototype.
5285 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
5286 and adjust to loop over all features.
5287 * server.c (handle_query) <qSupported>: Adjust to call
5288 target_process_qsupported once, passing it a vector of unprocessed
5289 features.
5290 * target.h (struct target_ops) <process_qsupported>: Change
5291 prototype.
5292 (target_process_qsupported): Adjust.
5293
9a084706
PA
52942015-11-19 Pedro Alves <palves@redhat.com>
5295
5296 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
5297 mode.
5298 * configure: Regenerate.
5299
dad44a1f
PA
53002015-11-19 Pedro Alves <palves@redhat.com>
5301
5302 * configure: Regenerate.
5303
231c0592
YQ
53042015-11-19 Yao Qi <yao.qi@linaro.org>
5305
5306 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
5307 type to uint32_t.
5308
6c1c9a8b
YQ
53092015-11-19 Yao Qi <yao.qi@linaro.org>
5310
5311 * linux-aarch64-low.c (enum aarch64_operand_type): New.
5312 (struct aarch64_operand): Move enum out.
5313
9caa3311
YQ
53142015-11-19 Yao Qi <yao.qi@linaro.org>
5315
5316 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
5317 struct user_fpsimd_state *.
5318 (aarch64_store_fpregset): Likewise.
5319
6a69a054
YQ
53202015-11-19 Yao Qi <yao.qi@linaro.org>
5321
5322 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
5323 struct user_pt_regs *.
5324 (aarch64_store_gregset): Likewise.
5325
1798301e
PA
53262015-11-18 Pedro Alves <palves@redhat.com>
5327
5328 * Makefile.in (all_object_files): Add $IPA_OBJS.
5329
ce7715e2
PA
53302015-11-17 Pedro Alves <palves@redhat.com>
5331
5332 * win32-low.c (win32_resume): Use gdb_signal_from_host,
5333 GDB_SIGNAL_0 and gdb_signal_to_string.
5334
c0879059
PA
53352015-11-17 Pedro Alves <palves@redhat.com>
5336
5337 * win32-low.c (handle_output_debug_string): Remove parameter.
5338 (win32_kill): Remove our_status local and adjust call to
5339 handle_output_debug_string.
5340 (get_child_debug_event): Adjust call to
5341 handle_output_debug_string.
5342
1996e237
SM
53432015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5344
5345 * linux-mips-low.c (mips_fill_gregset): Add cast.
5346 (mips_store_gregset): Likewise.
5347 (mips_fill_fpregset): Likewise.
5348 (mips_store_fpregset): Likewise.
5349
cbec665b
SM
53502015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5351
5352 * linux-mips-low.c (mips_add_watchpoint): Rename private to
5353 priv.
5354
eb3e3c67
SM
53552015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5356
5357 * linux-mips-low.c (mips_linux_new_thread): Change type of
5358 watch_type to enum target_hw_bp_type.
5359
171de4b8
SM
53602015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5361
5362 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
5363 Change return type to arm_hwbp_type.
5364
04248ead
SM
53652015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5366
5367 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
5368 (arm_store_gregset): Likewise.
5369 * linux-arm-low.c (arm_get_hwcap): Likewise.
5370 (arm_read_description): Likewise.
5371
04b3479c
SM
53722015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5373
5374 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
5375
2bc84e8a
SM
53762015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5377
5378 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
5379 (ppc_fill_vsxregset): Likewise.
5380 (ppc_store_vsxregset): Likewise.
5381 (ppc_fill_vrregset): Likewise.
5382 (ppc_store_vrregset): Likewise.
5383 (ppc_fill_evrregset): Likewise.
5384 (ppc_store_evrregset): Likewise.
5385
e6c5bb05
SM
53862015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5387
5388 * linux-ppc-low.c (ppc_usrregs_info): Remove
5389 forward-declaration.
5390 (ppc_arch_setup): Move lower in file.
5391
7ea45d72
SM
53922015-10-30 Simon Marchi <simon.marchi@ericsson.com>
5393
5394 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
5395 (ps_pdwrite): Likewise.
5396
69291610
HW
53972015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
5398
5399 * linux-arm-low.c (arm_new_thread): Move pointer dereference
5400 to after assert checks.
5401
b42945fd
SM
54022015-10-29 Simon Marchi <simon.marchi@ericsson.com>
5403
5404 * proc-service.c (ps_pdread): Add/adjust casts.
5405 (ps_pdwrite): Add/adjust casts.
5406
d6f85c84
SM
54072015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
5408
5409 * server.c (handle_search_memory_1): Cast return value of
5410 memmem.
5411
f98cd059
SM
54122015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
5413
5414 * server.c (write_qxfer_response): Change type of data to
5415 gdb_byte *.
5416
d2412fa5
PA
54172015-10-29 Pedro Alves <palves@redhat.com>
5418
5419 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
5420
c17414a2
PA
54212015-10-29 Pedro Alves <palves@redhat.com>
5422
5423 * tracepoint.c (clear_installed_tracepoints): Add casts.
5424
e053fbc4
PA
54252015-10-29 Pedro Alves <palves@redhat.com>
5426
5427 * server.c (handle_v_cont, process_serial_event): Add enum
5428 gdb_signal casts to signal parsing code.
5429
add67df8
PA
54302015-10-29 Pedro Alves <palves@redhat.com>
5431
5432 * linux-low.h (NULL_REGSET): Define.
5433 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
5434 * linux-arm-low.c (arm_regsets): Likewise.
5435 * linux-crisv32-low.c (cris_regsets): Likewise.
5436 * linux-m68k-low.c (m68k_regsets): Likewise.
5437 * linux-mips-low.c (mips_regsets): Likewise.
5438 * linux-nios2-low.c (nios2_regsets): Likewise.
5439 * linux-ppc-low.c (ppc_regsets): Likewise.
5440 * linux-s390-low.c (s390_regsets): Likewise.
5441 * linux-sh-low.c (sh_regsets): Likewise.
5442 * linux-sparc-low.c (sparc_regsets): Likewise.
5443 * linux-tic6x-low.c (tic6x_regsets): Likewise.
5444 * linux-tile-low.c (tile_regsets): Likewise.
5445 * linux-x86-low.c (x86_regsets): Likewise.
5446 * linux-xtensa-low.c (xtensa_regsets): Likewise.
5447
50bc912a
PA
54482015-10-29 Pedro Alves <palves@redhat.com>
5449
5450 * linux-low.h (NULL_REGSET): Define.
5451 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
5452 * linux-arm-low.c (arm_regsets): Likewise.
5453 * linux-crisv32-low.c (cris_regsets): Likewise.
5454 * linux-m68k-low.c (m68k_regsets): Likewise.
5455 * linux-mips-low.c (mips_regsets): Likewise.
5456 * linux-nios2-low.c (nios2_regsets): Likewise.
5457 * linux-ppc-low.c (ppc_regsets): Likewise.
5458 * linux-s390-low.c (s390_regsets): Likewise.
5459 * linux-sh-low.c (sh_regsets): Likewise.
5460 * linux-sparc-low.c (sparc_regsets): Likewise.
5461 * linux-tic6x-low.c (tic6x_regsets): Likewise.
5462 * linux-tile-low.c (tile_regsets): Likewise.
5463 * linux-x86-low.c (x86_regsets): Likewise.
5464 * linux-xtensa-low.c (xtensa_regsets): Likewise.
5465
682b2546
DE
54662015-10-26 Doug Evans <dje@google.com>
5467
5468 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
5469
963843d4
DE
54702015-10-26 Doug Evans <dje@google.com>
5471
5472 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
5473
d41401ac
DE
54742015-10-26 Doug Evans <dje@google.com>
5475
5476 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
5477 for debug_printf.
5478 (attach_thread, find_new_threads_callback): Ditto.
5479
3db28855
AT
54802015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
5481
5482 * mem-break.h (set_breakpoint_data): Remove.
5483
fb78e89c
AT
54842015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
5485
5486 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
5487 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
5488 (initialize_low): Remove set_breakpoint_data call.
5489 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
5490 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
5491 (initialize_low): Remove set_breakpoint_data call.
5492 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
5493 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
5494 (initialize_low): Remove set_breakpoint_data call.
5495
2e6ee069
AT
54962015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
5497
5498 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
5499 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
5500 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
5501 * target.h (target_breakpoint_kind_from_pc): New macro.
5502
1652a986
AT
55032015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
5504
5505 * linux-low.c (default_breakpoint_kind_from_pc): New function.
5506 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
5507 the default breakpoint kind.
5508
abeead09
AT
55092015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5510
5511 * linux-arm-low.c (arm_supports_z_point_type): Add software
5512 breakpoint support.
5513
b0b4b501
AT
55142015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5515
5516 * linux-arm-low.c: Refactor breakpoint definitions.
5517 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
5518 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
5519
8689682c
AT
55202015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5521
5522 * Makefile.in: Add arm.c/o.
5523 * configure.srv: Likewise.
5524 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
5525 (arm_breakpoint_kind_from_pc): New function.
5526 (arm_sw_breakpoint_from_kind): Return proper kind.
5527 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
5528
27165294
AT
55292015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5530
5531 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
5532 removal.
5533 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
5534 (struct raw_breakpoint) <size>: Remove.
5535 (struct raw_breakpoint) <kind>: Add.
5536 (bp_size): New function.
5537 (bp_opcode): Likewise.
5538 (find_raw_breakpoint_at): Adjust for kind.
5539 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
5540 (remove_memory_breakpoint): Adjust for kind call bp_size.
5541 (set_raw_breakpoint_at): Adjust for kind.
5542 (set_breakpoint): Likewise.
5543 (set_breakpoint_at): Call breakpoint_kind_from_pc.
5544 (delete_raw_breakpoint): Adjust for kind.
5545 (delete_breakpoint): Likewise.
5546 (find_gdb_breakpoint): Likewise.
5547 (set_gdb_breakpoint_1): Likewise.
5548 (set_gdb_breakpoint): Likewise.
5549 (delete_gdb_breakpoint_1): Likewise.
5550 (delete_gdb_breakpoint): Likewise.
5551 (uninsert_raw_breakpoint): Likewise.
5552 (reinsert_raw_breakpoint): Likewise.
5553 (set_breakpoint_data): Remove.
5554 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
5555 (check_mem_read): Adjust for kind call bp_size.
5556 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
5557 (clone_one_breakpoint): Adjust for kind.
5558 * mem-break.h (set_gdb_breakpoint): Likewise.
5559 (delete_gdb_breakpoint): Likewise.
5560 * server.c (process_serial_event): Likewise.
5561
dd373349
AT
55622015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5563
5564 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
5565 (struct linux_target_ops) <breakpoint>: Remove.
5566 (struct linux_target_ops) <breakpoint_len>: Remove.
5567 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5568 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5569 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
5570 (arm_sw_breakpoint_from_kind): New function.
5571 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
5572 (struct linux_target_ops) <breakpoint>: Remove.
5573 (struct linux_target_ops) <breakpoint_len>: Remove.
5574 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5575 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5576 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
5577 (struct linux_target_ops) <breakpoint>: Remove.
5578 (struct linux_target_ops) <breakpoint_len>: Remove.
5579 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5580 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5581 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
5582 (struct linux_target_ops) <breakpoint>: Remove.
5583 (struct linux_target_ops) <breakpoint_len>: Remove.
5584 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5585 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5586 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
5587 and sw_breakpoint_from_kind to increment the pc.
5588 (linux_breakpoint_kind_from_pc): New function.
5589 (linux_sw_breakpoint_from_kind): New function.
5590 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
5591 (initialize_low): Call breakpoint_kind_from_pc and
5592 sw_breakpoint_from_kind to replace breakpoint_data/len.
5593 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
5594 New field.
5595 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
5596 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
5597 (struct linux_target_ops) <breakpoint>: Remove.
5598 (struct linux_target_ops) <breakpoint_len>: Remove.
5599 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5600 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5601 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
5602 (struct linux_target_ops) <breakpoint>: Remove.
5603 (struct linux_target_ops) <breakpoint_len>: Remove.
5604 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5605 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5606 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
5607 (struct linux_target_ops) <breakpoint>: Remove.
5608 (struct linux_target_ops) <breakpoint_len>: Remove.
5609 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5610 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5611 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
5612 (struct linux_target_ops) <breakpoint>: Remove.
5613 (struct linux_target_ops) <breakpoint_len>: Remove.
5614 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5615 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5616 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
5617 (struct linux_target_ops) <breakpoint>: Remove.
5618 (struct linux_target_ops) <breakpoint_len>: Remove.
5619 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5620 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5621 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
5622 (struct linux_target_ops) <breakpoint>: Remove.
5623 (struct linux_target_ops) <breakpoint_len>: Remove.
5624 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5625 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5626 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
5627 (struct linux_target_ops) <breakpoint>: Remove.
5628 (struct linux_target_ops) <breakpoint_len>: Remove.
5629 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5630 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5631 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
5632 (struct linux_target_ops) <breakpoint>: Remove.
5633 (struct linux_target_ops) <breakpoint_len>: Remove.
5634 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5635 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5636 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
5637 (struct linux_target_ops) <breakpoint>: Remove.
5638 (struct linux_target_ops) <breakpoint_len>: Remove.
5639 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5640 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5641 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
5642 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
5643 (struct linux_target_ops) <breakpoint>: Remove.
5644 (struct linux_target_ops) <breakpoint_len>: Remove.
5645 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5646 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5647 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
5648 (struct linux_target_ops) <breakpoint>: Remove.
5649 (struct linux_target_ops) <breakpoint_len>: Remove.
5650 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5651 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5652
4cd98a19
AT
56532015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5654
5655 * linux-cris-low.c (cris_get_pc): Remove void arg.
5656
774ee6d2
AR
56572015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
5658
5659 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
5660 variable name.
5661
833dcd29
AR
56622015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
5663
5664 * inferiors.c (thread_pid_matches_callback): New function.
5665 (find_thread_process): New function.
5666 (remove_thread): Reset current_thread.
5667 (remove_process): Assert threads have been removed first.
5668
8d689ee5
YQ
56692015-10-15 Yao Qi <yao.qi@linaro.org>
5670
5671 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
5672 if it is 3.
5673 (aarch64_remove_point): Likewise.
5674 * regcache.c (regcache_register_size): New function.
5675
1c2e1515
YQ
56762015-10-12 Yao Qi <yao.qi@linaro.org>
5677
5678 * linux-aarch64-low.c: Update all callers as emit_load_store
5679 is renamed to aarch64_emit_load_store.
5680
e1c587c3
YQ
56812015-10-12 Yao Qi <yao.qi@linaro.org>
5682
5683 * linux-aarch64-low.c: Update all callers of function renaming
5684 from emit_insn to aarch64_emit_insn.
5685
b6542f81
YQ
56862015-10-12 Yao Qi <yao.qi@linaro.org>
5687
5688 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
5689 arch/aarch64-insn.h.
5690 (struct aarch64_memory_operand): Likewise.
5691 (ENCODE): Likewise.
5692 (emit_insn): Move to arch/aarch64-insn.c.
5693 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
5694 (emit_load_store): Move to arch/aarch64-insn.c.
5695 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
5696 (can_encode_int32): Remove.
5697
246994ce
YQ
56982015-10-12 Yao Qi <yao.qi@linaro.org>
5699
5700 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
5701 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
5702 (aarch64_relocate_instruction): Likewise.
5703 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
5704 (struct aarch64_insn_visitor): Likewise.
5705
0badd99f
YQ
57062015-10-12 Yao Qi <yao.qi@linaro.org>
5707
5708 * linux-aarch64-low.c (struct aarch64_insn_data): New.
5709 (struct aarch64_insn_visitor): New.
5710 (struct aarch64_insn_relocation_data): New.
5711 (aarch64_ftrace_insn_reloc_b): New function.
5712 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
5713 (aarch64_ftrace_insn_reloc_cb): Likewise.
5714 (aarch64_ftrace_insn_reloc_tb): Likewise.
5715 (aarch64_ftrace_insn_reloc_adr): Likewise.
5716 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
5717 (aarch64_ftrace_insn_reloc_others): Likewise.
5718 (visitor): New.
5719 (aarch64_relocate_instruction): Use visitor.
5720
dfaffe9d
YQ
57212015-10-12 Yao Qi <yao.qi@linaro.org>
5722
5723 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
5724 int. Add argument buf.
5725 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
5726 aarch64_relocate_instruction.
5727
70b439f0
YQ
57282015-10-12 Yao Qi <yao.qi@linaro.org>
5729
5730 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
5731 argument insn. Remove local variable insn. Don't call
5732 target_read_uint32.
5733 (aarch64_install_fast_tracepoint_jump_pad): Call
5734 target_read_uint32.
5735
7781c06f
YQ
57362015-09-30 Yao Qi <yao.qi@linaro.org>
5737
5738 * linux-aarch64-low.c (emit_movk): Shorten a long line.
5739 (emit_load_store_pair): Likewise.
5740
9a3c8263
SM
57412015-09-25 Simon Marchi <simon.marchi@ericsson.com>
5742
5743 * dll.c (match_dll): Add cast(s).
5744 (unloaded_dll): Likewise.
5745 * linux-low.c (second_thread_of_pid_p): Likewise.
5746 (delete_lwp_callback): Likewise.
5747 (count_events_callback): Likewise.
5748 (select_event_lwp_callback): Likewise.
5749 (linux_set_resume_request): Likewise.
5750 * server.c (accumulate_file_name_length): Likewise.
5751 (emit_dll_description): Likewise.
5752 (handle_qxfer_threads_worker): Likewise.
5753 (visit_actioned_threads): Likewise.
5754 * thread-db.c (any_thread_of): Likewise.
5755 * tracepoint.c (same_process_p): Likewise.
5756 (match_blocktype): Likewise.
5757 (build_traceframe_info_xml): Likewise.
5758
224c3ddb
SM
57592015-09-25 Simon Marchi <simon.marchi@ericsson.com>
5760
5761 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
5762 assignment.
5763 (gdb_unparse_agent_expr): Likewise.
5764 * hostio.c (require_data): Likewise.
5765 (handle_pread): Likewise.
5766 * linux-low.c (disable_regset): Likewise.
5767 (fetch_register): Likewise.
5768 (store_register): Likewise.
5769 (get_dynamic): Likewise.
5770 (linux_qxfer_libraries_svr4): Likewise.
5771 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
5772 (set_fast_tracepoint_jump): Likewise.
5773 (uninsert_fast_tracepoint_jumps_at): Likewise.
5774 (reinsert_fast_tracepoint_jumps_at): Likewise.
5775 (validate_inserted_breakpoint): Likewise.
5776 (clone_agent_expr): Likewise.
5777 * regcache.c (init_register_cache): Likewise.
5778 * remote-utils.c (putpkt_binary_1): Likewise.
5779 (decode_M_packet): Likewise.
5780 (decode_X_packet): Likewise.
5781 (look_up_one_symbol): Likewise.
5782 (relocate_instruction): Likewise.
5783 (monitor_output): Likewise.
5784 * server.c (handle_search_memory): Likewise.
5785 (handle_qxfer_exec_file): Likewise.
5786 (handle_qxfer_libraries): Likewise.
5787 (handle_qxfer): Likewise.
5788 (handle_query): Likewise.
5789 (handle_v_cont): Likewise.
5790 (handle_v_run): Likewise.
5791 (captured_main): Likewise.
5792 * target.c (write_inferior_memory): Likewise.
5793 * thread-db.c (try_thread_db_load_from_dir): Likewise.
5794 * tracepoint.c (init_trace_buffer): Likewise.
5795 (add_tracepoint_action): Likewise.
5796 (add_traceframe): Likewise.
5797 (add_traceframe_block): Likewise.
5798 (cmd_qtdpsrc): Likewise.
5799 (cmd_qtdv): Likewise.
5800 (cmd_qtstatus): Likewise.
5801 (response_source): Likewise.
5802 (response_tsv): Likewise.
5803 (cmd_qtnotes): Likewise.
5804 (gdb_collect): Likewise.
5805 (initialize_tracepoint): Likewise.
5806
afbe19f8
PL
58072015-09-21 Pierre Langlois <pierre.langlois@arm.com>
5808
5809 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
5810 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
5811 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
5812 <NOP>: New.
5813 (enum aarch64_condition_codes): New enum.
5814 (w0): New static global.
5815 (fp): Likewise.
5816 (lr): Likewise.
5817 (struct aarch64_memory_operand) <type>: New
5818 MEMORY_OPERAND_POSTINDEX type.
5819 (postindex_memory_operand): New helper function.
5820 (emit_ret): New function.
5821 (emit_load_store_pair): New function, factored out of emit_stp
5822 with support for MEMORY_OPERAND_POSTINDEX.
5823 (emit_stp): Rewrite using emit_load_store_pair.
5824 (emit_ldp): New function.
5825 (emit_load_store): Likewise.
5826 (emit_ldr): Mention post-index instruction in comment.
5827 (emit_ldrh): New function.
5828 (emit_ldrb): New function.
5829 (emit_ldrsw): Mention post-index instruction in comment.
5830 (emit_str): Likewise.
5831 (emit_subs): New function.
5832 (emit_cmp): Likewise.
5833 (emit_and): Likewise.
5834 (emit_orr): Likewise.
5835 (emit_orn): Likewise.
5836 (emit_eor): Likewise.
5837 (emit_mvn): Likewise.
5838 (emit_lslv): Likewise.
5839 (emit_lsrv): Likewise.
5840 (emit_asrv): Likewise.
5841 (emit_mul): Likewise.
5842 (emit_sbfm): Likewise.
5843 (emit_sbfx): Likewise.
5844 (emit_ubfm): Likewise.
5845 (emit_ubfx): Likewise.
5846 (emit_csinc): Likewise.
5847 (emit_cset): Likewise.
5848 (emit_nop): Likewise.
5849 (emit_ops_insns): New helper function.
5850 (emit_pop): Likewise.
5851 (emit_push): Likewise.
5852 (aarch64_emit_prologue): New function.
5853 (aarch64_emit_epilogue): Likewise.
5854 (aarch64_emit_add): Likewise.
5855 (aarch64_emit_sub): Likewise.
5856 (aarch64_emit_mul): Likewise.
5857 (aarch64_emit_lsh): Likewise.
5858 (aarch64_emit_rsh_signed): Likewise.
5859 (aarch64_emit_rsh_unsigned): Likewise.
5860 (aarch64_emit_ext): Likewise.
5861 (aarch64_emit_log_not): Likewise.
5862 (aarch64_emit_bit_and): Likewise.
5863 (aarch64_emit_bit_or): Likewise.
5864 (aarch64_emit_bit_xor): Likewise.
5865 (aarch64_emit_bit_not): Likewise.
5866 (aarch64_emit_equal): Likewise.
5867 (aarch64_emit_less_signed): Likewise.
5868 (aarch64_emit_less_unsigned): Likewise.
5869 (aarch64_emit_ref): Likewise.
5870 (aarch64_emit_if_goto): Likewise.
5871 (aarch64_emit_goto): Likewise.
5872 (aarch64_write_goto_address): Likewise.
5873 (aarch64_emit_const): Likewise.
5874 (aarch64_emit_call): Likewise.
5875 (aarch64_emit_reg): Likewise.
5876 (aarch64_emit_pop): Likewise.
5877 (aarch64_emit_stack_flush): Likewise.
5878 (aarch64_emit_zero_ext): Likewise.
5879 (aarch64_emit_swap): Likewise.
5880 (aarch64_emit_stack_adjust): Likewise.
5881 (aarch64_emit_int_call_1): Likewise.
5882 (aarch64_emit_void_call_2): Likewise.
5883 (aarch64_emit_eq_goto): Likewise.
5884 (aarch64_emit_ne_goto): Likewise.
5885 (aarch64_emit_lt_goto): Likewise.
5886 (aarch64_emit_le_goto): Likewise.
5887 (aarch64_emit_gt_goto): Likewise.
5888 (aarch64_emit_ge_got): Likewise.
5889 (aarch64_emit_ops_impl): New static global variable.
5890 (aarch64_emit_ops): New target function, return
5891 &aarch64_emit_ops_impl.
5892 (struct linux_target_ops): Install it.
5893
bb903df0
PL
58942015-09-21 Pierre Langlois <pierre.langlois@arm.com>
5895
5896 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
5897 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
5898 aarch64-ipa.o.
5899 * linux-aarch64-ipa.c: New file.
5900 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
5901 and endian.h.
5902 (aarch64_get_thread_area): New target method.
5903 (extract_signed_bitfield): New helper function.
5904 (aarch64_decode_ldr_literal): New function.
5905 (enum aarch64_opcodes): New enum.
5906 (struct aarch64_register): New struct.
5907 (struct aarch64_operand): New struct.
5908 (x0): New static global.
5909 (x1): Likewise.
5910 (x2): Likewise.
5911 (x3): Likewise.
5912 (x4): Likewise.
5913 (w2): Likewise.
5914 (ip0): Likewise.
5915 (sp): Likewise.
5916 (xzr): Likewise.
5917 (aarch64_register): New helper function.
5918 (register_operand): Likewise.
5919 (immediate_operand): Likewise.
5920 (struct aarch64_memory_operand): New struct.
5921 (offset_memory_operand): New helper function.
5922 (preindex_memory_operand): Likewise.
5923 (enum aarch64_system_control_registers): New enum.
5924 (ENCODE): New macro.
5925 (emit_insn): New helper function.
5926 (emit_b): New function.
5927 (emit_bcond): Likewise.
5928 (emit_cb): Likewise.
5929 (emit_tb): Likewise.
5930 (emit_blr): Likewise.
5931 (emit_stp): Likewise.
5932 (emit_ldp_q_offset): Likewise.
5933 (emit_stp_q_offset): Likewise.
5934 (emit_load_store): Likewise.
5935 (emit_ldr): Likewise.
5936 (emit_ldrsw): Likewise.
5937 (emit_str): Likewise.
5938 (emit_ldaxr): Likewise.
5939 (emit_stxr): Likewise.
5940 (emit_stlr): Likewise.
5941 (emit_data_processing_reg): Likewise.
5942 (emit_data_processing): Likewise.
5943 (emit_add): Likewise.
5944 (emit_sub): Likewise.
5945 (emit_mov): Likewise.
5946 (emit_movk): Likewise.
5947 (emit_mov_addr): Likewise.
5948 (emit_mrs): Likewise.
5949 (emit_msr): Likewise.
5950 (emit_sevl): Likewise.
5951 (emit_wfe): Likewise.
5952 (append_insns): Likewise.
5953 (can_encode_int32_in): New helper function.
5954 (aarch64_relocate_instruction): New function.
5955 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
5956 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
5957 (struct linux_target_ops): Install aarch64_get_thread_area,
5958 aarch64_install_fast_tracepoint_jump_pad and
5959 aarch64_get_min_fast_tracepoint_insn_len.
5960
787749ea
PL
59612015-09-21 Pierre Langlois <pierre.langlois@arm.com>
5962
5963 * Makefile.in (aarch64-insn.o): New rule.
5964 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
5965
9812b2e6
YQ
59662015-09-21 Yao Qi <yao.qi@linaro.org>
5967
5968 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
5969
18fe412b
YQ
59702015-09-21 Yao Qi <yao.qi@linaro.org>
5971
5972 * tracepoint.c (max_jump_pad_size): Remove.
5973
a0cc84cd
YQ
59742015-09-18 Yao Qi <yao.qi@linaro.org>
5975
5976 * linux-aarch64-low.c: Don't include sys/uio.h.
5977 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
5978
d78908cf
WW
59792015-09-16 Wei-cheng Wang <cole945@gmail.com>
5980
5981 * tracepoint.c (eval_result_type): Change prototype.
5982 (condition_true_at_tracepoint): Fix argument to compiled_cond.
5983
d57e0d50
PA
59842015-09-15 Pedro Alves <palves@redhat.com>
5985
5986 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
5987 Check whether to report exec events instead of checking whether
5988 multiprocess is enabled.
5989
5a676acc
PA
59902015-09-15 Pedro Alves <palves@redhat.com>
5991
5992 PR remote/18965
5993 * remote-utils.c (prepare_resume_reply): Merge
5994 TARGET_WAITKIND_VFORK_DONE switch case with the
5995 TARGET_WAITKIND_FORKED case.
5996
7c5d0fad
YQ
59972015-09-15 Yao Qi <yao.qi@linaro.org>
5998
5999 * server.c (handle_query): Check string comparison using
6000 "else if" instead of "if".
6001
750ce8d1
YQ
60022015-09-15 Yao Qi <yao.qi@linaro.org>
6003
6004 * server.c (vCont_supported): New global variable.
6005 (handle_query): Set vCont_supported to 1 if "vContSupported+"
6006 matches. Append ";vContSupported+" to own_buf.
6007 (handle_v_requests): Append ";s;S" to own_buf if target supports
6008 hardware single step or vCont_supported is false.
6009 (capture_main): Set vCont_supported to zero.
6010
70b90b91
YQ
60112015-09-15 Yao Qi <yao.qi@linaro.org>
6012
6013 * linux-low.c (linux_supports_conditional_breakpoints): Rename
6014 it to ...
6015 (linux_supports_hardware_single_step): ... New function.
6016 (linux_target_ops): Update.
6017 * lynx-low.c (lynx_target_ops): Set field
6018 supports_hardware_single_step to target_can_do_hardware_single_step.
6019 * nto-low.c (nto_target_ops): Likewise.
6020 * spu-low.c (spu_target_ops): Likewise.
6021 * win32-low.c (win32_target_ops): Likewise.
6022 * target.c (target_can_do_hardware_single_step): New function.
6023 * target.h (struct target_ops) <supports_conditional_breakpoints>:
6024 Remove. <supports_hardware_single_step>: New field.
6025 (target_supports_conditional_breakpoints): Remove.
6026 (target_supports_hardware_single_step): New macro.
6027 (target_can_do_hardware_single_step): Declare.
6028 * server.c (handle_query): Use target_supports_hardware_single_step
6029 instead of target_supports_conditional_breakpoints.
6030
ade90bde
YQ
60312015-09-15 Yao Qi <yao.qi@linaro.org>
6032
6033 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
6034 function.
6035 (struct linux_target_ops the_low_target): Install
6036 aarch64_linux_siginfo_fixup.
6037
94585166
DB
60382015-09-11 Don Breazeal <donb@codesourcery.com>
6039 Luis Machado <lgustavo@codesourcery.com>
6040
6041 * linux-low.c (linux_mourn): Static declaration.
6042 (linux_arch_setup): Move in front of
6043 handle_extended_wait.
6044 (linux_arch_setup_thread): New function.
6045 (handle_extended_wait): Handle exec events. Call
6046 linux_arch_setup_thread. Make event_lwp argument a
6047 pointer-to-a-pointer.
6048 (check_zombie_leaders): Do not check stopped threads.
6049 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
6050 (linux_low_filter_event): Add lwp and thread for exec'ing
6051 non-leader thread if leader thread has been deleted.
6052 Refactor code into linux_arch_setup_thread and call it.
6053 Pass child lwp pointer by reference to handle_extended_wait.
6054 (linux_wait_for_event_filtered): Update comment.
6055 (linux_wait_1): Prevent clobbering exec event status.
6056 (linux_supports_exec_events): New function.
6057 (linux_target_ops) <supports_exec_events>: Initialize new member.
6058 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
6059 new member.
6060 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
6061 * server.c (report_exec_events): New global variable.
6062 (handle_query): Handle qSupported query for exec-events feature.
6063 (captured_main): Initialize report_exec_events.
6064 * server.h (report_exec_events): Declare new global variable.
6065 * target.h (struct target_ops) <supports_exec_events>: New
6066 member.
6067 (target_supports_exec_events): New macro.
6068 * win32-low.c (win32_target_ops) <supports_exec_events>:
6069 Initialize new member.
6070
0568462b
MM
60712015-09-09 Markus Metzger <markus.t.metzger@intel.com>
6072
6073 * linux-low.c (linux_low_enable_btrace): Remove.
6074 (linux_target_ops): Replace linux_low_enable_btrace with
6075 linux_enable_btrace.
6076
39edd165
YQ
60772015-09-03 Yao Qi <yao.qi@linaro.org>
6078
6079 * linux-aarch64-low.c (aarch64_insert_point): Call
6080 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
6081 returns true.
6082
1db33b5a
UW
60832015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
6084
6085 * linux-low.c (check_stopped_by_breakpoint): Use
6086 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
6087
ab290430
PA
60882015-08-27 Pedro Alves <palves@redhat.com>
6089
6090 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
6091
8d749320
SM
60922015-08-26 Simon Marchi <simon.marchi@ericsson.com>
6093
6711b7f8
SM
6094 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
6095 the XNEW-family equivalent.
8d749320
SM
6096 (compile_bytecodes): Likewise.
6097 * dll.c (loaded_dll): Likewise.
6098 * event-loop.c (append_callback_event): Likewise.
6099 (create_file_handler): Likewise.
6100 (create_file_event): Likewise.
6101 * hostio.c (handle_open): Likewise.
6102 * inferiors.c (add_thread): Likewise.
6103 (add_process): Likewise.
6104 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
6105 * linux-arm-low.c (arm_new_process): Likewise.
6106 (arm_new_thread): Likewise.
6107 * linux-low.c (add_to_pid_list): Likewise.
6108 (linux_add_process): Likewise.
6109 (handle_extended_wait): Likewise.
6110 (add_lwp): Likewise.
6111 (enqueue_one_deferred_signal): Likewise.
6112 (enqueue_pending_signal): Likewise.
6113 (linux_resume_one_lwp_throw): Likewise.
6114 (linux_resume_one_thread): Likewise.
6115 (linux_read_memory): Likewise.
6116 (linux_write_memory): Likewise.
6117 * linux-mips-low.c (mips_linux_new_process): Likewise.
6118 (mips_linux_new_thread): Likewise.
6119 (mips_add_watchpoint): Likewise.
6120 * linux-x86-low.c (initialize_low_arch): Likewise.
6121 * lynx-low.c (lynx_add_process): Likewise.
6122 * mem-break.c (set_raw_breakpoint_at): Likewise.
6123 (set_breakpoint): Likewise.
6124 (add_condition_to_breakpoint): Likewise.
6125 (add_commands_to_breakpoint): Likewise.
6126 (clone_agent_expr): Likewise.
6127 (clone_one_breakpoint): Likewise.
6128 * regcache.c (new_register_cache): Likewise.
6129 * remote-utils.c (look_up_one_symbol): Likewise.
6130 * server.c (queue_stop_reply): Likewise.
6131 (start_inferior): Likewise.
6132 (queue_stop_reply_callback): Likewise.
6133 (handle_target_event): Likewise.
6134 * spu-low.c (fetch_ppc_memory): Likewise.
6135 (store_ppc_memory): Likewise.
6136 * target.c (set_target_ops): Likewise.
6137 * thread-db.c (thread_db_load_search): Likewise.
6138 (try_thread_db_load_1): Likewise.
6139 * tracepoint.c (add_tracepoint): Likewise.
6140 (add_tracepoint_action): Likewise.
6141 (create_trace_state_variable): Likewise.
6142 (cmd_qtdpsrc): Likewise.
6143 (cmd_qtro): Likewise.
6144 (add_while_stepping_state): Likewise.
6145 * win32-low.c (child_add_thread): Likewise.
6146 (get_image_name): Likewise.
6147
ed8b7b42
YQ
61482015-08-25 Yao Qi <yao.qi@linaro.org>
6149
6150 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
6151
db3cb7cb
YQ
61522015-08-25 Yao Qi <yao.qi@linaro.org>
6153
6154 * Makefile.in (aarch64-linux.o): New rule.
6155 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
6156 srv_tgtobj.
6157 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
6158 (aarch64_init_debug_reg_state): Make it extern.
6159 (aarch64_linux_prepare_to_resume): Remove.
6160
f6011a1c
YQ
61612015-08-25 Yao Qi <yao.qi@linaro.org>
6162
6163 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
6164 lwp_arch_private_info and ptid_of_lwp.
6165
88e2cf7e
YQ
61662015-08-25 Yao Qi <yao.qi@linaro.org>
6167
6168 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
6169 Find proc_info by find_process_pid. All callers updated.
6170
5e35436e
YQ
61712015-08-25 Yao Qi <yao.qi@linaro.org>
6172
6173 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
6174 Remove.
6175 (debug_reg_change_callback): Remove.
6176 (aarch64_notify_debug_reg_change): Remove.
6177
4a8a7965
YQ
61782015-08-25 Yao Qi <yao.qi@linaro.org>
6179
6180 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
6181 Call current_lwp_ptid.
6182
32a271ee
YQ
61832015-08-25 Yao Qi <yao.qi@linaro.org>
6184
6185 * linux-aarch64-low.c (debug_reg_change_callback): Use
6186 debug_printf.
6187
0d51c8d7
YQ
61882015-08-25 Yao Qi <yao.qi@linaro.org>
6189
6190 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
6191
31a43dd5
YQ
61922015-08-25 Yao Qi <yao.qi@linaro.org>
6193
6194 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
6195
8ee52567
YQ
61962015-08-25 Yao Qi <yao.qi@linaro.org>
6197
6198 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
6199 the code.
6200
ff3f0f45
YQ
62012015-08-25 Yao Qi <yao.qi@linaro.org>
6202
6203 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
6204 Remove.
6205 (debug_reg_change_callback): Remove argument entry and add argument
6206 lwp. Remove local variable thread. Don't print thread id in the
6207 debugging output. Don't check whether pid of thread equals to pid.
6208 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
6209 iterate_over_lwps instead find_inferior.
6210
3d40fbb5
PA
62112015-08-24 Pedro Alves <palves@redhat.com>
6212
6213 * inferiors.c (get_first_process): New function.
6214 * inferiors.h (get_first_process): New declaration.
6215 * remote-utils.c (read_ptid): Default to the first process in the
6216 list, instead of to the current thread's process.
6217
438e1e42
PA
62182015-08-24 Pedro Alves <palves@redhat.com>
6219
6220 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
6221 * event-loop.c: Likewise.
6222 * remote-utils.c: Likewise.
6223 * tracepoint.c: Likewise.
6224
a8c6d4fc
PA
62252015-08-24 Pedro Alves <palves@redhat.com>
6226
6227 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
6228 ptid_get_lwp.
6229
99b0bb12
PA
62302015-08-21 Pedro Alves <palves@redhat.com>
6231
6232 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
6233 instead of literal 1.
6234
f8904751
PA
62352015-08-21 Pedro Alves <palves@redhat.com>
6236
6237 * tdesc.c (default_description): Explicitly zero-initialize.
6238
465a859e
PA
62392015-08-21 Pedro Alves <palves@redhat.com>
6240
6241 PR gdb/18749
6242 * inferiors.c (remove_thread): Discard any pending stop reply for
6243 this thread.
6244 * server.c (remove_all_on_match_pid): Rename to ...
6245 (remove_all_on_match_ptid): ... this. Work with a filter ptid
6246 instead of a pid.
6247 (discard_queued_stop_replies): Change parameter to a ptid. Now
6248 extern.
6249 (handle_v_kill, kill_inferior_callback, captured_main)
6250 (process_serial_event): Adjust.
6251 * server.h (discard_queued_stop_replies): Declare.
6252
f0db101d
PA
62532015-08-21 Pedro Alves <palves@redhat.com>
6254
6255 * linux-low.c (wait_for_sigstop): Always switch to no thread
6256 selected if the previously current thread dies.
6257 * lynx-low.c (lynx_request_interrupt): Use the first thread's
6258 process instead of the current thread's.
6259 * remote-utils.c (input_interrupt): Don't check if there's no
6260 current thread.
6261 * server.c (gdb_read_memory, gdb_write_memory): If setting the
6262 current thread to the general thread fails, error out.
6263 (handle_qxfer_auxv, handle_qxfer_libraries)
6264 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
6265 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
6266 (handle_query): Check if there's a thread selected instead of
6267 checking whether there's any thread in the thread list.
6268 (handle_qxfer_threads, handle_qxfer_btrace)
6269 (handle_qxfer_btrace_conf): Don't error out early if there's no
6270 thread in the thread list.
6271 (handle_v_cont, myresume): Don't set the current thread to the
6272 continue thread.
6273 (process_serial_event) <Hg handling>: Also set thread_id if the
6274 previous general thread is still alive.
6275 (process_serial_event) <g/G handling>: If setting the current
6276 thread to the general thread fails, error out.
6277 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
6278 thread's lwp instead of the current thread's.
6279 * target.c (set_desired_thread): If the desired thread was not
6280 found, leave the current thread pointing to NULL. Return an int
6281 (boolean) indicating success.
6282 * target.h (set_desired_thread): Change return type to int.
6283
40045d91
MF
62842015-08-20 Max Filippov <jcmvbkbc@gmail.com>
6285
6286 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
6287 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
6288 #includes.
6289 (ps_get_thread_area): New function.
6290
45face3b
GB
62912015-08-19 Gary Benson <gbenson@redhat.com>
6292
6293 * hostio.c (handle_pread): Do not attempt to read more data
6294 than hostio_reply_with_data can fit in a packet.
6295
16d5f642
JB
62962015-08-18 Joel Brobecker <brobecker@adacore.com>
6297
6298 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
6299
a738da3a
MF
63002015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
6301
6302 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
6303
33ebda9d
PA
63042015-08-06 Pedro Alves <palves@redhat.com>
6305
6306 * tracepoint.c (expr_eval_result): Now an int.
6307
a44892be
PA
63082015-08-06 Pedro Alves <palves@redhat.com>
6309
6310 * gdbthread.h (struct regcache): Forward declare.
6311 (struct thread_info) <regcache_data>: Now a struct regcache
6312 pointer.
6313 * inferiors.c (inferior_regcache_data)
6314 (set_inferior_regcache_data): Now work with struct regcache
6315 pointers.
6316 * inferiors.h (struct regcache): Forward declare.
6317 (inferior_regcache_data, set_inferior_regcache_data): Now work
6318 with struct regcache pointers.
6319 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
6320 (free_register_cache_thread): Remove struct regcache pointer
6321 casts.
6322
608a1e46
PA
63232015-08-06 Pedro Alves <palves@redhat.com>
6324
6325 * server.c (captured_main): On error, print the exception message
6326 to stderr, and if run_once is set, throw a quit.
6327
f0ce0d3a
PA
63282015-08-06 Pedro Alves <palves@redhat.com>
6329
6330 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
6331 the current thread.
6332
bf47e248
PA
63332015-08-06 Pedro Alves <palves@redhat.com>
6334
6335 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
6336 reading beyond the passed in buffer length.
6337
b6b9ffcc
PL
63382015-08-06 Pierre Langlois <pierre.langlois@arm.com>
6339
6340 * tracepoint.c (symbol_list) <required>: Remove.
6341
863d01bd
PA
63422015-08-06 Pedro Alves <palves@redhat.com>
6343
6344 * linux-low.c (handle_extended_wait): Set the fork child's suspend
6345 count if stopping and suspending threads.
6346 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
6347 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
6348 (linux_detach): Complete an ongoing step-over.
6349 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
6350 throughout.
6351 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
6352 (linux_wait_1): If passing a signal to the inferior after
6353 finishing a step-over, unsuspend and re-resume all lwps. If we
6354 see a single-step event but the thread should be continuing, don't
6355 pass the trap to gdb.
6356 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
6357 internal_error instead of gdb_assert.
6358 (enqueue_pending_signal): New function.
6359 (check_ptrace_stopped_lwp_gone): Add debug output.
6360 (start_step_over): Use internal_error instead of gdb_assert.
6361 (complete_ongoing_step_over): New function.
6362 (linux_resume_one_thread): Don't resume a suspended thread.
6363 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
6364 it stepping.
6365
00db26fa
PA
63662015-08-06 Pedro Alves <palves@redhat.com>
6367
6368 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
6369 (linux_thread_alive): Use lwp_is_marked_dead.
6370 (extended_event_reported): Delete.
6371 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
6372 instead of extended_event_reported.
6373 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
6374 as well.
6375 (lwp_is_marked_dead): New function.
6376 (lwp_running): Use lwp_is_marked_dead.
6377 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
6378 comment.
6379
ad071a30
PA
63802015-08-06 Pedro Alves <palves@redhat.com>
6381
6382 * linux-low.c (linux_wait_1): Move fork event output out of the
6383 !report_to_gdb check. Pass event_child->waitstatus to
6384 target_waitstatus_to_string instead of ourstatus.
6385
524b57e6
YQ
63862015-08-04 Yao Qi <yao.qi@linaro.org>
6387
6388 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
6389 if current_thread is 32 bit.
6390
6085d6f6
YQ
63912015-08-04 Yao Qi <yao.qi@linaro.org>
6392
6393 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
6394 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
6395 * server.c (extended_protocol): Remove "static".
6396 * server.h (extended_protocol): Declare it.
6397
8a7e4587
YQ
63982015-08-04 Yao Qi <yao.qi@linaro.org>
6399
6400 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
6401 both aarch64 and aarch32.
6402 (aarch64_set_pc): Likewise.
6403
3b53ae99
YQ
64042015-08-04 Yao Qi <yao.qi@linaro.org>
6405
6406 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
6407 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
6408 arm-with-neon.xml to srv_xmlfiles.
6409 * linux-aarch64-low.c: Include linux-aarch32-low.h.
6410 (is_64bit_tdesc): New function.
6411 (aarch64_linux_read_description): New function.
6412 (aarch64_arch_setup): Call aarch64_linux_read_description.
6413 (regs_info): Rename to regs_info_aarch64.
6414 (aarch64_regs_info): Return right regs_info.
6415 (initialize_low_arch): Call initialize_low_arch_aarch32.
6416
bd9e6534
YQ
64172015-08-04 Yao Qi <yao.qi@linaro.org>
6418
6419 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
6420 * linux-aarch32-low.c: New file.
6421 * linux-aarch32-low.h: New file.
6422 * linux-arm-low.c (arm_fill_gregset): Move it to
6423 linux-aarch32-low.c.
6424 (arm_store_gregset): Likewise.
6425 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
6426 (arm_store_vfpregset): Call arm_store_vfpregset_num.
6427 (arm_arch_setup): Check if PTRACE_GETREGSET works.
6428 (regs_info): Rename to regs_info_arm.
6429 (arm_regs_info): Return regs_info_aarch32 if
6430 have_ptrace_getregset is 1 and target description is
6431 arm_with_neon or arm_with_vfpv3.
6432 (initialize_low_arch): Don't call init_registers_arm_with_neon.
6433 Call initialize_low_arch_aarch32 instead.
6434
ded48a5e
YQ
64352015-08-04 Yao Qi <yao.qi@linaro.org>
6436
6437 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
6438 * linux-low.c: ... here.
6439 * linux-low.h (have_ptrace_getregset): Declare it.
6440
96e9210f
PA
64412015-08-04 Pedro Alves <palves@redhat.com>
6442
6443 * thread-db.c (struct thread_db): Use new typedefs.
6444 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
6445 CHK calls.
6446 (disable_thread_event_reporting): Cast result of dlsym to
6447 destination function pointer type.
6448 (thread_db_mourn): Use td_ta_delete_ftype.
6449
af60a1ef
SL
64502015-08-03 Sandra Loosemore <sandra@codesourcery.com>
6451
6452 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
6453 arch variant.
6454 (CDX_BREAKPOINT): Define for R2.
6455 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
6456 (the_low_target): Add comments.
6457
e8b41681
YQ
64582015-07-30 Yao Qi <yao.qi@linaro.org>
6459
6460 * linux-arm-low.c (arm_hwcap): Remove it.
6461 (arm_read_description): New local variable arm_hwcap. Don't
6462 set arm_hwcap to zero.
6463
89abb039
YQ
64642015-07-30 Yao Qi <yao.qi@linaro.org>
6465
6466 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
6467 Use regcache->tdesc instead.
6468 (arm_store_wmmxregset): Likewise.
6469 (arm_fill_vfpregset): Likewise.
6470 (arm_store_vfpregset): Likewise.
6471
deca266c
YQ
64722015-07-30 Yao Qi <yao.qi@linaro.org>
6473
6474 * linux-arm-low.c: Include arch/arm.h.
6475 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
6476 (arm_store_gregset): Likewise.
6477
aa58a496
SM
64782015-07-29 Simon Marchi <simon.marchi@ericsson.com>
6479
6480 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
6481 ptrace's 4th parameter.
6482
50904b25
YQ
64832015-07-27 Yao Qi <yao.qi@linaro.org>
6484
6485 * configure.srv (case aarch64*-*-linux*): Don't set
6486 srv_linux_usrregs.
6487
5826e159
PA
64882015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
6489
6490 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
6491 sys/ptrace.h.
6492 * linux-arm-low.c: Likewise.
6493 * linux-cris-low.c: Likewise.
6494 * linux-crisv32-low.c: Likewise.
6495 * linux-low.c: Likewise.
6496 * linux-m68k-low.c: Likewise.
6497 * linux-mips-low.c: Likewise.
6498 * linux-nios2-low.c: Likewise.
6499 * linux-s390-low.c: Likewise.
6500 * linux-sparc-low.c: Likewise.
6501 * linux-tic6x-low.c: Likewise.
6502 * linux-tile-low.c: Likewise.
6503 * linux-x86-low.c: Likewise.
6504
54019719
PA
65052015-07-24 Pedro Alves <palves@redhat.com>
6506
6507 * config.in: Regenerate.
6508 * configure: Regenerate.
6509
eb7aa561
PA
65102015-07-24 Pedro Alves <palves@redhat.com>
6511
6512 * acinclude.m4: Include ../ptrace.m4.
6513 * configure.ac: Call GDB_AC_PTRACE.
6514 * config.in, configure: Regenerate.
6515
55d7b841
YQ
65162015-07-24 Yao Qi <yao.qi@linaro.org>
6517
6518 * linux-low.c (linux_create_inferior): Remove setting to
6519 proc->priv->new_inferior.
6520 (linux_attach): Likewise.
6521 (linux_low_filter_event): Likewise.
6522 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
6523
c06cbd92
YQ
65242015-07-24 Yao Qi <yao.qi@linaro.org>
6525
6526 * linux-low.c (linux_arch_setup): New function.
6527 (linux_low_filter_event): If proc->tdesc is NULL and
6528 proc->attached is true, call the_low_target.arch_setup.
6529 Otherwise, keep status pending, and return.
6530 (linux_resume_one_lwp_throw): Don't call get_pc if
6531 thread->while_stepping isn't NULL. Don't call
6532 get_thread_regcache if proc->tdesc is NULL.
6533 (need_step_over_p): Return 0 if proc->tdesc is NULL.
6534 (linux_target_ops): Install arch_setup.
6535 * server.c (start_inferior): Call the_target->arch_setup.
6536 * target.h (struct target_ops) <arch_setup>: New field.
6537 (target_arch_setup): New marco.
6538 * lynx-low.c (lynx_target_ops): Update.
6539 * nto-low.c (nto_target_ops): Update.
6540 * spu-low.c (spu_target_ops): Update.
6541 * win32-low.c (win32_target_ops): Update.
6542
5ae3ebba
YQ
65432015-07-24 Yao Qi <yao.qi@linaro.org>
6544
6545 * linux-low.c (linux_add_process): Don't set
6546 proc->priv->new_inferior.
6547 (linux_create_inferior): Set proc->priv->new_inferior to 1.
6548 (linux_attach): Likewise.
6549
eb97750b
YQ
65502015-07-24 Yao Qi <yao.qi@linaro.org>
6551
6552 * server.c (start_inferior): Code refactor.
6553
51aee833
YQ
65542015-07-24 Yao Qi <yao.qi@linaro.org>
6555
6556 * server.c (process_serial_event): Set general_thread.
6557
af1b22f3
YQ
65582015-07-21 Yao Qi <yao.qi@linaro.org>
6559
6560 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
6561 aarch64_linux_get_debug_reg_capacity.
6562
554717a3
YQ
65632015-07-17 Yao Qi <yao.qi@linaro.org>
6564
6565 * Makefile.in (aarch64-linux-hw-point.o): New rule.
6566 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
6567 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
6568 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
6569 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
6570 (AARCH64_HWP_ALIGNMENT): Likewise.
6571 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
6572 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
6573 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
6574 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
6575 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
6576 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
6577 (struct aarch64_debug_reg_state): Likewise.
6578 (struct arch_lwp_info): Likewise.
6579 (aarch64_align_watchpoint): Likewise.
6580 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
6581 (aarch64_watchpoint_length): Likewise.
6582 (aarch64_point_encode_ctrl_reg): Likewise
6583 (aarch64_point_is_aligned): Likewise.
6584 (aarch64_align_watchpoint): Likewise.
6585 (aarch64_linux_set_debug_regs):
6586 (aarch64_dr_state_insert_one_point): Likewise.
6587 (aarch64_dr_state_remove_one_point): Likewise.
6588 (aarch64_handle_breakpoint): Likewise.
6589 (aarch64_handle_aligned_watchpoint): Likewise.
6590 (aarch64_handle_unaligned_watchpoint): Likewise.
6591 (aarch64_handle_watchpoint): Likewise.
6592
c67ca4de
YQ
65932015-07-17 Yao Qi <yao.qi@linaro.org>
6594
6595 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
6596 and don't aarch64_get_debug_reg_state. All callers update.
6597 (aarch64_handle_aligned_watchpoint): Likewise.
6598 (aarch64_handle_unaligned_watchpoint): Likewise.
6599 (aarch64_handle_watchpoint): Likewise.
6600 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
6601 (aarch64_remove_point): Likewise.
6602
25abf979
YQ
66032015-07-17 Yao Qi <yao.qi@linaro.org>
6604
6605 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
6606 debug_printf.
6607 (aarch64_handle_unaligned_watchpoint): Likewise.
6608
db1ff28b
JK
66092015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
6610
6611 Revert the previous 3 commits:
6612 Move gdb_regex* to common/
6613 Move linux_find_memory_regions_full & co.
6614 gdbserver build-id attribute generator
6615
700ca40f
JK
66162015-07-15 Aleksandar Ristovski <aristovski@qnx.com
6617 Jan Kratochvil <jan.kratochvil@redhat.com>
6618
6619 gdbserver build-id attribute generator.
6620 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
6621 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
6622 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
6623 (find_phdr): New.
6624 (get_dynamic): Use find_pdhr to traverse program headers.
6625 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
6626 (compare_mapping_entry_range, struct find_memory_region_callback_data)
6627 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
6628 (get_hex_build_id): New.
6629 (linux_qxfer_libraries_svr4): Add optional build-id attribute
6630 to reply XML document.
6631
9904185c
JK
66322015-07-15 Aleksandar Ristovski <aristovski@qnx.com
6633 Jan Kratochvil <jan.kratochvil@redhat.com>
6634
6635 * target.c: Include target/target-utils.h and fcntl.h.
6636 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
6637 (target_fileio_read_stralloc): New functions.
6638
6e5b4429
JK
66392015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
6640
6641 * Makefile.in (OBS): Add gdb_regex.o.
6642 (gdb_regex.o): New.
6643 * config.in: Rebuilt.
6644 * configure: Rebuilt.
6645
ddc98fbf
JK
66462015-07-15 Aleksandar Ristovski <aristovski@qnx.com
6647 Jan Kratochvil <jan.kratochvil@redhat.com>
6648
6649 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
6650 * Makefile.in (OBS): Add target-utils.o.
6651 (linux-maps.o, target-utils.o): New.
6652 * configure.srv (srv_linux_obj): Add linux-maps.o.
6653
e57bb7a0
PL
66542015-07-15 Pierre Langlois <pierre.langlois@arm.com>
6655
6656 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
6657 function, return 1.
6658 (the_low_target): Install it.
6659
586b02a9
PA
66602015-07-14 Pedro Alves <palves@redhat.com>
6661
6662 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
6663 Instead, ignore ECHILD, and throw an error for other errnos.
6664
58c1b36c
PA
66652015-07-10 Pedro Alves <palves@redhat.com>
6666
6667 * event-loop.c (struct callback_event) <data>: Change type to
6668 gdb_client_data instance instead of gdb_client_data pointer.
6669 (append_callback_event): Adjust.
6670
421530db
PL
66712015-07-10 Pierre Langlois <pierre.langlois@arm.com>
6672
6673 * linux-aarch64-low.c: Add comments for each linux_target_ops
6674 method. Remove comments already covered in target_ops and
6675 linux_target_ops definitions.
6676 (the_low_target): Add comments for each unimplemented method.
6677
c2d65f38
YQ
66782015-07-09 Yao Qi <yao.qi@linaro.org>
6679
6680 * linux-aarch64-low.c (aarch64_regmap): Remove.
6681 (aarch64_usrregs_info): Remove.
6682 (regs_info): Set field usrregs to NULL.
6683
b20a6524
MM
66842015-07-02 Markus Metzger <markus.t.metzger@intel.com>
6685
6686 * linux-low.c: Include "rsp-low.h"
6687 (linux_low_encode_pt_config, linux_low_encode_raw): New.
6688 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
6689 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
6690 (handle_btrace_enable_pt): New.
6691 (handle_btrace_general_set): Support "pt".
6692 (handle_btrace_conf_general_set): Support "pt:size".
6693
96c97461
PL
66942015-06-29 Pierre Langlois <pierre.langlois@arm.com>
6695
6696 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
6697 Z_PACKET_SW_BP.
6698
37d66942
PL
66992015-06-29 Pierre Langlois <pierre.langlois@arm.com>
6700
6701 * linux-aarch64-low.c: Remove comment about endianness.
6702 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
6703 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
6704 memcmp.
6705
dc06243f
GB
67062015-06-24 Gary Benson <gbenson@redhat.com>
6707
6708 * linux-i386-ipa.c (stdint.h): Do not include.
6709 * lynx-i386-low.c (stdint.h): Likewise.
6710 * lynx-ppc-low.c (stdint.h): Likewise.
6711 * mem-break.c (stdint.h): Likewise.
6712 * thread-db.c (stdint.h): Likewise.
6713 * tracepoint.c (stdint.h): Likewise.
6714 * win32-low.c (stdint.h): Likewise.
6715
124e13d9
SM
67162015-06-18 Simon Marchi <simon.marchi@ericsson.com>
6717
6718 * server.c (write_qxfer_response): Update call to
6719 remote_escape_output.
6720
909c2cda
JK
67212015-06-15 Aleksandar Ristovski <aristovski@qnx.com
6722 Jan Kratochvil <jan.kratochvil@redhat.com>
6723
6724 Merge multiple hex conversions.
6725 * gdbreplay.c (tohex): Rename to 'fromhex'.
6726 (logchar): Use fromhex.
6727
24c05f46
JK
67282015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
6729
6730 * server.c (handle_qxfer_libraries): Set `version' attribute for
6731 <library-list>.
6732
14d2069a
GB
67332015-06-10 Gary Benson <gbenson@redhat.com>
6734
6735 * target.h (struct target_ops) <multifs_open>: New field.
6736 <multifs_unlink>: Likewise.
6737 <multifs_readlink>: Likewise.
6738 * linux-low.c (nat/linux-namespaces.h): New include.
6739 (linux_target_ops): Initialize the_target->multifs_open,
6740 the_target->multifs_unlink and the_target->multifs_readlink.
6741 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
6742 * hostio.c (hostio_fs_pid): New static variable.
6743 (hostio_handle_new_gdb_connection): New function.
6744 (handle_setfs): Likewise.
6745 (handle_open): Use the_target->multifs_open as appropriate.
6746 (handle_unlink): Use the_target->multifs_unlink as appropriate.
6747 (handle_readlink): Use the_target->multifs_readlink as
6748 appropriate.
6749 (handle_vFile): Handle vFile:setfs packets.
6750 * server.c (handle_query): Call hostio_handle_new_gdb_connection
6751 after target_handle_new_gdb_connection.
6752
4b8b5e72
GB
67532015-06-10 Gary Benson <gbenson@redhat.com>
6754
6755 * configure.ac (AC_CHECK_FUNCS): Add setns.
6756 * config.in: Regenerate.
6757 * configure: Likewise.
6758 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
6759 (linux-namespaces.o): New rule.
6760 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
6761
3ac2e371
GB
67622015-06-09 Gary Benson <gbenson@redhat.com>
6763
6764 * hostio.c (handle_open): Process mode argument with
6765 fileio_to_host_mode.
6766
ca9b78ce
YQ
67672015-06-01 Yao Qi <yao.qi@linaro.org>
6768
6769 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
6770 * linux-x86-low.c: Likewise.
6771
bfacd19d
DB
67722015-05-28 Don Breazeal <donb@codesourcery.com>
6773
6774 * linux-low.c (handle_extended_wait): Initialize
6775 thread_info.last_resume_kind for new fork children.
6776
452003ef
PA
67772015-05-15 Pedro Alves <palves@redhat.com>
6778
6779 * target.h (target_handle_new_gdb_connection): Rewrite using if
6780 wrapped in do/while.
6781
1041a03c
JB
67822015-05-14 Joel Brobecker <brobecker@adacore.com>
6783
6784 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
6785 * configure, config.in: Regenerate.
6786 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
6787 Declare typedef.
6788
c269dbdb
DB
67892015-05-12 Don Breazeal <donb@codesourcery.com>
6790
6791 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
6792 PTRACE_EVENT_VFORK_DONE.
6793 (linux_low_ptrace_options, extended_event_reported): Add vfork
6794 events.
6795 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
6796 and "vforkdone" for RSP 'T' Stop Reply Packet.
6797 * server.h (report_vfork_events): Declare
6798 global variable.
6799
3a8a0396
DB
68002015-05-12 Don Breazeal <donb@codesourcery.com>
6801
6802 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
6803 (the_low_target) <new_fork>: Initialize new member.
6804 * linux-arm-low.c (arm_new_fork): New function.
6805 (the_low_target) <new_fork>: Initialize new member.
6806 * linux-low.c (handle_extended_wait): Call new target function
6807 new_fork.
6808 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
6809 * linux-mips-low.c (mips_add_watchpoint): New function
6810 extracted from mips_insert_point.
6811 (the_low_target) <new_fork>: Initialize new member.
6812 (mips_linux_new_fork): New function.
6813 (mips_insert_point): Call mips_add_watchpoint.
6814 * linux-x86-low.c (x86_linux_new_fork): New function.
6815 (the_low_target) <new_fork>: Initialize new member.
6816
de0d863e
DB
68172015-05-12 Don Breazeal <donb@codesourcery.com>
6818
6819 * linux-low.c (handle_extended_wait): Implement return value,
6820 rename argument 'event_child' to 'event_lwp', handle
6821 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
6822 (linux_low_ptrace_options): New function.
6823 (linux_low_filter_event): Call linux_low_ptrace_options,
6824 use different argument fo linux_enable_event_reporting,
6825 use return value from handle_extended_wait.
6826 (extended_event_reported): New function.
6827 (linux_wait_1): Call extended_event_reported and set
6828 status to report fork events.
6829 (linux_write_memory): Add pid to debug message.
6830 (reset_lwp_ptrace_options_callback): New function.
6831 (linux_handle_new_gdb_connection): New function.
6832 (linux_target_ops): Initialize new structure member.
6833 * linux-low.h (struct lwp_info) <waitstatus>: New member.
6834 * lynx-low.c: Initialize new structure member.
6835 * remote-utils.c (prepare_resume_reply): Implement stop reason
6836 "fork" for "T" stop message.
6837 * server.c (handle_query): Call handle_new_gdb_connection.
6838 * server.h (report_fork_events): Declare global flag.
6839 * target.h (struct target_ops) <handle_new_gdb_connection>:
6840 New member.
6841 (target_handle_new_gdb_connection): New macro.
6842 * win32-low.c: Initialize new structure member.
6843
ddcbc397
DB
68442015-05-12 Don Breazeal <donb@codesourcery.com>
6845
6846 * mem-break.c (APPEND_TO_LIST): Define macro.
6847 (clone_agent_expr): New function.
6848 (clone_one_breakpoint): New function.
6849 (clone_all_breakpoints): New function.
6850 * mem-break.h: Declare new functions.
6851
89245bc0
DB
68522015-05-12 Don Breazeal <donb@codesourcery.com>
6853
6854 * linux-low.c (linux_supports_fork_events): New function.
6855 (linux_supports_vfork_events): New function.
6856 (linux_target_ops): Initialize new structure members.
6857 (initialize_low): Call linux_check_ptrace_features.
6858 * lynx-low.c (lynx_target_ops): Initialize new structure
6859 members.
6860 * server.c (report_fork_events, report_vfork_events):
6861 New global flags.
6862 (handle_query): Add new features to qSupported packet and
6863 response.
6864 (captured_main): Initialize new global variables.
6865 * target.h (struct target_ops) <supports_fork_events>:
6866 New member.
6867 <supports_vfork_events>: New member.
6868 (target_supports_fork_events): New macro.
6869 (target_supports_vfork_events): New macro.
6870 * win32-low.c (win32_target_ops): Initialize new structure
6871 members.
6872
835205d0
GB
68732015-05-12 Gary Benson <gbenson@redhat.com>
6874
6875 * server.c (handle_qxfer_exec_file): Use current process
6876 if annex is empty.
6877
21e94bd9
SL
68782015-05-08 Sandra Loosemore <sandra@codesourcery.com>
6879
6880 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
6881 Remove HAVE_PTRACE_GETREGS conditionals.
6882 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
6883 instead of PTRACE_GETREGS and PTRACE_SETREGS.
6884
45614f15
YQ
68852015-05-08 Yao Qi <yao.qi@linaro.org>
6886
6887 * linux-low.c (linux_supports_conditional_breakpoints): New
6888 function.
6889 (linux_target_ops): Install new target method.
6890 * lynx-low.c (lynx_target_ops): Install NULL hook for
6891 supports_conditional_breakpoints.
6892 * nto-low.c (nto_target_ops): Likewise.
6893 * spu-low.c (spu_target_ops): Likewise.
6894 * win32-low.c (win32_target_ops): Likewise.
6895 * server.c (handle_query): Check
6896 target_supports_conditional_breakpoints.
6897 * target.h (struct target_ops) <supports_conditional_breakpoints>:
6898 New field.
6899 (target_supports_conditional_breakpoints): New macro.
6900
80ad801e
PA
69012015-05-06 Pedro Alves <palves@redhat.com>
6902
6903 PR server/18081
6904 * server.c (start_inferior): If the process exits, mourn it.
6905
819843c7
GB
69062015-04-21 Gary Benson <gbenson@redhat.com>
6907
6908 * hostio.c (fileio_open_flags_to_host): Factored out to
6909 fileio_to_host_openflags in common/fileio.c. Single use
6910 updated.
6911
a2d5a9d7
MF
69122015-04-17 Max Filippov <jcmvbkbc@gmail.com>
6913
6914 * linux-xtensa-low.c (xtensa_fill_gregset)
6915 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
6916 XCHAL_HAVE_LOOP.
6917
deb44829
MF
69182015-04-17 Max Filippov <jcmvbkbc@gmail.com>
6919
6920 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
6921 (regs_info): Replace usrregs pointer with NULL.
6922
e57f1de3
GB
69232015-04-17 Gary Benson <gbenson@redhat.com>
6924
6925 * target.h (struct target_ops) <pid_to_exec_file>: New field.
6926 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
6927 * server.c (handle_qxfer_exec_file): New function.
6928 (qxfer_packets): Add exec-file entry.
6929 (handle_query): Report qXfer:exec-file:read as supported packet.
6930
62828379
RN
69312015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
6932
6933 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
6934
b88bb450
GB
69352015-04-09 Gary Benson <gbenson@redhat.com>
6936
6937 * hostio-errno.c (errno_to_fileio_error): Remove function.
6938 Update caller to use remote_fileio_to_fio_error.
6939
c8f4bfdd
YQ
69402015-04-09 Yao Qi <yao.qi@linaro.org>
6941
6942 * linux-low.c (linux_insert_point): Call
6943 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
6944 (linux_remove_point): Call remove_memory_breakpoint if type is
6945 raw_bkpt_type_sw.
6946 * linux-x86-low.c (x86_insert_point): Don't call
6947 insert_memory_breakpoint.
6948 (x86_remove_point): Don't call remove_memory_breakpoint.
6949
41f98f02
PA
69502015-04-01 Pedro Alves <palves@redhat.com>
6951 Cleber Rosa <crosa@redhat.com>
6952
6953 * server.c (gdbserver_usage): Reorganize and extend the usage
6954 message.
6955
2bf6fb9d
PA
69562015-03-24 Pedro Alves <palves@redhat.com>
6957
6958 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
6959 output. Also dump TRAP_TRACE.
6960 (linux_low_filter_event): In debug output, distinguish a
6961 resume_stop SIGSTOP from a delayed SIGSTOP.
6962
369f6daa
GB
69632015-03-24 Gary Benson <gbenson@redhat.com>
6964
6965 * linux-x86-low.c (x86_linux_new_thread): Moved to
6966 nat/x86-linux.c.
6967 (x86_linux_prepare_to_resume): Likewise.
6968
8e5d4070
GB
69692015-03-24 Gary Benson <gbenson@redhat.com>
6970
6971 * Makefile.in (x86-linux-dregs.o): New rule.
6972 * configure.srv: Add x86-linux-dregs.o to relevant targets.
6973 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
6974 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
6975 (x86_linux_dr_get): Likewise.
6976 (x86_linux_dr_set): Likewise.
6977 (update_debug_registers_callback): Likewise.
6978 (x86_linux_dr_set_addr): Likewise.
6979 (x86_linux_dr_get_addr): Likewise.
6980 (x86_linux_dr_set_control): Likewise.
6981 (x86_linux_dr_get_control): Likewise.
6982 (x86_linux_dr_get_status): Likewise.
6983 (x86_linux_update_debug_registers): Likewise.
6984
2b95d440
GB
69852015-03-24 Gary Benson <gbenson@redhat.com>
6986
6987 * linux-x86-low.c (x86_linux_update_debug_registers):
6988 New function, factored out from...
6989 (x86_linux_prepare_to_resume): ...this.
6990
14b0bc68
GB
69912015-03-24 Gary Benson <gbenson@redhat.com>
6992
6993 * linux-x86-low.c (x86_linux_dr_get): Update comments.
6994 (x86_linux_dr_set): Likewise.
6995 (update_debug_registers_callback): Likewise.
6996 (x86_linux_dr_set_addr): Likewise.
6997 (x86_linux_dr_get_addr): Likewise.
6998 (x86_linux_dr_set_control): Likewise.
6999 (x86_linux_dr_get_control): Likewise.
7000 (x86_linux_dr_get_status): Likewise.
7001 (x86_linux_prepare_to_resume): Likewise.
7002
5dfe6ca8
GB
70032015-03-24 Gary Benson <gbenson@redhat.com>
7004
7005 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
7006 Use perror_with_name. Pass string through gettext.
7007 (x86_linux_dr_set): Likewise.
7008
d33472ad
GB
70092015-03-24 Gary Benson <gbenson@redhat.com>
7010
7011 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
7012 (x86_linux_dr_set_addr): ...this.
7013 (x86_dr_low_get_addr): Rename to...
7014 (x86_linux_dr_get_addr): ...this.
7015 (x86_dr_low_set_control): Rename to...
7016 (x86_linux_dr_set_control): ...this.
7017 (x86_dr_low_get_control): Rename to...
7018 (x86_linux_dr_get_control): ...this.
7019 (x86_dr_low_get_status): Rename to...
7020 (x86_linux_dr_get_status): ...this.
7021 (x86_dr_low): Update with new function names.
7022
4b134ca1
GB
70232015-03-24 Gary Benson <gbenson@redhat.com>
7024
7025 * Makefile.in (x86-linux.o): New rule.
7026 * configure.srv: Add x86-linux.o to relevant targets.
7027 * linux-low.c (lwp_set_arch_private_info): New function.
7028 (lwp_arch_private_info): Likewise.
7029 * linux-x86-low.c: Include nat/x86-linux.h.
7030 (arch_lwp_info): Removed structure.
7031 (update_debug_registers_callback):
7032 Use lwp_set_debug_registers_changed.
7033 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
7034 and lwp_set_debug_registers_changed.
7035 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
7036
34c703da
GB
70372015-03-24 Gary Benson <gbenson@redhat.com>
7038
7039 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
7040 * linux-arm-low.c (arm_new_thread): Likewise.
7041 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
7042 * linux-mips-low.c (mips_linux_new_thread): Likewise.
7043 * linux-x86-low.c (x86_linux_new_thread): Likewise.
7044 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
7045
cff068da
GB
70462015-03-24 Gary Benson <gbenson@redhat.com>
7047
7048 * linux-low.c (ptid_of_lwp): New function.
7049 (lwp_is_stopped): Likewise.
7050 (lwp_stop_reason): Likewise.
7051 * linux-x86-low.c (update_debug_registers_callback):
7052 Use lwp_is_stopped.
7053 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
7054 lwp_stop_reason.
7055
b2f7c7e8
GB
70562015-03-24 Gary Benson <gbenson@redhat.com>
7057
7058 * linux-low.h (linux_stop_lwp): Remove declaration.
7059
6d4ee8c6
GB
70602015-03-24 Gary Benson <gbenson@redhat.com>
7061
7062 * linux-low.h: Include nat/linux-nat.h.
7063 * linux-low.c (iterate_over_lwps_args): New structure.
7064 (iterate_over_lwps_filter): New function.
7065 (iterate_over_lwps): Likewise.
7066 * linux-x86-low.c (update_debug_registers_callback):
7067 Update signature to what iterate_over_lwps expects.
7068 Remove PID check that iterate_over_lwps now performs.
7069 (x86_dr_low_set_addr): Use iterate_over_lwps.
7070 (x86_dr_low_set_control): Likewise.
7071
70a0bb6b
GB
70722015-03-24 Gary Benson <gbenson@redhat.com>
7073
7074 * linux-x86-low.c (x86_debug_reg_state): New function.
7075 (x86_linux_prepare_to_resume): Use the above.
7076
7b669087
GB
70772015-03-24 Gary Benson <gbenson@redhat.com>
7078
7079 * linux-low.c (current_lwp_ptid): New function.
7080 * linux-x86-low.c: Include nat/linux-nat.h.
7081 (x86_dr_low_get_addr): Use current_lwp_ptid.
7082 (x86_dr_low_get_control): Likewise.
7083 (x86_dr_low_get_status): Likewise.
7084
eef49a3d
PA
70852015-03-20 Pedro Alves <palves@redhat.com>
7086
7087 * tracepoint.c (cmd_qtstatus): Make "str" const.
7088
b2333d22
PA
70892015-03-20 Pedro Alves <palves@redhat.com>
7090
7091 * server.c (handle_general_set): Make "req_str" const.
7092
23f238d3
PA
70932015-03-19 Pedro Alves <palves@redhat.com>
7094
7095 * linux-low.c (linux_resume_one_lwp): Rename to ...
7096 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
7097 instead call perror_with_name.
7098 (check_ptrace_stopped_lwp_gone): New function.
7099 (linux_resume_one_lwp): Reimplement as wrapper around
7100 linux_resume_one_lwp_throw that swallows errors if the LWP is
7101 gone.
7102
91baf43f
PA
71032015-03-19 Pedro Alves <palves@redhat.com>
7104
7105 * linux-low.c (count_events_callback, select_event_lwp_callback):
7106 No longer check whether the thread has resume_stop as last resume
7107 kind.
7108
8bf3b159
PA
71092015-03-19 Pedro Alves <palves@redhat.com>
7110
7111 * linux-low.c (count_events_callback, select_event_lwp_callback):
7112 Use the lwp's status_pending_p field, not the thread's.
7113
b90fc188
PA
71142015-03-19 Pedro Alves <palves@redhat.com>
7115
7116 * linux-low.c (select_event_lwp_callback): Update comments to
7117 no longer mention SIGTRAP.
7118
464b0089
GB
71192015-03-18 Gary Benson <gbenson@redhat.com>
7120
7121 * server.c (handle_query): Do not report vFile:fstat as supported.
7122
aa9e327f
GB
71232015-03-11 Gary Benson <gbenson@redhat.com>
7124
7125 * hostio.c (sys/types.h): New include.
7126 (sys/stat.h): Likewise.
7127 (common-remote-fileio.h): Likewise.
7128 (handle_fstat): New function.
7129 (handle_vFile): Handle vFile:fstat packets.
aa9e327f 7130
791c0056
GB
71312015-03-11 Gary Benson <gbenson@redhat.com>
7132
7133 * configure.ac (AC_CHECK_MEMBERS): Add checks for
7134 struct stat.st_blocks and struct stat.st_blksize.
7135 * configure: Regenerate.
7136 * config.in: Likewise.
7137 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
7138 (OBS): Add common-remote-fileio.o.
7139 (common-remote-fileio.o): New rule.
7140
9a9df970
PA
71412015-03-09 Pedro Alves <palves@redhat.com>
7142
7143 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
7144 'struct sockaddr' pointer in 'accept' call.
7145
9eb1356e
PA
71462015-03-09 Pedro Alves <palves@redhat.com>
7147
7148 Revert:
7149 2015-03-07 Pedro Alves <palves@redhat.com>
7150 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
7151 or <winsock2.h> here. Instead include "gdb_socket.h".
7152 (remote_open): Use union gdb_sockaddr_u.
7153 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
7154 or <winsock2.h> here. Instead include "gdb_socket.h".
7155 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
7156 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
7157 or <sys/un.h>.
7158 (init_named_socket, gdb_agent_helper_thread): Use union
7159 gdb_sockaddr_u.
7160
aac331e4
PA
71612015-03-07 Pedro Alves <palves@redhat.com>
7162
7163 * configure.ac (build_warnings): Move
7164 -Wdeclaration-after-statement to the C-specific set.
7165 * configure: Regenerate.
7166
366c75fc
PA
71672015-03-07 Pedro Alves <palves@redhat.com>
7168
7169 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
7170 or <winsock2.h> here. Instead include "gdb_socket.h".
7171 (remote_open): Use union gdb_sockaddr_u.
7172 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
7173 or <winsock2.h> here. Instead include "gdb_socket.h".
7174 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
7175 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
7176 or <sys/un.h>.
7177 (init_named_socket, gdb_agent_helper_thread): Use union
7178 gdb_sockaddr_u.
7179
492d29ea
PA
71802015-03-07 Pedro Alves <palves@redhat.com>
7181
7182 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
7183 instead.
7184
60a191ed
YQ
71852015-03-06 Yao Qi <yao.qi@linaro.org>
7186
7187 * linux-aarch64-low.c (aarch64_insert_point): Use
7188 show_debug_regs as a boolean.
7189 (aarch64_remove_point): Likewise.
7190
f5771b1d
PA
71912015-03-05 Pedro Alves <palves@redhat.com>
7192
7193 * lynx-low.c (lynx_target_ops): Install NULL hooks for
7194 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
7195 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
7196 * nto-low.c (nto_target_ops): Likewise.
7197 * spu-low.c (spu_target_ops): Likewise.
7198 * win32-low.c (win32_target_ops): Likewise.
7199
3e572f71
PA
72002015-03-04 Pedro Alves <palves@redhat.com>
7201
72f4393d 7202 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
3e572f71
PA
7203 Decide whether a breakpoint triggered based on the SIGTRAP's
7204 siginfo.si_code.
72f4393d
L
7205 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
7206 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
3e572f71
PA
7207 (linux_low_filter_event): Check for breakpoints before checking
7208 watchpoints.
7209 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
7210 siginfo.si_code.
72f4393d
L
7211 (linux_stopped_by_sw_breakpoint)
7212 (linux_supports_stopped_by_sw_breakpoint)
7213 (linux_stopped_by_hw_breakpoint)
7214 (linux_supports_stopped_by_hw_breakpoint): New functions.
7215 (linux_target_ops): Install new target methods.
3e572f71 7216
1ec68e26
PA
72172015-03-04 Pedro Alves <palves@redhat.com>
7218
7219 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
7220 * server.c (swbreak_feature, hwbreak_feature): New globals.
7221 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
7222 (captured_main): Clear swbreak_feature and hwbreak_feature.
7223 * server.h (swbreak_feature, hwbreak_feature): Declare.
7224 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
7225 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
7226 supports_stopped_by_hw_breakpoint>: New fields.
7227 (target_supports_stopped_by_sw_breakpoint)
7228 (target_stopped_by_sw_breakpoint)
7229 (target_supports_stopped_by_hw_breakpoint)
7230 (target_stopped_by_hw_breakpoint): Declare.
7231
15c66dd6
PA
72322015-03-04 Pedro Alves <palves@redhat.com>
7233
7234 enum lwp_stop_reason -> enum target_stop_reason
7235 * linux-low.c (check_stopped_by_breakpoint): Adjust.
7236 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
7237 (linux_wait_1, stuck_in_jump_pad_callback)
7238 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
7239 (linux_stopped_by_watchpoint):
7240 * linux-low.h (enum lwp_stop_reason): Delete.
7241 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
7242 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
7243
98fc70d6
YQ
72442015-03-04 Yao Qi <yao.qi@linaro.org>
7245
7246 * Makefile.in (SFILES): Add linux-aarch64-low.c.
7247
dd2ac174
GB
72482015-03-03 Gary Benson <gbenson@redhat.com>
7249
7250 * hostio.c (handle_vFile): Fix prefix lengths.
7251
d68e53f4
MM
72522015-03-03 Markus Metzger <markus.t.metzger@intel.com>
7253
7254 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
7255 ptr_bits.
7256
bf2d68ab
AA
72572015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
7258
7259 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
7260 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
7261 (clean): Add "rm -f" for above C files.
7262 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
7263 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
7264 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
7265 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
7266 * linux-s390-low.c (HWCAP_S390_VX): New macro.
7267 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
7268 (init_registers_s390x_vx_linux64)
7269 (init_registers_s390x_tevx_linux64)
7270 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
7271 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
7272 declarations.
7273 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
7274 (s390_store_vxrs_high): New functions.
7275 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
7276 NT_S390_VXRS_HIGH.
7277 (s390_arch_setup): Add logic for selecting one of the new target
7278 descriptions. Activate the new vector regsets if applicable.
7279 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
7280 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
7281 and init_registers_s390x_tevx_linux64.
7282
c966a859
PA
72832015-03-01 Pedro Alves <palves@redhat.com>
7284
7285 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
7286 parameter.
7287
4180215b
PA
72882015-02-27 Pedro Alves <palves@redhat.com>
7289
7290 * linux-x86-low.c (u_debugreg_offset): New function.
7291 (x86_linux_dr_get, x86_linux_dr_set): Use it.
7292
749bab01
PA
72932015-02-27 Pedro Alves <palves@redhat.com>
7294
7295 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
7296 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
7297 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
7298 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
7299 (ps_lsetfpregs, ps_getpid)
7300 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
7301 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
7302 (ps_lsetxregs, ps_plog): Declare.
7303
3c14e5a3
PA
73042015-02-27 Pedro Alves <palves@redhat.com>
7305
7306 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
7307 IP_AGENT_EXPORT_FUNC.
7308 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
7309 IP_AGENT_EXPORT_FUNC.
7310 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
7311 (IP_AGENT_EXPORT): Delete.
7312 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
7313 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
7314 (gdb_trampoline_buffer_error, collecting, gdb_collect)
7315 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
7316 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
7317 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
7318 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
7319 (traceframe_read_count, traceframe_write_count)
7320 (traceframes_created, trace_state_variables, get_raw_reg)
7321 (get_trace_state_variable_value, set_trace_state_variable_value)
7322 (ust_loaded, helper_thread_id, cmd_buf): Use
7323 IPA_SYM_EXPORTED_NAME.
7324 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
7325 (tracepoints) Use IP_AGENT_EXPORT_VAR.
7326 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
7327 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
7328 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
7329 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
7330 EXTERN_C_PUSH/EXTERN_C_POP.
7331 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
7332 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
7333 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
7334 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
7335 (traceframe_write_count, traceframe_read_count)
7336 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
7337 (about_to_request_buffer_space, get_trace_state_variable_value)
7338 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
7339 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
7340 EXTERN_C_PUSH/EXTERN_C_POP.
7341 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
7342 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
7343 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
7344 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
7345 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
7346 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
7347 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
7348 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
7349 Define.
7350 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
7351 (IP_AGENT_EXPORT_VAR_DECL): Define.
7352 (tracing): Declare.
7353 (gdb_agent_get_raw_reg): Declare.
7354
fe978cb0
PA
73552015-02-27 Tom Tromey <tromey@redhat.com>
7356 Pedro Alves <palves@redhat.com>
7357
7358 Rename symbols whose names are reserved C++ keywords throughout.
7359
3bc3d82a
PA
73602015-02-27 Pedro Alves <palves@redhat.com>
7361
7362 * Makefile.in (COMPILER): New, get it from autoconf.
7363 (CXX): Get from autoconf instead.
7364 (COMPILE.pre): Use COMPILER.
7365 (CC-LD): Rename to ...
7366 (CC_LD): ... this. Use COMPILER.
7367 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
7368 (CXX_FOR_TARGET): Default to g++ instead of gcc.
7369 * acinclude.m4: Include build-with-cxx.m4.
7370 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
7371 Disable -Werror by default if building in C++ mode.
7372 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
7373 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
7374 the C++ compiler. Save/restore CXXFLAGS too.
7375 * configure: Regenerate.
7376
07697489
PA
73772015-02-27 Pedro Alves <palves@redhat.com>
7378
7379 * acinclude.m4: Include libiberty.m4.
7380 * configure.ac: Call libiberty_INIT.
7381 * config.in, configure: Regenerate.
7382
9beb7c4e
PA
73832015-02-26 Pedro Alves <palves@redhat.com>
7384
7385 * linux-low.c (linux_wait_1): When incrementing the PC past a
7386 program breakpoint always use the_low_target.breakpoint_len as
7387 increment, rather than the maximum between that and
7388 the_low_target.decr_pc_after_break.
7389
8090aef2
PA
73902015-02-23 Pedro Alves <palves@redhat.com>
7391
7392 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
7393 thread was doing a step-over; always adjust the PC if
7394 we stepped over a permanent breakpoint.
7395 (linux_wait_1): If we stepped over breakpoint that was on top of a
7396 permanent breakpoint, manually advance the PC past it.
7397
bc9540e8
PA
73982015-02-23 Pedro Alves <palves@redhat.com>
7399
7400 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
7401 modes.
7402 (x86_fill_gregset, x86_store_gregset): Use it when handling
7403 $orig_eax.
7404
2db9a427
PA
74052015-02-20 Pedro Alves <palves@redhat.com>
7406
7407 * thread-db.c: Include "nat/linux-procfs.h".
7408 (thread_db_init): Skip listing new threads if the kernel supports
7409 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
7410
afa8d396
PA
74112015-02-20 Pedro Alves <palves@redhat.com>
7412
7413 * linux-low.c (status_pending_p_callback): Use ptid_match.
7414
c9587f88
AT
74152015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
7416
7417 PR breakpoints/16812
7418 * linux-low.c (wstatus_maybe_breakpoint): Remove.
7419 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
7420 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
7421
b05ec7a5
AT
74222015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
7423
7424 PR breakpoints/15956
7425 * tracepoint.c (cmd_qtinit): Add check for current_thread.
7426
d33501a5
MM
74272015-02-09 Markus Metzger <markus.t.metzger@intel.com>
7428
7429 * linux-low.c (linux_low_btrace_conf): Print size.
7430 * server.c (handle_btrace_conf_general_set): New.
7431 (hanle_general_set): Call handle_btrace_conf_general_set.
7432 (handle_query): Report Qbtrace-conf:bts:size as supported.
7433
f4abbc16
MM
74342015-02-09 Markus Metzger <markus.t.metzger@intel.com>
7435
7436 * linux-low.c (linux_low_enable_btrace): Update parameters.
7437 (linux_low_btrace_conf): New.
7438 (linux_target_ops)<to_btrace_conf>: Initialize.
7439 * server.c (current_btrace_conf): New.
7440 (handle_btrace_enable): Rename to ...
7441 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
7442 to target_enable_btrace. Update comment. Update users.
7443 (handle_qxfer_btrace_conf): New.
7444 (qxfer_packets): Add btrace-conf entry.
7445 (handle_query): Report qXfer:btrace-conf:read as supported packet.
7446 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
7447 (target_ops)<read_btrace_conf>: New.
7448 (target_enable_btrace): Update parameters.
7449 (target_read_btrace_conf): New.
7450
043c3577
MM
74512015-02-09 Markus Metzger <markus.t.metzger@intel.com>
7452
7453 * server.c (handle_btrace_general_set): Remove call to
7454 target_supports_btrace.
7455 (supported_btrace_packets): New.
7456 (handle_query): Call supported_btrace_packets.
7457 * target.h: include btrace-common.h.
7458 (btrace_target_info): Removed.
7459 (supports_btrace, target_supports_btrace): Update parameters.
7460
734b0e4b
MM
74612015-02-09 Markus Metzger <markus.t.metzger@intel.com>
7462
7463 * Makefile.in (SFILES): Add common/btrace-common.c.
7464 (OBS): Add common/btrace-common.o.
7465 (btrace-common.o): Add build rules.
7466 * linux-low: Include btrace-common.h.
7467 (linux_low_read_btrace): Use struct btrace_data. Call
7468 btrace_data_init and btrace_data_fini.
7469
d6c146e9
PA
74702015-02-06 Pedro Alves <palves@redhat.com>
7471
7472 * thread-db.c (find_new_threads_callback): Add debug output.
7473
20ba1ce6
PA
74742015-02-04 Pedro Alves <palves@redhat.com>
7475
7476 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
7477 (resume_stopped_resumed_lwps): New function.
7478 (linux_wait_for_event_filtered): Use it.
7479
8cc73a39
SDJ
74802015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
7481
7482 * Makefile.in (SFILES): Add linux-personality.c.
7483 (linux-personality.o): New rule.
7484 * configure.srv (srv_linux_obj): Add linux-personality.o to the
7485 list of objects to be built.
7486 * linux-low.c: Include nat/linux-personality.h.
7487 (linux_create_inferior): Remove code to disable address space
7488 randomization (moved to ../nat/linux-personality.c). Create
7489 cleanup to disable address space randomization.
7490
fb23d554
SDJ
74912015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
7492
7493 * Makefile.in (posix-strerror.o): New rule.
7494 (mingw-strerror.o): Likewise.
7495 * configure: Regenerated.
7496 * configure.ac: Source file ../common/common.host. Initialize new
7497 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
7498
cdf43629
YQ
74992015-01-14 Yao Qi <yao@codesourcery.com>
7500
7501 * Makefile.in (SFILES): Add nat/ppc-linux.c.
7502 (ppc-linux.o): New rule.
7503 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
7504 * configure.ac: AC_CHECK_FUNCS(getauxval).
7505 * config.in: Re-generated.
7506 * configure: Re-generated.
7507 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
7508 ppc64_64bit_inferior_p
7509
514c5338
YQ
75102015-01-14 Yao Qi <yao@codesourcery.com>
7511
7512 * linux-ppc-low.c: Include "nat/ppc-linux.h".
7513 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
7514 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
7515 (PT_ORIG_R3, PT_TRAP): Likewise.
7516 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
7517 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
7518 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
7519
3368c1e5
JB
75202015-01-10 Joel Brobecker <brobecker@adacore.com>
7521
7522 * i387-fp.c (i387_cache_to_xsave): In look over
7523 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
7524 zmmh_low_space field by use of zmmh_high_space.
7525
582511be
PA
75262015-01-09 Pedro Alves <palves@redhat.com>
7527
7528 * linux-low.c (step_over_bkpt): Move higher up in the file.
7529 (handle_extended_wait): Don't store the stop_pc here.
7530 (get_stop_pc): Adjust comments and rename to ...
7531 (check_stopped_by_breakpoint): ... this. Record whether the LWP
7532 stopped for a software breakpoint or hardware breakpoint.
7533 (thread_still_has_status_pending_p): New function.
7534 (status_pending_p_callback): Use
7535 thread_still_has_status_pending_p. If the event is no longer
7536 interesting, resume the LWP.
7537 (handle_tracepoints): Add assert.
7538 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
7539 (wstatus_maybe_breakpoint): New function.
7540 (cancel_breakpoint): Delete function.
7541 (check_stopped_by_watchpoint): New function, factored out from
7542 linux_low_filter_event.
7543 (lp_status_maybe_breakpoint): Delete function.
7544 (linux_low_filter_event): Remove filter_ptid argument.
7545 Leave thread group exits pending here. Store the LWP's stop PC.
7546 Always leave events pending.
7547 (linux_wait_for_event_filtered): Pull all events out of the
7548 kernel, and leave them all pending.
7549 (count_events_callback, select_event_lwp_callback): Consider all
7550 events.
7551 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
7552 (select_event_lwp): Only give preference to the stepping LWP in
7553 all-stop mode. Adjust comments.
7554 (ignore_event): New function.
7555 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
7556 references to cancel_breakpoints. Adjust to renames. Also give
7557 equal priority to all LWPs that have had events in non-stop mode.
7558 If reporting a software breakpoint event, unadjust the LWP's PC.
7559 (linux_wait): If linux_wait_1 returned an ignored event, retry.
7560 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
7561 Adjust.
7562 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
7563 (resume_status_pending_p): Use thread_still_has_status_pending_p.
7564 (linux_stopped_by_watchpoint): Adjust.
7565 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
7566 * linux-low.h (enum lwp_stop_reason): New.
7567 (struct lwp_info) <stop_pc>: Adjust comment.
7568 <stopped_by_watchpoint>: Delete field.
7569 <stop_reason>: New field.
7570 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
7571 * mem-break.c (software_breakpoint_inserted_here)
7572 (hardware_breakpoint_inserted_here): New function.
7573 * mem-break.h (software_breakpoint_inserted_here)
7574 (hardware_breakpoint_inserted_here): Declare.
7575 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
7576 (cancel_breakpoints): Delete.
7577 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
7578 (upload_fast_traceframes): Remove references to
7579 cancel_breakpoints.
7580
a33e3959
PA
75812015-01-09 Pedro Alves <palves@redhat.com>
7582
7583 * thread-db.c (find_new_threads_callback): Ignore thread if the
7584 kernel thread ID is -1.
7585
8784d563
PA
75862015-01-09 Pedro Alves <palves@redhat.com>
7587
7588 * linux-low.c (linux_attach_fail_reason_string): Move to
7589 nat/linux-ptrace.c, and rename.
7590 (linux_attach_lwp): Update comment.
7591 (attach_proc_task_lwp_callback): New function.
7592 (linux_attach): Adjust to rename and use
7593 linux_proc_attach_tgid_threads.
7594 (linux_attach_fail_reason_string): Delete declaration.
7595
76f2b779
JB
75962015-01-01 Joel Brobecker <brobecker@adacore.com>
7597
7598 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
7599 * server.c (gdbserver_version): Likewise.
7600
fafcc06a
SDJ
76012014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
7602
7603 * remote-utils.c: Include ctype.h.
7604 (input_interrupt): Explicitly handle the case when the char
7605 received is the NUL byte. Improve the printing of non-ASCII
7606 characters.
7607
beed38b8
JB
76082014-12-16 Joel Brobecker <brobecker@adacore.com>
7609
7610 * linux-low.c (linux_low_filter_event): Update call to
7611 linux_enable_event_reporting following the addition of
7612 a new parameter to that function.
7613
bf330350
CU
76142014-12-16 Catalin Udma <catalin.udma@freescale.com>
7615
7616 PR server/17457
7617 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
7618 (AARCH64_FPCR_REGNO): Likewise.
7619 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
7620 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
7621 (aarch64_store_fpregset): Likewise.
7622
5227d625
JB
76232014-12-15 Joel Brobecker <brobecker@adacore.com>
7624
7625 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
7626 Remove FIXME comment about assumption about N.
7627
f93b65a0
JB
76282014-12-13 Joel Brobecker <brobecker@adacore.com>
7629
7630 * configure.ac: If large-file support is disabled in GDBserver,
7631 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
7632 * configure: Regenerate.
7633
e5a9158d
AA
76342014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7635
7636 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
7637 warning upon ENODATA from ptrace.
7638 * linux-s390-low.c (s390_store_tdb): New.
7639 (s390_regsets): Add regset for NT_S390_TDB.
7640
feea5f36
AA
76412014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7642
7643 * linux-low.c (regsets_store_inferior_registers): Skip regsets
7644 without a fill_function.
7645 * linux-s390-low.c (s390_fill_last_break): Remove.
7646 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
7647 (s390_arch_setup): Use regset's size instead of fill_function for
7648 loop end condition.
7649
098dbe61
AA
76502014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7651
7652 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
7653 the regset's store function when ptrace returned an error.
7654 * regcache.c (get_thread_regcache): Invalidate register cache
7655 before fetching inferior's registers.
7656
28eef672
AA
76572014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7658
7659 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
7660 while-loop as for-loop.
7661 (regsets_store_inferior_registers): Likewise.
7662
bdca27a2
YQ
76632014-11-28 Yao Qi <yao@codesourcery.com>
7664
7665 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
7666 * config.in, configure: Re-generate.
7667 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
7668 is defined.
7669
9c232dda
YQ
76702014-11-21 Yao Qi <yao@codesourcery.com>
7671
7672 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
7673 (AC_CHECK_HEADERS): Remove malloc.h.
7674 * configure: Re-generated.
7675 * config.in: Re-generated.
7676 * server.h: Don't include alloca.h and malloc.h.
7677 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
7678 Don't include malloc.h.
7679
43968415
JB
76802014-11-17 Joel Brobecker <brobecker@adacore.com>
7681
7682 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
7683 corresponding ERRNO check in same block.
7684
40e91bc7
PA
76852014-11-12 Pedro Alves <palves@redhat.com>
7686
7687 * server.c (cont_thread): Update comment.
7688 (start_inferior, attach_inferior): No longer clear cont_thread.
7689 (handle_v_cont): No longer set cont_thread.
7690 (captured_main): Clear cont_thread each time a GDB connects.
7691
c2c118cf
PA
76922014-11-12 Pedro Alves <palves@redhat.com>
7693
7694 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
7695 thread, and don't resume all threads if the Hc thread has exited.
7696
78708b7c
PA
76972014-11-12 Pedro Alves <palves@redhat.com>
7698
7699 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
7700 the process group instead of to a specific LWP.
7701
a2abc7de
PA
77022014-10-15 Pedro Alves <palves@redhat.com>
7703
7704 PR server/17487
7705 * win32-arm-low.c (arm_set_thread_context): Remove current_event
7706 parameter.
7707 (arm_set_thread_context): Delete.
7708 (the_low_target): Adjust.
7709 * win32-i386-low.c (debug_registers_changed)
7710 (debug_registers_used): Delete.
7711 (update_debug_registers_callback): New function.
7712 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
7713 needing to update their debug registers.
7714 (win32_get_current_dr): New function.
7715 (x86_dr_low_get_addr, x86_dr_low_get_control)
7716 (x86_dr_low_get_status): Fetch the debug register from the thread
7717 record's context.
7718 (i386_initial_stuff): Adjust.
7719 (i386_get_thread_context): Remove current_event parameter. Don't
7720 clear debug_registers_changed nor copy DR values to
7721 debug_reg_state.
7722 (i386_set_thread_context): Delete.
7723 (i386_prepare_to_resume): New function.
7724 (i386_thread_added): Mark the thread as needing to update irs
7725 debug registers.
7726 (the_low_target): Remove i386_set_thread_context and install
7727 i386_prepare_to_resume.
7728 * win32-low.c (win32_get_thread_context): Adjust.
7729 (win32_set_thread_context): Use SetThreadContext
7730 directly.
7731 (win32_prepare_to_resume): New function.
7732 (win32_require_context): New function, factored out from ...
7733 (thread_rec): ... this.
7734 (continue_one_thread): Call win32_prepare_to_resume on each thread
7735 we're about to continue.
7736 (win32_resume): Call win32_prepare_to_resume on the event thread.
7737 * win32-low.h (struct win32_thread_info)
7738 <debug_registers_changed>: New field.
7739 (struct win32_target_ops): Change prototype of set_thread_context,
7740 delete set_thread_context and add prepare_to_resume.
7741 (win32_require_context): New declaration.
7742
a442d071
GB
77432014-10-08 Gary Benson <gbenson@redhat.com>
7744
7745 * server.h: Do not include common-exceptions.h.
7746
6f1947e8
GB
77472014-10-08 Gary Benson <gbenson@redhat.com>
7748
7749 * server.h: Do not include cleanups.h.
7750
63b434a4
JH
77512014-09-30 James Hogan <james.hogan@imgtec.com>
7752
7753 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
7754 mips64-dsp-linux.c.
7755
c4d9ceb6
YQ
77562014-09-23 Yao Qi <yao@codesourcery.com>
7757
7758 * linux-low.c (lp_status_maybe_breakpoint): New function.
7759 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
7760 (count_events_callback): Likewise.
7761 (select_event_lwp_callback): Likewise.
7762 (cancel_breakpoints_callback): Likewise.
7763
89a5711c
DB
77642014-09-19 Don Breazeal <donb@codesourcery.com>
7765
7766 * linux-low.c (handle_extended_wait): Call
7767 linux_ptrace_get_extended_event.
7768 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
7769 linux_is_extended_waitstatus.
7770
bffc0964
JB
77712014-09-16 Joel Brobecker <brobecker@adacore.com>
7772
7773 * Makefile.in (CPPFLAGS): Define.
7774 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
7775 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
7776
0bfdf32f
GB
77772014-09-16 Gary Benson <gbenson@redhat.com>
7778
7779 * inferiors.h (current_inferior): Renamed as...
7780 (current_thread): New variable. All uses updated.
7781 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
7782 (maybe_move_out_of_jump_pad): Likewise.
7783 (cancel_breakpoint): Likewise.
7784 (linux_low_filter_event): Likewise.
7785 (wait_for_sigstop): Likewise.
7786 (linux_resume_one_lwp): Likewise.
7787 (need_step_over_p): Likewise.
7788 (start_step_over): Likewise.
7789 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
7790 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
7791 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
7792 and save_inferior as saved_thread.
7793 * regcache.c (get_thread_regcache): Renamed saved_inferior as
7794 saved_thread.
7795 (regcache_invalidate_thread): Likewise.
7796 * remote-utils.c (prepare_resume_reply): Likewise.
7797 * thread-db.c (thread_db_get_tls_address): Likewise.
7798 (disable_thread_event_reporting): Likewise.
7799 (remove_thread_event_breakpoints): Likewise.
7800 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
7801 as saved_thread.
7802 * target.h (set_desired_inferior): Renamed as...
7803 (set_desired_thread): New declaration. All uses updated.
7804 * server.c (myresume): Updated comment to reference thread instead
7805 of inferior.
7806 (handle_serial_event): Likewise.
7807 (handle_target_event): Likewise.
7808
361c8ade
GB
78092014-09-12 Tom Tromey <tromey@redhat.com>
7810 Gary Benson <gbenson@redhat.com>
7811
7812 * regcache.h: Include common-regcache.h.
7813 (regcache_read_pc): Don't declare.
7814 * regcache.c (get_thread_regcache_for_ptid): New function.
7815
bd9269f7
GB
78162014-09-11 Tom Tromey <tromey@redhat.com>
7817 Gary Benson <gbenson@redhat.com>
7818
7819 * symbol.c: New file.
7820 * Makefile.in (SFILES): Add symbol.c.
7821 (OBS): Add symbol.o.
7822
f8c1d06b
GB
78232014-09-11 Gary Benson <gbenson@redhat.com>
7824
7825 * target.c (target_stop_ptid, target_continue_ptid): New
7826 functions.
7827
721ec300
GB
78282014-09-11 Tom Tromey <tromey@redhat.com>
7829 Gary Benson <gbenson@redhat.com>
7830
7831 * target.h: Include target/target.h.
7832 * target.c (target_read_memory, target_read_uint32)
7833 (target_write_memory): New functions.
7834
c5e92cca
GB
78352014-09-11 Gary Benson <gbenson@redhat.com>
7836
7837 * server.h (debug_hw_points): Don't declare.
7838 * server.c (debug_hw_points): Don't define. Replace all uses
7839 with show_debug_regs.
7840 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
7841 all uses with show_debug_regs.
7842
2e4bb98a
EBM
78432014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
7844
7845 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
7846 endianness into account.
7847 (ppc_supply_ptrace_register): Likewise.
7848
ac740bc7
JH
78492014-09-03 James Hogan <james.hogan@imgtec.com>
7850
7851 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
7852 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
7853
97ea6506
GB
78542014-09-03 Gary Benson <gbenson@redhat.com>
7855
7856 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
7857 ALL_DEBUG_ADDRESS_REGISTERS.
7858
df7e5265
GB
78592014-09-02 Gary Benson <gbenson@redhat.com>
7860
7861 * i386-low.h: Renamed as...
7862 * x86-low.h: New file. All type, function and variable name
7863 prefixes changed from "i386_" to "x86_". All references updated.
7864 * i386-low.c: Renamed as...
7865 * x86-low.c: New file. All type, function and variable name
7866 prefixes changed from "i386_" to "x86_". All references updated.
7867
ed859da7
GB
78682014-09-02 Gary Benson <gbenson@redhat.com>
7869
7870 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
7871 (x86_linux_new_thread): Likewise.
7872
860789c7
GB
78732014-08-29 Gary Benson <gbenson@redhat.com>
7874
7875 * server.h (setjmp.h): Do not include.
7876 (toplevel): Do not declare.
7877 (common-exceptions.h): Include.
7878 (cleanups.h): Likewise.
7879 * server.c (toplevel): Do not define.
7880 (exit_code): New static global.
7881 (detach_or_kill_for_exit_cleanup): New function.
7882 (main): New function. Original main renamed to...
7883 (captured_main): New function.
7884 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
7885
ff55e1b5
GB
78862014-08-29 Gary Benson <gbenson@redhat.com>
7887
7888 * Makefile.in (SFILES): Add common/common-exceptions.c.
7889 (OBS): Add common-exceptions.o.
7890 (common-exceptions.o): New rule.
7891 * utils.c (prepare_to_throw_exception): New function.
7892
e9bcb658
GB
78932014-08-29 Gary Benson <gbenson@redhat.com>
7894
7895 * config.in: Regenerate.
7896 * configure: Likewise.
7897
e3180625
GB
78982014-08-29 Gary Benson <gbenson@redhat.com>
7899
7900 * Makefile.in (SFILES): Add common/cleanups.c.
7901 (OBS): cleanups.o.
7902 (cleanups.o): New rule.
7903
e3d6ba5d
GB
79042014-08-29 Gary Benson <gbenson@redhat.com>
7905
7906 * utils.c (internal_vwarning): New function.
7907
7096e886
GB
79082014-08-28 Gary Benson <gbenson@redhat.com>
7909
7910 * utils.h (fatal): Remove declaration.
7911 * utils.c (fatal): Remove function.
7912
14ce3192
GB
79132014-08-28 Gary Benson <gbenson@redhat.com>
7914
7915 * tracepoint.c (gdb_agent_init): Replace fatal with
7916 perror_with_name.
7917 (initialize_tracepoint): Likewise.
7918
50278d59
GB
79192014-08-28 Gary Benson <gbenson@redhat.com>
7920
7921 * remote-utils.c (remote_prepare): Replace fatal with error.
7922
aa96c426
GB
79232014-08-28 Gary Benson <gbenson@redhat.com>
7924
7925 * linux-low.c (linux_async): Replace fatal with warning.
7926 Tidy up and return.
7927 (linux_start_non_stop): Return -1 if linux_async failed.
7928
f7160e97
GB
79292014-08-28 Gary Benson <gbenson@redhat.com>
7930
7931 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
7932 gdb_assert.
7933 (i386_dr_low_get_addr): Remove vague comment.
7934 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
7935 gdb_assert.
7936
38e08fca
GB
79372014-08-28 Gary Benson <gbenson@redhat.com>
7938
7939 * inferiors.c (get_thread_process): Replace check with gdb_assert.
7940 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
7941 internal_error.
7942 (linux_resume_one_lwp): Likewise.
7943 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
7944 gdb_assert.
7945 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
7946 with internal_error.
7947 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
7948 (init_register_cache): Replace fatal with gdb_assert_not_reached.
7949 (find_register_by_name): Replace fatal with internal_error.
7950 (find_regno): Likewise.
7951 * tdesc.c (init_target_desc): Replace check with gdb_assert.
7952 * thread-db.c (thread_db_create_event): Likewise.
7953 (thread_db_load_search): Likewise.
7954 (try_thread_db_load_1): Likewise.
7955 * tracepoint.c (get_jump_space_head): Replace fatal with
7956 internal_error.
7957 (claim_trampoline_space): Likewise.
7958 (have_fast_tracepoint_trampoline_buffer): Likewise.
7959 (cmd_qtstart): Likewise.
7960 (stop_tracing): Likewise.
7961 (fast_tracepoint_collecting): Likewise.
7962 (target_malloc): Likewise.
7963 (download_tracepoint): Likewise.
7964 (download_trace_state_variables): Replace check with gdb_assert.
7965 (upload_fast_traceframes): Replace fatal with internal_error.
7966
34abf635
GB
79672014-08-19 Tom Tromey <tromey@redhat.com>
7968 Gary Benson <gbenson@redhat.com>
7969
7970 * Makefile.in (SFILES): Add common/common-debug.c.
7971 (OBS): Add common-debug.o.
7972 (common-debug.o): New rule.
7973 * debug.h (debug_printf): Don't declare.
7974 * debug.c (debug_printf): Renamed and rewritten as...
7975 (debug_vprintf): New function.
7976
f6e94d78
GB
79772014-08-19 Gary Benson <gbenson@redhat.com>
7978
7979 * utils.h: Do not include print-utils.h.
7980
9239eeab
GB
79812014-08-19 Tom Tromey <tromey@redhat.com>
7982 Gary Benson <gbenson@redhat.com>
7983
7984 * server.h: Add static assertion.
7985 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
7986
ef87c8bb
GB
79872014-08-19 Tom Tromey <tromey@redhat.com>
7988 Gary Benson <gbenson@redhat.com>
7989
7990 * Makefile.in (SFILES): Add common/errors.c.
7991 (OBS): Add errors.o.
7992 (IPA_OBS): Add errors-ipa.o.
7993 (errors.o): New rule.
7994 (errors-ipa.o): Likewise.
7995 * utils.h (perror_with_name, error, warning): Don't declare.
7996 * utils.c (warning): Renamed and rewritten as...
7997 (vwarning): New function.
7998 (error): Renamed and rewritten as...
7999 (verror): New function.
8000 (internal_error): Renamed and rewritten as...
8001 (internal_verror): New function.
8002
bb974a24
GB
80032014-08-07 Gary Benson <gbenson@redhat.com>
8004
8005 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
8006 * configure: Regenerate.
8007 * config.in: Likewise.
8008 * server.h: Do not include errno.h.
8009 * event-loop.c: Likewise.
8010 * hostio-errno.c: Likewise.
8011 * linux-low.c: Likewise.
8012 * remote-utils.c: Likewise.
8013 * spu-low.c: Likewise.
8014 * utils.c: Likewise.
8015 * gdbreplay.c: Unconditionally include errno.h.
8016
6d3d12eb
GB
80172014-08-07 Gary Benson <gbenson@redhat.com>
8018
8019 * server.h: Do not include string.h.
8020 * event-loop.c: Likewise.
8021 * linux-low.c: Likewise.
8022 * regcache.c: Likewise.
8023 * remote-utils.c: Likewise.
8024 * spu-low.c: Likewise.
8025 * utils.c: Likewise.
8026
dccbb609
GB
80272014-08-07 Gary Benson <gbenson@redhat.com>
8028
8029 * server.h: Do not include gdb_assert.h.
8030
e76df0d0
GB
80312014-08-07 Gary Benson <gbenson@redhat.com>
8032
8033 * server.h: Do not include common-utils.h.
8034
4cb9c816
GB
80352014-08-07 Gary Benson <gbenson@redhat.com>
8036
8037 * server.h: Do not include ptid.h.
8038 * notif.h: Likewise.
8039
3995eeee
GB
80402014-08-07 Gary Benson <gbenson@redhat.com>
8041
8042 * server.h: Do not include gdb_locale.h.
8043
cb9f1a9b
GB
80442014-08-07 Gary Benson <gbenson@redhat.com>
8045
8046 * server.h: Do not include gdb/signals.h.
8047 * win32-low.c: Likewise.
8048
a5fceff8
GB
80492014-08-07 Gary Benson <gbenson@redhat.com>
8050
8051 * server.h: Do not include pathmax.h.
8052
b9391142
GB
80532014-08-07 Gary Benson <gbenson@redhat.com>
8054
8055 * server.h: Do not include libiberty.h.
8056 * linux-bfin-low.c: Likewise.
8057
0e443c87
GB
80582014-08-07 Gary Benson <gbenson@redhat.com>
8059
8060 * server.h: Do not include ansidecl.h.
8061
8ebb3f56
GB
80622014-08-07 Gary Benson <gbenson@redhat.com>
8063
8064 * linux-x86-low.c: Do not include stddef.h.
8065 * lynx-ppc-low.c: Likewise.
8066 * tracepoint.c: Likewise.
8067
8980bdf6
GB
80682014-08-07 Gary Benson <gbenson@redhat.com>
8069
8070 * server.h: Do not include stdarg.h.
8071 * nto-low.c: Likewise.
8072
d7096f71
GB
80732014-08-07 Gary Benson <gbenson@redhat.com>
8074
8075 * server.h: Do not include stdlib.h.
8076 * inferiors.c: Likewise.
8077 * linux-low.c: Likewise.
8078 * regcache.c: Likewise.
8079 * spu-low.c: Likewise.
8080 * tracepoint.c: Likewise.
8081 * utils.c: Likewise.
8082
d02f550d
GB
80832014-08-07 Gary Benson <gbenson@redhat.com>
8084
8085 * server.h: Do not include stdio.h.
8086 * linux-low.c: Likewise.
8087 * remote-utils.c: Likewise.
8088 * spu-low.c: Likewise.
8089 * utils.c: Likewise.
8090 * wincecompat.c: Likewise.
8091
87f6c4e3
GB
80922014-08-06 Gary Benson <gbenson@redhat.com>
8093
8094 * regcache.c (init_register_cache): Move conditionals inside if.
8095
7089dca4
GB
80962014-08-06 Gary Benson <gbenson@redhat.com>
8097
8098 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
8099
462f517e
GB
81002014-07-31 Gary Benson <gbenson@redhat.com>
8101
8102 * ax.h: Do not include server.h.
8103 * gdbthread.h: Likewise.
8104 * lynx-low.h: Likewise.
8105 * notif.h: Likewise.
8106
976411d6
GB
81072014-07-30 Gary Benson <gbenson@redhat.com>
8108
8109 * server.h: Include common-defs.h.
8110 Do not include config.h or build-gnulib-gdbserver/config.h.
8111
d41f6d8e
GB
81122014-07-30 Gary Benson <gbenson@redhat.com>
8113
8114 * hostio-errno.c: Move server.h to top of includes list.
8115 * inferiors.c: Likewise.
8116 * linux-x86-low.c: Likewise.
8117 * notif.c: Include server.h.
8118
314c6a35
TT
81192014-07-24 Tom Tromey <tromey@redhat.com>
8120 Gary Benson <gbenson@redhat.com>
8121
8122 * server.h (CORE_ADDR): Now unsigned.
8123
69ff6be5
PA
81242014-07-16 Pedro Alves <palves@redhat.com>
8125
8126 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
8127
ce9e3fe7
PA
81282014-07-15 Pedro Alves <palves@redhat.com>
8129
8130 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
8131 copy.
8132
e76126e8
PA
81332014-07-11 Pedro Alves <palves@redhat.com>
8134
8135 * linux-low.c (kill_wait_lwp): New function, based on
8136 kill_one_lwp_callback, but use my_waitpid directly.
8137 (kill_one_lwp_callback, linux_kill): Use it.
8138
8e9db26e
PA
81392014-06-23 Pedro Alves <palves@redhat.com>
8140
8141 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
8142 before setting DR0..DR3.
8143
698b3e08
GB
81442014-06-20 Gary Benson <gbenson@redhat.com>
8145
8146 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
8147 * configure: Regenerated.
8148 * config.in: Likewise.
8149
125f8a3d
GB
81502014-06-20 Gary Benson <gbenson@redhat.com>
8151
8152 * Makefile.in (SFILES): Update locations for files moved
8153 from common to nat.
8154 (object file files): Reordered.
8155
42995dbd
GB
81562014-06-20 Gary Benson <gbenson@redhat.com>
8157
8158 * i386-low.h (i386_dr_low_can_set_addr): Removed.
8159 (i386_dr_low_set_addr): Likewise.
8160 (i386_dr_low_get_addr): Likewise.
8161 (i386_dr_low_can_set_control): Likewise.
8162 (i386_dr_low_set_control): Likewise.
8163 (i386_dr_low_get_control): Likewise.
8164 (i386_dr_low_get_status): Likewise.
8165 (i386_get_debug_register_length): Likewise.
8166 * linux-x86-low.c (i386_dr_low_set_addr):
8167 Changed signature. Made static.
8168 (i386_dr_low_get_addr): Likewise.
8169 (i386_dr_low_set_control): Likewise.
8170 (i386_dr_low_get_control): Likewise.
8171 (i386_dr_low_get_status): Likewise.
8172 (i386_dr_low): New global variable.
8173 * win32-i386-low.c (i386_dr_low_set_addr):
8174 Changed signature. Made static.
8175 (i386_dr_low_get_addr): Likewise.
8176 (i386_dr_low_set_control): Likewise.
8177 (i386_dr_low_get_control): Likewise.
8178 (i386_dr_low_get_status): Likewise.
8179 (i386_dr_low): New global variable.
8180
e1d2394b
MS
81812014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
8182
8183 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
8184 * Makefile.in (AR, AR_FLAGS): Define.
8185 * configure: Regenerate.
8186
3a8ee006
GB
81872014-06-19 Gary Benson <gbenson@redhat.com>
8188
8189 * Makefile.in (i386-dregs.o): New rule.
8190 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
8191 * i386-low.c (target.h): Remove include.
8192 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
8193 (DR_CONTROL_SHIFT): Likewise.
8194 (DR_CONTROL_SIZE): Likewise.
8195 (DR_RW_EXECUTE): Likewise.
8196 (DR_RW_WRITE): Likewise.
8197 (DR_RW_READ): Likewise.
8198 (DR_RW_IORW): Likewise.
8199 (DR_LEN_1): Likewise.
8200 (DR_LEN_2): Likewise.
8201 (DR_LEN_4): Likewise.
8202 (DR_LEN_8): Likewise.
8203 (DR_LOCAL_ENABLE_SHIFT): Likewise.
8204 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
8205 (DR_ENABLE_SIZE): Likewise.
8206 (DR_LOCAL_SLOWDOWN): Likewise.
8207 (DR_GLOBAL_SLOWDOWN): Likewise.
8208 (DR_CONTROL_RESERVED): Likewise.
8209 (I386_DR_CONTROL_MASK): Likewise.
8210 (I386_DR_VACANT): Likewise.
8211 (I386_DR_LOCAL_ENABLE): Likewise.
8212 (I386_DR_GLOBAL_ENABLE): Likewise.
8213 (I386_DR_DISABLE): Likewise.
8214 (I386_DR_SET_RW_LEN): Likewise.
8215 (I386_DR_GET_RW_LEN): Likewise.
8216 (I386_DR_WATCH_HIT): Likewise.
8217 (i386_wp_op_t): Likewise.
8218 (i386_show_dr): Likewise.
8219 (i386_length_and_rw_bits): Likewise.
8220 (i386_insert_aligned_watchpoint): Likewise.
8221 (i386_remove_aligned_watchpoint): Likewise.
8222 (i386_handle_nonaligned_watchpoint): Likewise.
8223 i386_update_inferior_debug_regs(): Likewise.
8224 (i386_dr_insert_watchpoint): Likewise.
8225 (i386_dr_remove_watchpoint): Likewise.
8226 (i386_dr_region_ok_for_watchpoint): Likewise.
8227 (i386_dr_stopped_data_address): Likewise.
8228 (i386_dr_stopped_by_watchpoint): Likewise.
8229
8f26655c
GB
82302014-06-19 Gary Benson <gbenson@redhat.com>
8231
8232 * i386-low.c (i386_dr_show): Renamed to
8233 i386_show_dr and made static. All uses updated.
8234 (i386_dr_length_and_rw_bits): Renamed to
8235 i386_length_and_rw_bits and made static.
8236 All uses updated.
8237 (i386_dr_insert_aligned_watchpoint): Renamed to
8238 i386_insert_aligned_watchpoint and made static.
8239 All uses updated.
8240 (i386_dr_remove_aligned_watchpoint): Renamed to
8241 i386_remove_aligned_watchpoint and made static.
8242 All uses updated.
8243 (i386_dr_update_inferior_debug_regs): Renamed to
8244 i386_update_inferior_debug_regs and made static.
8245 All uses updated.
8246
b9228891
GB
82472014-06-18 Gary Benson <gbenson@redhat.com>
8248
5171def3
GB
8249 * i386-low.h (i386_dr_low_can_set_addr): New macro.
8250 (i386_dr_low_can_set_control): Likewise.
8251 (i386_get_debug_register_length): Likewise.
8252 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
8253 (i386_dr_low_can_set_control): Likewise.
8254 (i386_get_debug_register_length): Likewise.
8255
82562014-06-17 Gary Benson <gbenson@redhat.com>
8257
b9228891
GB
8258 * i386-low.h (i386-dregs.h): New include.
8259 (DR_FIRSTADDR): Now in i386-dregs.h.
8260 (DR_LASTADDR): Likewise.
8261 (DR_NADDR): Likewise.
8262 (DR_STATUS): Likewise.
8263 (DR_CONTROL): Likewise.
8264 (i386_debug_reg_state): Likewise.
8265 (i386_dr_insert_watchpoint): Likewise.
8266 (i386_dr_remove_watchpoint): Likewise.
8267 (i386_dr_region_ok_for_watchpoint): Likewise.
8268 (i386_dr_stopped_data_address): Likewise.
8269 (i386_dr_stopped_by_watchpoint): Likewise.
8270 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
8271
4be83cc2
GB
82722014-06-18 Gary Benson <gbenson@redhat.com>
8273
8274 * i386-low.h (i386_low_insert_watchpoint): Renamed to
8275 i386_dr_insert_watchpoint.
8276 (i386_low_remove_watchpoint): Renamed to
8277 i386_dr_remove_watchpoint.
8278 (i386_low_region_ok_for_watchpoint): Renamed to
8279 i386_dr_region_ok_for_watchpoint.
8280 (i386_low_stopped_data_address): Renamed to
8281 i386_dr_stopped_data_address.
8282 (i386_low_stopped_by_watchpoint): Renamed to
8283 i386_dr_stopped_by_watchpoint.
8284 * i386-low.c (i386_show_dr): Renamed to
8285 i386_dr_show and made nonstatic. All uses updated.
8286 (i386_length_and_rw_bits): Renamed to
8287 i386_dr_length_and_rw_bits and made nonstatic.
8288 All uses updated.
8289 (i386_insert_aligned_watchpoint): Renamed to
8290 i386_dr_insert_aligned_watchpoint and made nonstatic.
8291 All uses updated.
8292 (i386_remove_aligned_watchpoint): Renamed to
8293 i386_dr_remove_aligned_watchpoint and made nonstatic.
8294 All uses updated.
8295 (i386_update_inferior_debug_regs): Renamed to
8296 i386_dr_update_inferior_debug_regs and made nonstatic.
8297 All uses updated.
8298 (i386_low_insert_watchpoint): Renamed to
8299 i386_dr_insert_watchpoint. All uses updated.
8300 (i386_low_remove_watchpoint): Renamed to
8301 i386_dr_remove_watchpoint. All uses updated.
8302 (i386_low_region_ok_for_watchpoint): Renamed to
8303 i386_dr_region_ok_for_watchpoint. All uses updated.
8304 (i386_low_stopped_data_address): Renamed to
8305 i386_dr_stopped_data_address. All uses updated.
8306 (i386_low_stopped_by_watchpoint): Renamed to
8307 i386_dr_stopped_by_watchpoint. All uses updated.
8308
131aa0d4
GB
83092014-06-18 Gary Benson <gbenson@redhat.com>
8310
8311 * i386-low.c (i386_dr_low_can_set_addr): New macro.
8312 (i386_dr_low_can_set_control): Likewise.
8313 (i386_insert_aligned_watchpoint): New check.
8314
d9305f7f
GB
83152014-06-18 Gary Benson <gbenson@redhat.com>
8316
8317 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
8318 Renamed to state.
8319
e927c9fc
GB
83202014-06-18 Gary Benson <gbenson@redhat.com>
8321
8322 * i386-low.c (i386_length_and_rw_bits): Use internal_error
8323 instead of fatal and error.
8324 (i386_handle_nonaligned_watchpoint): Likewise.
8325
1b6d4134
GB
83262014-06-18 Gary Benson <gbenson@redhat.com>
8327
8328 * i386-low.c (i386_get_debug_register_length): New macro.
8329 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
8330 (i386_show_dr): Use debug_printf instead of fprintf. Use
8331 phex to format values.
8332
6e62758f
GB
83332014-06-18 Gary Benson <gbenson@redhat.com>
8334
8335 * i386-low.h: Comment changes.
8336 * i386-low.c: Likewise.
8337
fc6e2f03
GB
83382014-06-18 Gary Benson <gbenson@redhat.com>
8339
8340 * i386-low.c: Whitespace changes.
8341
f9d1eeed
TT
83422014-06-12 Tom Tromey <tromey@redhat.com>
8343
8344 * utils.c (freeargv): Remove.
8345
0b04e523
TT
83462014-06-12 Tom Tromey <tromey@redhat.com>
8347
8348 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
8349 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
8350 (parse_debug_format_options): Likewise.
8351 (gdbserver_usage): Likewise.
8352 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
8353 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
8354 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
8355 against libiberty.
8356 ($(LIBGNU)): Depend on libiberty.
8357 (all-lib): Recurse into all subdirs.
8358 (install-only): Invoke "install" target in subdirs.
8359 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
8360 targets.
8361 * configure: Rebuild.
8362 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
8363 for vasprintf, vsnprintf, or gettimeofday.
8364 * configure.srv: Don't add safe-ctype.o or lbasename.o to
8365 srv_tgtobj.
8366
270c9937
JB
83672014-06-05 Joel Brobecker <brobecker@adacore.com>
8368
8369 * development.sh: Delete.
8370 * Makefile.in (config.status): Adjust dependency on development.sh.
8371 * configure.ac: Adjust development.sh source call.
8372 * configure: Regenerate.
8373
0a261ed8
PA
83742014-06-02 Pedro Alves <palves@redhat.com>
8375
8376 * ax.c (gdb_free_agent_expr): New function.
8377 * ax.h (gdb_free_agent_expr): New declaration.
8378 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
8379 list.
8380 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
8381 static.
8382 (clear_breakpoint_conditions_and_commands): New function.
8383 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
8384 (clear_breakpoint_conditions_and_commands): New declaration.
8385
e9dae05e
RR
83862014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
8387
8388 * linux-aarch64-low.c (asm/ptrace.h): Include.
8389
5876f503
JK
83902014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
8391
8392 Fix TLS access for -static -pthread.
8393 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
8394 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
8395 (thread_db_load_search, try_thread_db_load_1): Initialize it.
8396
802e8e6d
PA
83972014-05-20 Pedro Alves <palves@redhat.com>
8398
8399 * linux-aarch64-low.c (aarch64_insert_point)
8400 (aarch64_remove_point): No longer check whether the type is
8401 supported here. Adjust to new interface.
8402 (the_low_target): Install aarch64_supports_z_point_type as
8403 supports_z_point_type method.
8404 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
8405 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
8406 instead of a Z packet char. Adjust.
8407 (arm_supports_z_point_type): New function.
8408 (arm_insert_point, arm_remove_point): Adjust to new interface.
8409 (the_low_target): Install arm_supports_z_point_type.
8410 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
8411 (cris_insert_point, cris_remove_point): Adjust to new interface.
8412 Don't check whether the type is supported here.
8413 (the_low_target): Install cris_supports_z_point_type.
8414 * linux-low.c (linux_supports_z_point_type): New function.
8415 (linux_insert_point, linux_remove_point): Adjust to new interface.
8416 * linux-low.h (struct linux_target_ops) <insert_point,
8417 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
8418 raw_breakpoint pointer parameter.
8419 <supports_z_point_type>: New method.
8420 * linux-mips-low.c (mips_supports_z_point_type): New function.
8421 (mips_insert_point, mips_remove_point): Adjust to new interface.
8422 Use mips_supports_z_point_type.
8423 (the_low_target): Install mips_supports_z_point_type.
8424 * linux-ppc-low.c (the_low_target): Install NULL as
8425 supports_z_point_type method.
8426 * linux-s390-low.c (the_low_target): Install NULL as
8427 supports_z_point_type method.
8428 * linux-sparc-low.c (the_low_target): Install NULL as
8429 supports_z_point_type method.
8430 * linux-x86-low.c (x86_supports_z_point_type): New function.
8431 (x86_insert_point): Adjust to new insert_point interface. Use
8432 insert_memory_breakpoint. Adjust to new
8433 i386_low_insert_watchpoint interface.
8434 (x86_remove_point): Adjust to remove_point interface. Use
8435 remove_memory_breakpoint. Adjust to new
8436 i386_low_remove_watchpoint interface.
8437 (the_low_target): Install x86_supports_z_point_type.
8438 * lynx-low.c (lynx_target_ops): Install NULL as
8439 supports_z_point_type callback.
8440 * nto-low.c (nto_supports_z_point_type): New.
8441 (nto_insert_point, nto_remove_point): Adjust to new interface.
8442 (nto_target_ops): Install nto_supports_z_point_type.
8443 * mem-break.c: Adjust intro comment.
8444 (struct raw_breakpoint) <raw_type, size>: New fields.
8445 <inserted>: Update comment.
8446 <shlib_disabled>: Delete field.
8447 (enum bkpt_type) <gdb_breakpoint>: Delete value.
8448 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
8449 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
8450 (raw_bkpt_type_to_target_hw_bp_type): New function.
8451 (find_enabled_raw_code_breakpoint_at): New function.
8452 (find_raw_breakpoint_at): New type and size parameters. Use them.
8453 (insert_memory_breakpoint): New function, based off
8454 set_raw_breakpoint_at.
8455 (remove_memory_breakpoint): New function.
8456 (set_raw_breakpoint_at): Reimplement.
8457 (set_breakpoint): New, based on set_breakpoint_at.
8458 (set_breakpoint_at): Reimplement.
8459 (delete_raw_breakpoint): Go through the_target->remove_point
8460 instead of assuming memory breakpoints.
8461 (find_gdb_breakpoint_at): Delete.
8462 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
8463 (find_gdb_breakpoint): New function.
8464 (set_gdb_breakpoint_at): Delete.
8465 (z_type_supported): New function.
8466 (set_gdb_breakpoint_1): New function, loosely based off
8467 set_gdb_breakpoint_at.
8468 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
8469 (delete_gdb_breakpoint_at): Delete.
8470 (delete_gdb_breakpoint_1): New function, loosely based off
8471 delete_gdb_breakpoint_at.
8472 (delete_gdb_breakpoint): New function.
8473 (clear_gdb_breakpoint_conditions): Rename to ...
8474 (clear_breakpoint_conditions): ... this. Don't handle a NULL
8475 breakpoint.
8476 (add_condition_to_breakpoint): Make static.
8477 (add_breakpoint_condition): Take a struct breakpoint pointer
8478 instead of an address. Adjust.
8479 (gdb_condition_true_at_breakpoint): Rename to ...
8480 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
8481 z_type parameter.
8482 (gdb_condition_true_at_breakpoint): Reimplement.
8483 (add_breakpoint_commands): Take a struct breakpoint pointer
8484 instead of an address. Adjust.
8485 (gdb_no_commands_at_breakpoint): Rename to ...
8486 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
8487 parameter. Return true if no breakpoint was found. Change debug
8488 output.
8489 (gdb_no_commands_at_breakpoint): Reimplement.
8490 (run_breakpoint_commands): Rename to ...
8491 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
8492 and change return type to boolean.
8493 (run_breakpoint_commands): New function.
8494 (gdb_breakpoint_here): Also check for Z1 breakpoints.
8495 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
8496 breakpoint. Go through the_target->remove_point instead of
8497 assuming memory breakpoint.
8498 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
8499 software and hardware breakpoints.
8500 (reinsert_raw_breakpoint): Go through the_target->insert_point
8501 instead of assuming memory breakpoint.
8502 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
8503 software and hardware breakpoints.
8504 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
8505 Check both software and hardware breakpoints.
8506 (validate_inserted_breakpoint): Assert the breakpoint is a
8507 software breakpoint. Set the inserted flag to -1 instead of
8508 setting shlib_disabled.
8509 (delete_disabled_breakpoints): Adjust.
8510 (validate_breakpoints): Only validate software breakpoints.
8511 Adjust to inserted flag change.
8512 (check_mem_read, check_mem_write): Skip breakpoint types other
8513 than software breakpoints. Adjust to inserted flag change.
8514 * mem-break.h (enum raw_bkpt_type): New enum.
8515 (raw_breakpoint, struct process_info): Forward declare.
8516 (Z_packet_to_target_hw_bp_type): Delete declaration.
8517 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
8518 (set_gdb_breakpoint, delete_gdb_breakpoint)
8519 (clear_breakpoint_conditions): New declarations.
8520 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
8521 (breakpoint_inserted_here): Update comment.
8522 (add_breakpoint_condition, add_breakpoint_commands): Replace
8523 address parameter with a breakpoint pointer parameter.
8524 (gdb_breakpoint_here): Update comment.
8525 (delete_gdb_breakpoint_at): Delete.
8526 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
8527 * server.c (process_point_options): Take a struct breakpoint
8528 pointer instead of an address. Adjust.
8529 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
8530 delete_gdb_breakpoint.
8531 * spu-low.c (spu_target_ops): Install NULL as
8532 supports_z_point_type method.
8533 * target.h: Include mem-break.h.
8534 (struct target_ops) <prepare_to_access_memory>: Update comment.
8535 <supports_z_point_type>: New field.
8536 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
8537 instead of a char. Also take a raw breakpoint pointer.
8538 * win32-arm-low.c (the_low_target): Install NULL as
8539 supports_z_point_type.
8540 * win32-i386-low.c (i386_supports_z_point_type): New function.
8541 (i386_insert_point, i386_remove_point): Adjust to new interface.
8542 (the_low_target): Install i386_supports_z_point_type.
8543 * win32-low.c (win32_supports_z_point_type): New function.
8544 (win32_insert_point, win32_remove_point): Adjust to new interface.
8545 (win32_target_ops): Install win32_supports_z_point_type.
8546 * win32-low.h (struct win32_target_ops):
8547 <supports_z_point_type>: New method.
8548 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
8549 instead of a char. Also take a raw breakpoint pointer.
8550
932539e3
PA
85512014-05-20 Pedro Alves <palves@redhat.com>
8552
8553 * mem-break.h: Include break-common.h.
8554 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
8555 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
8556 (Z_packet_to_target_hw_bp_type): New declaration.
8557 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
8558 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
8559 (Z_PACKET_ACCESS_WP): Delete macros.
8560 (Z_packet_to_hw_type): Delete function.
8561 * i386-low.h: Don't include break-common.h here.
8562 (Z_packet_to_hw_type): Delete declaration.
8563 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
8564 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
8565 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
8566 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
8567 * linux-aarch64-low.c: Don't include break-common.h here.
8568 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
8569 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
8570 (Z_packet_to_target_hw_bp_type): Delete function.
8571 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
8572 function.
8573 (mips_insert_point, mips_remove_point): Use
8574 Z_packet_to_target_hw_bp_type.
8575
4ff0d3d8
PA
85762014-05-20 Pedro Alves <palves@redhat.com>
8577
8578 * linux-aarch64-low.c: Include break-common.h.
8579 (enum target_point_type): Delete.
8580 (Z_packet_to_point_type): Rename to ...
8581 (Z_packet_to_target_hw_bp_type): ... this, and return a
8582 target_hw_bp_type instead.
8583 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
8584 instead of an enum target_point_type.
8585 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
8586 breakpoint type.
8587 (aarch64_dr_state_insert_one_point)
8588 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
8589 (aarch64_handle_aligned_watchpoint)
8590 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
8591 Take an enum target_hw_bp_type instead of an enum
8592 target_point_type.
8593 (aarch64_supports_z_point_type): New function.
8594 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
8595 use Z_packet_to_target_hw_bp_type.
8596
786dc519
JB
85972014-05-20 Joel Brobecker <brobecker@adacore.com>
8598
8599 * configure.ac: Only use -Werror by default when DEVELOPMENT
8600 is true.
8601 * configure: Regenerate.
8602
9e0aa64f
JK
86032014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
8604
8605 Fix gdbserver qGetTLSAddr for x86_64 -m32.
8606 * linux-x86-low.c (X86_64_USER_REGS): New.
8607 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
8608
2b577b92
YQ
86092014-04-28 Yao Qi <yao@codesourcery.com>
8610
8611 * Makefile.in (i386-avx512.c): Fix the typo of generated file
8612 name.
8613
94611da2
PA
86142014-04-25 Pedro Alves <palves@redhat.com>
8615
8616 PR server/16255
8617 * linux-low.c (linux_attach_fail_reason_string): New function.
8618 (linux_attach_lwp): Delete.
8619 (linux_attach_lwp_1): Rename to ...
8620 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
8621 argument. Remove "initial" parameter. Return int instead of
8622 void. Don't error or warn here.
8623 (linux_attach): Adjust to call linux_attach_lwp. Call error on
8624 failure to attach to the tgid. Call warning when failing to
8625 attach to an lwp.
8626 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
8627 argument. Remove "initial" parameter. Return int instead of
8628 void. Don't error or warn here.
8629 (linux_attach_fail_reason_string): New declaration.
8630 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
8631 interface change. Use linux_attach_fail_reason_string.
8632
01f9f808
MS
86332014-04-24 Michael Sturm <michael.sturm@mintel.com>
8634 Walfred Tedeschi <walfred.tedeschi@intel.com>
8635
8636 * Makefile.in: Added rules to handle new files
8637 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
8638 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
8639 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
8640 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
8641 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
8642 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
8643 x32-avx512-linux.o.
8644 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
8645 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
8646 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
8647 i386/x32-avx512.xml.
8648 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
8649 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
8650 i386/x32-avx512-linux.xml.
8651 * i387-fp.c (num_avx512_k_registers): New constant for number
8652 of K registers.
8653 (num_avx512_zmmh_low_registers): New constant for number of
8654 lower ZMM registers (0-15).
8655 (num_avx512_zmmh_high_registers): New constant for number of
8656 higher ZMM registers (16-31).
8657 (num_avx512_ymmh_registers): New contant for number of higher
8658 YMM registers (ymm16-31 added by avx521 on x86_64).
8659 (num_avx512_xmm_registers): New constant for number of higher
8660 XMM registers (xmm16-31 added by AVX512 on x86_64).
8661 (struct i387_xsave): Add space for AVX512 registers.
8662 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
8663 Add code to handle AVX512 registers.
8664 (i387_xsave_to_cache): Add code to handle AVX512 registers.
8665 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
8666 prototypei from generated file.
8667 (tdesc_amd64_avx512_linux): Likewise.
8668 (init_registers_x32_avx512_linux): Likewise.
8669 (tdesc_x32_avx512_linux): Likewise.
8670 (init_registers_i386_avx512_linux): Likewise.
8671 (tdesc_i386_avx512_linux): Likewise.
8672 (x86_64_regmap): Add AVX512 registers.
8673 (x86_linux_read_description): Add code to handle AVX512 XSTATE
8674 mask.
8675 (initialize_low_arch): Add code to initialize AVX512 registers.
8676
51aa91f9
PA
86772014-04-23 Pedro Alves <palves@redhat.com>
8678
8679 * mem-break.c (find_gdb_breakpoint_at): Make static.
8680 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
8681
a4165e94
PA
86822014-04-23 Pedro Alves <palves@redhat.com>
8683
8684 * i386-low.c: Don't include break-common.h here.
8685 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
8686 prototype to take target_hw_bp_type as argument instead of a Z
8687 packet char.
8688 * i386-low.h: Include break-common.h here.
8689 (Z_packet_to_hw_type): Declare.
8690 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
8691 prototypes.
8692 * linux-x86-low.c (x86_insert_point): Convert the packet number to
8693 a target_hw_bp_type before calling i386_low_insert_watchpoint.
8694 (x86_remove_point): Convert the packet number to a
8695 target_hw_bp_type before calling i386_low_remove_watchpoint.
8696 * win32-i386-low.c (i386_insert_point): Convert the packet number
8697 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
8698 (i386_remove_point): Convert the packet number to a
8699 target_hw_bp_type before calling i386_low_remove_watchpoint.
8700
b8acf843
PA
87012014-04-23 Pedro Alves <palves@redhat.com>
8702
8703 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
8704
d708bcd1
PA
87052014-04-10 Pedro Alves <palves@redhat.com>
8706
8707 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
8708 Check if the condition or command is NULL before checking if the
8709 breakpoint is known. On success, return true.
8710 * mem-break.h (add_breakpoint_condition): Document return.
8711 (add_breakpoint_commands): Add describing comment.
8712 * server.c (skip_to_semicolon): New function.
8713 (process_point_options): Use it.
8714
2eec7d5b
PA
87152014-04-09 Pedro Alves <palves@redhat.com>
8716
8717 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
8718 to lwpid_of.
8719
fa96cb38
PA
87202014-02-27 Pedro Alves <palves@redhat.com>
8721
8722 PR 12702
8723 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
8724 macros.
8725 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
8726 output.
8727 (last_thread_of_process_p): Take a PID argument instead of a
8728 thread pointer.
8729 (linux_wait_for_lwp): Delete.
8730 (num_lwps, check_zombie_leaders, not_stopped_callback): New
8731 functions.
8732 (linux_low_filter_event): New function, party factored out from
8733 linux_wait_for_event.
8734 (linux_wait_for_event): Rename to ...
8735 (linux_wait_for_event_filtered): ... this. Add new filter ptid
8736 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
8737 sigsuspend. Check for zombie leaders.
8738 (linux_wait_for_event): Reimplement as wrapper around
8739 linux_wait_for_event_filtered.
8740 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
8741 a normal or signal exit is seen, it's the whole process exiting.
8742 (wait_for_sigstop): No longer a for_each_inferior callback.
8743 Rewrite on top of linux_wait_for_event_filtered.
8744 (stop_all_lwps): Call wait_for_sigstop directly.
8745 * server.c (resume, handle_target_event): Handle
8746 TARGET_WAITKIND_NO_RESUMED.
8747
d763de10
JB
87482014-02-26 Joel Brobecker <brobecker@adacore.com>
8749
8750 * win32-low.c (psapi_get_dll_name,
8751 * win32_CreateToolhelp32Snapshot): Delete.
8752 (win32_CreateToolhelp32Snapshot, win32_Module32First)
8753 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
8754 Delete.
8755 (handle_load_dll): Add function description.
8756 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
8757
850a0f76
JB
87582014-02-26 Joel Brobecker <brobecker@adacore.com>
8759
8760 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
8761 Add comment.
8762 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
8763 base address when calling win32_add_one_solib.
8764 (handle_load_dll): Delete local variable load_addr.
8765 Remove 0x1000 offset applied to DLL base address when calling
8766 win32_add_one_solib.
8767 (handle_unload_dll): Add comment.
8768
f25b3fc3
JB
87692014-02-26 Joel Brobecker <brobecker@adacore.com>
8770
8771 * win32-low.c (win32_add_all_dlls): Renames
8772 win32_ensure_ntdll_loaded. Rewrite function documentation.
8773 Adjust implementation to always load all DLLs.
8774 Add 0x1000 offset to DLL base address when calling
8775 win32_add_one_solib.
8776 (child_initialization_done): New static global.
8777 (do_initial_child_stuff): Set child_initialization_done to
8778 zero during child initialization, and 1 after. Replace call
8779 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
8780 Add comment.
8781 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
8782 (handle_unload_dll): Add function documentation.
8783 (get_child_debug_event): Ignore load and unload DLL events
8784 during child initialization.
8785
d86d4aaf
DE
87862014-02-20 Doug Evans <dje@google.com>
8787
3bc32da3 8788 Remove global all_lwps.
d86d4aaf
DE
8789 * inferiors.h (ptid_of): Move here from linux-low.h.
8790 (pid_of, lwpid_of): Ditto.
8791 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
8792 parameter is a struct thread_info * now.
8793 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
8794 directly. Pass &all_threads to find_inferior instead of &all_lwps.
8795 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
8796 directly.
8797 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
8798 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
8799 * linux-arm-low.c (update_registers_callback): Update, "entry"
8800 parameter is a struct thread_info * now.
8801 Fetch lwpid from current_inferior directly.
8802 (arm_insert_point): Pass &all_threads to find_inferior instead of
8803 &all_lwps.
8804 (arm_remove_point): Ditto.
8805 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
8806 (arm_prepare_to_resume): Fetch pid from thread.
8807 (arm_read_description): Fetch lwpid from current_inferior directly.
8808 * linux-low.c (all_lwps): Delete.
8809 (delete_lwp): Delete call to remove_inferior.
8810 (handle_extended_wait): Fetch lwpid from thread.
8811 (add_lwp): Don't set lwp->entry.id. Remove call to
8812 add_inferior_to_list.
8813 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
8814 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
8815 (kill_one_lwp_callback): Ditto.
8816 (linux_kill): Don't dereference NULL pointer.
8817 Fetch ptid,lwpid from thread.
8818 (get_detach_signal): Fetch ptid from thread.
8819 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
8820 Simplify call to regcache_invalidate_thread.
8821 (delete_lwp_callback): Update, "entry" parameter is a
8822 struct thread_info * now. Fetch pid from thread.
8823 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
8824 (status_pending_p_callback): Update, "entry" parameter is a
8825 struct thread_info * now. Fetch ptid from thread.
8826 (find_lwp_pid): Update, "entry" parameter is a
8827 struct thread_info * now.
8828 (linux_wait_for_lwp): Fetch pid from thread.
8829 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
8830 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
8831 (enqueue_one_deferred_signal): Fetch lwpid from thread.
8832 (dequeue_one_deferred_signal): Ditto.
8833 (cancel_breakpoint): Fetch ptid from current_inferior.
8834 (linux_wait_for_event): Pass &all_threads to find_inferior,
8835 not &all_lwps. Fetch ptid, lwpid from thread.
8836 (count_events_callback): Update, "entry" parameter is a
8837 struct thread_info * now.
8838 (select_singlestep_lwp_callback): Ditto.
8839 (select_event_lwp_callback): Ditto.
8840 (cancel_breakpoints_callback): Ditto.
8841 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
8842 not &all_lwps.
8843 (select_event_lwp): Ditto. Fetch ptid from event_thread.
8844 (unsuspend_one_lwp): Update, "entry" parameter is a
8845 struct thread_info * now.
8846 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
8847 not &all_lwps.
8848 (linux_stabilize_threads): Ditto. And for for_each_inferior.
8849 Fetch lwpid from thread, not lwp.
8850 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
8851 Pass &all_threads to find_inferior, not &all_lwps.
8852 (send_sigstop): Fetch lwpid from thread, not lwp.
8853 (send_sigstop_callback): Update, "entry" parameter is a
8854 struct thread_info * now.
8855 (suspend_and_send_sigstop_callback): Ditto.
8856 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
8857 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
8858 struct thread_info * now.
8859 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
8860 from thread, lwp.
8861 (lwp_running): Update, "entry" parameter is a
8862 struct thread_info * now.
8863 (stop_all_lwps): Fetch ptid from thread.
8864 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
8865 (linux_resume_one_lwp): Fetch lwpid from thread.
8866 (linux_set_resume_request): Update, "entry" parameter is a
8867 struct thread_info * now. Fetch pid, lwpid from thread.
8868 (resume_status_pending_p): Update, "entry" parameter is a
8869 struct thread_info * now.
8870 (need_step_over_p): Ditto. Fetch lwpid from thread.
8871 (start_step_over): Fetch lwpid from thread.
8872 (linux_resume_one_thread): Update, "entry" parameter is a
8873 struct thread_info * now. Fetch lwpid from thread.
8874 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
8875 (proceed_one_lwp): Update, "entry" parameter is a
8876 struct thread_info * now. Fetch lwpid from thread.
8877 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
8878 struct thread_info * now.
8879 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
8880 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
8881 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
8882 directly.
8883 (regsets_store_inferior_registers): Ditto.
8884 (fetch_register, store_register): Ditto.
8885 (linux_read_memory, linux_write_memory): Ditto.
8886 (linux_request_interrupt): Ditto.
8887 (linux_read_auxv): Ditto.
8888 (linux_xfer_siginfo): Ditto.
8889 (linux_qxfer_spu): Ditto.
8890 (linux_qxfer_libraries_svr4): Ditto.
8891 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
8892 moved to inferiors.h.
8893 (get_lwp): Delete.
8894 (get_thread_lwp): Update.
8895 (struct lwp_info): Delete member "entry". Simplify comment for
8896 member "thread".
8897 (all_lwps): Delete.
8898 * linux-mips-low.c (mips_read_description): Fetch lwpid from
8899 current_inferior directly.
8900 (update_watch_registers_callback): Update, "entry" parameter is a
8901 struct thread_info * now. Fetch pid from thread.
8902 (mips_linux_prepare_to_resume): Fetch ptid from thread.
8903 (mips_insert_point): Fetch lwpid from current_inferior.
8904 Pass &all_threads to find_inferior, not &all_lwps.
8905 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
8906 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
8907 directly.
8908 (mips_stopped_data_address): Ditto.
8909 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
8910 directly.
8911 * linux-tile-low.c (tile_arch_setup): Ditto.
8912 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
8913 (update_debug_registers_callback): Update, "entry" parameter is a
8914 struct thread_info * now. Fetch pid from thread.
8915 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
8916 Pass &all_threads to find_inferior, not &all_lwps.
8917 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
8918 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
8919 Pass &all_threads to find_inferior, not &all_lwps.
8920 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
8921 (i386_dr_low_get_status): Ditto.
8922 (x86_linux_prepare_to_resume): Fetch ptid from thread.
8923 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
8924 (x86_linux_read_description): Ditto.
8925 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
8926
3b8361aa
DE
89272014-02-20 Doug Evans <dje@google.com>
8928
8929 * inferiors.c (get_first_inferior): Fix buglet.
8930
f7667f0d
DE
89312014-02-19 Doug Evans <dje@google.com>
8932
8933 * gdbthread.h (add_thread): Change result type to struct thread_info *.
8934 * inferiors.c (add_thread): Change result type to struct thread_info *.
8935 All callers updated.
8936 (add_lwp): Call add_thread here instead of in callers.
8937 All callers updated.
8938 * linux-low.h (get_lwp_thread): Rewrite.
8939 (struct lwp_info): New member "thread".
8940
b3312d80
DE
89412014-02-19 Doug Evans <dje@google.com>
8942
8943 * linux-low.c (add_lwp): Change result to struct lwp_info *.
8944 All callers updated.
8945
ecc6f45c
DE
89462014-02-19 Doug Evans <dje@google.com>
8947
8948 * inferiors.c (add_thread): Fix whitespace.
8949
649ebbca
DE
89502014-02-19 Doug Evans <dje@google.com>
8951
8952 * dll.c (clear_dlls): Replace accessing list implemention details
8953 with API function.
8954 * gdbthread.h (get_first_thread): Declare.
8955 * inferiors.c (for_each_inferior_with_data): New function.
8956 (get_first_thread): New function.
8957 (find_thread_ptid): Simplify.
8958 (get_first_inferior): New function.
8959 (clear_list): Delete.
8960 (one_inferior_p): New function.
8961 (clear_inferior_list): New function.
8962 (clear_inferiors): Update.
8963 * inferiors.h (for_each_inferior_with_data): Declare.
8964 (clear_inferior_list): Declare.
8965 (one_inferior_p): Declare.
8966 (get_first_inferior): Declare.
8967 * linux-low.c (linux_wait_for_event): Replace accessing list
8968 implemention details with API function.
8969 * server.c (target_running): Ditto.
8970 (accumulate_file_name_length): New function.
8971 (emit_dll_description): New function.
8972 (handle_qxfer_libraries): Replace accessing list implemention
8973 details with API function.
8974 (handle_qxfer_threads_worker): New function.
8975 (handle_qxfer_threads_proper): Replace accessing list implemention
8976 details with API function.
8977 (handle_query): Ditto.
8978 (visit_actioned_threads_callback_ftype): New typedef.
8979 (visit_actioned_threads_data): New struct.
8980 (visit_actioned_threads): Rewrite to be find_inferior callback.
8981 (resume): Call find_inferior.
8982 (handle_status): Replace accessing list implemention
8983 details with API function.
8984 (process_serial_event): Replace accessing list implemention details
8985 with API function.
8986 * target.c (set_desired_inferior): Replace accessing list implemention
8987 details with API function.
8988 * tracepoint.c (same_process_p): New function.
8989 (gdb_agent_about_to_close): Replace accessing list implemention
8990 details with API function.
8991 * win32-low.c (child_delete_thread): Replace accessing list
8992 implemention details with API function.
8993 (match_dll_by_basename): New function.
8994 (dll_is_loaded_by_basename): New function.
8995 (win32_ensure_ntdll_loaded): Replace accessing list implemention
8996 details call to dll_is_loaded_by_basename.
8997
80894984
DE
89982014-02-19 Doug Evans <dje@google.com>
8999
9000 * dll.h (struct dll_info): Add comment.
9001 * gdbthread.h (struct thread_info): Add comment.
9002 (current_ptid): Simplify.
9003 * inferiors.c (add_process): Update.
9004 (remove_process): Update.
9005 * inferiors.h (struct process_info): Rename member "head" to "entry".
9006 * linux-low.c (delete_lwp): Update.
9007 (add_lwp): Update.
9008 (last_thread_of_process_p): Update.
9009 (kill_one_lwp_callback, linux_kill): Update.
9010 (status_pending_p_callback): Update.
9011 (wait_for_sigstop): Update. Simplify read of ptid.
9012 (start_step_over): Update.
9013 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
9014 (get_lwp_thread): Update.
9015 (struct lwp_info): Rename member "head" to "entry".
9016 * regcache.h (inferior_list_entry): Delete.
9017 * server.c (kill_inferior_callback): Update.
9018 (detach_or_kill_inferior_callback): Update.
9019 (print_started_pid): Update.
9020 (print_attached_pid): Update.
9021 (process_serial_event): Simplify read of ptid.
9022 * thread-db.c (thread_db_create_event): Update.
9023 (thread_db_get_tls_address): Update.
9024 * win32-low.c (current_inferior_ptid): Simplify.
9025
46917d26
TT
90262014-02-19 Tom Tromey <tromey@redhat.com>
9027
9028 * target.h (struct target_ops) <supports_btrace>: Add target_ops
9029 argument.
9030 (target_supports_btrace): Update.
9031
0759a81e
YQ
90322014-02-14 Yao Qi <yao@codesourcery.com>
9033
9034 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
9035 (rsp-low-ipa.o): New target.
9036
a7191e8b
TT
90372014-02-12 Tom Tromey <tromey@redhat.com>
9038
9039 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
9040 convert_ascii_to_int.
9041 * regcache.c (registers_to_string): Likewise.
9042 * remote-utils.c (decode_M_packet): Likewise.
9043 * server.c (process_serial_event): Likewise.
9044
ff0e980e
TT
90452014-02-12 Tom Tromey <tromey@redhat.com>
9046
9047 * server.c (handle_query, handle_v_run): Use hex2bin, not
9048 unhexify.
9049 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
9050
e9371aff
TT
90512014-02-12 Tom Tromey <tromey@redhat.com>
9052
9053 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
9054 convert_int_to_ascii.
9055 * regcache.c (registers_to_string, collect_register_as_string):
9056 Likewise.
9057 * remote-utils.c (look_up_one_symbol, relocate_instruction):
9058 Likewise.
9059 * server.c (process_serial_event): Likewise.
9060 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
9061 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
9062
971dc0b8
TT
90632014-02-12 Tom Tromey <tromey@redhat.com>
9064
9065 * remote-utils.c (look_up_one_symbol, monitor_output): Use
9066 bin2hex, not hexify.
9067 * tracepoint.c (cmd_qtstatus): Likewise.
9068
0a822afb
TT
90692014-02-12 Tom Tromey <tromey@redhat.com>
9070
9071 * remote-utils.c (monitor_output): Pass explicit length to
9072 hexify.
9073
9c3d6531
TT
90742014-02-12 Tom Tromey <tromey@redhat.com>
9075
9076 * tracepoint.c: Include rsp-low.h.
9077 * server.c: Include rsp-low.h.
9078 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
9079 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
9080 declare.
9081 * remote-utils.c: Include rsp-low.h.
9082 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
9083 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
9084 (convert_int_to_ascii, convert_ascii_to_int): Move to
9085 common/rsp-low.c.
9086 * regcache.c: Include rsp-low.h.
9087 * ax.c: Include rsp-low.h.
9088 * Makefile.in (SFILES): Add common/rsp-low.c.
9089 (OBS): Add rsp-low.o.
9090 (rsp-low.o): New target.
9091
01fd3ea5
TT
90922014-02-12 Tom Tromey <tromey@redhat.com>
9093
9094 * utils.h (pulongest, plongest, phex_nz): Don't declare.
9095 Include print-utils.h.
9096 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
9097 (plongest, thirty_two, phex_nz): Remove.
9098 * Makefile.in (SFILES): Add common/print-utils.c.
9099 (OBS): Add print-utils.o.
9100 (print-utils-ipa.o): New target.
9101 (print-utils.o): New target.
9102 (IPA_OBJS): Add print-utils-ipa.o.
9103
e99dc820
TT
91042014-02-06 Tom Tromey <tromey@redhat.com>
9105
9106 * Makefile.in (SFILES): Fix indentation.
9107
ee1e2d4f
DE
91082014-02-05 Doug Evans <dje@google.com>
9109
9110 * linux-low.c (linux_wait_for_event): Improve comment.
9111 (linux_wait_1): Keep current_inferior in sync with event_child.
9112
f5a02773
DE
91132014-01-22 Doug Evans <dje@google.com>
9114
9115 * gdbthread.h (gdb_id_to_thread): Delete, unused.
9116
87ce2a04
DE
91172014-01-22 Doug Evans <dje@google.com>
9118
9119 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
9120 * configure: Regenerate.
9121 * config.in: Regenerate.
9122 * Makefile.in (SFILES): Add debug.c.
9123 (OBS): Add debug.o.
9124 * debug.c: New file.
9125 * debug.h: New file.
9126 * linux-aarch64-low.c (*): Update all debugging printfs to use
9127 debug_printf instead of fprintf.
9128 * linux-arm-low.c (*): Ditto.
9129 * linux-cris-low.c (*): Ditto.
9130 * linux-crisv32-low.c (*): Ditto.
9131 * linux-m32r-low.c (*): Ditto.
9132 * linux-sparc-low.c (*): Ditto.
9133 * linux-x86.c (*): Ditto.
9134 * linux-low.c (*): Ditto.
9135 (linux_wait_1): Add calls to debug_enter, debug_exit.
9136 (linux_wait): Remove redundant debugging printf.
9137 (stop_all_lwps): Add calls to debug_enter, debug_exit.
9138 (linux_resume, unstop_all_lwps): Ditto.
9139 * mem-break.c (*): Update all debugging printfs to use
9140 debug_printf instead of fprintf.
9141 * remote-utils.c (*): Ditto.
9142 * thread-db.c (*): Ditto.
9143 * server.c #include <ctype.h>, "gdb_vecs.h".
9144 (debug_threads): Moved to debug.c.
9145 (*): Update all debugging printfs to use debug_printf instead of
9146 fprintf.
9147 (start_inferior): Replace call to fflush with call to debug_flush.
9148 (monitor_show_help): Mention set debug-format.
9149 (parse_debug_format_options): New function.
9150 (handle_monitor_command): Handle "monitor set debug-format".
9151 (gdbserver_usage): Mention --debug-format.
9152 (main): Parse --debug-format.
9153 * server.h (debug_threads): Declaration moved to debug.h.
9154 #include "debug.h".
9155 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
9156 trace_debug_1 that uses debug_printf.
9157 (tracepoint_look_up_symbols): Update all debugging printfs to use
9158 debug_printf instead of fprintf.
9159
e671835b
BS
91602014-01-20 Baruch Siach <baruch@tkos.co.il>
9161
9162 * linux-xtensa-low.c: Include asm/ptrace.h instead of
9163 sys/ptrace.h.
9164
b5737fa9
PA
91652014-01-17 Pedro Alves <palves@redhat.com>
9166
ea38d2a9 9167 PR build/16445
c7faa97a
PA
9168 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
9169 defined after including gdb_proc_service.h.
b5737fa9 9170
40ed484e
DE
91712014-01-16 Doug Evans <dje@google.com>
9172
9173 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
9174 (match_dll): Use it.
9175
969c39fb
MM
91762014-01-16 Markus Metzger <markus.t.metzger@intel.com>
9177
9178 * target.h (target_ops) <read_btrace>: Change parameters and
9179 return type to allow error reporting.
9180 * server.c (handle_qxfer_btrace): Support delta reads. Pass
9181 trace reading errors on.
9182 * linux-low.c (linux_low_read_btrace): Pass trace reading
9183 errors on.
9184 (linux_low_disable_btrace): New.
9185
ab7f45ba
DE
91862014-01-15 Doug Evans <dje@google.com>
9187
9188 * inferiors.c (thread_id_to_gdb_id): Delete.
9189 * inferiors.h (thread_id_to_gdb_id): Delete.
9190
66af0f44
EZ
91912014-01-13 Eli Zaretskii <eliz@gnu.org>
9192
9193 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
9194 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
9195 versions.
9196
9939e131
PA
91972014-01-08 Pedro Alves <palves@redhat.com>
9198
9199 * server.c (handle_status): Don't discard previous queued stop
9200 replies or thread's pending status here.
9201 (main) <disconnection>: Do it here instead.
9202
b7ea362b
PA
92032014-01-08 Pedro Alves <palves@redhat.com>
9204
9205 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
9206 * server.c (visit_actioned_threads, handle_pending_status): New
9207 function.
9208 (handle_v_cont): Factor out parts to ...
9209 (resume): ... this new function. If in all-stop, and a thread
9210 being resumed has a pending status, report it without actually
9211 resuming.
9212 (myresume): Adjust to use the new 'resume' function.
9213 (clear_pending_status_callback, set_pending_status_callback)
9214 (find_status_pending_thread_callback): New functions.
9215 (handle_status): Handle the case of multiple threads having
9216 interesting statuses to report. Report threads' real last signal
9217 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
9218 with an interesting thread to report the status for, instead of
9219 always reporting the status of the first thread.
9220
28498c42
JB
92212014-01-01 Joel Brobecker <brobecker@adacore.com>
9222
9223 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
9224 * gdbreplay.c (gdbreplay_version): Likewise.
9225
f45c82da
YZ
92262013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
9227
9228 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
9229 iov.iov_len with the real length in use.
9230
379a5e2d
JB
92312013-12-13 Joel Brobecker <brobecker@adacore.com>
9232
9233 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
9234 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
9235 for all targets that use win32-low.c.
9236 * win32-low.c (win32_ensure_ntdll_loaded): New function.
9237 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
9238
4210d83e
PA
92392013-12-13 Pedro Alves <palves@redhat.com>
9240
9241 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
9242 if equal to TARGET_WAITKIND_LOADED.
9243 * win32-low.c (cached_status): New static global.
9244 (win32_wait): Add declaration.
9245 (do_initial_child_stuff): Flush all initial pending debug events
9246 up to the initial breakpoint.
9247 (win32_wait): If CACHED_STATUS was set, return that instead
9248 of doing a real wait. Remove the code resuming the execution
9249 of the inferior after receiving a TARGET_WAITKIND_LOADED event
9250 during the initial phase. Also remove the code changing
9251 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
9252 TARGET_WAITKIND_STOPPED.
9253
e7f0d979
YQ
92542013-12-11 Yao Qi <yao@codesourcery.com>
9255
9256 * notif.c (handle_notif_ack): Return 0 if no notification
9257 matches.
9258
ebcf782c
DE
92592013-11-20 Doug Evans <dje@google.com>
9260
9261 * linux-low.c (linux_set_resume_request): Fix comment.
9262
20ad9378
DE
92632013-11-20 Doug Evans <dje@google.com>
9264
9265 * linux-low.c (resume_status_pending_p): Tweak comment.
9266
a196ebeb
WT
92672013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
9268
9269 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
9270 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
9271 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
9272 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
9273 (srv_amd64_regobj): Add amd64-mpx.o.
9274 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
9275 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
9276 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
9277 * i387-fp.c (num_pl_bnd_register) Added constant.
9278 (num_pl_bnd_cfg_registers) Added constant.
9279 (struct i387_xsave) Added reserved area and MPX fields.
9280 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
9281 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
9282 function.
9283 (tdesc_i386_mpx_linux): Add MPX amd64 target.
9284 (init_registers_amd64_mpx_linux): Declare new function.
9285 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
9286 (x86_64_regmap): Add MPX registers.
9287 (x86_linux_read_description): Add MPX case.
9288 (initialize_low_arch): Initialize MPX targets.
9289
0080a2f6
TT
92902013-11-18 Tom Tromey <tromey@redhat.com>
9291
9292 * configure: Rebuild.
9293 * configure.ac: Don't check for stdlib.h.
9294 * gdbreplay.c: Unconditionally include stdlib.h.
9295
2978b111
TT
92962013-11-18 Tom Tromey <tromey@redhat.com>
9297
9298 * config.in: Rebuild.
9299 * configure: Rebuild.
9300 * configure.ac: Don't use AC_HEADER_DIRENT.
9301
a3d08894
TT
93022013-11-18 Tom Tromey <tromey@redhat.com>
9303
9304 * server.h: Don't check HAVE_STRING_H.
9305 * gdbreplay.c: Don't check HAVE_STRING_H.
9306 * configure: Rebuild.
9307
0a5dd17d
TT
93082013-11-18 Tom Tromey <tromey@redhat.com>
9309
9310 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
9311 LIBGNU.
9312
1bd2f0ba
TT
93132013-11-08 Tom Tromey <tromey@redhat.com>
9314
9315 * configure, config.in: Rebuild.
9316 * configure.ac: Remove unused configury.
9317
3266f10b
TT
93182013-11-08 Tom Tromey <tromey@redhat.com>
9319
9320 * acinclude.m4: Include common.m4, codeset.m4.
9321 * configure, config.in: Rebuild.
9322 * configure.ac: Use GDB_AC_COMMON.
9323
6682d959
AA
93242013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
9325
9326 * linux-s390-low.c (HWCAP_S390_TE): New define.
9327 (s390_arch_setup): Consider the TE field in the HWCAP for
9328 determining 'have_regset_tdb'.
9329
fd0a4d76
SDJ
93302013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
9331
9332 PR gdb/16014
9333 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
9334 call to sizeof.
9335
1a3d890b
PA
93362013-10-02 Pedro Alves <palves@redhat.com>
9337
9338 * server.c (process_serial_event): Don't output "GDBserver
9339 exiting" if GDB is connected through stdio.
9340 * target.c (mywait): Likewise, be silent if GDB is connected
9341 through stdio.
9342
97ad4581
JB
93432013-10-01 Joel Brobecker <brobecker@adacore.com>
9344
9345 * lynx-low.c (lynx_add_threads_after_attach): New function.
9346 (lynx_attach): Remove call to add_thread. Add call to
9347 lynx_add_threads_after_attach instead.
9348
5b4e221c
MF
93492013-09-28 Mike Frysinger <vapier@gentoo.org>
9350
9351 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
9352 * config.in, configure: Regenerated.
9353
ee47b2f8
YQ
93542013-09-18 Yao Qi <yao@codesourcery.com>
9355
9356 PR server/15959
9357 * server.c (start_inferior): Clear 'resume_info'.
9358
d6707650 93592013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 9360
d6707650
JW
9361 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
9362 for each register.
9363
9243dd0e 93642013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 9365
9243dd0e
JW
9366 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
9367 linux-tile-low.o to srv_tgtobj.
9368
c623a6ef
WN
93692013-09-16 Will Newton <will.newton@linaro.org>
9370
9371 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
9372 out regs.
9373
fb71d39e
PA
93742013-09-06 Pedro Alves <palves@redhat.com>
9375
9376 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
9377 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
9378 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
9379 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
9380 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
9381 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
9382
8e7e9910
PA
93832013-09-06 Pedro Alves <palves@redhat.com>
9384
9385 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
9386 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
9387
7c3a12ca
PA
93882013-09-06 Pedro Alves <palves@redhat.com>
9389
9390 * linux-amd64-ipa.c: Include tracepoint.h.
9391 * linux-i386-ipa.c: Include tracepoint.h.
9392
8eb3d7b6
RW
93932013-09-06 Ricard Wanderlof <ricardw@axis.com>
9394
9395 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
9396 (ps_get_thread_area): New function.
9397
eddddb9d
RW
93982013-09-06 Ricard Wanderlof <ricardw@axis.com>
9399
9400 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
9401 (initialize_low_arch): Call init_registers_crisv32 rather than
9402 init_register_crisv32.
9403
533b0600
PA
94042013-09-05 Pedro Alves <palves@redhat.com>
9405
9406 * server.h (handle_vFile, hostio_last_error_from_errno): Move
9407 to ...
9408 * hostio.h: ... this new file.
9409 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
9410 win32-low.c: Include hostio.h.
9411
0ce3d3b5
PA
94122013-09-05 Pedro Alves <palves@redhat.com>
9413
9414 * server.h (gdb_client_data, handler_func, callback_handler_func)
9415 (delete_file_handler, add_file_handler, append_callback_event)
9416 (delete_callback_event, start_event_loop, initialize_event_loop):
9417 Move to event-loop.h and include it.
9418 * event-loop.h: New file.
9419
799cdc37
PA
94202013-09-05 Pedro Alves <palves@redhat.com>
9421
9422 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
9423 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
9424 (loaded_dll, unloaded_dll): Move to ...
9425 * dll.h: ... this new file.
9426 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
9427
6a6bbd9d
PA
94282013-09-05 Pedro Alves <palves@redhat.com>
9429
9430 * server.h (current_process, get_thread_process, all_processes)
9431 (add_inferior_to_list, for_each_inferior, current_inferior)
9432 (remove_inferior, add_process, remove_process, find_process_pid)
9433 (have_started_inferiors_p, have_attached_inferiors_p)
9434 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
9435 (clear_inferiors, find_inferior, find_inferior_id)
9436 (inferior_target_data, set_inferior_target_data)
9437 (inferior_regcache_data, set_inferior_regcache_data): Move to
9438 inferiors.h, and include it.
9439 * inferiors.h: New file.
9440
f699aaba
PA
94412013-09-05 Pedro Alves <palves@redhat.com>
9442
9443 * server.h (struct emit_ops, current_insn_ptr, emit_error):
9444 Move ...
72f4393d 9445 * ax.h: ... here.
f699aaba 9446
c144c7a0
PA
94472013-09-05 Pedro Alves <palves@redhat.com>
9448
9449 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
9450 tracepoint.h.
9451 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
9452 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
9453 (handle_tracepoint_general_set, handle_tracepoint_query)
9454 (tracepoint_finished_step, tracepoint_was_hit)
9455 (release_while_stepping_state_list, current_traceframe)
9456 (in_readonly_region, traceframe_read_mem)
9457 (fetch_traceframe_registers, traceframe_read_sdata)
9458 (traceframe_read_info, struct fast_tpoint_collect_status)
9459 (fast_tracepoint_collecting, force_unlock_trace_buffer)
9460 (handle_tracepoit_bkpts, initialize_low_tracepoint)
9461 (supply_fast_tracepoint_registers)
9462 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
9463 (ipa_tdesc, claim_trampoline_space)
9464 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
9465 (agent_mem_read, agent_get_trace_state_variable_value)
9466 (agent_set_trace_state_variable_value, agent_tsv_read)
9467 (agent_mem_read_string, get_raw_reg_func_addr)
9468 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
9469 * tracepoint.h: ... this new file.
9470
ff42e6ab
PA
94712013-09-05 Pedro Alves <palves@redhat.com>
9472
9473 * server.h (perror_with_name, error, fatal, warning, paddress)
9474 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
9475 include it.
9476 * utils.h: New file.
9477
541af0f4
PA
94782013-09-05 Pedro Alves <palves@redhat.com>
9479
9480 * server.h (remote_debug, noack_mode, transport_is_reliable)
9481 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
9482 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
9483 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
9484 (write_enn, initialize_async_io, enable_async_io)
9485 (disable_async_io, check_remote_input_interrupt_request)
9486 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
9487 (dead_thread_notify, prepare_resume_reply)
9488 (decode_address_to_semicolon, decode_address, decode_m_packet)
9489 (decode_M_packet, decode_X_packet, decode_xfer_write)
9490 (decode_search_memory_packet, unhexify, hexify)
9491 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
9492 (look_up_one_symbol, relocate_instruction)
9493 (monitor_output): Move to remote-utils.h, and include it.
9494 * remote-utils.h: New file.
9495
eebdf26b
PA
94962013-09-05 Pedro Alves <palves@redhat.com>
9497
9498 * server.h (_): Delete.
9499
3aafd2ff
PA
95002013-09-02 Pedro Alves <palves@redhat.com>
9501
9502 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
9503 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
9504 allocated.
9505 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
9506
cee83bcb
PM
95072013-09-02 Pierre Muller <muller@sourceware.org>
9508
9509 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
9510 or WriteProcessMemory complete successfully and handle
9511 ERROR_PARTIAL_COPY error.
9512
9a13b2fa
PA
95132013-09-02 Pedro Alves <palves@redhat.com>
9514
9515 * server.c (gdb_read_memory): Return -1 on traceframe memory read
9516 error instead of EIO.
9517
602e3198
JK
95182013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9519
9520 PR server/15604
9521 * linux-low.c: Include filestuff.h.
9522 (linux_create_inferior) <pid == 0>: Call close_most_fds.
9523 * lynx-low.c: Include filestuff.h.
9524 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
9525 * server.c: Include filestuff.h.
9526 (main): Call notice_open_fds.
9527 * spu-low.c: Include filestuff.h.
9528 (spu_create_inferior) <pid == 0>: Call close_most_fds.
9529
96d7229d
LM
95302013-08-22 Luis Machado <lgustavo@codesourcery.com>
9531
9532 * Makefile.in: Explain why ../target and ../nat are not
9533 listed as include file search paths.
9534 (linux-waitpid.o): New object file rule.
9535 * configure.srv (srv_native_linux_obj): New variable.
9536 Replace all occurrences of linux native object files with
9537 $srv_native_linux_obj.
9538 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
9539 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
9540 (linux_enable_event_reporting): Remove declaration.
9541 (my_waitpid): Moved to common/linux-waitpid.c.
9542 (linux_wait_for_event): Pass ptid when calling
9543 linux_enable_event_reporting.
9544 (linux_supports_tracefork_flag): Remove.
9545 (linux_enable_event_reporting): Likewise.
9546 (linux_tracefork_grandchild): Remove.
9547 (STACK_SIZE): Moved to common/linux-ptrace.c.
9548 (linux_tracefork_child): Remove.
9549 (linux_test_for_tracefork): Remove.
9550 (linux_look_up_symbols): Call linux_supports_traceclone.
9551 (initialize_low): Remove call to linux_test_for_tracefork.
9552 * linux-low.h (PTRACE_TYPE_ARG3): Move to
9553 common/linux-ptrace.h.
9554 (PTRACE_TYPE_ARG4): Likewise.
9555 Include linux-ptrace.h.
9556
32940073
PA
95572013-08-21 Pedro Alves <palves@redhat.com>
9558
9559 * config.in: Renegerate.
9560
33b60d58 95612013-08-19 Luis Machado <lgustavo@codesourcery.com>
a261b8f5 9562
33b60d58
LM
9563 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
9564 (SFILES): Remove $(srcdir)/common/target-common.c and
9565 add $(srcdir)/target/waitstatus.c.
9566 (OBS): Remove target-common.o and add waitstatus.o.
9567 (server_h): Remove $(srcdir)/../common/target-common.h and
9568 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
9569 and $(srcdir)/../target/waitstatus.h.
9570 (target-common.o): Remove.
9571 (waitstatus.o): New target object file.
9572 * target.h: Do not include target-common.h and
9573 include target/resume.h, target/wait.h and
9574 target/waitstatus.h.
9575
b8e1b30e
LM
95762013-08-13 Luis Machado <lgustavo@codesourcery.com>
9577
9578 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
9579 to PTRACE_TYPE_ARG3.
9580 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
9581 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
9582 PTRACE_TYPE_ARG4.
9583 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
9584 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
9585
7a60ad40
YQ
95862013-07-27 Jie Zhang <jie@codesourcery.com>
9587 Daniel Jacobowitz <dan@codesourcery.com>
9588 Yao Qi <yao@codesourcery.com>
9589
9590 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
9591 (mips-linux-watch.o): New rule.
9592 (mips_linux_watch_h): New variable.
9593 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
9594 srv_tgtobj.
9595 * linux-mips-low.c: Include mips-linux-watch.h.
9596 (struct arch_process_info, struct arch_lwp_info): New.
9597 (update_watch_registers_callback): New function.
9598 (mips_linux_new_process, mips_linux_new_thread) New functions.
9599 (mips_linux_prepare_to_resume, mips_insert_point): New
9600 functions.
9601 (mips_remove_point, mips_stopped_by_watchpoint): New
9602 functions.
9603 (rsp_bp_type_to_target_hw_bp_type): New function.
9604 (mips_stopped_data_address): New function.
9605 (the_low_target): Add watchpoint support functions.
9606
de6f69ad
YQ
96072013-07-27 Yao Qi <yao@codesourcery.com>
9608
9609 * i386-low.c: Include break-common.h.
9610 (enum target_hw_bp_type): Remove.
9611
3360c0bf
LM
96122013-07-24 Luis Machado <lgustavo@codesourcery.com>
9613
9614 * Makefile.in (SFILES): /common/target-common.c.
9615 (OBS): Add target-common.o.
9616 (server_h): Add $(srcdir)/../common/target-common.h.
9617 (target-common.o): New target.
9618 * server.c (queue_stop_reply_callback): Free
9619 status string after use.
9620 * target.c (target_waitstatus_to_string): Remove.
9621 * target.h: Include target-common.h.
9622 (resume_kind): Likewise.
9623 (target_waitkind): Likewise.
9624 (target_waitstatus): Likewise.
9625 (TARGET_WNOHANG): Likewise.
9626
bd885420
YQ
96272013-07-04 Yao Qi <yao@codesourcery.com>
9628
9629 * Makefile.in (host_alias): Use @host_noncanonical@.
9630 (target_alias): Use @target_noncanonical@.
9631 * configure.ac: Use ACX_NONCANONICAL_TARGET and
9632 ACX_NONCANONICAL_HOST.
9633 * configure: Regenerated.
9634
9635 Revert:
9636 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
9637
9638 * configure.ac (version_host, version_target): Set and AC_SUBST them.
9639 * configure: Rebuild.
9640 * Makefile.in (version_host, version_target): Get from configure.
9641 (version.c): Use $(version_host) and $(version_target).
9642
17ef446e
PA
96432013-07-03 Pedro Alves <palves@redhat.com>
9644
9645 * Makefile.in (config.status): Depend on development.sh.
9646 * acinclude.m4: Include libmcheck.m4.
9647 * configure: Regenerate.
9648
7a9a7487
MG
96492013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
9650
9651 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
9652 attribute inside the parentheses.
9653 (winapi_DebugSetProcessKillOnExit): Ditto.
9654 (winapi_DebugBreakProcess): Ditto.
9655 (winapi_GenerateConsoleCtrlEvent): Ditto.
a261b8f5 9656
49b64de6
MG
96572013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
9658
9659 * notif.h (notif_event): Add a dummy member to avoid compiler
9660 errors.
9661
d5749ee7
PA
96622013-07-01 Pedro Alves <palves@redhat.com>
9663
9664 * hostio.c (HOSTIO_PATH_MAX): Define.
9665 (require_filename, handle_open, handle_unlink, handle_readlink):
9666 Use it.
9667
d8d2a3ee
PA
96682013-07-01 Pedro Alves <palves@redhat.com>
9669
9670 * server.h: Include "pathmax.h".
9671 * linux-low.c: Don't include sys/param.h.
9672 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
9673 MAXPATHLEN.
9674 * win32-low.c: Don't include sys/param.h.
9675 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
9676
bc7dea8d
PA
96772013-07-01 Pedro Alves <palves@redhat.com>
9678
9679 * event-loop.c: Don't check HAVE_UNISTD_H before including
9680 <unistd.h>.
9681 * gdbreplay.c: Likewise.
9682 * remote-utils.c: Likewise.
9683 * server.c: Likewise.
9684 * configure.ac: Don't check for unistd.h.
9685 * configure: Regenerate.
9686
d6c2da54
TT
96872013-06-28 Tom Tromey <tromey@redhat.com>
9688
9689 * Makefile.in (version.c): Use version.in, not
9690 common/version.in.
9691
257b6bec
MG
96922013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
9693
9694 * configure.ac (version_host, version_target): Set and AC_SUBST them.
9695 * configure: Rebuild.
9696 * Makefile.in (version_host, version_target): Get from configure.
9697 (version.c): Use $(version_host) and $(version_target).
9698
86ebe149
DK
96992013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
9700
9701 Fix trace-status to output user name without trailing colon.
9702 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
9703
f30aa5af
DK
97042013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
9705
9706 Fix trace-status to output proper start-time and stop-time.
9707 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
9708 output start time and stop time in hex as gdb expects.
9709
28a93511
YQ
97102013-06-26 Pedro Alves <pedro@codesourcery.com>
9711
9712 * tracepoint.c (build_traceframe_info_xml): Output trace state
9713 variables present in the trace buffer.
9714
01208463
TT
97152013-06-24 Tom Tromey <tromey@redhat.com>
9716
9717 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
9718 create-version.sh.
9719 (version.o): Remove.
9720 * gdbreplay.c: Include version.h.
9721 (version, host_name): Don't declare.
9722 * server.h: Include version.h.
9723 (version, host_name): Don't declare.
9724
760256f9
PA
97252013-06-12 Pedro Alves <palves@redhat.com>
9726
9727 * linux-x86-low.c (linux_is_elf64): Delete global.
9728 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
9729 with local linux_pid_exe_is_elf_64_file use.
9730
030031ee
PA
97312013-06-11 Pedro Alves <palves@redhat.com>
9732
9733 * linux-low.c (regset_disabled, disable_regset): New functions.
9734 (regsets_fetch_inferior_registers)
9735 (regsets_store_inferior_registers): Use them.
9736 (initialize_regsets_info); Don't allocate the disabled_regsets
9737 array here.
9738 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
9739 comment.
9740
5da6eb0a
PA
97412013-06-11 Pedro Alves <palves@redhat.com>
9742
9743 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
9744 xmalloc.
9745
7e5aaa09
PA
97462013-06-11 Pedro Alves <palves@redhat.com>
9747
9748 * linux-x86-low.c (initialize_low_arch): Call
9749 init_registers_x32_avx_linux.
9750
d878444c
JK
97512013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
9752
9753 Fix compatibility with Android Bionic.
9754 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
9755 it is not empty.
9756
3aee8918
PA
97572013-06-07 Pedro Alves <palves@redhat.com>
9758
5f2b57b5 9759 PR server/14823
3aee8918
PA
9760 * Makefile.in (OBS): Add tdesc.o.
9761 (IPA_OBJS): Add tdesc-ipa.o.
9762 (tdesc-ipa.o): New rule.
9763 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
9764 interface.
9765 * linux-low.c (new_inferior): Delete.
9766 (disabled_regsets, num_regsets): Delete.
9767 (linux_add_process): Adjust to set the new per-process
9768 new_inferior flag.
9769 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
9770 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
9771 was a stop. When calling arch_setup, switch the current inferior
9772 to the thread that got an event.
9773 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
9774 (regsets_fetch_inferior_registers)
9775 (regsets_store_inferior_registers): New regsets_info parameter.
9776 Adjust to use it.
9777 (linux_register_in_regsets): New regs_info parameter. Adjust to
9778 use it.
9779 (register_addr, fetch_register, store_register): New usrregs_info
9780 parameter. Adjust to use it.
9781 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
9782 parameter regs_info. Adjust to use it.
9783 (linux_fetch_registers): Get the current inferior's regs_info, and
9784 adjust to use it.
9785 (linux_store_registers): Ditto.
9786 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
9787 (initialize_low): Don't initialize the target_regsets here. Call
9788 initialize_low_arch.
9789 * linux-low.h (target_regsets): Delete declaration.
9790 (struct regsets_info): New.
9791 (struct usrregs_info): New.
9792 (struct regs_info): New.
9793 (struct process_info_private) <new_inferior>: New field.
9794 (struct linux_target_ops): Delete the num_regs, regmap, and
9795 regset_bitmap fields. New field regs_info.
9796 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
9797 * i387-fp.c (num_xmm_registers): Delete.
9798 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
9799 calls to new interface.
9800 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
9801 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
9802 Infer the number of xmm registers from the regcache's target
9803 description.
9804 * i387-fp.h (num_xmm_registers): Delete.
9805 * inferiors.c (add_thread): Don't install the thread's regcache
9806 here.
9807 * proc-service.c (gregset_info): Fetch the current inferior's
9808 regs_info. Adjust to use it.
9809 * regcache.c: Include tdesc.h.
9810 (register_bytes, reg_defs, num_registers)
9811 (gdbserver_expedite_regs): Delete.
9812 (get_thread_regcache): If the thread doesn't have a regcache yet,
9813 create one, instead of aborting gdbserver.
9814 (regcache_invalidate_one): Rename to ...
9815 (regcache_invalidate_thread): ... this.
9816 (regcache_invalidate_one): New.
9817 (regcache_invalidate): Only invalidate registers of the current
9818 process.
9819 (init_register_cache): Add target_desc parameter, and use it.
9820 (new_register_cache): Ditto. Assert the target description has a
9821 non zero registers_size.
9822 (regcache_cpy): Add assertions. Adjust.
9823 (realloc_register_cache, set_register_cache): Delete.
9824 (registers_to_string, registers_from_string): Adjust.
9825 (find_register_by_name, find_regno, find_register_by_number)
9826 (register_cache_size): Add target_desc parameter, and use it.
9827 (free_register_cache_thread, free_register_cache_thread_one)
9828 (regcache_release, register_cache_size): New.
9829 (register_size): Add target_desc parameter, and use it.
9830 (register_data, supply_register, supply_register_zeroed)
9831 (supply_regblock, supply_register_by_name, collect_register)
9832 (collect_register_as_string, collect_register_by_name): Adjust.
9833 * regcache.h (struct target_desc): Forward declare.
9834 (struct regcache) <tdesc>: New field.
9835 (init_register_cache, new_register_cache): Add target_desc
9836 parameter.
9837 (regcache_invalidate_thread): Declare.
9838 (regcache_invalidate_one): Delete declaration.
9839 (regcache_release): Declare.
9840 (find_register_by_number, register_cache_size, register_size)
9841 (find_regno): Add target_desc parameter.
9842 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
9843 declarations.
9844 * remote-utils.c: Include tdesc.h.
9845 (outreg, prepare_resume_reply): Adjust.
9846 * server.c: Include tdesc.h.
9847 (gdbserver_xmltarget): Delete declaration.
9848 (get_features_xml, process_serial_event): Adjust.
9849 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
9850 declare.
9851 (struct process_info) <tdesc>: New field.
9852 (ipa_tdesc): Declare.
9853 * tdesc.c: New file.
9854 * tdesc.h: New file.
9855 * tracepoint.c: Include tdesc.h.
9856 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
9857 (get_context_regcache): Adjust to pass ipa_tdesc down.
9858 (do_action_at_tracepoint): Adjust to get the register cache size
9859 from the context regcache's description.
9860 (traceframe_walk_blocks): Adjust to get the register cache size
9861 from the current trace frame's description.
9862 (traceframe_get_pc): Adjust to get current trace frame's
9863 description and pass it down.
9864 (gdb_collect): Adjust to get the register cache size from the
9865 IPA's description.
9866 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
9867 (gdbserver_xmltarget): Delete.
9868 (initialize_low_tracepoint): Set the ipa's target description.
9869 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
9870 (initialize_low_tracepoint): Set the ipa's target description.
9871 * linux-x86-low.c: Include tdesc.h.
9872 [__x86_64__] (is_64bit_tdesc): New.
9873 (ps_get_thread_area, x86_get_thread_area): Use it.
9874 (i386_cannot_store_register): Rename to ...
9875 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
9876 (i386_cannot_fetch_register): Rename to ...
9877 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
9878 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
9879 to new interface.
9880 (target_regsets): Rename to ...
9881 (x86_regsets): ... this.
9882 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
9883 interface.
9884 (x86_siginfo_fixup): Use is_64bit_tdesc.
9885 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
9886 (tdesc_x32_avx_linux, tdesc_x32_linux)
9887 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
9888 Declare.
9889 (x86_linux_update_xmltarget): Delete.
9890 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
9891 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
9892 (AMD64_LINUX_USER64_CS): New.
9893 (x86_linux_read_description): New, based on
9894 x86_linux_update_xmltarget.
9895 (same_process_callback): New.
9896 (x86_arch_setup_process_callback): New.
9897 (x86_linux_update_xmltarget): New.
9898 (x86_regsets_info): New.
9899 (amd64_linux_regs_info): New.
9900 (i386_linux_usrregs_info): New.
9901 (i386_linux_regs_info): New.
9902 (x86_linux_regs_info): New.
9903 (x86_arch_setup): Reimplement.
9904 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
9905 (x86_emit_ops): Ditto.
9906 (the_low_target): Adjust. Install x86_linux_regs_info,
9907 x86_cannot_fetch_register, and x86_cannot_store_register.
9908 (initialize_low_arch): New.
9909 * linux-ia64-low.c (tdesc_ia64): Declare.
9910 (ia64_fetch_register): Adjust.
9911 (ia64_usrregs_info, regs_info): New globals.
9912 (ia64_regs_info): New function.
9913 (the_low_target): Adjust.
9914 (initialize_low_arch): New function.
9915 * linux-sparc-low.c (tdesc_sparc64): Declare.
9916 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
9917 Adjust.
9918 (sparc_arch_setup): New function.
9919 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
9920 (the_low_target): Adjust.
9921 (initialize_low_arch): New function.
9922 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
9923 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
9924 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
9925 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
9926 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
9927 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
9928 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
9929 (tdesc_powerpc_isa205_vsx64l): Declare.
9930 (ppc_cannot_store_register, ppc_collect_ptrace_register)
9931 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
9932 (ppc_set_pc, ppc_get_hwcap): Adjust.
9933 (ppc_usrregs_info): Forward declare.
9934 (!__powerpc64__) ppc_regmap_adjusted: New global.
9935 (ppc_arch_setup): Adjust to the current process'es target
9936 description.
9937 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
9938 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
9939 (ppc_store_evrregset): Adjust.
9940 (target_regsets): Rename to ...
9941 (ppc_regsets): ... this, and make static.
9942 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
9943 (ppc_regs_info): New function.
9944 (the_low_target): Adjust.
9945 (initialize_low_arch): New function.
9946 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
9947 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
9948 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
9949 (tdesc_s390x_linux64v2): Declare.
9950 (s390_collect_ptrace_register, s390_supply_ptrace_register)
9951 (s390_fill_gregset, s390_store_last_break): Adjust.
9952 (target_regsets): Rename to ...
9953 (s390_regsets): ... this, and make static.
9954 (s390_get_pc, s390_set_pc): Adjust.
9955 (s390_get_hwcap): New target_desc parameter, and use it.
9956 [__s390x__] (have_hwcap_s390_high_gprs): New global.
9957 (s390_arch_setup): Adjust to set the current process'es target
9958 description. Don't adjust the regmap.
9959 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
9960 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
9961 (regs_info_3264): New globals.
9962 (s390_regs_info): New function.
9963 (the_low_target): Adjust.
9964 (initialize_low_arch): New function.
9965 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
9966 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
9967 [__mips64] (init_registers_mips_linux)
9968 (init_registers_mips_dsp_linux): Delete defines.
9969 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
9970 (have_dsp): New global.
9971 (mips_read_description): New, based on mips_arch_setup.
9972 (mips_arch_setup): Reimplement.
9973 (get_usrregs_info): New function.
9974 (mips_cannot_fetch_register, mips_cannot_store_register)
9975 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
9976 (mips_fill_fpregset, mips_store_fpregset): Adjust.
9977 (target_regsets): Rename to ...
9978 (mips_regsets): ... this, and make static.
9979 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
9980 (dsp_regs_info, regs_info): New globals.
9981 (mips_regs_info): New function.
9982 (the_low_target): Adjust.
9983 (initialize_low_arch): New function.
9984 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
9985 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
9986 Declare.
9987 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
9988 (arm_read_description): New, with bits factored from
9989 arm_arch_setup.
9990 (arm_arch_setup): Reimplement.
9991 (target_regsets): Rename to ...
9992 (arm_regsets): ... this, and make static.
9993 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
9994 (arm_regs_info): New function.
9995 (the_low_target): Adjust.
9996 (initialize_low_arch): New function.
9997 * linux-m68k-low.c (tdesc_m68k): Declare.
9998 (target_regsets): Rename to ...
9999 (m68k_regsets): ... this, and make static.
10000 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
10001 (m68k_regs_info): New function.
10002 (m68k_arch_setup): New function.
10003 (the_low_target): Adjust.
10004 (initialize_low_arch): New function.
10005 * linux-sh-low.c (tdesc_sharch): Declare.
10006 (target_regsets): Rename to ...
10007 (sh_regsets): ... this, and make static.
10008 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
10009 (sh_regs_info, sh_arch_setup): New functions.
10010 (the_low_target): Adjust.
10011 (initialize_low_arch): New function.
10012 * linux-bfin-low.c (tdesc_bfin): Declare.
10013 (bfin_arch_setup): New function.
10014 (bfin_usrregs_info, regs_info): New globals.
10015 (bfin_regs_info): New function.
10016 (the_low_target): Adjust.
10017 (initialize_low_arch): New function.
10018 * linux-cris-low.c (tdesc_cris): Declare.
10019 (cris_arch_setup): New function.
10020 (cris_usrregs_info, regs_info): New globals.
10021 (cris_regs_info): New function.
10022 (the_low_target): Adjust.
10023 (initialize_low_arch): New function.
10024 * linux-cris-low.c (tdesc_crisv32): Declare.
10025 (cris_arch_setup): New function.
10026 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
10027 (cris_regs_info): New function.
10028 (the_low_target): Adjust.
10029 (initialize_low_arch): New function.
10030 * linux-m32r-low.c (tdesc_m32r): Declare.
10031 (m32r_arch_setup): New function.
10032 (m32r_usrregs_info, regs_info): New globals.
10033 (m32r_regs_info): Adjust.
10034 (initialize_low_arch): New function.
10035 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
10036 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
10037 (tic6x_usrregs_info): Forward declare.
10038 (tic6x_read_description): New function, based on ...
10039 (tic6x_arch_setup): ... this. Reimplement.
10040 (target_regsets): Rename to ...
10041 (tic6x_regsets): ... this, and make static.
10042 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
10043 (tic6x_regs_info): New function.
10044 (the_low_target): Adjust.
10045 (initialize_low_arch): New function.
10046 * linux-xtensa-low.c (tdesc_xtensa): Declare.
10047 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
10048 (target_regsets): Rename to ...
10049 (xtensa_regsets): ... this, and make static.
10050 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
10051 globals.
10052 (xtensa_arch_setup, xtensa_regs_info): New functions.
10053 (the_low_target): Adjust.
10054 (initialize_low_arch): New function.
10055 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
10056 (nios2_arch_setup): Set the current process'es tdesc.
10057 (target_regsets): Rename to ...
10058 (nios2_regsets): ... this.
10059 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
10060 (nios2_regs_info): New function.
10061 (the_low_target): Adjust.
10062 (initialize_low_arch): New function.
a261b8f5
PA
10063 * linux-aarch64-low.c (tdesc_aarch64): Declare.
10064 (aarch64_arch_setup): Set the current process'es tdesc.
10065 (target_regsets): Rename to ...
10066 (aarch64_regsets): ... this.
10067 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
10068 (aarch64_regs_info): New function.
10069 (the_low_target): Adjust.
10070 (initialize_low_arch): New function.
3aee8918
PA
10071 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
10072 globals.
10073 (target_regsets): Rename to ...
10074 (tile_regsets): ... this.
10075 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
10076 (tile_regs_info): New function.
10077 (tile_arch_setup): Set the current process'es tdesc.
10078 (the_low_target): Adjust.
10079 (initialize_low_arch): New function.
10080 * spu-low.c (tdesc_spu): Declare.
10081 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
10082 * win32-arm-low.c (tdesc_arm): Declare.
10083 (arm_arch_setup): New function.
10084 (the_low_target): Install arm_arch_setup instead of
10085 init_registers_arm.
10086 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
10087 (init_windows_x86): Rename to ...
10088 (i386_arch_setup): ... this. Set `win32_tdesc'.
10089 (the_low_target): Adjust.
10090 * win32-low.c (win32_tdesc): New global.
10091 (child_add_thread): Don't create the thread cache here.
10092 (do_initial_child_stuff): Set the new process'es tdesc.
10093 * win32-low.h (struct target_desc): Forward declare.
10094 (win32_tdesc): Declare.
10095 * lynx-i386-low.c (tdesc_i386): Declare global.
10096 (lynx_i386_arch_setup): Set `lynx_tdesc'.
10097 * lynx-low.c (lynx_tdesc): New global.
10098 (lynx_add_process): Set the new process'es tdesc.
10099 * lynx-low.h (struct target_desc): Forward declare.
10100 (lynx_tdesc): Declare global.
10101 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
10102 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
10103 * nto-low.c (nto_tdesc): New global.
10104 (do_attach): Set the new process'es tdesc.
10105 * nto-low.h (struct target_desc): Forward declare.
10106 (nto_tdesc): Declare.
10107 * nto-x86-low.c (tdesc_i386): Declare.
10108 (nto_x86_arch_setup): Set `nto_tdesc'.
10109
b1fbec62
GB
101102013-06-04 Gary Benson <gbenson@redhat.com>
10111
10112 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
10113 to qSupported response when appropriate.
10114 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
10115 with nonzero-length annex.
10116 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
10117 arguments supplied in annex.
10118
d1ec4ce7
DE
101192013-05-31 Doug Evans <dje@google.com>
10120
ac44adcb 10121 PR server/15594
d1ec4ce7
DE
10122 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
10123 64 bits in 64-cross-32 environment.
10124
9b25f2d3
PA
101252013-05-28 Pedro Alves <palves@redhat.com>
10126
10127 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
10128 (aarch64-without-fpu.c): Delete rule.
10129 * configure.srv (aarch64*-*-linux*): Remove references to
10130 aarch64-without-fpu.o and aarch64-without-fpu.xml.
10131 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
10132 declaration.
10133
6740dc9c
PA
101342013-05-24 Pedro Alves <palves@redhat.com>
10135
10136 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
10137 instead of strchr/decode_address. Error if the range isn't split
10138 with a ','. Don't assume there's be a ':' in the action.
10139
c2d6af84
PA
101402013-05-23 Yao Qi <yao@codesourcery.com>
10141 Pedro Alves <palves@redhat.com>
10142
10143 * linux-low.c (lwp_in_step_range): New function.
10144 (linux_wait_1): If the thread was range stepping and stopped
10145 outside the stepping range, report the stop to GDB. Otherwise,
10146 continue stepping. Add range stepping debug output.
10147 (linux_set_resume_request): Copy the step range from the resume
10148 request to the lwp.
10149 (linux_supports_range_stepping): New.
10150 (linux_target_ops) <supports_range_stepping>: Set to
10151 linux_supports_range_stepping.
10152 * linux-low.h (struct linux_target_ops)
10153 <supports_range_stepping>: New field.
10154 (struct lwp_info) <step_range_start, step_range_end>: New fields.
10155 * linux-x86-low.c (x86_supports_range_stepping): New.
10156 (the_low_target) <supports_range_stepping>: Set to
10157 x86_supports_range_stepping.
10158 * server.c (handle_v_cont): Handle 'r' action.
10159 (handle_v_requests): Append ";r" if the target supports range
10160 stepping.
10161 * target.h (struct thread_resume) <step_range_start,
10162 step_range_end>: New fields.
10163 (struct target_ops) <supports_range_stepping>:
10164 New field.
10165 (target_supports_range_stepping): New macro.
10166
58794e1a
JB
101672013-05-17 Joel Brobecker <brobecker@adacore.com>
10168
10169 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
10170 confusion in comment.
10171
d631c5a7
JB
101722013-05-17 Joel Brobecker <brobecker@adacore.com>
10173
10174 * lynx-low.c (struct process_info_private): New type.
10175 (lynx_add_process): New function.
10176 (lynx_create_inferior, lynx_attach): Replace calls to
10177 add_process by calls to lynx_add_process.
10178 (lynx_resume): If PTID is null, then try using
10179 current_process()->private->last_wait_event_ptid.
10180 Add comments.
10181 (lynx_clear_inferiors): Delete. The contents of that function
10182 has been inlined in lynx_mourn;
10183 (lynx_wait_1): Save the ptid in the process's private data.
10184 (lynx_mourn): Free the process' private data. Replace call
10185 to lynx_clear_inferiors by call to clear_inferiors.
10186
96f7a20f
YQ
101872013-05-17 Yao Qi <yao@codesourcery.com>
10188
10189 * i386-low.c (i386_length_and_rw_bits): Move the comment to
10190 the right place.
10191
db0dfaa0
LM
101922013-05-16 Luis Machado <lgustavo@codesourcery.com>
10193
10194 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
10195 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
10196 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
10197 PT_TEXT_END_ADDR guards. Update comments.
10198 (linux_target_op) <read_offsets>: Conditionally define to
10199 linux_read_offsets if the target is UCLIBC and if it defines
10200 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
10201
68f5f838
SL
102022013-05-06 Sandra Loosemore <sandra@codesourcery.com>
10203 Andrew Jenner <andrew@codesourcery.com>
10204
10205 * Makefile.in (SFILES): Add linux-nios2-low.c.
10206 (clean): Add action to delete nios2-linux.c.
10207 (nios2-linux.c): New rule.
10208 * configure.srv: Add nios2*-*-linux*.
10209 * linux-nios2-low.c: New.
10210
1ebff1fd
HAQ
102112013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
10212
10213 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
10214
f6150862
HZ
102152013-04-25 Hui Zhu <hui@codesourcery.com>
10216
10217 PR gdb/15186
f6150862
HZ
10218 * ax.c (ax_printf): Add fflush.
10219
614c279d
TT
102202013-04-22 Tom Tromey <tromey@redhat.com>
10221
10222 * Makefile.in (SFILES): Add filestuff.c.
10223 (OBS): Add filestuff.o.
10224 (filestuff.o): New target.
10225 * config.in, configure: Rebuild.
10226 * configure.ac: Check for fdwalk, pipe2.
10227
7d4e5717
PA
102282013-04-17 Pedro Alves <palves@redhat.com>
10229
10230 * configure.ac (USE_THREAD_DB): Delete variable.
10231 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
10232 Don't AC_SUBST USE_THREAD_DB.
10233 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
10234 * config.in, configure: Regenerate.
10235
d5c93e41
PA
102362013-04-16 Pedro Alves <palves@redhat.com>
10237
10238 * linux-low.h (struct lwp_info) <thread_known>: Move under
10239 the USE_THREAD_DB #ifdef.
10240
04f5fe89
PA
102412013-04-16 Pedro Alves <palves@redhat.com>
10242
10243 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
10244 (linux-low.o): Delete rule.
10245 * linux-low.h: Always include "gdb_thread_db.h" instead of
10246 conditionally including thread_db.h.
10247 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
10248 HAVE_THREAD_DB_H.
10249
480b27bf
JK
102502013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
10251
10252 * Makefile.in (install-only): Fix make install regression.
10253
43662968
JK
102542013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
10255
10256 Convert man pages to texinfo, new gdbinit.5 texinfo page.
10257 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
10258 installation.
10259 * gdbserver.1: Remove.
10260
3e74e146
PA
102612013-03-22 Pedro Alves <palves@redhat.com>
10262
10263 * linux-low.c (handle_extended_wait): Don't call
10264 linux_enable_event_reporting.
10265
a8347a2a
TT
102662013-03-15 Tony Theodore <tonyt@logyst.com>
10267
10268 PR build/9098:
10269 * Makefile.in (SHELL): Use @SHELL@.
10270
eeb56fa7
SDJ
102712013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
10272
10273 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
10274 compiler warning.
10275
4fa7e2ff
JB
102762013-03-13 Joel Brobecker <brobecker@adacore.com>
10277
10278 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
10279 Remove extraneous NULL element.
10280
8ddb1965
YQ
102812013-03-13 Yao Qi <yao@codesourcery.com>
10282
10283 * tracepoint.c (traceframe_read_tsv): Look for the last matched
10284 'V' block in trace frame.
10285
9accd112
MM
102862013-03-11 Markus Metzger <markus.t.metzger@intel.com>
10287
10288 * target.h (struct target_ops): Add btrace ops.
10289 (target_supports_btrace): New macro.
10290 (target_enable_btrace): New macro.
10291 (target_disable_btrace): New macro.
10292 (target_read_btrace): New macro.
10293 * gdbthread.h (struct thread_info): Add btrace field.
10294 * server.c: Include btrace-common.h.
10295 (handle_btrace_general_set): New function.
10296 (handle_btrace_enable): New function.
10297 (handle_btrace_disable): New function.
10298 (handle_general_set): Call handle_btrace_general_set.
10299 (handle_qxfer_btrace): New function.
10300 (struct qxfer qxfer_packets[]): Add btrace entry.
10301 * inferiors.c (remove_thread): Disable btrace.
10302 * linux-low: Include linux-btrace.h.
10303 (linux_low_enable_btrace): New function.
10304 (linux_low_read_btrace): New function.
10305 (linux_target_ops): Add btrace ops.
10306 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
10307 Add srv_linux_btrace=yes.
10308 (x86_64-*-linux*): Add linux-btrace.o.
10309 Add srv_linux_btrace=yes.
10310 * configure.ac: Define HAVE_LINUX_BTRACE.
10311 * config.in: Regenerated.
10312 * configure: Regenerated.
10313
5cc22e4c
MM
103142013-03-11 Markus Metzger <markus.t.metzger@intel.com>
10315
10316 * server.c (handle_qxfer): Preserve error message if -3 is
10317 returned.
10318 (qxfer): Document the -3 return value.
10319
7c97f91e
MM
103202013-03-11 Markus Metzger <markus.t.metzger@intel.com>
10321
10322 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
10323 (linux_btrace_h): New variable.
10324 (linux-btrace.o): New rule.
10325
be9a119c 103262013-03-08 Stan Shebs <stan@codesourcery.com>
f6f899bf
HAQ
10327 Hafiz Abid Qadeer <abidh@codesourcery.com>
10328
10329 * tracepoint.c (trace_buffer_size): New global.
10330 (DEFAULT_TRACE_BUFFER_SIZE): New define.
10331 (init_trace_buffer): Change to one-argument function. Allocate
10332 trace buffer memory.
10333 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
10334 handle QTBuffer:size packet.
10335 (cmd_bigqtbuffer_size): New function.
10336 (initialize_tracepoint): Call init_trace_buffer with
10337 DEFAULT_TRACE_BUFFER_SIZE.
10338 * server.c (handle_query): Add QTBuffer:size in the
10339 supported packets.
10340
e64f7499
YQ
103412013-03-07 Yao Qi <yao@codesourcery.com>
10342
10343 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
10344 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
10345 of -1.
10346 (cmd_qtsp): Adjust condition. Do post increment.
10347 Set cur_action and cur_step_action back to 0.
10348
f0ae6fc3
PA
103492013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
10350
10351 PR server/15236
10352 * linux-low.c (linux_write_memory): Return early success if LEN is
10353 zero.
10354
b5b0b0af
CV
103552013-03-05 Corinna Vinschen <vinschen@redhat.de>
10356
334ad4a8 10357 * configure.srv: Add x86_64-*-cygwin* as target.
b5b0b0af 10358
589bc927
TT
103592013-02-28 Tom Tromey <tromey@redhat.com>
10360
10361 * configure.ac: Invoke AC_SYS_LARGEFILE.
10362 * configure, config.in: Rebuild.
10363
dfe07582
CV
103642013-02-28 Corinna Vinschen <vinschen@redhat.com>
10365
10366 * win32-low.c: Throughout, fix format strings and casts of
10367 printf-like functions to avoid type related warnings on all
10368 platforms.
10369 (get_child_debug_event): Print dwDebugEventCode as hex since
10370 that's how it's usually documented.
10371
736cd585
YQ
103722013-02-28 Yao Qi <yao@codesourcery.com>
10373
10374 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
10375 pulongest.
10376
e1f58301
JW
103772013-02-27 Jiong Wang <jiwang@tilera.com>
10378
10379 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
10380 (reg-tilegx32.c): New rule.
10381 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
10382 * linux-tile-low.c (tile_arch_setup): New function. Invoke
10383 different register info initializer according to elf class.
10384 (init_registers_tilgx32): New function. The tilegx32 register info
10385 initializer.
10386 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
10387 (tile_store_gregset): Likewise.
10388
d171ca78
YQ
103892013-02-27 Yao Qi <yao@codesourcery.com>
10390
10391 * server.c (process_point_options): Print debug message when
10392 debug_threads is true.
10393
282bbdf3
YQ
103942013-02-26 Yao Qi <yao@codesourcery.com>
10395
10396 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
10397
aca22551
PA
103982013-02-19 Pedro Alves <palves@redhat.com>
10399 Kai Tietz <ktietz@redhat.com>
10400
10401 PR gdb/15161
10402
10403 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
10404 instead of strtoul to extract address from packet.
10405 (process_serial_event) <'z'>: Likewise.
10406
4f3cee1c
YQ
104072013-02-18 Yao Qi <yao@codesourcery.com>
10408
10409 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
10410
8e1d55a3
PA
104112013-02-14 Pedro Alves <palves@redhat.com>
10412
10413 Plug memory leak.
10414
10415 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
10416 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
10417
458820da
PA
104182013-02-14 Pedro Alves <palves@redhat.com>
10419
10420 * tracepoint.c (cmd_qtdpsrc): Use savestring.
10421
baea0dae
PA
104222013-02-14 Pedro Alves <palves@redhat.com>
10423
10424 * tracepoint.c (save_string): Delete.
10425 (add_tracepoint_action): Use savestring instead of save_string.
10426
0b1afbb3
PA
104272013-02-12 Pedro Alves <palves@redhat.com>
10428
10429 * linux-xtensa-low.c: Ditto.
10430 * xtensa-xtregs.c: Ditto.
10431
8a4ac37e
PA
104322013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
10433
10434 * thread-db.c (thread_db_get_tls_address): NULL pointer check
10435 thread_db.
10436
148de6bb
MS
104372013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
10438
10439 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
10440 aarch64_num_wp_regs and aarch64_num_bp_regs to
10441 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
10442
55fac6e0
MS
104432013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
10444
10445 * linux-aarch64-low.c (ps_get_thread_area): Replace
10446 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
10447
176eb98c
MS
104482013-02-04 Jim MacArthur <jim.macarthur@arm.com>
10449 Marcus Shawcroft <marcus.shawcroft@arm.com>
10450 Nigel Stephens <nigel.stephens@arm.com>
10451 Yufeng Zhang <yufeng.zhang@arm.com>
10452
10453 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
10454 (aarch64.c, aarch64-without-fpu.c): New targets.
10455 * configure.srv (aarch64*-*-linux*): New.
10456 * linux-aarch64-low.c: New file.
10457
56f7af9c
MS
104582013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
10459
43aaf8b6 10460 * linux-low.c (handle_extended_wait, linux_create_inferior)
56f7af9c
MS
10461 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
10462 (dequeue_one_deferred_signal, linux_resume_one_thread)
10463 (fetch_register, linux_write_memory, linux_enable_event_reporting)
10464 (linux_tracefork_grandchild, linux_test_for_tracefork)
10465 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
10466 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
10467 where the argument is 0.
10468
60f662b0
YQ
104692013-01-25 Yao Qi <yao@codesourcery.com>
10470
10471 * event-loop.c: Include "queue.h".
10472 (gdb_event_p): New typedef.
10473 (struct gdb_event) <next_event>: Remove.
10474 (event_queue): Change to QUEUE(gdb_event_p).
10475 (async_queue_event): Remove.
10476 (gdb_event_xfree): New.
10477 (initialize_event_loop): New.
10478 (process_event): Use API from QUEUE.
10479 (wait_for_event): Likewise.
10480 * server.c (main): Call initialize_event_loop.
10481 * server.h (initialize_event_loop): Declare.
10482
5ae4861a
YQ
104832013-01-18 Yao Qi <yao@codesourcery.com>
10484
10485 * ax.h (struct eval_agent_expr_context): New.
10486 (gdb_eval_agent_expr): Update declaration.
10487 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
10488 TFRAME. Add new argument CTX.
10489 * server.h (struct eval_agent_expr_context): Declare.
10490 (agent_mem_read, agent_tsv_read): Update declaration.
10491 (agent_mem_read_string): Likewise.
10492 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
10493 (add_traceframe_block): Add new argument TPOINT.
10494 Increase TPOINT->traceframe_usage.
10495 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
10496 eval_tracepoint_agent_expr.
10497 (condition_true_at_tracepoint): Likewise.
10498 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
10499 (agent_mem_read_string, agent_tsv_read): Likewise.
10500
85e00e85
YQ
105012013-01-16 Yao Qi <yao@codesourcery.com>
10502
10503 * linux-low.c (linux_resume_one_lwp): Don't check
10504 'lwp->bp_reinsert != 0'.
10505
4039cf45
JB
105062013-01-07 Joel Brobecker <brobecker@adacore.com>
10507 Pedro Alves <palves@redhat.com>
10508
10509 * lynx-low.c (ptrace_request_to_str): Define a temporary
10510 macro and use it to simplify this function's implementation.
10511
9044dee2
JB
105122013-01-07 Joel Brobecker <brobecker@adacore.com>
10513
10514 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
10515 sets errno.
10516
e6352c8f
JB
105172013-01-07 Joel Brobecker <brobecker@adacore.com>
10518
10519 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
10520
50681a27
JB
105212013-01-07 Joel Brobecker <brobecker@adacore.com>
10522
10523 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
10524
3f6e77ef
JB
105252013-01-07 Joel Brobecker <brobecker@adacore.com>
10526
10527 * lynx-low.c (lynx_resume): Use the resume_info parameter
10528 to determine the ptid for the lynx_ptrace call, unless
10529 it is equal to minus_one_ptid, in which case we use the
10530 ptid of the current_inferior.
10531 (lynx_wait_1): After having received a thread create/exit
10532 event, resume the inferior's execution using the signaling
10533 thread's ptid, rather than the old ptid.
10534
7fda33ae
JB
105352013-01-07 Joel Brobecker <brobecker@adacore.com>
10536
10537 * lynx-low.c (lynx_resume): Delete variable ret.
10538
b9786c74
JB
105392013-01-01 Joel Brobecker <brobecker@adacore.com>
10540
10541 * gdbreplay.c (gdbreplay_version): Update copyright year.
10542 * server.c (gdbserver_version): Likewise.
10543
8b93d60f
JB
105442012-12-17 Joel Brobecker <brobecker@adacore.com>
10545
10546 * lynx-low.c (lynx_wait_1): Add debug trace before adding
10547 new thread.
10548
037335a7
JB
105492012-12-17 Joel Brobecker <brobecker@adacore.com>
10550
10551 * lynx-low.c (ptrace_request_to_str): Add handling for
10552 PTRACE_GETTRACESIG.
10553
52d4cbd8
JB
105542012-12-17 Joel Brobecker <brobecker@adacore.com>
10555
10556 * lynx-low.c (lynx_attach): Delete variable new_process.
10557
ab8f6ca9
JB
105582012-12-17 Joel Brobecker <brobecker@adacore.com>
10559
10560 * lynx-low.c (lynx_create_inferior): Delete variable
10561 new_process.
10562
78cbc024
JB
105632012-12-17 Joel Brobecker <brobecker@adacore.com>
10564
10565 * lynx-low.c (ptrace_request_to_str): Do not handle
10566 PTRACE_GETTHREADLIST if this macro does not exist.
10567
14a00470
YQ
105682012-12-15 Yao Qi <yao@codesourcery.com>
10569
10570 * Makefile.in (OBS): Add notif.o.
10571 * notif.c, notif.h: New.
10572 * server.c: Include "notif.h".
10573 (struct vstop_notif) <next>: Remove.
10574 <base>: New field.
10575 (queue_stop_reply): Update.
10576 (push_event, send_next_stop_reply): Remove.
10577 (discard_queued_stop_replies): Update.
10578 (notif_stop): New variable.
10579 (handle_v_stopped): Remove.
10580 (handle_v_requests): Don't call handle_v_stopped. Call
10581 handle_ack_notif instead.
10582 (queue_stop_reply_callback): Call notif_event_enque instead
10583 of queue_stop_reply.
10584 (handle_status): Don't call send_next_stop_reply, call
10585 notif_write_event instead.
10586 (kill_inferior_callback): Likewise.
10587 (detach_or_kill_inferior_callback): Likewise.
10588 (main): Call initialize_notif.
10589 (process_serial_event): Call QUEUE_is_empty.
10590 (handle_target_event): Call notif_push instead of push event.
10591 * server.h (push_event): Remove declaration.
10592
61c125b9
TT
105932012-12-10 Tom Tromey <tromey@redhat.com>
10594
10595 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
10596 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
10597 macros.
10598 (.c.o): Rewrite.
10599 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
10600 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
10601 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
10602 (amd64-linux-ipa.o, ax.o): Rewrite.
10603 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
10604 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
10605 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
10606 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
10607 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
10608 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
10609 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
10610 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
10611 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
10612 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
10613 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
10614 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
10615 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
10616 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
10617 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
10618 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
10619 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
10620 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
10621 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
10622 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
10623 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
10624 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
10625 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
10626 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
10627 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
10628 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
10629 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
10630 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
10631 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
10632 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
10633 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
10634 (reg-tilegx.o): Remove.
10635 (all_object_files): New macro.
10636 Include .deps files.
10637 * aclocal.m4, configure: Rebuild.
10638 * acinclude.m4: Include depstand.m4, lead-dot.m4.
10639 * configure.ac: Invoke ZW_CREATE_DEPDIR,
10640 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
10641
e90e9ad9
TT
106422012-12-05 Tom Tromey <tromey@redhat.com>
10643
10644 PR gdb/14917:
10645 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
10646
02d403bf 106472012-11-28 Markus Metzger <markus.t.metzger@intel.com>
945bf713
MM
10648
10649 * configure.ac: Check for linux/perf_event.h.
10650 * config.in: Regenerated.
10651 * configure: Regenerated.
10652
0270a750
PA
106532012-11-26 Maxime Villard <rustyBSD@gmx.fr>
10654
10655 * hostio.c (handle_readlink): Decrease buffer size
10656 parameter passed to readlink by one byte.
10657
8c29b58e
YQ
106582012-11-26 Yao Qi <yao@codesourcery.com>
10659
10660 * configure.ac (build_warnings): Append '-Wempty-body'.
10661 * configure: Regenerated.
10662 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
10663 body.
10664
8bdce1ff
PM
106652012-11-15 Pierre Muller <muller@sourceware.org>
10666
10667 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
10668 * config.in: Regenerate.
10669 * configure: Regenerate.
10670 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
10671 Use "gdb_wait.h" header instead of <sys/wait.h> header.
10672 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
10673 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
10674 header.
10675 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
10676 instead of <sys/wait.h> header.
10677 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
10678
02d403bf 106792012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3ba6ad0f
MM
10680
10681 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
10682 (various make rules): Remove -DGDBSERVER
10683
fbd5db48
YQ
106842012-11-09 Yao Qi <yao@codesourcery.com>
10685
10686 * spu-low.c (current_ptid): Move it to ..
10687 * gdbthread.h: ... here. New.
10688 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
10689 * server.c (myresume, process_serial_event): Likewise.
10690 * thread-db.c (thread_db_find_new_threads): Likewise.
10691 * tracepoint.c (run_inferior_command): Likewise.
10692
b3dc46ff
AB
106932012-10-01 Andrew Burgess <aburgess@broadcom.com>
10694
10695 * server.c (handle_search_memory_1): Include access length in
10696 warning message.
10697
07c04788
HPN
106982012-09-05 Michael Brandt <michael.brandt@axis.com>
10699
10700 * linux-crisv32-low.c: Fix compile errors.
10701
918d227b
YQ
107022012-09-04 Yao Qi <yao@codesourcery.com>
10703
10704 * tracepoint.c (cmd_qtsv): Adjust debug message.
10705 Don't check CUR_TPOINT.
10706
18c1b81a
YQ
107072012-08-28 Yao Qi <yao@codesourcery.com>
10708
10709 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
10710 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
10711 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
10712 Remove declarations of xmalloc, xreallloc, xstrdup and
10713 freeargv.
10714 * Makefile.in (libiberty_h): New.
10715 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
10716 (linux-bfin-low.o): Append dependency 'libiberty.h'.
10717
dc82f37b
YQ
107182012-08-23 Yao Qi <yao@codesourcery.com>
10719
10720 * server.h: Remove declaration of 'xsnprintf'.
10721
406b1477
KS
107222012-08-22 Keith Seitz <keiths@redhat.com>
10723
10724 * server.h: Include build-gnulib-gbserver/config.h.
10725 * gdbreplay.c: Likewise.
10726
e6712ff1
DE
107272012-08-08 Doug Evans <dje@google.com>
10728
10729 * Makefile.in (SFILES): Add gdb_vecs.c.
10730 (OBS): Add gdb_vecs.o.
10731 (gdb_vecs_h, host_defs_h): New variables.
10732 (thread-db.o): Add $(gdb_vecs_h) dependency.
10733 (gdb_vecs.o): New rule.
10734 * thread-db.c: #include "gdb_vecs.h".
10735 (thread_db_load_search): Use a vector to iterate over path elements.
10736 Handle text appearing after "$pdir".
10737
10738 * configure.ac: Add check for strstr.
10739 * config.in: Regenerate.
10740 * configure: Regenerate.
10741
7c3270ae
UW
107422012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
10743
10744 * hostio.c (handle_pread): If pread fails, fall back to attempting
10745 lseek/read.
10746 (handle_pwrite): Likewise for pwrite.
10747
b62e2b27
UW
107482012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
10749
10750 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
10751 between unsupported TYPE and unimplementable ADDR/LEN combination.
10752 (arm_insert_point): Act on new return value.
10753
78a99e91
PA
107542012-07-31 Pedro Alves <palves@redhat.com>
10755
10756 * server.c (process_point_options): Only skip tokens if we find
10757 one that is unrecognized. Don't treat 'X' specially while
10758 skipping unrecognized tokens.
10759
fcf303ab
UW
107602012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
10761
10762 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
10763 to 4-byte-align HW breakpoint addresses for Thumb.
10764
7255706c
YQ
107652012-07-27 Yao Qi <yao@codesourcery.com>
10766
10767 PR remote/14161.
10768
10769 * server.h: Declare gdb_agent_about_to_close.
10770 * target.c (kill_inferior): Include "agent.h".
10771 New. Send command 'kill'.
10772 * target.h (kill_inferior): Removed macro.
10773 * tracepoint.c (gdb_agent_about_to_close): New.
10774 (gdb_agent_helper_thread): Handle command 'close'.
10775 Wait endlessly until the inferior stops.
10776 Install gdb_agent_remove_socket to atexit hook.
10777 (agent_socket_name): New static variable.
10778 (gdb_agent_socket_init): Replace local variable 'name' with
10779 'agent_socket_name'.
10780 (gdb_agent_remove_socket): New.
10781
5a3f286f
YQ
107822012-07-27 Yao Qi <yao@codesourcery.com>
10783
10784 * server.c (process_point_options): Stop at 'X' when parsing.
10785
961bd387
ME
107862012-07-19 Michael Eager <eager@eagercon.com>
10787
a261b8f5 10788 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
961bd387
ME
10789 to hw_execute.
10790 * linux-x86-low.c (x86_insert_point, x86_remove_point):
10791 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
10792 hardware breakpoint.
10793
aa7c7447
JK
107942012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
10795
10796 * gdbserver/linux-low.c (initialize_low): Call
10797 linux_ptrace_init_warnings.
10798
7f216e7c
DE
107992012-07-02 Doug Evans <dje@google.com>
10800
10801 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
10802 pointer to int.
10803
d3ce09f5
SS
108042012-07-02 Stan Shebs <stan@codesourcery.com>
10805
10806 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
10807 (ax.o): Add it to build rule.
10808 (ax-ipa.o): Ditto.
10809 (OBS): Add format.o.
10810 (IPA_OBS): Add format.o.
10811 * server.c (handle_query): Claim support for breakpoint commands.
10812 (process_point_options): Add command case.
10813 (process_serial_event): Leave running if there are printfs in
10814 effect.
10815 * mem-break.h (any_persistent_commands): Declare.
10816 (add_breakpoint_commands): Declare.
10817 (gdb_no_commands_at_breakpoint): Declare.
10818 (run_breakpoint_commands): Declare.
10819 * mem-break.c (struct point_command_list): New struct.
10820 (struct breakpoint): New field command_list.
10821 (any_persistent_commands): New function.
10822 (add_commands_to_breakpoint): New function.
10823 (add_breakpoint_commands): New function.
10824 (gdb_no_commands_at_breakpoint): New function.
10825 (run_breakpoint_commands): New function.
10826 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
10827 locally.
10828 * ax.c: Include format.h.
10829 (ax_printf): New function.
10830 (gdb_eval_agent_expr): Add printf opcode.
10831
2f8f6aed
YQ
108322012-06-13 Yao Qi <yao@codesourcery.com>
10833
10834 * server.c (start_inferior): Remove duplicated writes to fields
10835 'last_resume_kind' and 'last_status' of 'current_inferior'.
10836
0c9070b3
YQ
108372012-06-12 Yao Qi <yao@codesourcery.com>
10838 Pedro Alves <palves@redhat.com>
10839
10840 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
10841 comment.
10842 * server.c (handle_v_cont): Extend comment.
10843
c52daf70
YQ
108442012-06-11 Yao Qi <yao@codesourcery.com>
10845
10846 * linux-low.c (linux_attach): Add 'static'.
10847
d38bbb0a
YQ
108482012-06-06 Yao Qi <yao@codesourcery.com>
10849
10850 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
10851
89dc0afd
JK
108522012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
10853
10854 Fix gcc -flto compilation warning.
10855 * server.c (main): Make variable multi_mode and attach volatile.
10856
75f62ce7
TJB
108572012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10858
10859 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
10860 if the platform doesn't know about it.
10861
65f479b6
PA
108622012-05-30 Jeff Kenton <jkenton@tilera.com>
10863
10864 * Makefile.in (SFILES): Add linux-tile-low.c.
10865 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
10866 * configure.srv: Handle tilegx-*-linux*.
10867 * linux-tile-low.c: New file.
10868
0c5bf5a9
JK
108692012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10870
10871 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
10872
a493e3e2
PA
108732012-05-24 Pedro Alves <palves@redhat.com>
10874
10875 PR gdb/7205
10876
43aaf8b6 10877 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
a493e3e2 10878
2ea28649
PA
108792012-05-24 Pedro Alves <palves@redhat.com>
10880
10881 PR gdb/7205
10882
10883 Replace target_signal with gdb_signal throughout.
10884
8d409d16
MR
108852012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
10886
10887 * linux-low.c (linux_store_registers): Avoid the copying sequence
10888 when no data has been retrieved by ptrace.
10889
23512c01
MGD
108902012-05-22 Will Deacon <will.deacon@arm.com>
10891
10892 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
10893 Include asm/ptrace.h.
10894 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
10895 already defined.
10896
4934b29e
MR
108972012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
10898
10899 * linux-low.c (linux_store_registers): Don't re-retrieve data
10900 with ptrace that has already been obtained from /proc. Always
10901 copy any data retrieved with ptrace to the buffer supplied.
10902
bde24c0a
PA
109032012-05-11 Yao Qi <yao@codesourcery.com>
10904 Pedro Alves <palves@redhat.com>
10905
10906 * linux-low.c (enum stopping_threads_kind): New.
10907 (stopping_threads): Change type to `enum stopping_threads_kind'.
10908 (handle_extended_wait): If stopping and suspending threads, leave
10909 the new_lwp suspended too.
10910 (linux_wait_for_event): Adjust.
10911 (stop_all_lwps): Set `stopping_threads' to
10912 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
10913 whether we're suspending threads or just stopping them. Assert no
10914 recursion happens.
10915
623b6bdf
YQ
109162012-04-29 Yao Qi <yao@codesourcery.com>
10917
10918 * server.h: Move some code to ...
10919 * gdbthread.h: ... here. New.
10920 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
10921 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
10922 (nto-low.o, win32-low.o): Likewise.
10923 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
10924 * regcache.c, remote-utils.c, server.c: Likewise.
10925 * target.c, tracepoint.c, win32-low.c: Likewise.
10926
f15f9948
TJB
109272012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10928
10929 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
10930 (PTRACE_ARG4_TYPE): Likewise.
10931 (PTRACE_XFER_TYPE): Likewise.
10932 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
10933 ptrace to PTRACE_ARG3_TYPE.
10934 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
10935 (PTRACE_ARG4_TYPE): Likewise.
10936 (PTRACE_XFER_TYPE): Likewise.
10937 (linux_detach_one_lwp): Cast fourth argument of
10938 ptrace to long then PTRACE_ARG4_TYPE.
10939 (regsets_fetch_inferior_registers): Cast third argument of
10940 ptrace to long then PTRACE_ARG3_TYPE.
10941 (regsets_store_inferior_registers): Likewise.
10942
38ea300a
PA
109432012-04-20 Pedro Alves <palves@redhat.com>
10944
10945 * configure: Regenerate.
10946
c971b7fa
PA
109472012-04-19 Pedro Alves <palves@redhat.com>
10948
43aaf8b6 10949 * Makefile.in (GNULIB_BUILDDIR): New.
c971b7fa 10950 (LIBGNU, INCGNU, GNULIB_H): Adjust.
43aaf8b6
PA
10951 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
10952 (all, install-only, uninstall, clean-info, all-lib, clean): No
10953 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
10954 (maintainer-clean realclean distclean): Use subdir_do.
10955 (subdir_do): New.
10956 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
c971b7fa 10957 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
43aaf8b6
PA
10958 * acinclude.m4: Include acx_configure_dir.m4.
10959 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
10960 calls. Call AC_PROG_RANLIB. Configure gnulib using
10961 ACX_CONFIGURE_DIR.
10962 (GNULIB): New.
10963 (GNULIB_STDINT_H): Adjust.
10964 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
10965 * gdbreplay.c: Include build-gnulib/config.h.
10966 * server.h: Likewise.
10967 * aclocal.m4: Regenerate.
10968 * config.in: Regenerate.
10969 * configure: Regenerate.
c971b7fa 10970
809277f8
PA
109712012-04-19 Pedro Alves <palves@redhat.com>
10972
10973 * Makefile.in (LIBGNU, INCGNU): Adjust.
10974 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
10975 (all, install-only, uninstall, clean-info, all-lib, clean)
10976 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
10977 * configure.ac: Adjust AC_OUTPUT output.
10978 * aclocal.m4: Regenerate.
10979 * configure: Regenerate.
10980
fd9bb8b8
PA
109812012-04-19 Pedro Alves <palves@redhat.com>
10982
10983 * Makefile.in (generated_files): New.
10984 (server_h): Remove the explicit dependency on config.h, and depend
10985 on $generated_files.
10986
1c298c66
PA
109872012-04-19 Pedro Alves <palves@redhat.com>
10988
10989 * Makefile.in (INCGNU): Add -Ignulib.
10990
57c4b50b
PA
109912012-04-19 Pedro Alves <palves@redhat.com>
10992
10993 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
10994 (INCGNU): ... this, and spell out -I here.
10995 (GNULIB_LIB): Rename to ...
10996 (LIBGNU): ... this.
10997 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
10998
1030e047
PA
109992012-04-19 Pedro Alves <palves@redhat.com>
11000
11001 * config.in: Regenerate.
11002
447d4319
PA
110032012-04-19 Pedro Alves <palves@redhat.com>
11004
11005 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
11006 * server.h (memmem): Remove declaration.
11007 * config.in: Regenerate.
11008 * configure: Regenerate.
11009
aad9eab9
YQ
110102012-04-19 Yao Qi <yao@codesourcery.com>
11011
11012 * Makefile.in (SFILES): Add common/vec.c.
11013 (OBS): Add vec.o.
11014 (vec.o): New rule.
11015
3e10640f
YQ
110162012-04-19 Yao Qi <yao@codesourcery.com>
11017
11018 * remote-utils.c (prepare_resume_reply): Replace with macro
11019 target_core_of_thread.
11020 * server.c (handle_qxfer_threads_proper): Likewise.
11021 * target.h (traget_core_of_thread): New macro.
11022
71622373
PA
110232012-04-18 Pedro Alves <palves@redhat.com>
11024
11025 * aclocal.m4: Regenerate.
11026 * configure: Regenerate.
11027
80d26939
YQ
110282012-04-16 Yao Qi <yao@codesourcery.com>
11029
11030 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
11031 duplicated on address.
11032
42476b70
YQ
110332012-04-16 Yao Qi <yao@codesourcery.com>
11034
11035 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
11036 (struct tracepoint_action_ops) <send>: New field.
11037 (m_tracepoint_action_send, r_tracepoint_action_send): New.
11038 (agent_expr_send, x_tracepoint_action_send): New.
11039 (l_tracepoint_action_send): New.
11040 (cmd_qtdp): Download and install tracepoint
11041 according to `use_agent'.
11042 (run_inferior_command): Add one more parameter `len'.
11043 Update callers.
11044 (tracepoint_send_agent): New.
11045 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
11046
7bc83639
YQ
110472012-04-16 Yao Qi <yao@codesourcery.com>
11048
11049 * tracepoint.c (download_tracepoints): Moved to ...
11050 (cmd_qtstart): ... here.
11051
5f18041e
YQ
110522012-04-14 Yao Qi <yao@codesourcery.com>
11053
11054 * tracepoint.c: Include inttypes.h.
11055 (struct collect_memory_action): Use sized types.
11056 (struct tracepoint): Likewise.
11057 (cmd_qtdp, stop_tracing): Update print specifiers.
11058 (cmd_qtp, response_tracepoint): Likewise.
11059 (collect_data_at_tracepoint): Likewise.
11060 (collect_data_at_step): Likewise.
11061
55a8c076
YQ
110622012-04-14 Yao Qi <yao@codesourcery.com>
11063
11064 Import gnulib module inttypes.
11065 * aclocal.m4, config.in, configure: Regenerated.
11066
dc750257
YQ
110672012-04-14 Yao Qi <yao@codesourcery.com>
11068
11069 * Makefile.in (maintainer-clean, realclean, distclean): Remove
11070 Makefile and config.status at last.
11071
0ab5faf9
YQ
110722012-04-13 Yao Qi <yao@codesourcery.com>
11073
11074 * tracepoint.c: Include stdint.h unconditionally.
11075
18f5fd81
TJB
110762012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
11077
11078 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
11079 on BFD_HAVE_SYS_PROCFS_TYPE.
11080 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
11081 * configure: Regenerate.
11082 * config.in: Likewise.
11083
4d47af5c
L
110842012-04-13 H.J. Lu <hongjiu.lu@intel.com>
11085
11086 * Makefile.in (clean): Also remove x32.c x32-linux.c
11087 x32-avx.c x32-avx-linux.c.
11088 (x32.o): New target.
11089 (x32.c): Likewise.
11090 (x32-linux.o): Likewise.
11091 (x32-linux.c): Likewise.
11092 (x32-avx.o): Likewise.
11093 (x32-avx.c): Likewise.
11094 (x32-avx-linux.o): Likewise.
11095 (x32-avx-linux.c): Likewise.
11096
11097 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
11098 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
11099 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
11100 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
11101 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
11102 i386/x32-avx-linux.xml.
11103
11104 * linux-x86-low.c (init_registers_x32_linux): New prototype.
11105 (init_registers_x32_avx_linux): Likwise.
11106 (x86_linux_update_xmltarget): Call init_registers_x32_linux
11107 or init_registers_x32_avx_linux if linux_is_elf64 is false.
11108
ecedbe58
PA
111092012-04-13 Pedro Alves <palves@redhat.com>
11110
11111 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
11112 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
11113 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
11114 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
11115 the sub-make.
11116
c92b5177
L
111172012-04-12 H.J. Lu <hongjiu.lu@intel.com>
11118
11119 * linux-x86-low.c (compat_x32_clock_t): New.
11120 (compat_x32_siginfo_t): Likewise.
11121 (compat_x32_siginfo_from_siginfo): Likewise.
11122 (siginfo_from_compat_x32_siginfo): Likewise.
11123 (linux_is_elf64): Likewise.
11124 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
11125 and siginfo_from_compat_x32_siginfo for x32.
11126 (x86_arch_setup): Set linux_is_elf64.
11127
214d508e
L
111282012-04-12 H.J. Lu <hongjiu.lu@intel.com>
11129
11130 PR gdb/13969
11131 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
11132 e_machine field.
11133 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
11134 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
11135 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
11136 compatible with process.
11137
c9a1864a
YQ
111382012-04-12 Yao Qi <yao@codesourcery.com>
11139
11140 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
11141 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
11142 (install-only, install-info, clean): Handle sub dir gnulib.
11143 (all-lib, am--refresh): New targets.
11144 (memmem.o): Remove target.
11145 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
11146 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
11147 (AC_REPLACE_FUNCS): Remove memmem.
11148 Invoke gl_INIT and AM_INIT_AUTOMAKE.
11149 (AC_OUTPUT): Generate Makefile in gnulib/.
11150 * aclocal.m4, config.in, configure: Regenerated.
11151
367ba2c2
MR
111522012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
11153
11154 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
11155
9d236627
PA
111562012-04-05 Pedro Alves <palves@redhat.com>
11157
11158 -Werror=strict-aliasing
11159
11160 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
11161 pointer.
11162
111217b3
PA
111632012-04-04 Pedro Alves <palves@redhat.com>
11164
11165 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
11166 (sparc_store_gregset_from_stack, sparc_store_gregset)
11167 (sparc_breakpoint_at): Fix formatting.
11168
8365dcf5
TJB
111692012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
11170
11171 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
11172 are available.
11173 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
11174 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
11175 * config.in: Regenerate.
11176 * configure: Likewise.
11177
689cc2ae
PA
111782012-03-29 Pedro Alves <palves@redhat.com>
11179
11180 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
11181 Correct ptrace arguments.
11182
c14dfd32
PA
111832012-03-28 Pedro Alves <palves@redhat.com>
11184
11185 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
11186 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
11187 (IA64_FR1_REGNUM): New defines.
11188 (ia64_fetch_register): New.
11189 (the_low_target): Install it.
11190 * linux-low.h (struct linux_target_ops) <fetch_register>: New
11191 field.
11192 * linux-low.c (linux_fetch_registers): Try the
11193 the_low_target.fetch_register hook first.
11194
11195 * linux-arm-low.c (the_low_target): Adjust.
11196 * linux-bfin-low.c (the_low_target): Adjust.
11197 * linux-cris-low.c (the_low_target): Adjust.
11198 * linux-crisv32-low.c (the_low_target): Adjust.
11199 * linux-m32r-low.c (the_low_target): Adjust.
11200 * linux-m68k-low.c (the_low_target): Adjust.
11201 * linux-mips-low.c (the_low_target): Adjust.
11202 * linux-ppc-low.c (the_low_target): Adjust.
11203 * linux-s390-low.c (the_low_target): Adjust.
11204 * linux-sh-low.c (the_low_target): Adjust.
11205 * linux-sparc-low.c (the_low_target): Adjust.
11206 * linux-tic6x-low.c (the_low_target): Adjust.
11207 * linux-x86-low.c (the_low_target): Adjust.
11208 * linux-xtensa-low.c (the_low_target): Adjust.
11209
63c88e13
PA
112102012-03-26 Pedro Alves <palves@redhat.com>
11211
11212 * server.c (handle_qxfer_libraries): Don't bail early if
11213 the_target->qxfer_libraries_svr4 is not NULL.
11214
fb723180
PA
112152012-03-26 Pedro Alves <palves@redhat.com>
11216
11217 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
11218
0afae3cf
PA
112192012-03-23 Pedro Alves <palves@redhat.com>
11220
11221 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
11222 "library-list-svr4" element's start tag when the the DSO list is
11223 empty.
11224
485f1ee4
PA
112252012-03-23 Pedro Alves <palves@redhat.com>
11226
11227 * linux-low.c (read_one_ptr): Read the inferior's pointer through
11228 a variable whose type size is the same as the inferior's pointer
11229 size.
11230
a5362b9a
TS
112312012-03-21 Thomas Schwinge <thomas@codesourcery.com>
11232
11233 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
11234 struct siginfo.
11235 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
11236 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
11237 * linux-low.h: Include <signal.h>.
11238 (struct siginfo): Remove forward declaration.
11239 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
11240 struct siginfo.
11241
d226c142
MF
112422012-03-21 Mike Frysinger <vapier@gentoo.org>
11243
11244 * .gitignore: Ignore more files.
11245
122f36ef
PA
112462012-03-19 Pedro Alves <palves@redhat.com>
11247 Jan Kratochvil <jan.kratochvil@redhat.com>
11248
11249 * server.c (cont_thread, general_thread): Add describing comments.
11250 (start_inferior): Clear `cont_thread'.
11251 (handle_v_cont): Don't set `cont_thread' if resuming all threads
11252 of a process.
11253
fc3e5175
YQ
112542012-03-15 Yao Qi <yao@codesourcery.com>
11255
11256 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
11257 handling to ...
11258 (cmd_qtdp): ... here.
11259
8d0d92cd
YQ
112602012-03-15 Yao Qi <yao@codesourcery.com>
11261
11262 * tracepoint.c (struct tracepoint_action_ops): New.
11263 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
11264 (m_tracepoint_action_download): New.
11265 (r_tracepoint_action_download): New.
11266 (x_tracepoint_action_download): New.
11267 (l_tracepoint_action_download): New.
11268 (add_tracepoint_action): Install `action->ops' according type.
11269 (download_tracepoint_1): Move code `download' function pointer
11270 of various tracepoint_action_ops.
11271
87b0bb13
JK
112722012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
11273
11274 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
11275 linux_ptrace_attach_warnings.
11276
5f572dec
JK
112772012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
11278
11279 * Makefile.in (linux-ptrace.o): New.
11280 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
11281 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
11282 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
11283 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
11284 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
11285 of these targets.
11286 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
11287
f4647387
YQ
112882012-03-08 Yao Qi <yao@codesourcery.com>
11289 Pedro Alves <palves@redhat.com>
11290
11291 Fix PR server/13392.
11292 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
11293 offset of JMP insn.
11294 * tracepoint.c (remove_tracepoint): New.
11295 (cmd_qtdp): Call remove_tracepoint when failed to install.
11296
9b224c5e
PA
112972012-03-07 Pedro Alves <palves@redhat.com>
11298
11299 * linux-low.c (get_detach_signal): New.
11300 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
11301 Pass on pending signals to PTRACE_DETACH. Check the result of the
11302 ptrace call.
11303 * server.c (program_signals, program_signals_p): New.
11304 (handle_general_set): Handle QProgramSignals.
11305 * server.h (program_signals, program_signals_p): Declare.
11306
e237a7e2
JK
113072012-03-05 Pedro Alves <palves@redhat.com>
11308 Jan Kratochvil <jan.kratochvil@redhat.com>
11309
11310 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
11311 New comment why.
11312
5808517f
YQ
113132012-03-03 Yao Qi <yao@codesourcery.com>
11314
11315 * tracepoint.c (tracepoint_look_up_symbols): Update call to
11316 agent_look_up_symbols.
11317
58b4daa5
YQ
113182012-03-03 Yao Qi <yao@codesourcery.com>
11319
11320 * Makefile.in (linux-low.o): Keep dependence on agent.h.
11321 (linux-x86-low.o): Likewise.
11322 * server.h: Remove in_process_agent_loaded.
11323 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
11324 common/agent.c.
11325 Update callers.
11326
8ffcbaaf
YQ
113272012-03-03 Yao Qi <yao@codesourcery.com>
11328
11329 * tracepoint.c (gdb_agent_capability): New global.
11330 (in_process_agent_loaded_ust): Renamed to
11331 `in_process_agent_supports_ust'.
11332 Update callers.
11333 (in_process_agent_supports_ust): Call agent_capability_check.
11334 (clear_installed_tracepoints): Assert that agent supports
11335 agent.
11336
d1feda86
YQ
113372012-03-03 Yao Qi <yao@codesourcery.com>
11338
11339 * linux-low.c (linux_supports_agent): New.
11340 (linux_target_ops): Initialize field `supports_agent' with
11341 linux_supports_agent.
11342 * target.h (struct target_ops) <supports_agent>: New.
11343 (target_supports_agent): New macro.
11344 * server.c (handle_general_set): Handle packet 'QAgent'.
11345 (handle_query): Send `QAgent+'.
11346 * Makefile.in (server.o): Depends on agent.h.
11347
2fa291ac
YQ
113482012-03-03 Yao Qi <yao@codesourcery.com>
11349
11350 * Makefile.in (OBS): Add agent.o.
11351 Add new rule for agent.o.
11352 Track dependence of tracepoint.c on agent.h.
11353 * tracepoint.c (run_inferior_command_1):
11354 (run_inferior_command): Call agent_run_command.
11355 (gdb_ust_connect_sync_socket): Deleted. Move it to
11356 common/agent.c.
11357 (resume_thread, stop_thread): Likewise.
11358 (gdb_ust_socket_init): Renamed to ...
11359 (gdb_agent_socket_init): ... New.
11360 (gdb_ust_thread): Renamed to ...
11361 (gdb_agent_helper_thread): ... New.
11362 (gdb_ust_init): Move some code to ...
11363 (gdb_agent_init): ... here. New.
11364 [HAVE_UST]: Call gdb_ust_init.
11365 (initialize_tracepoint_ftlib): Call gdb_agent_init.
11366 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
11367 * config.in, configure: Regenerated.
11368
05044653
PA
113692012-03-02 Pedro Alves <palves@redhat.com>
11370
11371 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
11372 * linux-low.c (struct simple_pid_list): New.
11373 (stopped_pids): New a struct simple_pid_list pointer.
11374 (add_to_pid_list, pull_pid_from_list): New.
11375 (handle_extended_wait): Don't assume the first signal new children
11376 report is SIGSTOP. Adjust call to pull_pid_from_list.
11377 (linux_wait_for_lwp): Adjust.
11378
8d00225b
YQ
113792012-03-02 Yao Qi <yao@codesourcery.com>
11380
11381 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
11382 debug log.
11383
19560ba5
YQ
113842012-03-02 Yao Qi <yao@codesourcery.com>
11385
11386 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
11387 `stop_pc' and `tpoint'. Update caller.
11388
1faeff08
MR
113892012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
11390
11391 * linux-low.h (linux_target_ops): Add regset_bitmap member.
11392 * linux-low.c (use_linux_regsets): New macro.
11393 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
11394 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
11395 (linux_register_in_regsets): New function.
11396 (usr_fetch_inferior_registers): Skip registers covered by
11397 regsets.
11398 (usr_store_inferior_registers): Likewise.
11399 (usr_fetch_inferior_registers): New macro.
11400 (usr_store_inferior_registers): Likewise.
11401 (linux_fetch_registers): Handle mixed regset/non-regset targets.
11402 (linux_store_registers): Likewise.
11403 * linux-mips-low.c (init_registers_mips_dsp_linux): New
11404 prototype.
11405 (init_registers_mips64_dsp_linux): Likewise.
11406 (init_registers_mips_linux): New macro.
11407 (init_registers_mips_dsp_linux): Likewise.
11408 (mips_dsp_num_regs): Likewise.
11409 (DSP_BASE, DSP_CONTROL): New fallback macros.
11410 (mips_base_regs): New macro.
11411 (mips_regmap): Use it. Fix the size.
11412 (mips_dsp_regmap): New variable.
11413 (mips_dsp_regset_bitmap): Likewise.
11414 (mips_arch_setup): New function.
11415 (mips_cannot_fetch_register): Use the_low_target.regmap rather
11416 than mips_regmap.
11417 (mips_cannot_store_register): Likewise.
11418 (the_low_target): Update .arch_setup, .num_regs and .regmap
11419 initializers. Add .regset_bitmap initializer.
11420 * linux-arm-low.c (the_low_target): Add .regset_bitmap
11421 initializer.
11422 * linux-bfin-low.c (the_low_target): Likewise.
11423 * linux-cris-low.c (the_low_target): Likewise.
11424 * linux-crisv32-low.c (the_low_target): Likewise.
11425 * linux-ia64-low.c (the_low_target): Likewise.
11426 * linux-m32r-low.c (the_low_target): Likewise.
11427 * linux-m68k-low.c (the_low_target): Likewise.
11428 * linux-ppc-low.c (the_low_target): Likewise.
11429 * linux-s390-low.c (the_low_target): Likewise.
11430 * linux-sh-low.c (the_low_target): Likewise.
11431 * linux-sparc-low.c (the_low_target): Likewise.
11432 * linux-tic6x-low.c (the_low_target): Likewise.
11433 * linux-x86-low.c (the_low_target): Likewise.
11434 * linux-xtensa-low.c (the_low_target): Likewise.
11435 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
11436 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
11437 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
11438 srv_xmlfiles.
11439 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
11440 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
11441
c03e6ccc
YQ
114422012-02-29 Yao Qi <yao@codesourcery.com>
11443 Pedro Alves <palves@redhat.com>
11444
11445 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
11446 `step_over_finished' is true.
11447
644cebc9
PA
114482012-02-27 Pedro Alves <palves@redhat.com>
11449
11450 * linux-low.c (pid_is_stopped): Delete, moved to common/.
11451 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
11452
c14d7ab2
PA
114532012-02-27 Pedro Alves <palves@redhat.com>
11454
11455 PR server/9684
11456 * linux-low.c (pid_is_stopped): New.
11457 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
11458
412c89dd
LM
114592012-02-25 Luis Machado <lgustavo@codesourcery.com>
11460
11461 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
11462 of conditions.
11463
b745defe
MR
114642012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
11465
11466 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
11467
9f3a5c85
LM
114682012-02-24 Luis Machado <lgustavo@codesourcery>
11469
11470 * server.c (handle_query): Advertise support for target-side
11471 breakpoint condition evaluation.
11472 (process_point_options): New function.
11473 (process_serial_event): When inserting a breakpoint, check for
11474 a target-side condition that should be evaluated.
11475
11476 * mem-break.c: Include regcache.h and ax.h.
11477 (point_cond_list_t): New data structure.
11478 (breakpoint) <cond_list>: New field.
11479 (find_gdb_breakpoint_at): Make non-static.
11480 (delete_gdb_breakpoint_at): Clear any target-side
11481 conditions.
11482 (clear_gdb_breakpoint_conditions): New function.
11483 (add_condition_to_breakpoint): Likewise.
11484 (add_breakpoint_condition): Likewise.
11485 (gdb_condition_true_at_breakpoint): Likewise.
11486 (gdb_breakpoint_here): Return result directly instead
11487 of going through a local variable.
11488
11489 * mem-break.h (find_gdb_breakpoint_at): New prototype.
11490 (clear_gdb_breakpoint_conditions): Likewise.
11491 (add_breakpoint_condition): Likewise.
11492 (gdb_condition_true_at_breakpoint): Likewise.
11493
11494 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
11495 (need_step_over_p): Take target-side breakpoint condition into
11496 consideration.
11497
5e1dc496
LM
114982012-02-24 Luis Machado <lgustavo@codesourcery>
11499
11500 * server.h: Include tracepoint.h.
11501 (agent_mem_read, agent_get_trace_state_variable_value,
11502 agent_set_trace_state_variable_value,
11503 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
11504 get_set_tsv_func_addr): New prototypes.
11505
11506 * ax.h: New include file.
11507 * ax.c: New source file.
11508
11509 * tracepoint.c: Include ax.h.
11510 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
11511 agent_expr, eval_result_type): Move to ax.h.
11512 (parse_agent_expr): Rename to ...
11513 (gdb_parse_agent_expr): ... this, make it non-static and move
11514 to ax.h.
11515 (unparse_agent_expr) Rename to ...
11516 (gdb_unparse_agent_expr): ... this, make it non-static and move
11517 to ax.h.
11518 (eval_agent_expr): Rename to ...
11519 (eval_tracepoint_agent_expr): ... this.
11520 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
11521 forward declarations.
11522 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
11523 (agent_get_trace_state_variable_value): New function.
11524 (agent_set_trace_state_variable_value): New function.
11525 (cmd_qtdp): Call gdb_parse_agent_expr (...).
11526 (response_tracepoint): Call gdb_unparse_agent_expr (...).
11527 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
11528 (condition_true_at_tracepoint): Likewise.
11529 (parse_agent_expr): Rename to ...
11530 (gdb_parse_agent_expr): ... this and move to ax.c.
11531 (unparse_agent_expr): Rename to ...
11532 (gdb_unparse_agent_expr): ... this and move to ax.c.
11533 (gdb_agent_op_name): Move to ax.c.
11534 (eval_agent_expr): Rename to ...
11535 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
11536 and move to ax.c.
11537 (eval_tracepoint_agent_expr): New function.
11538 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
43aaf8b6 11539 non-static.
5e1dc496
LM
11540 (current_insn_ptr, emit_error, struct bytecode_address): Move to
11541 ax.c.
11542 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
11543 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
11544 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
11545 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
11546 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
11547 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
11548 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
11549 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
11550 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
11551 (compile_bytecodes): Remove forward declaration.
11552 (is_goto_target): Move to ax.c.
11553 (compile_bytecodes): Move to ax.c and call
11554 agent_get_trace_state_variable_value (...) and
11555 agent_set_trace_state_variable_value (...).
11556
11557 * Makefile.in: Update ax.c and IPA dependencies.
11558
277e4e52
PA
115592012-02-24 Pedro Alves <palves@redhat.com>
11560
11561 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
11562 (cmd_bigqtbuffer_circular): ... this. Only handle
11563 'QTBuffer:circular:'.
11564 (handle_tracepoint_general_set): Adjust.
11565
bf4c19f7
YQ
115662012-02-16 Yao Qi <yao@codesourcery.com>
11567
11568 * inferiors.c: Move code to ...
11569 * dll.c: .... here. New.
11570 * server.h: Declare clear_dlls.
11571 * Makefile.in (SFILES): Add dll.c.
11572 (OBS): Add dll.o
11573 (dll.o): New rule.
11574
d73f2619
YQ
115752012-02-11 Yao Qi <yao@codesourcery.com>
11576
11577 * server.c: (handle_monitor_command): Add a new parameter
11578 `own_buf'.
11579 (handle_query): Update caller.
11580
f8255c2a
JB
115812012-02-09 Joel Brobecker <brobecker@adacore.com>
11582
11583 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
11584 * configure, config.in: Regenerate.
11585 * hostio.c: Provide an alternate implementation if HAVE_READLINK
11586 is not defined.
11587
da84f473
PA
115882012-02-02 Pedro Alves <palves@redhat.com>
11589
11590 Try SIGKILL first, then PTRACE_KILL.
11591 * linux-low.c (linux_kill_one_lwp): New.
11592 (linux_kill_one_lwp): Rename to ...
11593 (kill_one_lwp_callback): ... this. Use the new
11594 linux_kill_one_lwp.
11595
e886a173
PA
115962012-02-02 Pedro Alves <palves@redhat.com>
11597
11598 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
11599 inferior.
11600
be07f1a2
PA
116012012-01-27 Pedro Alves <palves@redhat.com>
11602
11603 * linux-low.c (linux_child_pid_to_exec_file): Delete.
11604 (elf_64_file_p): Make static.
11605 (linux_pid_exe_is_elf_64_file): New.
11606 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
11607 Delete declarations.
11608 (linux_pid_exe_is_elf_64_file): Declare.
11609 * linux-x86-low.c (x86_arch_setup): Use
11610 linux_pid_exe_is_elf_64_file.
11611
d8301ad1
JK
116122012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
11613
11614 * linux-low.c (linux_wait_for_event_1): Rename to ...
11615 (linux_wait_for_event): ... here and merge it with former
11616 linux_wait_for_event - new variable wait_ptid, use it.
11617 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
11618
01b17894
PA
116192012-01-23 Pedro Alves <palves@redhat.com>
11620
11621 * server.c (main): Avoid yet another case of infinite loop while
11622 detaching/killing after a longjmp.
11623
e825046f
JK
116242012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
11625
11626 Code cleanup.
11627 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
11628
b9e7b9c3
UW
116292012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
11630
11631 * hostio.c (handle_readlink): New function.
11632 (handle_vFile): Call it to handle "vFile:readlink" packets.
11633
901f9912
UW
116342012-01-20 Pedro Alves <palves@redhat.com>
11635 Ulrich Weigand <ulrich.weigand@linaro.org>
11636
11637 * server.c (handle_v_requests): Only support vAttach and vRun to
11638 start multiple processes when in extended protocol mode.
11639
fc1ab1a0
PA
116402012-01-17 Pedro Alves <palves@redhat.com>
11641
11642 * tracepoint.c (initialize_tracepoint): Use mmap instead of
11643 memalign plus mprotect to allocate the scratch buffer.
11644
7d5d4e98
PA
116452012-01-13 Pedro Alves <palves@redhat.com>
11646
11647 * server.c (attach_inferior): Clear `cont_thread'.
11648
f128d5e9
PA
116492012-01-13 Pedro Alves <palves@redhat.com>
11650
11651 * server.c (main): Avoid infinite loop while detaching/killing
11652 after a longjmp.
11653
06db92f0
DE
116542012-01-09 Doug Evans <dje@google.com>
11655
11656 * server.c (start_inferior): Set last_ptid in --wrapper case.
11657
32d92999
YQ
116582012-01-06 Yao Qi <yao@codesourcery.com>
11659
11660 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
11661 defined.
11662 [IN_PROCESS_AGENT] (debug_agent): New global variable.
11663
5e0a92a9
YQ
116642012-01-04 Yao Qi <yao@codesourcery.com>
11665
11666 * tracepoint.c (cmd_qtdp): Print debug message
11667 for static tracepoint.
11668
ae639e8c
YQ
116692012-01-04 Yao Qi <yao@codesourcery.com>
11670
11671 * tracepoint.c (trace_vdebug): Differentiate debug message
11672 between gdbserver and IPA.
11673
f72429c5
YQ
116742012-01-03 Yao Qi <yao@codesourcery.com>
11675
11676 * tracepoint.c (tracepoint_was_hit): Don't collect for
11677 static tracepoint.
11678
12c3e59c
JB
116792012-01-02 Joel Brobecker <brobecker@adacore.com>
11680
11681 * terminal.h: Reformat copyright header.
11682
67827812
JB
116832012-01-02 Joel Brobecker <brobecker@adacore.com>
11684
11685 * server.c (gdbserver_version): Update copyright year.
11686 * gdbreplay.c (gdbreplay_version): Likewise.
11687
3e52c33d
JK
116882011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
11689
11690 * linux-low.c (linux_create_inferior): Put empty if clause for write.
11691
11692 Revert:
11693 2011-12-18 Hui Zhu <teawater@gmail.com>
11694 * linux-low.c (linux_create_inferior): Save return value to ret.
11695
66f1260e
HZ
116962011-12-18 Hui Zhu <teawater@gmail.com>
11697
11698 * linux-low.c (linux_create_inferior): Save return value to ret.
11699
e77616d7
DE
117002011-12-16 Doug Evans <dje@google.com>
11701
e7b06c57
DE
11702 * linux-low.c (linux_create_inferior): If stdio connection,
11703 redirect stdin from /dev/null, stdout to stderr.
11704 * remote-utils.c (remote_is_stdio): New static global.
11705 (remote_connection_is_stdio): New function.
11706 (remote_prepare): Handle stdio connection.
11707 (remote_open): Ditto.
11708 (remote_close): Don't close stdin for stdio connections.
11709 (read_prim,write_prim): New functions. Replace all calls to
11710 read/write to these.
11711 * server.c (main): Watch for "-" argument. Move call to
11712 remote_prepare before start_inferior.
11713 * server.h (STDIO_CONNECTION_NAME): New macro.
11714 (remote_connection_is_stdio): Declare.
11715
e77616d7
DE
11716 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
11717 in debugging output.
11718
82067193
YQ
117192011-12-15 Yao Qi <yao@codesourcery.com>
11720
11721 * tracepoint.c: Include sys/syscall.h.
11722 (gdb_ust_thread): Remove preprocessor conditional.
11723
82bfbe7e
PA
117242011-12-14 Pedro Alves <pedro@codesourcery.com>
11725
11726 * linux-low.c (linux_detach_one_lwp): Call
11727 the_low_target.prepare_to_resume before detaching.
11728
712c6575
YQ
117292011-12-14 Yao Qi <yao@codesourcery.com>
11730
11731 * tracepoint.c (gdb_ust_thread): Don't ignore return value
11732 of write.
11733
d54d1edf
YQ
117342011-12-14 Yao Qi <yao@codesourcery.com>
11735
11736 * i386-low.c (i386_low_stopped_data_address): Initialize local
11737 variable `control'.
11738
6210a125
PA
117392011-12-13 Pedro Alves <pedro@codesourcery.com>
11740
11741 PR remote/13492
11742
11743 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
11744 DR_CONTROL unless necessary. Extend comments.
11745 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
11746 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
11747
2ece8244
YQ
117482011-12-13 Yao Qi <yao@codesourcery.com>
11749
11750 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
11751 macros.
11752 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
11753
784867a5
JK
117542011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
11755
11756 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
11757 Print new debug message for such case.
11758
6bf36717
JK
117592011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
11760
11761 Fix overlapping memcpy.
11762 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
11763 the read_inferior_memory transfer.
11764 (delete_fast_tracepoint_jump): New variable buf. Use it for the
11765 write_inferior_memory transfer.
11766 (set_fast_tracepoint_jump): New variable buf. Use it for the
11767 read_inferior_memory and write_inferior_memory transfers.
11768 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
11769 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
11770 Use it for the write_inferior_memory transfer.
11771 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
11772 buffers.
11773
50275556
MR
117742011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
11775
11776 * linux-low.c (fetch_register, store_register): Make code
11777 consistent, fix formatting.
11778
7325beb4
MR
117792011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
11780
11781 * linux-low.c (usr_store_inferior_registers): Factor out code
11782 to handle individual registers into...
11783 (store_register): ... this new function.
11784
c642a434
UW
117852011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
11786
11787 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
11788 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
11789 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
11790 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
11791 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
11792 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
11793 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
11794 (srv_xmlfiles): Add new XML files.
11795
11796 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
11797 and <sys/uio.h>.
11798 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
11799 (init_registers_s390_linux32v1): Add prototype.
11800 (init_registers_s390_linux32v2): Likewise.
11801 (init_registers_s390_linux64v1): Likewise.
11802 (init_registers_s390_linux64v2): Likewise.
11803 (init_registers_s390x_linux64v1): Likewise.
11804 (init_registers_s390x_linux64v2): Likewise.
11805 (s390_num_regs): Increment to 52.
11806 (s390_regmap): Add orig_r2 register.
11807 (s390_num_regs_3264): Increment to 68.
11808 (s390_regmap_3264): Add orig_r2 register.
11809 (s390_collect_ptrace_register): Handle orig_r2 register.
11810 (s390_supply_ptrace_register): Likewise.
11811 (s390_fill_last_break): New function.
11812 (s390_store_last_break): Likewise.
11813 (s390_fill_system_call): New function.
11814 (s390_store_system_call): Likewise.
11815 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
11816 register sets.
11817 (s390_check_regset): New function.
11818 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
11819 NT_S390_SYSTEM_CALL regsets and use appropriate description.
11820 Update target_regsets for available register sets.
11821
2268b414
JK
118222011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
11823 Jan Kratochvil <jan.kratochvil@redhat.com>
11824
11825 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
11826 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
11827 New.
11828 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
11829 * linux-low.h (struct process_info_private): New member r_debug.
11830 * server.c (handle_qxfer_libraries): Call
11831 the_target->qxfer_libraries_svr4.
11832 (handle_qxfer_libraries_svr4): New function.
11833 (qxfer_packets): New entry "libraries-svr4".
11834 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
11835 * target.h (struct target_ops): New member qxfer_libraries_svr4.
11836 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
11837 PACKET_qXfer_libraries_svr4.
11838
d6db1fab
UW
118392011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
11840
11841 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
11842 PSW address/mask between 8-byte and 16-byte formats.
11843 (s390_supply_ptrace_register): Likewise.
11844 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
11845 basic addressing mode bit.
11846
242f5f1c
SS
118472011-11-24 Stan Shebs <stan@codesourcery.com>
11848
11849 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
11850
f196051f
SS
118512011-11-17 Stan Shebs <stan@codesourcery.com>
11852
11853 * tracepoint.c (struct tracepoint): New field traceframe_usage.
11854 (tracing_start_time): New global.
11855 (tracing_stop_time): New global.
11856 (tracing_user_name): New global.
11857 (tracing_notes): New global.
11858 (tracing_stop_note): New global.
11859 (cmd_qtstart): Set traceframe_usage, start_time.
11860 (stop_tracing): Set stop_time.
11861 (cmd_qtstatus): Report additional status.
11862 (cmd_qtp): New function.
11863 (handle_tracepoint_query): Call it.
11864 (cmd_qtnotes): New function.
11865 (handle_tracepoint_general_set): Call it.
11866 (get_timestamp): Rename from tsv_get_timestamp.
11867
405f8e94
SS
118682011-11-14 Stan Shebs <stan@codesourcery.com>
11869 Kwok Cheung Yeung <kcy@codesourcery.com>
11870
11871 * linux-x86-low.c (small_jump_insn): New.
11872 (i386_install_fast_tracepoint_jump_pad): Add arguments for
11873 trampoline and error message, build a trampoline and issue a small
11874 jump instruction to it.
11875 (x86_install_fast_tracepoint_jump_pad): Add arguments for
11876 trampoline and error message.
11877 (x86_get_min_fast_tracepoint_insn_len): New.
11878 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
11879 * linux-low.h (struct linux_target_ops): Add arguments to
11880 install_fast_tracepoint_jump_pad operation, add new operation.
11881 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
11882 arguments.
11883 (linux_get_min_fast_tracepoint_insn_len): New function.
11884 (linux_target_op): Add new operation.
11885 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
11886 (gdb_trampoline_buffer_end): Ditto.
11887 (gdb_trampoline_buffer_error): Ditto.
11888 (struct ipa_sym_addresses): Add fields for new IPA variables.
11889 (symbol_list): Add entries for new IPA variables.
11890 (struct tracepoint): Add fields to hold the address range of the
11891 trampoline used by the tracepoint.
11892 (trampoline_buffer_head): New static variable.
11893 (trampoline_buffer_tail): Ditto.
11894 (claim_trampoline_space): New function.
11895 (have_fast_tracepoint_trampoline_buffer): New function.
11896 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
11897 structure.
11898 (install_fast_tracepoint): Ditto, also add error buffer argument.
11899 (cmd_qtminftpilen): New function.
11900 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
11901 (fast_tracepoint_from_trampoline_address): New function.
11902 (fast_tracepoint_collecting): Handle trampoline as part of jump
11903 pad space.
11904 (set_trampoline_buffer_space): New function.
11905 (initialize_tracepoint): Initialize new IPA variables.
11906 * target.h (struct target_ops): Add arguments to
11907 install_fast_tracepoint_jump_pad operation, add new
11908 get_min_fast_tracepoint_insn_len operation.
11909 (target_get_min_fast_tracepoint_insn_len): New.
11910 (install_fast_tracepoint_jump_pad): Add arguments.
11911 * server.h (IPA_BUFSIZ): Define.
11912 * linux-i386-ipa.c: Include extra header files.
11913 (initialize_fast_tracepoint_trampoline_buffer): New function.
11914 (initialize_low_tracepoint): Call it.
11915 * server.h (set_trampoline_buffer_space): Declare.
11916 (claim_trampoline_space): Ditto.
11917 (have_fast_tracepoint_trampoline_buffer): Ditto.
11918
1e4d1764
YQ
119192011-11-14 Yao Qi <yao@codesourcery.com>
11920
11921 * server.c (handle_query): Handle InstallInTrace for qSupported.
11922 * tracepoint.c (add_tracepoint): Sort list.
11923 (install_tracepoint, download_tracepoint): New.
11924 (cmd_qtdp): Call them to install and download tracepoints.
11925 (sort_tracepoints): Removed.
11926 (cmd_qtstart): Update.
11927
5c73ff4e
YQ
119282011-11-14 Yao Qi <yao@codesourcery.com>
11929
11930 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
11931 * mem-break.h: Declare.
11932 * tracepoint.c (cmd_qtstart): Move some code to ...
11933 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
11934 New.
11935 (download_tracepoints): Move some code to ...
11936 (download_tracepoint_1): ... here. New.
11937
86a30030
YQ
119382011-11-08 Yao Qi <yao@codesourcery.com>
11939
11940 * remote-utils.c (relocate_instruction): A comment fix.
11941
8d26e50c
JB
119422011-11-07 Joel Brobecker <brobecker@adacore.com>
11943
11944 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
11945 (i386_dr_low_get_control, i386_dr_low_get_status): Use
11946 dr_status_mirror and dr_control_mirror from debug_reg_state.
11947 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
11948 (i386_initial_stuff): Remove use of deleted globals.
11949 (i386_get_thread_context, i386_set_thread_context,
11950 i386_thread_added): Use dr_status_mirror and dr_control_mirror
11951 from debug_reg_state.
11952
a59306a3
YQ
119532011-11-05 Yao Qi <yao@codesourcery.com>
11954
11955 * tracepoint.c (gdb_collect): Loop over tracepoints of same
11956 address as TPOINT's.
11957
3065dfb6
SS
119582011-11-02 Stan Shebs <stan@codesourcery.com>
11959
11960 * tracepoint.c (agent_mem_read_string): New function.
11961 (eval_agent_expr): Call it for tracenz.
11962 * server.c (handle_query): Report support for tracenz.
11963
fd0d8c7c
YQ
119642011-11-02 Yao Qi <yao@codesourcery.com>
11965
11966 * tracepoint.c (cmd_qtstart): Remove unused local variables.
11967
609086b1
YQ
119682011-11-02 Yao Qi <yao@codesourcery.com>
11969
11970 * target.h: Fix a typo in comment.
11971
b9fd1791
PA
119722011-10-31 Pedro Alves <pedro@codesourcery.com>
11973
11974 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
11975 clobber the breakpoints' shadows with fast tracepoint jumps.
11976 * mem-break.h (check_mem_write): Add `myaddr' parameter.
11977 * target.c (write_inferior_memory): Also pass MYADDR down to
11978 check_mem_write.
11979
03583c20
UW
119802011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
11981
11982 * configure.ac: Check support for personality routine.
11983 * configure: Regenerate.
11984 * config.in: Likewise.
11985 * linux-low.c: Include <sys/personality.h>.
11986 Define ADDR_NO_RANDOMIZE if necessary.
11987 (linux_create_inferior): Disable address space randomization when
11988 forking inferior, if requested.
11989 (linux_supports_disable_randomization): New function.
11990 (linux_target_ops): Install it.
11991 * server.h (disable_randomization): Declare.
11992 * server.c (disable_randomization): New global variable.
11993 (handle_general_set): Handle QDisableRandomization.
11994 (handle_query): Likewise for qSupported.
11995 (main): Support --disable-randomization and --no-disable-randomization
11996 command line arguments.
11997 * target.h (struct target_ops): Add supports_disable_randomization.
11998 (target_supports_disable_randomization): New macro.
11999
723b724b
MF
120002011-09-29 Mike Frysinger <vapier@gentoo.org>
12001
12002 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
12003 ifdef check.
12004 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
12005 [!PT_GETDSBT] (target_loadmap): New definition.
12006 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
12007 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
12008 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
12009 and PT_GETDSBT to LINUX_LOADMAP.
12010 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
12011 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
12012
55329a5c 120132011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
12014
12015 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
12016 (arm_linux_hwbp_cap): New static variable.
12017 (arm_linux_get_hwbp_cap): Replace by ...
12018 (arm_linux_init_hwbp_cap): ... this new function.
12019 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
12020 (arm_linux_get_hw_watchpoint_count): Likewise.
12021 (arm_linux_get_hw_watchpoint_max_length): Likewise.
12022 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
12023 (arm_prepare_to_resume): Use perror_with_name instead of error.
12024
55329a5c 120252011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
12026
12027 * linux-arm-low.c: Include <signal.h>.
12028 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
12029 (struct arm_linux_hwbp_cap): New data type.
12030 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
12031 (struct arm_linux_hw_breakpoint): New data type.
12032 (MAX_BPTS, MAX_WPTS): Define.
12033 (struct arch_process_info, struct arch_lwp_info): New data types.
12034 (arm_linux_get_hwbp_cap): New function.
12035 (arm_linux_get_hw_breakpoint_count): Likewise.
12036 (arm_linux_get_hw_watchpoint_count): Likewise.
12037 (arm_linux_get_hw_watchpoint_max_length): Likewise.
12038 (arm_hwbp_control_initialize): Likewise.
12039 (arm_hwbp_control_is_enabled): Likewise.
12040 (arm_hwbp_control_is_initialized): Likewise.
12041 (arm_hwbp_control_disable): Likewise.
12042 (arm_linux_hw_breakpoint_equal): Likewise.
12043 (arm_linux_hw_point_initialize): Likewise.
12044 (struct update_registers_data): New data structure.
12045 (update_registers_callback: New function.
12046 (arm_insert_point): Likewise.
12047 (arm_remove_point): Likewise.
12048 (arm_stopped_by_watchpoint): Likewise.
12049 (arm_stopped_data_address): Likewise.
12050 (arm_new_process): Likewise.
12051 (arm_new_thread): Likewise.
12052 (arm_prepare_to_resume): Likewise.
12053 (the_low_target): Register arm_insert_point, arm_remove_point,
12054 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
12055 arm_new_thread, and arm_prepare_to_resume.
12056
6b9801d4
SS
120572011-09-15 Stan Shebs <stan@codesourcery.com>
12058
12059 * server.h (struct emit_ops): Add compare-goto fields.
12060 * tracepoint.c (gdb_agent_op_sizes): New table.
12061 (emit_eq_goto): New function.
12062 (emit_ne_goto): New function.
12063 (emit_lt_goto): New function.
12064 (emit_le_goto): New function.
12065 (emit_gt_goto): New function.
12066 (emit_ge_goto): New function.
12067 (is_goto_target): New function.
12068 (compile_bytecodes): Recognize special cases of compare-goto
12069 combinations and call specialized emitters for them.
12070 * linux-x86-low.c (amd64_emit_eq_goto): New function.
12071 (amd64_emit_ne_goto): New function.
12072 (amd64_emit_lt_goto): New function.
12073 (amd64_emit_le_goto): New function.
12074 (amd64_emit_gt_goto): New function.
12075 (amd64_emit_ge_goto): New function.
12076 (amd64_emit_ops): Add the new functions.
12077 (i386_emit_eq_goto): New function.
12078 (i386_emit_ne_goto): New function.
12079 (i386_emit_lt_goto): New function.
12080 (i386_emit_le_goto): New function.
12081 (i386_emit_gt_goto): New function.
12082 (i386_emit_ge_goto): New function.
12083 (i386_emit_ops): Add the new functions.
12084
bf15cbda
SS
120852011-09-08 Stan Shebs <stan@codesourcery.com>
12086
12087 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
12088 (i386_emit_epilogue): Restore %ebx.
12089
943ca1dd
JZ
120902011-08-31 Jie Zhang <jzhang918@gmail.com>
12091
12092 * server.c (step_thread): Remove definition.
12093 (process_serial_event): Don't handle Hs.
12094 * server.h (step_thread): Remove declaration.
12095 * target.c (set_desired_inferior): Remove use of step_thread.
12096
e3deef73
LM
120972011-08-24 Luis Machado <lgustavo@codesourcery.com>
12098
12099 * linux-low.c: Include linux-procfs.h.
12100 (linux_attach_lwp_1): Update comments.
12101 (linux_attach): Scan for existing threads when attaching to a
12102 process that is the tgid.
12103 * Makefile.in: Update dependencies.
12104
13da1c97
LM
121052011-08-24 Luis Machado <lgustavo@codesourcery.com>
12106
12107 * configure.srv: Add linux-procfs.o dependencies.
12108
881127c9
YQ
121092011-08-14 Yao Qi <yao@codesourcery.com>
12110
12111 * target.h (struct target_ops): Fix indent.
12112 * win32-low.c (win32_target_ops): Fix comment.
12113
58dbd541
YQ
121142011-08-14 Andrew Jenner <andrew@codesourcery.com>
12115 Yao Qi <yao@codesourcery.com>
12116
12117 * Makefile.in (clean): Remove tic6x-*.c files.
12118 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
12119 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
12120 (tic6x-c64xp-linux.c): Likewise.
12121 * configure.srv: Add support for tic6x-*-uclinux.
12122 * linux-tic6x-low.c: New.
12123 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
12124
78d85199
YQ
121252011-08-14 Andrew Stubbs <ams@codesourcery.com>
12126 Yao Qi <yao@codesourcery.com>
12127
12128 * target.h (struct target_ops): Add read_loadmap.
12129 * linux-low.c (struct target_loadseg): New type.
12130 (struct target_loadmap): New type.
12131 (linux_read_loadmap): New function.
12132 (linux_target_ops): Add linux_read_loadmap.
12133 * server.c (handle_query): Support qXfer:fdpic:read packet.
43aaf8b6
PA
12134 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
12135 to NULL.
78d85199 12136
a959a88d
EZ
121372011-08-05 Eli Zaretskii <eliz@gnu.org>
12138
12139 * win32-low.c: Include <stdint.h>.
12140
1ced966e
PA
121412011-07-22 Pedro Alves <pedro@codesourcery.com>
12142
12143 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
12144 to the inferior here.
12145 (i386_remove_aligned_watchpoint): Ditto.
12146 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
12147 fit part of the watchpoint in the debug registers.
12148 (i386_update_inferior_debug_regs): New.
12149 (i386_low_insert_watchpoint): Work on a local mirror of the debug
12150 registers, and only update the inferior on success.
12151 (i386_low_remove_watchpoint): Ditto.
12152
d26e3629
KY
121532011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
12154
12155 * linux-low.c (compare_ints, unique, list_threads, show_process,
12156 linux_core_of_thread): Delete.
12157 (linux_target_ops): Change linux_core_of_thread to
12158 linux_common_core_of_thread.
12159 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
12160 * utils.c (malloc_failure): Change type of argument.
12161 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
12162 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
12163 common/linux-osdata.c, common/ptid.c and common/buffer.c.
12164 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
12165 (IPA_OBJS): Add common-utils-ipa.o.
12166 (ptid_h, linux_osdata_h): New macros.
12167 (server_h): Add common/common-utils.h, common/xml-utils.h,
12168 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
12169 common/ptid.h.
12170 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
12171 ptid.o, buffer.o): New rules.
12172 (linux-low.o): Add common/linux-osdata.h as a dependency.
12173 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
12174 * configure.ac: Add AC_HEADER_DIRENT check.
12175 * config.in: Regenerate.
12176 * configure: Regenerate.
12177 * remote-utils.c (xml_escape_text): Delete.
12178 (buffer_grow, buffer_free, buffer_init, buffer_finish,
12179 buffer_xml_printf): Move to common/buffer.c.
12180 * server.c (main): Remove call to initialize_inferiors.
12181 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
12182 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
12183 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
12184 internal_error, gdb_assert, gdb_assert_fail): Delete.
12185 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
12186 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
12187 common/buffer.h.
12188 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
12189 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
12190 initialize_inferiors): Delete.
12191
2275a1a7
PA
121922011-07-20 Pedro Alves <pedro@codesourcery.com>
12193
12194 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
12195 symbol error.
12196
0a5b1e09
PA
121972011-05-31 Pedro Alves <pedro@codesourcery.com>
12198
12199 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
12200 assertion.
12201 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
12202
6938fd34
YQ
122032011-05-26 Yao Qi <yao@codesourcery.com>
12204
12205 * Makefile.in (thread-db.o): Track dependence to
12206 common/gdb_thread_db.h.
12207 * thread-db.c: include gdb_thread_db.h from right place.
12208
b481f9e0
TT
122092011-05-16 Adrian Cornish <gnu@bluedreamer.com>
12210
12211 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
12212 __FILE__ and __LINE__ to internal_error.
12213
98a5dd13
DE
122142011-05-13 Doug Evans <dje@google.com>
12215
12216 * thread-db.c (try_thread_db_load_from_sdir): New function.
12217 (try_thread_db_load_from_dir): New function.
12218 (thread_db_load_search): Handle $sdir, ignore $pdir.
12219 Remove trying of system directories if search of
12220 libthread-db-search-path fails, that is now done via $sdir.
12221
d248b706
KY
122222011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
12223
12224 * server.c (handle_query): Add EnableDisableTracepoints to the list
12225 of supported features.
43aaf8b6 12226 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
d248b706 12227 tracepoints.
43aaf8b6
PA
12228 (cmd_qtenable_disable): New.
12229 (cmd_qtstart): Install tracepoints even if disabled.
12230 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
12231 receiving a QTEnable or QTDisable packet.
12232 (gdb_collect): Skip data collection if fast tracepoint is disabled.
12233 (ust_marker_to_static_tracepoint): Do not ignore disabled static
12234 tracepoints.
12235 (gdb_probe): Skip data collection if static tracepoint is disabled.
d248b706 12236
84e578fb
DE
122372011-05-10 Doug Evans <dje@google.com>
12238
12239 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
12240
71f55dd8
DE
122412011-05-04 Doug Evans <dje@google.com>
12242
12243 * linux-low.c (linux_join): Skip process lookup.
12244 * spu-low.c (spu_join): Ditto.
12245 * server.c (join_inferiors_callback): Delete.
12246 (process_serial_event): For 'D' packet (detach) call join_inferior
12247 directly.
12248
4d393d60
JM
122492011-05-04 Joseph Myers <joseph@codesourcery.com>
12250
12251 * README: Don't mention xscale*-*-linux*.
12252 * configure.srv (xscale*-*-linux*): Don't handle target.
12253
b00ad6ff
NF
122542011-04-27 Nathan Froyd <froydnj@codesourcery.com>
12255
12256 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
12257 casting pointers.
12258 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
12259 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
12260 (i386_emit_void_call_2): Likewise.
12261
af96c192
YQ
122622011-04-26 Yao Qi <yao@codesourcery.com>
12263
43aaf8b6
PA
12264 * linux-low.c: Move common macros to linux-ptrace.h.
12265 Include linux-ptrace.h.
af96c192
YQ
12266 * Makefile.in (linux_ptrace_h): New.
12267 (linux-low.o): Depends on linux-ptrace.h.
12268
03f2bd59
JK
122692011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
12270
12271 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
12272 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
12273 (remote_prepare): New function with most of the TCP code from ...
12274 (remote_open): ... here. Detect PORT here unconditionally. Move also
12275 setting transport_is_reliable.
12276 * server.c (run_once): New variable.
12277 (gdbserver_usage): Document it.
12278 (main): Set run_once for `--once'. Call remote_prepare. Exit after
12279 the first run if RUN_ONCE.
12280 * server.h (run_once, remote_prepare): New declarations.
12281
7a9dd1b2
TT
122822011-04-19 Tom Tromey <tromey@redhat.com>
12283
12284 * win32-low.c (handle_load_dll): Remove duplicate "the".
12285
81239425
PM
122862011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
12287
12288 Remove support for old Cygwin 1.5 versions.
12289 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
12290 function to avoid warning.
12291 (win32_add_one_solib): Use cygwin_conv_path function to avoid
12292 warning.
12293
9e0627f1
PM
122942011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
12295
12296 * gdbserver/server.h (Macro _): Define it if not available.
12297
588eebee
MS
122982011-03-14 Michael Snyder <msnyder@vmware.com>
12299
348af9f7 12300 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 12301
43f70d4c
JB
123022011-03-10 Joel Brobecker <brobecker@adacore.com>
12303
12304 * Makefile.in (maintainer-clean realclean distclean): Remove
12305 "make ... subdir_do" command.
12306
348af9f7
MS
123072011-03-10 Michael Snyder <msnyder@vmware.com>
12308
12309 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
12310
12311 * server.c (handle_v_run): Free alloced buffer on early return.
12312
e637a4f5
YQ
123132011-03-09 Yao Qi <yao@codesourcery.com>
12314
12315 Revert:
12316 2011-03-04 Yao Qi <yao@codesourcery.com>
12317
12318 * Makefile.in: Remove GNU make feature --directory.
12319
12320 2011-03-05 Yao Qi <yao@codesourcery.com>
12321
12322 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
12323 (subdir_do): New make target. Copied from gdb/Makefile.
12324 (maintainer-clean, realclean, distclean, clean): Call corresponding
12325 make targets in common/Makefile.
12326
12327 2011-02-11 Yao Qi <yao@codesourcery.com>
12328
12329 * configure.ac: Call AC_PROG_RANLIB.
12330 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
12331 * configure: Regenerate.
12332
e6edda56
JK
123332011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
12334
12335 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
12336
e5141119
JB
123372011-03-06 Yao Qi <yao@codesourcery.com>
12338
12339 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
12340
64794aa4
JB
123412011-03-05 Yao Qi <yao@codesourcery.com>
12342
12343 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
12344 (subdir_do): New make target. Copied from gdb/Makefile.
12345 (maintainer-clean, realclean, distclean, clean): Call corresponding
12346 make targets in common/Makefile.
12347
7a762829
YQ
123482011-03-04 Yao Qi <yao@codesourcery.com>
12349
12350 * Makefile.in: Remove GNU make feature --directory.
12351
348af9f7
MS
123522011-03-04 Michael Snyder <msnyder@vmware.com>
12353
12354 * server.c (queue_stop_reply): Call xmalloc not malloc.
12355
123562011-03-02 Michael Snyder <msnyder@vmware.com>
12357
12358 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
12359
9f72fee2
MS
123602011-02-28 Michael Snyder <msnyder@vmware.com>
12361
588eebee
MS
12362 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
12363 (cmd_qtframe): Ditto.
12364 (cmd_qtbuffer): Ditto.
12365 (cmd_bigqtbuffer): Ditto.
12366
9f72fee2
MS
12367 * utils.c (decimal2str): Initialize 'width' to nine, then
12368 don't mess with it.
12369
8040bd49
UW
123702011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
12371
12372 * hostio.c (require_data): Free *data, not data.
12373
7e52cbd0
JK
123742011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
12375
12376 * hostio.c (require_data): Use free, not xfree.
12377
9130f83e
MS
123782011-02-27 Michael Snyder <msnyder@vmware.com>
12379
4b812f4e
MS
12380 * server.c (handle_query): Discard unused value.
12381
9130f83e
MS
12382 * hostio.c (require_data): Free malloc memory before returning
12383 error.
12384
69d37113
MS
123852011-02-26 Michael Snyder <msnyder@vmware.com>
12386
12387 * linux-low.c (list_threads): Call closedir for dirent.
12388
35f5825a
MS
123892011-02-27 Michael Snyder <msnyder@vmware.com>
12390
2a589cef
MS
12391 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
12392 a case statement falls through.
12393
0adea5f7
MS
12394 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
12395
35f5825a
MS
12396 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
12397 in comparison.
12398
238f1c74
MS
123992011-02-26 Michael Snyder <msnyder@vmware.com>
12400
12401 * utils.c (decimal2str): Eliminate dead code and dead param.
12402 (pulongest): Drop dead param from call to decimal2str.
12403 (plongest): Ditto.
12404
633ff500
JB
124052011-02-24 Joel Brobecker <brobecker@adacore.com>
12406
12407 Revert the following patch (not approved yet):
12408 2011-02-21 Hui Zhu <teawater@gmail.com>
12409 * tracepoint.c (tp_printf): New function.
12410 (eval_agent_expr): Handle gdb_agent_op_printf.
12411
f9c6ff72
HZ
124122011-02-21 Hui Zhu <teawater@gmail.com>
12413
12414 * tracepoint.c (tp_printf): New function.
12415 (eval_agent_expr): Handle gdb_agent_op_printf.
12416
94d5e490
TT
124172011-02-18 Tom Tromey <tromey@redhat.com>
12418
12419 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
12420 (tracepoint.o): Likewise.
12421 * tracepoint.c (enum gdb_agent_op): Use ax.def.
12422 (gdb_agent_op_names): Likewise.
12423
c7f96d2b
TT
124242011-02-18 Tom Tromey <tromey@redhat.com>
12425
12426 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
12427 gdb_agent_op_rot>: New constants.
12428 (gdb_agent_op_names): Add pick and roll.
12429 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
12430 cases.
12431
0feedb2c
JK
124322011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
12433
12434 * aclocal.m4: Regenerated with aclocal-1.11.1.
12435
b3b9301e
PA
124362011-02-14 Pedro Alves <pedro@codesourcery.com>
12437
12438 * server.c (handle_qxfer_traceframe_info): New.
12439 (qxfer_packets): Register "traceframe-info".
12440 (handle_query): Report support for qXfer:traceframe-info:read+.
12441 * tracepoint.c (match_blocktype): New.
12442 (traceframe_find_block_type): Rename to ...
12443 (traceframe_walk_blocks): ... this. Add callback filter argument,
12444 and use it.
12445 (traceframe_find_block_type): New, reimplemented on top of
12446 traceframe_walk_blocks.
12447 (build_traceframe_info_xml): New.
12448 (traceframe_read_info): New.
12449 * server.h (traceframe_read_info): Declare.
12450
4f3e6fb7
YQ
124512011-02-11 Yao Qi <yao@codesourcery.com>
12452
12453 * configure.ac: Call AC_PROG_RANLIB.
12454 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
12455 * configure: Regenerate.
12456
764880b7
PA
124572011-02-07 Pedro Alves <pedro@codesourcery.com>
12458
12459 * server.c (gdb_read_memory): Change return semantics to allow
12460 partial transfers.
12461 (handle_search_memory_1): Adjust.
12462 (process_serial_event) <'m' packet>: Handle partial transfers.
12463 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
12464
1c79eb8a
PA
124652011-01-28 Pedro Alves <pedro@codesourcery.com>
12466
12467 * regcache.c (init_register_cache): Initialize
12468 regcache->register_status.
12469 (free_register_cache): Release regcache->register_status.
12470 (regcache_cpy): Copy register_status.
12471 (registers_to_string): Print 'x's for unavailable registers.
12472 (supply_register): Mark the register's status valid or
12473 unavailable, depending on whether a buffer was passed in or not.
12474 (supply_register_zeroed): New.
12475 (supply_regblock): Mark the registers' status valid or
12476 unavailable, depending on whether a buffer was passed in or not.
12477 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
12478 (struct regcache): New `register_status' field.
12479 (supply_register_zeroed): Declare.
12480 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
12481 supply_register_zeroed, rather than passing a NULL buffer to
12482 supply_register.
12483 * tracepoint.c (fetch_traceframe_registers): Update comment.
12484
85724a0e
PA
124852011-01-28 Pedro Alves <pedro@codesourcery.com>
12486
12487 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
12488 buffer explicit.
12489
d08aafef
PA
124902011-01-25 Pedro Alves <pedro@codesourcery.com>
12491
12492 * server.h (decode_xfer_write): Change prototype.
12493 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
12494 and don't extract the annex here.
12495 * server.c (decode_xfer_read): Remove `annex' parameter,
12496 and don't extract the annex here.
12497 (decode_xfer): New.
12498 (struct qxfer): New.
12499 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
12500 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
12501 (handle_qxfer_statictrace): New functions, abstracted out from
12502 handle_query, and made to use the struct qxfer interface.
12503 (handle_threads_qxfer_proper): Rename to ...
12504 (handle_qxfer_threads_proper): ... this.
12505 (handle_threads_qxfer): Rename to ...
12506 (handle_qxfer_threads): ... this. Adjust.
12507 (qxfer_packets): New array.
12508 (handle_qxfer): New function.
12509 (handle_query): Use handle_qxfer.
12510
493e2a69
MS
125112011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
12512
12513 * gdbreplay.c: Shorten lines of >= 80 columns.
12514 * linux-low.c: Ditto.
12515 * linux-ppc-low.c: Ditto.
12516 * linux-s390-low.c: Ditto.
12517 * linux-sparc-low.c: Ditto.
12518 * linux-x86-low.c: Ditto.
12519 * linux-xtensa-low.c: Ditto.
12520 * mem-break.c: Ditto.
12521 * nto-low.c: Ditto.
12522 * regcache.h: Ditto.
12523 * remote-utils.c: Ditto.
12524 * server.c: Ditto.
12525 * server.h: Ditto.
12526 * thread-db.c: Ditto.
12527 * tracepoint.c: Ditto.
12528 * utils.c: Ditto.
12529 * win32-low.h: Ditto.
12530
44944448
JB
125312011-01-05 Joel Brobecker <brobecker@adacore.com>
12532
12533 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
12534 update.
12535
71ce852c
JB
125362011-01-01 Joel Brobecker <brobecker@adacore.com>
12537
12538 * server.c (gdbserver_version): Update copyright year in version
12539 output.
12540 * gdbreplay.c (gdbreplay_version): Ditto.
12541
eb826dc6
MF
125422010-12-29 Jie Zhang <jie.zhang@analog.com>
12543
12544 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
12545 * linux-bfin-low.c: New file.
12546 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
12547 PT_DATA_ADDR for BFIN targets.
12548 * Makefile.in (SFILES): Add linux-bfin-low.c.
12549 (clean): Remove reg-bfin.c.
12550 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
12551 * README: Mention supported Blackfin targets.
12552
39ab222a
MF
125532010-12-23 Mike Frysinger <vapier@gentoo.org>
12554
12555 * .gitignore: New file.
12556
a1f2ce7d
MF
125572010-11-16 Mike Frysinger <vapier@gentoo.org>
12558
12559 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
12560
f474844c
JZ
125612010-10-22 Jie Zhang <jie@codesourcery.com>
12562
12563 * Makefile.in: Add FLAGS_TO_PASS variable.
12564 (install): Remove dependency of install-only and recursively
12565 invoke make for install-only.
12566
f1048712
DE
125672010-10-04 Doug Evans <dje@google.com>
12568
12569 * Makefile.in (uninstall): Use $(DESTDIR).
12570
b53a1623
PA
125712010-09-24 Pedro Alves <pedro@codesourcery.com>
12572
e6ee044d
PA
12573 PR gdb/11842
12574
b53a1623
PA
12575 * linux-x86-low.c (compat_siginfo_from_siginfo)
12576 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
12577 si_code is < 0. Check for si_code == SI_TIMER before checking for
12578 si_code < 0.
12579
fa1bd1e4
JB
125802010-09-13 Joel Brobecker <brobecker@adacore.com>
12581
12582 * lynx-i386-low.c: New file.
12583 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
12584
47fac8f8
JB
125852010-09-13 Joel Brobecker <brobecker@adacore.com>
12586
12587 * lynx-low.c (ptrace_request_to_str): Remove handling for
12588 request values that have been removed in LynxOS 5.x.
12589
1adfc54d
JB
125902010-09-13 Joel Brobecker <brobecker@adacore.com>
12591
12592 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
12593 <ptrace.h>
12594
c2a66c29
NS
125952010-09-09 Nathan Sidwell <nathan@codesourcery.com>
12596
12597 * configure.ac: Add --enable-inprocess-agent option.
12598 * configure: Rebuilt.
12599
32fcada3
YQ
126002010-09-06 Yao Qi <yao@codesourcery.com>
12601
12602 * linux-low.c (linux_kill): Remove unused variable.
12603 (linux_stabilize_threads): Likewise.
12604 * server.c (start_inferior): Likewise.
12605 (queue_stop_reply_callback): Likewise.
12606 * tracepoint.c (do_action_at_tracepoint): Likewise.
12607
0cccb683
YQ
126082010-09-06 Yao Qi <yao@codesourcery.com>
12609
12610 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
12611 on return.
12612
423ec54c
JK
126132010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
12614
12615 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
12616
12ac6819
PA
126172010-09-06 Pedro Alves <pedro@codesourcery.com>
12618
12619 * Makefile.in (install-only): Replace $IPA_DEPFILES with
12620 "$(IPA_DEPFILES)".
12621
8ed54b31
JB
126222010-09-01 Joel Brobecker <brobecker@adacore.com>
12623
12624 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
12625 gdbserver/lynx-ppc-low.c: New files.
12626 * Makefile.in (lynx_low_h): New variable.
12627 (lynx-low.o, lynx-ppc-low.o): New rules.
12628 * configure.ac: On LynxOS, link with -lnetinet.
12629 * configure.srv: Add handling of powerpc-*-lynxos* targets.
12630 * configure: regenerate.
12631
bb0116a4
JB
126322010-09-01 Joel Brobecker <brobecker@adacore.com>
12633
12634 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
12635 * configure.ac: Add check for vasprintf and vsnprintf.
12636 * configure, config.in: Regenerate.
12637 * server.h (vasprintf, vsnprintf): Add conditional declarations.
12638
a778ab81 126392010-09-01 Joel Brobecker <brobecker@adacore.com>
12640
12641 * gdbreplay.c: Move include of alloca.h up, next to include of
12642 malloc.h.
12643 * server.h: Add include of malloc.h.
12644 * mem-break.c: Remove include of malloc.h.
12645 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
12646
8b034a19 126472010-09-01 Joel Brobecker <brobecker@adacore.com>
12648
12649 * Makefile.in (memmem.o): Build with -Wno-error.
12650
126512010-09-01 Joel Brobecker <brobecker@adacore.com>
12652
12653 * utils.c (xsnprintf): Make non-static.
12654 * server.h: Add xsnprintf declaration.
12655 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
12656 replace calls to snprintf by calls to xsnprintf throughout.
12657
126582010-09-01 Joel Brobecker <brobecker@adacore.com>
12659
12660 * configure.ac: Add configure check for alloca.
12661 * configure, config.in: Regenerate.
12662 * server.h: Include alloca.h if it exists.
12663 * gdbreplay.c: Include alloca.h if it exists.
12664
1a981360
PA
126652010-08-28 Pedro Alves <pedro@codesourcery.com>
12666
12667 * linux-low.c (__SIGRTMIN): Define if not already defined.
12668 (linux_create_inferior): Check for __ANDROID__ rather than
12669 __SIGRTMIN.
12670 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
12671 are already deferred.
12672 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
12673 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
12674 stopped and already has a pending signal to report.
12675 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
12676 a pending signal to report or is moving out of a jump pad.
12677 (linux_init_signals): Check for __ANDROID__ rather than
12678 __SIGRTMIN.
12679
b4d51a55
PA
126802010-08-28 Pedro Alves <pedro@codesourcery.com>
12681
12682 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
12683 debug_threads check. Avoid a linear search when not doing debug
12684 output.
12685
ec48365d
PA
126862010-08-27 Pedro Alves <pedro@codesourcery.com>
12687
12688 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
12689 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
12690 (struct file_handler) <fd>: Change type to gdb_fildes_t.
12691 (process_event): Change local fd's type to gdb_fildes_t.
12692 (create_file_handler): Adjust prototype.
12693 (delete_file_handler): Adjust prototype.
12694 (handle_file_event): Adjust prototype. Use pfildes.
12695 (create_file_event): Adjsut prototype.
12696 * remote-utils.c (remote_desc, listen_desc): Change type to
12697 gdb_fildes_t.
12698 * server.h: New gdb_fildes_t typedef.
12699 [USE_WIN32API]: Include winsock2.h.
12700 (delete_file_handler, add_file_handler): Adjust prototypes.
12701 (pfildes): Declare.
12702 * utils.c (pfildes): New.
12703
854d88f0
PA
127042010-08-27 Pedro Alves <pedro@codesourcery.com>
12705
12706 * configure.ac (build_warnings): Add -Wno-char-subscripts.
12707 * configure: Regenerate.
12708
0146f85b
PA
127092010-08-27 Pedro Alves <pedro@codesourcery.com>
12710
12711 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
12712 (linux_done_accessing_memory): ... this.
12713 (linux_target_ops): Adjust.
12714 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
12715 * nto-low.c (nto_target_ops): Adjust comment.
12716 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
12717 * spu-low.c (spu_target_ops): Adjust comment.
12718 * target.h (target_ops): Rename unprepare_to_access_memory field
12719 to done_accessing_memory.
12720 (unprepare_to_access_memory): Rename to ...
12721 (done_accessing_memory): ... this.
12722
90d74c30
PA
127232010-08-26 Pedro Alves <pedro@codesourcery.com>
12724
12725 * linux-low.c (linux_prepare_to_access_memory): New.
12726 (linux_unprepare_to_access_memory): New.
12727 (linux_target_ops): Install them.
12728 * server.c (read_memory): Rename to ...
12729 (gdb_read_memory): ... this. Use
12730 prepare_to_access_memory/prepare_to_access_memory.
12731 (write_memory): Rename to ...
12732 (gdb_write_memory): ... this. Use
12733 prepare_to_access_memory/prepare_to_access_memory.
12734 (handle_search_memory_1): Adjust.
12735 (process_serial_event): Adjust.
12736 * target.h (struct target_ops): New fields
12737 prepare_to_access_memory and unprepare_to_access_memory.
12738 (prepare_to_access_memory, unprepare_to_access_memory): New.
12739 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
12740 prepare_to_access_memory/prepare_to_access_memory.
12741 * nto-low.c (nto_target_ops): Adjust.
12742 * spu-low.c (spu_target_ops): Adjust.
12743 * win32-low.c (win32_target_ops): Adjust.
12744
fd467969
PA
127452010-08-26 Pedro Alves <pedro@codesourcery.com>
12746
12747 * Makefile.in (WARN_CFLAGS): Get it from configure.
12748 (WERROR_CFLAGS): New.
12749 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
12750 * configure.ac: Introduce --enable-werror, which adds -Werror to
12751 the compiler command line. Enabled by default. Disable with
12752 --disable-werror. Add -Wdeclaration-after-statement
12753 Wpointer-arith and -Wformat-nonliteral to warning flags.
12754 * configure: Regenerate.
12755
331e2f5f
PA
127562010-08-26 Pedro Alves <pedro@codesourcery.com>
12757
12758 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
12759
e581f2b4
PA
127602010-08-26 Pedro Alves <pedro@codesourcery.com>
12761
12762 * gdbreplay.c (remote_error): New.
12763 (gdbchar): New.
12764 (expect): Use gdbchar. Check for error reading from GDB.
12765 Clarify sync error output.
12766 (play): Check for errors writing to GDB.
12767 * linux-low.c (sigchld_handler): Really ignore `write' errors.
12768 * remote-utils.c (getpkt): Check for errors writing to the remote
12769 descriptor.
12770
3c11dd79
PA
127712010-08-25 Pedro Alves <pedro@codesourcery.com>
12772
12773 * linux-low.c (linux_wait_1): Move non-debugging code out of
12774 `debug_threads' control.
12775
d20a8ad9
PA
127762010-08-25 Pedro Alves <pedro@codesourcery.com>
12777
12778 * linux-low.c (linux_wait_1): Don't set last_status here.
12779 * server.c (push_event, queue_stop_reply_callback): Assert we're
12780 not pushing a TARGET_WAITKIND_IGNORE event.
12781 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
12782 (myresume, handle_target_event): Set the thread's last_resume_kind
12783 and last_status from the target returned status.
12784
964e4306
PA
127852010-08-25 Pedro Alves <pedro@codesourcery.com>
12786
12787 PR threads/10729
12788
12789 * linux-x86-low.c (update_debug_registers_callback): New.
12790 (i386_dr_low_set_addr): Use it.
12791 (i386_dr_low_get_addr): New.
12792 (i386_dr_low_set_control): Use update_debug_registers_callback.
12793 (i386_dr_low_get_control): New.
12794 (i386_dr_low_get_status): Adjust.
12795 * linux-low.c (linux_stop_lwp): New.
12796 * linux-low.h (linux_stop_lwp): Declare.
12797
12798 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
12799 argument instead of a i386_debug_reg_state.
12800 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
12801 a i386_debug_reg_state.
12802 (i386_insert_aligned_watchpoint): Adjust.
12803 (i386_remove_aligned_watchpoint): Adjust.
12804 (i386_low_stopped_data_address): Read the debug registers from the
12805 inferior instead of from the mirrors.
12806 * i386-low.h (struct i386_debug_reg_state): Extend comment.
12807 (i386_dr_low_get_addr): Declare.
12808 (i386_dr_low_get_control): Declare.
12809 (i386_dr_low_get_status): Change prototype.
12810
12811 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
12812 (i386_dr_low_get_addr): New.
12813 (i386_dr_low_get_control): New.
12814 (i386_dr_low_get_status): Adjust prototype. Return
12815 dr_status_mirror.
12816 (i386_initial_stuff): Clear dr_status_mirror and
12817 dr_control_mirror.
12818 (i386_get_thread_context): Adjust.
12819 (i386_set_thread_context): Adjust.
12820 (i386_thread_added): Adjust.
12821
5f21a75b
PA
128222010-08-24 Pedro Alves <pedro@codesourcery.com>
12823
12824 * linux-low.h (linux_thread_area): Delete declaration.
12825
3e4c1235
TS
128262010-08-11 Thomas Schwinge <thomas@codesourcery.com>
12827
12828 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
12829 after its termination.
12830
1971b033
PA
128312010-08-09 Pedro Alves <pedro@codesourcery.com>
12832
12833 * linux-low.c (gdb_wants_lwp_stopped): Delete.
12834 (gdb_wants_all_stopped): Delete.
12835 (linux_wait_1): Don't call them.
12836 * server.c (handle_v_cont): Tag all threads as want-stopped.
12837 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
12838 stopped as "client-wants-stopped".
12839
310444ac
PA
128402010-07-31 Pedro Alves <pedro@codesourcery.com>
12841
12842 * Makefile.in (signals_h): New.
12843 (server_h): Depend on it.
12844 (server.o): Don't depend on $(signals_def).
12845 (signals.o): Depend on $(signals_def).
12846
a19cae16
JK
128472010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
12848
12849 * Makefile.in (signals_def): New.
12850 (server_h): Append include/gdb/signals.h and signals_def.
12851 (server.o): Append signals_def.
12852
30d50328
JK
128532010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
12854
12855 * server.c (handle_target_event): Use target_signal_to_host for
12856 resume_info.sig initialization.
12857 * target.h (struct thread_resume) <sig>: New comment.
12858
5c3216e2
OS
128592010-07-20 Ozkan Sezer <sezeroz@gmail.com>
12860
c6f46ca0
OS
12861 * server.c (handle_query): strcpy() the returned string from paddress()
12862 instead of sprintf().
5c3216e2
OS
12863 * utils.c (paddress): Return phex_nz().
12864
6bd31874
JB
128652010-07-07 Joel Brobecker <brobecker@adacore.com>
12866
12867 * server.c (handle_v_cont): Call mourn_inferior if process
12868 just exited.
12869 (myresume): Likewise.
12870
0fb4aa4b
PA
128712010-07-01 Pedro Alves <pedro@codesourcery.com>
12872
12873 Static tracepoints, and integration with UST.
12874
12875 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
12876 * mem-break.c (uninsert_all_breakpoints)
12877 (reinsert_all_breakpoints): New.
12878 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
12879 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
12880 (gdb_agent_ust_loaded, helper_thread_id)
12881 (gdb_agent_helper_thread_id): New macros.
12882 (struct ipa_sym_addresses): Add addr_ust_loaded,
12883 addr_helper_thread_id, addr_cmd_buf.
12884 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
12885 (in_process_agent_loaded_ust): New.
12886 (write_e_ust_not_loaded): New.
12887 (maybe_write_ipa_ust_not_loaded): New.
12888 (struct collect_static_trace_data_action): New.
12889 (enum tracepoint_type) <static_tracepoint>: New.
12890 (struct tracepoint) <handle>: Mention static tracepoints.
12891 (struct static_tracepoint_ctx): New.
12892 (CMD_BUF_SIZE): New.
12893 (add_tracepoint_action): Handle static tracepoint actions.
12894 (unprobe_marker_at): New.
12895 (clear_installed_tracepoints): Handle static tracepoints.
12896 (cmd_qtdp): Handle static tracepoints.
12897 (probe_marker_at): New.
12898 (cmd_qtstart): Handle static tracepoints.
12899 (response_tracepoint): Handle static tracepoints.
12900 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
12901 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
12902 (get_context_regcache): Handle static tracepoints.
12903 (do_action_at_tracepoint): Handle static tracepoint actions.
12904 (traceframe_find_block_type): Handle static trace data blocks.
12905 (traceframe_read_sdata): New.
12906 (download_tracepoints): Download static tracepoint actions.
12907 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
12908 (GDB_PROBE_NAME): New.
12909 (ust_ops): New.
12910 (GET_UST_SYM): New.
12911 (USTF): New.
12912 (dlsym_ust): New.
12913 (ust_marker_to_static_tracepoint): New.
12914 (gdb_probe): New.
12915 (collect_ust_data_at_tracepoint): New.
12916 (gdb_ust_probe): New.
12917 (UNIX_PATH_MAX, SOCK_DIR): New.
12918 (gdb_ust_connect_sync_socket): New.
12919 (resume_thread, stop_thread): New.
12920 (run_inferior_command): New.
12921 (init_named_socket): New.
12922 (gdb_ust_socket_init): New.
12923 (cstr_to_hexstr): New.
12924 (next_st): New.
12925 (first_marker, next_marker): New.
12926 (response_ust_marker): New.
12927 (cmd_qtfstm, cmd_qtsstm): New.
12928 (unprobe_marker_at, probe_marker_at): New.
12929 (cmd_qtstmat, gdb_ust_thread): New.
12930 (gdb_ust_init): New.
12931 (initialize_tracepoint_ftlib): Call gdb_ust_init.
12932 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
12933 (ST_REGENTRY): New.
12934 (x86_64_st_collect_regmap): New.
12935 (X86_64_NUM_ST_COLLECT_GREGS): New.
12936 (AMD64_RIP_REGNUM): New.
12937 (supply_static_tracepoint_registers): New.
12938 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
12939 (ST_REGENTRY): New.
12940 (i386_st_collect_regmap): New.
12941 (i386_NUM_ST_COLLECT_GREGS): New.
12942 (supply_static_tracepoint_registers): New.
12943 * server.c (handle_query): Handle qXfer:statictrace:read.
12944 <qSupported>: Report support for StaticTracepoints, and
12945 qXfer:statictrace:read features.
12946 * server.h (traceframe_read_sdata)
12947 (supply_static_tracepoint_registers): Declare.
12948 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
12949 (unpack_varlen_hex): Include in IPA build.
12950 * Makefile.in (ustlibs, ustinc): New.
12951 (IPA_OBJS): Add remote-utils-ipa.o.
12952 ($(IPA_LIB)): Link -ldl and -lpthread.
12953 (UST_CFLAGS): New.
12954 (IPAGENT_CFLAGS): Add UST_CFLAGS.
12955 * config.in, configure: Regenerate.
12956
9e4344e5
PA
129572010-06-20 Ian Lance Taylor <iant@google.com>
12958 Pedro Alves <pedro@codesourcery.com>
12959
12960 * linux-x86-low.c (always_true): Delete.
12961 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
12962 trying to fool the compiler with always_true.
12963
c6beb2cb
PA
129642010-06-20 Pedro Alves <pedro@codesourcery.com>
12965
12966 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
12967 conditions in gdbserver.
12968
d2ed6730
UW
129692010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
12970
12971 * spu-low.c (spu_read_memory): Wrap around local store limit.
12972 (spu_write_memory): Likewise.
12973
4e29fb54
PA
129742010-06-15 Pedro Alves <pedro@codesourcery.com>
12975
12976 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
12977 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
12978 LONGEST uses.
12979 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
12980 uses.
12981 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
12982 uses with LONGEST uses.
12983
6a271cae
PA
129842010-06-14 Stan Shebs <stan@codesourcery.com>
12985 Pedro Alves <pedro@codesourcery.com>
12986
12987 Bytecode compiler.
12988
12989 * linux-x86-low.c: Include limits.h.
12990 (add_insns): New.
12991 (always_true): New.
12992 (EMIT_ASM): New.
12993 (EMIT_ASM32): New.
12994 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
12995 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
12996 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
12997 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
12998 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
12999 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
13000 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
13001 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
13002 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
13003 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
13004 (amd64_emit_void_call_2): New.
13005 (amd64_emit_ops): New.
13006 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
13007 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
13008 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
13009 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
13010 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
13011 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
13012 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
13013 (i386_emit_call, i386_emit_reg, i386_emit_pop)
13014 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
13015 (i386_emit_stack_adjust, i386_emit_int_call_1)
13016 (i386_emit_void_call_2): New.
13017 (i386_emit_ops): New.
13018 (x86_emit_ops): New.
13019 (the_low_target): Install x86_emit_ops.
13020 * server.h (struct emit_ops): New.
13021 (get_raw_reg_func_addr): Declare.
13022 (current_insn_ptr, emit_error): Declare.
13023 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
13024 (set_trace_state_variable_value): New defines.
13025 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
13026 addr_get_trace_state_variable_value and
13027 addr_set_trace_state_variable_value.
13028 (symbol_list): New fields for get_raw_reg,
13029 get_trace_state_variable_value and set_trace_state_variable_value.
13030 (condfn): New typedef.
13031 (struct tracepoint): New field `compiled_cond'.
13032 (do_action_at_tracepoint): Clear compiled_cond.
13033 (get_trace_state_variable_value, set_trace_state_variable_value):
13034 Export in the IPA.
13035 (condition_true_at_tracepoint): If there's a compiled condition,
13036 run that.
13037 (current_insn_ptr, emit_error): New globals.
13038 (struct bytecode_address): New.
13039 (get_raw_reg_func_addr): New.
13040 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
13041 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
13042 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
13043 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
13044 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
13045 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
13046 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
13047 (compile_tracepoint_condition, compile_bytecodes): New.
13048 * target.h (emit_ops): Forward declare.
13049 (struct target_ops): New field emit_ops.
13050 (target_emit_ops): New.
13051 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
13052 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
13053 * linux-low.c (linux_emit_ops): New.
13054 (linux_target_ops): Install it.
13055 * linux-low.h (struct linux_target_ops): New field emit_ops.
13056
92b72907
UW
130572010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
13058
13059 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
13060 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
13061
fa593d66
PA
130622010-06-01 Pedro Alves <pedro@codesourcery.com>
13063 Stan Shebs <stan@codesourcery.com>
13064
13065 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
13066 (all): Depend on $(extra_libraries).
13067 (install-only): Install the IPA.
13068 (IPA_OBJS, IPA_LIB): New.
13069 (clean): Remove the IPA lib.
13070 (IPAGENT_CFLAGS): New.
13071 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
13072 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
13073 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
13074 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
13075 * configure.ac: Check for atomic builtins support in the compiler.
13076 (IPA_DEPFILES, extra_libraries): Define.
13077 * configure.srv (ipa_obj): Add description.
13078 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
13079 (i[34567]86-*-linux*): Set ipa_obj.
13080 (x86_64-*-linux*): Set ipa_obj.
13081 * linux-low.c (stabilizing_threads): New.
13082 (supports_fast_tracepoints): New.
13083 (linux_detach): Stabilize threads before detaching.
13084 (handle_tracepoints): Handle internal tracing breakpoints. Assert
13085 the lwp is either not stabilizing, or is moving out of a jump pad.
13086 (linux_fast_tracepoint_collecting): New.
13087 (maybe_move_out_of_jump_pad): New.
13088 (enqueue_one_deferred_signal): New.
13089 (dequeue_one_deferred_signal): New.
13090 (linux_wait_for_event_1): If moving out of a jump pad, defer
13091 pending signals to later.
13092 (linux_stabilize_threads): New.
13093 (linux_wait_1): Check if threads need moving out of jump pads, and
13094 do it if so.
13095 (stuck_in_jump_pad_callback): New.
13096 (move_out_of_jump_pad_callback): New.
13097 (lwp_running): New.
13098 (linux_resume_one_lwp): Handle moving out of jump pads.
13099 (linux_set_resume_request): Dequeue deferred signals.
13100 (need_step_over_p): Also step over fast tracepoint jumps.
13101 (start_step_over): Also uninsert fast tracepoint jumps.
13102 (finish_step_over): Also reinsert fast tracepoint jumps.
13103 (linux_install_fast_tracepoint_jump): New.
13104 (linux_target_ops): Install linux_stabilize_threads and
13105 linux_install_fast_tracepoint_jump_pad.
13106 * linux-low.h (linux_target_ops) <get_thread_area,
13107 install_fast_tracepoint_jump_pad>: New fields.
13108 (struct lwp_info) <collecting_fast_tracepoint,
13109 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
13110 (linux_get_thread_area): Declare.
13111 * linux-x86-low.c (jump_insn): New.
13112 (x86_get_thread_area): New.
13113 (append_insns): New.
13114 (push_opcode): New.
13115 (amd64_install_fast_tracepoint_jump_pad): New.
13116 (i386_install_fast_tracepoint_jump_pad): New.
13117 (x86_install_fast_tracepoint_jump_pad): New.
13118 (the_low_target): Install x86_get_thread_area and
13119 x86_install_fast_tracepoint_jump_pad.
13120 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
13121 (struct fast_tracepoint_jump): New.
13122 (fast_tracepoint_jump_insn): New.
13123 (fast_tracepoint_jump_shadow): New.
13124 (find_fast_tracepoint_jump_at): New.
13125 (fast_tracepoint_jump_here): New.
13126 (delete_fast_tracepoint_jump): New.
13127 (set_fast_tracepoint_jump): New.
13128 (uninsert_fast_tracepoint_jumps_at): New.
13129 (reinsert_fast_tracepoint_jumps_at): New.
13130 (set_breakpoint_at): Use write_inferior_memory.
13131 (uninsert_raw_breakpoint): Use write_inferior_memory.
13132 (check_mem_read): Mask out fast tracepoint jumps.
13133 (check_mem_write): Mask out fast tracepoint jumps.
13134 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
13135 (set_fast_tracepoint_jump): Declare.
13136 (delete_fast_tracepoint_jump)
13137 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
13138 (reinsert_fast_tracepoint_jumps_at): Declare.
13139 * regcache.c: Don't compile many functions when building the
13140 in-process agent library.
13141 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
13142 the register buffer in the heap.
13143 (free_register_cache): If the register buffer isn't owned by the
13144 regcache, don't free it.
13145 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
13146 pre-existing register caches.
13147 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
13148 type.
13149 (convert_ascii_to_int): : Constify `from' parameter type.
13150 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
13151 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
13152 the needed buffer in-place.
13153 (relocate_instruction): New.
13154 * server.c (handle_query) <qSymbols>: If the target supports
13155 tracepoints, give it a chance of looking up symbols. Report
13156 support for fast tracepoints.
13157 (handle_status): Stabilize threads.
13158 (process_serial_event): Adjust.
13159 * server.h (struct fast_tracepoint_jump): Forward declare.
13160 (struct process_info) <fast_tracepoint_jumps>: New field.
13161 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
13162 (decode_X_packet, decode_M_packet): Adjust.
13163 (relocate_instruction): Declare.
13164 (in_process_agent_loaded): Declare.
13165 (tracepoint_look_up_symbols): Declare.
13166 (struct fast_tpoint_collect_status): Declare.
13167 (fast_tracepoint_collecting): Declare.
13168 (force_unlock_trace_buffer): Declare.
13169 (handle_tracepoint_bkpts): Declare.
13170 (initialize_low_tracepoint)
13171 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
13172 * target.h (struct target_ops) <stabilize_threads,
13173 install_fast_tracepoint_jump_pad>: New fields.
13174 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
13175 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
13176 [HAVE_STDINT_H]: Include stdint.h.
13177 (trace_debug_1): Rename to ...
13178 (trace_vdebug): ... this.
13179 (trace_debug): Rename to ...
13180 (trace_debug_1): ... this. Add `level' parameter.
13181 (trace_debug): New.
13182 (ATTR_USED, ATTR_NOINLINE): New.
13183 (IP_AGENT_EXPORT): New.
13184 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
13185 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
13186 (about_to_request_buffer_space, trace_buffer_is_full)
13187 (stopping_tracepoint, expr_eval_result, error_tracepoint)
13188 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
13189 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
13190 (traceframe_write_count, traceframes_created)
13191 (trace_state_variables)
13192 New renaming defines.
13193 (struct ipa_sym_addresses): New.
13194 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
13195 (symbol_list): New.
13196 (ipa_sym_addrs): New.
13197 (all_tracepoint_symbols_looked_up): New.
13198 (in_process_agent_loaded): New.
13199 (write_e_ipa_not_loaded): New.
13200 (maybe_write_ipa_not_loaded): New.
13201 (tracepoint_look_up_symbols): New.
13202 (debug_threads) [IN_PROCESS_AGENT]: New.
13203 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
13204 (UNKNOWN_SIDE_EFFECTS): New.
13205 (stop_tracing): New.
13206 (flush_trace_buffer): New.
13207 (stop_tracing_bkpt): New.
13208 (flush_trace_buffer_bkpt): New.
13209 (read_inferior_integer): New.
13210 (read_inferior_uinteger): New.
13211 (read_inferior_data_pointer): New.
13212 (write_inferior_data_pointer): New.
13213 (write_inferior_integer): New.
13214 (write_inferior_uinteger): New.
13215 (struct collect_static_trace_data_action): Delete.
13216 (enum tracepoint_type): New.
13217 (struct tracepoint) <type>: New field `type'.
43aaf8b6
PA
13218 <actions_str, step_actions, step_actions_str>: Only include in
13219 GDBserver.
fa593d66
PA
13220 <orig_size, obj_addr_on_target, adjusted_insn_addr>
13221 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
13222 (tracepoints): Use IP_AGENT_EXPORT.
13223 (last_tracepoint): Don't include in the IPA.
13224 (stopping_tracepoint): Use IP_AGENT_EXPORT.
13225 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
13226 (alloced_trace_state_variables): New.
13227 (trace_state_variables): Use IP_AGENT_EXPORT.
13228 (traceframe_t): Delete unused variable.
13229 (circular_trace_buffer): Don't include in the IPA.
13230 (trace_buffer_start): Delete.
13231 (struct trace_buffer_control): New.
13232 (trace_buffer_free): Delete.
13233 (struct ipa_trace_buffer_control): New.
13234 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
13235 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
13236 New.
13237 (trace_buffer_ctrl): New.
13238 (TRACE_BUFFER_CTRL_CURR): New.
13239 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
13240 Reimplement as macros.
13241 (trace_buffer_wrap): Delete.
13242 (traceframe_write_count, traceframe_read_count)
13243 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
13244 (struct tracepoint_hit_ctx) <type>: New field.
13245 (struct fast_tracepoint_ctx): New.
13246 (memory_barrier): New.
13247 (cmpxchg): New.
13248 (record_tracepoint_error): Update atomically in the IPA.
13249 (clear_inferior_trace_buffer): New.
13250 (about_to_request_buffer_space): New.
13251 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
13252 updating the same buffer.
13253 (add_tracepoint): Default the tracepoint's type to trap
13254 tracepoint, and orig_size to -1.
13255 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
13256 internal variables.
13257 (create_trace_state_variable): New parameter `gdb'. Handle it.
13258 (clear_installed_tracepoints): Clear fast tracepoint jumps.
13259 (cmd_qtdp): Handle fast tracepoints.
13260 (cmd_qtdv): Adjust.
13261 (max_jump_pad_size): New.
13262 (gdb_jump_pad_head): New.
13263 (get_jump_space_head): New.
13264 (claim_jump_space): New.
13265 (sort_tracepoints): New.
13266 (MAX_JUMP_SIZE): New.
13267 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
13268 IPA.
13269 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
13270 support. Upload fast traceframes, and delete internal IPA
13271 breakpoints.
13272 (stop_tracing_handler): New.
13273 (flush_trace_buffer_handler): New.
13274 (cmd_qtstop): Upload fast tracepoints.
13275 (response_tracepoint): Handle fast tracepoints.
13276 (tracepoint_finished_step): Upload fast traceframes. Set the
13277 tracepoint hit context's tracepoint type.
13278 (handle_tracepoint_bkpts): New.
13279 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
13280 type. Add comment about fast tracepoints.
13281 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
13282 non-existing action_str field.
13283 (get_context_regcache): Handle fast tracepoints.
13284 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
13285 to the regcache.
13286 (fast_tracepoint_from_jump_pad_address): New.
13287 (fast_tracepoint_from_ipa_tpoint_address): New.
13288 (collecting_t): New.
13289 (force_unlock_trace_buffer): New.
13290 (fast_tracepoint_collecting): New.
13291 (collecting): New.
13292 (gdb_collect): New.
13293 (write_inferior_data_ptr): New.
13294 (target_tp_heap): New.
13295 (target_malloc): New.
13296 (download_agent_expr): New.
13297 (UALIGN): New.
13298 (download_tracepoints): New.
13299 (download_trace_state_variables): New.
13300 (upload_fast_traceframes): New.
13301 (IPA_FIRST_TRACEFRAME): New.
13302 (IPA_NEXT_TRACEFRAME_1): New.
13303 (IPA_NEXT_TRACEFRAME): New.
13304 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
13305 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
13306 (gdb_jump_pad_buffer_end): New.
13307 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
13308 (initialize_tracepoint): Adjust.
13309 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
13310 buffer. Initialize the low module.
13311 * utils.c (PREFIX, TOOLNAME): New.
13312 (malloc_failure): Use PREFIX.
13313 (error): In the IPA, an error causes an exit.
13314 (fatal, warning): Use PREFIX.
13315 (internal_error): Use TOOLNAME.
13316 (NUMCELLS): Increase to 10.
13317 * configure, config.in: Regenerate.
13318
d149dd1d
PA
133192010-06-01 Pedro Alves <pedro@codesourcery.com>
13320
13321 * server.c (handle_query) <qSupported>: Do two passes over the
13322 qSupported string to avoid nesting strtok.
13323
f6528abd
JK
133242010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
13325
13326 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
13327 (CDEPS): New.
13328 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
13329 -Wl,--dynamic-list.
13330 * configure: Regenerate.
13331 * proc-service.list: New.
13332
ca2a87a0
JK
133332010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
13334
13335 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
13336 New comment.
13337
363a6e9f
OS
133382010-05-26 Ozkan Sezer <sezeroz@gmail.com>
13339
13340 * gdbreplay.c (remote_open): Check error return from socket() call by
13341 its equality to -1 not by it being negative.
13342 * remote-utils.c (remote_open): Likewise.
13343
d23b6cb1
PA
133442010-05-23 Pedro Alves <pedro@codesourcery.com>
13345
13346 * config.h: Regenerate.
13347
28d3cf85
MK
133482010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
13349
13350 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
13351 doesn't provide PTRACE_GET_THREAD_AREA.
13352
fea36a59
MK
133532010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
13354
13355 * linux-m68k-low.c: Include <asm/ptrace.h>
13356 (ps_get_thread_area): Implement.
13357
24b066ba
DE
133582010-05-03 Doug Evans <dje@google.com>
13359
13360 * event-loop.c (struct callback_event): New struct.
13361 (callback_list): New global.
13362 (append_callback_event, delete_callback_event): New functions.
13363 (process_callback): New function.
13364 (start_event_loop): Call it.
13365 * remote-utils.c (NOT_SCHEDULED): Define.
13366 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
13367 moved out of readchar.
13368 (readchar): Rewrite. Call reschedule before returning.
13369 (reset_readchar): New function.
13370 (remote_close): Call it.
13371 (process_remaining, reschedule): New functions.
13372 * server.h (callback_handler_func): New typedef.
13373 (append_callback_event, delete_callback_event): Declare.
13374
9836d6ea
PA
133752010-05-03 Pedro Alves <pedro@codesourcery.com>
13376
13377 * proc-service.c (ps_pglobal_lookup): Use
13378 thread_db_look_up_one_symbol.
13379 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
13380 parameter. Use it instead of all_symbols_looked_up.
13381 * server.h (struct process_info) <all_symbols_looked_up>: Delete
13382 field.
13383 (all_symbols_looked_up): Don't declare.
13384 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
13385 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
13386 field.
13387 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
13388 Set all_symbols_looked_up here.
13389 (thread_db_look_up_one_symbol): New.
13390 (thread_db_get_tls_address): Adjust.
13391 (thread_db_load_search, try_thread_db_load_1): Always allocate the
13392 thread_db object on the heap, and tentatively set it in the
13393 process structure.
13394 (thread_db_init): Don't set all_symbols_looked_up here.
13395 * linux-low.h (thread_db_look_up_one_symbol): Declare.
13396
7984d532
PA
133972010-05-03 Pedro Alves <pedro@codesourcery.com>
13398
13399 * linux-low.c (linux_kill, linux_detach): Adjust.
13400 (status_pending_p_callback): Remove redundant statement. Check
13401 for !TARGET_WAITIKIND_IGNORE, instead of
13402 TARGET_WAITKIND_STOPPED.
13403 (handle_tracepoints): Make sure LWP is locked. Adjust.
13404 (linux_wait_for_event_1): Adjust.
13405 (linux_cancel_breakpoints): New.
13406 (unsuspend_one_lwp): New.
13407 (unsuspend_all_lwps): New.
13408 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
13409 (send_sigstop_callback): Change return type to int, add new
13410 `except' parameter and handle it.
13411 (suspend_and_send_sigstop_callback): New.
13412 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
13413 pass them down. If SUSPEND, also increment the lwp's suspend
13414 count.
13415 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
13416 (need_step_over_p): Don't consider suspended LWPs.
13417 (start_step_over): Adjust.
13418 (proceed_one_lwp): Change return type to int, add new `except'
13419 parameter and handle it.
13420 (unsuspend_and_proceed_one_lwp): New.
13421 (proceed_all_lwps): Use find_inferior instead of
13422 for_each_inferior.
13423 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
13424 also decrement the suspend count of LWPs. Pass `except' down,
13425 instead of hacking its suspend count.
13426 (linux_pause_all): Add `freeze' parameter. Adjust.
13427 (linux_unpause_all): New.
13428 (linux_target_ops): Install linux_unpause_all.
13429 * server.c (handle_status): Adjust.
13430 * target.h (struct target_ops): New fields `unpause_all' and
13431 `cancel_breakpoints'. Add new parameter to `pause_all'.
13432 (pause_all): Add new `freeze' parameter.
13433 (unpause_all): New.
13434 (cancel_breakpoints): New.
13435 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
13436 cancel breakpoints.
13437 (cmd_qtstart): Pause threads.
13438 (stop_tracing): Pause threads, and cancel breakpoints.
13439 * win32-low.c (win32_target_ops): Adjust.
13440
e471f25b
PA
134412010-05-03 Pedro Alves <pedro@codesourcery.com>
13442
13443 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
13444 the inferior right away from here...
13445 (linux_wait_1): ... to here, and adjust to check the thread's
13446 last_resume_kind instead of the lwp's step or stop_expected flags.
13447
1915ef4f
PA
134482010-05-02 Pedro Alves <pedro@codesourcery.com>
13449
13450 * README: Use consistent `GDB' and `GDBserver' spellings.
13451
f9e39928
PA
134522010-05-02 Pedro Alves <pedro@codesourcery.com>
13453
13454 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
13455 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
13456 (linux_detach_one_lwp): Assume the lwp is stopped.
13457 (any_thread_of): Delete.
13458 (linux_detach): Stop all lwps here. Don't blindly delete all
13459 breakpoints.
13460 (delete_lwp_callback): New.
13461 (linux_mourn): Delete all lwps of the process that is gone.
13462 (linux_wait_1): Don't delete the last lwp of the process here.
13463 * mem-break.h (mark_breakpoints_out): Declare.
13464 * mem-break.c (mark_breakpoints_out): New.
13465 (free_all_breakpoints): Use it.
13466 * server.c (handle_target_event): If the process is gone, mark
13467 breakpoints out.
13468 * thread-db.c (struct thread_db) <create_bp>: New field.
13469 (thread_db_enable_reporting): Fix prototype. Store a thread event
13470 breakpoint reference in the thread_db struct.
13471 (thread_db_load_search): Clear the thread_db object.
13472 (try_thread_db_load_1): Ditto.
13473 (switch_to_process): New.
13474 (disable_thread_event_reporting): Use it.
13475 (remove_thread_event_breakpoints): New.
13476 (thread_db_detach, thread_db_mourn): Use it.
13477
1e7fc18c
PA
134782010-05-01 Pedro Alves <pedro@codesourcery.com>
13479
13480 * linux-low.c (linux_enable_event_reporting): New.
13481 (linux_wait_for_event_1, handle_extended_wait): Use it.
13482
02fc4de7
PA
134832010-04-30 Pedro Alves <pedro@codesourcery.com>
13484
13485 * linux-low.c (linux_kill_one_lwp, linux_kill)
13486 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
13487 (send_sigstop): Take an lwp_info as parameter instead. Queue a
13488 SIGSTOP even if the LWP is stopped.
13489 (send_sigstop_callback): New.
13490 (stop_all_lwps): Use send_sigstop_callback instead.
13491 (linux_resume_one_thread): Adjust.
13492 (proceed_one_lwp): Still proceed an LWP that the client has
13493 requested to stop, if we haven't reported it as stopped yet. Make
13494 sure that LWPs the client want stopped, have a pending SIGSTOP.
13495
bc3b5632
DE
134962010-04-26 Doug Evans <dje@google.com>
13497
ae1ada35
DE
13498 * server.c (handle_general_set): Make static.
13499
bc3b5632
DE
13500 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
13501 Print received char after testing for error/eof instead of before.
13502 (input_interrupt): Tweak comment.
13503
65730243
DE
135042010-04-23 Doug Evans <dje@google.com>
13505
13506 * server.c (start_inferior): Print inferior argv if --debug.
13507
a8ae7dc0
AR
135082010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
13509
13510 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
13511 * nto-x86-low.c: Include server.h
13512
1c07cc19
PM
135132010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
13514
13515 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
13516 be consistent with other sources of this directory.
13517 (init_registers_amd64): Correct name of source file of this function
13518 in the comment.
13519
e0a61e09
PM
135202010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
13521
13522 * configure.srv (x86_64-*-mingw*): New configuration for Windows
13523 64-bit executables.
13524
54709339
PM
135252010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
13526
13527 * win32-i386-low.c: Add 64-bit support.
13528 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
13529 (init_registers_amd64): Declare.
13530 (mappings): Add 64-bit version of array.
13531 (init_windows_x86): New function.
13532 (the_low_target): Change init_arch field to init_windows_x86.
13533
e8f0053d
PM
135342010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
13535
13536 * win32-low.c: Adapt to support also 64-bit architecture.
13537 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
13538 (get_image_name): Use SIZE_T type for local variable `done'.
13539 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
13540 (toolhelp_get_dll_name): Idem.
13541 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
13542 Use uintptr_t typecast to avoid warning.
13543 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
13544 (handle_exception): Use phex_nz to avoid warning.
13545 (win32_wait): Remove unused local variable `process'.
13546
c481e77e
PM
135472010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
13548
13549 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
13550 `amd64-avx.o'.
13551
12ea4b69
PM
135522010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
13553
13554 * configure.ac: Use `ws2_32' library for srv_mingw.
13555 * configure: Regenerate.
13556 * gdbreplay.c: Include winsock2.h instead of winsock.h.
13557 * remote-utils.c: Likewise.
13558
f6d1620c
L
135592010-04-17 H.J. Lu <hongjiu.lu@intel.com>
13560
13561 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
13562 if __x86_64__ is defined.
13563
8e642873
PM
135642010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
13565
13566 * configure: Regenerate.
13567
711e434b
PM
135682010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
13569
13570 * server.c (handle_query): Handle 'qGetTIBAddr' query.
13571 * target.h (target_ops): New get_tib_address field.
13572 * win32-low.h (win32_thread_info): Add thread_local_base field.
13573 * win32-low.c (child_add_thread): Add tlb argument.
13574 Set thread_local_base field to TLB.
13575 (get_child_debug_event): Adapt to child_add_thread change.
13576 (win32_get_tib_address): New function.
13577 (win32_target_ops): Set get_tib_address field to
13578 win32_get_tib_address.
13579 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
13580
505106cd
PA
135812010-04-12 Pedro Alves <pedro@codesourcery.com>
13582
505106cd
PA
13583 * linux-low.c (linux_mourn): Also remove the process.
13584 * server.c (handle_target_event): Don't remove the process here.
13585 * nto-low.c (nto_mourn): New.
13586 (nto_target_ops): Install it.
13587 * spu-low.c (spu_mourn): New.
13588 (spu_target_ops): Install it.
13589 * win32-low.c (win32_mourn): New.
13590 (win32_target_ops): Install it.
13591
e8470a06
PA
135922010-04-12 Pedro Alves <pedro@codesourcery.com>
13593
13594 * server.h (buffer_xml_printf): Remove redundant `;'.
13595
45ba0d02
PA
135962010-04-12 Pedro Alves <pedro@codesourcery.com>
13597
13598 * regcache.c (set_register_cache): Invalidate regcaches before
13599 changing the register cache layout.
13600 (regcache_invalidate_one): Allow a NULL regcache.
13601 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
13602 regcaches before changing the register cache layout or the target
13603 regsets.
13604
59e04013
L
136052010-04-12 H.J. Lu <hongjiu.lu@intel.com>
13606
13607 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
13608 variable warning on Linux/x86-64.
13609
8336d594
PA
136102010-04-11 Pedro Alves <pedro@codesourcery.com>
13611
13612 GDBserver disconnected tracing support.
13613
13614 * linux-low.c (linux_remove_process): Delete.
13615 (add_lwp): Don't set last_resume_kind here.
13616 (linux_kill): Use `mourn'.
13617 (linux_detach): Use `thread_db_detach', and `mourn'.
13618 (linux_mourn): New.
13619 (linux_attach_lwp_1): Adjust comment.
13620 (linux_attach): last_resume_kind moved the thread_info; adjust.
13621 (status_pending_p_callback): Adjust.
13622 (linux_wait_for_event_1): Adjust.
13623 (count_events_callback, select_singlestep_lwp_callback)
13624 (select_event_lwp_callback, cancel_breakpoints_callback)
13625 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
13626 (proceed_one_lwp): Adjust.
13627 (linux_async): Add debug output.
13628 (linux_thread_stopped): New.
13629 (linux_pause_all): New.
13630 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
13631 linux_pause_all.
13632 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
13633 (thread_db_free): Delete declaration.
13634 (thread_db_detach, thread_db_mourn): Declare.
13635 * thread-db.c (thread_db_init): Use thread_db_mourn.
13636 (thread_db_free): Delete, split in two.
13637 (disable_thread_event_reporting): New.
13638 (thread_db_detach): New.
13639 (thread_db_mourn): New.
13640
13641 * server.h (struct thread_info) <last_resume_kind>: New field.
13642 <attached>: Add comment.
13643 <gdb_detached>: New field.
13644 (handler_func): Change return type to int.
13645 (handle_serial_event, handle_target_event): Ditto.
13646 (gdb_connected): Declare.
13647 (tracing): Delete.
13648 (disconnected_tracing): Declare.
13649 (stop_tracing): Declare.
13650
13651 * server.c (handle_query) <qSupported>: Report support for
13652 disconnected tracing.
13653 (queue_stop_reply_callback): Account for running threads.
13654 (gdb_wants_thread_stopped): New.
13655 (gdb_wants_all_threads_stopped): New.
13656 (gdb_reattached_process): New.
13657 (handle_status): Clear the `gdb_detached' flag of all processes.
13658 In all-stop, stop all threads.
13659 (main): Be sure to leave tfind mode. Handle disconnected tracing.
13660 (process_serial_event): If the remote connection breaks, or if an
13661 exit was forced with "monitor exit", force an event loop exit.
13662 Handle disconnected tracing on detach.
13663 (handle_serial_event): Adjust.
13664 (handle_target_event): If GDB isn't connected, forward events back
13665 to the inferior, unless the last process exited, in which case,
13666 exit gdbserver. Adjust interface.
13667
13668 * remote-utils.c (remote_open): Don't block in accept. Instead
13669 register an event loop source on the listen socket file
13670 descriptor. Refactor bits into ...
13671 (listen_desc): ... this new global.
13672 (gdb_connected): ... this new function.
13673 (enable_async_notification): ... this new function.
13674 (handle_accept_event): ... this new function.
13675 (remote_close): Clear remote_desc.
13676
13677 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
13678
13679 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
13680 New fields.
13681 (mourn_inferior): Define.
13682 (target_process_qsupported): Avoid the dangling else problem.
13683 (thread_stopped): Define.
13684 (pause_all): Define.
13685 (target_waitstatus_to_string): Declare.
13686 * target.c (target_waitstatus_to_string): New.
13687
13688 * tracepoint.c (tracing): Make extern.
13689 (disconnected_tracing): New.
13690 (stop_tracing): Make extern. Handle tracing stops due to GDB
13691 disconnecting.
13692 (cmd_qtdisconnected): New.
13693 (cmd_qtstatus): Report disconnected tracing status in trace reply.
13694 (handle_tracepoint_general_set): Handle QTDisconnected.
13695
13696 * event-loop.c (event_handler_func): Change return type to int.
13697 (process_event): Bail out if the event handler wants the event
13698 loop to stop.
13699 (handle_file_event): Ditto.
13700 (start_event_loop): Bail out if the event handler wants the event
13701 loop to stop.
13702
13703 * nto-low.c (nto_target_ops): Adjust.
13704 * spu-low.c (spu_wait): Don't remove the process here.
13705 (spu_target_ops): Adjust.
13706 * win32-low.c (win32_wait): Don't remove the process here.
13707 (win32_target_ops): Adjust.
13708
5d267c4c
PA
137092010-04-11 Pedro Alves <pedro@codesourcery.com>
13710
13711 * regcache.c (realloc_register_cache): Invalidate inferior's
13712 regcache before recreating it.
13713
623ccd72
PA
137142010-04-09 Pedro Alves <pedro@codesourcery.com>
13715
13716 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
13717
219f2f23
PA
137182010-04-09 Stan Shebs <stan@codesourcery.com>
13719 Pedro Alves <pedro@codesourcery.com>
13720
13721 * server.h (LONGEST): New.
13722 (struct thread_info) <while_stepping>: New field.
13723 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
13724 Declare.
13725 (initialize_tracepoint, handle_tracepoint_general_set)
13726 (handle_tracepoint_query, tracepoint_finished_step)
13727 (tracepoint_was_hit, release_while_stepping_state_list):
13728 (current_traceframe): Declare.
13729 * server.c (handle_general_set): Handle tracepoint packets.
13730 (read_memory): New.
13731 (write_memory): New.
13732 (handle_search_memory_1): Use read_memory.
13733 (handle_query): Report support for conditional tracepoints, trace
13734 state variables, and tracepoint sources. Handle tracepoint
13735 queries.
13736 (main): Initialize the tracepoints module.
13737 (process_serial_event): Handle traceframe reads/writes.
13738
13739 * linux-low.c (handle_tracepoints): New.
13740 (linux_wait_1): Call it.
13741 (linux_resume_one_lwp): Handle while-stepping.
13742 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
13743 (linux_target_ops): Install them.
13744 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
13745 New field.
13746 * linux-x86-low.c (x86_supports_tracepoints): New.
13747 (the_low_target). Install it.
13748
13749 * mem-break.h (delete_breakpoint): Declare.
13750 * mem-break.c (delete_breakpoint): Make external.
13751
13752 * target.h (struct target_ops): Add `supports_tracepoints',
13753 `read_pc', and `write_pc' fields.
13754 (target_supports_tracepoints): Define.
13755 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
13756 (phex_nz): New.
13757
13758 * regcache.h (struct regcache) <registers_owned>: New field.
13759 (init_register_cache, regcache_cpy): Declare.
13760 (regcache_read_pc, regcache_write_pc): Declare.
13761 (register_cache_size): Declare.
13762 (supply_regblock): Declare.
13763 * regcache.c (init_register_cache): New.
13764 (new_register_cache): Use it.
13765 (regcache_cpy): New.
13766 (register_cache_size): New.
13767 (supply_regblock): New.
13768 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 13769
219f2f23
PA
13770 * tracepoint.c: New.
13771
13772 * Makefile.in (OBS): Add tracepoint.o.
13773 (tracepoint.o): New rule.
13774
3a13a53b
L
137752010-04-08 H.J. Lu <hongjiu.lu@intel.com>
13776
13777 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
13778 (i386-mmx.o): New.
13779 (i386-mmx.c): Likewise.
13780 (i386-mmx-linux.o): Likewise.
13781 (i386-mmx-linux.c): Likewise.
13782
13783 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
13784 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
13785 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
13786 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
13787
13788 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
13789 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
13790 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
13791
1570b33e
L
137922010-04-07 H.J. Lu <hongjiu.lu@intel.com>
13793
13794 * Makefile.in (clean): Updated.
13795 (i386-avx.o): New.
13796 (i386-avx.c): Likewise.
13797 (i386-avx-linux.o): Likewise.
13798 (i386-avx-linux.c): Likewise.
13799 (amd64-avx.o): Likewise.
13800 (amd64-avx.c): Likewise.
13801 (amd64-avx-linux.o): Likewise.
13802 (amd64-avx-linux.c): Likewise.
13803
13804 * configure.srv (srv_i386_regobj): Add i386-avx.o.
13805 (srv_i386_linux_regobj): Add i386-avx-linux.o.
13806 (srv_amd64_regobj): Add amd64-avx.o.
13807 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
13808 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
13809 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
13810 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
13811 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
13812 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
13813 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
13814
13815 * i387-fp.c: Include "i386-xstate.h".
13816 (i387_xsave): New.
13817 (i387_cache_to_xsave): Likewise.
13818 (i387_xsave_to_cache): Likewise.
13819 (x86_xcr0): Likewise.
13820
13821 * i387-fp.h (i387_cache_to_xsave): Likewise.
13822 (i387_xsave_to_cache): Likewise.
13823 (x86_xcr0): Likewise.
13824
13825 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
13826 * linux-crisv32-low.c (target_regsets): Likewise.
13827 * linux-m68k-low.c (target_regsets): Likewise.
13828 * linux-mips-low.c (target_regsets): Likewise.
13829 * linux-ppc-low.c (target_regsets): Likewise.
13830 * linux-s390-low.c (target_regsets): Likewise.
13831 * linux-sh-low.c (target_regsets): Likewise.
13832 * linux-sparc-low.c (target_regsets): Likewise.
13833 * linux-xtensa-low.c (target_regsets): Likewise.
13834
13835 * linux-low.c: Include <sys/uio.h>.
13836 (regsets_fetch_inferior_registers): Support nt_type.
13837 (regsets_store_inferior_registers): Likewise.
13838 (linux_process_qsupported): New.
13839 (linux_target_ops): Add linux_process_qsupported.
13840
13841 * linux-low.h (regset_info): Add nt_type.
13842 (linux_target_ops): Add process_qsupported.
13843
13844 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
13845 and <sys/uio.h>.
13846 (init_registers_i386_avx_linux): New.
13847 (init_registers_amd64_avx_linux): Likewise.
13848 (xmltarget_i386_linux_no_xml): Likewise.
13849 (xmltarget_amd64_linux_no_xml): Likewise.
13850 (PTRACE_GETREGSET): Likewise.
13851 (PTRACE_SETREGSET): Likewise.
13852 (x86_fill_xstateregset): Likewise.
13853 (x86_store_xstateregset): Likewise.
13854 (use_xml): Likewise.
13855 (x86_linux_update_xmltarget): Likewise.
13856 (x86_linux_process_qsupported): Likewise.
13857 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
13858 (x86_arch_setup): Don't call init_registers_amd64_linux nor
13859 init_registers_i386_linux here. Call
13860 x86_linux_update_xmltarget.
13861 (the_low_target): Add x86_linux_process_qsupported.
13862
13863 * server.c (handle_query): Call target_process_qsupported.
13864
13865 * target.h (target_ops): Add process_qsupported.
13866 (target_process_qsupported): New.
13867
fc7238bb
PA
138682010-04-03 Pedro Alves <pedro@codesourcery.com>
13869
13870 * inferiors.c (add_thread): Set last_status kind to
13871 TARGET_WAITKIND_IGNORE.
13872 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
13873 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
13874 (linux_wait_1): Move `thread' local definition to block that uses
13875 it. Don't NULL initialize `event_child'.
13876 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
13877 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
13878 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
13879
bdabb078
PA
138802010-04-01 Pedro Alves <pedro@codesourcery.com>
13881
13882 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
13883 an extended waitstatus, or by a watchpoint.
13884 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
13885 thread was stepping or has been stopped by a watchpoint.
13886
d3bbe7a0
PA
138872010-04-01 Pedro Alves <pedro@codesourcery.com>
13888
13889 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
13890 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
13891 of another, then delete the previous, and validate all
13892 breakpoints.
13893 (validate_inserted_breakpoint): New.
13894 (delete_disabled_breakpoints): New.
13895 (validate_breakpoints): New.
13896 (check_mem_read): Validate breakpoints before trusting their
13897 shadow. Delete disabled breakpoints.
13898 (check_mem_write): Validate breakpoints before trusting they
13899 should be inserted. Delete disabled breakpoints.
13900 * mem-break.h (validate_breakpoints):
13901 * server.c (handle_query): Validate breakpoints when we see a
13902 qSymbol query.
13903
8b07ae33
PA
139042010-04-01 Pedro Alves <pedro@codesourcery.com>
13905
13906 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
13907 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
13908 if we could tell there's a GDB breakpoint at stop_pc.
13909 (need_step_over_p): Don't do a step over if we find a GDB
13910 breakpoint at the resume PC.
13911
13912 * mem-break.c (struct raw_breakpoint): New.
13913 (enum bkpt_type): New type `gdb_breakpoint'.
13914 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
13915 fields. New field `raw'.
13916 (find_raw_breakpoint_at): New.
13917 (set_raw_breakpoint_at): Handle refcounting. Create a raw
13918 breakpoint instead.
13919 (set_breakpoint_at): Adjust.
13920 (delete_raw_breakpoint): New.
13921 (release_breakpoint): New.
13922 (delete_breakpoint): Rename to...
13923 (delete_breakpoint_1): ... this. Add proc parameter. Use
13924 release_breakpoint. Return ENOENT.
13925 (delete_breakpoint): Reimplement.
13926 (find_breakpoint_at): Delete.
13927 (find_gdb_breakpoint_at): New.
13928 (delete_breakpoint_at): Delete.
13929 (set_gdb_breakpoint_at): New.
13930 (delete_gdb_breakpoint_at): New.
13931 (gdb_breakpoint_here): New.
13932 (set_reinsert_breakpoint): Use release_breakpoint.
13933 (uninsert_breakpoint): Rename to ...
13934 (uninsert_raw_breakpoint): ... this.
13935 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
13936 (reinsert_raw_breakpoint): Change parameter type to
13937 raw_breakpoint.
13938 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
13939 instead.
13940 (check_breakpoints): Adjust. Use release_breakpoint.
13941 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
13942 (breakpoint_inserted_here): Ditto.
13943 (check_mem_read): Adjust to iterate over raw breakpoints instead.
13944 Don't trust the breakpoint's shadow if it is not inserted.
13945 (check_mem_write): Adjust to iterate over raw breakpoints instead.
13946 (delete_all_breakpoints): Adjust.
13947 (free_all_breakpoints): Mark all breakpoints as uninserted, and
13948 use delete_breakpoint_1.
13949
13950 * mem-break.h (breakpoints_supported): Delete declaration.
13951 (set_gdb_breakpoint_at): Declare.
13952 (gdb_breakpoint_here): Declare.
13953 (delete_breakpoint_at): Delete.
13954 (delete_gdb_breakpoint_at): Declare.
13955
13956 * server.h (struct raw_breakpoint): Forward declare.
13957 (struct process_info): New field `raw_breakpoints'.
13958
13959 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
13960 breakpoints.
13961
6bf5e0ba
PA
139622010-03-24 Pedro Alves <pedro@codesourcery.com>
13963
13964 * linux-low.c (status_pending_p_callback): Fix comment.
13965 (linux_wait_for_event_1): Move most of the internal breakpoint
13966 handling from here...
13967 (linux_wait_1): ... to here.
13968 (count_events_callback): New.
13969 (select_singlestep_lwp_callback): New.
13970 (select_event_lwp_callback): New.
13971 (cancel_breakpoints_callback): New.
13972 (select_event_lwp): New.
13973 (linux_wait_1): Simplify internal breakpoint handling. Give equal
13974 priority to all LWPs that have had events that should be reported
13975 to the client. Cancel breakpoints when about to reporting the
13976 event to the client, not while stopping lwps. No longer cancel
13977 finished single-steps here.
13978 (cancel_finished_single_step): Delete.
13979 (cancel_finished_single_steps): Delete.
13980
414a389f
PA
139812010-03-24 Pedro Alves <pedro@codesourcery.com>
13982
13983 * mem-break.c (enum bkpt_type): New.
13984 (struct breakpoint): New field `type'.
13985 (set_breakpoint_at): Change return type to struct breakpoint
13986 pointer. Set type to `other_breakpoint' by default.
13987 (delete_breakpoint): Rewrite, supporting more than one breakpoint
13988 in the breakpoint list.
13989 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
13990 (reinsert_breakpoint): Rename to ...
13991 (reinsert_raw_breakpoint): ... this.
13992 (reinsert_breakpoints_at): Adjust.
13993 * mem-break.h (struct breakpoint): Declare.
13994 (set_breakpoint_at): Change return type to struct breakpoint
13995 pointer.
13996
2280c721
PA
139972010-03-24 Pedro Alves <pedro@codesourcery.com>
13998
13999 * server.c (handle_query): Assign, not compare.
14000
d50171e4
PA
140012010-03-24 Pedro Alves <pedro@codesourcery.com>
14002
14003 Teach linux gdbserver to step-over-breakpoints.
14004
14005 * linux-low.c (can_hardware_single_step): New.
14006 (supports_breakpoints): New.
14007 (handle_extended_wait): If stopping threads, read the stop pc of
14008 the new cloned LWP.
14009 (get_pc): New.
14010 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
14011 low target doesn't support retrieving the PC.
14012 (add_lwp): Set last_resume_kind to resume_continue.
14013 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
14014 (linux_attach): Don't clear stop_expected. Set the lwp's
14015 last_resume_kind to resume_stop.
14016 (linux_detach_one_lwp): Don't check for removed breakpoints.
14017 (check_removed_breakpoint): Delete.
14018 (status_pending_p): Rename to ...
14019 (status_pending_p_callback): ... this. Don't check for removed
14020 breakpoints. Don't consider threads that are stopped from GDB's
14021 perspective.
14022 (linux_wait_for_lwp): Always read the stop_pc here.
14023 (cancel_breakpoint): New.
14024 (step_over_bkpt): New global.
14025 (linux_wait_for_event_1): Implement stepping over breakpoints.
14026 (gdb_wants_lwp_stopped): New.
14027 (gdb_wants_all_stopped): New.
14028 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
14029 single-step traps here. Store the thread's last reported target
14030 wait status.
14031 (send_sigstop): Don't clear stop_expected. Always set it,
14032 instead.
14033 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
14034 (cancel_finished_single_step): New.
14035 (cancel_finished_single_steps): New.
14036 (wait_for_sigstop): Don't cancel finished single-step traps here.
14037 (linux_resume_one_lwp): Don't check for removed breakpoints.
14038 Don't set `step' on non-hardware step archs.
14039 (linux_set_resume_request): Ignore resume_stop requests if already
14040 stopping or stopped. Set the lwp's last_resume_kind.
14041 (resume_status_pending_p): Don't check for removed breakpoints.
14042 (need_step_over_p): New.
14043 (start_step_over): New.
14044 (finish_step_over): New.
14045 (linux_resume_one_thread): Always queue a sigstop for resume_stop
14046 requests. Clear the thread's last reported target waitstatus.
14047 Don't use the `suspended' flag. Don't consider pending breakpoints.
14048 (linux_resume): Start a step-over if necessary.
14049 (proceed_one_lwp): New.
14050 (proceed_all_lwps): New.
14051 (unstop_all_lwps): New.
14052 * linux-low.h (struct lwp_info): Rewrite comment for the
14053 `suspended' flag. Add the `stop_pc' field. Delete the
14054 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
14055 Add `'last_resume_kind' and `need_step_over' fields.
14056 * inferiors.c (struct thread_info): Delete, moved elsewhere.
14057 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
14058 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
14059 (set_raw_breakpoint_at): New.
14060 (set_breakpoint_at): Rewrite to use it.
14061 (reinsert_breakpoint_handler): Delete.
14062 (set_reinsert_breakpoint): New.
14063 (reinsert_breakpoint_by_bp): Delete.
14064 (delete_reinsert_breakpoints): New.
14065 (uninsert_breakpoint): Rewrite.
14066 (uninsert_breakpoints_at): New.
14067 (reinsert_breakpoint): Rewrite.
14068 (reinsert_breakpoints_at): New.
14069 (check_breakpoints): Rewrite.
14070 (breakpoint_here): New.
14071 (breakpoint_inserted_here): New.
14072 (check_mem_read): Adjust.
14073 * mem-break.h (breakpoints_supported, breakpoint_here)
14074 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
14075 (reinsert_breakpoint_by_bp): Delete declaration.
14076 (delete_reinsert_breakpoints): Declare.
14077 (reinsert_breakpoint): Delete declaration.
14078 (reinsert_breakpoints_at): Declare.
14079 (uninsert_breakpoint): Delete declaration.
14080 (uninsert_breakpoints_at): Declare.
14081 (check_breakpoints): Adjust prototype.
14082 * server.h: Adjust include order.
14083 (struct thread_info): Declare here. Add a `last_status' field.
14084
30ba68cb
MS
140852010-03-23 Michael Snyder <msnyder@vmware.com>
14086
14087 * server.c (crc32): New function.
14088 (handle_query): Add handling for 'qCRC:' request.
14089
b9a881c2
PA
140902010-03-23 Pedro Alves <pedro@codesourcery.com>
14091
14092 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
14093 lwp had been stopped by a watchpoint.
14094
e92d13d5
PA
140952010-03-16 Pedro Alves <pedro@codesourcery.com>
14096
14097 * server.h (internal_error): Declare.
14098 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
14099 * utils.c (internal_error): New function.
14100
64daa791
AS
141012010-03-15 Andreas Schwab <schwab@redhat.com>
14102
14103 * configure.srv: Fix typo setting srv_regobj.
14104
f52cd8cd
PA
141052010-03-15 Pedro Alves <pedro@codesourcery.com>
14106
14107 * linux-low.c (fetch_register): Avoid passing a non string literal
14108 format to `error'.
14109 (usr_store_inferior_registers): Ditto.
14110
93ae6fdc
PA
141112010-03-14 Pedro Alves <pedro@codesourcery.com>
14112
14113 * linux-low.c (linux_write_memory): Bail out early if peeking
14114 memory failed.
14115
c3adc08c
PA
141162010-03-14 Pedro Alves <pedro@codesourcery.com>
14117
14118 * linux-low.h (struct lwp_info): New fields
14119 `stopped_by_watchpoint' and `stopped_data_address'.
14120 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
14121 here, and cache them in the lwp object.
14122 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
14123 directly.
14124 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
14125 field.
14126 (linux_stopped_by_watchpoint): Rewrite.
14127 (linux_stopped_data_address): Rewrite.
14128
bce522a2
PA
141292010-03-06 Simo Melenius <simo.melenius@iki.fi>
14130
14131 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
14132 switching the current inferior, not before.
14133
90884b2b
L
141342010-03-01 H.J. Lu <hongjiu.lu@intel.com>
14135
14136 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
14137 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
14138 i386-linux.c and amd64-linux.c.
14139 (reg-i386.o): Removed.
14140 (reg-i386.c): Likewise.
14141 (reg-i386-linux.o): Likewise.
14142 (reg-i386-linux.c): Likewise.
14143 (reg-x86-64.o): Likewise.
14144 (reg-x86-64.c): Likewise.
14145 (reg-x86-64-linux.o): Likewise.
14146 (reg-x86-64-linux.c): Likewise.
14147 (i386.o): New.
14148 (i386.c): Likewise.
14149 (i386-linux.o): Likewise.
14150 (i386-linux.c): Likewise.
14151 (amd64.o): Likewise.
14152 (amd64.c): Likewise.
14153 (amd64-linux.o): Likewise.
14154 (amd64-linux.c): Likewise.
14155
14156 * configure.srv (srv_i386_regobj): New.
14157 (srv_i386_linux_regobj): Likewise.
14158 (srv_amd64_regobj): Likewise.
14159 (srv_amd64_linux_regobj): Likewise.
14160 (srv_i386_32bit_xmlfiles): Likewise.
14161 (srv_i386_64bit_xmlfiles): Likewise.
14162 (srv_i386_xmlfiles): Likewise.
14163 (srv_amd64_xmlfiles): Likewise.
14164 (srv_i386_linux_xmlfiles): Likewise.
14165 (srv_amd64_linux_xmlfiles): Likewise.
14166 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
14167 srv_xmlfiles to $srv_i386_xmlfiles.
14168 (i[34567]86-*-mingw32ce*): Likewise.
14169 (i[34567]86-*-mingw*): Likewise.
14170 (i[34567]86-*-nto*): Likewise.
14171 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
14172 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
14173 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
14174 (x86_64-*-linux*): Likewise.
14175
14176 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
14177 (init_registers_amd64_linux): New.
14178 (x86_arch_setup): Replace init_registers_x86_64_linux with
14179 init_registers_amd64_linux.
14180
193f13e6
MK
141812010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
14182
14183 * configure.ac: Check for libdl. If it is not available link against
14184 static libthread_db.
14185 * configure: Regenerate.
14186
85d721b8
PA
141872010-02-22 Pedro Alves <pedro@codesourcery.com>
14188
14189 PR9605
14190
14191 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
14192 handing a read watchpoint.
14193 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
14194
6076632b
DE
141952010-02-12 Doug Evans <dje@google.com>
14196
14197 * linux-low.c (linux_supports_tracefork_flag): Document.
14198 (linux_look_up_symbols): Add comment.
14199
3327ccf7
L
142002010-02-03 H.J. Lu <hongjiu.lu@intel.com>
14201
14202 * regcache.c (supply_register): Clear regcache if buf is NULL.
14203
0718675c 142042010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 14205 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
14206
14207 * inferiors.c (find_inferior): Add function documentation.
14208 (unloaded_dll): Handle the case where the unloaded dll has not
14209 been previously registered in the dll list.
14210
177321bd
DJ
142112010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
14212
14213 * linux-arm-low.c (thumb_breakpoint_len): Delete.
14214 (thumb2_breakpoint): New.
14215 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
14216
2b009048
DJ
142172010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
14218
14219 * linux-low.c (get_stop_pc): Check for SIGTRAP.
14220 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
14221 breakpoints.
14222
3be029c7
PA
142232010-01-21 Pedro Alves <pedro@codesourcery.com>
14224
14225 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
14226
18f5de3b
JK
142272010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
14228
14229 * linux-s390-low.c (s390_collect_ptrace_register)
14230 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
14231
3743bb4f
DE
142322010-01-21 Doug Evans <dje@google.com>
14233
14ce3065
DE
14234 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
14235 (PTRACE_ARG4_TYPE): New macro.
14236 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
14237 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
14238 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
14239 (usr_store_inferior_registers): Ditto.
14240 (linux_read_memory, linux_write_memory): Ditto.
14241 (linux_test_for_tracefork): Ditto.
14242
3743bb4f
DE
14243 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
14244 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
14245
8b315be5
PA
142462010-01-21 Pedro Alves <pedro@codesourcery.com>
14247
14248 * proc-service.c (ps_lgetregs): Don't refetch registers from the
14249 target.
14250
85492558
PA
142512010-01-21 Pedro Alves <pedro@codesourcery.com>
14252
14253 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
14254 prototype to take a regcache. Adjust.
14255
442ea881
PA
142562010-01-20 Pedro Alves <pedro@codesourcery.com>
14257
14258 * regcache.h (struct thread_info): Forward declare.
14259 (struct regcache): New.
14260 (new_register_cache): Adjust prototype.
14261 (get_thread_regcache): Declare.
14262 (free_register_cache): Adjust prototype.
14263 (registers_to_string, registers_from_string): Ditto.
14264 (supply_register, supply_register_by_name, collect_register)
14265 (collect_register_as_string, collect_register_by_name): Ditto.
14266 * regcache.c (struct inferior_regcache_data): Delete.
14267 (get_regcache): Rename to ...
14268 (get_thread_regcache): ... this. Adjust. Switch inferior before
14269 fetching registers.
14270 (regcache_invalidate_one): Adjust.
14271 (regcache_invalidate): Fix prototype.
14272 (new_register_cache): Return the new register cache.
14273 (free_register_cache): Change prototype.
14274 (realloc_register_cache): Adjust.
14275 (registers_to_string): Change prototype to take a regcache. Adjust.
14276 (registers_from_string): Ditto.
14277 (register_data): Ditto.
14278 (supply_register): Ditto.
14279 (supply_register_by_name): Ditto.
14280 (collect_register): Ditto.
14281 (collect_register_as_string): Ditto.
14282 (collect_register_by_name): Ditto.
14283 * server.c (process_serial_event): Adjust.
14284 * linux-low.h (regset_fill_func, regset_store_func): Change
14285 prototype.
14286 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
14287 Change prototype.
14288 * linux-low.c (get_stop_pc): Adjust.
14289 (check_removed_breakpoint): Adjust.
14290 (linux_wait_for_event): Adjust.
14291 (linux_resume_one_lwp): Adjust.
14292 (fetch_register): Add regcache parameter. Adjust.
14293 (usr_store_inferior_registers): Ditto.
14294 (regsets_fetch_inferior_registers): Ditto.
14295 (regsets_store_inferior_registers): Ditto.
14296 (linux_fetch_registers, linux_store_registers): Ditto.
14297 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
14298 regcache. Adjust.
43aaf8b6
PA
14299 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
14300 Ditto.
442ea881
PA
14301 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
14302 prototype to take a regcache.
14303 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
14304 * remote-utils.c (convert_ascii_to_int, outreg)
14305 (prepare_resume_reply): Change prototype to take a regcache.
14306 Adjust.
14307 * target.h (struct target_ops) <fetch_registers, store_registers>:
14308 Change prototype to take a regcache.
14309 (fetch_inferior_registers, store_inferior_registers): Change
14310 prototype to take a regcache. Adjust.
14311 * proc-service.c (ps_lgetregs): Adjust.
14312 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
14313 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
14314 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
14315 take a regcache. Adjust.
14316 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
14317 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
14318 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
14319 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
14320 * linux-cris-low.c (cris_get_pc, cris_set_pc)
14321 (cris_cannot_fetch_register):
14322 (cris_breakpoint_at): Change prototype to take a regcache.
14323 Adjust.
14324 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
14325 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
14326 to take a regcache. Adjust.
14327 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
14328 Adjust.
14329 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
14330 take a regcache. Adjust.
14331 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
14332 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
14333 (m68k_set_pc): Change prototype to take a regcache. Adjust.
14334 * linux-mips-low.c (mips_get_pc):
14335 (mips_set_pc): Change prototype to take a regcache. Adjust.
14336 (mips_reinsert_addr): Adjust.
14337 (mips_collect_register): Change prototype to take a regcache.
14338 Adjust.
14339 (mips_supply_register):
14340 (mips_collect_register_32bit, mips_supply_register_32bit)
14341 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
14342 (mips_store_fpregset): Ditto.
43aaf8b6
PA
14343 * linux-ppc-low.c (ppc_supply_ptrace_register)
14344 (ppc_supply_ptrace_register): Ditto.
442ea881
PA
14345 (parse_spufs_run): Adjust.
14346 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
14347 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
14348 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
14349 take a regcache. Adjust.
14350 * linux-s390-low.c (s390_collect_ptrace_register)
14351 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
14352 (s390_set_pc): Change prototype to take a regcache. Adjust.
14353 (s390_arch_setup): Adjust.
14354 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
14355 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
14356 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
14357 (sparc_fill_gregset, sparc_store_gregset_from_stack)
14358 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
14359 regcache. Adjust.
14360 (sparc_breakpoint_at): Adjust.
14361 * linux-xtensa-low.c (xtensa_fill_gregset):
14362 (xtensa_store_gregset):
14363 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
14364 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
14365 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
14366 prototype to take a regcache. Adjust.
14367 * win32-arm-low.c (arm_fetch_inferior_register)
14368 (arm_store_inferior_register): Change prototype to take a
14369 regcache. Adjust.
14370 * win32-i386-low.c (i386_fetch_inferior_register)
14371 (i386_store_inferior_register): Change prototype to take a
14372 regcache. Adjust.
14373 * win32-low.c (child_fetch_inferior_registers)
14374 (child_store_inferior_registers): Change prototype to take a
14375 regcache. Adjust.
14376 (win32_wait): Adjust.
14377 (win32_fetch_inferior_registers): Change prototype to take a
14378 regcache. Adjust.
14379 (win32_store_inferior_registers): Adjust.
14380 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
14381 store_inferior_register>: Change prototype to take a regcache.
14382
60c3d7b0
DE
143832010-01-20 Doug Evans <dje@google.com>
14384
14385 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
14386 #ifdef.
14387 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 14388 (W_STOPCODE): Provide definition if missing.
60c3d7b0 14389
dc146f7c
VP
143902010-01-13 Vladimir Prus <vladimir@codesourcery.com>
14391
14392 * linux-low.c (linux_core_of_thread): New.
14393 (compare_ints, show_process, list_threads): New.
14394 (linux_qxfer_osdata): Report threads and cores.
14395 (linux_target_op): Register linux_core_of_thread.
14396 * remote-utils.c (prepare_resume_reply): Report the core.
14397 (buffer_xml_printf): Support %d specifier.
14398 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
14399 New.
14400 (handle_query): Handle qXfer:threads. Announce availability
14401 thereof.
14402 * target.h (struct target_ops): New field core_of_thread.
14403
7803799a
UW
144042010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
14405
14406 * Makefile.in (clean): Remove new generated files.
14407 (reg-s390.o, reg-s390.c): Remove rules.
14408 (reg-s390x.o, reg-s390x.c): Likewise.
14409 (s390-linux32.o, s390-linux32.c): Add rules.
14410 (s390-linux64.o, s390-linux64.c): Likewise.
14411 (s390x-linux64.o, s390x-linux64.c): Likewise.
14412 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
14413 * linux-s390-low.c: Include <elf.h>.
14414 (HWCAP_S390_HIGH_GPRS): Define if undefined.
14415 (init_registers_s390): Remove prototype.
14416 (init_registers_s390x): Likewise.
14417 (init_registers_s390_linux32): Add prototype.
14418 (init_registers_s390_linux64): Likewise.
14419 (init_registers_s390x_linux64): Likewise.
14420 (s390_num_regs_3264): New define.
14421 (s390_regmap_3264): New global variable.
14422 (s390_cannot_fetch_register): Remove obsolete check.
14423 (s390_cannot_store_register): Likewise.
14424 (s390_collect_ptrace_register): Handle upper/lower register halves.
14425 (s390_supply_ptrace_register): Likewise.
14426 (s390_fill_gregset): Update to register number changes.
14427 (s390_get_hwcap): New routine.
14428 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
14429 Install appropriate regmap and register set.
14430
6e7ffa39
JB
144312010-01-01 Joel Brobecker <brobecker@adacore.com>
14432
14433 * server.c (gdbserver_version): Update copyright year to 2010.
14434 * gdbreplay.c (gdbreplay_version): Likewise.
14435
957f3f49
DE
144362009-12-28 Doug Evans <dje@google.com>
14437
14438 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
14439 elf/external.h. Include <elf.h> instead but only if necessary.
14440
ca5c370d
PA
144412009-12-28 Pedro Alves <pedro@codesourcery.com>
14442
14443 * linux-low.c (linux_remove_process): Remove `detaching'
14444 parameter. Don't release/detach from thread_db here.
14445 (linux_kill): Release/detach from thread_db here, ...
14446 (linux_detach): ... and here, before actually detaching.
14447 (linux_wait_1): ... and here, when a process exits.
14448 * thread-db.c (any_thread_of): New.
14449 (thread_db_free): Switch the current inferior to a thread of the
14450 passed in process.
14451
4ee62156
DE
144522009-12-21 Doug Evans <dje@google.com>
14453
d90e6a88
DE
14454 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
14455
c5f62d5f
DE
14456 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
14457 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
14458 warning ifndef __NR_tkill. Move setting of errno there too.
14459 Delete unnecessary resetting of errno after syscall.
14460 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
14461
10e86dd7
DE
14462 * configure.ac: Check for dladdr.
14463 * config.in: Regenerate.
14464 * configure: Regenerate.
14465 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
14466 (try_thread_db_load): Update.
14467
4ee62156
DE
14468 * linux-low.c (my_waitpid): Delete unnecessary prototype.
14469
00f515da
DE
144702009-12-18 Doug Evans <dje@google.com>
14471
e9464885
DE
14472 * event-loop.c: Include unistd.h if it exists.
14473
07d4f67e
DE
14474 * linux-low.c (my_waitpid): Move definition away from being in
14475 between linux_tracefork_child/linux_test_for_tracefork.
14476
00f515da
DE
14477 * gdb_proc_service.h (psaddr_t): Fix type.
14478 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
14479 signature to match glibc.
14480
1de1badb
DE
144812009-12-16 Doug Evans <dje@google.com>
14482
14483 * linux-low.c (linux_read_memory): Fix argument to read.
14484
aeeb81d1
PA
144852009-11-26 Pedro Alves <pedro@codesourcery.com>
14486
14487 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
14488 events, don't leave current_inferior pointing at null.
14489
10357975
PA
144902009-11-26 Pedro Alves <pedro@codesourcery.com>
14491
14492 * win32-low.c (LOG): Delete.
14493 (OUTMSG): Output to stderr.
14494 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
14495 on compile time LOG macro.
14496 (win32_wait): Fix debug output.
14497
cf6e3471
PA
144982009-11-26 Pedro Alves <pedro@codesourcery.com>
14499
14500 * win32-low.c (win32_add_one_solib): If the dll name is
14501 "ntdll.dll", prepend the system directory to the dll path.
14502
0c85e18e
MK
145032009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
14504
14505 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
14506
9ac544ce 145072009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 14508 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
14509
14510 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
14511 * configure.ac: Check for __mcoldfire__ and set
14512 gdb_cv_m68k_is_coldfire.
14513 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
14514 reg-cf.o and reg-m68k.o.
14515 * configure: Regenerated.
14516
fd7dd3e6
PA
145172009-11-16 Pedro Alves <pedro@codesourcery.com>
14518
14519 * linux-low.c (linux_remove_process): Add `detaching' parameter.
14520 Pass it to thread_db_free.
14521 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
14522 proper `detaching' argument to linux_remove_process.
14523 * linux-low.h (thread_db_free): Add `detaching' parameter.
14524 * thread-db.c (thread_db_init): Pass false as `detaching' argument
14525 to thread_db_free.
14526 (thread_db_free): Add `detaching' parameter. Only
14527 call td_ta_clear_event if detaching from process.
14528
75aa492e
MK
145292009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
14530
14531 * thread-db.c (thread_db_free): Fix typo.
14532
21e1bee4
PP
145332009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
14534
14535 PR gdb/10838
14536 * thread-db.c (thread_db_free): Call td_ta_clear_event.
14537
8838b45e
NS
145382009-11-03 Nathan Sidwell <nathan@codesourcery.com>
14539
14540 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
14541 with an i686 compiler.
14542 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
14543 needed.
14544 * configure: Rebuilt.
14545
8a35fb51
SL
145462009-10-29 Sandra Loosemore <sandra@codesourcery.com>
14547
14548 PR gdb/10783
14549
14550 * server.c (handle_search_memory_1): Correct read_addr initialization
14551 in loop for searching subsequent chunks.
14552
96f15937
PP
145532009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
14554
14555 * configure.ac: New --with-libthread-db option.
14556 * thread-db.c: Allow direct dependence on libthread_db.
14557 (thread_db_free): Adjust.
14558 * config.in: Regenerate.
14559 * configure: Likewise.
889bf7c5 14560
5f7d1694
PP
145612009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
14562
14563 PR gdb/10757
14564 * thread-db.c (attach_thread): New function.
14565 (maybe_attach_thread): Return success/failure.
14566 (find_new_threads_callback): Adjust.
889bf7c5
PA
14567 (thread_db_find_new_threads): Loop until no new threads.
14568
88e3b899
PA
145692009-10-13 Pedro Alves <pedro@codesourcery.com>
14570
14571 * proc-service.c (ps_lgetregs): Formatting.
14572
cdbfd419
PP
145732009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
14574
14575 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
14576 * configure.ac: Adjust.
14577 * linux-low.h (struct process_info_private): Move members to struct
14578 thread_db.
14579 (thread_db_free, thread_db_handle_monitor_command): New prototype.
14580 * linux-low.c (linux_remove_process): Adjust.
14581 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
14582 * server.c (handle_query): Move code ...
14583 (handle_monitor_command): ... here. New function.
14584 * target.h (struct target_ops): New member.
14585 * thread-db.c (struct thread_db): New.
14586 (libthread_db_search_path): New variable.
14587 (thread_db_create_event, thread_db_enable_reporting)
14588 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
14589 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
14590 (try_thread_db_load_1, dladdr_to_soname): New functions.
14591 (try_thread_db_load, thread_db_load_search): New functions.
14592 (thread_db_init): Search for libthread_db.
14593 (thread_db_free): New function.
14594 (thread_db_handle_monitor_command): Likewise.
14595 * config.in: Regenerate.
14596 * configure: Regenerate.
889bf7c5 14597
4168d2d6
UW
145982009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
14599
14600 * spu-low.c (spu_kill): Wait for inferior to terminate.
14601 Call clear_inferiors.
14602 (spu_detach): Call clear_inferiors.
14603
81ecdfbb
RW
146042009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
14605
14606 * aclocal.m4: Regenerate.
14607 * config.in: Likewise.
14608 * configure: Likewise.
14609
0b9ff2c0
UW
146102009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
14611
14612 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
14613 (parse_spufs_run): New function.
14614 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
14615 (ppc_breakpoint_at): Handle SPU breakpoints.
14616
efcbbd14
UW
146172009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
14618
14619 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
14620 (SPUFS_MAGIC): Define.
14621 (spu_enumerate_spu_ids): New function.
14622 (linux_qxfer_spu): New function.
14623 (linux_target_ops): Install linux_qxfer_spu.
14624
f4d9bade
UW
146252009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
14626
14627 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
14628 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
14629 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
14630 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
14631 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
14632 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
14633 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
14634 (init_registers_powerpc_cell32l): Add prototype.
14635 (init_registers_powerpc_cell64l): Likewise.
14636 (ppc_arch_setup): Detect Cell/B.E. architecture.
14637
96e946ca
RW
146382009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
14639
14640 * Makefile.in (datarootdir): New variable.
14641
58d6951d
DJ
146422009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
14643
14644 * linux-low.c (linux_write_memory): Update debugging output.
14645 * Makefile.in (clean): Add new descriptions.
14646 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
14647 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
14648 * configure.srv: Add new files for arm*-*-linux*.
14649 * linux-arm-low.c: Add new declarations.
14650 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
14651 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
14652 (HWCAP_VFPv3D16): New.
14653 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
14654 instead of __IWMMXT__.
14655 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
14656 (arm_arch_setup): New.
14657 (target_regsets): Remove #ifdef. Add VFP regset.
14658 (the_low_target): Use arm_arch_setup.
14659
12b42a12
DJ
146602009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
14661
14662 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
14663 the main thread again.
14664
ac8c974e
AR
146652009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
14666
14667 Adding Neutrino gdbserver.
14668 * configure: Regenerated.
14669 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
14670 * configure.srv (i[34567]86-*-nto*): New target.
14671 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
14672 * remote-utils.c [__QNX__]: Include sys/iomgr.h
14673 (nto_comctrl) [__QNX__]: New function.
14674 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
14675
4424e0c3 146762009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
14677
14678 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
14679 srv_tgtobj.
14680
912cf4ba
PA
146812009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
14682 Pedro Alves <pedro@codesourcery.com>
14683
14684 * win32-i386-low.c (i386_get_thread_context): Handle systems that
14685 don't support CONTEXT_EXTENDED_REGISTERS.
14686 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
14687 (the_low_target): Install them.
14688 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
14689 failing with ERROR_PIPE_NOT_CONNECTED.
14690
aa5ca48f
DE
146912009-06-30 Doug Evans <dje@google.com>
14692 Pierre Muller <muller@ics.u-strasbg.fr>
14693
14694 Add h/w watchpoint support to x86-linux, win32-i386.
14695 * Makefile.in (SFILES): Add i386-low.c
14696 (i386_low_h): Define.
14697 (i386-low.o): Add dependencies.
14698 (linux-x86-low.o): Add i386-low.h dependency.
14699 (win32-i386-low.o): Ditto.
14700 * i386-low.c: New file.
14701 * i386-low.h: New file.
14702 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
14703 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
14704 * linux-low.c (linux_add_process): Initialize arch_private.
14705 (linux_remove_process): Free arch_private.
14706 (add_lwp): Initialize arch_private.
14707 (delete_lwp): Free arch_private.
14708 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
14709 provided.
14710 * linux-low.h (process_info_private): New member arch_private.
14711 (lwp_info): New member arch_private.
14712 (linux_target_ops): New members new_process, new_thread,
14713 prepare_to_resume.
14714 (ptid_of): New macro.
14715 * linux-x86-low.c: Include stddef.h, i386-low.h.
14716 (arch_process_info): New struct.
14717 (arch_lwp_info): New struct.
14718 (x86_linux_dr_get, x86_linux_dr_set): New functions.
14719 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
14720 (i386_dr_low_get_status): New function.
14721 (x86_insert_point, x86_remove_point): New functions.
14722 (x86_stopped_by_watchpoint): New function.
14723 (x86_stopped_data_address): New function.
14724 (x86_linux_new_process, x86_linux_new_thread): New functions.
14725 (x86_linux_prepare_to_resume): New function.
14726 (the_low_target): Add entries for insert_point, remove_point,
14727 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
14728 prepare_to_resume.
14729 * server.c (debug_hw_points): New global.
14730 (monitor_show_help): Document set debug-hw-points.
14731 (handle_query): Process "set debug-hw-points".
14732 * server.h (debug_hw_points): Declare.
14733 (paddress): Declare.
14734 * utils.c (NUMCELLS, CELLSIZE): New macros.
14735 (get_sell, xsnprintf, paddress): New functions.
14736 * win32-arm-low.c (the_low_target): Add entries for insert_point,
14737 remove_point, stopped_by_watchpoint, stopped_data_address.
14738 * win32-i386-low.c: Include i386-low.h.
14739 (debug_reg_state): Replaces dr.
14740 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
14741 (i386_dr_low_get_status): New function.
14742 (i386_insert_point, i386_remove_point): New functions.
14743 (i386_stopped_by_watchpoint): New function.
14744 (i386_stopped_data_address): New function.
14745 (i386_initial_stuff): Update.
14746 (get_thread_context,set_thread_context,i386_thread_added): Update.
14747 (the_low_target): Add entries for insert_point,
14748 remove_point, stopped_by_watchpoint, stopped_data_address.
14749 * win32-low.c (win32_insert_watchpoint): New function.
14750 (win32_remove_watchpoint): New function.
14751 (win32_stopped_by_watchpoint): New function.
14752 (win32_stopped_data_address): New function.
14753 (win32_target_ops): Add entries for insert_watchpoint,
14754 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
14755 * win32-low.h (win32_target_ops): New members insert_point,
14756 remove_point, stopped_by_watchpoint, stopped_data_address.
14757
d993e290
PA
147582009-06-25 Pedro Alves <pedro@codesourcery.com>
14759
14760 * server.c (process_serial_event): Re-return unsupported, not
14761 error, if the type isn't recognized. Re-allow supporting only
14762 insert or remove packets. Also call require_running for
14763 breakpoints. Add missing break statement to default case. Tidy.
14764 * target.h (struct target_ops): Rename insert_watchpoint to
14765 insert_point, and remove_watchpoint to remove_point.
14766
14767 * linux-low.h (struct linux_target_ops): Likewise.
14768 * linux-low.c (linux_insert_watchpoint): Rename to ...
14769 (linux_insert_point): ... this. Adjust.
14770 (linux_remove_watchpoint): Rename to ...
14771 (linux_remove_point): ... this. Adjust.
14772 (linux_target_ops): Adjust.
14773 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
14774 (cris_insert_point): ... this.
14775 (cris_remove_watchpoint): Rename to ...
14776 (cris_remove_point): ... this.
14777 (the_low_target): Adjust.
14778
0f54c268
PM
147792009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
14780
14781 * server.c (handle_v_kill): Pass signal_pid to
14782 kill_inferior if multi_process is zero.
14783
c6314022
AR
147842009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
14785
14786 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
14787 * target.h (target_ops): Comment for *_watchpoint to make it clear
14788 the functions can get types '0' and '1'.
14789
4463ce24
AR
147902009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
14791
14792 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
14793 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
14794 * regcache.c (get_regcache): Likewise.
14795 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
14796 * win32-low.c (child_fetch_inferior_registers): Remove check for
14797 regno 0.
14798
cf8fd78b
PA
147992009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
14800 Pedro Alves <pedro@codesourcery.com>
14801
14802 * target.h (struct target_ops) <supports_multi_process>: New
14803 callback.
14804 (target_supports_multi_process): New.
14805 * server.c (handle_query): Even if GDB reports support, only
14806 enable multi-process if the target also supports it. Report
14807 multi-process support only if the target backend supports it.
14808 * linux-low.c (linux_supports_multi_process): New function.
14809 (linux_target_ops): Install it as target_supports_multi_process
14810 callback.
14811
47c0c975
DE
148122009-05-24 Doug Evans <dje@google.com>
14813
e09875d4
DE
14814 Global renaming of find_thread_pid to find_thread_ptid.
14815 * server.h (find_thread_ptid): Renamed from find_thread_pid.
14816 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
14817 All callers updated.
14818
e27d73f6
DE
14819 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
14820 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
14821 directly.
14822
47c0c975
DE
14823 * linux-low.c (get_stop_pc): Print pc if debug_threads.
14824 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
14825 (linux_resume_one_lwp): Ditto.
14826
2acc282a
DE
148272009-05-23 Doug Evans <dje@google.com>
14828
14829 * linux-low.c (linux_resume_one_lwp): Change type of first arg
14830 from struct inferior_list_entry * to struct lwp_info *.
14831 All callers updated.
14832
9f1036c1
DE
148332009-05-13 Doug Evans <dje@google.com>
14834
14835 * linux-x86-low.c: Don't include assert.h.
14836 (x86_siginfo_fixup): Use fatal, not assert.
14837 (x86_arch_setup): Fix comment.
14838
d0722149
DE
148392009-05-12 Doug Evans <dje@google.com>
14840
14841 Biarch support for i386/amd64 gdbserver.
14842 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
14843 Add linux-x86-low.c.
14844 (linux-i386-low.o, linux-x86-64-low.o): Delete.
14845 (linux-x86-low.o): Add.
14846 * linux-x86-64-low.c: Delete.
14847 * linux-i386-low.c: Delete.
14848 * linux-x86-low.c: New file.
14849 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
14850 linux-x86-low.o.
14851 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
14852 linux-x86-low.o.
14853 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
14854 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
14855 (linux_child_pid_to_exec_file): New function.
14856 (elf_64_header_p, elf_64_file_p): New functions.
14857 (siginfo_fixup): New function.
14858 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
14859 give target a chance to convert layout.
14860 * linux-low.h (linux_target_ops): New member siginfo_fixup.
14861 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
14862
fdeb2a12
DE
148632009-05-07 Doug Evans <dje@google.com>
14864
14865 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
14866 (regsets_store_inferior_registers): Ditto.
14867
a6dbe5df
PA
148682009-05-06 Pedro Alves <pedro@codesourcery.com>
14869
14870 PR server/10048
14871
14872 * linux-low.c (must_set_ptrace_flags): Delete.
14873 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
14874 of the global.
14875 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
14876 `lwp->must_set_ptrace_flags' instead.
ba42693b 14877 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
14878 (linux_wait_1): ... not here.
14879
5091eb23
DE
148802009-04-30 Doug Evans <dje@google.com>
14881
9f767825
DE
14882 * inferiors.c (started_inferior_callback): New function.
14883 (attached_inferior_callback): New function.
14884 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
14885 * server.c (print_started_pid, print_attached_pid): New functions.
14886 (detach_or_kill_for_exit): New function.
14887 (main): Call it instead of for_each_inferior (kill_inferior_callback).
14888 * server.h (have_started_inferiors_p): Declare.
14889 (have_attached_inferiors_p): Declare.
14890
5091eb23
DE
14891 * inferiors.c (remove_process): Fix memory leak, free process.
14892 * linux-low.c (linux_remove_process): New function.
14893 (linux_kill): Call it instead of remove_process.
14894 (linux_detach, linux_wait_1): Ditto.
14895
155c8968
PA
148962009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
14897
14898 * configure.srv: Add x86 Windows CE target.
14899
7fe519cb
UW
149002009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
14901
14902 * inferiors.c (get_thread_process): Make global.
14903 * server.h (get_thread_process): Add prototype.
14904 * thread-db.c (find_one_thread): Use get_thread_process
14905 instead of current_process.
14906 (thread_db_get_tls_address): Do not crash if called when
14907 thread layer is not yet initialized.
14908
5472f405
UW
149092009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
14910
14911 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
14912 * spu-low.c (current_tid): Rename to ...
14913 (current_ptid): ... this.
14914 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
14915 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
14916 ptid_get_lwp (current_ptid) instead of current_tid.
14917 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
14918 instead of current_tid. Use find_process_pid to verify pid
14919 argument is valid. Pass proper argument to remove_process.
14920 (spu_thread_alive): Compare current_ptid instead of current_tid.
14921 (spu_resume): Likewise.
14922
55ac2b99
PA
149232009-04-02 Pedro Alves <pedro@codesourcery.com>
14924
14925 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
14926 variable.
14927
95954743
PA
149282009-04-01 Pedro Alves <pedro@codesourcery.com>
14929
14930 Implement the multiprocess extensions, and add linux multiprocess
14931 support.
14932
14933 * server.h (ULONGEST): Declare.
14934 (struct ptid, ptid_t): New.
14935 (minus_one_ptid, null_ptid): Declare.
14936 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
14937 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
14938 (struct inferior_list_entry): Change `id' type from unsigned from
14939 to ptid_t.
14940 (struct sym_cache, struct breakpoint, struct
14941 process_info_private): Forward declare.
14942 (struct process_info): Declare.
14943 (current_process): Declare.
14944 (all_processes): Declare.
14945 (initialize_inferiors): Declare.
14946 (add_thread): Adjust to use ptid_t.
14947 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
14948 (add_process, remove_process, find_thread_pid): Declare.
14949 (find_inferior_id): Adjust to use ptid_t.
14950 (cont_thread, general_thread, step_thread): Change type to ptid_t.
14951 (multi_process): Declare.
14952 (push_event): Adjust to use ptid_t.
14953 (read_ptid, write_ptid): Declare.
14954 (prepare_resume_reply): Adjust to use ptid_t.
14955 (clear_symbol_cache): Declare.
14956 * inferiors.c (all_processes): New.
14957 (null_ptid, minus_one_ptid): New.
14958 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
14959 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
14960 (add_thread): Change unsigned long to ptid. Remove gdb_id
14961 parameter. Adjust.
14962 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
14963 (gdb_id_to_thread): Rename to ...
14964 (find_thread_pid): ... this. Change unsigned long to ptid.
14965 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
14966 (loaded_dll, pull_pid_from_list): Adjust.
14967 (add_process, remove_process, find_process_pid)
14968 (get_thread_process, current_process, initialize_inferiors): New.
14969 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
14970 (struct target_waitstatus) <related_pid>: Ditto.
14971 (struct target_ops) <kill, detach>: Add `pid' argument. Change
14972 return type to int.
14973 (struct target_ops) <join>: Add `pid' argument.
14974 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
14975 (struct target_ops) <wait>: Add `ptid' field. Change return type
14976 to ptid.
14977 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
14978 (mywait): Add `ptid' argument. Change return type to ptid_t.
14979 (target_pid_to_str): Declare.
14980 * target.c (set_desired_inferior): Adjust to use ptids.
14981 (mywait): Add new `ptid' argument. Adjust.
14982 (target_pid_to_str): New.
14983 * mem-break.h (free_all_breakpoints): Declare.
14984 * mem-break.c (breakpoints): Delelete.
14985 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
14986 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
14987 to use per-process breakpoint list.
14988 (free_all_breakpoints): New.
14989 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
14990 (symbol_cache, all_symbols_looked_up): Delete.
14991 (hexchars): New.
14992 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
14993 read_ptid): New.
14994 (prepare_resume_reply): Change ptid argument's type from unsigned
14995 long to ptid_t. Adjust. Implement W;process and X;process.
14996 (free_sym_cache, clear_symbol_cache): New.
14997 (look_up_one_symbol): Adjust to per-process symbol cache. *
14998 * server.c (cont_thread, general_thread, step_thread): Change type
14999 to ptid_t.
15000 (attached): Delete.
15001 (multi_process): New.
15002 (last_ptid): Change type to ptid_t.
15003 (struct vstop_notif) <ptid>: Change type to ptid_t.
15004 (queue_stop_reply, push_event): Change `ptid' argument's type to
15005 ptid_t.
15006 (discard_queued_stop_replies): Add `pid' argument.
15007 (start_inferior): Adjust to use ptids. Adjust to mywait interface
15008 changes. Don't reference the `attached' global.
15009 (attach_inferior): Adjust to mywait interface changes.
15010 (handle_query): Adjust to use ptids. Parse GDB's qSupported
15011 features. Handle and report "multiprocess+". Handle
15012 "qAttached:PID".
15013 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
15014 changes.
15015 (handle_v_kill): New.
15016 (handle_v_stopped): Adjust to use target_pid_to_str.
15017 (handle_v_requests): Allow multiple attaches and runs when
15018 multiprocess extensions are in effect. Handle "vKill".
15019 (myresume): Adjust to use ptids.
15020 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
15021 (handle_status): Adjust to discard_queued_stop_replies interface
15022 change.
15023 (first_thread_of, kill_inferior_callback)
15024 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
15025 (main): Call initialize_inferiors. Adjust to use ptids, killing
15026 and detaching from all inferiors. Handle multiprocess packet
15027 variants.
15028 * linux-low.h: Include gdb_proc_service.h.
15029 (struct process_info_private): New.
15030 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
15031 <lwpid_of>: Use ptid_get_lwp.
15032 (get_lwp_thread): Adjust.
15033 (struct lwp_info): Add `dead' member.
15034 (find_lwp_pid): Declare.
15035 * linux-low.c (thread_db_active): Delete.
15036 (new_inferior): Adjust comment.
15037 (inferior_pid): Delete.
15038 (linux_add_process): New.
15039 (handle_extended_wait): Adjust.
15040 (add_lwp): Change unsigned long to ptid.
15041 (linux_create_inferior): Add process to processes table. Adjust
15042 to use ptids. Don't set new_inferior here.
15043 (linux_attach_lwp): Rename to ...
15044 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
15045 it. Adjust to use ptids.
15046 (linux_attach_lwp): New.
15047 (linux_attach): Add process to processes table. Don't set
15048 new_inferior here.
15049 (struct counter): New.
15050 (second_thread_of_pid_p, last_thread_of_process_p): New.
15051 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
15052 multiple processes.
15053 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
15054 processes. Remove process from process table.
15055 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
15056 to multiple processes.
15057 (any_thread_of): New.
15058 (linux_detach): Add `pid' argument, and handle it. Remove process
15059 from processes table.
15060 (linux_join): Add `pid' argument. Handle it.
15061 (linux_thread_alive): Change unsighed long argument to ptid_t.
15062 Consider dead lwps as not being alive.
15063 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
15064 threads we're not interested in.
15065 (same_lwp, find_lwp_pid): New.
15066 (linux_wait_for_lwp): Change `pid' argument's type from int to
15067 ptid_t. Adjust.
15068 (linux_wait_for_event): Rename to ...
15069 (linux_wait_for_event_1): ... this. Change `pid' argument's type
15070 from int to ptid_t. Adjust.
15071 (linux_wait_for_event): New.
15072 (linux_wait_1): Add `ptid' argument. Change return type to
15073 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
15074 that exit from the process table.
15075 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
15076 Adjust.
15077 (mark_lwp_dead): New.
15078 (wait_for_sigstop): Adjust to use ptids. If a process exits while
15079 stopping all threads, mark its main lwp as dead.
15080 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
15081 ptids.
15082 (fetch_register, usr_store_inferior_registers)
15083 (regsets_fetch_inferior_registers)
15084 (regsets_store_inferior_registers, linux_read_memory)
15085 (linux_write_memory): Inline `inferior_pid'.
15086 (linux_look_up_symbols): Adjust to use per-process
15087 `thread_db_active'.
15088 (linux_request_interrupt): Adjust to use ptids.
15089 (linux_read_auxv): Inline `inferior_pid'.
15090 (initialize_low): Don't reference thread_db_active.
15091 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
15092 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
15093 (ps_getpid): Return the pid of the current inferior.
15094 * thread-db.c (proc_handle, thread_agent): Delete.
15095 (thread_db_create_event, thread_db_enable_reporting): Adjust to
15096 per-process data.
15097 (find_one_thread): Change argument type to ptid_t. Adjust to
15098 per-process data.
15099 (maybe_attach_thread): Adjust to per-process data and ptids.
15100 (thread_db_find_new_threads): Ditto.
15101 (thread_db_init): Ditto.
15102 * spu-low.c (spu_create_inferior, spu_attach): Add process to
15103 processes table. Adjust to use ptids.
15104 (spu_kill, spu_detach): Adjust interface. Remove process from
15105 processes table.
15106 (spu_join, spu_thread_alive): Adjust interface.
15107 (spu_wait): Adjust interface. Remove process from processes
15108 table. Adjust to use ptids.
15109 * win32-low.c (current_inferior_tid): Delete.
15110 (current_inferior_ptid): New.
15111 (debug_event_ptid): New.
15112 (thread_rec): Take a ptid. Adjust.
15113 (child_add_thread): Add `pid' argument. Adjust to use ptids.
15114 (child_delete_thread): Ditto.
15115 (do_initial_child_stuff): Add `attached' argument. Add process to
15116 processes table.
15117 (child_fetch_inferior_registers, child_store_inferior_registers):
15118 Adjust.
15119 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
15120 (win32_attach): Pass 1 to do_initial_child_stuff.
15121 (win32_kill): Adjust interface. Remove process from processes
15122 table.
15123 (win32_detach): Ditto.
15124 (win32_join): Adjust interface.
15125 (win32_thread_alive): Take a ptid.
15126 (win32_resume): Adjust to use ptids.
15127 (get_child_debug_event): Ditto.
15128 (win32_wait): Adjust interface. Remove exiting process from
15129 processes table.
15130
bd99dc85
PA
151312009-04-01 Pedro Alves <pedro@codesourcery.com>
15132
15133 Non-stop mode support.
15134
15135 * server.h (non_stop): Declare.
15136 (gdb_client_data, handler_func): Declare.
15137 (delete_file_handler, add_file_handler, start_event_loop):
15138 Declare.
15139 (handle_serial_event, handle_target_event, push_event)
15140 (putpkt_notif): Declare.
15141 * target.h (enum resume_kind): New.
15142 (struct thread_resume): Replace `step' field by `kind' field.
15143 (TARGET_WNOHANG): Define.
15144 (struct target_ops) <wait>: Add `options' argument.
15145 <supports_non_stop, async, start_non_stop>: New fields.
15146 (target_supports_non_stop, target_async): New.
15147 (start_non_stop): Declare.
15148 (mywait): Add `options' argument.
15149 * target.c (mywait): Add `options' argument. Print child exit
15150 notifications here.
15151 (start_non_stop): New.
15152 * server.c (non_stop, own_buf, mem_buf): New globals.
15153 (struct vstop_notif): New.
15154 (notif_queue): New global.
15155 (queue_stop_reply, push_event, discard_queued_stop_replies)
15156 (send_next_stop_reply): New.
15157 (start_inferior): Adjust to use resume_kind. Adjust to mywait
15158 interface changes.
15159 (attach_inferior): In non-stop mode, don't wait for the target
15160 here.
15161 (handle_general_set): Handle QNonStop.
15162 (handle_query): When handling qC, return the current general
15163 thread, instead of the first thread of the list.
15164 (handle_query): If the backend supports non-stop mode, include
15165 QNonStop+ in the qSupported query response.
15166 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
15167 and non-stop mode.
15168 (handle_v_attach, handle_v_run): Handle non-stop mode.
15169 (handle_v_stopped): New.
15170 (handle_v_requests): Report support for vCont;t. Handle vStopped.
15171 (myresume): Adjust to use resume_kind. Handle non-stop.
15172 (queue_stop_reply_callback): New.
15173 (handle_status): Handle non-stop mode.
15174 (main): Clear non_stop flag on reconnection. Use the event-loop.
15175 Refactor serial protocol handling from here ...
15176 (process_serial_event): ... to this new function. When GDB
15177 selects any thread, select one here. In non-stop mode, wait until
15178 GDB acks all pending events before exiting.
15179 (handle_serial_event, handle_target_event): New.
15180 * remote-utils.c (remote_open): Install remote_desc in the event
15181 loop.
15182 (remote_close): Remove remote_desc from the event loop.
15183 (putpkt_binary): Rename to...
15184 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
15185 (putpkt_binary): New as wrapper around putpkt_binary_1.
15186 (putpkt_notif): New.
15187 (prepare_resume_reply): In non-stop mode, don't change the
15188 general_thread.
15189 * event-loop.c: New.
15190 * Makefile.in (OBJ): Add event-loop.o.
15191 (event-loop.o): New rule.
15192
15193 * linux-low.h (pid_of): Moved here.
15194 (lwpid_of): New.
15195 (get_lwp_thread): Use lwpid_of.
15196 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
15197 * linux-low.c (pid_of): Delete.
15198 (inferior_pid): Use lwpid_of.
15199 (linux_event_pipe): New.
15200 (target_is_async_p): New.
15201 (delete_lwp): New.
15202 (handle_extended_wait): Use lwpid_of.
15203 (add_lwp): Don't set lwpid field.
15204 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
15205 (linux_kill_one_lwp): If killing a running lwp, stop it first.
15206 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
15207 (linux_detach_one_lwp): If detaching from a running lwp, stop it
15208 first. Adjust to linux_wait_for_event interface changes. Use
15209 lwpid_of.
15210 (linux_detach): Don't delete the main lwp here.
15211 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
15212 (status_pending_p): Don't consider explicitly suspended lwps.
15213 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
15214 pointer. Add OPTIONS argument. Change return type to int. Use
15215 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
15216 (linux_wait_for_event): Take an integer pid instead of a lwp_info
15217 pointer. Add status pointer argument. Return a pid instead of a
15218 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
15219 changes. In non-stop mode, don't switch to a random thread.
15220 (linux_wait): Rename to...
15221 (linux_wait_1): ... this. Add target_options argument, and handle
15222 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
15223 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
15224 clean exit and signal exit code. Don't stop all threads in
15225 non-stop mode. In all-stop mode, only stop all threads when
15226 reporting a stop to GDB. Handle explicit thread stop requests.
15227 (async_file_flush, async_file_mark): New.
15228 (linux_wait): New.
15229 (send_sigstop): Use lwpid_of.
15230 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
15231 interface changes. In non-stop mode, don't switch to a random
15232 thread.
15233 (linux_resume_one_lwp): Use lwpid_of.
15234 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
15235 (linux_resume_one_thread): ... this. Handle resume_stop. In
15236 non-stop mode, don't look for pending flag in all threads.
15237 (resume_status_pending_p): Don't consider explicitly suspended
15238 threads.
15239 (my_waitpid): Reimplement. Emulate __WALL.
15240 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
15241 Use lwpid_of.
15242 (sigchld_handler, linux_supports_non_stop, linux_async)
15243 (linux_start_non_stop): New.
15244 (linux_target_ops): Register linux_supports_non_stop, linux_async
15245 and linux_start_non_stop.
15246 (initialize_low): Install SIGCHLD handler.
15247 * thread-db.c (thread_db_create_event, find_one_thread)
15248 (thread_db_get_tls_address): Use lwpid_of.
15249 * win32-low.c (win32_detach): Adjust to use resume_kind.
15250 (win32_wait): Add `options' argument.
15251 * spu-low.c (spu_resume): Adjust to use resume_kind.
15252 (spu_wait): Add `options' argument.
15253
5b1c542e
PA
152542009-04-01 Pedro Alves <pedro@codesourcery.com>
15255
15256 Decouple target code from remote protocol.
15257
15258 * target.h (enum target_waitkind): New.
15259 (struct target_waitstatus): New.
15260 (struct target_ops) <wait>: Return an unsigned long. Take a
15261 target_waitstatus pointer instead of a char pointer.
15262 (mywait): Likewise.
15263 * target.c (mywait): Change prototype to return an unsigned long.
15264 Take a target_waitstatus pointer instead of a char pointer. Adjust.
15265 * server.h (thread_from_wait, old_thread_from_wait): Delete
15266 declarations.
15267 (prepare_resume_reply): Change prototype to take a
15268 target_waitstatus.
15269 * server.c (thread_from_wait, old_thread_from_wait): Delete.
15270 (last_status, last_ptid): New.
15271 (start_inferior): Remove "statusptr" argument. Adjust. Return a
15272 pid instead of a signal.
15273 (attach_inferior): Remove "status" and "signal" parameters.
15274 Adjust.
15275 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
15276 not as an address.
15277 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
15278 (handle_v_requests, myresume): Remove "status" and "signal"
15279 parameters. Adjust.
15280 (handle_status): New.
15281 (main): Delete local `status'. Adjust.
15282 * remote-utils.c: Include target.h.
15283 (prepare_resume_reply): Change prototype to take a
15284 target_waitstatus. Adjust.
15285
15286 * linux-low.c (linux_wait): Adjust to new target_ops->wait
15287 interface.
15288 * spu-low.c (spu_wait): Adjust.
15289 * win32-low.c (enum target_waitkind, struct target_waitstatus):
15290 Delete.
15291 (win32_wait): Adjust.
15292
2bd7c093
PA
152932009-04-01 Pedro Alves <pedro@codesourcery.com>
15294
15295 * target.h (struct thread_resume): Delete leave_stopped member.
15296 (struct target_ops): Add a `n' argument to the `resume' callback.
15297 * server.c (start_inferior): Adjust.
15298 (handle_v_cont, myresume): Adjust.
15299 * linux-low.c (check_removed_breakpoint): Adjust to resume
15300 interface change, and to removed leave_stopped field.
15301 (resume_ptr): Delete.
15302 (struct thread_resume_array): New.
15303 (linux_set_resume_request): Add new `arg' parameter. Adjust to
15304 resume interface change.
15305 (linux_continue_one_thread, linux_queue_one_thread)
15306 (resume_status_pending_p): Check if the resume field is NULL
15307 instead of checking the leave_stopped member.
15308 (linux_resume): Adjust to the target resume interface change.
15309 * spu-low.c (spu_resume): Adjust to the target resume interface
15310 change.
15311 * win32-low.c (win32_detach, win32_resume): Ditto.
15312
c35fafde
PA
153132009-04-01 Pedro Alves <pedro@codesourcery.com>
15314
15315 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
15316 flag.
15317 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
15318 pending.
15319 (linux_continue_one_thread): Only preserve the stepping flag if
15320 there's a pending breakpoint.
15321
0a59d50b
PA
153222009-03-31 Pedro Alves <pedro@codesourcery.com>
15323
15324 * server.c (main): After the inferior having exited, call
15325 remote_close before exiting gdbserver.
15326
f04c6d38
TJB
153272009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
15328
15329 Fix size of FPSCR in Power 7 processors.
15330 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
15331 (PPC_FEATURE_HAS_DFP): New #define.
15332 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
15333 size of the FPSCR.
15334
78e5cee6
PA
153352009-03-23 Pedro Alves <pedro@codesourcery.com>
15336
15337 * server.c (handle_query) Whitespace and formatting.
15338
1b3f6016
PA
153392009-03-22 Pedro Alves <pedro@codesourcery.com>
15340
15341 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
15342 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
15343 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
15344 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
15345 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
15346 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
15347 Makefile.in, configure.ac: Fix whitespace throughout.
15348 * configure: Regenerate.
15349
a07b2135
PA
153502009-03-22 Pedro Alves <pedro@codesourcery.com>
15351
15352 * inferiors.c (find_inferior): Make it safe for the callback
15353 function to delete the currently iterated inferior.
15354
67cc2626
PA
153552009-03-22 Pedro Alves <pedro@codesourcery.com>
15356
15357 * Makefile.in (linuw_low_h): Move higher.
15358 (thread-db.o): Depend on $(linux_low_h).
15359
54a0b537
PA
153602009-03-17 Pedro Alves <pedro@codesourcery.com>
15361
15362 Rename "process" to "lwp" throughout.
15363
15364 * linux-low.c (all_processes): Rename to...
15365 (all_lwps): ... this.
15366 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
15367 (add_process): Rename to ...
15368 (add_lwp): ... this. Adjust.
15369 (linux_create_inferior): Adjust.
15370 (linux_attach_lwp): Adjust.
15371 (linux_attach): Adjust.
15372 (linux_kill_one_process): Rename to ...
15373 (linux_kill_one_lwp): ... this. Adjust.
15374 (linux_kill): Adjust.
15375 (linux_detach_one_process): Rename to ...
15376 (linux_detach_one_lwp): ... this. Adjust.
15377 (linux_detach): Adjust.
15378 (check_removed_breakpoint): Adjust.
15379 (status_pending_p): Adjust.
15380 (linux_wait_for_process): Rename to ...
15381 (linux_wait_for_lwp): ... this. Adjust.
15382 (linux_wait_for_event): Adjust.
15383 (send_sigstop): Adjust.
15384 (wait_for_sigstop): Adjust.
15385 (stop_all_processes): Rename to ...
15386 (stop_all_lwps): ... this.
15387 (linux_resume_one_process): Rename to ...
15388 (linux_resume_one_lwp): ... this. Adjust.
15389 (linux_set_resume_request, linux_continue_one_thread)
15390 (linux_queue_one_thread, resume_status_pending_p)
15391 (usr_store_inferior_registers, regsets_store_inferior_registers)
15392 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
15393 Adjust.
15394 * linux-low.h (get_process): Rename to ...
15395 (get_lwp): ... this. Adjust.
15396 (get_thread_process): Rename to ...
15397 (get_thread_lwp): ... this. Adjust.
15398 (get_process_thread): Rename to ...
15399 (get_lwp_thread): ... this. Adjust.
15400 (struct process_info): Rename to ...
15401 (struct lwp_info): ... this.
15402 (all_processes): Rename to ...
15403 (all_lwps): ... this.
15404 * proc-service.c (ps_lgetregs): Adjust.
15405 * thread-db.c (thread_db_create_event, find_one_thread)
15406 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
15407
0b16c5cf
PA
154082009-03-14 Pedro Alves <pedro@codesourcery.com>
15409
15410 * server.c (handle_query): Handle "qAttached".
15411
32de4b9d
NS
154122009-03-13 Nathan Sidwell <nathan@codesourcery.com>
15413
15414 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
15415 GPLv3, update license URL.
15416
2aecd87f
DE
154172009-03-01 Doug Evans <dje@google.com>
15418
93efd302 15419 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
15420 (server_h): Add gdb_signals.h.
15421 (signals.o): Update.
15422 * server.h (target_signal_from_host,target_signal_to_host_p)
15423 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
15424
86b1f9c5
PM
154252009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
15426
15427 * remote-utils.c (getpkt): Also generate remote-debug
15428 information if noack_mode is set.
15429
4aa995e1
PA
154302009-02-06 Pedro Alves <pedro@codesourcery.com>
15431
15432 * server.c (handle_query): Report qXfer:siginfo:read and
15433 qXfer:siginfo:write as supported and handle them.
15434 * target.h (struct target_ops) <qxfer_siginfo>: New field.
15435 * linux-low.c (linux_xfer_siginfo): New.
15436 (linux_target_ops): Set it.
15437
62709adf
PA
154382009-01-26 Pedro Alves <pedro@codesourcery.com>
15439
15440 * server.c (gdbserver_usage): Mention --remote-debug.
15441 (main): Accept '--remote-debug' switch.
15442
aef93bd7
DE
154432009-01-18 Doug Evans <dje@google.com>
15444
15445 * regcache.c (new_register_cache): No need to check result of xcalloc.
15446 * server.c (handle_search_memory): Back out calls to xmalloc,
15447 result is checked and error is returned to user upon failure.
15448 (handle_query): Ditto. Add more checks for result of malloc.
15449 (handle_v_cont): Check result of malloc, report error back to
15450 user upon failure.
15451 (handle_v_run): Ditto. Call freeargv.
15452 * server.h (freeargv): Declare.
15453 * utils.c (freeargv): New fn.
15454
54363045
DE
154552009-01-15 Doug Evans <dje@google.com>
15456
f626972c
DE
15457 * gdbreplay.c (perror_with_name): Make arg const char *.
15458 * server.h (target_signal_to_name): Make return type const char *.
0842e787 15459 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 15460 * utils.c (perror_with_name): Make arg const char *.
54363045 15461
18aae699
PA
154622009-01-14 Pedro Alves <pedro@codesourcery.com>
15463
15464 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
15465 when handling a EXIT_PROCESS_DEBUG_EVENT.
15466
ff703abe
JB
154672009-01-06 Joel Brobecker <brobecker@adacore.com>
15468
15469 * gdbreplay.c (gdbreplay_version): Update copyright year.
15470 * server.c (gdbserver_version): Likewise.
15471
f21cc1a2 154722009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
15473
15474 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 15475 (handle_extended_wait): Improve comment.
0e21c1ec 15476
bca929d3
DE
154772008-12-13 Doug Evans <dje@google.com>
15478
15479 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
15480 * server.h (ATTR_MALLOC): New macro.
15481 (xmalloc,xcalloc,xstrdup): Declare.
15482 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
15483 * inferiors.c: Ditto.
15484 * linux-low.c: Ditto.
15485 * mem-break.c: Ditto.
15486 * regcache.c: Ditto.
15487 * remote-utils.c: Ditto.
15488 * server.c: Ditto.
15489 * target.c: Ditto.
15490 * win32-low.c: Ditto.
15491
97438e3f
DE
154922008-12-12 Doug Evans <dje@google.com>
15493
896c7fbb
DE
15494 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
15495 in debugging printf.
15496
97438e3f
DE
15497 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
15498
e3b886f8
DE
154992008-12-09 Doug Evans <dje@google.com>
15500
15501 * linux-low.h (struct process_info): Delete member tid, unused.
15502 * thread-db.c (find_one_thread): Update.
15503 (maybe_attach_thread): Update.
15504
07e059b5
VP
155052008-12-02 Pedro Alves <pedro@codesourcery.com>
15506
889bf7c5
PA
15507 * target.h (struct target_ops): Add qxfer_osdata member.
15508 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
15509 and dirent.h.
15510 (linux_qxfer_osdata): New functions.
15511 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
15512 callback.
15513 * server.c (handle_query): Handle "qXfer:osdata:read:".
15514 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
15515 (buffer_xml_printf): New functions.
15516 * server.h (struct buffer): New.
15517 (buffer_grow_str, buffer_grow_str0): New macros.
15518 (buffer_grow, buffer_free, buffer_init, buffer_finish)
15519 (buffer_xml_printf): Declare.
07e059b5 15520
4cab47ab
DE
155212008-11-24 Doug Evans <dje@google.com>
15522
15523 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
15524
f142445f
DJ
155252008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
15526
15527 * server.c (handle_v_run): Always use the supplied argument list.
15528
d0107bb6 155292008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 15530
d0107bb6
BW
15531 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
15532 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 15533
2c4ad781
TJB
155342008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
15535
15536 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
15537 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
15538 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
15539 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
15540 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
15541 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
15542 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
15543 XML target descriptions.
15544 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
15545 when inferior is running on an ISA 2.05 or later processor. Add
15546 special case to return offset for full 64-bit slot of FPSCR when
15547 in 32-bits.
15548
dfb64f85
DJ
155492008-11-14 Daniel Gutson <dgutson@codesourcery.com>
15550
15551 * Makefile.in (SFILES, clean): Added sparc64 files.
15552 (reg-sparc64.o, reg-sparc64.c): New.
15553 * configure.srv (sparc*-*-linux*): New configuration.
15554 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
15555 syscall arguments for SPARC.
15556 (regsets_store_inferior_registers): Likewise.
15557 * linux-sparc-low.c: New file.
15558
66b6e1dd
DE
155592008-10-21 Doug Evans <dje@google.com>
15560
15561 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
15562 (READLINE_DIR,READLINE_DEP): Delete.
15563 (INTERNAL_CFLAGS): Update.
15564 (LINTFLAGS): Update.
15565
9b710a42
PA
155662008-10-10 Pedro Alves <pedro@codesourcery.com>
15567
15568 * server.c (handle_v_run): If GDB didn't specify an argv, use the
15569 whole argv from the last run, not just argv[0].
15570
5822d809
PA
155712008-09-08 Pedro Alves <pedro@codesourcery.com>
15572
15573 * regcache.c (new_register_cache): Return NULL if the register
15574 cache size isn't known yet.
15575 (free_register_cache): Avoid dereferencing a NULL regcache.
15576
74aac56f
DJ
155772008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
15578
15579 * configure.srv: Merge MIPS and MIPS64.
15580
400b20f5
MR
155812008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
15582
15583 * Makefile.in (uninstall): Apply $(EXEEXT) too.
15584
677c5bb1
LM
155852008-08-18 Luis Machado <luisgpm@br.ibm.com>
15586
15587 * Makefile.in: Add required vsx dependencies.
15588
15589 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
15590 Declare init_registers_powerpc_vsx32l.
15591 Declare init_registers_powerpc_vsx64l.
15592 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
15593 (ppc_arch_setup): Check for VSX in hwcap.
15594 (ppc_fill_vsxregset): New function.
15595 (ppc_store_vsxregset): New function.
15596 Add new VSX entry in regset_info target_regsets.
15597
15598 * configure.srv: Add new VSX dependencies.
15599
a6f3e723
SL
156002008-08-12 Pedro Alves <pedro@codesourcery.com>
15601
15602 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
15603 (remote_open): Set or clear transport_is_reliable.
15604 (putpkt_binary): Don't expect acks in noack mode.
15605 (getpkt): Don't send ack/nac in noack mode.
15606 * server.c (handle_general_set): Handle QStartNoAckMode.
15607 (handle_query): If connected by tcp pass QStartNoAckMode+ in
15608 qSupported.
15609 (main): Reset noack_mode on every connection.
15610 * server.h (noack_mode): Declare.
15611
a417dc56
RW
156122008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
15613
15614 * Makefile.in (GDBREPLAY_OBS): New variable.
15615 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
15616
3221518c
UW
156172008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
15618 Daniel Jacobowitz <dan@codesourcery.com>
15619
15620 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
15621 (usr_store_inferior_registers): Likewise.
15622 (regsets_store_inferior_registers): Likewise.
15623
ec56be1b
PA
156242008-07-31 Rolf Jansen <rj@surtec.com>
15625 Pedro Alves <pedro@codesourcery.com>
15626
15627 * configure.ac: Check for memmem declaration.
15628 * server.c [HAVE_MALLOC_H]: Include malloc.h.
15629 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
15630 (disable_packet_qfThreadInfo): Unconditionally compile.
15631 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
15632 * configure, config.in: Regenerate.
15633
2fe5e3ff
DE
156342008-07-28 Doug Kwan <dougkwan@google.com>
15635
15636 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
15637 (linux_write_memory): Remove declaration of errno.
15638
836acd6d
UW
156392008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
15640
15641 * linux-low.c (handle_extended_wait): Do not use "status"
15642 variable uninitialized.
15643
aeba519e
PA
156442008-07-07 Pedro Alves <pedro@codesourcery.com>
15645
15646 * server.c (handle_v_attach): Inhibit reporting dll changes.
15647
db42f210
PA
156482008-06-27 Pedro Alves <pedro@codesourcery.com>
15649
15650 * remote-utils.c (prepare_resume_reply): If requested, don't
15651 output "thread:TID" in the T stop reply.
15652
15653 * server.c (disable_packet_vCont, disable_packet_Tthread)
15654 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
15655 (handle_query): If requested, disable support for qC, qfThreadInfo
15656 and qsThreadInfo.
15657 (handle_v_requests): If requested, disable support for vCont.
15658 (gdbserver_show_disableable): New.
15659 (main): Handle --disable-packet and --disable-packet=LIST.
15660
15661 * server.h (disable_packet_vCont, disable_packet_Tthread)
15662 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
15663
8e4c5421
CD
156642008-06-20 Carlos O'Donell <carlos@codesourcery.com>
15665
15666 * server.c (gdbserver_usage): Mention --version.
15667
6e23a804
DJ
156682008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
15669
15670 * Makefile.in (gdbreplay.o): New rule.
15671
90aa6a40
JM
156722008-06-06 Joseph Myers <joseph@codesourcery.com>
15673
15674 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
15675 message, not gdbserver.
15676
c16158bc 156772008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
15678 Nathan Sidwell <nathan@codesourcery.com>
15679 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
15680
15681 * acinclude.m4: Include ../../config/acx.m4.
15682 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
15683 * configure, config.in: Regenerate.
15684 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
15685 * server.c (gdbserver_version): Print PKGVERSION.
15686 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
15687 (main): Adjust gdbserver_usage calls.
15688 * gdbreplay.c (version, host_name): Add declarations.
15689 (gdbreplay_version, gdbreplay_usage): New.
15690 (main): Accept --version and --help options.
15691
aeb75bf5
DJ
156922008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
15693
15694 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
15695 (arm_breakpoint_at): Handle Thumb.
15696 (the_low_target): Add comment.
15697
76b233dd
UW
156982008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
15699
15700 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
15701
08388c79
DE
157022008-05-09 Doug Evans <dje@google.com>
15703
a3c83fae
DE
15704 * server.h (decode_search_memory_packet): Declare.
15705 * remote-utils.c (decode_search_memory_packet): New fn.
15706 * server.c (handle_search_memory_1): New fn.
08388c79
DE
15707 (handle_search_memory): New fn.
15708 (handle_query): Process qSearch:memory packets.
15709
bb9c3d36
UW
157102008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
15711
15712 * regcache.c (registers_length): Remove.
15713 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
15714 full register packet.
15715 * regcache.h (registers_length): Remove prototype.
15716 * server.h (PBUFSIZ): Define to 16384.
15717
7284e1be
UW
157182008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
15719
15720 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
15721 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
15722 powerpc-64l.o, and powerpc-altivec64l.o.
15723 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
15724 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
15725 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
15726 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
15727 rs6000/power-linux.xml, and rs6000/power64-linux.xml
15728 to srv_xmlfiles.
15729
15730 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
15731 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
15732 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
15733 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
15734 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
15735 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
15736 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
15737 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
15738 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
15739 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
15740 (clean): Update.
15741
15742 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
15743 (init_registers_powerpc_32l): ... this new prototype.
15744 (init_registers_powerpc_32): Remove, replace by ...
15745 (init_registers_powerpc_altivec32l): ... this new prototype.
15746 (init_registers_powerpc_e500): Remove, replace by ...
15747 (init_registers_powerpc_e500l): ... this new prototype.
15748 (init_registers_ppc64): Remove, replace by ...
15749 (init_registers_powerpc_64l): ... this new prototype.
15750 (init_registers_powerpc_64): Remove, replace by ...
15751 (init_registers_powerpc_altivec64l): ... this new prototype.
15752 (ppc_num_regs): Set to 73.
15753 (PT_ORIG_R3, PT_TRAP): Define if necessary.
15754 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
15755 (ppc_cannot_store_register): Handle orig_r3 and trap.
15756 (ppc_arch_setup): Update init_registers_... calls.
15757 (ppc_fill_gregset): Handle orig_r3 and trap.
15758
15759 * inferiors.c (clear_inferiors): Reset current_inferior.
15760
fdc59709
PB
157612008-04-23 Paolo Bonzini <bonzini@gnu.org>
15762
889bf7c5
PA
15763 * acinclude.m4: Add override.m4.
15764 * configure: Regenerate.
fdc59709 15765
c9b2f845
UW
157662008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
15767
15768 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
15769 initial call to init_register_ppc64.
15770
550512b8
UW
157712008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
15772
43aaf8b6
PA
15773 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
15774 single powerpc*-*-linux* case.
550512b8
UW
15775 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
15776
b6430ec3
UW
157772008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
15778
15779 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 15780 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
15781 from reg_xmlfiles.
15782 * linux-ppc-low.c: Include <elf.h>.
15783 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
15784 (ppc_hwcap): New global variable.
15785 (ppc_regmap): Remove __SPE__ #ifdef sections.
15786 (ppc_regmap_e500): New global variable.
15787 (ppc_cannot_store_register): Update __SPE__ special case.
15788 (ppc_get_hwcap): New function.
15789 (ppc_arch_setup): Use it to determine whether inferior supports
15790 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
15791 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
15792 Do not access registers if target does not support AltiVec.
15793 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
15794 Do not access registers if target does not support SPE.
15795 (target_regsets): Unconditionally include AltiVec and SPE regsets.
15796
52fa2412
UW
157972008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
15798
15799 * linux-low.c (disabled_regsets, num_regsets): New.
15800 (use_regsets_p): Delete.
15801 (linux_wait_for_process): Clear disabled_regsets.
15802 (regsets_fetch_inferior_registers): Check and set it.
15803 (regsets_store_inferior_registers): Likewise.
15804 (linux_fetch_registers, linux_store_registers): Do not use
15805 use_regsets_p.
15806 (initialize_low): Allocate disabled_regsets.
15807
e28b3332
DJ
158082008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
15809
15810 * Makefile.in (LIBOBJS): New.
15811 (OBS): Use LIBOBJS.
15812 (memmem.o): New rule.
15813 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
15814 * configure: Regenerated.
15815
4536995d
UW
158162008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
15817
15818 * server.c (handle_query): Never return "unsupported" for
15819 qXfer:features:read queries.
15820
221c031f
UW
158212008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
15822
15823 * server.c (get_features_xml): Fix inverted condition.
15824 (handle_query): Always support qXfer:feature:read.
15825
ccd213ac
DJ
158262008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
15827
15828 * server.c (wrapper_argv): New.
15829 (start_inferior): Handle wrapper_argv. If set, expect an extra
15830 trap.
15831 (gdbserver_usage): Document --wrapper.
15832 (main): Parse --wrapper.
15833
6fe305f7
UW
158342008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
15835
15836 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
15837 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
15838 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
15839 (ppc_set_pc): Likewise.
15840 (ppc_arch_setup): New function.
15841 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
15842 of collect_register.
889bf7c5 15843 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 15844
5b0a002e
UW
158452008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
15846
15847 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
15848 instead of linux-ppc64-low.o.
15849 * linux-ppc64-low.c: Remove file.
15850 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
15851 (linux-ppc64-low.o): Remove rule.
15852
15853 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
15854 (init_registers_powerpc_64): Likewise.
15855 (ppc_regmap): Conditionally define depending on __powerpc64__.
15856 (ppc_cannot_store_register): Do not special-case "fpscr" when
15857 compiled on __powerpc64__.
15858 (ppc_collect_ptrace_register): New function.
15859 (ppc_supply_ptrace_register): New function.
15860 (ppc_breakpoint): Change type to "unsigned int".
15861 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
15862 (the_low_target): Conditionally provide initializers for the
889bf7c5 15863 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
15864 collect_ptrace_register and supply_ptrace_register members.
15865
9b4b61c8
UW
158662008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
15867
15868 * regcache.h (gdbserver_xmltarget): Add extern declaration.
15869 * server.c (gdbserver_xmltarget): Define.
15870 (get_features_xml): Use it to replace "target.xml" and arch_string.
15871
15872 * configure.srv: Remove srv_xmltarget. Add XML files that were
15873 mentioned there to srv_xmlfiles instead. Remove conditional tests
15874 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
15875 srv_xmlfiles and srv_regobj to include all possible choices.
15876 * configure.ac (srv_xmltarget): Remove.
15877 (srv_xmlfiles): Do not add "target.xml".
15878 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
15879 checks for supplementary target information.
15880 * configure: Regenerate.
15881 * Makefile.in (XML_TARGET): Remove.
15882 (target.xml): Remove rule.
15883 (clean): Do not clean up target.xml.
15884 (.PRECIOUS): Do not mention target.xml.
15885
15886 * target.h (struct target_ops): Remove arch_string member.
15887 * linux-low.c (linux_arch_string): Remove.
15888 (linux_target_ops): Remove arch_string initializer.
15889 * linux-low.h (struct linux_target_ops): Remove arch_string member.
15890 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
15891 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
15892 * spu-low.c (spu_arch_string): Remove.
15893 (spu_target_ops): Remove arch_string initializer.
15894 * win32-low.c (win32_arch_string): Remove.
15895 (win32_target_ops): Remove arch_string initializer.
15896 * win32-low.h (struct win32_target_ops): Remove arch_string member.
15897 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
15898 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
15899
ee1a7ae4
UW
159002008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
15901
15902 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
15903 by collect_ptrace_register and supply_ptrace_register hooks.
15904 * linux-low.c (fetch_register): Use supply_ptrace_register callback
15905 instead of checking for the_low_target.left_pad_xfer.
15906 (usr_store_inferior_registers): Use collect_ptrace_register callback
15907 instead of checking for the_low_target.left_pad_xfer.
15908
15909 * linux-s390-low.c (s390_collect_ptrace_register): New function.
15910 (s390_supply_ptrace_register): Likewise.
15911 (s390_fill_gregset): Call s390_collect_ptrace_register.
15912 (the_low_target): Update.
15913
15914 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
15915 (ppc_supply_ptrace_register): Likewise.
15916 (the_low_target): Update.
15917
15918 * linux-i386-low.c (the_low_target): Update.
15919 * linux-x86-64-low.c (the_low_target): Update.
15920
d61ddec4
UW
159212008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
15922
15923 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
15924 reg-s390.o and reg-s390x.o.
15925
15926 * linux-low.c (new_inferior): New global variable.
15927 (linux_create_inferior, linux_attach): Set it.
15928 (linux_wait_for_process): Call the_low_target.arch_setup after the
15929 target has stopped for the first time.
15930 (initialize_low): Do not call the_low_target.arch_setup.
15931
15932 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
15933 (s390_set_pc): Likewise.
15934 (s390_arch_setup): New function.
15935 (the_low_target): Use s390_arch_setup as arch_setup routine.
15936
15937 * regcache.c (realloc_register_cache): New function.
15938 (set_register_cache): Call it for each existing regcache.
15939
d05b4ac3
UW
159402008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
15941
15942 * server.h (init_registers): Remove prototype.
15943
15944 * linux-low.h (struct linux_target_ops): Add arch_setup field.
15945 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
15946 instead of init_registers ().
15947 * linux-arm-low.c (init_registers_arm): Add prototype.
15948 (init_registers_arm_with_iwmmxt): Likewise.
15949 (the_low_target): Add initializer for arch_setup field.
15950 * linux-cris-low.c (init_registers_cris): Add prototype.
15951 (the_low_target): Add initializer for arch_setup field.
15952 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
15953 (the_low_target): Add initializer for arch_setup field.
15954 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
15955 (the_low_target): Add initializer for arch_setup field.
15956 * linux-ia64-low.c (init_registers_ia64): Add prototype.
15957 (the_low_target): Add initializer for arch_setup field.
15958 * linux-m32r-low.c (init_registers_m32r): Add prototype.
15959 (the_low_target): Add initializer for arch_setup field.
15960 * linux-m68k-low.c (init_registers_m68k): Add prototype.
15961 (the_low_target): Add initializer for arch_setup field.
15962 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
15963 (init_registers_mips64_linux): Likewise.
15964 (the_low_target): Add initializer for arch_setup field.
15965 * linux-ppc-low.c (init_registers_ppc): Add prototype.
15966 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
15967 (the_low_target): Add initializer for arch_setup field.
15968 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
15969 (init_registers_powerpc_64): Likewise.
15970 (the_low_target): Add initializer for arch_setup field.
15971 * linux-s390-low.c (init_registers_s390): Add prototype.
15972 (init_registers_s390x): Likewise.
15973 (the_low_target): Add initializer for arch_setup field.
15974 * linux-sh-low.c (init_registers_sh): Add prototype.
15975 (the_low_target): Add initializer for arch_setup field.
15976 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
15977 (the_low_target): Add initializer for arch_setup field.
15978 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
15979 (the_low_target): Add initializer for arch_setup field.
15980
15981 * win32-low.h (struct win32_target_ops): Add arch_setup field.
15982 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
15983 instead of init_registers ().
15984 * win32-arm-low.c (init_registers_arm): Add prototype.
15985 (the_low_target): Add initializer for arch_setup field.
15986 * win32-i386-low.c (init_registers_i386): Add prototype.
15987 (the_low_target): Add initializer for arch_setup field.
15988
15989 * spu-low.c (init_registers_spu): Add prototype.
15990 (initialize_low): Call initialie_registers_spu () instead of
15991 initialize_registers ().
15992
fd96d250
PA
159932008-02-19 Pedro Alves <pedro@codesourcery.com>
15994
15995 * server.c (handle_v_requests): When handling the vRun and vAttach
15996 packets, if already debugging a process, don't kill it. Return an
15997 error instead.
15998
d41b6bb4
DJ
159992008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
16000
16001 * server.c (handle_query): Correct length check.
16002
5ac588cf
PA
160032008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
16004
16005 * win32-low.c (do_initial_child_stuff): Add process handle
16006 parameter. Set current_process_handle and current_process_id from the
16007 parameters. Clear globals.
16008 (win32_create_inferior): Don't set current_process_handle and
16009 current_process_id here. Instead pass them on the call to
16010 do_initial_child_stuff.
16011 (win32_attach): Likewise.
16012 (win32_clear_inferiors): New.
16013 (win32_kill): Don't close the current process handle or the
16014 current thread handle here. Instead call win32_clear_inferiors.
16015 (win32_detach): Don't open a new handle to the process. Call
16016 win32_clear_inferiors.
16017 (win32_join): Don't rely on current_process_handle; open a new
16018 handle using the process id.
16019 (win32_wait): Call win32_clear_inferiors when the inferior process
16020 has exited.
16021
ecd7ecbc
DJ
160222008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
16023
16024 * server.c (monitor_show_help): Add "exit".
16025
1525d545
MG
160262008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
16027
ecd7ecbc 16028 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
16029 (clean): Add reg-xtensa.c.
16030 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
16031 * configure.srv (xtensa*-*-linux*) New target.
16032 * linux-xtensa-low.c: New.
16033 * xtensa-xtregs.c: New.
1525d545 16034
59a016f0
PA
160352008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
16036
16037 * hostio.c: Don't include errno.h.
16038 (errno_to_fileio_errno): Move to hostio-errno.
16039 * hostio.c: (hostio_error): Remove the error parameter. Defer the
16040 error number outputting to the target->hostio_last_error callback.
16041 (hostio_packet_error): Use FILEIO_EINVAL directly.
16042 (handle_open, handle_pread, hostio_error, handle_unlink): Update
16043 calls to hostio_error.
16044 * hostio-errno.c: New.
16045 * server.h (hostio_last_error_from_errno): Declare.
16046 * target.h (target_ops): Add hostio_last_error member.
16047 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
16048 as hostio_last_error handler.
889bf7c5 16049 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
16050 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
16051 (wince_hostio_last_error): New functions.
16052 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
16053 as hostio_last_error handler.
16054 (win32_target_ops) [!_WIN32_WCE]: Register
16055 hostio_last_error_from_errno as hostio_last_error handler.
16056 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
16057 (hostio-errno.o): New rule.
16058 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
16059 * configure.srv (srv_hostio_err_objs): New variable. Default to
16060 hostio-errno.o.
16061 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
16062 * configure: Regenerate.
16063
2d717e4f
DJ
160642008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
16065
16066 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
16067 (linux_kill, linux_detach): Clean up the process list.
16068 * remote-utils.c (remote_open): Improve port number parsing.
16069 (putpkt_binary, input_interrupt): Only send interrupts if the target
16070 is running.
16071 * server.c (extended_protocol): Make static.
16072 (attached): Define earlier.
16073 (exit_requested, response_needed, program_argv): New variables.
16074 (target_running): New.
16075 (start_inferior): Clear attached here.
16076 (attach_inferior): Set attached here.
16077 (require_running): Define.
16078 (handle_query): Use require_running and target_running. Implement
16079 "monitor exit".
16080 (handle_v_attach, handle_v_run): New.
16081 (handle_v_requests): Use require_running. Handle vAttach and vRun.
16082 (gdbserver_usage): Update.
16083 (main): Redo argument parsing. Handle --debug and --multi. Handle
16084 --attach along with other options or after the port. Save
16085 program_argv. Support no initial program. Resynchronize
16086 communication with GDB after an error. Handle "monitor exit".
16087 Use require_running and target_running. Always allow the extended
16088 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
16089 restart in extended mode.
16090 * README: Refer to the GDB manual. Update --attach usage.
16091
7407e2de
AS
160922007-12-20 Andreas Schwab <schwab@suse.de>
16093
16094 * linux-low.c (STACK_SIZE): Define.
16095 (linux_tracefork_child): Use it. Use __clone2 on ia64.
16096 (linux_test_for_tracefork): Likewise.
16097
b65d95c5
DJ
160982007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
16099
16100 * linux-low.c (linux_wait_for_event): Update messages. Do not
16101 reinsert auto-delete breakpoints.
16102 * mem-break.c (struct breakpoint): Change return type of handler to
16103 int.
16104 (set_breakpoint_at): Update handler type.
16105 (reinsert_breakpoint_handler): Return 1 instead of calling
16106 delete_breakpoint.
16107 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
16108 setting a new one.
16109 (check_breakpoints): Delete auto-delete breakpoints and return 2.
16110 * mem-break.h (set_breakpoint_at): Update handler type.
16111 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
16112 * win32-low.c (auto_delete_breakpoint): New.
16113 (get_child_debug_event): Use it.
16114
4e799345
DJ
161152007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
16116
16117 * configure.ac: Check for pread and pwrite.
16118 * hostio.c (handle_pread): Fall back to lseek and read.
16119 (handle_pwrite): Fall back to lseek and write.
16120 * config.in, configure: Regenerated.
16121
27524b67
DJ
161222007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
16123
16124 * server.c (myresume): Add own_buf argument.
16125 (main): Update calls.
16126
a20d5e98
DJ
161272007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
16128
16129 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
16130 * remote-utils.c (remote_open): Do not call disable_async_io.
16131 (block_async_io): Delete.
16132 (unblock_async_io): Make static.
16133 (initialize_async_io): New.
16134 * server.c (handle_v_cont): Handle async I/O here.
16135 (myresume): Likewise. Move other common resume tasks here...
16136 (main): ... from here. Call initialize_async_io. Disable async
16137 I/O before the main loop.
16138 * server.h (initialize_async_io): Declare.
16139 (block_async_io, unblock_async_io): Delete prototypes.
16140 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
16141
b79d787e
DJ
161422007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
16143
16144 * remote-utils.c (readchar): Allow binary data in received messages.
16145
d97903b2
PA
161462007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
16147
16148 * win32-low.c (attaching): New global.
16149 (win32_create_inferior): Clear the `attaching' global.
16150 (win32_attach): Set the `attaching' global.
16151 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
16152 attaching. Only set a breakpoint at the entry point if not
16153 attaching.
16154
311de423
PA
161552007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
16156
16157 * server.c (main): Don't report dll events on the initial
16158 connection on attaches.
16159
6c2d16d2
PA
161602007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
16161
16162 * server.c (main): Relax numerical bases supported for the pid of
16163 the --attach command line argument.
16164
5ca906e6
PA
161652007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
16166
16167 * win32-low.c (win32_attach): Call OpenProcess before
16168 DebugActiveProcess, not after. Add last error output to error
16169 call.
16170
9c6c8194
PA
161712007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
16172
16173 * win32-low.c (win32_get_thread_context)
16174 (win32_set_thread_context): New functions.
16175 (thread_rec): Use win32_get_thread_context.
16176 (continue_one_thread, win32_resume): Use win32_set_thread_context.
16177 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
16178 field.
16179
4d5d1aaa
PA
161802007-12-03 Leo Zayas
16181 Pedro Alves <pedro_alves@portugalmail.pt>
16182
16183 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
16184 global variables.
16185 (child_add_thread): Minor cleanup.
16186 (child_continue): Resume artificially suspended threads before
16187 calling ContinueDebugEvent.
16188 (suspend_one_thread): New.
16189 (fake_breakpoint_event): New.
16190 (get_child_debug_event): Change return type to int. Check here if
16191 gdb sent an interrupt request. If a soft interrupt was requested,
16192 fake a breakpoint event. Return 0 if there is no event to handle,
16193 and 1 otherwise.
16194 (win32_wait): Don't check here if gdb sent an interrupt request.
16195 Ensure there is a valid event to handle.
16196 (win32_request_interrupt): Add soft interruption method as last
16197 resort.
16198
c436e841
PA
161992007-12-03 Leo Zayas
16200 Pedro Alves <pedro_alves@portugalmail.pt>
16201
16202 * win32-low.h (win32_thread_info): Add descriptions to the
16203 structure members. Replace `suspend_count' counter by a
16204 `suspended' flag.
16205 * win32-low.c (thread_rec): Update condition of when to get the
16206 context from the inferior. Rely on ContextFlags being set if it
16207 has already been retrieved. Only suspend the inferior thread if
16208 we haven't already. Warn if that fails.
16209 (continue_one_thread): s/suspend_count/suspended/. Only call
16210 ResumeThread once. Warn if that fails.
16211
e7b5fa67
PA
162122007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
16213
16214 * win32-low.c (win32_wait): Don't read from the inferior when it
16215 has already exited.
16216
a385171d
PA
162172007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
16218
16219 * Makefile.in (win32_low_h): New variable.
16220 (win32-low.o): Add dependency on $(win32_low_h).
16221 (win32-arm-low.o, win32-i386-low.o): New rules.
16222
f80c84b3
DJ
162232007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
16224
16225 * hostio.c: Correct copyright year.
16226
a6b151f1
DJ
162272007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
16228
16229 * Makefile.in (OBS): Add hostio.o.
16230 (hostio.o): New rule.
16231 * server.h (handle_vFile): Declare.
16232 * hostio.c: New file.
16233 * server.c (handle_v_requests): Take packet_len and new_packet_len
16234 for binary packets. Call handle_vFile.
16235 (main): Update call to handle_v_requests.
16236
f9387fc3
DJ
162372007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
16238
16239 * linux-low.c: Include <sched.h>.
16240
51c2684e
DJ
162412007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
16242
16243 * linux-low.c (linux_tracefork_grandchild): New.
16244 (linux_tracefork_child): Use clone.
16245 (linux_test_for_tracefork): Use clone; allocate and free a stack.
16246
75f83163
JB
162472007-10-31 Joel Brobecker <brobecker@adacore.com>
16248
16249 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
16250
da5898ce
DJ
162512007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
16252
16253 * linux-low.c (handle_extended_wait): Handle unexpected signals.
16254
24a09b5f
DJ
162552007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
16256
16257 * inferiors.c (change_inferior_id): Delete.
16258 (add_pid_to_list, pull_pid_from_list): New.
16259 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
16260 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
16261 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
16262 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
16263 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
16264 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
16265 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
16266 (using_threads): Always set to 1.
16267 (handle_extended_wait): New.
16268 (add_process): Do not set TID.
16269 (linux_create_inferior): Set must_set_ptrace_flags.
16270 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
16271 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
16272 (linux_thread_alive): Rename TID argument to LWPID.
16273 (linux_wait_for_process): Handle unknown processes. Do not use TID.
16274 (linux_wait_for_event): Do not use TID or check using_threads. Update
16275 call to dead_thread_notify. Call handle_extended_wait.
16276 (linux_create_inferior): Use PTRACE_SETOPTIONS.
16277 (send_sigstop): Delete sigstop_sent.
16278 (wait_for_sigstop): Avoid TID.
16279 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
16280 (linux_test_for_tracefork): New.
16281 (linux_lookup_signals): Use thread_db_active and
16282 linux_supports_tracefork_flag.
16283 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
16284 * linux-low.h (get_process_thread): Avoid TID.
16285 (struct process_ifo): Move thread_known and tid to the end. Remove
16286 sigstop_sent.
16287 (linux_attach_lwp, thread_db_init): Update prototypes.
16288 * server.h (change_inferior_id): Delete prototype.
16289 (add_pid_to_list, pull_pid_from_list): New prototypes.
16290 * thread-db.c (thread_db_use_events): New.
16291 (find_first_thread): Rename to...
16292 (find_one_thread): ...this. Update callers and messages. Do not
16293 call fatal. Check thread_db_use_events. Do not call
16294 change_inferior_id or new_thread_notify.
16295 (maybe_attach_thread): Update. Do not call new_thread_notify.
16296 (thread_db_init): Set thread_db_use_events. Check use_events.
16297 * utils.c (fatal, warning): Correct message prefix.
16298
30ed0a8f
DJ
162992007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
16300
16301 * Makefile.in (clean): Remove new files.
16302 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
16303 (powerpc-64.o, powerpc-64.c): New rules.
16304 * configure.srv: Use alternate register sets for powerpc64-*-linux*
16305 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
16306 with SPE.
16307 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
16308 SPE targets.
16309 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
16310 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
16311 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
16312 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
16313 (target_regsets): Add AltiVec and SPE register sets.
16314 * configure.ac: Check for AltiVec and SPE.
16315 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
16316 (ppc_fill_vrregset, ppc_store_vrregset): New.
16317 (target_regsets): Add AltiVec register set.
16318 * configure: Regenerated.
16319
fd462a61
DJ
163202007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
16321
16322 * linux-low.c (O_LARGEFILE): Define.
16323 (linux_read_memory): Use /proc/PID/mem.
16324 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
16325 * configure, config.in: Regenerated.
16326
69f223ed
DJ
163272007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
16328
16329 * linux-low.c (linux_wait_for_event): Do not pass signals while
16330 single-stepping.
16331
aec18585
PA
163322007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
16333
16334 * win32-low.c (create_process): New.
16335 (win32_create_inferior): Use create_process instead of
16336 CreateProcess. If create_process failed retry appending an ".exe"
16337 suffix. Store the GetLastError result immediatelly after
16338 create_process calls and use it on the call to error.
16339
34d86ddd
PA
163402007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
16341
16342 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
16343
5a0e3bd0
JB
163442007-08-23 Joel Brobecker <brobecker@adacore.com>
16345
16346 * configure.ac: Switch license to GPLv3.
16347
f88c79e6
MS
163482007-08-01 Michael Snyder <msnyder@access-company.com>
16349
16350 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
16351
6b3d9b83
PA
163522007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
16353
16354 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
16355 typedef.
16356 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
16357 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
16358 CloseToolhelp32Snapshot.
16359 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
16360 CloseToolhelp32Snapshot.
16361
c588c53c
MS
163622007-07-27 Michael Snyder <michael.snyder@access-company.com>
16363
16364 * server.c (main): Check for inferior exit before main loop.
16365
aa0403d9
PA
163662007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
16367
16368 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
16369 instead of on tmp_desc.
16370
255e7678
DJ
163712007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
16372 Daniel Jacobowitz <dan@codesourcery.com>
16373
16374 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
16375 (add_thread): Minor cleanups.
16376 (clear_inferiors): Move lower in the file. Clear the DLL
16377 list.
16378 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
16379 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
16380 (xml_escape_text): New.
16381 * server.c (handle_query): Handle qXfer:libraries:read. Report it
16382 for qSupported.
16383 (handle_v_cont): Report errors.
16384 (gdbserver_version): Update.
16385 (main): Correct size of own_buf. Do not report initial DLL events.
16386 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
16387 (unloaded_dll, xml_escape_text): New.
16388 * win32-low.c (enum target_waitkind): Update comments.
16389 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
16390 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
16391 (win32_EnumProcessModules, win32_GetModuleInformation)
16392 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
16393 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
16394 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
16395 (win32_Module32First, win32_Module32Next, load_toolhelp)
16396 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
16397 (get_child_debug_event): Handle DLL events.
16398 (win32_wait): Likewise.
16399
0d37add9
DJ
164002007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
16401
16402 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
16403 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
16404
45e2715e
PA
164052007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
16406
16407 * win32-low.c (handle_output_debug_string): Ignore event if not
16408 waiting.
16409
c5674cf1
PA
164102007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
16411
16412 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
16413
2bbe3cc1
DJ
164142007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
16415
16416 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
16417
ae13219e
DJ
164182007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
16419
16420 * inferiors.c (change_inferior_id): Add comment.
16421 * linux-low.c (check_removed_breakpoint): Add an early
16422 prototype. Improve debug output.
16423 (linux_attach): Doc update.
16424 (linux_detach_one_process, linux_detach): Clean up before releasing
16425 each process.
16426 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
16427 * linux-low.h (struct process_info): Doc improvement.
16428 * mem-break.c (delete_all_breakpoints): New.
16429 * mem-break.h (delete_all_breakpoints): New prototype.
16430 * thread-db.c (find_first_thread): New.
16431 (thread_db_create_event): Call it instead of
16432 thread_db_find_new_threads. Clean up unused variables.
16433 (maybe_attach_thread): Remove first thread handling.
16434 (thread_db_find_new_threads): Use find_first_thread.
16435 (thread_db_get_tls_address): Likewise.
16436
4105de34
DJ
164372007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
16438
16439 * thread-db.c (thread_db_find_new_threads): Add prototype.
16440 (thread_db_create_event): Check for the main thread before adding
16441 a new thread.
16442 (maybe_attach_thread): Only enable event reporting if TID == 0.
16443 (thread_db_get_tls_address): Check for new threads.
16444
2b876972
DJ
164452007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
16446
16447 * linux-low.c (linux_create_inferior): Try execv before execvp.
16448 * spu-low.c (spu_create_inferior): Likewise.
16449
7a245884
DJ
164502007-06-13 Mike Frysinger <vapier@gentoo.org>
16451
16452 * linux-low.c (linux_create_inferior): Change execv to execvp.
16453 * spu-low.c (spu_create_inferior): Likewies.
16454
117ce543
DJ
164552007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
16456
16457 * Makefile.in (clean): Clean new files instead of deleted ones.
16458 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
16459 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
16460 rules.
16461 * configure.srv: Specify XML files and new regformats for MIPS and
16462 MIPS64 GNU/Linux.
16463 * linux-mips-low.c (mips_num_regs): Set to only used registers.
16464 (mips_regmap): Do not fetch $0. Remove unused registers. Add
16465 an entry for the restart register.
16466 (mips_cannot_fetch_register, mips_cannot_store_register)
16467 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
16468 register names to match the XML descriptions.
16469 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
16470 restart register instead of $0.
16471
0e7f50da
UW
164722007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
16473 Markus Deuling <deuling@de.ibm.com>
16474
16475 * remote-utils.c (decode_xfer_write): New function.
16476 * server.h (decode_xfer_write): Add prototype.
16477 * server.c (handle_query): Add PACKET_LEN argument. Support
16478 qXfer:spu:read and qXfer:spu:write packets.
16479 (main): Pass packet_len to handle_query.
16480 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
16481 * target.h (target_ops): Add qxfer_spu.
16482
374c1d38
UW
164832007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
16484
16485 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
16486 accessing non-seekable spufs files.
16487
bb63802a
UW
164882007-05-16 Markus Deuling <deuling@de.ibm.com>
16489
889bf7c5 16490 * server.c (handle_query): Add reply for qC packet.
bb63802a 16491
7390519e
PA
164922007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16493 Leo Zayas <lerele@champenstudios@com>
16494
16495 * server.h (check_remote_input_interrupt_request): New function.
16496 * remote_utils.c (INVALID_DESCRIPTOR): New define.
16497 (remote_desc): Initialize with INVALID_DESCRIPTOR.
16498 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
16499 (check_remote_input_interrupt_request): New function.
16500 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 16501 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
16502 winapi_GenerateConsoleCtrlEvent): New typedefs.
16503 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
16504 to 250 ms.
16505 (win32_wait): Check for remote interrupt request
16506 with check_remote_input_interrupt_request.
16507 (win32_request_interrupt): New function.
16508 (win32_target_op): Set request_interrupt to win32_request_interrupt.
16509
34b34921
PA
165102007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16511
16512 * win32-low.c (debug_registers_changed,
16513 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
16514 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
16515 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
16516 (thread_rec): Get context using the low target.
16517 (child_add_thread): Call thread_added on the low target,
16518 which does the same thing.
16519 (regptr): Delete.
16520 (do_initial_child_stuff): Remove debug registers references.
16521 Set context using the low target. Resume threads after
16522 setting the contexts.
16523 (child_continue): Remove dead variable. Remove debug
16524 registers references.
16525 (child_fetch_inferior_registers): Go through the low target.
16526 (do_child_store_inferior_registers): Remove.
16527 (child_store_inferior_registers): Go through the low target.
16528 (win32_resume): Remove debug registers references.
16529 Set context using the low target.
16530 (handle_exception): Change return type to void. Don't record
16531 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
16532 first chance exception.
889bf7c5 16533 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
16534 goto loop. Always return after waiting for debug event.
16535 (win32_wait): Convert to switch statement. Handle spurious
16536 events.
16537
16538 * win32-i386-low.c (debug_registers_changed,
16539 debug_registers_used): New.
16540 (initial_stuff): Rename to ...
16541 (i386_initial_stuff): ... this. Clear debug registers
16542 state variables.
16543 (store_debug_registers): Delete.
16544 (i386_get_thread_context): New.
16545 (load_debug_registers): Delete.
16546 (i386_set_thread_context): New.
16547 (i386_thread_added): New.
16548 (single_step): Rename to ...
16549 (i386_single_step): ... this.
16550 (do_fetch_inferior_registers): Rename to ...
16551 (i386_fetch_inferior_register): ... this.
16552 (i386_store_inferior_register): New.
16553 (the_low_target): Adapt to new interface.
16554
16555 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
16556 (arm_get_thread_context): New.
16557 (arm_set_thread_context): New.
16558 (regptr): New.
16559 (do_fetch_inferior_registers): Rename to ...
16560 (arm_fetch_inferior_register): ... this.
16561 (arm_store_inferior_register): New.
16562 (arm_wince_breakpoint): Reimplement as unsigned long.
16563 (arm_wince_breakpoint_len): Define.
16564 (the_low_target): Adapt to new interface.
16565
16566 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
16567 load_debug_registers. Add get_thread_context, set_thread_context,
16568 thread_added and store_inferior_register. Rename
16569 fetch_inferior_registers to fetch_inferior_register.
16570 (regptr): Remove declaration.
16571
dd6953e1
PA
165722007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16573
16574 * linux-low.c (linux_detach): Change return type to int. Return 0.
16575 * spu-low.c (spu_detach): Likewise.
16576
444d6139
PA
165772007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16578
16579 * target.h (target_ops): Change return type of detach to int.
16580 Add join.
16581 (join_inferior): New.
16582 * server.c (main): Don't skip detach support on mingw32.
16583 If the inferior doesn't support detaching return error.
16584 Call join_inferior instead of using waitpid.
16585 * linux-low.c (linux_join): New.
16586 (linux_target_op): Add linux_join.
16587 * spu-low.c (spu_join): New.
16588 (spu_target_ops): Add spu_join.
16589 * win32-low.c (win32_detach): Adapt to new interface.
16590 Reopen current_process_handle before detaching. Issue a child
16591 resume before detaching.
16592 (win32_join): New.
16593 (win32_target_op): Add win32_join.
16594
1d5315fe
PA
165952007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16596
16597 * win32-low.c (win32-attach): Fix return value.
16598 * target.h (target_ops): Describe ATTACH return values.
16599
bf914831
PA
166002007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16601
16602 * win32-low.c (GETPROCADDRESS): Define.
16603 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
16604 (winapi_DebugSetProcessKillOnExit): Likewise.
16605 (win32_create_inferior): Force usage of ansi CreateProcessA.
16606 (win32_attach): Use GETPROCADDRESS.
16607 (win32_detach): Likewise.
16608
f72f3e60
PA
166092007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16610
16611 * win32-low.c (win32_wait): Don't use WSTOPSIG.
16612
ed50f18f
PA
166132007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
16614
16615 * win32-low.c: Commit leftover changes from 2007-03-29.
16616
0c2ead7e
DJ
166172007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
16618
16619 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
16620 fields short instead of int. Add explicit padding.
16621 (i387_cache_to_fsave): Remove unnecessary casts.
16622 (i387_fsave_to_cache): Doc fix.
16623 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
16624
73725ff3
DJ
166252007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
16626
16627 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
16628 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
16629
d99f33d8
PA
166302007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
16631
16632 * configure.srv (arm*-*-mingw32ce*): Move near the other
16633 arm targets.
16634
68070c10
PA
166352007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
16636
2482afc6 16637 * configure.ac: Add errno checking.
68070c10
PA
16638 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
16639 sys/file.h and malloc.h.
16640 (AC_CHECK_DECLS): Add perror.
16641 (srv_mingwce): Handle.
2482afc6 16642 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
16643 win32-i386-low.o to srv_tgtobj.
16644 (i[34567]86-*-mingw*): Likewise.
16645 (arm*-*-mingw32ce*): Add case.
16646 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
16647 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
16648 [__MINGW32CE__] (strerror): New function.
16649 [__MINGW32CE__] (errno): Define to GetLastError.
16650 [__MINGW32CE__] (COUNTOF): New macro.
16651 (remote_open): Remove extra close call.
16652 * mem-break.c (delete_breakpoint_at): New function.
16653 * mem-break.h (delete_breakpoint_at): Declare.
16654 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
16655 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
16656 [USE_WIN32API] (read, write): Add char* casts.
16657 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
16658 * server.h: Include wincecompat.h on Windows CE.
16659 [HAVE_ERRNO_H]: Check.
16660 (perror): Declare if not declared.
16661 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
16662 (perror_with_name): Remove errno declaration.
16663 * wincecompat.h: New.
16664 * wincecompat.c: New.
16665 * win32-low.h: New.
16666 * win32-arm-low.c: New.
16667 * win32-i386-low.c: New.
16668 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
16669 (OUTMSG2): Make it safe.
16670 (_T): New macro.
16671 (COUNTOF): New macro.
16672 (NUM_REGS): Get it from the low target.
16673 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
16674 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
16675 (thread_rec): Let low target handle debug registers.
16676 (child_add_thread): Likewise.
16677 (child_init_thread_list): Likewise.
16678 (continue_one_thread): Likewise.
16679 (regptr): New.
16680 (do_child_fetch_inferior_registers): Move to ...
16681 * win32-i386-low.c: ... here, and rename to ...
16682 (do_fetch_inferior_registers): ... this.
889bf7c5 16683 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
16684 Go through the low target.
16685 (do_child_store_inferior_registers): Use regptr.
16686 (strwinerror): New function.
16687 (win32_create_inferior): Handle Windows CE.
16688 Use strwinerror instead of strerror on Windows error
16689 codes. Add program to the error output.
16690 Don't close the main thread handle on Windows CE.
16691 (win32_attach): Use coredll.dll on Windows CE.
16692 (win32_kill): Close current process and current
16693 thread handles.
16694 (win32_detach): Use coredll.dll on Windows CE.
16695 (win32_resume): Let low target handle debug registers, and
16696 step request.
16697 (handle_exception): Add/Remove initial breakpoint. Avoid
16698 non-existant WSTOPSIG on Windows CE.
16699 (win32_read_inferior_memory): Cast to remove warning.
16700 (win32_arch_string): Go through the low target.
16701 (initialize_low): Call set_breakpoint_data with the low
16702 target's breakpoint.
16703 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
16704 FOP_REGNUM, mappings): Move to ...
16705 * win32-i386-low.c: ... here.
16706 * win32-low.c (win32_thread_info): Move to ...
16707 * win32-low.h: ... here.
16708 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
16709 win32-arm-low.c and wincecompat.c.
16710 (all:): Add $EXEEXT.
16711 (install-only:): Likewise.
16712 (gdbserver:): Likewise.
16713 (gdbreplay:): Likewise.
16714 * config.in: Regenerate.
16715 * configure: Regenerate.
16716
41093d81
PA
167172007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
16718
16719 * win32-low.c: Rename typedef thread_info to
16720 win32_thread_info throughout.
16721
544afa54
PA
167222007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
16723
16724 * win32-i386-low.c: Rename to ...
16725 * win32-low.c: ... this.
16726 * configure.srv: Replace win32-i386-low.o with win32-low.o.
16727 * Makefile.in: Likewise.
16728
bce7165d
PA
167292007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
16730
16731 * remote-utils.c (monitor_output): Constify msg parameter.
16732 * server.h (monitor_output): Likewise.
16733 * win32-i386-low.c (handle_output_debug_string): New.
16734 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
16735 handle_output_debug_string.
16736 (get_child_debug_event): Likewise.
16737
506c7aa0
DJ
167382007-03-27 Mat Hostetter <mat@lcs.mit.edu>
16739
16740 * server.c (main): Correct strtoul check.
16741
42c81e2a
DJ
167422007-03-27 Jon Ringle <jon@ringle.org>
16743
16744 * linux-low.c: Check __ARCH_HAS_MMU__ also.
16745
9453113a
DJ
167462007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
16747
16748 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
16749
64a69107
DJ
167502007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
16751
16752 * terminal.h: Check HAVE_SGTTY_H.
16753
167542007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
16755
16756 * remote-utils.c (remote_open): Print out the assigned port number.
16757
c74d0ad8
DJ
167582007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
16759
16760 * remote-utils.c (monitor_output): New function.
16761 * server.c (debug_threads): Define here.
16762 (monitor_show_help): New function.
16763 (handle_query): Handle qRcmd.
16764 (main): Do not handle 'd' packet.
16765 * server.h (debug_threads, remote_debug, monitor_output): Declare.
16766 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
16767 of debug_threads.
16768
de7c3b4a
PA
167692007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
16770
16771 * Makefile.in (EXEEXT): New.
16772 (clean): Use $(EXEEXT).
16773
ef57601b
PA
167742007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
16775
16776 * target.h (target_ops): Rename send_signal to request_interrupt,
16777 and remove enum target_signal parameter.
16778 * linux-low.c (linux_request_interrupt): Rename from
16779 linux_send_signal, and always send SIGINT.
16780 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
16781 and always send SIGINT.
16782 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
16783 of send_signal.
16784 (input_interrupt): Likewise.
16785
820f2bda
PA
167862007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
16787
16788 * server.c (get_features_xml): Check if target implemented
16789 arch_string.
16790 * win32-i386-low.c (win32_arch_string): New.
16791 (win32_target_ops): Add win32_arch_string as arch_string member.
16792
ab39bf24
UW
167932007-02-22 Markus Deuling <deuling@de.ibm.com>
16794
16795 * spu-low.c (spu_arch_string): New.
16796 (spu_target_ops): Add spu_arch_string.
16797
61ff6e04
DJ
167982007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
16799
16800 * remote-utils.c: Remove HAVE_TERMINAL_H check.
16801 * configure.ac: Do not check for terminal.h.
16802 * configure, config.in: Regenerated.
16803
fb1e4ffc
DJ
168042007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
16805
16806 * Makefile.in (OBS): Add $(XML_BUILTIN).
16807 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
16808 (clean): Update.
16809 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
16810 (arm-with-iwmmxt.c): New.
16811 * config.in, configure: Regenerate.
16812 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
16813 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
16814 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
16815 (arm*-*-linux*): Add iWMMXt and regset support.
16816 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
16817 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
16818 (arm_store_wmmxregset, target_regsets): New.
16819 * server.c (get_features_xml): Take annex argument. Check builtin
16820 XML documents.
16821 (handle_query): Handle multiple annexes.
16822
0f48aa01
DJ
168232007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
16824
16825 * remote-utils.c [USE_WIN32API] (read, write): Define.
16826 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
16827 write.
16828
23181151
DJ
168292007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
16830
16831 * linux-i386-low.c (the_low_target): Set arch_string.
16832 * linux-x86-64-low.c (the_low_target): Likewise.
16833 * linux-low.c (linux_arch_string): New.
16834 (linux_target_ops): Add it.
16835 * linux-low.h (struct linux_target_ops): Add arch_string.
16836 * server.c (write_qxfer_response): Use const void * for DATA.
16837 (get_features_xml): New.
16838 (handle_query): Handle qXfer:features:read. Report it for qSupported.
16839 * target.h (struct target_ops): Add arch_string method.
16840
9d606399
DJ
168412007-01-03 Denis Pilat <denis.pilat@st.com>
16842 Daniel Jacobowitz <dan@codesourcery.com>
16843
16844 * linux-low.c (linux_kill): Handle being called with no threads.
16845 * win32-i386-low.c (win32_kill): Likewise.
16846 (get_child_debug_event): Clear current_process_handle.
16847
168482006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
16849 Daniel Jacobowitz <dan@codesourcery.com>
16850
16851 * remote-utils.c (remote_open): Check the type of specified
16852 serial port devices before opening them.
16853 * server.c (main): Kill the inferior if an error occurs during
16854 the first remote_open.
16855
a5e13d24
DJ
168562006-12-05 Markus Deuling <deuling@de.ibm.com>
16857
16858 * README: Update supported targets.
16859
186947f7
DJ
168602006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
16861
16862 * Makefile.in (clean): Remove reg-mips64.c.
16863 (reg-mips64.c, reg-mips64.o): New rules.
16864 * configure.srv: Handle mips64. Include regset support for mips.
16865 * linux-mips-low.c (union mips_register): New.
16866 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
16867 (mips_breakpoint, mips_breakpoint_at): Use int.
16868 (mips_collect_register, mips_supply_register)
16869 (mips_collect_register_32bit, mips_supply_register_32bit)
16870 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
16871 (mips_store_fpregset, target_regsets): New.
16872 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
16873
a13e2c95
UW
168742006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
16875
16876 * configure.srv: Add target "spu*-*-*".
16877 * Makefile.in (clean): Remove reg-spu.c.
16878 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
16879 * spu-low.c: New file.
16880
cb7283db
DJ
168812006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
16882
16883 * configure.ac: Correct td_thr_tls_get_addr test.
16884 * configure: Regenerated.
16885
89be2091
DJ
168862006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
16887
16888 * linux-low.c (linux_wait_for_event): Reformat. Use the
16889 pass_signals array.
16890 * remote-utils.c (decode_address_to_semicolon): New.
16891 * server.c (pass_signals, handle_general_set): New.
16892 (handle_query): Mention QPassSignals for qSupported.
16893 (main): Call handle_general_set.
16894 * server.h (pass_signals, decode_address_to_semicolon): New.
16895
000ef4f0
DJ
168962006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
16897
16898 * server.c (handle_query): Correct error handling for read_auxv.
16899
b7149293
UW
169002005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
16901
16902 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
16903 and srv_linux_thread_db to yes.
16904 * linux-s390-low.c (s390_fill_gregset): New function.
16905 (target_regsets): Define data structure.
16906
dae5f5cf
DJ
169072006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
16908
16909 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
16910 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
16911 * config.in, configure: Regenerated.
16912 * inferiors.c (gdb_id_to_thread): New function.
16913 (gdb_id_to_thread_id): Use it.
16914 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
16915 * linux-low.h (struct process_info): Add th member.
16916 (thread_db_get_tls_address): New prototype.
16917 * remote-utils.c (decode_address): Make non-static.
16918 * server.c (handle_query): Handle qGetTLSAddr.
16919 * server.h (gdb_id_to_thread, decode_address): New prototypes.
16920 * target.h (struct target_ops): Add get_tls_address.
16921 * thread-db.c (maybe_attach_thread): Save the thread handle.
16922 (thread_db_get_tls_address): New.
16923
32ca6d61
DJ
169242006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
16925
16926 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
16927 (linux_resume_one_process): Take a siginfo_t *. Update all
16928 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
16929 (struct pending_signals): Add a siginfo_t.
16930 (linux_wait_for_process): Always set last_status.
16931 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
16932 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
16933 * linux-low.h (struct process_info): Add last_status.
16934
5ffff7c1
DJ
169352006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
16936
16937 * remote-utils.c (try_rle): New function.
16938 (putpkt_binary): Use it.
16939
8695c747
DJ
169402006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
16941
16942 * Makefile.in (clean): Clean reg-x86-64-linux.c.
16943 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
16944 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
16945 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
16946 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
16947 point registers.
16948
290fadea
RS
169492006-08-08 Richard Sandiford <richard@codesourcery.com>
16950
16951 * server.c (terminal_fd): New variable.
16952 (old_foreground_pgrp): Likewise.
16953 (restore_old_foreground_pgrp): New function.
16954 (start_inferior): Record the terminal file descriptor in terminal_fd
16955 and its original foreground group in old_foreground_pgrp. Register
16956 restore_old_foreground_pgrp with atexit().
16957
9f2e1e63
DJ
169582006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
16959
16960 * server.c (handle_query): Correct qPart to qXfer.
16961
b80864fb
DJ
169622006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
16963
16964 * configure.ac: Check for more headers which are missing on
16965 Windows. Automatically supply -lwsock32 and USE_WIN32API.
16966 * configure.srv: Add Cygwin and mingw32.
16967 * remote-utils.c: Don't include headers unconditionally which
16968 are missing on mingw32. Include <winsock.h> for mingw32.
16969 (remote_open): Adjust for mingw32 support. Flush
16970 standard error after writing to it.
16971 (remote_close, putpkt_binary, input_interrupt, block_async_io)
16972 (unblock_async_io, enable_async_io, disable_async_io)
16973 (readchar, getpkt): Update for Winsock support.
16974 (prepare_resume_reply): Expect a protocol signal number.
16975 * server.c: Disable <sys/wait.h> on mingw32.
16976 (start_inferior): Adjust for mingw32 support. Flush
16977 standard error after writing to it.
16978 (attach_inferior): Likewise. Use protocol signal
16979 numbers.
16980 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
16981 and names.
16982 * win32-i386-low.c: New file.
16983 * Makefile.in (XM_CLIBS): Set.
16984 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
16985 (win32-i386-low.o): New dependency rule.
16986 * linux-low.c (linux_wait): Use target signal numbers.
16987 * target.h (struct target_ops): Doc fix.
16988 * server.h (target_signal_to_name): New prototype.
16989 * gdbreplay.c: Don't include headers unconditionally which
16990 are missing on mingw32. Include <winsock.h> for mingw32.
16991 (remote_close, remote_open): Adjust for Winsock support.
16992 * configure, config.in: Regenerated.
16993
0876f84a
DJ
169942006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
16995
16996 * server.c (decode_xfer_read, write_qxfer_response): New.
16997 (handle_query): Take a packet length argument. Handle
16998 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
16999 the qSupported response.
17000 (main): Update call to handle_query.
17001
01f9e8fa
DJ
170022006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
17003
17004 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
17005 (putpkt_binary): Renamed from putpkt and adjusted for binary
17006 data.
17007 (putpkt): New wrapper for putpkt_binary.
17008 (readchar): Don't mask off the high bit.
17009 (decode_X_packet): New function.
17010 * server.c (main): Call putpkt_binary if a handler sets the packet
17011 length. Save the length of the incoming packet. Handle 'X'.
17012 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
17013
be2a5f71
DJ
170142006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
17015
17016 * server.c (handle_query): Handle qSupported.
17017
ea025f5f
DJ
170182006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
17019
17020 * remote-utils.c (all_symbols_looked_up): New variable.
17021 (look_up_one_symbol): Check it.
17022 * server.h (look_up_one_symbol): New declaration.
17023 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
17024
9308fc88
DJ
170252006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
17026
17027 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 17028 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
17029 (PTRACE_GET_THREAD_AREA): Define.
17030 (ps_get_thread_area): New function.
17031
52fb6437
NS
170322006-05-09 Nathan Sidwell <nathan@codesourcery.com>
17033
17034 * configure.srv (m68k*-*-uclinux*): New target.
17035 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
17036 (linux_resume_one_process): Remove extraneous cast.
17037 (linux_read_offsets): New.
17038 (linux_target_op): Add linux_read_offsets on mmuless systems.
17039 * server.c (handle_query): Add qOffsets logic.
17040 * target.h (struct target_ops): Add read_offsets.
17041
21b0f40c
DJ
170422006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
17043
17044 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
17045 (PTRACE_GET_THREAD_AREA): Define.
17046 (ps_get_thread_area): New function.
17047 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
17048 (linux-x86-64-low.o): Update.
17049
0050a760
DJ
170502006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
17051
17052 * configure.ac: Remove checks for prfpregset_t.
17053 * gdb_proc_service.h: New file.
17054 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
17055 new "gdb_proc_service.h".
17056 * proc-service.c: Likewise.
17057 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
17058 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
17059 * Makefile.in (gdb_proc_service_h): Updated.
17060 * configure, config.in: Regenerated.
17061
b92a518e
DJ
170622006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
17063
17064 * remote-utils.c (prepare_resume_reply): Move declaration
17065 of gdb_id_from_wait to the top of the block.
17066
545587ee
DJ
170672006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
17068
17069 * linux-low.c (regsets_store_inferior_registers): Read the regset
17070 from the target before filling it.
17071
9db87ebd
DJ
170722006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
17073
17074 * server.c (attach_inferior): Return SIGTRAP for a successful
17075 attach.
17076
dd24457d
DJ
170772006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
17078
17079 * Makefile.in (OBS): Add version.o.
17080 (STAGESTUFF): Delete.
17081 (version.o): Add dependencies.
17082 (version.c): Replace rule.
17083 (clean): Remove version.c.
17084 * server.c (gdbserver_version): New.
17085 (gdbserver_usage): Use printf.
17086 (main): Handle --version and --help.
17087 * server.h (version, host_name): Add declarations.
17088
6f0f660e
EZ
170892005-12-23 Eli Zaretskii <eliz@gnu.org>
17090
889bf7c5
PA
17091 * linux-arm-low.c:
17092 * linux-arm-low.c:
17093 * inferiors.c:
17094 * i387-fp.h:
17095 * i387-fp.c:
17096 * gdbreplay.c:
17097 * regcache.c:
17098 * proc-service.c:
17099 * mem-break.h:
17100 * mem-break.c:
17101 * linux-x86-64-low.c:
17102 * linux-sh-low.c:
17103 * linux-s390-low.c:
17104 * linux-ppc64-low.c:
17105 * linux-ppc-low.c:
17106 * linux-mips-low.c:
17107 * linux-m68k-low.c:
17108 * linux-m32r-low.c:
17109 * linux-low.h:
17110 * linux-low.c:
17111 * linux-ia64-low.c:
17112 * linux-i386-low.c:
17113 * linux-crisv32-low.c:
17114 * thread-db.c:
17115 * terminal.h:
17116 * target.h:
17117 * target.c:
17118 * server.h:
17119 * server.c:
17120 * remote-utils.c:
17121 * regcache.h:
17122 * utils.c:
17123 * Makefile.in:
17124 * configure.ac:
6f0f660e
EZ
17125 * gdbserver.1: Add (C) after Copyright. Update the FSF
17126 address.
17127
9d1fb177
DJ
171282005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
17129
17130 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
17131 (arm_breakpoint_at): Recognize both breakpoints.
17132 (the_low_target): Use the correct breakpoint instruction.
17133
011a70c2
DJ
171342005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
17135
17136 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
17137 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
17138 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
17139 (the_low_target): Update.
17140
7fb85e41
AS
171412005-10-25 Andreas Schwab <schwab@suse.de>
17142
17143 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
17144
17145 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
17146 (ia64_num_regs): Reduce to 462.
17147
3db0444b
DJ
171482005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
17149
17150 * acinclude.m4: Correct quoting.
17151 * aclocal.m4: Regenerated.
17152
17153 Suggested by SZOKOVACS Robert <szo@ies.hu>:
17154 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
17155 (thread_db_init): Call thread_db_err_str.
17156 * configure.ac: Check for TD_VERSION.
17157 * config.in, configure: Regenerated.
17158
bee0189a
DJ
171592005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
17160
17161 * server.h (error, fatal, warning): Add ATTR_FORMAT.
17162
e9d25b98
DJ
171632005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
17164
17165 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
17166 is not available. Define HAVE_PTRACE_GETREGS if it is.
17167 * config.in, configure: Regenerated.
17168 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
17169 * linux-i386-low.c, linux-m68k-low.c: Update to use
17170 HAVE_PTRACE_GETREGS.
17171 * linux-low.c (regsets_fetch_inferior_registers)
17172 (regsets_store_inferior_registers): Only return 0 if we processed
17173 GENERAL_REGS.
17174 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
17175 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
17176
a06660f7
DJ
171772005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
17178
17179 * inferiors.c (struct thread_info): Add gdb_id.
17180 (add_thread): Add gdb_id argument.
17181 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
17182 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
17183 calls to add_thread.
17184 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
17185 * server.c (handle_query): Use thread_to_gdb_id.
17186 (handle_v_cont, main): Use gdb_id_to_thread_id.
17187 * server.h (add_thread): Update prototype.
17188 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
17189 prototypes.
17190
5a1f5858
DJ
171912005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
17192
17193 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
17194 left-padded registers.
17195 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
17196 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
17197
e122f1f5
SE
171982005-07-01 Steve Ellcey <sje@cup.hp.com>
17199
17200 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
17201 * configure: Regenerate.
17202 * config.in: Regenerate.
17203 * server.h (NEED_DECLARATION_STRERROR):
17204 Replace with !HAVE_DECL_STRERROR.
17205
d592fa2f
DJ
172062005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
17207
17208 * linux-low.c (linux_wait, linux_send_signal): Don't test
17209 an unsigned long variable for > 0 if it could be MAX_ULONG.
17210 * server.c (myresume): Likewise.
17211 * target.c (set_desired_inferior): Likewise.
17212
ccbd4912
MK
172132005-06-13 Mark Kettenis <kettenis@gnu.org>
17214
17215 * configure.ac: Simplify and improve check for socklen_t.
17216 * configure, config.in: Regenerate.
17217
f450004a
DJ
172182005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
17219
17220 * acconfig.h: Remove.
17221 * configure.ac: Add a test for socklen_t. Use three-argument
17222 AC_DEFINE throughout.
17223 * config.in: Regenerated using autoheader 2.59.
17224 * configure: Regenerated.
17225
17226 * gdbreplay.c (socklen_t): Provide a default.
17227 (remote_open): Use socklen_t.
17228 * remote-utils.c (socklen_t): Provide a default.
17229 (remote_open): Use socklen_t.
17230 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
17231 unsigned char.
17232
17233 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
17234 char for buffers.
17235 * linux-low.c (linux_read_memory, linux_write_memory)
17236 (linux_read_auxv): Likewise.
17237 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
17238 (check_mem_write): Likewise.
17239 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
17240 Likewise.
17241 * regcache.c (struct inferior_rgcache_data, registers_to_string)
17242 (registers_from_string, register_data): Likewise.
17243 * server.c (handle_query, main): Likewise.
17244 * server.h (convert_ascii_to_int, convert_int_to_ascii)
17245 (decode_M_packet): Likewise.
17246 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
17247 * target.h (struct target_ops): Update read_memory, write_memory,
17248 and read_auxv.
17249 (read_inferior_memory, write_inferior_memory): Update.
17250 * linux-low.h (struct linux_target_ops): Change type of breakpoint
17251 to unsigned char *.
17252 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
17253 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
17254 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
17255 linux-s390-low.c, linux-sh-low.c: Update for changes in
17256 read_inferior_memory and the_low_target->breakpoint.
17257
eee84df1
DJ
172582005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
17259
17260 * Makefile.in (SFILES): Add linux-ppc64-low.c.
17261 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
17262 * configure.srv: Add powerpc64-*-linux*.
17263 * linux-ppc64-low.c: New file.
17264
45b134e5
OF
172652005-05-23 Orjan Friberg <orjanf@axis.com>
17266
17267 * linux-cris-low.c: New file with support for CRIS.
17268 * linux-crisv32-low.c: Ditto for CRISv32.
17269 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
17270 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 17271 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
17272 reg-crisv32.o, and reg-crisv32.c to make rules.
17273 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
17274 recognized targets.
17275
48d93c75
UW
172762005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
17277
17278 * linux-low.c (fetch_register): Ensure buffer size is a multiple
17279 of sizeof (PTRACE_XFER_TYPE).
17280 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
17281
e013ee27
OF
172822005-05-12 Orjan Friberg <orjanf@axis.com>
17283
889bf7c5 17284 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
17285 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
17286 pointers for hardware watchpoint support.
17287 * linux-low.h (struct linux_target_ops): Ditto.
17288 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
17289 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
17290 to linux_target_ops.
17291 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
17292 reply packet.
17293 * server.c (main): Recognize 'Z' and 'z' packets.
17294
b0ded00b
UW
172952005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
17296
17297 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
17298 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
17299 (the_low_target): Add new members.
17300
8643e2ad
DJ
173012005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
17302
17303 * proc-service.c (ps_lgetregs): Search all_processes instead of
17304 all_threads.
17305
fc620387
DJ
173062005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
17307
17308 * server.c (start_inferior): Change return type to int.
17309 (attach_inferior): Change sigptr to int *.
17310 (handle_v_cont, handle_v_requests): Change signal to int *.
17311 (main): Change signal to int.
17312
173132005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
17314
17315 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
17316 * configure.srv: Add m32r*-*-linux*.
17317 * linux-m32r-low.c: New file.
17318
e0e76420
DJ
173192005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
17320
17321 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
17322
a1928bad
DJ
173232005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
17324
17325 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
17326 Take unsigned long arguments for PIDs.
17327 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
17328 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
17329 (wait_for_sigstop, linux_resume_one_process)
17330 (regsets_fetch_inferior_registers, linux_send_signal)
17331 (linux_read_auxv): Likewise. Update the types of variables holding
17332 PIDs. Update format string specifiers.
17333 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
17334 * remote-utils.c (prepare_resume_reply): Likewise.
17335 * server.c (cont_thread, general_thread, step_thread)
17336 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
17337 unsigned long.
17338 (handle_query): Update format specifiers.
17339 (handle_v_cont, main): Use strtoul for thread IDs.
17340 * server.h (struct inferior_list_entry): Use unsigned long for ID.
17341 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
17342 (general_thread, step_thread, thread_from_wait)
17343 (old_thread_from_wait): Update.
17344 * target.h (struct thread_resume): Use unsigned long for THREAD.
17345 (struct target_ops): Use unsigned long for arguments to attach and
17346 thread_alive.
17347
dcdb98d2
DJ
173482005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
17349
17350 * acinclude.m4: Include bfd/bfd.m4 directly.
17351 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
17352 <agriffis@toolchain.org>.
17353 * aclocal.m4, configure: Regenerated.
17354
bec39cab
AC
173552005-01-07 Andrew Cagney <cagney@gnu.org>
17356
17357 * configure.ac: Rename configure.in, require autoconf 2.59.
17358 * configure: Re-generate.
17359
434c4c77
DJ
173602004-12-08 Daniel Jacobowitz <dan@debian.org>
17361
17362 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
17363 LIBS when finished.
17364 * aclocal.m4: Regenerated.
17365 * configure: Regenerated.
17366
db1d3e1b
AS
173672004-11-21 Andreas Schwab <schwab@suse.de>
17368
17369 * linux-m68k-low.c (m68k_num_gregs): Define.
17370 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
17371 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
17372 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
17373 (m68k_breakpoint_at): New. Add to the_low_target.
17374
17375 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
17376 srv_linux_thread_db to yes.
17377
43360365
JB
173782004-10-20 Joel Brobecker <brobecker@gnat.com>
17379
17380 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
17381 (ARCH_SET_FS): Likewise.
17382 (ARCH_GET_FS): Likewise.
17383 (ARCH_GET_GS): Likewise.
17384
fd500816
DJ
173852004-10-16 Daniel Jacobowitz <dan@debian.org>
17386
17387 * linux-i386-low.c (ps_get_thread_area): New.
17388 * linux-x86-64-low.c (ps_get_thread_area): New.
17389 * linux-low.c: Include <sys/syscall.h>.
17390 (linux_kill_one_process): Don't kill the first thread here.
17391 (linux_kill): Kill the first thread here.
17392 (kill_lwp): New function.
17393 (send_sigstop, linux_send_signal): Use it.
17394 * proc-service.c: Clean up #ifdefs.
17395 (fpregset_info): Delete.
17396 (ps_lgetregs): Update and enable implementation.
17397 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
17398 implementations.
17399 * remote-utils.c (struct sym_cache, symbol_cache): New.
17400 (input_interrupt): Print a clearer message.
17401 (async_io_enabled): New variable.
17402 (enable_async_io, disable_async_io): Use it. Update comments.
17403 (look_up_one_symbol): Use the symbol cache.
17404 * thread-db.c (thread_db_look_up_symbols): New function.
17405 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
17406
f6de3c42
DJ
174072004-10-16 Daniel Jacobowitz <dan@debian.org>
17408
17409 * configure.in: Test for -rdynamic.
17410 * configure: Regenerated.
17411 * Makefile (INTERNAL_LDFLAGS): New.
17412 (gdbserver, gdbreplay): Use it.
17413
2c0fc042
AC
174142004-09-02 Andrew Cagney <cagney@gnu.org>
17415
17416 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
17417
075b3282
DJ
174182004-03-23 Daniel Jacobowitz <drow@mvista.com>
17419
17420 * linux-low.c (linux_wait): Clear all_processes list also.
17421
fa6a77dc
DJ
174222004-03-12 Daniel Jacobowitz <drow@mvista.com>
17423
17424 * linux-low.c: Include <errno.h>. Remove extern declaration of
17425 errno.
17426
6d782a97
DJ
174272004-03-12 Daniel Jacobowitz <drow@mvista.com>
17428
17429 * gdbreplay.c, server.h, utils.c: Update copyright years.
17430
3a7fb99b
DJ
174312004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
17432
17433 * server.c (main): Print child status or termination signal from
17434 variable 'signal', not 'sig'.
17435
c3e735a6
DJ
174362004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
17437
17438 * linux-low.c (linux_read_memory): Change return type to
17439 int. Check for and return error from ptrace().
17440 * target.c (read_inferior_memory): Change return type to int. Pass
17441 back return status from the_target->read_memory().
17442 * target.h (struct target_ops): Adapt *read_memory() prototype.
17443 Update comment.
17444 (read_inferior_memory): Adapt prototype.
17445 * server.c (main): Return an error packet if
17446 read_inferior_memory() returns an error.
17447
a59d1c82
DJ
174482004-03-04 Daniel Jacobowitz <drow@mvista.com>
17449
17450 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
17451 Unify with other clean targets.
17452
dc3f8883
DJ
174532004-02-29 Daniel Jacobowitz <drow@mvista.com>
17454
17455 * server.c (handle_v_cont): Call set_desired_inferior.
17456
89a208da
DJ
174572004-02-29 Daniel Jacobowitz <drow@mvista.com>
17458
17459 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
17460
62ea82f5
DJ
174612004-02-29 Daniel Jacobowitz <drow@mvista.com>
17462
17463 * linux-low.c (linux_wait): Unblock async I/O.
17464 (linux_resume): Block and enable async I/O.
17465 * remote-utils.c (block_async_io, unblock_async_io): New functions.
17466 * server.h (block_async_io, unblock_async_io): Add prototypes.
17467
6910d122
DJ
174682004-02-29 Daniel Jacobowitz <drow@mvista.com>
17469
17470 * remote-utils.c (remote_open): Print a status notice after
17471 opening a TCP port.
17472 * server.c (attach_inferior): Print a status notice after
17473 attaching.
17474
174752004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
17476
17477 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
17478
c89dc5d4
DJ
174792004-02-26 Daniel Jacobowitz <drow@mvista.com>
17480
17481 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
17482 error packet.
17483 * server.c, target.h: Update copyright years.
17484
4b8dad4a
RM
174852004-02-25 Roland McGrath <roland@redhat.com>
17486
17487 * target.h (struct target_ops): New member `read_auxv'.
17488 * server.c (handle_query): Handle qPart:auxv:read: query using that.
17489 * linux-low.c (linux_read_auxv): New function.
17490 (linux_target_ops): Initialize `read_auxv' member to that.
17491
d7446758
JB
174922004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
17493
17494 Committed by Jim Blandy <jimb@redhat.com>.
17495
17496 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 17497 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
17498 instead of GPR_SIZE to distiguish s390 and s390x targets.
17499
5544ad89
DJ
175002004-01-31 Daniel Jacobowitz <drow@mvista.com>
17501
17502 * linux-low.c: Update copyright year.
17503 (check_removed_breakpoint): Clear pending_is_breakpoint.
17504 (linux_set_resume_request, linux_queue_one_thread)
17505 (resume_status_pending_p): New functions.
17506 (linux_continue_one_thread): Use process->resume.
17507 (linux_resume): Only resume threads if there are no pending events.
17508 * linux-low.h (struct process_info): Add resume request
17509 pointer.
17510
2a68b70e
DJ
175112004-01-30 Daniel Jacobowitz <drow@mvista.com>
17512
17513 * regcache.c (new_register_cache): Clear the allocated register
17514 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
17515
64386c31
DJ
175162003-10-13 Daniel Jacobowitz <drow@mvista.com>
17517
17518 * linux-low.c (linux_resume): Take a struct thread_resume *
17519 argument.
17520 (linux_wait): Update call.
17521 (resume_ptr): New static variable.
17522 (linux_continue_one_thread): Renamed from
17523 linux_continue_one_process. Use resume_ptr.
17524 (linux_resume): Use linux_continue_one_thread.
17525 * server.c (handle_v_cont, handle_v_requests): New functions.
17526 (myresume): New function.
17527 (main): Handle 'v' case.
17528 * target.h (struct thread_resume): New type.
17529 (struct target_ops): Change argument of "resume" to struct
17530 thread_resume *.
17531 (myresume): Delete macro.
17532
c938e9b0
L
175332003-08-08 H.J. Lu <hongjiu.lu@intel.com>
17534
17535 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
17536 (uninstall): Support DESTDIR.
17537
7f313d07
BC
17538Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
17539
17540 * configure.srv: Add xscale*linux copy of arm*linux entry.
17541
3b2fc2ea
DJ
175422003-07-24 Daniel Jacobowitz <drow@mvista.com>
17543
17544 * linux-arm-low.c (arm_reinsert_addr): New function.
17545 (the_low_target): Add arm_reinsert_addr.
17546
1c0a559e
MK
175472003-07-08 Mark Kettenis <kettenis@gnu.org>
17548
17549 * mem-break.c: Remove whitespace at end of file.
17550
43d5792c
DJ
175512003-06-28 Daniel Jacobowitz <drow@mvista.com>
17552
17553 * configure.in: Check whether we need to prototype strerror.
17554 * server.h: Optionally prototype strerror.
17555 * gdbreplay.c (perror_with_name): Use strerror.
17556 * linux-low.c (linux_attach_lwp): Use strerror.
17557 * utils.c (perror_with_name): Use strerror.
17558 * config.in, configure: Regenerated.
17559
c8a86edf
DJ
175602003-06-28 Daniel Jacobowitz <drow@mvista.com>
17561
17562 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
17563 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
17564
73d37363
DJ
175652003-06-20 Daniel Jacobowitz <drow@mvista.com>
17566
17567 * Makefile.in (SFILES): Update.
17568 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
17569 low-sun3.c: Remove files.
17570
6ad8ae5c
DJ
175712003-06-17 Daniel Jacobowitz <drow@mvista.com>
17572
17573 * linux-low.c: Move comment to linux_thread_alive where it belonged.
17574 (linux_detach_one_process, linux_detach): New functions.
17575 (linux_target_ops): Add linux_detach.
17576 * server.c (main): Handle 'D' packet.
17577 * target.h (struct target_ops): Add "detach" member.
17578 (detach_inferior): Define.
17579
1581182a
MK
175802003-06-13 Mark Kettenis <kettenis@gnu.org>
17581
17582 From Kelley Cook <kelleycook@wideopenwest.com>:
17583 * configure.srv: Accept i[34567]86 variants.
17584
e5379b03
DJ
175852003-06-05 Daniel Jacobowitz <drow@mvista.com>
17586
17587 * linux-low.c (linux_wait_for_event): Correct comment typos.
17588 (linux_resume_one_process): Call check_removed_breakpoint.
17589 (linux_send_signal): New function.
17590 (linux_target_ops): Add linux_send_signal.
17591 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
17592 of kill.
17593 * target.h (struct target_ops): Add send_signal.
17594
2ff29de4
JB
175952003-05-29 Jim Blandy <jimb@redhat.com>
17596
17597 * linux-low.c (usr_store_inferior_registers): Transfer buf in
17598 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
17599 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
17600 away part of the register's value.
17601
254787d4
DJ
176022003-03-26 Daniel Jacobowitz <drow@mvista.com>
17603
17604 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
17605 (linux_wait_for_event, linux_init_signals): Likewise.
17606
94e10508
DJ
176072003-03-17 Daniel Jacobowitz <drow@mvista.com>
17608
17609 * configure.in: Check for stdlib.h.
17610 * configure: Regenerated.
17611 * config.in: Regenerated.
17612
4c0711e0
DJ
176132003-01-04 Andreas Schwab <schwab@suse.de>
17614
17615 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
17616
ef66e766
AC
176172003-01-02 Andrew Cagney <ac131313@redhat.com>
17618
17619 * Makefile.in: Remove obsolete code.
17620
a1358604
DJ
176212002-11-20 Daniel Jacobowitz <drow@mvista.com>
17622
17623 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
17624 defined(PT_FPR0_HI).
17625
23ce3b1c
DJ
176262002-11-17 Stuart Hughes <seh@zee2.com>
17627
17628 * linux-arm-low.c (arm_num_regs): Increase.
17629 (arm_regmap): Include status register.
17630
176312002-11-17 Daniel Jacobowitz <drow@mvista.com>
17632
17633 * linux-low.c (register_addr): Remove incorrect -1 check.
17634
a9fa9f7d
DJ
176352002-08-29 Daniel Jacobowitz <drow@mvista.com>
17636
17637 * linux-low.c (linux_create_inferior): Call setpgid. Return
17638 the new PID.
17639 (unstopped_p, linux_signal_pid): Remove.
17640 (linux_target_ops): Remove linux_signal_pid.
17641 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
17642 global instead of target method.
17643 * target.h (struct target_ops): Remove signal_pid. Update comment
17644 for create_inferior.
17645 * server.c (signal_pid): New variable.
17646 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 17647 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
17648 (attach_inferior): Set signal_pid.
17649
17574093
DJ
176502002-08-23 Daniel Jacobowitz <drow@mvista.com>
17651
17652 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
17653
176542002-08-20 Jim Blandy <jimb@redhat.com>
17655
17656 * Makefile.in (LDFLAGS): Allow the configure script to establish a
17657 default for this.
17658
176592002-08-01 Andrew Cagney <cagney@redhat.com>
17660
17661 * Makefile.in: Make chill references obsolete.
17662
176632002-07-24 Kevin Buettner <kevinb@redhat.com>
17664
17665 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
17666 * configure: Regenerate.
17667 * config.in: Regenerate.
17668
176692002-07-09 David O'Brien <obrien@FreeBSD.org>
17670
17671 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
17672 (perror_with_name, remote_close, remote_open, expect, play): Static.
17673
176742002-07-04 Michal Ludvig <mludvig@suse.cz>
17675
4b8dad4a 17676 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
17677 byte offsets instead of an array of indexes.
17678 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
17679
176802002-06-13 Daniel Jacobowitz <drow@mvista.com>
17681
17682 * regcache.c: Add comment.
17683
176842002-06-11 Daniel Jacobowitz <drow@mvista.com>
17685
17686 * thread-db.c: New file.
17687 * proc-service.c: New file.
17688 * acinclude.m4: New file.
17689 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
17690 proc-service.o, and thread-db.o.
17691 (linux-low.o): Add USE_THREAD_DB.
17692 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
17693 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
17694 * aclocal.m4: Regenerated.
17695 * config.in: Regenerated.
17696 * configure: Regenerated.
17697 * configure.in: Check for proc_service.h, sys/procfs.h,
17698 thread_db.h, and linux/elf.h headrs.
17699 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
17700 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
17701 Check for -lthread_db and thread support.
17702 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
17703 PowerPC, and SuperH.
17704 * i387-fp.c: Constify arguments.
17705 * i387-fp.h: Likewise.
17706 * inferiors.c: (struct thread_info): Renamed from
17707 `struct inferior_info'. Remove PID member. Use generic inferior
17708 list header. All uses updated.
17709 (inferiors, signal_pid): Removed.
17710 (all_threads): New variable.
17711 (get_thread): Define.
17712 (add_inferior_to_list): New function.
17713 (for_each_inferior): New function.
17714 (change_inferior_id): New function.
17715 (add_inferior): Removed.
17716 (remove_inferior): New function.
17717 (add_thread): New function.
17718 (free_one_thread): New function.
17719 (remove_thread): New function.
17720 (clear_inferiors): Use for_each_inferior and free_one_thread.
17721 (find_inferior): New function.
17722 (find_inferior_id): New function.
17723 (inferior_target_data): Update argument type.
17724 (set_inferior_target_data): Likewise.
17725 (inferior_regcache_data): Likewise.
17726 (set_inferior_regcache_data): Likewise.
17727 * linux-low.c (linux_bp_reinsert): Remove.
17728 (all_processes, stopping_threads, using_thrads)
17729 (struct pending_signals, debug_threads, pid_of): New.
17730 (inferior_pid): Replace with macro.
17731 (struct inferior_linux_data): Remove.
17732 (get_stop_pc, add_process): New functions.
17733 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
17734 Use add_process and add_thread.
17735 (linux_attach_lwp): New function, based on old linux_attach. Use
17736 add_process and add_thread. Set stop_expected for new threads.
17737 (linux_attach): New function.
17738 (linux_kill_one_process): New function.
17739 (linux_kill): Kill all LWPs.
17740 (linux_thread_alive): Use find_inferior_id.
17741 (check_removed_breakpoints, status_pending_p): New functions.
17742 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
17743 Update. Use WNOHANG. Wait for cloned processes also. Update process
17744 struct for the found process.
17745 (linux_wait_for_event): New function.
17746 (linux_wait): Use it. Support LWPs.
17747 (send_sigstop, wait_for_sigstop, stop_all_processes)
17748 (linux_resume_one_process, linux_continue_one_process): New functions.
17749 (linux_resume): Support LWPs.
17750 (REGISTER_RAW_SIZE): Remove.
17751 (fetch_register): Use register_size instead. Call supply_register.
17752 (usr_store_inferior_registers): Likewise. Call collect_register.
17753 Fix recursive case.
17754 (regsets_fetch_inferior_registers): Improve error message.
17755 (regsets_store_inferior_registers): Add debugging.
17756 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
17757 (unstopped_p, linux_signal_pid): New functions.
17758 (linux_target_ops): Add linux_signal_pid.
17759 (linux_init_signals): New function.
17760 (initialize_low): Call it. Initialize using_threads.
17761 * regcache.c (inferior_regcache_data): Add valid
17762 flag.
17763 (get_regcache): Fetch registers lazily. Add fetch argument
17764 and update all callers.
17765 (regcache_invalidate_one, regcache_invalidate): New
17766 functions.
17767 (new_register_cache): Renamed from create_register_cache.
17768 Return the new regcache.
17769 (free_register_cache): Change argument to a void *.
17770 (registers_to_string, registers_from_string): Call get_regcache
17771 with fetch flag set.
17772 (register_data): Make static. Pass fetch flag to get_regcache.
17773 (supply_register): Call get_regcache with fetch flag clear.
17774 (collect_register): Call get_regcache with fetch flag set.
17775 (collect_register_as_string): New function.
17776 * regcache.h: Update.
17777 * remote-utils.c (putpkt): Flush after debug output and use
17778 stderr.
17779 Handle input interrupts while waiting for an ACK.
17780 (input_interrupt): Use signal_pid method.
17781 (getpkt): Flush after debug output and use stderr.
17782 (outreg): Use collect_register_as_string.
17783 (new_thread_notify, dead_thread_notify): New functions.
17784 (prepare_resume_reply): Check using_threads. Set thread_from_wait
17785 and general_thread.
17786 (look_up_one_symbol): Flush after debug output.
17787 * server.c (step_thread, server_waiting): New variables.
17788 (start_inferior): Don't use signal_pid. Update call to mywait.
17789 (attach_inferior): Update call to mywait.
17790 (handle_query): Handle qfThreadInfo and qsThreadInfo.
17791 (main): Don't fetch/store registers explicitly. Use
17792 set_desired_inferior. Support proposed ``Hs'' packet. Update
17793 calls to mywait.
17794 * server.h: Update.
17795 (struct inferior_list, struct_inferior_list_entry): New.
17796 * target.c (set_desired_inferior): New.
17797 (write_inferior_memory): Constify.
17798 (mywait): New function.
17799 * target.h: Update.
17800 (struct target_ops): New signal_pid method.
17801 (mywait): Removed macro, added prototype.
17802
17803 * linux-low.h (regset_func): Removed.
17804 (regset_fill_func, regset_store_func): New.
17805 (enum regset_type): New.
17806 (struct regset_info): Add type field. Use new operation types.
17807 (struct linux_target_ops): stop_pc renamed to get_pc.
17808 Add decr_pc_after_break and breakpoint_at.
17809 (get_process, get_thread_proess, get_process_thread)
17810 (strut process_info, all_processes, linux_attach_lwp)
17811 (thread_db_init): New.
17812
17813 * linux-arm-low.c (arm_get_pc, arm_set_pc,
17814 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
17815 (the_low_target): Add new members.
17816 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
17817 (i386_store_fpxregset): Constify.
17818 (target_regsets): Add new kind identifier.
17819 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
17820 (i386_set_pc): Add debugging.
17821 (i386_breakpoint_at): New function.
17822 (the_low_target): Add new members.
17823 * linux-mips-low.c (mips_get_pc, mips_set_pc)
17824 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
17825 (mips_breakpoint_at): New.
17826 (the_low_target): Add new members.
17827 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
17828 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
17829 (the_low_target): Add new members.
17830 * linux-sh-low.c (sh_get_pc, sh_set_pc)
17831 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
17832 (the_low_target): Add new members.
17833 * linux-x86-64-low.c (target_regsets): Add new kind
17834 identifier.
17835
178362002-05-15 Daniel Jacobowitz <drow@mvista.com>
17837
17838 From Martin Pool <mbp@samba.org>:
17839 * server.c (gdbserver_usage): New function.
17840 (main): Call it.
17841
178422002-05-14 Daniel Jacobowitz <drow@mvista.com>
17843
17844 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
17845 stop_at -> stop_pc.
17846
178472002-05-04 Andrew Cagney <ac131313@redhat.com>
17848
17849 * Makefile.in: Remove obsolete code.
17850
178512002-04-24 Michal Ludvig <mludvig@suse.cz>
17852
17853 * linux-low.c (regsets_fetch_inferior_registers),
17854 (regsets_store_inferior_registers): Removed cast to int from
17855 ptrace() calls.
17856 * regcache.h: Added declaration of struct inferior_info.
17857
178582002-04-20 Daniel Jacobowitz <drow@mvista.com>
17859
17860 * inferiors.c (struct inferior_info): Add regcache_data.
17861 (add_inferior): Call create_register_cache.
17862 (clear_inferiors): Call free_register_cache.
17863 (inferior_regcache_data, set_inferior_regcache_data): New functions.
17864 * regcache.c (struct inferior_regcache_data): New.
17865 (registers): Remove.
17866 (get_regcache): New function.
17867 (create_register_cache, free_register_cache): New functions.
17868 (set_register_cache): Don't initialize the register cache here.
17869 (registers_to_string, registers_from_string, register_data): Call
17870 get_regcache.
17871 * regcache.h: Add prototypes.
17872 * server.h: Likewise.
17873
178742002-04-20 Daniel Jacobowitz <drow@mvista.com>
17875
17876 * mem-break.c: New file.
17877 * mem-break.h: New file.
17878 * Makefile.in: Add mem-break.o rule; update server.h
17879 dependencies.
17880 * inferiors.c (struct inferior_info): Add target_data
17881 member.
17882 (clear_inferiors): Free target_data member if set.
17883 (inferior_target_data, set_inferior_target_data): New functions.
17884 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
17885 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
17886 * linux-low.c (linux_bp_reinsert): New variable.
17887 (struct inferior_linux_data): New.
17888 (linux_create_inferior): Use set_inferior_target_data.
17889 (linux_attach): Likewise. Call add_inferior.
17890 (linux_wait_for_one_inferior): New function.
17891 (linux_wait): Call it.
17892 (linux_write_memory): Add const.
17893 (initialize_low): Call set_breakpoint_data.
17894 * linux-low.h (struct linux_target_ops): Add breakpoint
17895 handling members.
17896 * server.c (attach_inferior): Remove extra add_inferior
17897 call.
17898 * server.h: Include mem-break.h. Update inferior.c
17899 prototypes.
17900 * target.c (read_inferior_memory)
17901 (write_inferior_memory): New functions.
17902 * target.h (read_inferior_memory)
17903 (write_inferior_memory): Change macros to prototypes.
17904 (struct target_ops): Update comments. Add const to write_memory
17905 definition.
17906
179072002-04-11 Daniel Jacobowitz <drow@mvista.com>
17908
17909 * linux-low.c (usr_store_inferior_registers): Support
17910 registers which are allowed to fail to store.
17911 * linux-low.h (linux_target_ops): Likewise.
17912 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
17913 (ppc_cannot_store_register): FPSCR may not be storable.
17914
179152002-04-09 Daniel Jacobowitz <drow@mvista.com>
17916
17917 * server.h: Include <string.h> if HAVE_STRING_H.
17918 * ChangeLog: Correct paths in last ChangeLog entry.
17919
179202002-04-09 Daniel Jacobowitz <drow@mvista.com>
17921
17922 * linux-low.h: Remove obsolete prototypes.
17923 (struct linux_target_ops): New.
17924 (extern the_low_target): New.
17925 * linux-low.c (num_regs, regmap): Remove declarations.
17926 (register_addr): Use the_low_target explicitly.
17927 (fetch_register): Likewise.
17928 (usr_fetch_inferior_registers): Likewise.
17929 (usr_store_inferior_registers): Likewise.
17930 * linux-arm-low.c (num_regs): Remove.
17931 (arm_num_regs): Define.
17932 (arm_regmap): Renamed from regmap, made static.
17933 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
17934 made static.
17935 (arm_cannot_store_register): Renamed from cannot_store_register,
17936 made static.
17937 (the_low_target): New.
17938 * linux-i386-low.c (num_regs): Remove.
17939 (i386_num_regs): Define.
17940 (i386_regmap): Renamed from regmap, made static.
17941 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
17942 made static.
17943 (i386_cannot_store_register): Renamed from cannot_store_register,
17944 made static.
17945 (the_low_target): New.
17946 * linux-ia64-low.c (num_regs): Remove.
17947 (ia64_num_regs): Define.
17948 (ia64_regmap): Renamed from regmap, made static.
17949 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
17950 made static.
17951 (ia64_cannot_store_register): Renamed from cannot_store_register,
17952 made static.
17953 (the_low_target): New.
17954 * linux-m68k-low.c (num_regs): Remove.
17955 (m68k_num_regs): Define.
17956 (m68k_regmap): Renamed from regmap, made static.
17957 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
17958 made static.
17959 (m68k_cannot_store_register): Renamed from cannot_store_register,
17960 made static.
17961 (the_low_target): New.
17962 * linux-mips-low.c (num_regs): Remove.
17963 (mips_num_regs): Define.
17964 (mips_regmap): Renamed from regmap, made static.
17965 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
17966 made static.
17967 (mips_cannot_store_register): Renamed from cannot_store_register,
17968 made static.
17969 (the_low_target): New.
17970 * linux-ppc-low.c (num_regs): Remove.
17971 (ppc_num_regs): Define.
17972 (ppc_regmap): Renamed from regmap, made static.
17973 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
17974 made static.
17975 (ppc_cannot_store_register): Renamed from cannot_store_register,
17976 made static.
17977 (the_low_target): New.
17978 * linux-s390-low.c (num_regs): Remove.
17979 (s390_num_regs): Define.
17980 (s390_regmap): Renamed from regmap, made static.
17981 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
17982 made static.
17983 (s390_cannot_store_register): Renamed from cannot_store_register,
17984 made static.
17985 (the_low_target): New.
17986 * linux-sh-low.c (num_regs): Remove.
17987 (sh_num_regs): Define.
17988 (sh_regmap): Renamed from regmap, made static.
17989 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
17990 made static.
17991 (sh_cannot_store_register): Renamed from cannot_store_register,
17992 made static.
17993 (the_low_target): New.
17994 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
17995 (the_low_target): New.
17996
179972002-04-09 Daniel Jacobowitz <drow@mvista.com>
17998
17999 * Makefile.in: Add stamp-h target.
18000 * configure.in: Create stamp-h.
18001 * configure: Regenerated.
18002
180032002-04-09 Daniel Jacobowitz <drow@mvista.com>
18004
18005 * inferiors.c: New file.
18006 * target.c: New file.
18007 * target.h: New file.
18008 * Makefile.in: Add target.o and inferiors.o. Update
18009 dependencies.
18010 * linux-low.c (inferior_pid): New static variable,
18011 moved from server.c.
18012 (linux_create_inferior): Renamed from create_inferior.
18013 Call add_inferior. Return 0 on success instead of a PID.
18014 (linux_attach): Renamed from myattach.
18015 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
18016 (linux_thread_alive): Renamed from mythread_alive.
18017 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
18018 child dies.
18019 (linux_resume): Renamed from myresume. Add missing ``return 0''.
18020 (regsets_store_inferior_registers): Correct error message.
18021 Add missing ``return 0''.
18022 (linux_fetch_registers): Renamed from fetch_inferior_registers.
18023 (linux_store_registers): Renamed from store_inferior_registers.
18024 (linux_read_memory): Renamed from read_inferior_memory.
18025 (linux_write_memory): Renamed from write_inferior_memory.
18026 (linux_target_ops): New structure.
18027 (initialize_low): Call set_target_ops ().
18028 * remote-utils.c (unhexify): New function.
18029 (hexify): New function.
18030 (input_interrupt): Send signals to ``signal_pid''.
18031 * server.c (inferior_pid): Remove.
18032 (start_inferior): Update create_inferior call.
18033 (attach_inferior): Call add_inferior.
18034 (handle_query): New function.
18035 (main): Call handle_query for `q' packets.
18036 * server.h: Include "target.h". Remove obsolete prototypes.
18037 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
18038
180392002-04-09 Daniel Jacobowitz <drow@mvista.com>
18040
18041 * Makefile.in: Add WARN_CFLAGS. Update configury
18042 dependencies.
18043 * configure.in: Check for <string.h>
18044 * configure: Regenerate.
18045 * config.in: Regenerate.
18046 * gdbreplay.c: Include needed system headers.
18047 (remote_open): Remove strchr prototype.
18048 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
18049 * regcache.c (supply_register): Change buf argument to const void *.
18050 (supply_register_by_name): Likewise.
18051 (collect_register): Change buf argument to void *.
18052 (collect_register_by_name): Likewise.
18053 * regcache.h: Add missing prototypes.
18054 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
18055 * server.c (handle_query): New function.
18056 (attached): New static variable, moved out of main.
18057 (main): Quiet longjmp clobber warnings.
18058 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
18059 * utils.c (error): Remove NORETURN.
18060 (fatal): Likewise.