]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdbserver/ChangeLog
Various fixes for the Z80 support.
[thirdparty/binutils-gdb.git] / gdbserver / ChangeLog
CommitLineData
bf84f706
MR
12020-02-19 Maciej W. Rozycki <macro@wdc.com>
2 Andrew Burgess <andrew.burgess@embecosm.com>
3
4 * linux-riscv-low.cc: New file.
5 * Makefile.in (SFILES): Add linux-riscv-low.cc, arch/riscv.c,
6 and nat/riscv-linux-tdesc.c.
7 * configure.srv <riscv*-*-linux*> (srv_tgtobj)
8 (srv_linux_regsets, srv_linux_usrregs, srv_linux_thread_db):
9 Define.
10
1a627e7e
TT
112020-02-14 Tom Tromey <tom@tromey.com>
12
13 * acinclude.m4: Don't include acx_configure_dir.m4.
14 * Makefile.in (LIBIBERTY_BUILDDIR, GNULIB_BUILDDIR): Update.
15 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): Remove.
16 (all, install-only, uninstall, clean-info, clean)
17 (maintainer-clean): Don't recurse.
18 (subdir_do, all-lib): Remove.
19 ($(LIBGNU) $(LIBIBERTY) $(GNULIB_H)): Remove rule.
20 (GNULIB_H): Remove.
21 (generated_files): Update.
22 ($(GNULIB_BUILDDIR)/Makefile): Remove rule.
23 * configure: Rebuild.
24 * configure.ac: Don't configure gnulib or libiberty.
25 (GNULIB): Update.
26
a9b34532
EZ
272020-02-14 Eli Zaretskii <eliz@gnu.org>
28
29 * win32-low.c (create_process): Prepend PROGRAM to ARGS when
30 preparing the command line for CreateProcess.
31 (win32_create_inferior): Reflect the program name in debugging
32 output that shows the process and its command line.
33
feacfcac
SM
342020-02-13 Simon Marchi <simon.marchi@efficios.com>
35
36 * Makefile.in: Rename source files from .c to .cc.
37 * %.c: Rename to %.cc.
38 * configure.ac: Rename server.c to server.cc.
39 * configure: Re-generate.
40
06b3c5bd
SM
412020-02-13 Simon Marchi <simon.marchi@efficios.com>
42
43 * Makefile.in: Rename gdbsupport source files from .c to .cc.
44
052793ad
HD
452020-02-12 Hannes Domani <ssbssa@yahoo.de>
46
47 * win32-low.c (win32_create_inferior): Set signal_pid.
48
f20e3e82
MR
492020-02-12 Maciej W. Rozycki <macro@wdc.com>
50 Pedro Alves <palves@redhat.com>
51
52 Skip building gdbserver in a cross-configuration.
53 * configure.srv: Set $gdbserver_host depending on whether $target
54 is $host. Use $gdbserver_host instead of $host.
55
8ddd8e0e
SM
562020-02-11 Simon Marchi <simon.marchi@efficios.com>
57
58 * configure: Re-generate.
59
898e7f60
SM
602020-02-11 Simon Marchi <simon.marchi@efficios.com>
61
62 * configure: Re-generate.
63
58df732b
SM
642020-02-11 Simon Marchi <simon.marchi@efficios.com>
65
66 * acinclude.m4: Update warning.m4 path.
67
7928d571
HD
682020-02-09 Hannes Domani <ssbssa@yahoo.de>
69
70 * win32-low.c (win32_clear_inferiors): Reset siginfo_er.
71 (handle_exception): Set siginfo_er.
72 (win32_xfer_siginfo): New function.
73
919adfe8
TT
742020-02-07 Tom Tromey <tom@tromey.com>
75 Pedro Alves <palves@redhat.com>
76
77 * README: Update build documentation.
78 * configure.srv: Set UNSUPPORTED if host is unsupported. Check
79 host, not target.
80 * configure.ac: Update paths.
81 * configure: Rebuild.
82 * acinclude.m4: Update paths.
83 * Makefile.in: Update include paths.
84 (depcomp, INCLUDE_DIR, INCGNU, INCSUPPORT, INCLUDE_CFLAGS)
85 (SFILES, XML_DIR, n, $(GNULIB_BUILDDIR)/Makefile, config.status)
86 (version-generated.c, stamp-xml, regdat_sh, arch/%-ipa.o)
87 (gdbsupport/%-ipa.o, %-ipa.o, arch/%.o, gdbsupport/%.o, %.o)
88 (%-generated.c): Update paths.
89 * Move entire directory from ../gdb/gdbserver.
90
287c844a
MR
912020-01-29 Maciej W. Rozycki <macro@wdc.com>
92
93 * configure.srv <i[34567]86-*-mingw*>: Fix whitespace damage.
94
548a204f
PFC
952020-01-29 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
96
97 * configure.srv (powerpc*-*-linux*): Use srv_tgtobj in second
98 assignment instead of srv_linux_obj.
99
a2236a08
HD
1002020-01-28 Hannes Domani <ssbssa@yahoo.de>
101
102 * server.c (handle_qxfer_libraries): Write segment-address with
103 paddress.
104
bdaed379
HD
1052020-01-24 Hannes Domani <ssbssa@yahoo.de>
106
107 * Makefile.in (install-strip): New target.
108 (install_sh, INSTALL_STRIP_PROGRAM, STRIP): New variables.
109 * aclocal.m4: Regenerate.
110 * configure: Regenerate.
111 * configure.ac: Add AM_PROG_INSTALL_STRIP.
112
42cd72aa
MR
1132020-01-24 Maciej W. Rozycki <macro@wdc.com>
114
115 * Makefile.in (SFILES): Adjust paths to point to real files.
116 (OBS): Move waitstatus.o to target/waitstatus.o.
117 (TAGS): Transform paths appropriately.
118 (%.o): Rename to...
119 (nat/%.o): ... this pattern rule.
120 (%.o): Rename to...
121 (target/%.o): ... this pattern rule.
122 * configure.srv: Adjust paths throughout to include nat/ prefix
123 with the revant files.
124 * configure.ac: Add `nat' and `target' to CONFIG_SRC_SUBDIR.
125 * configure: Regenerate.
126
42ba50ec
MR
1272020-01-24 Maciej W. Rozycki <macro@wdc.com>
128
129 * Makefile.in (TAGS): Remove config files from the recipe.
130
05ea2a05
TT
1312020-01-14 Tom Tromey <tom@tromey.com>
132
133 * configure: Rebuild.
134 * configure.ac: Remove any checks that were added to common.m4.
135 * acinclude.m4: Include lib-ld.m4, lib-prefix.m4, and
136 lib-link.m4.
137
01027315
TT
1382020-01-14 Tom Tromey <tom@tromey.com>
139
140 * server.h: Include config.h.
141 * gdbreplay.c: Include config.h.
142 * configure: Rebuild.
143 * configure.ac: Don't source common.host.
144 * acinclude.m4: Update path.
145 * Makefile.in (INCSUPPORT): New variable.
146 (INCLUDE_CFLAGS): Add INCSUPPORT.
147 (SFILES): Update paths.
148 (version-generated.c): Update path to create-version.sh.
149 (gdbsupport/%-ipa.o, gdbsupport/%.o): Update paths.
150
b2ceabe8
TT
1512020-01-14 Tom Tromey <tom@tromey.com>
152
153 * configure.ac (LIBS): Use WIN32APILIBS.
154 (USE_WIN32API): Don't define.
155 * configure: Rebuild.
156
25c51f71
TT
1572020-01-14 Tom Tromey <tom@tromey.com>
158
159 * configure: Rebuild.
160
c0bd321d
SM
1612020-01-13 Simon Marchi <simon.marchi@efficios.com>
162
163 * Makefile.in (%-generated.c): Remove rule for files from
164 regformats/i386.
165
bb564c58
SM
1662020-01-13 Simon Marchi <simon.marchi@efficios.com>
167
168 * configure: Re-generate.
169
6e37c371
SM
1702020-01-13 Simon Marchi <simon.marchi@efficios.com>
171
172 * tracepoint.h (IP_AGENT_EXPORT_FUNC) [!IN_PROCESS_AGENT]:
173 Define to static.
174 * tracepoint.c (stop_tracing, flush_trace_buffer,
175 about_to_request_buffer_space, get_trace_state_variable_value,
176 set_trace_state_variable_value, gdb_collect): Add declaration.
177
df4a0200
SM
1782020-01-13 Simon Marchi <simon.marchi@efficios.com>
179
180 * linux-x86-low.c (x86_linux_regs_info, amd64_emit_eq_goto,
181 amd64_emit_ne_goto, amd64_emit_lt_goto, amd64_emit_le_goto,
182 amd64_emit_gt_goto, amd64_emit_ge_goto, amd64_emit_ge_goto,
183 i386_emit_eq_goto, i386_emit_ne_goto, i386_emit_lt_goto,
184 i386_emit_le_goto, i386_emit_gt_goto, i386_emit_ge_goto): Make
185 static.
186
89e94ec9
SM
1872020-01-13 Simon Marchi <simon.marchi@efficios.com>
188
189 * inferiors.c: Include gdbsupport/common-inferior.h.
190
2552728a
SM
1912020-01-13 Simon Marchi <simon.marchi@efficios.com>
192
193 * hostio-errno.c: Include hostio.h.
194
4025fa09
SM
1952020-01-13 Simon Marchi <simon.marchi@efficios.com>
196
197 * Makefile.in (%-generated.c): Make $(regdat_sh) a regular
198 prerequisite.
199
c0b0a142
SM
2002020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
201
202 * linux-arm-tdesc.c: Include linux-arm-tdesc.h.
203 * linux-arm-tdesc.h: Include arch/arm.h.
204
bb1183e2
SM
2052020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
206
207 * linux-aarch64-low.c (aarch64_write_goto_address): Make static.
208
f5df0b5f
SM
2092020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
210
211 * linux-aarch32-tdesc.c: Include linux-aarch32-tdesc.h.
212 * linux-aarch64-tdesc.c: Include linux-aarch64-tdesc.h.
213
5b6d1e4f
PA
2142020-01-10 Pedro Alves <palves@redhat.com>
215
216 * fork-child.c (post_fork_inferior): Pass target down to
217 startup_inferior.
218 * inferiors.c (switch_to_thread): Add process_stratum_target
219 parameter.
220 * lynx-low.c (lynx_target_ops): Now a process_stratum_target.
221 * nto-low.c (nto_target_ops): Now a process_stratum_target.
222 * linux-low.c (linux_target_ops): Now a process_stratum_target.
223 * remote-utils.c (prepare_resume_reply): Pass the target to
224 switch_to_thread.
225 * target.c (the_target): Now a process_stratum_target.
226 (done_accessing_memory): Pass the target to switch_to_thread.
227 (set_target_ops): Ajust to use process_stratum_target.
228 * target.h (struct target_ops): Rename to ...
229 (struct process_stratum_target): ... this.
230 (the_target, set_target_ops): Adjust.
231 (prepare_to_access_memory): Adjust comment.
232 * win32-low.c (child_xfer_memory): Adjust to use
233 process_stratum_target.
234 (win32_target_ops): Now a process_stratum_target.
235
559e7e50
EZ
2362020-01-06 Eli Zaretskii <eliz@gnu.org>
237 Pedro Alves <palves@redhat.com>
238
239 * win32-low.c (get_child_debug_event): Extract the fatal exception
240 from the exit status and convert to the equivalent Posix signal
241 number.
242 (win32_wait): Allow TARGET_WAITKIND_SIGNALLED status as well.
243 * Makefile.in (OBS, SFILES): Add gdb_wait.[co].
244
48189bec
HD
2452020-01-01 Hannes Domani <ssbssa@yahoo.de>
246
247 * Makefile.in: Use INSTALL_PROGRAM_ENV.
248
5dd8bf88
JB
2492020-01-01 Joel Brobecker <brobecker@adacore.com>
250
251 * server.c (gdbserver_version): Change copyright year to 2020.
252 * gdbreplay.c (gdbreplay_version): Likewise.
253
0ad6b8ee
CB
2542019-12-19 Christian Biesinger <cbiesinger@google.com>
255
256 * configure: Regenerate.
257 * configure.ac: Quote variable arguments of test.
258
1ee7b812
BE
2592019-12-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
260
261 * Makefile.in: Fix build with GNU Make 3.81
262
d9fa87f4
TT
2632019-12-16 Tom Tromey <tromey@adacore.com>
264
265 * server.c (get_exec_file): Constify result.
266
ab7d13f0
CB
2672019-12-10 Christian Biesinger <cbiesinger@google.com>
268
269 * Makefile.in: Add safe-strerror.c to gdbreplay and IPA, and change
270 UNDO_GNULIB_CFLAGS to undo strerror_r instead of strerror.
271 * config.in: Regenerate.
272 * configure: Regenerate.
273 * configure.ac: Don't check for strerror.
274 * linux-i386-ipa.c (initialize_fast_tracepoint_trampoline_buffer):
275 Call safe_strerror instead of strerror.
276 * server.h (strerror): Remove this now-unnecessary declaration.
277 * tracepoint.c (init_named_socket): Call safe_strerror instead of
278 strerror.
279 (gdb_agent_helper_thread): Likewise.
280 * utils.c (perror_with_name): Likewise.
281
4da8c3a8
TT
2822019-11-26 Tom Tromey <tom@tromey.com>
283
284 * configure, config.in: Rebuild.
285
21987b9c
TT
2862019-11-26 Tom Tromey <tom@tromey.com>
287
288 * remote-utils.c (block_unblock_async_io): Use gdb_sigmask.
289 * linux-low.c (linux_wait_for_event_filtered, linux_async): Use
290 gdb_sigmask.
291 * configure, config.in: Rebuild.
292
5e030278
TT
2932019-11-26 Tom Tromey <tom@tromey.com>
294
295 * Makefile.in (PTHREAD_CFLAGS, PTHREAD_LIBS): New variables.
296 (INTERNAL_CFLAGS_BASE): Use PTHREAD_CFLAGS.
297 (GDBSERVER_LIBS): Use PTHREAD_LIBS.
298 * acinclude.m4: Include ax_pthread.m4.
299 * config.in, configure: Rebuild.
300
6d91ce9a
CB
3012019-11-26 Christian Biesinger <cbiesinger@google.com>
302
303 * debug.c (debug_set_output): Call safe_strerror instead of
304 strerror.
305 * linux-low.c (attach_proc_task_lwp_callback): Likewise.
306 (linux_kill_one_lwp): Likewise.
307 (linux_detach_one_lwp): Likewise.
308 (linux_wait_for_event_filtered): Likewise.
309 (store_register): Likewise.
310 * lynx-low.c (lynx_attach): Likewise.
311 * mem-break.c (insert_memory_breakpoint): Likewise.
312 (remove_memory_breakpoint): Likewise.
313 (delete_fast_tracepoint_jump): Likewise.
314 (set_fast_tracepoint_jump): Likewise.
315 (uninsert_fast_tracepoint_jumps_at): Likewise.
316 (reinsert_fast_tracepoint_jumps_at): Likewise.
317 * nto-low.c (nto_xfer_memory): Likewise.
318 (nto_resume): Likewise.
319
6cdd651f
LM
3202019-11-20 Luis Machado <luis.machado@linaro.org>
321
322 * linux-aarch64-low.c (is_sve_tdesc): Check against target feature
323 instead of register count.
324 * tdesc.c (tdesc_contains_feature): New function.
325 * tdesc.h (tdesc_contains_feature): New prototype.
326
cd850b40
CB
3272019-11-15 Christian Biesinger <cbiesinger@google.com>
328
329 * Makefile.in: Add safe-strerror.c.
330 * configure: Regenerate.
331 * configure.ac: Don't source common.host.
332
5abebf3c
CB
3332019-11-15 Christian Biesinger <cbiesinger@google.com>
334
335 * config.in: Regenerate.
336 * configure: Regenerate.
337
e06f3d6e
AB
3382019-11-12 Andrew Burgess <andrew.burgess@embecosm.com>
339
340 * ax.c (ax_printf): Handle size_t_arg.
341
ca3a04f6
CB
3422019-11-06 Christian Biesinger <cbiesinger@google.com>
343
344 * linux-tdep.c (linux_info_proc): Use strtok_r instead of strtok.
345 * mi/mi-main.c (output_cores): Likewise.
346 * nat/linux-osdata.c (linux_xfer_osdata_cpus): Likewise.
347 (linux_xfer_osdata_modules): Likewise.
348 * remote.c (register_remote_support_xml): Likewise.
349 * sparc64-tdep.c (adi_is_addr_mapped): Likewise.
350 * xml-syscall.c (syscall_create_syscall_desc): Likewise.
351
e48f6033
CB
3522019-11-01 Christian Biesinger <cbiesinger@google.com>
353
354 * configure: Regenerate.
355 * configure.ac: Remove check for strerror_r.
356
e7e97a2e
CB
3572019-10-31 Christian Biesinger <cbiesinger@google.com>
358
359 * config.in: Regenerate.
360 * configure: Regenerate.
361 * configure.ac: Also check for strerror_r.
362
75cafaa6
CB
3632019-10-31 Christian Biesinger <cbiesinger@google.com>
364
365 * ax.h (debug_agent): Remove duplicate declaration.
366
30baf67b
TV
3672019-10-26 Tom de Vries <tdevries@suse.de>
368
369 * linux-aarch64-low.c: Fix typos in comments.
370 * linux-arm-low.c: Same.
371 * linux-low.c: Same.
372 * linux-ppc-low.c: Same.
373 * proc-service.c: Same.
374 * regcache.h: Same.
375 * server.c: Same.
376 * tracepoint.c: Same.
377 * win32-low.c: Same.
378
52c64cf7
TT
3792019-10-25 Tom Tromey <tromey@adacore.com>
380
381 * utils.c (xstrdup): Remove.
382
c12d372d
TT
3832019-10-23 Tom Tromey <tom@tromey.com>
384
385 * configure, config.in: Rebuild.
386
4d0b984b
TT
3872019-10-23 Tom Tromey <tom@tromey.com>
388
389 * configure: Rebuild.
390 * acinclude.m4: Use m4_include, not sinclude.
391
c5adaa19
TT
3922019-10-17 Tom Tromey <tromey@adacore.com>
393
394 * configure: Rebuild.
395 * configure.ac: Use AC_CONFIG_HEADERS. Create stamp-h there, not
396 in AC_CONFIG_FILES invocation.
397 * Makefile.in (stamp-h, Makefile): Use new-style config.status
398 invocation.
399
fec4e896
CB
4002019-10-16 Christian Biesinger <cbiesinger@google.com>
401
402 * server.c: Include xml-builtin.h.
403 (get_xml_features): Don't declare xml_builtins here.
404
00975ff6
AB
4052019-10-15 Andrew Burgess <andrew.burgess@embecosm.com>
406
407 * Makefile.in: Remove references to vec-ipa.o.
408
0dc32745
AB
4092019-10-15 Andrew Burgess <andrew.burgess@embecosm.com>
410
411 * Makefile.in: Remove references to vec.c.
412
3e6ec53a
CB
4132019-10-02 Christian Biesinger <cbiesinger@google.com>
414
415 * server.c (server_waiting): Change to bool.
416 (extended_protocol): Likewise.
417 (response_needed): Likewise.
418 (exit_requested): Likewise.
419 (run_once): Likewise.
420 (report_no_resumed): Likewise.
421 (non_stop): Likewise.
422 (disable_packet_vCont): Likewise.
423 (disable_packet_Tthread): Likewise.
424 (disable_packet_qC): Likewise.
425 (disable_packet_qfThreadInfo): Likewise.
426 (handle_general_set): Update.
427 (handle_detach): Update.
428 (handle_monitor_command): Update.
429 (handle_query): Update.
430 (captured_main): Update.
431 (process_serial_event): Update.
432 * server.h (server_waiting): Change to bool.
433 (disable_packet_vCont): Likewise.
434 (disable_packet_Tthread): Likewise.
435 (disable_packet_qC): Likewise.
436 (disable_packet_qfThreadInfo): Likewise.
437 (run_once): Likewise.
438 (non_stop): Likewise.
439 * target.c (target_stop_and_wait): Update.
440
80fd2826
TT
4412019-10-02 Tom Tromey <tromey@adacore.com>
442
443 * Makefile.in (SFILES): Add common-inferior.c.
444 (OBS): Add common-inferior.o.
445 * server.c (startup_with_shell): Don't define.
446
46f29a9a
AB
4472019-10-02 Andrew Burgess <andrew.burgess@embecosm.com>
448
449 * linux-low.c (linux_low_read_btrace): Update for change to
450 std::vector.
451
f9d949fb
CB
4522019-09-20 Christian Biesinger <cbiesinger@google.com>
453
454 * debug.c (debug_threads): Remove comment in favor of the header.
455 * debug.h (using_threads): Add declaration.
456 (debug_threads): Add comment.
457 * linux-aarch64-low.c: Include debug.h and remove declaration of
458 debug_threads.
459 * nto-low.c: Likewise.
460 * remote-utils.c: Likewise.
461 * thread-db.c: Likewise.
462
abf516c6
UW
4632019-09-20 Ulrich Weigand <uweigand@de.ibm.com>
464
465 * configure.srv (ipa_ppc_linux_regobj): Remove powerpc-cell32l-ipa.o
466 and powerpc-cell64l-ipa.o.
467 (powerpc*-*-linux*): Remove powerpc-cell32l.o and powerpc-cell64l.o
468 from srv_regobj. Remove rs6000/powerpc-cell32l.xml and
469 rs6000/powerpc-cell64l.xml from srv_xmlfiles.
470 (spu*-*-*): Remove.
471
472 * spu-low.c: Remove file.
473
474 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Remove.
475 (parse_spufs_run): Remove.
476 (ppc_get_pc): Remove Cell/B.E. support.
477 (ppc_set_pc): Likewise.
478 (ppc_breakpoint_at): Likewise.
479 (ppc_arch_setup): Likewise.
480 (ppc_get_ipa_tdesc_idx): Do not handle tdesc_powerpc_cell64l or
481 tdesc_powerpc_cell32l.
482 (initialize_low_arch): Do not call init_registers_powerpc_cell64l
483 or init_registers_powerpc_cell32l.
484 * linux-ppc-ipa.c (get_ipa_tdesc): Do not handle PPC_TDESC_CELL.
485 (initialize_low_tracepoint): Do not call init_registers_powerpc_cell64l
486 or init_registers_powerpc_cell32l.
487 * linux-ppc-tdesc-init.h (PPC_TDESC_CELL): Mark as unused.
488 (init_registers_powerpc_cell32l): Remove prototype.
489 (init_registers_powerpc_cell64l): Likewise.
490
491 * target.h (struct target_ops): Remove qxfer_spu member.
492 * server.c (handle_qxfer_spu): Remove.
493 (qxfer_packets): Remove entry for "spu".
494 (handle_query): No longer support qXfer:spu:read or qXfer:spu:write.
495 * linux-low.c (SPUFS_MAGIC): Remove.
496 (spu_enumerate_spu_ids): Remove.
497 (linux_qxfer_spu): Remove.
498 (linux_target_ops): Remove qxfer_spu member.
499 * lynx-low.c (lynx_target_ops): Remove qxfer_spu member.
500 * nto-low.c (nto_target_ops): Remove qxfer_spu member.
501 * win32-low.c (win32_target_ops): Remove qxfer_spu member.
502
2d41fa11
SDJ
5032019-08-23 Sergio Durigan Junior <sergiodj@redhat.com>
504
505 * Makefile.in (SFILES): Add 'gdbsupport/gdb-dlfcn.c'.
506 (OBS): Add 'gdbsupport/gdb-dlfcn.o'.
507 * config.in: Regenerate.
508 * configure: Regenerate.
509
d59b55f0
TT
5102019-08-15 Tom Tromey <tromey@adacore.com>
511
512 * target.c (target_write_memory): Use gdb::byte_vector.
513
4196ab2a
TT
5142019-08-15 Tom Tromey <tromey@adacore.com>
515
516 * tracepoint.c (write_inferior_data_pointer)
517 (write_inferior_integer, write_inferior_int8)
518 (write_inferior_uinteger, m_tracepoint_action_download)
519 (r_tracepoint_action_download, x_tracepoint_action_download)
520 (l_tracepoint_action_download, clear_inferior_trace_buffer)
521 (download_agent_expr, download_tracepoint_1)
522 (download_trace_state_variables, upload_fast_traceframes): Update.
523 * server.c (gdb_write_memory): Update.
524 * remote-utils.c (relocate_instruction): Update.
525 * proc-service.c (ps_pdwrite): Update.
526 * mem-break.c (remove_memory_breakpoint)
527 (delete_fast_tracepoint_jump, set_fast_tracepoint_jump)
528 (uninsert_fast_tracepoint_jumps_at)
529 (reinsert_fast_tracepoint_jumps_at): Update.
530 * linux-x86-low.c (append_insns)
531 (i386_install_fast_tracepoint_jump_pad)
532 (amd64_write_goto_address, i386_write_goto_address): Update.
533 * linux-s390-low.c (append_insns, s390_write_goto_address):
534 Update.
535 * linux-ppc-low.c (ppc_relocate_instruction)
536 (ppc_install_fast_tracepoint_jump_pad, emit_insns)
537 (ppc_write_goto_address): Update.
538 * linux-aarch64-low.c (append_insns): Update.
539 * target.h (struct target_ops): Update.
540 (write_inferior_memory): Don't declare.
541 * target.c (target_write_memory): Rename from
542 write_inferior_memory. Remove old target_write_memory.
543
c6778d00
TT
5442019-08-15 Tom Tromey <tromey@adacore.com>
545
546 * target.c (write_inferior_memory): Use std::vector.
547
404f2902
FCE
5482019-08-06 Frank Ch. Eigler <fche@redhat.com>
549
550 PR build/24886
551 * configure.ac: Drop enable-libmcheck support.
552 * configure, config.in: Rebuild.
553 * acinclude.m4: Don't include it.
554
4c5aa8e0
AH
5552019-07-19 Alan Hayward <alan.hayward@arm.com>
556
557 * configure.srv: Remove Arm xml files.
558
7cc17433
AH
5592019-07-19 Alan Hayward <alan.hayward@arm.com>
560
561 * configure.srv: Add new files. Remove xml generated files.
562 * linux-aarch32-low.c (initialize_low_arch_aarch32): Don't init
563 registers.
564 * linux-aarch32-low.h (tdesc_arm_with_neon): Remove.
565 * linux-aarch32-tdesc.c: New file.
566 * linux-aarch32-tdesc.h: New file.
567 * linux-aarch64-low.c (aarch64_arch_setup): Call aarch32_linux_read_description.
568 * linux-arm-low.c (init_registers_arm, tdesc_arm)
569 (init_registers_arm_with_iwmmxt, tdesc_arm_with_iwmmxt)
570 (init_registers_arm_with_vfpv2, tdesc_arm_with_vfpv2)
571 (init_registers_arm_with_vfpv3, tdesc_arm_with_vfpv3): Remove.
572 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
573 (arm_store_vfpregset): Call arm_linux_get_tdesc_fp_type.
574 (arm_read_description): Call arm_linux_read_description.
575 (initialize_low_arch): Don't init registers.
576 * linux-arm-tdesc.c: New file.
577 * linux-arm-tdesc.h: New file.
578
166a82be
AH
5792019-07-10 Alan Hayward <alan.hayward@arm.com>
580
581 * linux-arm-low.c (arm_fill_wmmxregset, arm_store_wmmxregset):
582 Move counter inside for.
583 (arm_read_description): Check ptrace earlier.
584 (arm_arch_setup): Call arm_linux_init_hwbp_cap here.
585
268a13a5
TT
5862019-07-09 Tom Tromey <tom@tromey.com>
587
588 * configure: Rebuild.
589 * configure.ac: Change common to gdbsupport.
590 * acinclude.m4: Change common to gdbsupport.
591 * Makefile.in (SFILES, OBS, GDBREPLAY_OBS, IPA_OBJS)
592 (version-generated.c, gdbsupport/%-ipa.o, gdbsupport/%.o): Change
593 common to gdbsupport.
594 * ax.c, event-loop.c, fork-child.c, gdb_proc_service.h,
595 gdbreplay.c, gdbthread.h, hostio-errno.c, hostio.c, i387-fp.c,
596 inferiors.c, inferiors.h, linux-aarch64-tdesc-selftest.c,
597 linux-amd64-ipa.c, linux-i386-ipa.c, linux-low.c,
598 linux-tic6x-low.c, linux-x86-low.c, linux-x86-tdesc-selftest.c,
599 linux-x86-tdesc.c, lynx-i386-low.c, lynx-low.c, mem-break.h,
600 nto-x86-low.c, regcache.c, regcache.h, remote-utils.c, server.c,
601 server.h, spu-low.c, symbol.c, target.h, tdesc.c, tdesc.h,
602 thread-db.c, tracepoint.c, win32-i386-low.c, win32-low.c: Change
603 common to gdbsupport.
604
350fab54
AH
6052019-07-04 Alan Hayward <alan.hayward@arm.com>
606
607 * linux-aarch32-low.c (arm_read_description, arm_regsets): Use new
608 defines.
609 * linux-arm-low.c (arm_read_description, arm_regsets): Likewise.
610
2b40fda7
AH
6112019-07-04 Alan Hayward <alan.hayward@arm.com>
612
613 * configure.srv: Remove legacy xml.
614 * linux-aarch64-low.c (initialize_low_arch): Remove
615 initialize_low_tdesc call.
616 * linux-aarch64-tdesc-selftest.c: Remove file.
617 * linux-aarch64-tdesc.h (initialize_low_tdesc): Remove.
618 * linux-x86-low.c (initialize_low_arch): Remove
619 initialize_low_tdesc call.
620 * linux-x86-tdesc-selftest.c: Remove file.
621 * linux-x86-tdesc.h (initialize_low_tdesc): Remove.
622
7d10623d
TV
6232019-06-20 Tom de Vries <tdevries@suse.de>
624
625 * linux-s390-ipa.c (get_ipa_tdesc)[!__s390x__]: Use
626 s390_te_linux64_ft_collect_regmap for S390_TDESC_GS.
627
8d6a48df
TV
6282019-06-19 Tom de Vries <tdevries@suse.de>
629
630 * debug.h (debug_write): Change return type to ssize_t.
631 * debug.c (debug_write): Same.
632
73cc7272
TT
6332019-06-14 Tom Tromey <tom@tromey.com>
634
635 * configure.ac: Use new path to gnulib.
636 * configure: Rebuild.
637 * Makefile.in (INCGNU, $(GNULIB_BUILDDIR)/Makefile): Use new path
638 to gnulib.
639
08f10e02
TT
6402019-06-11 Tom Tromey <tom@tromey.com>
641
642 * Makefile.in (SFILES): Add alloc.c.
643 (OBS): Add alloc.o.
644 (IPA_OBJS): Add alloc-ipa.o.
645 (alloc-ipa.o): New target.
646 (%.o: ../%.c): New pattern rule.
647
422186a9
TT
6482019-06-10 Tom Tromey <tromey@adacore.com>
649
650 * remote-utils.c (look_up_one_symbol, relocate_instruction): Don't
651 end warning with a newline.
652 * linux-s390-low.c (s390_get_wordsize): Don't end warning with a
653 newline.
654 * thread-db.c (attach_thread): Don't end warning with a newline.
655 (thread_db_notice_clone): Likewise.
656 * tracepoint.c (gdb_agent_helper_thread): Don't end warning with a
657 newline.
658 * linux-x86-low.c (x86_get_min_fast_tracepoint_insn_len): Don't
659 end warning with a newline.
660
b02f78f9
PA
6612019-06-04 Pedro Alves <palves@redhat.com>
662
663 * server.c (captured_main): Use make_unique_xstrdup.
664
88ed7edb
TT
6652019-06-02 Tom Tromey <tom@tromey.com>
666
667 * gdbreplay.c (fromhex): Remove.
668 * Makefile.in (GDBREPLAY_OBS): Add rsp-low.o.
669
33a6bc35
TT
6702019-05-29 Tom Tromey <tromey@adacore.com>
671
672 * configure: Rebuild.
673
e90a813d
KB
6742019-05-06 Kevin Buettner <kevinb@redhat.com>
675
676 * linux-x86-low.c (x86_fill_gregset): Don't compile 64-bit
677 sign extension code on 32-bit builds.
678
353ea2d1
EZ
6792019-05-03 Eli Zaretskii <eliz@gnu.org>
680
681 * remote-utils.c:
682 * gdbreplay.c [USE_WIN32API]: Remove the _WIN32_WINNT override.
683
b494cdff
TT
6842019-04-19 Tom Tromey <tom@tromey.com>
685
686 * server.c (struct vstop_notif): Derive from notif_event.
687 <base>: Remove.
688 (queue_stop_reply): Update.
689 (remove_all_on_match_ptid): Change type. Rewrite.
690 (discard_queued_stop_replies): Rewrite.
691 (in_queued_stop_replies_ptid): Change type.
692 (in_queued_stop_replies): Rewrite.
693 (notif_stop): Update.
694 (queue_stop_reply_callback): Update.
695 (captured_main): Don't call initialize_notif.
696 (push_stop_notification): Update.
697 * notif.c (notif_write_event, handle_notif_ack)
698 (notif_event_enque, notif_push): Update.
699 (notif_event_xfree, initialize_notif): Remove.
700 * notif.h (struct notif_event): Include <list>, not
701 "common/queue.h".
702 (struct notif_server) <queue>: Now a std::list.
703 (notif_event_p): Remove typedef.
704 (initialize_notif): Don't declare.
705 (struct notif_event): Add virtual destructor.
706
a7e559cc
AH
7072019-04-17 Alan Hayward <alan.hayward@arm.com>
708
709 * ax.c (ax_vdebug): Call debug_printf.
710 * debug.c (debug_write): New function.
711 * debug.h (debug_write): New declaration.
712 * linux-low.c (sigchld_handler): Call debug_write.
713
aeb2e706
AH
7142019-04-17 Alan Hayward <alan.hayward@arm.com>
715
716 * debug.c (debug_set_output): New function.
717 (debug_vprintf): Send output to debug_file.
718 (debug_flush): Likewise.
719 * debug.h (debug_set_output): New declaration.
720 * server.c (handle_monitor_command): Add debug-file option.
721 (captured_main): Likewise.
722
c1bc0935
AH
7232019-04-17 Alan Hayward <alan.hayward@arm.com>
724
725 * debug.c (remote_debug): Add definition.
726 * debug.h (remote_debug): Add declaration.
727 * hostio.c (remote_debug): Remove declaration.
728 * remote-utils.c (struct ui_file): Likewise.
729 (remote_debug): Likewise.
730 * remote-utils.h (remote_debug): Likewise,
731 * server.c (remote_debug): Remove definition.
732
3f52fdbc
KB
7332019-04-10 Kevin Buettner <kevinb@redhat.com>
734
735 * linux-x86-low.c (x86_fill_gregset): Sign extend EAX value
736 when using a 64-bit gdbserver.
737
b0319eaa
TT
7382019-04-09 Tom Tromey <tromey@adacore.com>
739
740 * linux-low.c (select_event_lwp): Use find_thread_in_random.
741
eedc3f4f
TT
7422019-04-08 Tom Tromey <tom@tromey.com>
743
744 * linux-low.c (linux_detach_one_lwp): Replace throw_exception with
745 throw.
746 (linux_resume_one_lwp): Likewise.
747
230d2906
TT
7482019-04-08 Tom Tromey <tom@tromey.com>
749
750 * gdbreplay.c: Update.
751 * linux-low.c: Update.
752 * server.c: Update.
753
a70b8144
TT
7542019-04-08 Tom Tromey <tom@tromey.com>
755
756 * server.c: Use C++ exception handling.
757 * linux-low.c: Use C++ exception handling.
758 * gdbreplay.c: Use C++ exception handling.
759
3d6e9d23
TT
7602019-04-08 Tom Tromey <tom@tromey.com>
761
762 * server.c (handle_btrace_general_set, handle_qxfer_btrace)
763 (handle_qxfer_btrace_conf, detach_or_kill_for_exit_cleanup)
764 (captured_main, main): Update.
765 * gdbreplay.c (main): Update.
766
0570503d
PFC
7672019-04-05 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
768
769 * linux-low.c (linux_get_auxv): Remove static. Return auxv entry
770 value in argument pointer, return 1 if the entry is found and 0
771 otherwise. Move comment.
772 (linux_get_hwcap, linux_get_hwcap2): Use modified linux_get_auxv.
773 * linux-low.h (linux_get_auxv): Declare.
774 * linux-ppc-low.c (is_elfv2_inferior): Use linux_get_auxv.
775
227a9e65
TT
7762019-04-05 Tom Tromey <tromey@adacore.com>
777
778 * server.c (gdbserver_usage): Use upper-case for metasyntactic
779 variables.
780
69f4c9cc
AH
7812019-03-28 Alan Hayward <alan.hayward@arm.com>
782
783 * linux-low.c (AT_HWCAP2): Add define if not already included.
784
974c89e0
AH
7852019-03-26 Alan Hayward <alan.hayward@arm.com>
786
787 * linux-aarch64-low.c (aarch64_get_hwcap): Remove function.
788 (aarch64_arch_setup): Call linux_get_hwcap.
789 * linux-arm-low.c (arm_get_hwcap): Remove function.
790 (arm_read_description): Call linux_get_hwcap.
791 * linux-low.c (linux_get_auxv): New function.
792 (linux_get_hwcap): Likewise.
793 (linux_get_hwcap2): Likewise.
794 * linux-low.h (linux_get_hwcap): New declaration.
795 (linux_get_hwcap2): Likewise.
796 * linux-ppc-low.c (ppc_get_auxv): Remove function.
797 (ppc_arch_setup): Call linux_get_hwcap.
798 * linux-s390-low.c (s390_get_hwcap): Remove function.
799 (s390_arch_setup): Call linux_get_hwcap.
800
1ef53e6b
AH
8012019-03-22 Alan Hayward <alan.hayward@arm.com>
802 Jiong Wang <jiong.wang@arm.com>
803
804 * linux-aarch64-low.c (aarch64_store_pauthregset): New function.
805 * linux-low.c (regsets_store_inferior_registers): Allow optional reads
806 to fail.
807 * linux-low.h (enum regset_type): Add OPTIONAL_REGS.
808
ee4fbcfa
AH
8092019-03-22 Alan Hayward <alan.hayward@arm.com>
810 Jiong Wang <jiong.wang@arm.com>
811
812 * linux-aarch64-low.c (AARCH64_HWCAP_PACA): New define.
813 (aarch64_get_hwcap): New function.
814 (aarch64_arch_setup): Read APIA hwcap.
815
6dc0ebde
AH
8162019-03-22 Alan Hayward <alan.hayward@arm.com>
817 Jiong Wang <jiong.wang@arm.com>
818
819 * linux-aarch64-ipa.c (get_ipa_tdesc): Add pauth param.
820 (initialize_low_tracepoint): Likewise.
821 * linux-aarch64-low.c (aarch64_arch_setup): Likewise.
822 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Likewise.
823 * linux-aarch64-tdesc.c (struct target_desc): Likewise.
824 (aarch64_linux_read_description): Likewise.
825 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Likewise.
826
1163a4b7
JB
8272019-03-12 John Baldwin <jhb@FreeBSD.org>
828
829 * linux-x86-tdesc.c (i386_linux_read_description): Update call to
830 i386_create_target_description for 'segments' parameter.
831 * lynx-i386-low.c (lynx_i386_arch_setup): Likewise.
832 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
833 * win32-i386-low.c (i386_arch_setup): Likewise.
834
d3a70e03
TT
8352019-03-12 Tom Tromey <tromey@adacore.com>
836
837 * linux-low.c (iterate_over_lwps): Update.
838
37991b4f
TT
8392019-03-06 Tom Tromey <tom@tromey.com>
840
841 * server.c (detach_or_kill_for_exit_cleanup): Remove parameter.
842 (captured_main): Use SCOPE_EXIT.
843
45950eb6
SDJ
8442019-03-04 Sergio Durigan Junior <sergiodj@redhat.com>
845
846 * configure.srv: Use '$enable_unittest' instead of '$development'
847 when checking whether to fill 'srv_regobj' on 'aarch64*-*-linux*'
848 case.
849
43ac54fc
TT
8502019-02-27 Tom Tromey <tromey@adacore.com>
851
852 * gdbreplay.c (logchar): Handle \r\n.
853
df0da8a2
AH
8542019-02-07 Alan Hayward <alan.hayward@arm.com>
855
856 * linux-low.c (linux_attach): Add process before lwp.
857 * server.c (attach_inferior): Check if already attached.
858
1a5c2598
TT
8592019-02-07 Tom Tromey <tom@tromey.com>
860
861 * x86-tdesc.h: Rename include guard.
862 * x86-low.h: Add include guard.
863 * wincecompat.h: Rename include guard.
864 * win32-low.h: Add include guard.
865 * utils.h: Rename include guard.
866 * tracepoint.h: Rename include guard.
867 * tdesc.h: Rename include guard.
868 * target.h: Rename include guard.
869 * server.h: Rename include guard.
870 * remote-utils.h: Rename include guard.
871 * regcache.h: Rename include guard.
872 * nto-low.h: Rename include guard.
873 * notif.h: Add include guard.
874 * mem-break.h: Rename include guard.
875 * lynx-low.h: Add include guard.
876 * linux-x86-tdesc.h: Add include guard.
877 * linux-s390-tdesc.h: Add include guard.
878 * linux-ppc-tdesc-init.h: Add include guard.
879 * linux-low.h: Add include guard.
880 * linux-aarch64-tdesc.h: Add include guard.
881 * linux-aarch32-low.h: Add include guard.
882 * inferiors.h: Rename include guard.
883 * i387-fp.h: Rename include guard.
884 * hostio.h: Rename include guard.
885 * gdbthread.h: Rename include guard.
886 * gdb_proc_service.h: Rename include guard.
887 * event-loop.h: Rename include guard.
888 * dll.h: Rename include guard.
889 * debug.h: Rename include guard.
890 * ax.h: Rename include guard.
891
956cc47c
SN
8922018-01-30 Szabolcs Nagy <szabolcs.nagy@arm.com>
893
894 PR gdb/23985
895 * Makefile.in (IPAGENT_CFLAGS): Add UNDO_GNULIB_CFLAGS.
896 (UNDO_GNULIB_CFLAGS): Undo gnulib replacements.
897
a0707f3c
TT
8982019-01-25 Tom Tromey <tom@tromey.com>
899
900 * Makefile.in (INCLUDE_CFLAGS): Don't add -I for common.
901
0747795c
TT
9022019-01-25 Tom Tromey <tom@tromey.com>
903
904 * win32-low.c: Fix common/ includes.
905 * win32-i386-low.c: Fix common/ includes.
906 * tracepoint.c: Fix common/ includes.
907 * thread-db.c: Fix common/ includes.
908 * target.h: Fix common/ includes.
909 * symbol.c: Fix common/ includes.
910 * spu-low.c: Fix common/ includes.
911 * server.h: Fix common/ includes.
912 * server.c: Fix common/ includes.
913 * remote-utils.c: Fix common/ includes.
914 * regcache.h: Fix common/ includes.
915 * regcache.c: Fix common/ includes.
916 * nto-x86-low.c: Fix common/ includes.
917 * notif.h: Fix common/ includes.
918 * mem-break.h: Fix common/ includes.
919 * lynx-low.c: Fix common/ includes.
920 * lynx-i386-low.c: Fix common/ includes.
921 * linux-x86-tdesc-selftest.c: Fix common/ includes.
922 * linux-x86-low.c: Fix common/ includes.
923 * linux-low.c: Fix common/ includes.
924 * inferiors.h: Fix common/ includes.
925 * i387-fp.c: Fix common/ includes.
926 * hostio.c: Fix common/ includes.
927 * hostio-errno.c: Fix common/ includes.
928 * gdbthread.h: Fix common/ includes.
929 * gdbreplay.c: Fix common/ includes.
930 * fork-child.c: Fix common/ includes.
931 * event-loop.c: Fix common/ includes.
932 * ax.c:
933 (enum gdb_agent_op): Fix common/ includes.
934
be6d4f74
TT
9352019-01-21 Tom Tromey <tom@tromey.com>
936
937 * tracepoint.c: Fix includes.
938 * remote-utils.c: Fix includes.
939 * linux-x86-low.c: Fix includes.
940
66d91b39
JB
9412019-01-01 Joel Brobecker <brobecker@adacore.com>
942
943 * gdbreplay.c (gdbreplay_version): Update copyright year in
944 version message.
945 * server.c (gdbserver_version): Likewise.
946
754e3168
AH
9472018-12-05 Alan Hayward <alan.hayward@arm.com>
948
949 * linux-low.c (add_lwp): Switch ordering.
950
d105de22
TT
9512018-11-29 Tom Tromey <tom@tromey.com>
952
953 * win32-low.c (win32_join): Take pid, not process.
954 * target.h (struct target_ops) <join>: Change argument type.
955 (join_inferior): Change argument name.
956 * spu-low.c (spu_join): Take pid, not process.
957 * server.c (handle_detach): Preserve pid before destroying
958 process.
959 * lynx-low.c (lynx_join): Take pid, not process.
960 * linux-low.c (linux_join): Take pid, not process.
961
50138245
AH
9622018-11-23 Alan Hayward <alan.hayward@arm.com>
963
964 * linux-aarch64-low.c (aarch64_cannot_store_register): Remove.
965 (aarch64_cannot_fetch_register): Likewise.
966 (struct linux_target_ops): Update references.
967
64f57f3d
PFC
9682018-10-31 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
969
970 * linux-ppc-low.c: Include nat/linux-ptrace.h.
971
8d619c01
EBM
9722018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
973
974 * configure.srv (ipa_ppc_linux_regobj): Add
975 powerpc-isa207-htm-vsx32l-ipa.o and
976 powerpc-isa207-htm-vsx64l-ipa.o.
977 (powerpc*-*-linux*): Add powerpc-isa207-htm-vsx32l.o and
978 powerpc-isa207-htm-vsx64l.o to srv_regobj. Add
979 rs6000/power-htm-spr.xml, rs6000/power-htm-core.xml,
980 rs6000/power64-htm-core.xml, rs6000/power-htm-fpu.xml,
981 rs6000/power-htm-altivec.xml, rs6000/power-htm-vsx.xml,
982 rs6000/power-htm-ppr.xml, rs6000/power-htm-dscr.xml,
983 rs6000/power-htm-tar.xml, rs6000/powerpc-isa207-htm-vsx32l.xml,
984 and rs6000/powerpc-isa207-htm-vsx64l.xml to srv_xmlfiles.
985 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
986 <PPC_TDESC_ISA207_HTM_VSX>: New enum value.
987 (init_registers_powerpc_isa207_htm_vsx32l)
988 (init_registers_powerpc_isa207_htm_vsx64l): Declare.
989 * linux-ppc-low.c (ppc_fill_tm_sprregset, ppc_store_tm_sprregset)
990 (ppc_store_tm_cgprregset, ppc_store_tm_cfprregset)
991 (ppc_store_tm_cvrregset, ppc_store_tm_cvsxregset)
992 (ppc_store_tm_cpprregset, ppc_store_tm_cdscrregset)
993 (ppc_store_tm_ctarregset): New functions.
994 (ppc_regsets): Add entries for HTM regsets.
995 (ppc_arch_setup): Set htm in features struct when needed. Set
996 sizes for the HTM regsets.
997 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_HTM_VSX.
998 (initialize_low_arch): Call
999 init_registers_powerpc_isa207_htm_vsx32l and
1000 init_registers_powerpc_isa207_htm_vsx64l.
1001 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
1002 PPC_TDESC_ISA207_HTM_VSX.
1003 (initialize_low_tracepoint): Call
1004 init_registers_powerpc_isa207_htm_vsx32l and
1005 init_registers_powerpc_isa207_htm_vsx64l.
1006
232bfb86
EBM
10072018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1008
1009 * configure.srv (powerpc*-*-linux*): Add rs6000/power-ebb.xml and
1010 rs6000/power-linux-pmu.xml to srv_xmlfiles.
1011 * linux-ppc-low.c (ppc_store_ebbregset, ppc_fill_pmuregset)
1012 (ppc_store_pmuregset): New functions.
1013 (ppc_regsets): Add entries for ebb and pmu regsets.
1014 (ppc_arch_setup): Set isa207 in features struct if the ebb and
1015 pmu regsets are available. Set sizes for these regsets.
1016
f2cf6173
EBM
10172018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1018
1019 * configure.srv (ipa_ppc_linux_regobj): Add
1020 powerpc-isa207-vsx64l-ipa.o and powerpc-isa207-vsx32l-ipa.o.
1021 (powerpc*-*-linux*): Add powerpc-isa207-vsx32l.o and
1022 powerpc-isa207-vsx64l.o to srv_regobj, add rs6000/power-tar.xml,
1023 rs6000/powerpc-isa207-vsx32l.xml, and
1024 rs6000/powerpc-isa207-vsx64l.xml to srv_xmlfiles.
1025 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
1026 <PPC_TDESC_ISA207_VSX>: New enum value.
1027 (init_registers_powerpc_isa207_vsx32l): Declare.
1028 (init_registers_powerpc_isa207_vsx64l): Declare.
1029 * linux-ppc-low.c (ppc_fill_tarregset): New function.
1030 (ppc_store_tarregset): New function.
1031 (ppc_regsets): Add entry for the TAR regset.
1032 (ppc_arch_setup): Set isa207 in features struct when needed. Set
1033 size for the TAR regsets.
1034 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_VSX.
1035 (initialize_low_arch): Call init_registers_powerpc_isa207_vsx32l
1036 and init_registers_powerpc_isa207_vsx64l.
1037 * linux-ppc-ipa.c (get_ipa_tdesc): Handle PPC_TDESC_ISA207_VSX.
1038 (initialize_low_tracepoint): Call
1039 init_registers_powerpc_isa207_vsx32l and
1040 init_registers_powerpc_isa207_vsx64l.
1041
7ca18ed6
EBM
10422018-10-26 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
1043 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1044
1045 * configure.srv (ipa_ppc_linux_regobj): Add
1046 powerpc-isa205-ppr-dscr-vsx32l-ipa.o and
1047 powerpc-isa205-ppr-dscr-vsx64l-ipa.o.
1048 (powerpc*-*-linux*): Add powerpc-isa205-ppr-dscr-vsx32l.o and
1049 powerpc-isa205-ppr-dscr-vsx64l.o to srv_regobj, add
1050 rs6000/power-dscr.xml, rs6000/power-ppr.xml,
1051 rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml and
1052 rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml to srv_xmlfiles.
1053 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
1054 <PPC_TDESC_ISA205_PPR_DSCR_VSX>: New enum value.
1055 (init_registers_powerpc_isa205_ppr_dscr_vsx32l)
1056 (init_registers_powerpc_isa205_ppr_dscr_vsx64l): Declare.
1057 * linux-ppc-low.c: Include "elf/common.h" and <sys/uio.h>.
1058 (ppc_hwcap): Add comment.
1059 (ppc_hwcap2): New global.
1060 (ppc_check_regset, ppc_fill_pprregset, ppc_store_pprregset)
1061 (ppc_fill_dscrregset, ppc_store_dscrregset): New functions.
1062 (ppc_regsets): Add entries for the DSCR and PPR regsets.
1063 (ppc_arch_setup): Get AT_HWCAP2. Set ppr_dscr in features struct
1064 when needed. Set sizes for the the DSCR and PPR regsets.
1065 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA205_PPR_DSCR_VSX.
1066 (initialize_low_arch): Call
1067 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
1068 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
1069 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
1070 PPC_TDESC_ISA205_PPR_DSCR_VSX.
1071 (initialize_low_tracepoint): Call
1072 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
1073 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
1074
5c849b22
PFC
10752018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1076
1077 * linux-ppc-low.c (ppc_fill_vrregset): Remove memset calls.
1078
8ecfd7bd
SDJ
10792018-10-10 Sergio Durigan Junior <sergiodj@redhat.com>
1080 Simon Marchi <simark@simark.ca>
1081
1082 * acinclude.m4: Include "../selftest.m4".
1083 * configure: Regenerate.
1084 * configure.ac: Use "GDB_AC_SELFTEST".
1085 * configure.srv: Use "$enable_unittests" instead of
1086 "$development" when checking whether unit tests have been
1087 enabled.
1088 * server.c (captured_main): Update message informing that
1089 selftests have been disabled.
1090
96643e35
TT
10912018-10-04 Tom Tromey <tom@tromey.com>
1092
1093 * configure: Rebuild.
1094
da4ae14a
TT
10952018-10-04 Tom Tromey <tom@tromey.com>
1096
1097 * server.c (handle_status): Rename inner "thread".
1098 (process_serial_event): Declare "res" in 'm' case.
1099 * linux-low.c (last_thread_of_process_p, find_lwp_pid)
1100 (iterate_over_lwps): Rename inner "thread".
1101 (linux_qxfer_libraries_svr4): Rename inner "len".
1102 * gdbthread.h (find_thread_in_random): Rename inner "thread".
1103
7c619dbd
GB
11042018-10-01 Gary Benson <gbenson@redhat.com>
1105
1106 * gdb_proc_service.h: Moved common code to
1107 common/gdb_proc_service.h.
1108
3795e814
GB
11092018-10-01 Gary Benson <gbenson@redhat.com>
1110
1111 * gdb_proc_service.h: Synchronize comments and whitespace with
1112 GDB's version of this file.
1113
49b036f1
TT
11142018-09-25 Tom Tromey <tom@tromey.com>
1115
1116 * configure: Rebuild.
1117 * configure.ac (WARN_CFLAGS): Don't remove -Wmissing-prototypes.
1118
8ff03f0b
SM
11192018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
1120
1121 * Makefile.in (gdbserver$(EXEEXT)): Sort OBS.
1122 (gdbreplay$(EXEEXT)): Sort GDBREPLAY_OBS.
1123 ($(IPA_LIB)): Sort IPA_OBJS.
1124
a1cd91dc
SM
11252018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
1126
1127 * Makefile.in: Remove references to $(ADD_DEPS).
1128
752312ba
TT
11292018-09-16 Tom Tromey <tom@tromey.com>
1130
1131 * remote-utils.c (remote_open): Use GNU style for metasyntactic
1132 variables.
1133 * gdbreplay.c (gdbreplay_usage): Use GNU style for metasyntactic
1134 variables.
1135
f1628857
TT
11362018-09-05 Tom Tromey <tom@tromey.com>
1137
1138 * configure: Rebuild.
1139
ad202fcc
SM
11402018-08-28 Simon Marchi <simon.marchi@polymtl.ca>
1141
1142 PR build/23399
1143 * tracepoint.c (IPA_SYM_STRUCT_NAME): Define.
1144
d3d8724a
TT
11452018-08-27 Tom Tromey <tom@tromey.com>
1146
1147 PR build/23087:
1148 * configure: Rebuild.
1149
b4f183d2
TT
11502018-08-27 Tom Tromey <tom@tromey.com>
1151
1152 * linux-s390-low.c (s390_emit_ext, s390_emit_litpool)
1153 (s390_emit_const, s390_emit_reg, s390_emit_zero_ext)
1154 (s390_emit_stack_adjust, s390_emit_set_r2, s390x_emit_ext)
1155 (s390x_emit_const, s390x_emit_reg, s390x_emit_zero_ext)
1156 (s390x_emit_stack_adjust): Add casts to unsigned char.
1157
4e2aa472
SM
11582018-08-22 Simon Marchi <simon.marchi@ericsson.com>
1159
1160 PR gdb/23374
1161 PR gdb/23375
1162 * server.h (struct client_state) <disable_randomization>:
1163 Initialize to 1.
1164
cf4088a9
SM
11652018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
1166
1167 * linux-mips-low.c (mips_collect_ptrace_register): Remove unused
1168 variable.
1169 (mips_supply_ptrace_register): Likewise.
1170
a0de763e
TT
11712018-07-22 Tom Tromey <tom@tromey.com>
1172
1173 * configure: Rebuild.
1174
b0a7723d
TT
11752018-07-22 Tom Tromey <tom@tromey.com>
1176
1177 * win32-low.c (win32_create_inferior): Remove unused variables.
1178 * gdbreplay.c (remote_open): Remove unused variable.
1179 * remote-utils.c (remote_prepare): Remove unused variable.
1180 * x86-tdesc.h (X86_TDESC_H): Define.
1181 (amd64_expedite_regs): Define conditionally.
1182 (i386_expedite_regs): Mark ATTRIBUTE_UNUSED.
1183 * linux-x86-tdesc.c (i386_tdescs): Move inside #if.
1184 * remote-utils.c (readchar): Remove unused variable.
1185
a780ef4f
PA
11862018-07-13 Pedro Alves <palves@redhat.com>
1187
1188 * linux-low.c (linux_kill): Change parameter to process_info
1189 pointer instead of pid. Adjust.
1190 * lynx-low.c (lynx_kill): Likewise.
1191 * nto-low.c (nto_kill): Likewise.
1192 * spu-low.c (spu_kill): Likewise.
1193 * win32-low.c (win32_kill): Likewise.
1194 * server.c (handle_v_kill, kill_inferior_callback)
1195 (detach_or_kill_for_exit): Adjust.
1196 * target.c (kill_inferior): Change parameter to process_info
1197 pointer instead of pid. Adjust.
1198 * target.h (struct target_ops) <kill>: Change parameter to
1199 process_info pointer instead of pid. Adjust all implementations
1200 and callers.
1201 (kill_inferior): Likewise.
1202
ef2ddb33
PA
12032018-07-13 Pedro Alves <palves@redhat.com>
1204
1205 * linux-low.c (linux_detach, linux_join): Change parameter to
1206 process_info pointer instead of pid. Adjust.
1207 * lynx-low.c (lynx_detach, lynx_join): Likewise.
1208 * nto-low.c (nto_detach): Likewise.
1209 * spu-low.c (spu_detach, spu_join): Likewise.
1210 * win32-low.c (win32_detach, win32_join): Likewise.
1211 * server.c (handle_detach, detach_or_kill_for_exit): Adjust.
1212 * target.h (struct target_ops) <detach, join>: Change parameter to
1213 process_info pointer instead of pid. Adjust all implementations
1214 and callers.
1215 (detach_inferior, join_inferior): Rename 'pid' parameter to
1216 'proc'.
1217
c7ab0aef
SDJ
12182018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
1219 Jan Kratochvil <jan.kratochvil@redhat.com>
1220 Paul Fertser <fercerpav@gmail.com>
1221 Tsutomu Seki <sekiriki@gmail.com>
1222
1223 * Makefile.in (SFILES): Add '$(srcdir)/common/netstuff.c'.
1224 (OBS): Add 'common/netstuff.o'.
1225 (GDBREPLAY_OBS): Likewise.
1226 * gdbreplay.c: Include 'wspiapi.h' and 'netstuff.h'.
1227 (remote_open): Implement support for IPv6
1228 connections.
1229 * remote-utils.c: Include 'netstuff.h', 'filestuff.h'
1230 and 'wspiapi.h'.
1231 (handle_accept_event): Accept connections from IPv6 sources.
1232 (remote_prepare): Handle IPv6-style hostnames; implement
1233 support for IPv6 connections.
1234 (remote_open): Implement support for printing connections from
1235 IPv6 sources.
1236
31445d10
PA
12372018-07-11 Pedro Alves <palves@redhat.com>
1238
1239 PR gdb/23377
1240 * mem-break.c (any_persistent_commands): Add process_info
1241 parameter and use it instead of relying on the current process.
1242 Change return type to bool.
1243 * mem-break.h (any_persistent_commands): Add process_info
1244 parameter and change return type to bool.
1245 * server.c (handle_detach): Remove require_running_or_return call.
1246 Look up the process_info for the process we're about to detach.
1247 If not found, return back error to GDB. Adjust
1248 any_persistent_commands call to pass down a process pointer.
1249
cb197132
PA
12502018-07-11 Pedro Alves <palves@redhat.com>
1251
1252 * i387-fp.c (i387_cache_to_fsave, cache_to_fxsave)
1253 (i387_cache_to_xsave): Use regcache_raw_get_unsigned_by_name
1254 instead of collect_register_by_name.
1255 * regcache.c (regcache_raw_get_unsigned_by_name): New.
1256 * regcache.h (regcache_raw_get_unsigned_by_name): New.
1257
1b919490
VB
12582018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
1259 Pedro Alves <palves@redhat.com>
1260
1261 * linux-low.c (initialize_low): Call linux_proc_init_warnings.
1262
d7e15655
TT
12632018-07-03 Tom Tromey <tom@tromey.com>
1264
1265 * linux-low.c: Update.
1266 * lynx-low.c: Update.
1267 * mem-break.c: Update.
1268 * nto-low.c: Update.
1269 * remote-utils.c: Update.
1270 * server.c: Update.
1271 * spu-low.c: Update.
1272 * target.c: Update.
1273 * win32-low.c: Update.
1274
26a57c92
TT
12752018-07-03 Tom Tromey <tom@tromey.com>
1276
1277 * server.c: Update.
1278
0e998d96
TT
12792018-07-03 Tom Tromey <tom@tromey.com>
1280
1281 * linux-low.c: Update.
1282
cc6bcb54
TT
12832018-07-03 Tom Tromey <tom@tromey.com>
1284
1285 * target.c: Update.
1286
e38504b3
TT
12872018-07-03 Tom Tromey <tom@tromey.com>
1288
1289 * linux-low.c: Update.
1290 * linux-mips-low.c: Update.
1291 * lynx-low.c: Update.
1292 * nto-low.c: Update.
1293 * remote-utils.c: Update.
1294 * server.c: Update.
1295 * spu-low.c: Update.
1296 * target.c: Update.
1297 * thread-db.c: Update.
1298
e99b03dc
TT
12992018-07-03 Tom Tromey <tom@tromey.com>
1300
1301 * linux-low.c: Update.
1302 * linux-mips-low.c: Update.
1303 * lynx-low.c: Update.
1304 * mem-break.c: Update.
1305 * nto-low.c: Update.
1306 * remote-utils.c: Update.
1307 * server.c: Update.
1308 * spu-low.c: Update.
1309 * target.c: Update.
1310 * tracepoint.c: Update.
1311
f2907e49
TT
13122018-07-03 Tom Tromey <tom@tromey.com>
1313
1314 * linux-low.c: Update.
1315 * linux-ppc-low.c: Update.
1316 * linux-x86-low.c: Update.
1317 * proc-service.c: Update.
1318 * server.c: Update.
1319 * spu-low.c: Update.
1320 * thread-db.c: Update.
1321 * win32-low.c: Update.
1322
fd79271b
TT
13232018-07-03 Tom Tromey <tom@tromey.com>
1324
1325 * linux-low.c: Update.
1326 * lynx-low.c: Update.
1327 * nto-low.c: Update.
1328 * remote-utils.c: Update.
1329 * spu-low.c: Update.
1330 * thread-db.c: Update.
1331 * win32-low.c: Update.
1332
c0867626
SDJ
13332018-06-29 Joel Brobecker <brobecker@adacore.com>
1334
1335 * linux-x86-tdesc.c (amd64_linux_read_description): Add missing
1336 parameter in call to 'amd64_create_target_description'.
1337
2512d7ef
JK
13382018-06-28 Jan Kratochvil <jan.kratochvil@redhat.com>
1339
1340 * x86-tdesc.h: Remove executable permission flag.
1341
d0ac1c44
SM
13422018-06-19 Simon Marchi <simon.marchi@ericsson.com>
1343
1344 * configure.ac: Remove AC_PREREQ, add missing quoting.
1345 * configure: Re-generate.
1346 * config.in: Re-generate.
1347 * aclocal.m4: Re-generate.
1348
c4eb05ff
SM
13492018-06-18 Simon Marchi <simon.marchi@ericsson.com>
1350
1351 * tracepoint.h (current_traceframe): Remove declaration.
1352
02895270
AH
13532018-06-18 Alan Hayward <alan.hayward@arm.com>
1354
1355 * linux-aarch64-low.c (is_sve_tdesc): New function.
1356 (aarch64_sve_regs_copy_to_regcache): Likewise.
1357 (aarch64_sve_regs_copy_from_regcache): Likewise.
1358 (aarch64_regs_info): Add SVE checks.
1359 (initialize_low_arch): Initialize SVE.
1360
e9902bfc
AH
13612018-06-18 Alan Hayward <alan.hayward@arm.com>
1362
1363 * Makefile.in: Add aarch64-sve-linux-ptrace.c.
1364
fefa175e
AH
13652018-06-11 Alan Hayward <alan.hayward@arm.com>
1366
1367 * linux-aarch64-ipa.c (get_ipa_tdesc): Add null VQ param.
1368 (initialize_low_tracepoint): Likewise
1369 * linux-aarch64-low.c (aarch64_arch_setup): Get VQ.
1370 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Add null VQ
1371 param.
1372 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add VQ
1373 checks.
1374 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Add VQ.
1375
b91ad3ff
AH
13762018-06-11 Alan Hayward <alan.hayward@arm.com>
1377
1378 * server.h (PBUFSIZ): Increase size
1379
f868386e
AH
13802018-06-11 Alan Hayward <alan.hayward@arm.com>
1381
1382 * regcache.c (regcache::raw_compare): New function.
1383 * regcache.h (regcache::raw_compare): New declaration.
1384
9c861883
AH
13852018-06-11 Alan Hayward <alan.hayward@arm.com>
1386
1387 * regcache.c (new_register_cache): Use new.
1388 (free_register_cache): Use delete.
1389 (register_data): Use const.
1390 (supply_register): Move body inside regcache.
1391 (regcache::raw_supply): New override function.
1392 (collect_register): Move body inside regcache.
1393 (regcache::raw_collect): New override function.
1394 (regcache::get_register_status): New override function.
1395 * regcache.h (struct regcache): Inherit from reg_buffer_common.
1396
40591844
TT
13972018-06-09 Tom Tromey <tom@tromey.com>
1398
1399 * event-loop.c (gdb_event, gdb_event_p): Remove typedefs. Don't
1400 declare queue.
1401 (event_queue): Use std::queue.
1402 (gdb_event_xfree): Remove.
1403 (initialize_event_loop, process_event, wait_for_event): Update.
1404
6341380d
SC
14052018-06-08 Stan Cox <scox@redhat.com>
1406
1407 * win32-low.c (win32_create_inferior): last_ptid and last_status
1408 moved to client_state.
1409
03349c93
PA
14102018-06-08 Pedro Alves <palves@redhat.com>
1411
1412 * Makefile.in (GDBREPLAY_OBS): Add common/cleanups.o,
1413 common/common-exceptions.o, common/common-utils.o,
1414 common/errors.o, common/print-utils.o and utils.o.
1415 * gdbreplay.c: Include "common-defs.h" instead of the two
1416 'config.h's here. Don't include stdio.h, errno.h, stdlib.h,
1417 string.h or alloca.h.
1418 (perror_with_name): Delete.
1419 (remote_open): Use xstrdup instead of strdup.
1420 (main): Rename to ...
1421 (captured_main): ... this.
1422 (main): New.
1423
8dcc53b3
TT
14242018-06-08 Tom Tromey <tom@tromey.com>
1425
1426 * linux-low.c (linux_low_read_btrace): Update.
1427
c12a5089
SC
14282018-06-04 Stan Cox <scox@redhat.com>
1429
1430 * server.h (struct client_state): New.
1431 * server.c (cont_thread, general_thread, multi_process)
1432 (report_fork_events, report_vfork_events, report_exec_events)
1433 (report_thread_events, swbreak_feature, hwbreak_feature)
1434 (vCont_supported, disable_randomization, pass_signals)
1435 (program_signals, program_signals_p, last_status, last_ptid, own_buf):
1436 Moved to client_state.
1437 * remote-utils.c (remote_debug, noack_mode)
1438 (transport_is_reliable): Moved to client_state.
1439 * tracepoint.c (current_traceframe): Moved to client_state.
1440
1441 Update all callers.
1442 * server.c, remote-utils.c, tracepoint.c, fork-child.c,
1443 linux-low.c, remote-utils.h, target.c: Use client_state.
1444
122394f1
AH
14452018-05-31 Alan Hayward <alan.hayward@arm.com>
1446
1447 * configure.srv: Add new c/h file.
1448
95228a0d
AH
14492018-05-31 Alan Hayward <alan.hayward@arm.com>
1450
1451 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add
1452 null VQ.
1453
d8dab6c3
MR
14542018-05-25 Maciej W. Rozycki <macro@mips.com>
1455
1456 * gdb.arch/mips-fpregset-core.exp: New test.
1457 * gdb.arch/mips-fpregset-core.c: New test source.
1458
81e25b7c
EK
14592018-05-23 Erik Kurzinger <ekurzinger@nvidia.com>
1460
1461 PR server/23198
1462 * hostio.c (require_int): Do not report overflow for integers
1463 between 0xfffffff and 0x7fffffff.
1464
7e947ad3
MR
14652018-05-22 Maciej W. Rozycki <macro@mips.com>
1466
1467 * linux-mips-low.c [HAVE_PTRACE_GETREGS] (mips_collect_register)
1468 (mips_supply_register): Move outside HAVE_PTRACE_GETREGS.
1469 (mips_collect_ptrace_register, mips_supply_ptrace_register): New
1470 functions.
1471 (the_low_target): Wire them.
1472
1d75a658
PFC
14732018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1474
1475 * linux-ppc-low.c (ppc_fill_vrregset): Add vscr_offset variable.
1476 Set vscr_offset to 0 in little-endian mode and 12 in big-endian
1477 mode. Call collect_register_by_name with vscr using
1478 vscr_offset. Zero-pad vscr and vrsave fields in collector buffer.
1479 (ppc_store_vrregset): Add and set vscr_offset variable as in
1480 ppc_fill_vrregset. Call supply_register_by_name with vscr using
1481 vscr_offset.
1482
d078308a
PFC
14832018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1484
1485 * linux-ppc-low.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
1486 (ppc_arch_setup): Change SIZEOF_VRREGS and SIZEOF_VSXREGS to
1487 PPC_LINUX_SIZEOF_VRREGSET and PPC_LINUX_SIZEOF_VSXREGSET.
1488
7273b5fc
PFC
14892018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1490
1491 * linux-ppc-low.c (ppc_fill_vsxregset): Remove ppc_hwcap check.
1492 (ppc_store_vsxregset): Likewise.
1493 (ppc_fill_vrregset): Likewise.
1494 (ppc_store_vrregset): Likewise.
1495 (ppc_fill_evrregset): Likewise.
1496 (ppc_store_evrregset): Likewise.
1497 (ppc_regsets): Set VSX/VR/EVR regset sizes to 0.
1498 (ppc_arch_setup): Iterate through ppc_regsets and set sizes when
1499 needed.
1500
2e077f5e
PFC
15012018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1502
1503 * linux-ppc-low.c (ppc_arch_setup): Remove code for getting the
1504 wordsize of the inferior. Call ppc_linux_target_wordsize.
1505
bd64614e
PFC
15062018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1507
1508 * configure.srv (srv_tgtobj): Add arch/ppc-linux-common.o.
1509 * Makefile.in (SFILES): Add arch/ppc-linux-common.c.
1510 * linux-ppc-tdesc.h: Rename to linux-ppc-tdesc-init.h.
1511 * linux-ppc-tdesc-init.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
1512 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
1513 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
1514 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
1515 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
1516 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
1517 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
1518 (tdesc_powerpc_e500l): Remove.
1519 * linux-ppc-ipa.c: Include arch/ppc-linux-tdesc.h and
1520 linux-ppc-tdesc-init.h. Don't include linux-ppc-tdesc.h.
1521 * linux-ppc-low.c: Include arch/ppc-linux-common.h,
1522 arch/ppc-linux-tdesc.h, and linux-ppc-tdesc-init.h. Don't include
1523 linux-ppc-tdesc.h.
1524 (ppc_arch_setup): Remove target description matching code. Fill a
1525 ppc_linux_features struct and call ppc_linux_match_description
1526 with it.
1527
75d74cca
MR
15282018-05-22 Maciej W. Rozycki <macro@mips.com>
1529
1530 * linux-mips-low.c (mips_cannot_fetch_register): Return 1 if the
1531 width of the requested register exceeds the width of the
1532 `ptrace' data type.
1533 (mips_cannot_store_register): Likewise.
1534
e4439e43
MR
15352018-05-21 Maciej W. Rozycki <macro@mips.com>
1536
1537 * linux-mips-low.c (mips_fetch_register): New function. Update
1538 preceding comment.
1539 (mips_store_gregset): Supply 0 rather than $restart for $zero.
1540 (the_low_target): Wire `mips_fetch_register'.
1541
55271bf9
JB
15422018-05-10 Joel Brobecker <brobecker@adacore.com>
1543
1544 * lynx-i386-low.c (LYNXOS_178): New macro.
1545 [LYNXOS_178] (usr_fcontext_t): Provide a definition that matches
1546 the layout on LynxOS-178.
1547 (lynx_i386_fill_fpregset, lynx_i386_store_fpregset): Do not
1548 handle floating point registers that are not supported by
1549 LynxOS-178.
1550
1a34f210
TT
15512018-05-10 Tom Tromey <tom@tromey.com>
1552
1553 * configure: Rebuild.
1554
190852c8
JB
15552018-05-10 Joel Brobecker <brobecker@adacore.com>
1556
1557 PR server/23158:
1558 * tdesc.h (init_target_desc) <expedite_regs>: New parameter.
1559 * tdesc.c (init_target_desc) <expedite_regs>: New parameter.
1560 Use it to set the expedite_regs field in the given tdesc.
1561 * x86-tdesc.h: New file.
1562 * linux-aarch64-tdesc.c (aarch64_linux_read_description):
1563 Adjust following the addition of the new expedite_regs parameter
1564 to init_target_desc.
1565 * linux-tic6x-low.c (tic6x_read_description): Likewise.
1566 * linux-x86-tdesc.c: #include "x86-tdesc.h".
1567 (i386_linux_read_description, amd64_linux_read_description):
1568 Adjust following the addition of the new expedite_regs parameter
1569 to init_target_desc.
1570 * lynx-i386-low.c: #include "x86-tdesc.h".
1571 (lynx_i386_arch_setup): Adjust following the addition of the new
1572 expedite_regs parameter to init_target_desc.
1573 * nto-x86-low.c: #include "x86-tdesc.h".
1574 (nto_x86_arch_setup): Adjust following the addition of the new
1575 expedite_regs parameter to init_target_desc.
1576 * win32-i386-low.c: #include "x86-tdesc.h".
1577 (i386_arch_setup): Adjust following the addition of the new
1578 expedite_regs parameter to init_target_desc.
1579
7dbac825
JB
15802018-05-10 Joel Brobecker <brobecker@adacore.com>
1581
1582 PR server/23158:
1583 * win32-low.c (win32_create_inferior): Add call to my_wait
1584 setting last_status global.
1585
906994d9
JB
15862018-05-10 Joel Brobecker <brobecker@adacore.com>
1587
1588 PR server/23158:
1589 * win32-low.c (create_process): Only call gdb_tilde_expand if
1590 inferior_cwd is not NULL.
1591
8ee22052
AB
15922018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
1593
1594 * i387-fp.c (i387_cache_to_xsave): Only write x87 control
1595 registers to the cache if their values have changed.
1596 (i387_xsave_to_cache): Provide default values for x87 control
1597 registers when these features are available, but disabled.
1598 * regcache.c (supply_register_by_name_zeroed): New function.
1599 * regcache.h (supply_register_by_name_zeroed): Declare new
1600 function.
1601
aff689d3
TT
16022018-05-07 Tom Tromey <tom@tromey.com>
1603
1604 * configure: Rebuild.
1605
85e26832
TT
16062018-05-04 Tom Tromey <tom@tromey.com>
1607
1608 * configure: Rebuild.
1609
a3b60e45
JK
16102018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
1611 Pedro Alves <palves@redhat.com>
1612
1613 * linux-aarch64-low.c (aarch64_stopped_data_address):
1614 Likewise.
1615
632e107b
TT
16162018-04-27 Tom Tromey <tom@tromey.com>
1617
1618 * configure: Rebuild.
1619
458412c3
TT
16202018-04-23 Tom Tromey <tom@tromey.com>
1621
1622 * configure: Rebuild.
1623
f31c089e
SM
16242018-04-19 Simon Marchi <simon.marchi@ericsson.com>
1625
1626 * Makefile.in (depcomp): Add "..".
1627 (all_deps_files): New and use it.
1628
b319b098
AH
16292018-04-18 Alan Hayward <alan.hayward@arm.com>
1630
1631 * configure.srv (aarch64*-*-linux*): Don't include xml.
1632 (i[34567]86-*-cygwin*): Likewise.
1633 (i[34567]86-*-linux*): Likewise.
1634 (i[34567]86-*-lynxos*): Likewise.
1635 (i[34567]86-*-mingw32ce*): Likewise.
1636 (i[34567]86-*-mingw*): Likewise.
1637 (i[34567]86-*-nto*): Likewise.
1638 (tic6x-*-uclinux): Likewise.
1639 (x86_64-*-linux*): Likewise.
1640 (x86_64-*-mingw*): Likewise.
1641 (x86_64-*-cygwin*): Likewise.
1642
3b74854b
AH
16432018-04-18 Alan Hayward <alan.hayward@arm.com>
1644
1645 * tdesc.c: Remove xml parameter.
1646
e98577a9
AH
16472018-04-18 Alan Hayward <alan.hayward@arm.com>
1648
1649 * server.c (get_features_xml): Remove cast.
1650 * tdesc.c (void target_desc::accept): Fill in function.
1651 (tdesc_get_features_xml): Remove old xml creation.
1652 (print_xml_feature::visit_pre): Add xml vistor.
1653 * tdesc.h (struct target_desc): Make xmltarget mutable.
1654 (tdesc_get_features_xml): Remove declaration.
1655
d278f585
AH
16562018-04-18 Alan Hayward <alan.hayward@arm.com>
1657
1658 * tdesc.c (tdesc_architecture_name): Add new function.
1659 (tdesc_osabi_name): Likewise.
1660 (tdesc_get_features_xml): Use new functions.
1661
eee8a18d
AH
16622018-04-18 Alan Hayward <alan.hayward@arm.com>
1663
1664 * tdesc.c (tdesc_create_flags): Remove.
1665 (tdesc_add_flag): Likewise.
1666 (tdesc_named_type): Likewise.
1667 (tdesc_create_union): Likewise.
1668 (tdesc_create_struct): Likewise.
1669 (tdesc_create_vector): Likewise.
1670 (tdesc_add_bitfield): Likewise.
1671 (tdesc_add_field): Likewise.
1672 (tdesc_set_struct_size): Likewise.
1673
82ec9bc7
AH
16742018-04-18 Alan Hayward <alan.hayward@arm.com>
1675
1676 * tdesc.c (~target_desc): Remove implictly deleted items.
1677 (init_target_desc): Iterate all features.
1678 (tdesc_get_features_xml): Use vector.
1679 (tdesc_create_feature): Create feature.
1680 * tdesc.h (tdesc_feature) Remove
1681 (target_desc): Add features.
1682
ea3e7d71
AH
16832018-04-18 Alan Hayward <alan.hayward@arm.com>
1684
1685 * Makefile.in: Add common/tdesc.c
1686 * tdesc.c (init_target_desc): init all reg_defs from register
1687 vector.
1688 (tdesc_create_reg): Create tdesc_reg.
1689 * tdesc.h (tdesc_feature): Add register vector.
1690
17d08cd4
SM
16912018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
1692
1693 * tdesc.h (struct target_desc) <features>: Change type to
1694 std::vector<std::string>.
1695 * tdesc.c (target_desc::~target_desc): Adjust to std::vector
1696 changes.
1697 (tdesc_get_features_xml): Likewise.
1698 (tdesc_create_feature): Likewise.
1699
5cd3e386
AH
17002018-03-26 Alan Hayward <alan.hayward@arm.com>
1701
1702 * regcache.c (find_register_by_number): Return a ref.
1703 (find_regno): Use references.
1704 (register_size): Likewise.
1705 (register_data): Likewise.
1706 * tdesc.c (target_desc::~target_desc): Remove free calls.
1707 (target_desc::operator==): Use std::vector compare.
1708 (init_target_desc): Use reference.
1709 (tdesc_create_reg): Use reg constructors.
1710 * tdesc.h (struct target_desc): Replace pointer with object.
1711
dff7492c
AH
17122018-03-23 Alan Hayward <alan.hayward@arm.com>
1713
1714 * regcache.c (find_register_by_number): Make static.
1715 (find_regno): Use find_register_by_number
1716 * regcache.h (struct reg): Remove declaration.
1717
d80e5242
AH
17182018-03-23 Alan Hayward <alan.hayward@arm.com>
1719
1720 * tdesc.c (target_desc::~target_desc): Move to here.
1721 (target_desc::operator==): Likewise.
1722 * tdesc.h (target_desc::~target_desc): Move from here.
1723 (target_desc::operator==): Likewise.
1724
f69c5afb
AA
17252018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
1726
1727 * linux-s390-low.c (s390_get_wordsize): Correct brace style.
1728
ce29f843
AA
17292018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1730
1731 * linux-s390-ipa.c (get_ipa_tdesc): Add handling for
1732 S390_TDESC_GS.
1733 * linux-s390-low.c (s390_get_ipa_tdesc_idx): Likewise.
1734 (initialize_low_tracepoint): Call init_registers_s390x_gs_linux64
1735 and init_registers_s390_gs_linux64.
1736
c49bd90b
AA
17372018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1738
1739 * linux-s390-low.c (s390_fill_gs): Remove function.
1740 (s390_fill_gsbc): Remove function.
1741 (s390_regsets): Set fill functions for the guarded storage regsets
1742 to NULL.
1743
7edb9bd3
AA
17442018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1745
1746 * linux-s390-low.c (s390_get_hwcap): Replace tdesc parameter by
1747 the word size. Add comment.
1748 (s390_get_wordsize): New function.
1749 (s390_arch_setup): No longer select a temporary tdesc to fetch the
1750 pswm with it. Instead, use s390_get_wordsize to determine the
1751 word size first and derive the correct tdesc from that directly.
1752
39be3c7e
SM
17532018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
1754
1755 * Makefile.in: Include silent-rules.mk.
1756 (srcdir, abs_top_srcdir, abs_srcdir, VPATH): Move up.
1757 (COMPILE): Add ECHO_CXX.
1758 (gdbserver$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
1759 (gdbreplay$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
1760 ($(IPA_LIB)): Add SILENCE and ECHO_CXXLD.
1761 (version-generated.c): Add ECHO_GEN.
1762 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN_GENERATED.
1763 (IPAGENT_COMPILE): Add ECHO_CXX.
1764 (%-generated.c): Add ECHO_REGDAT.
1765
3ae9ce5d
TT
17662018-03-14 Tom Tromey <tom@tromey.com>
1767
1768 PR cli/14977:
1769 * ax.c (ax_printf): Special case for NULL.
1770
e6a58aa8
SM
17712018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
1772
1773 * linux-low.c (linux_qxfer_libraries_svr4): Use
1774 xml_escape_text_append.
1775
f6e8a41e
SM
17762018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
1777
1778 * linux-low.c (linux_qxfer_libraries_svr4): Use std::string.
1779
b9671caf
SM
17802018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
1781
1782 * server.c (handle_general_set): Remove unnecessary xstrdup.
1783
e80aaf61
SM
17842018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
1785
1786 * server.c (parse_debug_format_options): Adjust to
1787 delim_string_to_char_ptr_vec changes.
1788 * thread-db.c (thread_db_load_search): Adjust to
1789 dirnames_to_char_ptr_vec changes.
1790
b1223e78
MM
17912018-03-01 Markus Metzger <markus.t.metzger@intel.com>
1792
1793 * target.h (target_enable_btrace, target_disable_btrace)
1794 (target_read_btrace, target_read_btrace_conf): Turn macro into
1795 inline function. Throw error if target method is not defined.
1796 * server.c (handle_qxfer_btrace handle_qxfer_btrace_conf): Remove
1797 check for btrace target method. Be prepared to handle exceptions
1798 from btrace target methods.
1799
81561546
SDJ
18002018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
1801
1802 * server.c (captured_main): Change order of error message printed
1803 when the current working directory cannot be found.
1804
25e3c82c
SDJ
18052018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
1806
1807 * server.c: Include "filenames.h" and "pathstuff.h".
1808 (program_name): Delete variable.
1809 (program_path): New anonymous class.
1810 (get_exec_wrapper): Use "program_path" instead of
1811 "program_name".
1812 (handle_v_run): Likewise.
1813 (captured_main): Likewise.
1814 (process_serial_event): Likewise.
1815
b4987c95
SDJ
18162018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
1817
1818 * Makefile.in (SFILES): Add "$(srcdir)/common/pathstuff.c".
1819 (OBJS): Add "pathstuff.o".
1820 * server.c (current_directory): New global variable.
1821 (captured_main): Initialize "current_directory".
1822
f46cd62a
AH
18232018-02-26 Alan Hayward <alan.hayward@arm.com>
1824
1825 * tdesc.c: Use common/tdesc.h.
1826 * tdesc.h: Likewise.
1827
a543c5ca
AH
18282018-02-20 Alan Hayward <alan.hayward@arm.com>
1829 Simon Marchi <simon.marchi@ericsson.com>
1830
1831 * Makefile.in: Switch order of make rules.
1832
b5884fa7
AH
18332018-02-19 Alan Hayward <alan.hayward@arm.com>
1834
1835 * Makefile.in: Add common directory in build.
1836 * configure.ac: Add common reference.
1837 * configure: Regenerate.
1838
de6242d3
MM
18392018-02-09 Markus Metzger <markus.t.metzger@intel.com>
1840
1841 * linux-low.c (linux_target_ops): Remove linux_supports_btrace.
1842 * nto-low.c (nto_target_ops): Remove NULL for supports_btrace.
1843 * spu-low.c (spu_target_ops): Likewise.
1844 * win32-low.c (win32_target_ops): Likewise.
1845 * server.c (supported_btrace_packets): Report packets unconditionally.
1846 * target.h (target_ops) <supports_btrace>: Remove.
1847 (target_supports_btrace): Remove.
1848
9ee23a85
MM
18492018-02-09 Markus Metzger <markus.t.metzger@intel.com>
1850
1851 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt)
1852 (handle_btrace_disable): Change return type to void. Use exceptions
1853 to report errors.
1854 (handle_btrace_general_set): Catch exception and copy message to
1855 return message.
1856
8ce47547
TT
18572018-02-08 Tom Tromey <tom@tromey.com>
1858
1859 * linux-low.c (install_software_single_step_breakpoints): Use
1860 make_scoped_restore.
1861 * inferiors.c (make_cleanup_restore_current_thread): Remove.
1862 (do_restore_current_thread_cleanup): Remove.
1863 * gdbthread.h (make_cleanup_restore_current_thread): Don't
1864 declare.
1865
45dd3607
TT
18662018-02-08 Tom Tromey <tom@tromey.com>
1867
1868 * mem-break.c (set_raw_breakpoint_at): Use
1869 gdb::unique_xmalloc_ptr.
1870
e671cd59
PA
18712018-01-30 Pedro Alves <palves@redhat.com>
1872
1873 PR gdb/13211
1874 * target.c (target_terminal::terminal_state): Rename to ...
1875 (target_terminal::m_terminal_state): ... this.
1876
a0aad537
JC
18772018-01-19 James Clarke <jrtc27@jrtc27.com>
1878
1879 * linux-low.c (handle_extended_wait): Surround call to
1880 thread_db_notice_clone with #ifdef USE_THREAD_DB.
1881
4d9b86e1
SM
18822018-01-17 Simon Marchi <simon.marchi@ericsson.com>
1883
1884 * linux-low.c (attach_proc_task_lwp_callback): Adjust to
1885 linux_ptrace_attach_fail_reason_string now returning an
1886 std::string.
1887 (linux_attach): Likewise.
1888 * thread-db.c (attach_thread): Likewise.
1889
f517c180
EA
18902018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
1891
1892 PR gdb/21559
1893 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
1894 checking for fs_base/gs_base fields in struct user_regs_struct.
1895 * configure: Regenerate.
1896
9a70f35c
YQ
18972018-01-16 Yao Qi <yao.qi@linaro.org>
1898
1899 PR gdb/18749
1900 * linux-low.c (fetch_register): Call supply_register instead of
1901 error.
1902
605fd3c6
YQ
19032018-01-08 Yao Qi <yao.qi@linaro.org>
1904 Simon Marchi <simon.marchi@ericsson.com>
1905
1906 * Makefile.in (OBS): Remove selftest.o.
1907 * configure.ac: Set srv_selftest_objs if $development is true.
1908 (GDBSERVER_DEPFILES): Append $srv_selftest_objs.
1909 * configure: Re-generated.
1910 * server.c (captured_main): Wrap variable selftest_filter with
1911 GDB_SELF_TEST.
1912
2cc05030
SM
19132018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
1914
1915 * server.c (parse_debug_format_options): Return std::string.
1916 (handle_monitor_command, captured_main): Adjust.
1917
e379cee6
PA
19182018-01-05 Pedro Alves <palves@redhat.com>
1919
1920 PR gdb/18653
1921 * server.c (captured_main): Pass quiet=false to
1922 save_original_signals_state.
1923
82e1e79a
JB
19242018-01-01 Joel Brobecker <brobecker@adacore.com>
1925
1926 * gdbreplay.c (gdbreplay_version): Update copyright year in
1927 version message.
1928 * server.c (gdbserver_version): Likewise.
1929
8e481c3b
TT
19302017-12-08 Tom Tromey <tom@tromey.com>
1931
1932 * ax.c (ax_printf): Update.
1933
a8806230
YQ
19342017-12-07 Yao Qi <yao.qi@linaro.org>
1935
1936 * linux-aarch64-ipa.c (initialize_low_tracepoint): Call
1937 aarch64_linux_read_description.
1938 * linux-amd64-ipa.c (idx2mask): New array.
1939 (get_ipa_tdesc): Move idx2mask out.
1940 (initialize_low_tracepoint): Initialize target descriptions.
1941 * linux-i386-ipa.c (idx2mask): New array.
1942 (get_ipa_tdesc): Move idx2mask out.
1943 (initialize_low_tracepoint): Initialize target descriptions.
1944
d4a0e8b5
SM
19452017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
1946
1947 * tdesc.c (struct tdesc_type): Change return type.
1948 (tdesc_add_flag): Change parameter type.
1949 (tdesc_add_bitfield): Likewise.
1950 (tdesc_add_field): Likewise.
1951 (tdesc_set_struct_size): Likewise.
1952
798a7429
SM
19532017-12-05 Simon Marchi <simon.marchi@ericsson.com>
1954
1955 * regcache.c (registers_to_string): Remove unused variable.
1956
c0e15c9b
SM
19572017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1958
1959 * inferiors.c (for_each_inferior_with_data): Remove.
1960 * inferiors.h (for_each_inferior_with_data): Remove.
1961 * server.c (handle_qxfer_threads_worker): Change parameter type.
1962 (handle_qxfer_threads_proper): Use for_each_thread.
1963
f0045347
SM
19642017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1965
1966 * inferiors.c (for_each_inferior): Remove.
1967 (clear_inferiors): Use for_each_thread.
1968 * inferiors.h (for_each_inferior): Remove.
1969 * linux-low.c (linux_wait_for_event_filtered): Use
1970 for_each_thread.
1971 (linux_stabilize_threads): Likewise.
1972 * regcache.c (regcache_release): Likewise.
1973 * server.c (gdb_wants_all_threads_stopped): Likewise.
1974 (clear_pending_status_callback): Remove.
1975 (handle_status): Use for_each_thread.
1976 (captured_main): Likewise.
1977 * win32-low.c (child_init_thread_list): Likewise.
1978 (win32_clear_inferiors): Likewise.
1979 (fake_breakpoint_event): Likewise.
1980
9521758b
SM
19812017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1982
1983 * inferiors.h (find_inferior): Remove.
1984 * inferiors.c (find_inferior): Remove.
1985
8f86d7aa
SM
19862017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1987
1988 * linux-low.c (resume_status_pending_p): Update comment.
1989 (need_step_over_p): Update comment.
1990
e2b44075
SM
19912017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1992
1993 * linux-low.c (proceed_one_lwp): Return void, change parameter
1994 type.
1995 (unsuspend_and_proceed_one_lwp): Likewise.
1996 (proceed_all_lwps): Use for_each_thread.
1997 (unstop_all_lwps): Likewise.
1998
c80825ff
SM
19992017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2000
2001 * linux-low.c (linux_resume_one_thread): Return void, take
2002 parameter directly.
2003 (linux_resume): Use for_each_thread.
2004
df3e4dbe
SM
20052017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2006
2007 * linux-low.c (send_sigstop_callback): Return void, change
2008 parameter type. Rename to...
2009 (send_sigstop): ... this.
2010 (suspend_and_send_sigstop_callback): Return void, change parameter
2011 type. Rename to...
2012 (suspend_and_send_sigstop): ... this.
2013 (stop_all_lwps): Use for_each_thread.
2014
5a6b0a41
SM
20152017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2016
2017 * linux-low.c (lwp_running): Return bool, remove unused
2018 argument.
2019 (linux_stabilize_threads): Use find_thread.
2020
39a64da5
SM
20212017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2022
2023 * linux-low.c (select_singlestep_lwp_callback): Remove.
2024 (count_events_callback): Remove.
2025 (select_event_lwp_callback): Remove.
2026 (select_event_lwp): Use find_thread/for_each_thread.
2027
a1385b7b
SM
20282017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2029
2030 * linux-low.c (not_stopped_callback): Return bool, take filter
2031 argument directly.
2032 (linux_wait_for_event_filtered): Use find_thread.
2033 (linux_wait_1): Likewise.
2034
454296a2
SM
20352017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2036
2037 * linux-low.c (same_lwp): Remove.
2038 (find_lwp_pid): Use find_thread.
2039
6b2a85da
SM
20402017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2041
2042 * linux-low.c (delete_lwp_callback): Remove.
2043 (linux_mourn): Use for_each_thread.
2044
798a38e8
SM
20452017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2046
2047 * linux-low.c (linux_detach_lwp_callback): Return void, remove
2048 args parameter, don't check for pid.
2049 (linux_detach): Use for_each_thread.
2050
e4eb0dec
SM
20512017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2052
2053 * linux-low.c (struct counter): Remove.
2054 (second_thread_of_pid_p): Remove.
2055 (last_thread_of_process_p): Use find_thread.
2056
83e1b6c1
SM
20572017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2058
2059 * inferiors.c (find_inferior_in_random): Remove.
2060 * inferiors.h (find_inferior_in_random): Remove.
2061 * linux-low.c (status_pending_p_callback): Return bool, accept
2062 parameter ptid directly.
2063 (linux_wait_for_event_filtered): Use find_thread_in_random.
2064 (linux_wait_1): Likewise.
2065
8dc7b443
SM
20662017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2067
2068 * inferiors.c (find_inferior_id): Remove.
2069 (find_thread_ptid): Move implemention from find_inferior_id to
2070 here.
2071 * inferiors.h (find_inferior_id): Remove.
2072 * server.c (handle_status): Use find_thread_ptid.
2073 (process_serial_event): Likewise.
2074 * thread-db.c (find_one_thread): Likewise.
2075 (thread_db_thread_handle): Likewise.
2076 * win32-low.c (thread_rec): Likewise.
2077 (child_delete_thread): Likewise.
2078 (win32_thread_alive): Likewise.
2079 (get_child_debug_event): Likewise.
2080
da25033c
SM
20812017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2082
2083 * linux-mips-low.c (update_watch_registers_callback): Return
2084 void, remove pid_p parameter, don't check for pid.
2085 (mips_insert_point, mips_remove_point): Use for_each_thread.
2086
c91bb56b
SM
20872017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2088
2089 * lynx.low (lynx_delete_thread_callback): Remove.
2090 (lynx_mourn): Use for_each_thread.
2091
634a3254
SM
20922017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2093
2094 * regcache.c (regcache_invalidate_one): Remove.
2095 (regcache_invalidate_pid): use for_each_thread.
2096
41272101
TT
20972017-11-26 Tom Tromey <tom@tromey.com>
2098
2099 * linux-low.c (linux_create_inferior): Update.
2100
f5291a6f
UW
21012017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
2102
2103 * spu-low.c (spu_create_inferior): Fix typo in argument name.
2104
6654d750
AH
21052017-11-24 Alan Hayward <alan.hayward@arm.com>
2106
2107 * configure.srv: Add linux-aarch64-tdesc-selftest.o.
2108 * linux-aarch64-low.c (initialize_low_arch): Call init func.
2109 * linux-aarch64-tdesc-selftest.c: New file.
2110 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
2111
21122017-11-24 Alan Hayward <alan.hayward@arm.com>
2113
2114 * configure.srv: Add new file.
2115 * linux-aarch64-low.c (initialize_low_arch): Call init func.
2116 * linux-aarch64-tdesc-selftest.c: New file.
2117 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
2118
49bdb7ee
AH
21192017-11-24 Alan Hayward <alan.hayward@arm.com>
2120
2121 * linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init.
2122 * linux-aarch64-low.c (initialize_low_arch): Remove init.
2123 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
2124
d6d7ce56
AH
21252017-11-24 Alan Hayward <alan.hayward@arm.com>
2126
2127 * configure.srv: Add new files.
2128 * linux-aarch64-ipa.c (get_ipa_tdesc): Call
2129 aarch64_linux_read_description.
2130 * linux-aarch64-low.c (aarch64_linux_read_description):
2131 Merge with aarch64_arch_setup.
2132 (aarch64_arch_setup): Call aarch64_linux_read_description.
2133 * linux-aarch64-tdesc.c: New file.
2134 * linux-aarch64-tdesc.h: New file.
2135
506fe5f4
YQ
21362017-11-24 Yao Qi <yao.qi@linaro.org>
2137
2138 * configure.srv: Set $srv_regobj for tic6x-linux.
2139 * linux-tic6x-low.c: Include "arch/tic6x.h" and "tdesc.h".
2140 (tic6x_read_description): Move some code to tic6x_arch_setup.
2141 (tic6x_tdesc_test): New function.
2142 (initialize_low_arch): Call selftests::register_test.
2143
29f9a567
YQ
21442017-11-22 Yao Qi <yao.qi@linaro.org>
2145
2146 * remote-utils.c (prepare_resume_reply): Use memcpy.
2147
578290ec
SM
21482017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2149
2150 * linux-low.c (kill_one_lwp_callback): Return void, take
2151 argument directly, don't filter on pid.
2152 (linux_kill): Use for_each_thread.
2153
eca55aec
SM
21542017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2155
2156 * linux-low.c (need_step_over_p): Return bool, remove dummy
2157 argument.
2158 (linux_resume, proceed_all_lwps): Use find_thread.
2159
25c28b4d
SM
21602017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2161
2162 * linux-low.c (resume_status_pending_p): Return bool, remove
2163 flag_p argument.
2164 (linux_resume): Use find_thread.
2165
5fdda392
SM
21662017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2167
2168 * linux-low.c (struct thread_resume_array): Remove.
2169 (linux_set_resume_request): Return void, take arguments
2170 directly.
2171 (linux_resume): Use for_each_thread.
2172
fcb056a5
SM
21732017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2174
2175 * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
2176 return bool, remove data argument.
2177 (linux_stabilize_threads): Use find_thread.
2178
139720c5
SM
21792017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2180
2181 * linux-low.c (unsuspend_one_lwp): Remove.
2182 (unsuspend_all_lwps): Use for_each_thread, inline code from
2183 unsuspend_one_lwp.
2184
6d1e5673
SM
21852017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2186
2187 * gdbthread.h (find_thread): Add overload with ptid_t filter.
2188 * linux-low.c (struct iterate_over_lwps_args): Remove.
2189 (iterate_over_lwps_filter): Remove.
2190 (iterate_over_lwps): Use find_thread.
2191
bbf550d5
SM
21922017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2193
2194 * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
2195 (linux_handle_new_gdb_connection): Use for_each_thread, inline
2196 code from reset_lwp_ptrace_options_callback.
2197
00192f77
SM
21982017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2199
2200 * linux-arm-low.c (struct update_registers_data): Remove.
2201 (update_registers_callback): Return void, take arguments
2202 directly, don't check thread's pid.
2203 (arm_insert_point, arm_remove_point): Use for_each_thread.
2204
2bee2b6c
SM
22052017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2206
2207 * win32-low.c (continue_one_thread): Return void, take argument
2208 directly.
2209 (child_continue): Use for_each_thread.
2210
0b360f19
SM
22112017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2212
2213 * win32-i386-low.c (update_debug_registers_callback): Rename
2214 to ...
2215 (update_debug_registers): ... this, return void, remove pid_p arg.
2216 (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
2217
f27866ba
SM
22182017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
2219
2220 * inferiors.h (struct process_info): Add constructor, initialize
2221 fields..
2222 <syscalls_to_catch>: Change type to std::vector<int>.
2223 * inferiors.c (add_process): Allocate process_info with new.
2224 (remove_process): Free process_info with delete.
2225 * linux-low.c (handle_extended_wait): Adjust.
2226 (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
2227 * server.c (handle_general_set): Adjust.
2228
e849ea89
PA
22292017-11-16 Pedro Alves <palves@redhat.com>
2230
2231 * remote-utils.c (remote_close): Block SIGIO signals instead of
2232 uninstalling the SIGIO handler.
2233
1d0aa65c
AH
22342017-11-16 Alan Hayward <alan.hayward@arm.com>
2235
2236 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
2237
3491a34c
YQ
22382017-11-16 Yao Qi <yao.qi@linaro.org>
2239
2240 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
2241 (tic6x_store_gregset): Likewise.
2242 (tic6x_usrregs_info): Move it up.
2243
a602f924
AH
22442017-11-15 Alan Hayward <alan.hayward@arm.com>
2245
2246 * Makefile.in: Update arch rules.
2247 * configure.srv: Explicitly mark arch/ files.
2248
5616b6c3
AS
22492017-11-13 Andreas Schwab <schwab@suse.de>
2250
2251 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
2252 function.
2253 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2254
d1928160
PA
22552017-11-06 Pedro Alves <palves@redhat.com>
2256
2257 * config.in, configure: Regenerate.
2258
bac608e7
SM
22592017-10-27 Simon Marchi <simon.marchi@ericsson.com>
2260
2261 * target.c (struct thread_search): Remove.
2262 (thread_search_callback): Remove.
2263 (prepare_to_access_memory): Use for_each_thread instead of
2264 find_inferior. Inline code from thread_search_callback.
2265
eaddb425
SM
22662017-10-27 Simon Marchi <simon.marchi@ericsson.com>
2267
2268 * server.c (struct visit_actioned_threads_data): Remove.
2269 (visit_actioned_threads): Change prototype to take arguments
2270 directly.
2271 (resume): Use find_thread instead of find_inferior.
2272
99078d34
SM
22732017-10-27 Simon Marchi <simon.marchi@ericsson.com>
2274
2275 * server.c (queue_stop_reply_callback): Change prototype, return
2276 void.
2277 (find_status_pending_thread_callback): Remove.
2278 (handle_status): Replace find_inferior with find_thread and
2279 for_each_thread.
2280
cc628f3d
AH
22812017-10-25 Alan Hayward <alan.hayward@arm.com>
2282
2283 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
2284 with REGNO.
2285 (aarch64_store_gregset): Likewise.
2286 (aarch64_fill_fpregset): Likewise.
2287 (aarch64_store_fpregset): Likewise.
2288
4d3bb80e
SM
22892017-10-21 Simon Marchi <simon.marchi@ericsson.com>
2290
2291 * gdbthread.h (find_thread, for_each_thread): New functions.
2292 * inferiors.c (thread_of_pid): Remove.
2293 (find_any_thread_of_pid): Use find_thread.
2294 * linux-low.c (num_lwps): Use for_each_thread.
2295
7a7cdfa0
YQ
22962017-10-17 Yao Qi <yao.qi@linaro.org>
2297
2298 * Makefile.in: Remove one rule.
2299 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
2300
e675d170
YQ
23012017-10-17 Yao Qi <yao.qi@linaro.org>
2302
2303 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
2304 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
2305
7eb4e0f9
YQ
23062017-10-17 Yao Qi <yao.qi@linaro.org>
2307
2308 * configure.srv: Rename arm.o with arch/arm.o.
2309
60d6cfc9
YQ
23102017-10-17 Yao Qi <yao.qi@linaro.org>
2311
2312 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
2313 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
2314 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
2315 (arch-i386.o, arch-amd64.o): Remove rules.
2316 (arch/%.o): New rule.
2317 Update POSTCOMPILE and COMPILE.pre.
2318 * configure.ac: Invoke AC_CONFIG_COMMANDS.
2319 * configure: Re-generated.
2320 * configure.srv: Replace arch-i386.o with arch/i386.o.
2321 Replace arch-amd64.o with arch/amd64.o.
2322
5bfda255
YQ
23232017-10-16 Yao Qi <yao.qi@linaro.org>
2324
2325 * configure: Regenerated.
2326
9c80ecd6
SM
23272017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
2328
2329 * inferiors.h: (struct inferior_list): Remove.
2330 (struct inferior_list_entry); Remove.
2331 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
2332 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
2333 get_first_inferior): Remove.
2334 (for_each_inferior, for_each_inferior_with_data, find_inferior,
2335 find_inferior_id, find_inferior_in_random): Change signature.
2336 * inferiors.c (all_threads): Change type to
2337 std::list<thread_info *>.
2338 (get_thread): Remove macro.
2339 (find_inferior, find_inferior_id): Change signature, implement
2340 using find_thread.
2341 (find_inferior_in_random): Change signature, implement using
2342 find_thread_in_random.
2343 (for_each_inferior, for_each_inferior_with_data): Change
2344 signature, implement using for_each_thread.
2345 (add_inferior_to_list, remove_inferior): Remove.
2346 (add_thread, get_first_thread, thread_of_pid,
2347 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
2348 (get_first_inferior, one_inferior_p, clear_inferior_list):
2349 Remove.
2350 (clear_inferiors, get_thread_process): Update.
2351 * gdbthread.h: Include <list>.
2352 (struct thread_info) <entry>: Remove field.
2353 <id>: New field.
2354 (all_threads): Change type to std::list<thread_info *>.
2355 (get_first_inferior): Add doc.
2356 (find_thread, for_each_thread, find_thread_in_random): New
2357 functions.
2358 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
2359 * linux-arm-low.c (update_registers_callback): Update.
2360 * linux-low.c (second_thread_of_pid_p): Update.
2361 (kill_one_lwp_callback, linux_detach_lwp_callback,
2362 delete_lwp_callback, status_pending_p_callback, same_lwp,
2363 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
2364 iterate_over_lwps, not_stopped_callback,
2365 resume_stopped_resumed_lwps, count_events_callback,
2366 select_singlestep_lwp_callback, select_event_lwp_callback,
2367 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
2368 suspend_and_send_sigstop_callback, wait_for_sigstop,
2369 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
2370 lwp_running, linux_set_resume_request, resume_status_pending_p,
2371 need_step_over_p, start_step_over, linux_resume_one_thread,
2372 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
2373 reset_lwp_ptrace_options_callback): Update.
2374 * linux-mips-low.c (update_watch_registers_callback): Update.
2375 * regcache.c (regcache_invalidate_one, regcache_invalidate):
2376 Update.
2377 (free_register_cache_thread_one): Remove.
2378 (regcache_release): Update.
2379 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
2380 handle_qxfer_threads_worker): Update.
2381 (handle_query): Update, use list iterator.
2382 (visit_actioned_threads, handle_pending_status,
2383 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
2384 clear_pending_status_callback, set_pending_status_callback,
2385 find_status_pending_thread_callback, handle_status,
2386 process_serial_event): Update.
2387 * target.c (thread_search_callback): Update.
2388 * thread-db.c (thread_db_get_tls_address): Update.
2389 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
2390 Update.
2391 * win32-i386-low.c (update_debug_registers_callback): Update.
2392 * win32-low.c (delete_thread_info, child_delete_thread,
2393 continue_one_thread, suspend_one_thread,
2394 get_child_debug_event): Adjust.
2395
9179355e
SM
23962017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
2397
2398 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
2399 * inferiors.h: Include <list>.
2400 (struct process_info) <entry>: Remove field.
2401 <pid>: New field.
2402 (pid_of): Change macro to function.
2403 (ptid_of, lwpid_of): Remove macro.
2404 (all_processes): Change type to std::list<process_info *>.
2405 (ALL_PROCESSES): Remove macro.
2406 (for_each_process, find_process): New function.
2407 * inferiors.c (all_processes): Change type to
2408 std::list<process_info *>.
2409 (find_thread_process): Adjust.
2410 (add_process): Likewise.
2411 (remove_process): Likewise.
2412 (find_process_pid): Likewise.
2413 (get_first_process): Likewise.
2414 (started_inferior_callback): Remove.
2415 (have_started_inferiors_p): Adjust.
2416 (attached_inferior_callback): Remove.
2417 (have_attached_inferiors_p): Adjust.
2418 * linux-low.c (check_zombie_leaders): Likewise.
2419 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
2420 (x86_linux_update_xmltarget): Adjust.
2421 * server.c (handle_query): Likewise.
2422 (gdb_reattached_process): Remove.
2423 (handle_status): Adjust.
2424 (kill_inferior_callback): Likewise.
2425 (detach_or_kill_inferior): Remove.
2426 (print_started_pid): Likewise.
2427 (print_attached_pid): Likewise.
2428 (detach_or_kill_for_exit): Update.
2429 (process_serial_event): Likewise.
2430 * linux-arm-low.c (arm_new_fork): Likewise.
2431
c9cb8905
SM
24322017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
2433
2434 * dll.h: Include <list>.
2435 (struct dll_info): Add constructor.
2436 <entry>: Remove field.
2437 (all_dlls): Change type to std::list<dll_info>.
2438 * dll.c: Include <algorithm>.
2439 (get_dll): Remove macro.
2440 (all_dlls): Change type to std::list<dll_info *>.
2441 (free_one_dll): Remove.
2442 (match_dll): Likewise.
2443 (loaded_dll): Adjust.
2444 (unloaded_dll): Adjust to all_dlls type change, use
2445 std::find_if. Inline code from match_dll.
2446 (clear_dlls): Adjust to all_dlls type change.
2447 * server.c (emit_dll_description): Remove.
2448 (handle_qxfer_libraries): Adjust to all_dlls type change,
2449 integrate emit_dll_description's functionality.
2450
04ec7890
SM
24512017-10-12 Simon Marchi <simon.marchi@ericsson.com>
2452
2453 * linux-low.h (struct linux_target_ops) <delete_process>: New
2454 field.
2455 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
2456 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
2457 (struct linux_target_ops): Add delete_process callback.
2458 * linux-arm-low.c (arm_delete_process): New.
2459 (struct linux_target_ops): Add delete_process callback.
2460 * linux-bfin-low.c (struct linux_target_ops): Likewise.
2461 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
2462 * linux-m32r-low.c (struct linux_target_ops): Likewise.
2463 * linux-mips-low.c (mips_linux_delete_process): New.
2464 (struct linux_target_ops): Add delete_process callback.
2465 * linux-ppc-low.c (struct linux_target_ops): Likewise.
2466 * linux-s390-low.c (struct linux_target_ops): Likewise.
2467 * linux-sh-low.c (struct linux_target_ops): Likewise.
2468 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
2469 * linux-tile-low.c (struct linux_target_ops): Likewise.
2470 * linux-x86-low.c (x86_linux_delete_process): New.
2471 (struct linux_target_ops): Add delete_process callback.
2472 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
2473
466eecee
SM
24742017-10-12 Simon Marchi <simon.marchi@ericsson.com>
2475
2476 * linux-aarch64-low.c (the_low_target): Add thread delete
2477 callback.
2478 * linux-arm-low.c (arm_delete_thread): New function.
2479 (the_low_target): Add thread delete callback.
2480 * linux-bfin-low.c (the_low_target): Likewise.
2481 * linux-crisv32-low.c (the_low_target): Likewise.
2482 * linux-low.c (delete_lwp): Invoke delete_thread callback if
2483 set.
2484 * linux-low.h (struct linux_target_ops) <delete_thread>: New
2485 field.
2486 * linux-m32r-low.c (the_low_target): Add thread delete callback.
2487 * linux-mips-low.c (mips_linux_delete_thread): New function.
2488 (the_low_target): Add thread delete callback.
2489 * linux-ppc-low.c (the_low_target): Likewise.
2490 * linux-s390-low.c (the_low_target): Likewise.
2491 * linux-sh-low.c (the_low_target): Likewise.
2492 * linux-tic6x-low.c (the_low_target): Likewise.
2493 * linux-tile-low.c (the_low_target): Likewise.
2494 * linux-x86-low.c (the_low_target): Likewise.
2495 * linux-xtensa-low.c (the_low_target): Likewise.
2496
b79f7801
YZ
24972017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
2498
2499 * win32-low.c: Include "common-inferior.h".
2500
bc3b087d
SDJ
25012017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
2502
2503 * inferiors.c (set_inferior_cwd): New function.
2504 * server.c (handle_general_set): Handle QSetWorkingDir packet.
2505 (handle_query): Inform that QSetWorkingDir is supported.
2506 * win32-low.c (create_process): Pass the inferior's cwd to
2507 CreateProcess.
2508
d092c5a2
SDJ
25092017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
2510
2511 * inferiors.c (current_inferior_cwd): New global variable.
2512 (get_inferior_cwd): New function.
2513 * inferiors.h (struct process_info) <cwd>: New field.
2514
7da0a886
SDJ
25152017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
2516
2517 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
2518 (OBS): Add gdb_tilde_expand.o.
2519
289a6840
SM
25202017-10-02 Simon Marchi <simon.marchi@ericsson.com>
2521
2522 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
2523 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
2524
256642e8
PA
25252017-09-29 Pedro Alves <palves@redhat.com>
2526
2527 * ax.c (gdb_parse_agent_expr): Constify.
2528 * ax.h (gdb_parse_agent_expr): Constify.
2529 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
2530 Constify.
2531 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
2532 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
2533 * remote-utils.h (read_ptid): Constify.
2534 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
2535 (process_point_options, process_serial_event): Constify.
2536 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
2537 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
2538 (cmd_qtbuffer): Constify.
2539
5b9ca4d4
PA
25402017-09-29 Pedro Alves <palves@redhat.com>
2541
2542 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
2543 fails.
2544
94c207e0
PA
25452017-09-29 Pedro Alves <palves@redhat.com>
2546
2547 * linux-low.c (handle_extended_wait): Pass parent thread instead
2548 of process to thread_db_notice_clone.
2549 * linux-low.h (thread_db_notice_clone): Replace parent process
2550 parameter with parent thread parameter.
2551 * thread-db.c (find_one_thread): Add comment.
2552 (thread_db_notice_clone): Replace parent process parameter with
2553 parent thread parameter. Temporarily switch to the parent thread.
2554
75352e28
SDJ
25552017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
2556
2557 * gdbthread.h: Include "common-gdbthread.h".
2558 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
2559 "if" when validating the ptid.
2560 * remote-utils.c: Include "gdbthread.h".
2561 (prepare_resume_reply): Use "switch_to_thread".
2562 * target.c (done_accessing_memory): Likewise.
2563
ad339634
AA
25642017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
2565
2566 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
2567 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
2568 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
2569 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
2570 s390x-gs-linux64-ipa.o to ipa_obj.
2571 * linux-s390-low.c (HWCAP_S390_GS): New define.
2572 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
2573 New functions.
2574 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
2575 (s390_arch_setup): Check for guarded-storage support and choose
2576 appropriate tdesc.
2577 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
2578 init_registers_s390x_gs_linux64.
2579 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
2580 enum value.
2581 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
2582 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
2583
cc4d742f
SM
25842017-09-22 Simon Marchi <simon.marchi@ericsson.com>
2585
2586 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
2587
f6327dcb
KB
25882017-09-21 Kevin Buettner <kevinb@redhat.com>
2589
2590 * linux-low.h (struct lwp_info): Add new field, thread_handle.
2591 (thread_db_thread_handle): Declare.
2592 * linux-low.c (linux_target_ops): Initialize thread_handle.
2593 * server.c (handle_qxfer_threads_worker): Add support for
2594 "handle" attribute.
2595 * target.h (struct target_ops): Add new function pointer,
2596 thread_handle.
2597 (target_thread_handle): Define.
2598 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
2599 field in lwp.
2600 (thread_db_thread_handle): New function.
2601
86299109
KB
26022017-09-21 Kevin Buettner <kevinb@redhat.com>
2603
2604 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
2605 * linux-low.h (thread_db_notice_clone): Declare.
2606 * thread-db.c (thread_db_notice_clone): New function.
2607
f557a88a
PA
26082017-09-21 Pedro Alves <palves@redhat.com>
2609
2610 * server.c (gdb_read_memory, handle_status, process_serial_event)
2611 (handle_serial_event, handle_target_event): Adjust to
2612 set_desired_thread prototype change.
2613 * target.c (set_desired_thread): Remove 'use_general' parameter
2614 and adjust.
2615 * target.h (set_desired_thread): Remove 'use_general' parameter.
2616
223ffa71
TT
26172017-09-20 Tom Tromey <tom@tromey.com>
2618
2619 * target.c (target_terminal::terminal_state): Define.
2620 (target_terminal::init): Rename from target_terminal_init.
2621 (target_terminal::inferior): Rename from
2622 target_terminal_inferior.
2623 (target_terminal::ours): Rename from target_terminal_ours.
2624 (target_terminal::ours_for_output, target_terminal::info): New.
2625
04fd3ba9
SM
26262017-09-16 Simon Marchi <simon.marchi@ericsson.com>
2627
2628 * server.c (accumulate_file_name_length): Remove.
2629 (emit_dll_description): Adjust to std::string change.
2630 (handle_qxfer_libraries): Use std::string to hold document.
2631
5e187554
SM
26322017-09-16 Simon Marchi <simon.marchi@ericsson.com>
2633
2634 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
2635 return type of xml_escape_text.
2636 * server.c (emit_dll_description): Likewise.
2637
1526853e
SM
26382017-09-16 Simon Marchi <simon.marchi@ericsson.com>
2639
2640 * server.c (captured_main): Accept argument for --selftest.
2641 Update run_tests call.
2642 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
2643 when registering selftests.
2644
c4dfafab
SDJ
26452017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
2646
2647 * regcache.c (get_thread_regcache): Update code to use "std::vector"
2648 instead of "VEC" for "target_desc.reg_defs".
2649 (regcache_cpy): Likewise.
2650 (registers_to_string): Likewise.
2651 (registers_from_string): Likewise.
2652 (find_regno): Likewise.
2653 (supply_regblock): Likewise.
2654 (regcache_raw_read_unsigned): Likewise.
2655 * tdesc.c (init_target_desc): Likewise.
2656 (tdesc_create_reg): Likewise.
2657 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
2658 (struct target_desc) <reg_defs>: Convert to "std::vector".
2659 (target_desc): Do not initialize "reg_defs".
2660 (~target_desc): Update code to use "std::vector" instead of "VEC"
2661 for "target_desc.reg_defs".
2662 (operator==): Likewise.
2663
124aceb4
SM
26642017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2665
2666 * inferiors.h (thread_to_gdb_id): Remove.
2667 * inferiors.c (thread_to_gdb_id): Remove.
2668 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
2669 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
2670 lynx_store_registers, lynx_read_memory, lynx_write_memory):
2671 Likewise.
2672 * nto-low.c (nto_fetch_registers, nto_store_registers,
2673 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
2674
96cde54f
SM
26752017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2676
2677 * inferiors.h (gdb_id_to_thread_id): Remove.
2678 * inferiors.c (gdb_id_to_thread_id): Remove.
2679 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
2680 removal. Move pid declaration closer to where it's used.
2681
e8ca139e
SM
26822017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2683
2684 * server.c (handle_detach): New function.
2685 (process_serial_event): Move code out, call handle_detach.
2686
f8a4e119
SM
26872017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2688
2689 * server.c (require_running): Rename to ...
2690 (require_running_or_return): ... this ...
2691 (require_running_or_break): ... and this.
2692 (handle_query, process_serial_event): Adjust.
2693
0eb0a407
SM
26942017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2695
2696 * linux-low.c (linux_set_resume_request): Remove unused
2697 variables.
2698
785922a5
SM
26992017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2700
2701 * server.c (first_thread_of): Remove.
2702 (process_serial_event): Replace usage of first_thread_of with
2703 find_any_thread_of_pid.
2704 * tracepoint.c (same_process_p): Remove.
2705 (gdb_agent_about_to_close): Replace usage of same_process_p with
2706 find_any_thread_of_pid.
2707 * linux-x86-low.c (same_process_callback): Remove.
2708 (x86_arch_setup_process_callback): Replace usage of
2709 same_process_callback with find_any_thread_of_pid.
2710 * thread-db.c (any_thread_of): Remove.
2711 (switch_to_process): Replace usage of any_thread_of with
2712 find_any_thread_of_pid.
2713 * inferiors.c (thread_pid_matches_callback): Remove.
2714 (find_thread_process): Adjust to use find_any_thread_of_pid.
2715
a059f00c
SDJ
27162017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
2717
2718 * regcache.c (get_thread_regcache): Guard calls to "memset"
e79be6e5 2719 with "!VEC_empty".
a059f00c 2720
cc397f3a
SDJ
27212017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
2722
2723 * linux-low.c (handle_extended_wait): Use
2724 "allocate_target_description" instead of "XNEW".
2725 * linux-x86-low.c (initialize_low_arch): Likewise.
2726
22916b07
YQ
27272017-09-05 Yao Qi <yao.qi@linaro.org>
2728
2729 * configure.srv (srv_i386_regobj): Remove.
2730 (srv_amd64_regobj): Remove.
2731 (srv_regobj): Set it to "" for x86 non-linux targets.
2732 * linux-x86-tdesc.c (i386_linux_read_description):
2733 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
2734 (init_registers_i386): Remove the declaration.
2735 (tdesc_i386): Remove the declaration.
2736 (lynx_i386_arch_setup): Call i386_create_target_description.
2737 * nto-x86-low.c: Likewise.
2738 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
2739 [!__x86_64__]: include arch/i386.h.
2740 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
2741
38602d55
YQ
27422017-09-05 Yao Qi <yao.qi@linaro.org>
2743
2744 * configure.srv (srv_amd64_linux_xmlfiles): Remove
2745 i386/amd64-XXX-linux from it.
2746
44b886ff
YQ
27472017-09-05 Yao Qi <yao.qi@linaro.org>
2748
2749 * configure.srv: Empty srv_amd64_linux_regobj if $development is
2750 false.
2751 (ipa_amd64_linux_regobj): Remove.
2752 (ipa_x32_linux_regobj): Remove.
2753
b4570e4b
YQ
27542017-09-05 Yao Qi <yao.qi@linaro.org>
2755
2756 * Makefile.in (arch-amd64.o): New rule.
2757 * configure.srv: Append arch-amd64.o.
2758 * linux-amd64-ipa.c: Include common/x86-xstate.h.
2759 (get_ipa_tdesc): Call amd64_linux_read_description.
2760 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
2761 and init_registers_amd64_XXX.
2762 * linux-x86-low.c (x86_linux_read_description): Call
2763 amd64_linux_read_description.
2764 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
2765 (initialize_low_arch): Don't call init_registers_x32_XXX and
2766 init_registers_amd64_XXX.
2767 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
2768 and tdesc_amd64_XXX.
2769 [__x86_64__] (amd64_tdesc_test): New function.
2770 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
2771 and init_registers_amd64_XXX.
2772 * linux-x86-tdesc.c: Include arch/amd64.h.
2773 (xcr0_to_tdesc_idx): New function.
2774 (i386_linux_read_description): New function.
2775 (amd64_get_ipa_tdesc_idx): New function.
2776 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
2777 (amd64_get_ipa_tdesc): Declare.
2778
d1f28ea2
YQ
27792017-09-05 Yao Qi <yao.qi@linaro.org>
2780
2781 * configure.srv (srv_i386_linux_xmlfiles): Remove
2782 i386/i386-XXX-linux.xml from it.
2783
25a93583
YQ
27842017-09-05 Yao Qi <yao.qi@linaro.org>
2785
2786 * configure.srv: Set srv_i386_linux_regobj empty if $development
2787 is false.
2788 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
2789 initialize_low_tdesc.
2790 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
2791 with #if initialize_low_tdesc.
2792 * linux-x86-tdesc-selftest.c: New file.
2793 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
2794
5f035c07
YQ
27952017-09-05 Yao Qi <yao.qi@linaro.org>
2796
2797 * Makefile.in (arch-i386.o): New rule.
2798 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
2799 (x86_64-*-linux*): Likewise.
2800 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
2801 include arch/i386.h.
2802 (i386_linux_read_description): Remove code and call
2803 i386_create_target_description.
2804 * tdesc.c (allocate_target_description): New function.
2805 * tdesc.h (set_tdesc_architecture): Remove declaration.
2806 (set_tdesc_osabi): Likewise.
2807
0abe8a89
YQ
28082017-09-05 Yao Qi <yao.qi@linaro.org>
2809
2810 * linux-x86-tdesc.c: Don't include <inttypes.h>.
2811 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
2812 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
2813 .xmltarget.
2814 * server.c (get_features_xml): Call tdesc_get_features_xml.
2815 * tdesc.c (set_tdesc_architecture): New function.
2816 (set_tdesc_osabi): New function.
2817 (tdesc_get_features_xml): New function.
2818 (tdesc_create_feature): Add an argument.
2819 * tdesc.h (struct target_desc) <features>: New field.
2820 <arch, osabi>: New field.
2821 (~target_desc): xfree features, arch, and osabi.
2822 (target_desc::oerator==): Don't compare .xmltarget.
2823 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
2824 (set_tdesc_osabi): Likewise.
2825 (tdesc_get_features_xml): Likewise.
2826
0a188386
YQ
28272017-09-05 Yao Qi <yao.qi@linaro.org>
2828
2829 * linux-x86-tdesc.c: Include selftest.h.
2830 (i386_tdesc_test): New function.
2831 (initialize_low_tdesc): Call selftests::register_test.
2832 * tdesc.h: Include regdef.h.
2833 (target_desc): Override operator == and !=.
2834
f49ff000
YQ
28352017-09-05 Yao Qi <yao.qi@linaro.org>
2836
2837 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
2838 (ipa_obj): Likewise.
2839 * linux-i386-ipa.c: Include common/x86-xstate.h
2840 (get_ipa_tdesc): Call i386_linux_read_description.
2841 (initialize_low_tracepoint): Don't call init_registers_XXX
2842 functions, call initialize_low_tdesc instead.
2843 * linux-x86-low.c (x86_linux_read_description): Call
2844 i386_linux_read_description.
2845 (initialize_low_arch): Don't call init_registers_i386_XXX
2846 functions, call initialize_low_tdesc.
2847 * linux-x86-tdesc.c: New file.
2848 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
2849 (i386_get_ipa_tdesc_idx): Declare.
2850 (i386_get_ipa_tdesc): Declare.
2851 (initialize_low_tdesc): Declare.
2852
2b68ef2f
YQ
28532017-09-05 Yao Qi <yao.qi@linaro.org>
2854
2855 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
2856 instead of 0.
2857
f7000548
YQ
28582017-09-05 Yao Qi <yao.qi@linaro.org>
2859
2860 * Makefile.in (IPA_OBJS): Add vec-ipa.o
2861 * regcache.c (get_thread_regcache): Use VEC_length.
2862 (init_register_cache): Likewise.
2863 (regcache_cpy): Likewise.
2864 (registers_to_string): Iterate reg_defs via VEC_iterate.
2865 (find_regno): Likewise.
2866 (find_register_by_number): Use VEC_index.
2867 (register_size): Call find_register_by_number.
2868 (register_data): Call find_register_by_number.
2869 (supply_regblock): Use VEC_length.
2870 (regcache_raw_read_unsigned): Likewise.
2871 * tdesc.c (init_target_desc): Iterate reg_defs via
2872 VEC_iterate.
2873 (default_description): Update initializer.
2874 (copy_target_description): Don't update field num_registers.
2875 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
2876 <num_registers>: Remove.
2877
50a421ac
SM
28782017-09-04 Simon Marchi <simon.marchi@ericsson.com>
2879
2880 * Makefile.in (.SECONDARY): Define target.
2881
23fdd69e
SM
28822017-09-03 Simon Marchi <simon.marchi@ericsson.com>
2883
2884 * linux-low.c (linux_wait_1): Adjust.
2885 * server.c (queue_stop_reply_callback): Adjust.
2886
0a2dde4a
SDJ
28872017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
2888
2889 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
2890 QEnvironmentUnset and QEnvironmentReset packets.
2891 (handle_query): Inform remote that QEnvironmentHexEncoded,
2892 QEnvironmentUnset and QEnvironmentReset are supported.
2893
6afd337d
SM
28942017-08-25 Simon Marchi <simon.marchi@ericsson.com>
2895
2896 * inferiors.h (inferior_target_data): Rename to ...
2897 (thread_target_data): ... this.
2898 (inferior_regcache_data): Rename to ...
2899 (thread_regcache_data): ... this.
2900 (set_inferior_regcache_data): Rename to ...
2901 (set_thread_regcache_data): ... this.
2902 * inferiors.c (inferior_target_data): Rename to ...
2903 (thread_target_data): ... this.
2904 (inferior_regcache_data): Rename to ...
2905 (thread_regcache_data): ... this.
2906 (set_inferior_regcache_data): Rename to ...
2907 (set_thread_regcache_data): ... this.
2908 (free_one_thread): Update.
2909 * linux-low.h (get_thread_lwp): Update.
2910 * regcache.c (get_thread_regcache): Update.
2911 (regcache_invalidate_thread): Update.
2912 (free_register_cache_thread): Update.
2913 * win32-i386-low.c (update_debug_registers_callback): Update.
2914 (win32_get_current_dr): Update.
2915 * win32-low.c (thread_rec): Update.
2916 (delete_thread_info): Update.
2917 (continue_one_thread): Update.
2918 (suspend_one_thread): Update.
2919
a160cc46
SM
29202017-08-24 Simon Marchi <simon.marchi@ericsson.com>
2921
2922 * inferiors.c (set_inferior_target_data): Remove.
2923 * inferiors.h (set_inferior_target_data): Remove.
2924
6d580b63
YQ
29252017-08-18 Yao Qi <yao.qi@linaro.org>
2926
2927 * Makefile.in (OBS): Add selftest.o.
2928 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
2929 * configure, config.in: Re-generated.
2930 * server.c: Include common/sefltest.h.
2931 (captured_main): Handle option --selftest.
2932
f5a29eb0
YQ
29332017-08-09 Yao Qi <yao.qi@linaro.org>
2934
2935 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
2936 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
2937 i386-avx-mpx.o and i386-mmx.o.
2938 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
2939 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
2940 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
2941 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
2942 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
2943 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
2944 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
2945 i386/amd64-avx-mpx.xml.
2946
57757c2f
YQ
29472017-08-09 Yao Qi <yao.qi@linaro.org>
2948
2949 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
2950 and x32-avx-avx512.o.
2951 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
2952 i386/x32-avx-avx512.xml.
2953
229d26fc
SM
29542017-07-26 Simon Marchi <simon.marchi@ericsson.com>
2955
2956 * tracepoint.h (enum class fast_tpoint_collect_result): New
2957 enumeration.
2958 (fast_tracepoint_collecting): Change return type to
2959 fast_tpoint_collect_result.
2960 * tracepoint.c (fast_tracepoint_collecting): Likewise.
2961 * linux-low.h: Include tracepoint.h.
2962 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
2963 fast_tpoint_collect_result.
2964 * linux-low.c (handle_tracepoints): Adjust.
2965 (linux_fast_tracepoint_collecting): Change return type to
2966 fast_tpoint_collect_result.
2967 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
2968 linux_wait_1, stuck_in_jump_pad_callback,
2969 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
2970 proceed_one_lwp): Adjust to type change.
2971
2e1e43e1
YQ
29722017-07-10 Yao Qi <yao.qi@linaro.org>
2973
2974 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
2975
adc764e7
YQ
29762017-06-29 Yao Qi <yao.qi@linaro.org>
2977
2978 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
2979 Remove.
2980 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
2981
a206891a
SM
29822017-06-20 Simon Marchi <simon.marchi@ericsson.com>
2983
2984 * Makefile.in (IPA_OBJS): Sort and format one item per line.
2985
9a6c7d9c
SDJ
29862017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
2987
2988 * linux-low.c (linux_create_inferior): Adjust code to access the
2989 environment information via 'gdb_environ' class.
2990 * lynx-low.c (lynx_create_inferior): Likewise.
2991 * server.c (our_environ): Make it an instance of 'gdb_environ'.
2992 (get_environ): Return a pointer to 'our_environ'.
2993 (captured_main): Initialize 'our_environ'.
2994 * server.h (get_environ): Adjust prototype.
2995 * spu-low.c (spu_create_inferior): Adjust code to access the
2996 environment information via 'gdb_environ' class.
2997
ae3e2ccf
SM
29982017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2999
3000 * linux-low.c (linux_read_memory, linux_write_memory): Remove
3001 usage of "register" keyword.
3002
3e019bdc
SM
30032017-06-17 Simon Marchi <simon.marchi@ericsson.com>
3004
3005 * configure: Re-generate.
3006
8465943a
SM
30072017-06-17 Simon Marchi <simon.marchi@ericsson.com>
3008
3009 * configure: Re-generate.
3010
cf0dd6f0
SM
30112017-06-17 Simon Marchi <simon.marchi@ericsson.com>
3012
3013 * Makefile.in (COMPILE.pre): Add "-x c++".
3014
9845682b
SDJ
30152017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
3016
3017 * fork-child.c: Conditionally include <signal.h>.
3018
aefd8b33
SDJ
30192017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
3020
3021 * server.c (handle_general_set): Handle new packet
3022 "QStartupWithShell".
3023 (handle_query): Add "QStartupWithShell" to the list of supported
3024 packets.
3025 (gdbserver_usage): Add help text explaining the
3026 new "--startup-with-shell" and "--no-startup-with-shell" CLI
3027 options.
3028 (captured_main): Recognize and act upon the presence of the new
3029 CLI options.
3030
2090129c
SDJ
30312017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
3032 Pedro Alves <palves@redhat.com>
3033
3034 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
3035 * configure: Regenerate.
3036 * configure.srv (srv_linux_obj): Add "fork-child.o" and
3037 "fork-inferior.o".
3038 (i[34567]86-*-lynxos*): Likewise.
3039 (spu*-*-*): Likewise.
3040 * fork-child.c: New file.
3041 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
3042 and "environ.h".
3043 (linux_ptrace_fun): New function.
3044 (linux_create_inferior): Adjust function prototype to reflect
3045 change on "target.h". Adjust function code to use
3046 "fork_inferior".
3047 (linux_request_interrupt): Delete "signal_pid".
3048 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
3049 (lynx_ptrace_fun): New function.
3050 (lynx_create_inferior): Adjust function prototype to reflect
3051 change on "target.h". Adjust function code to use
3052 "fork_inferior".
3053 * nto-low.c (nto_create_inferior): Adjust function prototype and
3054 code to reflect change on "target.h". Update comments.
3055 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
3056 "common-terminal.h" and "environ.h".
3057 (terminal_fd): Moved to fork-child.c.
3058 (old_foreground_pgrp): Likewise.
3059 (restore_old_foreground_pgrp): Likewise.
3060 (last_status): Make it global.
3061 (last_ptid): Likewise.
3062 (our_environ): New variable.
3063 (startup_with_shell): Likewise.
3064 (program_name): Likewise.
3065 (program_argv): Rename to...
3066 (program_args): ...this.
3067 (wrapper_argv): New variable.
3068 (start_inferior): Delete function.
3069 (get_exec_wrapper): New function.
3070 (get_exec_file): Likewise.
3071 (get_environ): Likewise.
3072 (prefork_hook): Likewise.
3073 (post_fork_inferior): Likewise.
3074 (postfork_hook): Likewise.
3075 (postfork_child_hook): Likewise.
3076 (handle_v_run): Update code to deal with arguments coming from the
3077 remote host. Update calls from "start_inferior" to
3078 "create_inferior".
3079 (captured_main): Likewise. Initialize environment variable. Call
3080 "have_job_control".
3081 * server.h (post_fork_inferior): New prototype.
3082 (get_environ): Likewise.
3083 (last_status): Declare.
3084 (last_ptid): Likewise.
3085 (signal_pid): Likewise.
3086 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
3087 (spu_ptrace_fun): New function.
3088 (spu_create_inferior): Adjust function prototype to reflect change
3089 on "target.h". Adjust function code to use "fork_inferior".
3090 * target.c (target_terminal_init): New function.
3091 (target_terminal_inferior): Likewise.
3092 (target_terminal_ours): Likewise.
3093 * target.h: Include <vector>.
3094 (struct target_ops) <create_inferior>: Update prototype.
3095 (create_inferior): Update macro.
3096 * utils.c (gdb_flush_out_err): New function.
3097 * win32-low.c (win32_create_inferior): Adjust function prototype
3098 and code to reflect change on "target.h".
3099
043a4934
SDJ
31002017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
3101
3102 * inferiors.c (switch_to_thread): New function.
3103
15652511
SDJ
31042017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
3105
3106 * Makefile.in (SFILE): Add "common/job-control.c".
3107 (OBS): Add "job-control.o".
3108
21ea5acd
SDJ
31092017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
3110
3111 * Makefile: Remove "@host_makefile_frag@".
3112
e13cb306
PA
31132017-05-05 Pedro Alves <palves@redhat.com>
3114
3115 * configure: Regenerate.
3116
c94fee56
SDJ
31172017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
3118
3119 * configure: Regenerate.
3120
a0ff9e1a
SM
31212017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
3122
3123 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
3124 software_single_step change of return type to
3125 std::vector<CORE_ADDR>.
3126 * linux-low.c (install_software_single_step_breakpoints):
3127 Likewise.
3128 * linux-low.h (install_software_single_step_breakpoints):
3129 Likewise.
3130
be628ab8
SDJ
31312017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
3132
3133 * remote-utils.c: Include "gdb_termios.h" instead of
3134 "terminal.h".
3135 * terminal.h: Delete file.
3136
7c5ded6a
SDJ
31372017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
3138
3139 * server.c: Include <vector>.
3140 <program_argv, wrapper_argv>: Convert to std::vector.
3141 (start_inferior): Rewrite function to use C++.
3142 (handle_v_run): Likewise. Update code that calculates the argv
3143 based on the vRun packet; use C++.
3144 (captured_main): Likewise.
3145
436252de
SM
31462017-04-06 Simon Marchi <simon.marchi@ericsson.com>
3147
3148 * server.c (handle_v_cont): Initialize thread_resume::thread
3149 with null_ptid.
3150
9bf2a700
PA
31512017-04-05 Pedro Alves <palves@redhat.com>
3152
3153 * configure: Regenerate.
3154
a121b7c1
PA
31552017-04-05 Pedro Alves <palves@redhat.com>
3156
3157 * gdbreplay.c (sync_error): Constify.
3158 * linux-x86-low.c (push_opcode): Constify.
3159
21c8a587
PA
31602017-04-05 Pedro Alves <palves@redhat.com>
3161
3162 * win32-low.c (get_child_debug_event)
3163 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
3164 Report TARGET_WAITKIND_SPURIOUS instead.
3165
fb32b4f7
PA
31662017-04-05 Pedro Alves <palves@redhat.com>
3167
e79be6e5
SM
3168 * remote-utils.c (remote_prepare, remote_open): Constify.
3169 * remote-utils.h (remote_prepare, remote_open): Constify.
3170 * server.c (captured_main): Constify 'port' handling.
fb32b4f7 3171
65dd1e59
SM
31722017-04-04 Simon Marchi <simon.marchi@ericsson.com>
3173
3174 * Makefile.in (clean): Clear .deps.
3175
8fa5b777
SM
31762017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
3177
3178 * .gitignore: Remove generated files, replace with wildcard.
3179 * (clean): Replace removal of generated files with wildcard.
3180 (version.c): Replace with...
3181 (version-generated.c): ...this.
3182 (xml-builtin.c): Replace with...
3183 (xml-builtin-generated.c): ...this.
3184 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
3185 (%.c: *regformats*): Replace with...
3186 (%-generated.c: *regformats*): ...this.
3187
a12e714b
MF
31882017-03-27 Max Filippov <jcmvbkbc@gmail.com>
3189
3190 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
3191 (xtensa_fill_gregset): Call collect_register_by_name for
3192 threadptr register.
3193 (xtensa_store_gregset): Call supply_register_by_name for
3194 threadptr register.
3195
1a09b50a
MF
31962017-03-27 Max Filippov <jcmvbkbc@gmail.com>
3197
3198 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
3199 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
3200 (xtensa_store_gregset): Call supply_register for all registers in
3201 a0_regnum..a0_regnum + C0_NREGS range.
3202
1a01e7c6
SM
32032017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3204
3205 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
3206 (ax-ipa.o: ax.c): Remove.
3207 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
3208 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
3209 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
3210 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
3211 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
3212
36bc18a8
SM
32132017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3214
3215 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
3216 (print-utils-ipa.o: ../common/print-utils.c): Remove.
3217 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
3218 (errors-ipa.o: ../common/errors.c): Remove.
3219 (format-ipa.o: ../common/format.c): Remove.
3220 (common-utils-ipa.o: ../common/common-utils.c): Remove.
3221
a8ebe3d5
SM
32222017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3223
3224 * Makefile.in (%-ipa.o: %.c): New rule.
3225 (tracepoint-ipa.o: tracepoint.c): Remove.
3226 (utils-ipa.o: utils.c): Remove.
3227 (remote-utils-ipa.o: remote-utils.c): Remove.
3228 (regcache-ipa.o: regcache.c): Remove.
3229 (i386-linux-ipa.o: i386-linux.c): Remove.
3230 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
3231 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
3232 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
3233 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
3234 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
3235 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
3236 (amd64-linux-ipa.o: amd64-linux.c): Remove.
3237 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
3238 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
3239 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
3240 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
3241 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
3242 (aarch64-ipa.o: aarch64.c): Remove.
3243 (s390-linux32-ipa.o: s390-linux32.c): Remove.
3244 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
3245 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
3246 (s390-linux64-ipa.o: s390-linux64.c): Remove.
3247 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
3248 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
3249 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
3250 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
3251 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
3252 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
3253 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
3254 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
3255 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
3256 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
3257 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
3258 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
3259 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
3260 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
3261 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
3262 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
3263 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
3264 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
3265 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
3266 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
3267 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
3268 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
3269 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
3270 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
3271 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
3272 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
3273 (tdesc-ipa.o: tdesc.c): Remove.
3274 (x32-linux-ipa.o: x32-linux.c): Remove.
3275 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
3276 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
3277
50cfacb7
SM
32782017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3279
3280 * Makefile.in (%.o: ../arch/%.c): New rule.
3281 (arm.o: ../arch/arm.c): Remove.
3282 (arm-linux.o: ../arch/arm-linux.c): Remove.
3283 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
3284 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
3285
c5a22423
SM
32862017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3287
3288 * Makefile.in (%.o: ../nat/%.c): New rule.
3289 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
3290 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
3291 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
3292 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
3293 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
3294 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
3295 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
3296 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
3297 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
3298 (linux-personality.o: ../nat/linux-personality.c): Remove.
3299 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
3300 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
3301 (x86-linux.o: ../nat/x86-linux.c): Remove.
3302 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
3303 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
3304
6bda016b
SM
33052017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3306
3307 * Makefile.in (%.o: ../common/%.c): New rule.
3308 (signals.o: ../common/signals.c): Remove.
3309 (print-utils.o: ../common/print-utils.c): Remove.
3310 (rsp-low.o: ../common/rsp-low.c): Remove.
3311 (common-utils.o: ../common/common-utils.c): Remove.
3312 (posix-strerror.o: ../common/posix-strerror.c): Remove.
3313 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
3314 (vec.o: ../common/vec.c): Remove.
3315 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
3316 (xml-utils.o: ../common/xml-utils.c): Remove.
3317 (ptid.o: ../common/ptid.c): Remove.
3318 (buffer.o: ../common/buffer.c): Remove.
3319 (format.o: ../common/format.c): Remove.
3320 (filestuff.o: ../common/filestuff.c): Remove.
3321 (agent.o: ../common/agent.c): Remove.
3322 (errors.o: ../common/errors.c): Remove.
3323 (environ.o: ../common/environ.c): Remove.
3324 (common-debug.o: ../common/common-debug.c): Remove.
3325 (cleanups.o: ../common/cleanups.c): Remove.
3326 (common-exceptions.o: ../common/common-exceptions.c): Remove.
3327 (fileio.o: ../common/fileio.c): Remove.
3328 (common-regcache.o: ../common/common-regcache.c): Remove.
3329 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
3330 (new-op.o: ../common/new-op.c): Remove.
3331 (btrace-common.o: ../common/btrace-common.c): Remove.
3332
21122961
SM
33332017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3334
3335 * Makefile.in (%.o: ../target/%.c): New rule.
3336 (waitstatus.o: ../target/waitstatus.c): Remove.
3337
c362e621
SM
33382017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3339
3340 * Makefile.in
3341 (%.c: ../regformats/%.dat,
3342 (%.c: ../regformats/arm/%.dat,
3343 (%.c: ../regformats/i386/%.dat,
3344 (%.c: ../regformats/rs6000/%.dat): New rules.
3345 (aarch64.c): Remove.
3346 (reg-arm.c): Remove.
3347 (arm-with-iwmmxt.c): Remove.
3348 (arm-with-vfpv2.c): Remove.
3349 (arm-with-vfpv3.c): Remove.
3350 (arm-with-neon.c): Remove.
3351 (reg-bfin.c): Remove.
3352 (reg-cris.c): Remove.
3353 (reg-crisv32.c): Remove.
3354 (i386.c): Remove.
3355 (i386-linux.c): Remove.
3356 (i386-avx.c): Remove.
3357 (i386-avx-linux.c): Remove.
3358 (i386-avx-avx512.c): Remove.
3359 (i386-avx-avx512-linux.c): Remove.
3360 (i386-mpx.c): Remove.
3361 (i386-mpx-linux.c): Remove.
3362 (i386-avx-mpx-avx512-pku.c): Remove.
3363 (i386-avx-mpx-avx512-pku-linux.c): Remove.
3364 (i386-avx-mpx.c): Remove.
3365 (i386-avx-mpx-linux.c): Remove.
3366 (i386-mmx.c): Remove.
3367 (i386-mmx-linux.c): Remove.
3368 (reg-ia64.c): Remove.
3369 (reg-m32r.c): Remove.
3370 (reg-m68k.c): Remove.
3371 (reg-cf.c): Remove.
3372 (mips-linux.c): Remove.
3373 (mips-dsp-linux.c): Remove.
3374 (mips64-linux.c): Remove.
3375 (mips64-dsp-linux.c): Remove.
3376 (nios2-linux.c): Remove.
3377 (powerpc-32.c): Remove.
3378 (powerpc-32l.c): Remove.
3379 (powerpc-altivec32l.c): Remove.
3380 (powerpc-cell32l.c): Remove.
3381 (powerpc-vsx32l.c): Remove.
3382 (powerpc-isa205-32l.c): Remove.
3383 (powerpc-isa205-altivec32l.c): Remove.
3384 (powerpc-isa205-vsx32l.c): Remove.
3385 (powerpc-e500l.c): Remove.
3386 (powerpc-64l.c): Remove.
3387 (powerpc-altivec64l.c): Remove.
3388 (powerpc-cell64l.c): Remove.
3389 (powerpc-vsx64l.c): Remove.
3390 (powerpc-isa205-64l.c): Remove.
3391 (powerpc-isa205-altivec64l.c): Remove.
3392 (powerpc-isa205-vsx64l.c): Remove.
3393 (s390-linux32.c): Remove.
3394 (s390-linux32v1.c): Remove.
3395 (s390-linux32v2.c): Remove.
3396 (s390-linux64.c): Remove.
3397 (s390-linux64v1.c): Remove.
3398 (s390-linux64v2.c): Remove.
3399 (s390-te-linux64.c): Remove.
3400 (s390-vx-linux64.c): Remove.
3401 (s390-tevx-linux64.c): Remove.
3402 (s390x-linux64.c): Remove.
3403 (s390x-linux64v1.c): Remove.
3404 (s390x-linux64v2.c): Remove.
3405 (s390x-te-linux64.c): Remove.
3406 (s390x-vx-linux64.c): Remove.
3407 (s390x-tevx-linux64.c): Remove.
3408 (tic6x-c64xp-linux.c): Remove.
3409 (tic6x-c64x-linux.c): Remove.
3410 (tic6x-c62x-linux.c): Remove.
3411 (reg-sh.c): Remove.
3412 (reg-sparc64.c): Remove.
3413 (reg-spu.c): Remove.
3414 (amd64.c): Remove.
3415 (amd64-linux.c): Remove.
3416 (amd64-avx.c): Remove.
3417 (amd64-avx-linux.c): Remove.
3418 (amd64-avx-avx512.c): Remove.
3419 (amd64-avx-avx512-linux.c): Remove.
3420 (amd64-mpx.c): Remove.
3421 (amd64-mpx-linux.c): Remove.
3422 (amd64-avx-mpx-avx512-pku.c): Remove.
3423 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
3424 (amd64-avx-mpx.c): Remove.
3425 (amd64-avx-mpx-linux.c): Remove.
3426 (x32.c): Remove.
3427 (x32-linux.c): Remove.
3428 (x32-avx.c): Remove.
3429 (x32-avx-linux.c): Remove.
3430 (x32-avx-avx512.c): Remove.
3431 (x32-avx-avx512-linux.c): Remove.
3432 (reg-xtensa.c): Remove.
3433 (reg-tilegx.c): Remove.
3434 (reg-tilegx32.c): Remove.
3435
1672e0d9
SDJ
34362017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
3437
3438 * Makefile.in (SFILES): Add "common/environ.c".
3439 (OBJS): Add "common/environ.h".
3440
239b6d10
WT
34412017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
3442
3443 * configure.ac: Check if the fs_base and gs_base members of
3444 `struct user_regs_struct' exist.
3445 * config.in: Regenerated.
3446 * configure: Likewise.
3447
694b382c
AT
34482017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
3449
3450 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
3451 target_read_memory.
3452 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
3453 (get_next_pcs_syscall_next_pc): Likewise.
3454
7dc53023
LM
34552016-12-23 Luis Machado <lgustavo@codesourcery.com>
3456
3457 * win32-i386-low.c: Fix incorrect reference to a couple source files.
3458 * nto-x86-low.c: Likewise.
3459
ad02e4fe
SM
34602016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
3461
3462 * Makefile.in: Include disable-implicit-rules.mk.
3463
dcb07cfa
PA
34642016-11-23 Pedro Alves <palves@redhat.com>
3465
3466 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
3467 (debug_vprintf): Use std::chrono::steady_clock instead of
3468 gettimeofday. Use '.' instead of ':'.
3469 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
3470 (get_timestamp): Use std::chrono::steady_clock instead of
3471 gettimeofday.
3472
8629c02c
SM
34732016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
3474
3475 * Makefile.in: Fix whitespace formatting.
3476
b593ecca
SM
34772016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
3478
3479 * Makefile.in (SFILES, OBS): Flatten list and order
3480 alphabetically.
3481
9986ba08
PA
34822016-11-23 Pedro Alves <palves@redhat.com>
3483
3484 * event-loop.c (handle_file_event): Use warning.
3485 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
3486 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
3487 Use warning.
3488
4eefa7bc
PA
34892016-11-23 Pedro Alves <palves@redhat.com>
3490
3491 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
3492 output.
3493 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
3494 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
3495 debug_printf and debug_flush for debug output.
3496 * server.c (handle_general_set): Likewise.
3497 * thread-db.c (try_thread_db_load): Use debug_printf for debug
3498 output.
3499
5443506e
SM
35002016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
3501
3502 * Makefile.in (.c.o): Replace rule with ...
3503 (%.o: %.c): ... this one.
3504
3b165252
SM
35052016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
3506
3507 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
3508 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
3509 make.
3510 * configure.ac: Remove checks for the make program.
3511 * configure: Re-generate.
3512
0bcda685
PA
35132016-10-28 Pedro Alves <palves@redhat.com>
3514
3515 * Makefile.in (CXX_DIALECT): Get from configure.
3516 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
3517 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
3518 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
3519 * config.in: Regenerate.
3520 * configure: Regenerate.
3521
c3805894
YQ
35222016-10-27 Yao Qi <yao.qi@linaro.org>
3523
3524 * linux-low.c (linux_supports_range_stepping): Return true if
3525 can_software_single_step return true.
3526
89342618
YQ
35272016-10-27 Yao Qi <yao.qi@linaro.org>
3528
3529 * inferiors.c (find_inferior_in_random): New function.
3530 * inferiors.h (find_inferior_in_random): Declare.
3531 * linux-low.c (linux_wait_for_event_filtered): Call
3532 find_inferior_in_random instead of find_inferior.
3533
e3652c84
YQ
35342016-10-27 Yao Qi <yao.qi@linaro.org>
3535
3536 * linux-low.c (linux_wait_1): If single-step breakpoints are
3537 inserted, remove them.
3538
5a04c4cf
PA
35392016-10-26 Pedro Alves <palves@redhat.com>
3540
3541 * linux-low.c (handle_extended_wait): Link parent/child fork
3542 threads.
3543 (linux_wait_1): Unlink them.
3544 (linux_set_resume_request): Ignore resume requests for
3545 already-resumed and unhandled fork child threads.
3546 * linux-low.h (struct lwp_info) <fork_relative>: New field.
3547 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
3548 New functions.
3549 (handle_v_requests) <vCont>: Don't call require_running.
3550 * server.h (in_queued_stop_replies): New declaration.
3551
cb93dc7f
YQ
35522016-10-24 Yao Qi <yao.qi@linaro.org>
3553
3554 PR server/20733
3555 * linux-aarch64-low.c (append_insns): Cast the return value to
3556 'uint32_t *'.
3557
a1078bea
YQ
35582016-10-10 Yao Qi <yao.qi@linaro.org>
3559
3560 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
3561
1fb77080
SDJ
35622016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
3563
3564 * target.c (target_supports_multi_process): New function, moved
3565 from...
3566 * target.h (target_supports_multi_process): ... here. Remove
3567 macro.
3568
39b5a3b9
TT
35692016-10-05 Tom Tromey <tom@tromey.com>
3570
3571 PR remote/20655:
3572 * tracepoint.c (handle_tracepoint_bkpts): Check
3573 ipa_error_tracepoint, not ipa_stopping_tracepoint.
3574
c1d0b70a
YQ
35752016-10-05 Yao Qi <yao.qi@linaro.org>
3576
3577 * configure.srv: Update the path of arm-*.xml files.
3578
0a69eedb
YQ
35792016-10-05 Terry Guo <terry.guo@arm.com>
3580 Yao Qi <yao.qi@linaro.org>
3581
3582 * Makefile.in: Adjust the path of rules.
3583 * configure.srv: Update the path of xml files.
3584 * regformats/arm-with-iwmmxt.dat: Regenerated.
3585 * regformats/arm-with-neon.dat: Likewise.
3586 * regformats/arm-with-vfpv2.dat: Likewise.
3587 * regformats/arm-with-vfpv3.dat Likewise.
3588
17e16485
YQ
35892016-09-30 Yao Qi <yao.qi@linaro.org>
3590
3591 PR gdbserver/20627
3592 * target.c (target_stop_and_wait): Don't call
3593 target_continue_no_signal, use resume_stop instead.
3594
edeeb602
YQ
35952016-09-26 Yao Qi <yao.qi@linaro.org>
3596
3597 * linux-low.c (linux_wait_1): Call debug_exit.
3598
503b1c39
PA
35992016-09-23 Pedro Alves <palves@redhat.com>
3600
3601 * Makefile.in (SFILES): Add common/new-op.c.
3602 (OBS): Add common/new-op.o.
3603 (new-op.o): New rule.
3604
74172ecf
SM
36052016-09-21 Simon Marchi <simon.marchi@ericsson.com>
3606
3607 * .gitinore: Ignore more files.
3608
fc6cda2e
YQ
36092016-09-21 Yao Qi <yao.qi@linaro.org>
3610
3611 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
3612 23.
3613
bc1e6c81
SDJ
36142016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
3615
3616 * server.c (start_inferior): Call target_mourn_inferior instead of
3617 mourn_inferior; pass ptid_t argument to it.
3618 (resume): Likewise.
3619 (handle_target_event): Likewise.
3620 * target.c (target_mourn_inferior): New function.
3621 * target.h (mourn_inferior): Delete macro.
3622
0e00e962
AA
36232016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
3624
3625 * linux-low.c (lwp_is_stepping): New function.
3626
1d8cb77d
CL
36272016-09-06 Carl Love <cel@us.ibm.com>
3628
3629 * server.c (start_inferior): Fixed comment, requested comment change
3630 didn't get updated correctly. Removed reference to ptrace () call as
3631 it is only true on Linux systems.
3632
7313bced
CL
36332016-09-06 Carl Love <cel@us.ibm.com>
3634
3635 * server.c (start_inferior): Do not call
3636 function target_post_create_inferior () if the
3637 inferior process has already exited.
3638
cf6de44d
PA
36392016-09-05 Pedro Alves <palves@redhat.com>
3640
3641 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
3642 (COMPILE.pre, CC_LD): Use CXX directly.
3643 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
3644 * acinclude.m4: Don't include build-with-cxx.m4.
3645 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
3646 * configure: Regenerate.
3647
c1da6748
AT
36482016-09-02 Akash Trehan <akash.trehan123@gmail.com>
3649
3650 PR gdb/19495
3651 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
3652 call writing data to own_buf.
3653
f2b9e3df
SDJ
36542016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
3655
3656 * target.c (mywait): Call target_wait instead of
3657 the_target->wait.
3658 (target_wait): New function.
3659
049a8570
SDJ
36602016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
3661
3662 * server.c (start_inferior): New variable 'ptid'. Replace calls
3663 to the_target->resume by target_continue{,_no_signal}, depending
3664 on the case.
3665 * target.c (target_stop_and_wait): Call target_continue_no_signal
3666 instead of the_target->resume.
3667 (target_continue): New function.
3668
3aa5cfa0
AT
36692016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
3670
3671 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
3672
754653a7
AZ
36732016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
3674
3675 PR server/20491
3676 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
3677 ps_prochandle.
3678 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
3679 * linux-arm-low.c (ps_get_thread_area): Likewise.
3680 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
3681 * linux-m68k-low.c (ps_get_thread_area): Likewise.
3682 * linux-mips-low.c (ps_get_thread_area): Likewise.
3683 * linux-nios2-low.c (ps_get_thread_area): Likewise.
3684 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
3685 * linux-x86-low.c (ps_get_thread_area): Likewise.
3686 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
3687
ed036b40
PA
36882016-08-19 Pedro Alves <palves@redhat.com>
3689
3690 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
3691
c8ef42ee
PA
36922016-08-19 Pedro Alves <palves@redhat.com>
3693
3694 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
3695 comment. Use memcpy instead of casting through unsigned long.
3696
9c235a72
PA
36972016-08-19 Pedro Alves <palves@redhat.com>
3698
3699 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
3700 allocating around 0x80000000.
3701
201506da
PA
37022016-08-19 Pedro Alves <palves@redhat.com>
3703
3704 PR gdb/20415
3705 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
3706 (x32-avx512-linux-ipa.o): New rules.
3707 * configure.ac (x86_64-*-linux*): New x32 check.
3708 * configure.srv (ipa_x32_linux_regobj): New.
3709 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
3710 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
3711 descriptions.
3712 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
3713 descriptions.
3714 * configure: Regenerate.
3715
f348d89a
PA
37162016-08-09 Pedro Alves <palves@redhat.com>
3717
3718 PR gdb/18653
3719 * Makefile.in (OBS): Add signals-state-save-restore.o.
3720 (signals-state-save-restore.o): New rule.
3721 * config.in: Regenerate.
3722 * configure: Regenerate.
3723 * linux-low.c: Include "signals-state-save-restore.h".
3724 (linux_create_inferior): Call
3725 restore_original_signals_state.
3726 * server.c: Include "dispositions-save-restore.h".
3727 (captured_main): Call save_original_signals_state.
3728
1baf5149
PA
37292016-08-05 Pedro Alves <palves@redhat.com>
3730
3731 * configure: Regenerate.
3732
fcd4a73d
YQ
37332016-08-04 Yao Qi <yao.qi@linaro.org>
3734
3735 * linux-low.c (regsets_fetch_inferior_registers): Check
3736 errno is ESRCH or not.
3737
979659d0
YQ
37382016-08-02 Yao Qi <yao.qi@linaro.org>
3739
3740 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
3741 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
3742 (thread_db_load_search): Update.
3743 (try_thread_db_load_1): Don't look for td_ta_event_addr,
3744 td_ta_set_event and td_ta_event_getmsg.
3745
6598661d
PA
37462016-07-26 Pedro Alves <palves@redhat.com>
3747
3748 PR server/20414
3749 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
3750 of unsigned long for 64-bit registers and use uint32_t instead of
3751 unsigned int for 32-bit registers.
3752
9cf12d57
PA
37532016-07-26 Pedro Alves <palves@redhat.com>
3754
3755 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
3756 to 'ptrace'.
3757
305450ed
TT
37582016-07-21 Tom Tromey <tom@tromey.com>
3759
3760 * configure: Rebuild.
3761
2583da7c
YQ
37622016-07-21 Yao Qi <yao.qi@linaro.org>
3763
3764 * mem-break.c (find_gdb_breakpoint): Cast bp to
3765 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
3766
21536b36
YQ
37672016-07-21 Yao Qi <yao.qi@linaro.org>
3768
3769 * server.c (handle_v_requests): Support s and S actions
3770 if target_supports_software_single_step return true.
3771
8901d193
YQ
37722016-07-21 Yao Qi <yao.qi@linaro.org>
3773
3774 * linux-low.c (resume_stopped_resumed_lwps): If resume request
3775 is resume_step, call maybe_hw_step.
3776 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
3777 and unstop them.
3778 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
3779 breakpoints or not.
3780 (proceed_one_lwp): If resume request is resume_step, install
3781 reinsert breakpoints and call maybe_hw_step.
3782
0e9a339e
YQ
37832016-07-21 Yao Qi <yao.qi@linaro.org>
3784
3785 * linux-low.c (proceed_one_lwp): Declare.
3786 (linux_resume_one_thread): Remove local variable 'step'.
3787 Lift code enqueue signal. Call proceed_one_lwp instead of
3788 linux_resume_one_lwp.
3789
4281b351
YQ
37902016-07-21 Yao Qi <yao.qi@linaro.org>
3791
3792 * linux-low.c (linux_resume_one_thread): Call
3793 enqueue_pending_signal.
3794
984a2c04
YQ
37952016-07-21 Yao Qi <yao.qi@linaro.org>
3796
3797 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
3798 * inferiors.c (do_restore_current_thread_cleanup): New function.
3799 (make_cleanup_restore_current_thread): Likewise.
3800 * linux-low.c (install_software_single_step_breakpoints): Call
3801 make_cleanup_restore_current_thread. Switch current_thread to
3802 thread.
3803
bec903c9
YQ
38042016-07-21 Yao Qi <yao.qi@linaro.org>
3805
3806 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
3807 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
3808 (clone_one_breakpoint): Likewise.
3809 (delete_reinsert_breakpoints): Change parameter to thread.
3810 Callers updated.
3811 (has_reinsert_breakpoints): Likewise.
3812 (uninsert_reinsert_breakpoints): Likewise.
3813 (reinsert_reinsert_breakpoints): Likewise.
3814 * mem-break.h (set_reinsert_breakpoint): Update declaration.
3815 (delete_reinsert_breakpoints): Likewise.
3816 (reinsert_reinsert_breakpoints): Likewise.
3817 (uninsert_reinsert_breakpoints): Likewise.
3818 (has_reinsert_breakpoints): Likewise.
3819
63c40ec7
YQ
38202016-07-21 Yao Qi <yao.qi@linaro.org>
3821
3822 * inferiors.c (get_thread_process): Make parameter const.
3823 * inferiors.h (get_thread_process): Update declaration.
3824 * mem-break.c (clone_all_breakpoints): Remove all parameters.
3825 Add new parameters child_thread and parent_thread. Callers
3826 updated.
3827 * mem-break.h (clone_all_breakpoints): Update declaration.
3828
9aa76cd0
YQ
38292016-07-21 Yao Qi <yao.qi@linaro.org>
3830
3831 * mem-break.c (struct breakpoint) <cond_list>: Remove.
3832 <command_list, handler>: Remove.
3833 (struct gdb_breakpoint): New.
3834 (struct other_breakpoint): New.
3835 (struct reinsert_breakpoint): New.
3836 (is_gdb_breakpoint): New function.
3837 (any_persistent_commands): Update command_list if
3838 is_gdb_breakpoint returns true.
3839 (set_breakpoint): Create breakpoints according to their types.
3840 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
3841 (set_gdb_breakpoint_1): Likewise.
3842 (set_gdb_breakpoint): Likewise.
3843 (clear_breakpoint_conditions): Change parameter type to
3844 'struct gdb_breakpoint *'.
3845 (clear_breakpoint_commands): Likewise.
3846 (clear_breakpoint_conditions_and_commands): Likewise.
3847 (add_condition_to_breakpoint): Likewise.
3848 (add_breakpoint_condition): Likewise.
3849 (add_commands_to_breakpoint): Likewise.
3850 (check_breakpoints): Check other_breakpoint.
3851 (clone_one_breakpoint): Clone breakpopint according to its type.
3852 * mem-break.h (struct gdb_breakpoint): Declare.
3853 (set_gdb_breakpoint): Update declaration.
3854 (clear_breakpoint_conditions_and_commands): Likewise.
3855 (add_breakpoint_condition): Likewise.
3856 (add_breakpoint_commands): Likewise.
3857 * server.c (process_point_options): Change parameter type to
3858 'struct gdb_breakpoint *'.
3859
811f8301
YQ
38602016-07-21 Yao Qi <yao.qi@linaro.org>
3861
3862 * mem-break.c (set_breakpoint_at): Rename it to ...
3863 (set_breakpoint_type_at): ... it.
3864 (set_breakpoint_at): Call set_breakpoint_type_at.
3865 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
3866 * mem-break.h (set_breakpoint_at): Update comments.
3867
b1c51e36
CLT
38682016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
3869
3870 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
3871 to buf parameter.
3872 (nios2_store_gregset): Likewise.
3873
ced2dffb
PA
38742016-07-01 Pedro Alves <palves@redhat.com>
3875 Antoine Tremblay <antoine.tremblay@ericsson.com>
3876
3877 * linux-low.c: Change interface to take the target lwp_info
3878 pointer directly and return void. Handle detaching from a zombie
3879 thread.
3880 (linux_detach_lwp_callback): New function.
3881 (linux_detach): Detach from the leader thread after detaching from
3882 the clone threads.
3883
2ac09a5b
YQ
38842016-06-28 Yao Qi <yao.qi@linaro.org>
3885
3886 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
3887 for variable new_offset.
3888 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
3889 (aarch64_ftrace_insn_reloc_cb): Likewise.
3890 (aarch64_ftrace_insn_reloc_tb): Likewise.
3891 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
3892 PRIx64 instead of PRIx32.
3893
79e7fd4f
YQ
38942016-06-28 Yao Qi <yao.qi@linaro.org>
3895
3896 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
3897 (the_low_target): Install arm_get_syscall_trapinfo.
3898
061fc021
YQ
38992016-06-28 Yao Qi <yao.qi@linaro.org>
3900
3901 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
3902 function.
3903 (the_low_target): Install aarch64_get_syscall_trapinfo.
3904
4cc32bec
YQ
39052016-06-28 Yao Qi <yao.qi@linaro.org>
3906
3907 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
3908 Callers updated.
3909 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
3910 Remove parameter sysno.
3911 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
3912 sysret.
3913
782c1122
AA
39142016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
3915
3916 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
3917 (s390_emit_ne_goto): Likewise.
3918 (s390_emit_lt_goto): Likewise.
3919 (s390_emit_le_goto): Likewise.
3920 (s390_emit_gt_goto): Likewise.
3921 (s390_emit_ge_goto): Likewise.
3922 (s390x_emit_eq_goto): Likewise.
3923 (s390x_emit_ne_goto): Likewise.
3924 (s390x_emit_lt_goto): Likewise.
3925 (s390x_emit_le_goto): Likewise.
3926 (s390x_emit_gt_goto): Likewise.
3927 (s390x_emit_ge_goto): Likewise.
3928 (s390_emit_ops_impl): Mark variable static.
3929 (s390x_emit_ops): Likewise.
3930
2e7b624b
YQ
39312016-06-17 Yao Qi <yao.qi@linaro.org>
3932
3933 * linux-low.c (handle_extended_wait): Call
3934 uninsert_reinsert_breakpoints for the parent process. Remove
3935 reinsert breakpoints from the child process. Reinsert them to
3936 the parent process when vfork is done.
3937 * mem-break.c (uninsert_reinsert_breakpoints): New function.
3938 (reinsert_reinsert_breakpoints): New function.
3939 * mem-break.h (uninsert_reinsert_breakpoints): Declare
3940 (reinsert_reinsert_breakpoints): Declare.
3941
8a81c5d7
YQ
39422016-06-17 Yao Qi <yao.qi@linaro.org>
3943
3944 * linux-low.c (handle_extended_wait): If the parent is doing
3945 step-over, remove the reinsert breakpoints from the forked child.
3946
f50bf8e5
YQ
39472016-06-17 Yao Qi <yao.qi@linaro.org>
3948
3949 * linux-low.c (unsuspend_all_lwps): Declare.
3950 (linux_low_filter_event): If thread exited, call finish_step_over.
3951 If step-over is finished, unsuspend other threads.
3952
8376a3cb
YQ
39532016-06-17 Yao Qi <yao.qi@linaro.org>
3954
3955 * linux-low.c (linux_resume_one_lwp_throw): Assert
3956 has_reinsert_breakpoints returns false.
3957 * mem-break.c (delete_disabled_breakpoints): Assert
3958 bp type isn't reinsert_breakpoint.
3959
f79b145d
YQ
39602016-06-17 Yao Qi <yao.qi@linaro.org>
3961
3962 * linux-low.c (maybe_hw_step): New function.
3963 (linux_resume_one_lwp_throw): Call maybe_hw_step.
3964 (finish_step_over): Switch current_thread to lwp temporarily,
3965 and assert has_reinsert_breakpoints returns true.
3966 (proceed_one_lwp): Call maybe_hw_step.
3967 * mem-break.c (has_reinsert_breakpoints): New function.
3968 * mem-break.h (has_reinsert_breakpoints): Declare.
3969
0ae534d2
JT
39702016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
3971
3972 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
3973
fcdad592
YQ
39742016-05-17 Yao Qi <yao.qi@linaro.org>
3975
3976 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
3977 instead of find_inferior.
3978
9e784964
YQ
39792016-05-05 Yao Qi <yao.qi@linaro.org>
3980
3981 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
3982 Initialize res to zero.
3983
cf2ebb6e
YQ
39842016-05-05 Yao Qi <yao.qi@linaro.org>
3985
3986 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
3987 to uint32_t.
3988
c1aebf87
UW
39892016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
3990
3991 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
3992 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
3993 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
3994
35fd2deb 39952016-04-28 Par Olsson <par.olsson@windriver.com>
cbe14bcf 3996 Simon Marchi <simon.marchi@ericsson.com>
35fd2deb
PO
3997
3998 * tracepoint.c (write_inferior_int8): New function.
3999 (cmd_qtenable_disable): Write enable flag using
4000 write_inferior_int8.
4001
484b3c32
YQ
40022016-04-25 Yao Qi <yao.qi@linaro.org>
4003
4004 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
4005 (need_step_over_p): Return zero if the LWP has pending signals
4006 can be delivered on software single step target.
4007
85ba7d86
YQ
40082016-04-25 Yao Qi <yao.qi@linaro.org>
4009
4010 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
4011 return instead of error.
4012
3539aa13
YQ
40132016-04-22 Yao Qi <yao.qi@linaro.org>
4014
4015 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
4016 to 23.
4017
5b061e98
YQ
40182016-04-22 Yao Qi <yao.qi@linaro.org>
4019
4020 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
4021 signal when stepping over breakpoint with software single
4022 step.
4023
3451269c
PA
40242016-04-21 Pedro Alves <palves@redhat.com>
4025
4026 * linux-s390-low.c (s390_collect_ptrace_register)
4027 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
4028 add casts.
4029 (s390_check_regset): Use void * instead of gdb_byte *.
4030
a2358508
PA
40312016-04-20 Pedro Alves <palves@redhat.com>
4032
4033 * configure: Renegerate.
4034
6885166d
YQ
40352016-04-20 Yao Qi <yao.qi@linaro.org>
4036
4037 * linux-aarch32-low.c: Include "arch/arm-linux.h".
4038 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
4039 number 16.
4040 (arm_store_gregset): Likewise.
4041
2b863f51
WT
40422016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
4043
4044 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
4045 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
4046 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
4047 (amd64-avx-mpx-linux.c): New rules.
4048 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
4049 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
4050 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
4051 (srv_amd64_regobj): Add amd64-avx-mpx.o.
4052 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
4053 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
4054 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
4055 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
4056 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
4057 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
4058 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
4059 * linux-x86-low.c (x86_linux_read_description): Add case for
4060 X86_XSTATE_AVX_MPX_MASK.
4061 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
4062 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
4063 init_registers_i386_avx_mpx_linux.
4064 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
4065 (initialize_low_tracepoint): Call
4066 init_registers_i386_avx_mpx_linux.
4067 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
4068 (initialize_low_tracepoint): Call
4069 init_registers_amd64_avx_mpx_linux.
4070 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
4071 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
4072 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
4073 declarations.
4074
9b30624b
PA
40752016-04-18 Pedro Alves <palves@redhat.com>
4076
4077 * configure: Regenerate.
4078
45e3745e
AT
40792016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
4080
4081 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
4082 (aarch64_emit_sub): Likewise.
4083
2afc13ff
PA
40842016-04-12 Pedro Alves <palves@redhat.com>
4085
4086 * utils.c (prepare_to_throw_exception): Delete.
4087
6e774b13
SM
40882016-04-05 Simon Marchi <simon.marchi@ericsson.com>
4089
4090 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
4091
4dca19f8
MK
40922016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
4093
4094 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
4095
d0a9981f
MK
40962016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
4097
4098 * linux-aarch64-ipa.c: Add <elf.h> include.
4099 * linux-ppc-ipa.c: Add <elf.h> include.
4100 * linux-s390-ipa.c: Add <elf.h> include.
4101
252db07e
MK
41022016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
4103
4104 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
4105 (get_raw_reg_ptr): Likewise.
4106 (get_trace_state_variable_value_ptr): Likewise.
4107 (set_trace_state_variable_value_ptr): Likewise.
4108 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
4109 char *.
4110
14e2b6d9
MK
41112016-03-31 Wei-cheng Wang <cole945@gmail.com>
4112 Marcin Kościelnicki <koriakin@0x04.net>
4113
4114 PR/17221
4115 * linux-ppc-low.c (emit_insns): New function.
4116 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
4117 (ppc_emit_prologue): New function.
4118 (ppc_emit_epilogue): New function.
4119 (ppc_emit_add): New function.
4120 (ppc_emit_sub): New function.
4121 (ppc_emit_mul): New function.
4122 (ppc_emit_lsh): New function.
4123 (ppc_emit_rsh_signed): New function.
4124 (ppc_emit_rsh_unsigned): New function.
4125 (ppc_emit_ext): New function.
4126 (ppc_emit_zero_ext): New function.
4127 (ppc_emit_log_not): New function.
4128 (ppc_emit_bit_and): New function.
4129 (ppc_emit_bit_or): New function.
4130 (ppc_emit_bit_xor): New function.
4131 (ppc_emit_bit_not): New function.
4132 (ppc_emit_equal): New function.
4133 (ppc_emit_less_signed): New function.
4134 (ppc_emit_less_unsigned): New function.
4135 (ppc_emit_ref): New function.
4136 (ppc_emit_const): New function.
4137 (ppc_emit_reg): New function.
4138 (ppc_emit_pop): New function.
4139 (ppc_emit_stack_flush): New function.
4140 (ppc_emit_swap): New function.
4141 (ppc_emit_stack_adjust): New function.
4142 (ppc_emit_call): New function.
4143 (ppc_emit_int_call_1): New function.
4144 (ppc_emit_void_call_2): New function.
4145 (ppc_emit_if_goto): New function.
4146 (ppc_emit_goto): New function.
4147 (ppc_emit_eq_goto): New function.
4148 (ppc_emit_ne_goto): New function.
4149 (ppc_emit_lt_goto): New function.
4150 (ppc_emit_le_goto): New function.
4151 (ppc_emit_gt_goto): New function.
4152 (ppc_emit_ge_goto): New function.
4153 (ppc_write_goto_address): New function.
4154 (ppc_emit_ops_impl): New static variable.
4155 (ppc64v1_emit_prologue): New function.
4156 (ppc64v2_emit_prologue): New function.
4157 (ppc64_emit_epilogue): New function.
4158 (ppc64_emit_add): New function.
4159 (ppc64_emit_sub): New function.
4160 (ppc64_emit_mul): New function.
4161 (ppc64_emit_lsh): New function.
4162 (ppc64_emit_rsh_signed): New function.
4163 (ppc64_emit_rsh_unsigned): New function.
4164 (ppc64_emit_ext): New function.
4165 (ppc64_emit_zero_ext): New function.
4166 (ppc64_emit_log_not): New function.
4167 (ppc64_emit_bit_and): New function.
4168 (ppc64_emit_bit_or): New function.
4169 (ppc64_emit_bit_xor): New function.
4170 (ppc64_emit_bit_not): New function.
4171 (ppc64_emit_equal): New function.
4172 (ppc64_emit_less_signed): New function.
4173 (ppc64_emit_less_unsigned): New function.
4174 (ppc64_emit_ref): New function.
4175 (ppc64_emit_const): New function.
4176 (ppc64v1_emit_reg): New function.
4177 (ppc64v2_emit_reg): New function.
4178 (ppc64_emit_pop): New function.
4179 (ppc64_emit_stack_flush): New function.
4180 (ppc64_emit_swap): New function.
4181 (ppc64v1_emit_call): New function.
4182 (ppc64v2_emit_call): New function.
4183 (ppc64v1_emit_int_call_1): New function.
4184 (ppc64v2_emit_int_call_1): New function.
4185 (ppc64v1_emit_void_call_2): New function.
4186 (ppc64v2_emit_void_call_2): New function.
4187 (ppc64_emit_if_goto): New function.
4188 (ppc64_emit_eq_goto): New function.
4189 (ppc64_emit_ne_goto): New function.
4190 (ppc64_emit_lt_goto): New function.
4191 (ppc64_emit_le_goto): New function.
4192 (ppc64_emit_gt_goto): New function.
4193 (ppc64_emit_ge_goto): New function.
4194 (ppc64v1_emit_ops_impl): New static variable.
4195 (ppc64v2_emit_ops_impl): New static variable.
4196 (ppc_emit_ops): New function.
4197 (linux_low_target): Wire in ppc_emit_ops.
4198
a2174ba4
MK
41992016-03-31 Wei-cheng Wang <cole945@gmail.com>
4200 Marcin Kościelnicki <koriakin@0x04.net>
4201
4202 PR/17221
4203 * Makefile.in: Add powerpc-*-ipa.o
4204 * configure.srv: Add ipa_obj for powerpc*-linux.
4205 * linux-ppc-ipa.c: New file.
4206 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
4207 includes.
4208 (PPC_FIELD): New macro.
4209 (PPC_SEXT): New macro.
4210 (PPC_OP6): New macro.
4211 (PPC_BO): New macro.
4212 (PPC_LI): New macro.
4213 (PPC_BD): New macro.
4214 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
4215 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
4216 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
4217 (ppc_get_thread_area): New function.
4218 (is_elfv2_inferior): New function.
4219 (gen_ds_form): New function.
4220 (GEN_STD): New macro.
4221 (GEN_STDU): New macro.
4222 (GEN_LD): New macro.
4223 (GEN_LDU): New macro.
4224 (gen_d_form): New function.
4225 (GEN_ADDI): New macro.
4226 (GEN_ADDIS): New macro.
4227 (GEN_LI): New macro.
4228 (GEN_LIS): New macro.
4229 (GEN_ORI): New macro.
4230 (GEN_ORIS): New macro.
4231 (GEN_LWZ): New macro.
4232 (GEN_STW): New macro.
4233 (GEN_STWU): New macro.
4234 (gen_xfx_form): New function.
4235 (GEN_MFSPR): New macro.
4236 (GEN_MTSPR): New macro.
4237 (GEN_MFCR): New macro.
4238 (GEN_MTCR): New macro.
4239 (GEN_SYNC): New macro.
4240 (GEN_LWSYNC): New macro.
4241 (gen_x_form): New function.
4242 (GEN_OR): New macro.
4243 (GEN_MR): New macro.
4244 (GEN_LWARX): New macro.
4245 (GEN_STWCX): New macro.
4246 (GEN_CMPW): New macro.
4247 (gen_md_form): New function.
4248 (GEN_RLDICL): New macro.
4249 (GEN_RLDICR): New macro.
4250 (gen_i_form): New function.
4251 (GEN_B): New macro.
4252 (GEN_BL): New macro.
4253 (gen_b_form): New function.
4254 (GEN_BNE): New macro.
4255 (GEN_LOAD): New macro.
4256 (GEN_STORE): New macro.
4257 (gen_limm): New function.
4258 (gen_atomic_xchg): New function.
4259 (gen_call): New function.
4260 (ppc_relocate_instruction): New function.
4261 (ppc_install_fast_tracepoint_jump_pad): New function.
4262 (ppc_get_min_fast_tracepoint_insn_len): New function.
4263 (ppc_get_ipa_tdesc_idx): New function.
4264 (the_low_target): Wire in the new functions.
4265 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
4266 tdescs.
4267 * linux-ppc-tdesc.h: New file.
4268
a13c4696
MK
42692016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
4270
4271 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
4272 (alloc_jump_pad_buffer): New function.
4273 * linux-amd64-ipa.c: Add <sys/mman.h> include.
4274 (alloc_jump_pad_buffer): New function.
4275 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
4276 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
4277 (alloc_jump_pad_buffer): New function.
4278 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
4279 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
4280 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
4281 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
4282
1cda1512
MK
42832016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
4284
4285 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
4286 * linux-amd64-ipa.c: Likewise.
4287 * linux-i386-ipa.c: Likewise.
4288 * linux-s390-ipa.c: Likewise.
4289 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
4290 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
4291 set_trace_state_variable_value_ptr.
4292 (struct ipa_sym_addresses): Likewise.
4293 (symbol_list): Likewise.
4294 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
4295 accessing gdb_collect directly.
4296 (gdb_collect_ptr_type): New typedef.
4297 (get_raw_reg_ptr_type): New typedef.
4298 (get_trace_state_variable_value_ptr_type): New typedef.
4299 (set_trace_state_variable_value_ptr_type): New typedef.
4300 (gdb_collect_ptr): New global.
4301 (get_raw_reg_ptr): New global.
4302 (get_trace_state_variable_value_ptr): New global.
4303 (set_trace_state_variable_value_ptr): New global.
4304 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
4305 accessing get_raw_reg directly.
4306 (get_get_tsv_func_addr): Likewise for
4307 get_trace_state_variable_value_ptr.
4308 (get_set_tsv_func_addr): Likewise for
4309 set_trace_state_variable_value_ptr.
4310 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
4311
72fb5488
SM
43122016-03-30 Simon Marchi <simon.marchi@ericsson.com>
4313
4314 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
4315
28170b88
MK
43162016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
4317
4318 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
4319 packets.
4320 (relocate_instruction): Remove own_buf.
4321 * server.c (own_buf): Make global.
4322 (handle_v_requests): Make global.
4323 * server.h (own_buf): New declaration.
4324 (handle_v_requests): New prototype.
4325
f39e8743
MK
43262016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
4327
4328 PR 18377
4329 * linux-s390-low.c (add_insns): New function.
4330 (s390_emit_prologue): New function.
4331 (s390_emit_epilogue): New function.
4332 (s390_emit_add): New function.
4333 (s390_emit_sub): New function.
4334 (s390_emit_mul): New function.
4335 (s390_emit_lsh): New function.
4336 (s390_emit_rsh_signed): New function.
4337 (s390_emit_rsh_unsigned): New function.
4338 (s390_emit_ext): New function.
4339 (s390_emit_log_not): New function.
4340 (s390_emit_bit_and): New function.
4341 (s390_emit_bit_or): New function.
4342 (s390_emit_bit_xor): New function.
4343 (s390_emit_bit_not): New function.
4344 (s390_emit_equal): New function.
4345 (s390_emit_less_signed): New function.
4346 (s390_emit_less_unsigned): New function.
4347 (s390_emit_ref): New function.
4348 (s390_emit_if_goto): New function.
4349 (s390_emit_goto): New function.
4350 (s390_write_goto_address): New function.
4351 (s390_emit_litpool): New function.
4352 (s390_emit_const): New function.
4353 (s390_emit_call): New function.
4354 (s390_emit_reg): New function.
4355 (s390_emit_pop): New function.
4356 (s390_emit_stack_flush): New function.
4357 (s390_emit_zero_ext): New function.
4358 (s390_emit_swap): New function.
4359 (s390_emit_stack_adjust): New function.
4360 (s390_emit_set_r2): New function.
4361 (s390_emit_int_call_1): New function.
4362 (s390_emit_void_call_2): New function.
4363 (s390_emit_eq_goto): New function.
4364 (s390_emit_ne_goto): New function.
4365 (s390_emit_lt_goto): New function.
4366 (s390_emit_le_goto): New function.
4367 (s390_emit_gt_goto): New function.
4368 (s390_emit_ge_goto): New function.
4369 (s390x_emit_prologue): New function.
4370 (s390x_emit_epilogue): New function.
4371 (s390x_emit_add): New function.
4372 (s390x_emit_sub): New function.
4373 (s390x_emit_mul): New function.
4374 (s390x_emit_lsh): New function.
4375 (s390x_emit_rsh_signed): New function.
4376 (s390x_emit_rsh_unsigned): New function.
4377 (s390x_emit_ext): New function.
4378 (s390x_emit_log_not): New function.
4379 (s390x_emit_bit_and): New function.
4380 (s390x_emit_bit_or): New function.
4381 (s390x_emit_bit_xor): New function.
4382 (s390x_emit_bit_not): New function.
4383 (s390x_emit_equal): New function.
4384 (s390x_emit_less_signed): New function.
4385 (s390x_emit_less_unsigned): New function.
4386 (s390x_emit_ref): New function.
4387 (s390x_emit_if_goto): New function.
4388 (s390x_emit_const): New function.
4389 (s390x_emit_call): New function.
4390 (s390x_emit_reg): New function.
4391 (s390x_emit_pop): New function.
4392 (s390x_emit_stack_flush): New function.
4393 (s390x_emit_zero_ext): New function.
4394 (s390x_emit_swap): New function.
4395 (s390x_emit_stack_adjust): New function.
4396 (s390x_emit_int_call_1): New function.
4397 (s390x_emit_void_call_2): New function.
4398 (s390x_emit_eq_goto): New function.
4399 (s390x_emit_ne_goto): New function.
4400 (s390x_emit_lt_goto): New function.
4401 (s390x_emit_le_goto): New function.
4402 (s390x_emit_gt_goto): New function.
4403 (s390x_emit_ge_goto): New function.
4404 (s390_emit_ops): New function.
4405 (struct linux_target_ops): Fill in emit_ops hook.
4406
abd9baf9
MK
44072016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
4408
4409 PR 18377
4410 * Makefile.in: Add s390 IPA files.
4411 * configure.srv: Build IPA for s390.
4412 * linux-s390-ipa.c: New file.
4413 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
4414 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
4415 (tdesc_s390_linux32): Likewise.
4416 (init_registers_s390_linux32v1): Likewise.
4417 (tdesc_s390_linux32v1): Likewise.
4418 (init_registers_s390_linux32v2): Likewise.
4419 (tdesc_s390_linux32v2): Likewise.
4420 (init_registers_s390_linux64): Likewise.
4421 (tdesc_s390_linux64): Likewise.
4422 (init_registers_s390_linux64v1): Likewise.
4423 (tdesc_s390_linux64v1): Likewise.
4424 (init_registers_s390_linux64v2): Likewise.
4425 (tdesc_s390_linux64v2): Likewise.
4426 (init_registers_s390_te_linux64): Likewise.
4427 (tdesc_s390_te_linux64): Likewise.
4428 (init_registers_s390_vx_linux64): Likewise.
4429 (tdesc_s390_vx_linux64): Likewise.
4430 (init_registers_s390_tevx_linux64): Likewise.
4431 (tdesc_s390_tevx_linux64): Likewise.
4432 (init_registers_s390x_linux64): Likewise.
4433 (tdesc_s390x_linux64): Likewise.
4434 (init_registers_s390x_linux64v1): Likewise.
4435 (tdesc_s390x_linux64v1): Likewise.
4436 (init_registers_s390x_linux64v2): Likewise.
4437 (tdesc_s390x_linux64v2): Likewise.
4438 (init_registers_s390x_te_linux64): Likewise.
4439 (tdesc_s390x_te_linux64): Likewise.
4440 (init_registers_s390x_vx_linux64): Likewise.
4441 (tdesc_s390x_vx_linux64): Likewise.
4442 (init_registers_s390x_tevx_linux64): Likewise.
4443 (tdesc_s390x_tevx_linux64): Likewise.
4444 (have_hwcap_s390_vx): New static variable.
4445 (s390_arch_setup): Fill have_hwcap_s390_vx.
4446 (s390_get_thread_area): New function.
4447 (s390_ft_entry_gpr_esa): New const.
4448 (s390_ft_entry_gpr_zarch): New const.
4449 (s390_ft_entry_misc): New const.
4450 (s390_ft_entry_fr): New const.
4451 (s390_ft_entry_vr): New const.
4452 (s390_ft_main_31): New const.
4453 (s390_ft_main_64): New const.
4454 (s390_ft_exit_fr): New const.
4455 (s390_ft_exit_vr): New const.
4456 (s390_ft_exit_misc): New const.
4457 (s390_ft_exit_gpr_esa): New const.
4458 (s390_ft_exit_gpr_zarch): New const.
4459 (append_insns): New function.
4460 (s390_relocate_instruction): New function.
4461 (s390_install_fast_tracepoint_jump_pad): New function.
4462 (s390_get_min_fast_tracepoint_insn_len): New function.
4463 (s390_get_ipa_tdesc_idx): New function.
4464 (struct linux_target_ops): Wire in the above functions.
4465 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
4466 * linux-s390-tdesc.h: New file.
4467
a4105d04
MK
44682016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
4469
4470 * linux-s390-low.c (s390_supports_tracepoints): New function.
4471 (struct linux_target_ops): Fill supports_tracepoints hook.
4472
35ac8b3e
YQ
44732016-03-18 Yao Qi <yao.qi@linaro.org>
4474
4475 * linux-low.c (lwp_signal_can_be_delivered): New function.
4476 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
4477
94610ec4
YQ
44782016-03-18 Yao Qi <yao.qi@linaro.org>
4479
4480 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
4481 0 if signal is enqueued. Remove 'signal' from one debugging
4482 message. Move one debugging message to some lines below.
4483 Remove code setting 'signal' to 0.
4484
80aea927
YQ
44852016-03-18 Yao Qi <yao.qi@linaro.org>
4486
4487 * linux-low.c (linux_low_filter_event): Remove redundant
4488 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
4489
b04fd3be
MK
44902016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
4491
4492 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
4493 (struct linux_target_ops): Wire in the above.
4494
c40c8d4b
YQ
44952016-03-03 Yao Qi <yao.qi@linaro.org>
4496
4497 * linux-low.c: Update comments to start_step_over.
4498
0f8288ae
YQ
44992016-03-03 Yao Qi <yao.qi@linaro.org>
4500
4501 PR server/19736
4502 * linux-low.c (handle_extended_wait): Set child suspended
4503 if event_lwp->bp_reinsert isn't zero.
4504
fdbd04a8
YQ
45052016-03-02 Yao Qi <yao.qi@linaro.org>
4506
4507 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
4508 enqueue_pending_signal.
4509
6896a8fa
MK
45102016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
4511
4512 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
4513 is actually loaded.
4514
ab503087
MK
45152016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
4516
4517 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
4518 (s390_regmap_3264) [!__s390x__]: New global.
4519 (s390_collect_ptrace_register): Skip map entries containing -1.
4520 (s390_supply_ptrace_register): Ditto.
4521 (s390_fill_gprs_high): New function.
4522 (s390_store_gprs_high): New function.
4523 (s390_regsets): Add NT_S390_HIGH_GPRS.
4524 (s390_get_hwcap): Enable on 31-bit.
4525 (have_hwcap_s390_high_gprs): Enable on 31-bit.
4526 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
4527 Detect NT_S390_HIGH_GPRS.
4528 (s390_usrregs_info_3264): Enable on 31-bit.
4529 (s390_regs_info): Enable regs_info_3264 on 31-bit.
4530 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
4531
ae91f625
MK
45322016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
4533
4534 PR gdb/13808
4535 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
4536 * configure.srv: Ditto.
4537 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
4538 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
4539 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
4540 (init_registers_amd64_linux): Remove prototype.
4541 (tdesc_amd64_linux): Remove declaration.
4542 (get_ipa_tdesc): New function.
4543 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
4544 initialize remaining tdescs.
4545 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
4546 (init_registers_i386_linux): Remove prototype.
4547 (tdesc_i386_linux): Remove declaration.
4548 (get_ipa_tdesc): New function.
4549 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
4550 initialize remaining tdescs.
4551 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
4552 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
4553 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
4554 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
4555 (x86_get_ipa_tdesc_idx): New function.
4556 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
4557 * linux-x86-tdesc.h: New file.
4558 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
4559 (target_get_ipa_tdesc_idx): New macro.
4560 * tracepoint.c (ipa_tdesc_idx): New macro.
4561 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
4562 (symbol_list): Add ipa_tdesc_idx.
4563 (cmd_qtstart): Write ipa_tdesc_idx in the target.
4564 (ipa_tdesc): Remove.
4565 (ipa_tdesc_idx): New variable.
4566 (get_context_regcache): Use get_ipa_tdesc.
4567 (gdb_collect): Ditto.
4568 (gdb_probe): Ditto.
4569 * tracepoint.h (get_ipa_tdesc): New prototype.
4570 (ipa_tdesc): Remove.
4571
e7ad2f14
PA
45722016-02-24 Pedro Alves <palves@redhat.com>
4573
4574 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
4575 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
4576 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
4577 Factor out common code between the USE_SIGTRAP_SIGINFO and
4578 !USE_SIGTRAP_SIGINFO blocks.
4579 (linux_low_filter_event): Call save_stop_reason instead of
4580 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
4581 Update comments.
4582 (linux_wait_1): Update comments.
4583
657f9cde
WW
45842016-02-24 Wei-cheng Wang <cole945@gmail.com>
4585
4586 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
4587 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
4588 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
4589 ppc_insert_point, ppc_remove_point.
4590
b00b61e1
MK
45912016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
4592
4593 * linux-s390-low.c (s390_supports_z_point_type): New function.
4594 (struct linux_target_ops): Wire s390_supports_z_point_type in.
4595
553cb527
YQ
45962016-02-16 Yao Qi <yao.qi@linaro.org>
4597
4598 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
4599 PC. Get pc from regcache_read_pc.
4600
a5652c21
YQ
46012016-02-12 Yao Qi <yao.qi@linaro.org>
4602
4603 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
4604 or linux_get_pc_32bit.
4605 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
4606
ed443b61
YQ
46072016-02-12 Yao Qi <yao.qi@linaro.org>
4608
4609 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
4610 arm_linux_get_next_pcs_fixup.
4611
020ecd38
MK
46122016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
4613
4614 * tracepoint.c (x_tracepoint_action_download): Change
4615 write_inferior_data_ptr to write_inferior_data_pointer.
4616 (cmd_qtstart): Likewise.
4617 (write_inferior_data_ptr): Remove.
4618 (download_agent_expr): Change write_inferior_data_ptr to
4619 write_inferior_data_pointer.
4620 (download_tracepoint_1): Likewise.
4621 (download_tracepoint): Likewise.
4622 (download_trace_state_variables): Likewise.
4623
7cae9051
WW
46242016-02-11 Wei-cheng Wang <cole945@gmail.com>
4625 Marcin Kościelnicki <koriakin@0x04.net>
4626
4627 * tracepoint.c (struct tracepoint_action_ops): Remove.
4628 (struct tracepoint_action): Remove ops.
4629 (m_tracepoint_action_download, r_tracepoint_action_download)
4630 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
4631 size and offset accordingly.
4632 (m_tracepoint_action_ops, r_tracepoint_action_ops)
4633 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
4634 (tracepoint_action_send, tracepoint_action_download): New functions.
4635 Helpers for trace action handlers.
4636 (add_tracepoint_action): Remove setup actions ops.
4637 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
4638
9f6a71b4
YQ
46392016-02-10 Yao Qi <yao.qi@linaro.org>
4640
4641 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
4642
1e94266c
SM
46432016-02-09 Simon Marchi <simon.marchi@ericsson.com>
4644
4645 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
4646 to AC_OUTPUT.
4647 * configure: Regenerate.
4648
8adce034
SM
46492016-02-09 Simon Marchi <simon.marchi@ericsson.com>
4650
4651 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
4652 void * to gdb_byte *.
4653 * linux-low.c (siginfo_fixup): Likewise.
4654 (linux_xfer_siginfo): Likewise.
4655 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
4656 Likewise.
4657 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
4658
93813b37
WT
46592016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
4660
4661 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
4662 to srv_tgtobj.
4663 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
4664 to srv_tgtobj.
4665 * linux-x86-low.c [__x86_64__]: Include
4666 "nat/amd64-linux-siginfo.h".
4667 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
4668 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
4669 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
4670 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
4671 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
4672 (cpt_si_fd, si_timerid, si_overrun): Move from
4673 nat/amd64-linux-siginfo.c.
4674 * Makefile.in (amd64-linux-siginfo.o:): New rule.
4675
8424cc97
SM
46762016-01-28 Simon Marchi <simon.marchi@ericsson.com>
4677
4678 * server.c (skip_to_semicolon): Remove.
4679 (process_point_options): Use strchrnul instead of
4680 skip_to_semicolon.
4681
4d18591b
YQ
46822016-01-26 Yao Qi <yao.qi@linaro.org>
4683
4684 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
4685 * linux-low.c (install_software_single_step_breakpoints): Don't
4686 call regcache_read_pc.
4687 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
4688 argument pc.
4689
d8020970
YQ
46902016-01-26 Yao Qi <yao.qi@linaro.org>
4691
4692 * linux-low.c (install_software_single_step_breakpoints): Call
4693 regcache_read_pc instead of get_pc.
4694
8b207339
YQ
46952016-01-26 Yao Qi <yao.qi@linaro.org>
4696
4697 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
4698 (unblock_async_io): Rename to ...
4699 (block_unblock_async_io): ... it. New function.
4700 (enable_async_io): Don't install SIGIO handler. Unblock it
4701 instead.
4702 (disable_async_io): Don't ignore SIGIO. Block it instead.
4703 (initialize_async_io): Install SIGIO handler. Don't call
4704 unblock_async_io.
4705
18879fef
YQ
47062016-01-26 Yao Qi <yao.qi@linaro.org>
4707
4708 * remote-utils.c (getpkt): If the buffer isn't empty, and the
4709 first character is '\003', call *the_target->request_interrupt.
4710
a0f8e08a
YQ
47112016-01-25 Yao Qi <yao.qi@linaro.org>
4712
4713 * remote-utils.c (new_thread_notify): Remove.
4714 (dead_thread_notify): Likewise.
4715 * remote-utils.h (new_thread_notify): Remove declaration.
4716 (dead_thread_notify): Likewise.
4717
cc5fd9ab
MK
47182016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
4719
4720 * gdb.trace/pending.exp: Fix expected message on continue.
4721
99e8eb11
MK
47222016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
4723
4724 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
4725 it works properly on big-endian machines where sizeof (CORE_ADDR)
4726 != sizeof (void *).
4727
a994041d
PA
47282016-01-21 Pedro Alves <palves@redhat.com>
4729
4730 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
4731 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
4732 * configure: Regenerate.
4733
f7a6a40d
YQ
47342016-01-21 Yao Qi <yao.qi@linaro.org>
4735
4736 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
4737 is_thumb and set it according to CPSR saved on the stack.
4738 (get_next_pcs_syscall_next_pc): Pass is_thumb to
4739 arm_sigreturn_next_pc.
4740
6f69e520
YQ
47412016-01-18 Yao Qi <yao.qi@linaro.org>
4742
4743 * linux-low.c (linux_set_pc_64bit): New function.
4744 (linux_get_pc_64bit): New function.
4745 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
4746 Declare.
4747 * linux-sparc-low.c (debug_threads): Remove declaration.
4748 (sparc_get_pc): Remove.
4749 (the_low_target): Use linux_get_pc_64bit instead of
4750 sparc_get_pc.
4751 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
4752 (the_low_target): Use linux_get_pc_64bit and
4753 linux_set_pc_64bit.
4754
276d4552
YQ
47552016-01-18 Yao Qi <yao.qi@linaro.org>
4756
4757 * linux-arm-low.c (debug_threads): Remove declaration.
4758 (arm_get_pc, arm_set_pc): Remove.
4759 (the_low_target): Use linux_get_pc_32bit and
4760 linux_set_pc_32bit.
4761 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
4762 (the_low_target): Use linux_get_pc_32bit and
4763 linux_set_pc_32bit.
4764 * linux-cris-low.c (debug_threads): Remove declaration.
4765 (cris_get_pc, cris_set_pc,): Remove.
4766 (the_low_target): Use linux_get_pc_32bit and
4767 linux_set_pc_32bit.
4768 * linux-crisv32-low.c (debug_threads): Remove declaration.
4769 (cris_get_pc, cris_set_pc): Remove.
4770 (the_low_target): Use linux_get_pc_32bit and
4771 linux_set_pc_32bit.
4772 * linux-low.c: Include inttypes.h.
4773 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
4774 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
4775 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
4776 (the_low_target): Use linux_get_pc_32bit and
4777 linux_set_pc_32bit.
4778 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
4779 (the_low_target): Use linux_get_pc_32bit and
4780 linux_set_pc_32bit.
4781 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
4782 (the_low_target): Use linux_get_pc_32bit and
4783 linux_set_pc_32bit.
4784 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
4785 (the_low_target): Use linux_get_pc_32bit and
4786 linux_set_pc_32bit.
4787 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
4788 (the_low_target): Use linux_get_pc_32bit and
4789 linux_set_pc_32bit.
4790
eb0edac8
GB
47912016-01-18 Gary Benson <gbenson@redhat.com>
4792
4793 * configure.ac (AC_FUNC_FORK): New check.
4794 * config.in: Regenerate.
4795 * configure: Likewise.
4796
1b451dda
YQ
47972016-01-14 Yao Qi <yao.qi@linaro.org>
4798
4799 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
4800 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
4801 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
4802 arm_get_next_pcs_ctor.
4803
82075af2
JS
48042016-01-12 Josh Stone <jistone@redhat.com>
4805 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4806
4807 * inferiors.h: Include "gdb_vecs.h".
4808 (struct process_info): Add syscalls_to_catch.
4809 * inferiors.c (remove_process): Free syscalls_to_catch.
4810 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
4811 syscall_return stops.
4812 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
4813 * server.c (handle_general_set): Handle QCatchSyscalls.
4814 (handle_query): Report support for QCatchSyscalls.
4815 * target.h (struct target_ops): Add supports_catch_syscall.
4816 (target_supports_catch_syscall): New macro.
4817 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
4818 (struct lwp_info): Add syscall_state.
4819 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
4820 Maintain syscall_state and syscalls_to_catch across exec.
4821 (get_syscall_trapinfo): New function, proxy to the_low_target.
4822 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
4823 (linux_low_filter_event): Toggle syscall_state entry/return for
4824 syscall traps, and set it ignored for all others.
4825 (gdb_catching_syscalls_p): New function.
4826 (gdb_catch_this_syscall_p): New function.
4827 (linux_wait_1): Handle SYSCALL_SIGTRAP.
4828 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
4829 (linux_supports_catch_syscall): New function.
4830 (linux_target_ops): Install it.
4831 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
4832 (the_low_target): Install it.
4833
8f13a3ce
MF
48342016-01-12 Mike Frysinger <vapier@gentoo.org>
4835
4836 * acinclude.m4: Include new ../warning.m4 file.
4837 * configure: Regenerated.
4838 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
4839
5b3da067
MF
48402016-01-12 Mike Frysinger <vapier@gentoo.org>
4841
4842 * ax.c (is_goto_target): Mark static.
4843 * linux-low.c (register_addr): Likewise.
4844 (linux_fetch_registers, linux_store_registers): Likewise.
4845 * mem-break.c (any_persistent_commands): Fix old prototype.
4846 (add_commands_to_breakpoint): Mark static.
4847 * regcache.c (find_register_by_name): Delete unused func.
4848 * remote-utils.c (hex_or_minus_one): Mark static.
4849 * server.c (monitor_show_help): Mark static.
4850 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
4851 handle_v_requests): Likewise.
4852
bc504a31
PA
48532016-01-12 Pedro Alves <palves@redhat.com>
4854
4855 Remove use of the registered trademark symbol throughout.
4856
5a0dd67a
YQ
48572016-01-08 Yao Qi <yao.qi@linaro.org>
4858
4859 * remote-utils.c (getpkt): If c is '\003', call target hook
4860 request_interrupt.
4861
b2ca446f
YQ
48622016-01-06 Yao Qi <yao.qi@linaro.org>
4863
4864 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
4865 linux-aarch32-low.c.
4866 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4867 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
4868 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
4869 (thumb2_breakpoint): Declare.
4870 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
4871 linux-aarch32-low.h.
4872 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4873 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
4874 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
4875
edd88788
JB
48762016-01-01 Joel Brobecker <brobecker@adacore.com>
4877
4878 * gdbreplay.c (gdbreplay_version): Change copyright year in
4879 version message.
4880 * server.c (gdbserver_version): Likewise.
4881
65da7f14
PP
48822015-12-28 Patrick Palka <patrick@parcs.ath.cx>
4883
4884 * server.c (crc32_table): Delete.
4885 (crc32): Use libiberty's xcrc32 function.
4886
4abd5ed2
JB
48872015-12-22 Joel Brobecker <brobecker@adacore.com>
4888
4889 * lynx-low.c (lynx_delete_thread_callback): New function.
4890 (lynx_mourn): Properly delete our process and all of its
4891 threads. Remove call to clear_inferiors.
4892
0e50fe5c
JB
48932015-12-22 Joel Brobecker <brobecker@adacore.com>
4894
4895 * target.c (thread_search_callback): Add check that
4896 the thread_stopped target callback is not NULL before
4897 calling it.
4898
35adc03f
YQ
48992015-12-21 Yao Qi <yao.qi@linaro.org>
4900
4901 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
4902 arm breakpoint.
4903
bd2b2909
AT
49042015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4905
4906 * server.c (handle_query): Call target_supports_software_single_step.
4907
7fe5e27e
AT
49082015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4909
4910 * linux-low.c (single_step): New function.
4911 (linux_resume_one_lwp_throw): Call single_step.
4912 (start_step_over): Likewise.
4913
d9311bfa
AT
49142015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4915
4916 * Makefile.in (SFILES): Append arch/arm-linux.c,
4917 arch/arm-get-next-pcs.c.
4918 (arm-linux.o): New rule.
4919 (arm-get-next-pcs.o): New rule.
4920 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
4921 arm-linux.o.
4922 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
4923 to linux-aarch32-low.c.
4924 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4925 (arm_breakpoint_len, thumb_breakpoint): Likewise.
4926 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
4927 (thumb2_breakpoint_len): Likewise.
4928 (arm_is_thumb_mode): Make non-static.
4929 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
4930 from linux-aarch32-low.c.
4931 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4932 (arm_breakpoint_len, thumb_breakpoint): Likewise.
4933 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
4934 (thumb2_breakpoint_len): Likewise.
4935 (arm_is_thumb_mode): New declaration.
4936 * linux-arm-low.c: Include arch/arm-linux.h
4937 aarch/arm-get-next-pcs.h, sys/syscall.h.
4938 (get_next_pcs_ops): New struct.
4939 (get_next_pcs_addr_bits_remove): New function.
4940 (get_next_pcs_is_thumb): New function.
4941 (get_next_pcs_read_memory_unsigned_integer): Likewise.
4942 (arm_sigreturn_next_pc): Likewise.
4943 (get_next_pcs_syscall_next_pc): Likewise.
4944 (arm_gdbserver_get_next_pcs): Likewise.
4945 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
4946 Initialize.
4947 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
4948 * server.h: Include gdb_vecs.h.
4949
68ce2059
AT
49502015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4951
4952 * Makefile.in (SFILES): Append common/common-regcache.c.
4953 (OBS): Append common-regcache.o.
4954 (common-regcache.o): New rule.
4955 * regcache.c (init_register_cache): Initialize cache to
4956 REG_UNAVAILABLE.
4957 (regcache_raw_read_unsigned): New function.
4958 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
4959 register_status enum.
4960
fa5308bd
AT
49612015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4962
4963 * linux-aarch64-low.c (the_low_targets): Rename
4964 breakpoint_reinsert_addr to get_next_pcs.
4965 * linux-arm-low.c (the_low_targets): Likewise.
4966 * linux-bfin-low.c (the_low_targets): Likewise.
4967 * linux-cris-low.c (the_low_targets): Likewise.
4968 * linux-crisv32-low.c (the_low_targets): Likewise.
4969 * linux-low.c (can_software_single_step): Likewise.
4970 (install_software_single_step_breakpoints): New function.
4971 (start_step_over): Use install_software_single_step_breakpoints.
4972 * linux-low.h: New CORE_ADDR vector.
4973 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
4974 get_next_pcs.
4975 * linux-mips-low.c (the_low_targets): Likewise.
4976 * linux-nios2-low.c (the_low_targets): Likewise.
4977 * linux-sparc-low.c (the_low_targets): Likewise.
4978
4a6ed09b
PA
49792015-12-17 Pedro Alves <palves@redhat.com>
4980
4981 * linux-low.c (linux_kill_one_lwp): Remove references to
4982 LinuxThreads.
4983 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
4984 to 'kill'.
4985 (linux_init_signals): Delete.
4986 (initialize_low): Adjust.
4987 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
4988
7544db95
PA
49892015-12-16 Pedro Alves <palves@redhat.com>
4990
4991 * configure.ac (compiler warning flags): When testing a
4992 -Wno-foo option, check whether -Wfoo works instead.
4993 * configure: Regenerate.
4994
8020350c
DB
49952015-12-11 Don Breazeal <donb@codesourcery.com>
4996
4997 * server.c (process_serial_event): Don't exit from gdbserver
4998 in remote mode if there are still active inferiors.
4999
db91f502
YQ
50002015-12-11 Yao Qi <yao.qi@linaro.org>
5001
5002 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
5003 arm_breakpoint_at if the process is 32-bit.
5004
b37a6290
YQ
50052015-12-11 Yao Qi <yao.qi@linaro.org>
5006
5007 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
5008 arm breakpoint.
5009
17b1509a
YQ
50102015-12-07 Yao Qi <yao.qi@linaro.org>
5011
5012 * configure.srv: Append arm.o to srv_tgtobj for
5013 aarch64*-*-linux* target.
5014 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
5015 from linux-arm-low.c.
5016 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
5017 (arm_breakpoint_len, thumb_breakpoint): Likewise.
5018 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
5019 (thumb2_breakpoint_len): Likewise.
5020 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
5021 (arm_breakpoint_kinds): Likewise.
5022 (arm_breakpoint_kind_from_pc): Likewise.
5023 (arm_sw_breakpoint_from_kind): Likewise.
5024 (arm_breakpoint_kind_from_current_state): Likewise.
5025 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
5026 (arm_sw_breakpoint_from_kind): Declare.
5027 (arm_breakpoint_kind_from_current_state): Declare.
5028 (arm_breakpoint_at): Declare.
5029 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
5030 arm_sw_breakpoint_from_kind if process is 32-bit.
5031 (aarch64_breakpoint_kind_from_pc): New function.
5032 (aarch64_breakpoint_kind_from_current_state): New function.
5033 (the_low_target): Initialize fields breakpoint_kind_from_pc
5034 and breakpoint_kind_from_current_state.
5035 * linux-arm-low.c (arm_breakpoint_kinds): Move to
5036 linux-aarch32-low.c.
5037 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
5038 (arm_breakpoint, arm_breakpoint_len): Likewise.
5039 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
5040 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
5041 (arm_is_thumb_mode): Likewise.
5042 (arm_breakpoint_at): Likewise.
5043 (arm_breakpoint_kind_from_pc): Likewise.
5044 (arm_sw_breakpoint_from_kind): Likewise.
5045 (arm_breakpoint_kind_from_current_state): Likewise.
5046
5047 Revert:
5048 2015-08-04 Yao Qi <yao.qi@linaro.org>
5049
5050 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
5051 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
5052 * server.c (extended_protocol): Remove "static".
5053 * server.h (extended_protocol): Declare it.
5054
ece66d65
JS
50552015-12-04 Josh Stone <jistone@redhat.com>
5056
5057 * target.h (struct target_ops) <arch_setup>: Rename to ...
5058 (struct target_ops) <post_create_inferior>: ... this.
5059 (target_arch_setup): Rename to ...
5060 (target_post_create_inferior): ... this, calling post_create_inferior.
5061 * server.c (start_inferior): Update target_arch_setup calls to
5062 target_post_create_inferior.
5063 * linux-low.c (linux_low_ptrace_options): Forward declare.
5064 (linux_arch_setup): Update its comment for general use.
5065 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
5066 (struct linux_target_ops): Use linux_post_create_inferior.
5067 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
5068 to post_create_inferior.
5069 * nto-low.c (struct nto_target_ops): Likewise.
5070 * spu-low.c (struct spu_target_ops): Likewise.
5071 * win32-low.c (struct win32_target_ops): Likewise.
5072
e58c48b4
AT
50732015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
5074
5075 * linux-arm-low.c: Remove duplicate arch/arm.h include.
5076
fbec8956
AT
50772015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
5078
5079 * linux-arm-low.c (arm_reinsert_addr): Remove function.
5080 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
5081 * linux-cris-low.c (cris_reinsert_addr> Remove function.
5082 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
5083 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
5084 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
5085 * linux-mips-low.c (mips_reinsert_addr): Remove function.
5086 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
5087 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
5088 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
5089 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
5090 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
5091
9b4c5f87
AT
50922015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
5093
5094 * linux-low.c (linux_look_up_symbols): Don't call
5095 linux_supports_traceclone.
5096 * linux-low.h (thread_db_init): Remove use_events argument.
5097 * thread-db.c (thread_db_use_event): Remove global variable.
5098 (struct thread_db) <td_thr_event_enable_p>: Remove field.
5099 (struct thread_db) <td_create_bp>: Remove field.
5100 (thread_db_create_event): Remove function.
5101 (thread_db_enable_reporting): Likewise.
5102 (find_one_thread): Don't check for thread_db_use_events.
5103 (attach_thread): Likewise.
5104 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
5105 (try_thread_db_load_1): Don't check for thread_db_use_events.
5106 (thread_db_init): Remove use_events argument and thread events
5107 handling.
5108 (remove_thread_event_breakpoints): Remove function.
5109 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
5110
7d00775e
AT
51112015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
5112
5113 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
5114 New function.
5115 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5116 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
5117 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5118 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
5119 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
5120 Initialize.
5121 * linux-crisv32-low.c (cris_supports_hardware_single_step):
5122 New function.
5123 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5124 * linux-low.c (can_hardware_single_step): Use
5125 supports_hardware_single_step.
5126 (can_software_single_step): New function.
5127 (start_step_over): Call can_software_single_step.
5128 (linux_supports_hardware_single_step): New function.
5129 (struct target_ops) <supports_software_single_step>: Initialize.
5130 * linux-low.h (struct linux_target_ops)
5131 <supports_hardware_single_step>: Initialize.
5132 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
5133 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5134 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
5135 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
5136 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
5137 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5138 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
5139 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5140 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
5141 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
5142 Initialize.
5143 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
5144 (struct linux_target_ops) <tile_supports_hardware_single_step>:
5145 Initialize.
5146 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
5147 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5148 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
5149 New function.
5150 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5151 * target.h (struct target_ops): <supports_software_single_step>:
5152 New field.
5153 (target_supports_software_single_step): New macro.
5154
2d97cd35
AT
51552015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
5156
5157 * linux-low.c (linux_wait_1): Fix pc advance condition.
5158 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
5159 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
5160
769ef81f
AT
51612015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
5162
5163 * linux-arm-low.c (arm_is_thumb_mode): New function.
5164 (arm_breakpoint_at): Use arm_is_thumb_mode.
5165 (arm_breakpoint_kind_from_current_state): New function.
5166 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
5167 Initialize.
5168 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
5169 (linux_breakpoint_kind_from_current_state): New function.
5170 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
5171 * linux-low.h (struct linux_target_ops)
5172 <breakpoint_kind_from_current_state>: New field.
5173 * target.h (struct target_ops): Likewise.
5174 (target_breakpoint_kind_from_current_state): New macro.
5175
1bebeeca
PA
51762015-11-30 Pedro Alves <palves@redhat.com>
5177
5178 * linux-low.c (linux_resume): Wake up the event loop before
5179 returning.
5180
a67a9fae
PA
51812015-11-30 Pedro Alves <palves@redhat.com>
5182
5183 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
5184 check.
5185 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
5186 to -1.
5187 * target.c (struct thread_search): New structure.
5188 (thread_search_callback): New function.
5189 (prev_general_thread): New global.
5190 (prepare_to_access_memory, done_accessing_memory): New functions.
5191 * target.h (prepare_to_access_memory, done_accessing_memory):
5192 Replace macros with function declarations.
5193
f2faf941
PA
51942015-11-30 Pedro Alves <palves@redhat.com>
5195
5196 PR 14618
5197 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
5198 report TARGET_WAITKIND_NO_RESUMED.
5199 * remote-utils.c (prepare_resume_reply): Handle
5200 TARGET_WAITKIND_NO_RESUMED.
5201 * server.c (report_no_resumed): New global.
5202 (handle_query) <qSupported>: Handle "no-resumed+". Report
5203 "no-resumed+" support.
5204 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
5205 return error if the client doesn't support no-resumed events.
5206 (push_stop_notification): New function.
5207 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
5208 events if the client supports them.
5209
a681f9c9
PA
52102015-11-30 Pedro Alves <palves@redhat.com>
5211
5212 * linux-low.c (thread_still_has_status_pending_p): Don't check
5213 vCont;t here.
5214 (lwp_resumed): New function.
5215 (status_pending_p_callback): Return early if the LWP is not
5216 supposed to be resumed.
5217
65706a29
PA
52182015-11-30 Pedro Alves <palves@redhat.com>
5219
5220 * linux-low.c (handle_extended_wait): Assert that the LWP's
5221 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
5222 thread create events, leave the new child's status pending.
5223 (linux_low_filter_event): If GDB wants to hear about thread exit
5224 events, leave the LWP marked dead and don't delete it.
5225 (linux_wait_for_event_filtered): Don't check for thread exit.
5226 (filter_exit_event): New function.
5227 (linux_wait_1): Use it, when returning an exit event.
5228 (linux_resume_one_lwp_throw): Assert that the LWP's
5229 waitstatus is TARGET_WAITKIND_IGNORE.
5230 * remote-utils.c (prepare_resume_reply): Handle
5231 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
5232 * server.c (report_thread_events): New global.
5233 (handle_general_set): Handle QThreadEvents.
5234 (handle_query) <qSupported>: Handle and report QThreadEvents+;
5235 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
5236 TARGET_WAITKIND_THREAD_EXITED.
5237 * server.h (report_thread_events): Declare.
5238
56cf4bed
PA
52392015-11-30 Pedro Alves <palves@redhat.com>
5240
5241 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
5242 the thread's last_resume_kind was resume_stop.
5243
500c1d85
PA
52442015-11-30 Pedro Alves <palves@redhat.com>
5245
5246 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
5247 before returning.
5248
de979965
PA
52492015-11-30 Pedro Alves <palves@redhat.com>
5250
5251 * server.c (handle_v_requests): Handle vCtrlC.
5252
34c65914
PA
52532015-11-30 Pedro Alves <palves@redhat.com>
5254
5255 * gdbthread.h (find_any_thread_of_pid): Declare.
5256 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
5257 functions.
5258 * server.c (handle_query): If current_thread is NULL, look for
5259 another thread of the selected process.
5260
79efa585 52612015-11-26 Daniel Colascione <dancol@dancol.org>
01a49af8 5262 Simon Marchi <simon.marchi@ericsson.com>
79efa585
SM
5263
5264 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
5265 * server.c (handle_qxfer_threads_worker): Refactor to include thread
5266 name in reply.
5267 * target.h (struct target_ops) <thread_name>: New field.
5268 (target_thread_name): New macro.
5269
80d82c19
JB
52702015-11-23 Joel Brobecker <brobecker@adacore.com>
5271
5272 * regcache.h (regcache_invalidate_pid): Add declaration.
5273 * regcache.c (regcache_invalidate_pid): New function, extracted
5274 from regcache_invalidate.
5275 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
5276 Add trivial documentation comment.
5277 * lynx-low.c: Use regcache_invalidate_pid instead of
5278 regcache_invalidate.
5279
64da5dd5
JB
52802015-11-23 Joel Brobecker <brobecker@adacore.com>
5281
5282 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
5283 and Elf64_auxv_t if the target is Android.
5284
37ce4055
DE
52852015-11-22 Doug Evans <xdje42@gmail.com>
5286
5287 * target.h: #include <sys/types.h>.
5288
06e03fff
PA
52892015-11-19 Pedro Alves <palves@redhat.com>
5290
5291 * linux-low.c (linux_process_qsupported): Change prototype.
5292 Adjust.
5293 * linux-low.h (struct linux_target_ops) <process_qsupported>:
5294 Change prototype.
5295 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
5296 and adjust to loop over all features.
5297 * server.c (handle_query) <qSupported>: Adjust to call
5298 target_process_qsupported once, passing it a vector of unprocessed
5299 features.
5300 * target.h (struct target_ops) <process_qsupported>: Change
5301 prototype.
5302 (target_process_qsupported): Adjust.
5303
9a084706
PA
53042015-11-19 Pedro Alves <palves@redhat.com>
5305
5306 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
5307 mode.
5308 * configure: Regenerate.
5309
dad44a1f
PA
53102015-11-19 Pedro Alves <palves@redhat.com>
5311
5312 * configure: Regenerate.
5313
231c0592
YQ
53142015-11-19 Yao Qi <yao.qi@linaro.org>
5315
5316 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
5317 type to uint32_t.
5318
6c1c9a8b
YQ
53192015-11-19 Yao Qi <yao.qi@linaro.org>
5320
5321 * linux-aarch64-low.c (enum aarch64_operand_type): New.
5322 (struct aarch64_operand): Move enum out.
5323
9caa3311
YQ
53242015-11-19 Yao Qi <yao.qi@linaro.org>
5325
5326 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
5327 struct user_fpsimd_state *.
5328 (aarch64_store_fpregset): Likewise.
5329
6a69a054
YQ
53302015-11-19 Yao Qi <yao.qi@linaro.org>
5331
5332 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
5333 struct user_pt_regs *.
5334 (aarch64_store_gregset): Likewise.
5335
1798301e
PA
53362015-11-18 Pedro Alves <palves@redhat.com>
5337
5338 * Makefile.in (all_object_files): Add $IPA_OBJS.
5339
ce7715e2
PA
53402015-11-17 Pedro Alves <palves@redhat.com>
5341
5342 * win32-low.c (win32_resume): Use gdb_signal_from_host,
5343 GDB_SIGNAL_0 and gdb_signal_to_string.
5344
c0879059
PA
53452015-11-17 Pedro Alves <palves@redhat.com>
5346
5347 * win32-low.c (handle_output_debug_string): Remove parameter.
5348 (win32_kill): Remove our_status local and adjust call to
5349 handle_output_debug_string.
5350 (get_child_debug_event): Adjust call to
5351 handle_output_debug_string.
5352
1996e237
SM
53532015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5354
5355 * linux-mips-low.c (mips_fill_gregset): Add cast.
5356 (mips_store_gregset): Likewise.
5357 (mips_fill_fpregset): Likewise.
5358 (mips_store_fpregset): Likewise.
5359
cbec665b
SM
53602015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5361
5362 * linux-mips-low.c (mips_add_watchpoint): Rename private to
5363 priv.
5364
eb3e3c67
SM
53652015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5366
5367 * linux-mips-low.c (mips_linux_new_thread): Change type of
5368 watch_type to enum target_hw_bp_type.
5369
171de4b8
SM
53702015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5371
5372 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
5373 Change return type to arm_hwbp_type.
5374
04248ead
SM
53752015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5376
5377 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
5378 (arm_store_gregset): Likewise.
5379 * linux-arm-low.c (arm_get_hwcap): Likewise.
5380 (arm_read_description): Likewise.
5381
04b3479c
SM
53822015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5383
5384 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
5385
2bc84e8a
SM
53862015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5387
5388 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
5389 (ppc_fill_vsxregset): Likewise.
5390 (ppc_store_vsxregset): Likewise.
5391 (ppc_fill_vrregset): Likewise.
5392 (ppc_store_vrregset): Likewise.
5393 (ppc_fill_evrregset): Likewise.
5394 (ppc_store_evrregset): Likewise.
5395
e6c5bb05
SM
53962015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5397
5398 * linux-ppc-low.c (ppc_usrregs_info): Remove
5399 forward-declaration.
5400 (ppc_arch_setup): Move lower in file.
5401
7ea45d72
SM
54022015-10-30 Simon Marchi <simon.marchi@ericsson.com>
5403
5404 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
5405 (ps_pdwrite): Likewise.
5406
69291610
HW
54072015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
5408
5409 * linux-arm-low.c (arm_new_thread): Move pointer dereference
5410 to after assert checks.
5411
b42945fd
SM
54122015-10-29 Simon Marchi <simon.marchi@ericsson.com>
5413
5414 * proc-service.c (ps_pdread): Add/adjust casts.
5415 (ps_pdwrite): Add/adjust casts.
5416
d6f85c84
SM
54172015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
5418
5419 * server.c (handle_search_memory_1): Cast return value of
5420 memmem.
5421
f98cd059
SM
54222015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
5423
5424 * server.c (write_qxfer_response): Change type of data to
5425 gdb_byte *.
5426
d2412fa5
PA
54272015-10-29 Pedro Alves <palves@redhat.com>
5428
5429 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
5430
c17414a2
PA
54312015-10-29 Pedro Alves <palves@redhat.com>
5432
5433 * tracepoint.c (clear_installed_tracepoints): Add casts.
5434
e053fbc4
PA
54352015-10-29 Pedro Alves <palves@redhat.com>
5436
5437 * server.c (handle_v_cont, process_serial_event): Add enum
5438 gdb_signal casts to signal parsing code.
5439
add67df8
PA
54402015-10-29 Pedro Alves <palves@redhat.com>
5441
5442 * linux-low.h (NULL_REGSET): Define.
5443 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
5444 * linux-arm-low.c (arm_regsets): Likewise.
5445 * linux-crisv32-low.c (cris_regsets): Likewise.
5446 * linux-m68k-low.c (m68k_regsets): Likewise.
5447 * linux-mips-low.c (mips_regsets): Likewise.
5448 * linux-nios2-low.c (nios2_regsets): Likewise.
5449 * linux-ppc-low.c (ppc_regsets): Likewise.
5450 * linux-s390-low.c (s390_regsets): Likewise.
5451 * linux-sh-low.c (sh_regsets): Likewise.
5452 * linux-sparc-low.c (sparc_regsets): Likewise.
5453 * linux-tic6x-low.c (tic6x_regsets): Likewise.
5454 * linux-tile-low.c (tile_regsets): Likewise.
5455 * linux-x86-low.c (x86_regsets): Likewise.
5456 * linux-xtensa-low.c (xtensa_regsets): Likewise.
5457
50bc912a
PA
54582015-10-29 Pedro Alves <palves@redhat.com>
5459
5460 * linux-low.h (NULL_REGSET): Define.
5461 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
5462 * linux-arm-low.c (arm_regsets): Likewise.
5463 * linux-crisv32-low.c (cris_regsets): Likewise.
5464 * linux-m68k-low.c (m68k_regsets): Likewise.
5465 * linux-mips-low.c (mips_regsets): Likewise.
5466 * linux-nios2-low.c (nios2_regsets): Likewise.
5467 * linux-ppc-low.c (ppc_regsets): Likewise.
5468 * linux-s390-low.c (s390_regsets): Likewise.
5469 * linux-sh-low.c (sh_regsets): Likewise.
5470 * linux-sparc-low.c (sparc_regsets): Likewise.
5471 * linux-tic6x-low.c (tic6x_regsets): Likewise.
5472 * linux-tile-low.c (tile_regsets): Likewise.
5473 * linux-x86-low.c (x86_regsets): Likewise.
5474 * linux-xtensa-low.c (xtensa_regsets): Likewise.
5475
682b2546
DE
54762015-10-26 Doug Evans <dje@google.com>
5477
5478 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
5479
963843d4
DE
54802015-10-26 Doug Evans <dje@google.com>
5481
5482 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
5483
d41401ac
DE
54842015-10-26 Doug Evans <dje@google.com>
5485
5486 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
5487 for debug_printf.
5488 (attach_thread, find_new_threads_callback): Ditto.
5489
3db28855
AT
54902015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
5491
5492 * mem-break.h (set_breakpoint_data): Remove.
5493
fb78e89c
AT
54942015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
5495
5496 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
5497 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
5498 (initialize_low): Remove set_breakpoint_data call.
5499 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
5500 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
5501 (initialize_low): Remove set_breakpoint_data call.
5502 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
5503 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
5504 (initialize_low): Remove set_breakpoint_data call.
5505
2e6ee069
AT
55062015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
5507
5508 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
5509 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
5510 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
5511 * target.h (target_breakpoint_kind_from_pc): New macro.
5512
1652a986
AT
55132015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
5514
5515 * linux-low.c (default_breakpoint_kind_from_pc): New function.
5516 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
5517 the default breakpoint kind.
5518
abeead09
AT
55192015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5520
5521 * linux-arm-low.c (arm_supports_z_point_type): Add software
5522 breakpoint support.
5523
b0b4b501
AT
55242015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5525
5526 * linux-arm-low.c: Refactor breakpoint definitions.
5527 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
5528 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
5529
8689682c
AT
55302015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5531
5532 * Makefile.in: Add arm.c/o.
5533 * configure.srv: Likewise.
5534 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
5535 (arm_breakpoint_kind_from_pc): New function.
5536 (arm_sw_breakpoint_from_kind): Return proper kind.
5537 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
5538
27165294
AT
55392015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5540
5541 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
5542 removal.
5543 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
5544 (struct raw_breakpoint) <size>: Remove.
5545 (struct raw_breakpoint) <kind>: Add.
5546 (bp_size): New function.
5547 (bp_opcode): Likewise.
5548 (find_raw_breakpoint_at): Adjust for kind.
5549 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
5550 (remove_memory_breakpoint): Adjust for kind call bp_size.
5551 (set_raw_breakpoint_at): Adjust for kind.
5552 (set_breakpoint): Likewise.
5553 (set_breakpoint_at): Call breakpoint_kind_from_pc.
5554 (delete_raw_breakpoint): Adjust for kind.
5555 (delete_breakpoint): Likewise.
5556 (find_gdb_breakpoint): Likewise.
5557 (set_gdb_breakpoint_1): Likewise.
5558 (set_gdb_breakpoint): Likewise.
5559 (delete_gdb_breakpoint_1): Likewise.
5560 (delete_gdb_breakpoint): Likewise.
5561 (uninsert_raw_breakpoint): Likewise.
5562 (reinsert_raw_breakpoint): Likewise.
5563 (set_breakpoint_data): Remove.
5564 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
5565 (check_mem_read): Adjust for kind call bp_size.
5566 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
5567 (clone_one_breakpoint): Adjust for kind.
5568 * mem-break.h (set_gdb_breakpoint): Likewise.
5569 (delete_gdb_breakpoint): Likewise.
5570 * server.c (process_serial_event): Likewise.
5571
dd373349
AT
55722015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5573
5574 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
5575 (struct linux_target_ops) <breakpoint>: Remove.
5576 (struct linux_target_ops) <breakpoint_len>: Remove.
5577 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5578 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5579 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
5580 (arm_sw_breakpoint_from_kind): New function.
5581 * linux-bfin-low.c (bfin_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-cris-low.c (cris_sw_breakpoint_from_kind): New function.
5587 (struct linux_target_ops) <breakpoint>: Remove.
5588 (struct linux_target_ops) <breakpoint_len>: Remove.
5589 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5590 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5591 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
5592 (struct linux_target_ops) <breakpoint>: Remove.
5593 (struct linux_target_ops) <breakpoint_len>: Remove.
5594 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5595 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5596 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
5597 and sw_breakpoint_from_kind to increment the pc.
5598 (linux_breakpoint_kind_from_pc): New function.
5599 (linux_sw_breakpoint_from_kind): New function.
5600 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
5601 (initialize_low): Call breakpoint_kind_from_pc and
5602 sw_breakpoint_from_kind to replace breakpoint_data/len.
5603 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
5604 New field.
5605 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
5606 * linux-m32r-low.c (m32r_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-m68k-low.c (m68k_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-mips-low.c (mips_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-nios2-low.c (nios2_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-ppc-low.c (ppc_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-s390-low.c (s390_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-sh-low.c (sh_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-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
5642 (struct linux_target_ops) <breakpoint>: Remove.
5643 (struct linux_target_ops) <breakpoint_len>: Remove.
5644 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5645 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5646 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
5647 (struct linux_target_ops) <breakpoint>: Remove.
5648 (struct linux_target_ops) <breakpoint_len>: Remove.
5649 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5650 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5651 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
5652 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
5653 (struct linux_target_ops) <breakpoint>: Remove.
5654 (struct linux_target_ops) <breakpoint_len>: Remove.
5655 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5656 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5657 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
5658 (struct linux_target_ops) <breakpoint>: Remove.
5659 (struct linux_target_ops) <breakpoint_len>: Remove.
5660 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5661 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5662
4cd98a19
AT
56632015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5664
5665 * linux-cris-low.c (cris_get_pc): Remove void arg.
5666
774ee6d2
AR
56672015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
5668
5669 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
5670 variable name.
5671
833dcd29
AR
56722015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
5673
5674 * inferiors.c (thread_pid_matches_callback): New function.
5675 (find_thread_process): New function.
5676 (remove_thread): Reset current_thread.
5677 (remove_process): Assert threads have been removed first.
5678
8d689ee5
YQ
56792015-10-15 Yao Qi <yao.qi@linaro.org>
5680
5681 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
5682 if it is 3.
5683 (aarch64_remove_point): Likewise.
5684 * regcache.c (regcache_register_size): New function.
5685
1c2e1515
YQ
56862015-10-12 Yao Qi <yao.qi@linaro.org>
5687
5688 * linux-aarch64-low.c: Update all callers as emit_load_store
5689 is renamed to aarch64_emit_load_store.
5690
e1c587c3
YQ
56912015-10-12 Yao Qi <yao.qi@linaro.org>
5692
5693 * linux-aarch64-low.c: Update all callers of function renaming
5694 from emit_insn to aarch64_emit_insn.
5695
b6542f81
YQ
56962015-10-12 Yao Qi <yao.qi@linaro.org>
5697
5698 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
5699 arch/aarch64-insn.h.
5700 (struct aarch64_memory_operand): Likewise.
5701 (ENCODE): Likewise.
5702 (emit_insn): Move to arch/aarch64-insn.c.
5703 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
5704 (emit_load_store): Move to arch/aarch64-insn.c.
5705 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
5706 (can_encode_int32): Remove.
5707
246994ce
YQ
57082015-10-12 Yao Qi <yao.qi@linaro.org>
5709
5710 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
5711 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
5712 (aarch64_relocate_instruction): Likewise.
5713 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
5714 (struct aarch64_insn_visitor): Likewise.
5715
0badd99f
YQ
57162015-10-12 Yao Qi <yao.qi@linaro.org>
5717
5718 * linux-aarch64-low.c (struct aarch64_insn_data): New.
5719 (struct aarch64_insn_visitor): New.
5720 (struct aarch64_insn_relocation_data): New.
5721 (aarch64_ftrace_insn_reloc_b): New function.
5722 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
5723 (aarch64_ftrace_insn_reloc_cb): Likewise.
5724 (aarch64_ftrace_insn_reloc_tb): Likewise.
5725 (aarch64_ftrace_insn_reloc_adr): Likewise.
5726 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
5727 (aarch64_ftrace_insn_reloc_others): Likewise.
5728 (visitor): New.
5729 (aarch64_relocate_instruction): Use visitor.
5730
dfaffe9d
YQ
57312015-10-12 Yao Qi <yao.qi@linaro.org>
5732
5733 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
5734 int. Add argument buf.
5735 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
5736 aarch64_relocate_instruction.
5737
70b439f0
YQ
57382015-10-12 Yao Qi <yao.qi@linaro.org>
5739
5740 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
5741 argument insn. Remove local variable insn. Don't call
5742 target_read_uint32.
5743 (aarch64_install_fast_tracepoint_jump_pad): Call
5744 target_read_uint32.
5745
7781c06f
YQ
57462015-09-30 Yao Qi <yao.qi@linaro.org>
5747
5748 * linux-aarch64-low.c (emit_movk): Shorten a long line.
5749 (emit_load_store_pair): Likewise.
5750
9a3c8263
SM
57512015-09-25 Simon Marchi <simon.marchi@ericsson.com>
5752
5753 * dll.c (match_dll): Add cast(s).
5754 (unloaded_dll): Likewise.
5755 * linux-low.c (second_thread_of_pid_p): Likewise.
5756 (delete_lwp_callback): Likewise.
5757 (count_events_callback): Likewise.
5758 (select_event_lwp_callback): Likewise.
5759 (linux_set_resume_request): Likewise.
5760 * server.c (accumulate_file_name_length): Likewise.
5761 (emit_dll_description): Likewise.
5762 (handle_qxfer_threads_worker): Likewise.
5763 (visit_actioned_threads): Likewise.
5764 * thread-db.c (any_thread_of): Likewise.
5765 * tracepoint.c (same_process_p): Likewise.
5766 (match_blocktype): Likewise.
5767 (build_traceframe_info_xml): Likewise.
5768
224c3ddb
SM
57692015-09-25 Simon Marchi <simon.marchi@ericsson.com>
5770
5771 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
5772 assignment.
5773 (gdb_unparse_agent_expr): Likewise.
5774 * hostio.c (require_data): Likewise.
5775 (handle_pread): Likewise.
5776 * linux-low.c (disable_regset): Likewise.
5777 (fetch_register): Likewise.
5778 (store_register): Likewise.
5779 (get_dynamic): Likewise.
5780 (linux_qxfer_libraries_svr4): Likewise.
5781 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
5782 (set_fast_tracepoint_jump): Likewise.
5783 (uninsert_fast_tracepoint_jumps_at): Likewise.
5784 (reinsert_fast_tracepoint_jumps_at): Likewise.
5785 (validate_inserted_breakpoint): Likewise.
5786 (clone_agent_expr): Likewise.
5787 * regcache.c (init_register_cache): Likewise.
5788 * remote-utils.c (putpkt_binary_1): Likewise.
5789 (decode_M_packet): Likewise.
5790 (decode_X_packet): Likewise.
5791 (look_up_one_symbol): Likewise.
5792 (relocate_instruction): Likewise.
5793 (monitor_output): Likewise.
5794 * server.c (handle_search_memory): Likewise.
5795 (handle_qxfer_exec_file): Likewise.
5796 (handle_qxfer_libraries): Likewise.
5797 (handle_qxfer): Likewise.
5798 (handle_query): Likewise.
5799 (handle_v_cont): Likewise.
5800 (handle_v_run): Likewise.
5801 (captured_main): Likewise.
5802 * target.c (write_inferior_memory): Likewise.
5803 * thread-db.c (try_thread_db_load_from_dir): Likewise.
5804 * tracepoint.c (init_trace_buffer): Likewise.
5805 (add_tracepoint_action): Likewise.
5806 (add_traceframe): Likewise.
5807 (add_traceframe_block): Likewise.
5808 (cmd_qtdpsrc): Likewise.
5809 (cmd_qtdv): Likewise.
5810 (cmd_qtstatus): Likewise.
5811 (response_source): Likewise.
5812 (response_tsv): Likewise.
5813 (cmd_qtnotes): Likewise.
5814 (gdb_collect): Likewise.
5815 (initialize_tracepoint): Likewise.
5816
afbe19f8
PL
58172015-09-21 Pierre Langlois <pierre.langlois@arm.com>
5818
5819 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
5820 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
5821 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
5822 <NOP>: New.
5823 (enum aarch64_condition_codes): New enum.
5824 (w0): New static global.
5825 (fp): Likewise.
5826 (lr): Likewise.
5827 (struct aarch64_memory_operand) <type>: New
5828 MEMORY_OPERAND_POSTINDEX type.
5829 (postindex_memory_operand): New helper function.
5830 (emit_ret): New function.
5831 (emit_load_store_pair): New function, factored out of emit_stp
5832 with support for MEMORY_OPERAND_POSTINDEX.
5833 (emit_stp): Rewrite using emit_load_store_pair.
5834 (emit_ldp): New function.
5835 (emit_load_store): Likewise.
5836 (emit_ldr): Mention post-index instruction in comment.
5837 (emit_ldrh): New function.
5838 (emit_ldrb): New function.
5839 (emit_ldrsw): Mention post-index instruction in comment.
5840 (emit_str): Likewise.
5841 (emit_subs): New function.
5842 (emit_cmp): Likewise.
5843 (emit_and): Likewise.
5844 (emit_orr): Likewise.
5845 (emit_orn): Likewise.
5846 (emit_eor): Likewise.
5847 (emit_mvn): Likewise.
5848 (emit_lslv): Likewise.
5849 (emit_lsrv): Likewise.
5850 (emit_asrv): Likewise.
5851 (emit_mul): Likewise.
5852 (emit_sbfm): Likewise.
5853 (emit_sbfx): Likewise.
5854 (emit_ubfm): Likewise.
5855 (emit_ubfx): Likewise.
5856 (emit_csinc): Likewise.
5857 (emit_cset): Likewise.
5858 (emit_nop): Likewise.
5859 (emit_ops_insns): New helper function.
5860 (emit_pop): Likewise.
5861 (emit_push): Likewise.
5862 (aarch64_emit_prologue): New function.
5863 (aarch64_emit_epilogue): Likewise.
5864 (aarch64_emit_add): Likewise.
5865 (aarch64_emit_sub): Likewise.
5866 (aarch64_emit_mul): Likewise.
5867 (aarch64_emit_lsh): Likewise.
5868 (aarch64_emit_rsh_signed): Likewise.
5869 (aarch64_emit_rsh_unsigned): Likewise.
5870 (aarch64_emit_ext): Likewise.
5871 (aarch64_emit_log_not): Likewise.
5872 (aarch64_emit_bit_and): Likewise.
5873 (aarch64_emit_bit_or): Likewise.
5874 (aarch64_emit_bit_xor): Likewise.
5875 (aarch64_emit_bit_not): Likewise.
5876 (aarch64_emit_equal): Likewise.
5877 (aarch64_emit_less_signed): Likewise.
5878 (aarch64_emit_less_unsigned): Likewise.
5879 (aarch64_emit_ref): Likewise.
5880 (aarch64_emit_if_goto): Likewise.
5881 (aarch64_emit_goto): Likewise.
5882 (aarch64_write_goto_address): Likewise.
5883 (aarch64_emit_const): Likewise.
5884 (aarch64_emit_call): Likewise.
5885 (aarch64_emit_reg): Likewise.
5886 (aarch64_emit_pop): Likewise.
5887 (aarch64_emit_stack_flush): Likewise.
5888 (aarch64_emit_zero_ext): Likewise.
5889 (aarch64_emit_swap): Likewise.
5890 (aarch64_emit_stack_adjust): Likewise.
5891 (aarch64_emit_int_call_1): Likewise.
5892 (aarch64_emit_void_call_2): Likewise.
5893 (aarch64_emit_eq_goto): Likewise.
5894 (aarch64_emit_ne_goto): Likewise.
5895 (aarch64_emit_lt_goto): Likewise.
5896 (aarch64_emit_le_goto): Likewise.
5897 (aarch64_emit_gt_goto): Likewise.
5898 (aarch64_emit_ge_got): Likewise.
5899 (aarch64_emit_ops_impl): New static global variable.
5900 (aarch64_emit_ops): New target function, return
5901 &aarch64_emit_ops_impl.
5902 (struct linux_target_ops): Install it.
5903
bb903df0
PL
59042015-09-21 Pierre Langlois <pierre.langlois@arm.com>
5905
5906 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
5907 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
5908 aarch64-ipa.o.
5909 * linux-aarch64-ipa.c: New file.
5910 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
5911 and endian.h.
5912 (aarch64_get_thread_area): New target method.
5913 (extract_signed_bitfield): New helper function.
5914 (aarch64_decode_ldr_literal): New function.
5915 (enum aarch64_opcodes): New enum.
5916 (struct aarch64_register): New struct.
5917 (struct aarch64_operand): New struct.
5918 (x0): New static global.
5919 (x1): Likewise.
5920 (x2): Likewise.
5921 (x3): Likewise.
5922 (x4): Likewise.
5923 (w2): Likewise.
5924 (ip0): Likewise.
5925 (sp): Likewise.
5926 (xzr): Likewise.
5927 (aarch64_register): New helper function.
5928 (register_operand): Likewise.
5929 (immediate_operand): Likewise.
5930 (struct aarch64_memory_operand): New struct.
5931 (offset_memory_operand): New helper function.
5932 (preindex_memory_operand): Likewise.
5933 (enum aarch64_system_control_registers): New enum.
5934 (ENCODE): New macro.
5935 (emit_insn): New helper function.
5936 (emit_b): New function.
5937 (emit_bcond): Likewise.
5938 (emit_cb): Likewise.
5939 (emit_tb): Likewise.
5940 (emit_blr): Likewise.
5941 (emit_stp): Likewise.
5942 (emit_ldp_q_offset): Likewise.
5943 (emit_stp_q_offset): Likewise.
5944 (emit_load_store): Likewise.
5945 (emit_ldr): Likewise.
5946 (emit_ldrsw): Likewise.
5947 (emit_str): Likewise.
5948 (emit_ldaxr): Likewise.
5949 (emit_stxr): Likewise.
5950 (emit_stlr): Likewise.
5951 (emit_data_processing_reg): Likewise.
5952 (emit_data_processing): Likewise.
5953 (emit_add): Likewise.
5954 (emit_sub): Likewise.
5955 (emit_mov): Likewise.
5956 (emit_movk): Likewise.
5957 (emit_mov_addr): Likewise.
5958 (emit_mrs): Likewise.
5959 (emit_msr): Likewise.
5960 (emit_sevl): Likewise.
5961 (emit_wfe): Likewise.
5962 (append_insns): Likewise.
5963 (can_encode_int32_in): New helper function.
5964 (aarch64_relocate_instruction): New function.
5965 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
5966 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
5967 (struct linux_target_ops): Install aarch64_get_thread_area,
5968 aarch64_install_fast_tracepoint_jump_pad and
5969 aarch64_get_min_fast_tracepoint_insn_len.
5970
787749ea
PL
59712015-09-21 Pierre Langlois <pierre.langlois@arm.com>
5972
5973 * Makefile.in (aarch64-insn.o): New rule.
5974 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
5975
9812b2e6
YQ
59762015-09-21 Yao Qi <yao.qi@linaro.org>
5977
5978 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
5979
18fe412b
YQ
59802015-09-21 Yao Qi <yao.qi@linaro.org>
5981
5982 * tracepoint.c (max_jump_pad_size): Remove.
5983
a0cc84cd
YQ
59842015-09-18 Yao Qi <yao.qi@linaro.org>
5985
5986 * linux-aarch64-low.c: Don't include sys/uio.h.
5987 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
5988
d78908cf
WW
59892015-09-16 Wei-cheng Wang <cole945@gmail.com>
5990
5991 * tracepoint.c (eval_result_type): Change prototype.
5992 (condition_true_at_tracepoint): Fix argument to compiled_cond.
5993
d57e0d50
PA
59942015-09-15 Pedro Alves <palves@redhat.com>
5995
5996 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
5997 Check whether to report exec events instead of checking whether
5998 multiprocess is enabled.
5999
5a676acc
PA
60002015-09-15 Pedro Alves <palves@redhat.com>
6001
6002 PR remote/18965
6003 * remote-utils.c (prepare_resume_reply): Merge
6004 TARGET_WAITKIND_VFORK_DONE switch case with the
6005 TARGET_WAITKIND_FORKED case.
6006
7c5d0fad
YQ
60072015-09-15 Yao Qi <yao.qi@linaro.org>
6008
6009 * server.c (handle_query): Check string comparison using
6010 "else if" instead of "if".
6011
750ce8d1
YQ
60122015-09-15 Yao Qi <yao.qi@linaro.org>
6013
6014 * server.c (vCont_supported): New global variable.
6015 (handle_query): Set vCont_supported to 1 if "vContSupported+"
6016 matches. Append ";vContSupported+" to own_buf.
6017 (handle_v_requests): Append ";s;S" to own_buf if target supports
6018 hardware single step or vCont_supported is false.
6019 (capture_main): Set vCont_supported to zero.
6020
70b90b91
YQ
60212015-09-15 Yao Qi <yao.qi@linaro.org>
6022
6023 * linux-low.c (linux_supports_conditional_breakpoints): Rename
6024 it to ...
6025 (linux_supports_hardware_single_step): ... New function.
6026 (linux_target_ops): Update.
6027 * lynx-low.c (lynx_target_ops): Set field
6028 supports_hardware_single_step to target_can_do_hardware_single_step.
6029 * nto-low.c (nto_target_ops): Likewise.
6030 * spu-low.c (spu_target_ops): Likewise.
6031 * win32-low.c (win32_target_ops): Likewise.
6032 * target.c (target_can_do_hardware_single_step): New function.
6033 * target.h (struct target_ops) <supports_conditional_breakpoints>:
6034 Remove. <supports_hardware_single_step>: New field.
6035 (target_supports_conditional_breakpoints): Remove.
6036 (target_supports_hardware_single_step): New macro.
6037 (target_can_do_hardware_single_step): Declare.
6038 * server.c (handle_query): Use target_supports_hardware_single_step
6039 instead of target_supports_conditional_breakpoints.
6040
ade90bde
YQ
60412015-09-15 Yao Qi <yao.qi@linaro.org>
6042
6043 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
6044 function.
6045 (struct linux_target_ops the_low_target): Install
6046 aarch64_linux_siginfo_fixup.
6047
94585166
DB
60482015-09-11 Don Breazeal <donb@codesourcery.com>
6049 Luis Machado <lgustavo@codesourcery.com>
6050
6051 * linux-low.c (linux_mourn): Static declaration.
6052 (linux_arch_setup): Move in front of
6053 handle_extended_wait.
6054 (linux_arch_setup_thread): New function.
6055 (handle_extended_wait): Handle exec events. Call
6056 linux_arch_setup_thread. Make event_lwp argument a
6057 pointer-to-a-pointer.
6058 (check_zombie_leaders): Do not check stopped threads.
6059 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
6060 (linux_low_filter_event): Add lwp and thread for exec'ing
6061 non-leader thread if leader thread has been deleted.
6062 Refactor code into linux_arch_setup_thread and call it.
6063 Pass child lwp pointer by reference to handle_extended_wait.
6064 (linux_wait_for_event_filtered): Update comment.
6065 (linux_wait_1): Prevent clobbering exec event status.
6066 (linux_supports_exec_events): New function.
6067 (linux_target_ops) <supports_exec_events>: Initialize new member.
6068 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
6069 new member.
6070 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
6071 * server.c (report_exec_events): New global variable.
6072 (handle_query): Handle qSupported query for exec-events feature.
6073 (captured_main): Initialize report_exec_events.
6074 * server.h (report_exec_events): Declare new global variable.
6075 * target.h (struct target_ops) <supports_exec_events>: New
6076 member.
6077 (target_supports_exec_events): New macro.
6078 * win32-low.c (win32_target_ops) <supports_exec_events>:
6079 Initialize new member.
6080
0568462b
MM
60812015-09-09 Markus Metzger <markus.t.metzger@intel.com>
6082
6083 * linux-low.c (linux_low_enable_btrace): Remove.
6084 (linux_target_ops): Replace linux_low_enable_btrace with
6085 linux_enable_btrace.
6086
39edd165
YQ
60872015-09-03 Yao Qi <yao.qi@linaro.org>
6088
6089 * linux-aarch64-low.c (aarch64_insert_point): Call
6090 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
6091 returns true.
6092
1db33b5a
UW
60932015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
6094
6095 * linux-low.c (check_stopped_by_breakpoint): Use
6096 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
6097
ab290430
PA
60982015-08-27 Pedro Alves <palves@redhat.com>
6099
6100 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
6101
8d749320
SM
61022015-08-26 Simon Marchi <simon.marchi@ericsson.com>
6103
6711b7f8
SM
6104 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
6105 the XNEW-family equivalent.
8d749320
SM
6106 (compile_bytecodes): Likewise.
6107 * dll.c (loaded_dll): Likewise.
6108 * event-loop.c (append_callback_event): Likewise.
6109 (create_file_handler): Likewise.
6110 (create_file_event): Likewise.
6111 * hostio.c (handle_open): Likewise.
6112 * inferiors.c (add_thread): Likewise.
6113 (add_process): Likewise.
6114 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
6115 * linux-arm-low.c (arm_new_process): Likewise.
6116 (arm_new_thread): Likewise.
6117 * linux-low.c (add_to_pid_list): Likewise.
6118 (linux_add_process): Likewise.
6119 (handle_extended_wait): Likewise.
6120 (add_lwp): Likewise.
6121 (enqueue_one_deferred_signal): Likewise.
6122 (enqueue_pending_signal): Likewise.
6123 (linux_resume_one_lwp_throw): Likewise.
6124 (linux_resume_one_thread): Likewise.
6125 (linux_read_memory): Likewise.
6126 (linux_write_memory): Likewise.
6127 * linux-mips-low.c (mips_linux_new_process): Likewise.
6128 (mips_linux_new_thread): Likewise.
6129 (mips_add_watchpoint): Likewise.
6130 * linux-x86-low.c (initialize_low_arch): Likewise.
6131 * lynx-low.c (lynx_add_process): Likewise.
6132 * mem-break.c (set_raw_breakpoint_at): Likewise.
6133 (set_breakpoint): Likewise.
6134 (add_condition_to_breakpoint): Likewise.
6135 (add_commands_to_breakpoint): Likewise.
6136 (clone_agent_expr): Likewise.
6137 (clone_one_breakpoint): Likewise.
6138 * regcache.c (new_register_cache): Likewise.
6139 * remote-utils.c (look_up_one_symbol): Likewise.
6140 * server.c (queue_stop_reply): Likewise.
6141 (start_inferior): Likewise.
6142 (queue_stop_reply_callback): Likewise.
6143 (handle_target_event): Likewise.
6144 * spu-low.c (fetch_ppc_memory): Likewise.
6145 (store_ppc_memory): Likewise.
6146 * target.c (set_target_ops): Likewise.
6147 * thread-db.c (thread_db_load_search): Likewise.
6148 (try_thread_db_load_1): Likewise.
6149 * tracepoint.c (add_tracepoint): Likewise.
6150 (add_tracepoint_action): Likewise.
6151 (create_trace_state_variable): Likewise.
6152 (cmd_qtdpsrc): Likewise.
6153 (cmd_qtro): Likewise.
6154 (add_while_stepping_state): Likewise.
6155 * win32-low.c (child_add_thread): Likewise.
6156 (get_image_name): Likewise.
6157
ed8b7b42
YQ
61582015-08-25 Yao Qi <yao.qi@linaro.org>
6159
6160 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
6161
db3cb7cb
YQ
61622015-08-25 Yao Qi <yao.qi@linaro.org>
6163
6164 * Makefile.in (aarch64-linux.o): New rule.
6165 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
6166 srv_tgtobj.
6167 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
6168 (aarch64_init_debug_reg_state): Make it extern.
6169 (aarch64_linux_prepare_to_resume): Remove.
6170
f6011a1c
YQ
61712015-08-25 Yao Qi <yao.qi@linaro.org>
6172
6173 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
6174 lwp_arch_private_info and ptid_of_lwp.
6175
88e2cf7e
YQ
61762015-08-25 Yao Qi <yao.qi@linaro.org>
6177
6178 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
6179 Find proc_info by find_process_pid. All callers updated.
6180
5e35436e
YQ
61812015-08-25 Yao Qi <yao.qi@linaro.org>
6182
6183 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
6184 Remove.
6185 (debug_reg_change_callback): Remove.
6186 (aarch64_notify_debug_reg_change): Remove.
6187
4a8a7965
YQ
61882015-08-25 Yao Qi <yao.qi@linaro.org>
6189
6190 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
6191 Call current_lwp_ptid.
6192
32a271ee
YQ
61932015-08-25 Yao Qi <yao.qi@linaro.org>
6194
6195 * linux-aarch64-low.c (debug_reg_change_callback): Use
6196 debug_printf.
6197
0d51c8d7
YQ
61982015-08-25 Yao Qi <yao.qi@linaro.org>
6199
6200 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
6201
31a43dd5
YQ
62022015-08-25 Yao Qi <yao.qi@linaro.org>
6203
6204 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
6205
8ee52567
YQ
62062015-08-25 Yao Qi <yao.qi@linaro.org>
6207
6208 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
6209 the code.
6210
ff3f0f45
YQ
62112015-08-25 Yao Qi <yao.qi@linaro.org>
6212
6213 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
6214 Remove.
6215 (debug_reg_change_callback): Remove argument entry and add argument
6216 lwp. Remove local variable thread. Don't print thread id in the
6217 debugging output. Don't check whether pid of thread equals to pid.
6218 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
6219 iterate_over_lwps instead find_inferior.
6220
3d40fbb5
PA
62212015-08-24 Pedro Alves <palves@redhat.com>
6222
6223 * inferiors.c (get_first_process): New function.
6224 * inferiors.h (get_first_process): New declaration.
6225 * remote-utils.c (read_ptid): Default to the first process in the
6226 list, instead of to the current thread's process.
6227
438e1e42
PA
62282015-08-24 Pedro Alves <palves@redhat.com>
6229
6230 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
6231 * event-loop.c: Likewise.
6232 * remote-utils.c: Likewise.
6233 * tracepoint.c: Likewise.
6234
a8c6d4fc
PA
62352015-08-24 Pedro Alves <palves@redhat.com>
6236
6237 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
6238 ptid_get_lwp.
6239
99b0bb12
PA
62402015-08-21 Pedro Alves <palves@redhat.com>
6241
6242 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
6243 instead of literal 1.
6244
f8904751
PA
62452015-08-21 Pedro Alves <palves@redhat.com>
6246
6247 * tdesc.c (default_description): Explicitly zero-initialize.
6248
465a859e
PA
62492015-08-21 Pedro Alves <palves@redhat.com>
6250
6251 PR gdb/18749
6252 * inferiors.c (remove_thread): Discard any pending stop reply for
6253 this thread.
6254 * server.c (remove_all_on_match_pid): Rename to ...
6255 (remove_all_on_match_ptid): ... this. Work with a filter ptid
6256 instead of a pid.
6257 (discard_queued_stop_replies): Change parameter to a ptid. Now
6258 extern.
6259 (handle_v_kill, kill_inferior_callback, captured_main)
6260 (process_serial_event): Adjust.
6261 * server.h (discard_queued_stop_replies): Declare.
6262
f0db101d
PA
62632015-08-21 Pedro Alves <palves@redhat.com>
6264
6265 * linux-low.c (wait_for_sigstop): Always switch to no thread
6266 selected if the previously current thread dies.
6267 * lynx-low.c (lynx_request_interrupt): Use the first thread's
6268 process instead of the current thread's.
6269 * remote-utils.c (input_interrupt): Don't check if there's no
6270 current thread.
6271 * server.c (gdb_read_memory, gdb_write_memory): If setting the
6272 current thread to the general thread fails, error out.
6273 (handle_qxfer_auxv, handle_qxfer_libraries)
6274 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
6275 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
6276 (handle_query): Check if there's a thread selected instead of
6277 checking whether there's any thread in the thread list.
6278 (handle_qxfer_threads, handle_qxfer_btrace)
6279 (handle_qxfer_btrace_conf): Don't error out early if there's no
6280 thread in the thread list.
6281 (handle_v_cont, myresume): Don't set the current thread to the
6282 continue thread.
6283 (process_serial_event) <Hg handling>: Also set thread_id if the
6284 previous general thread is still alive.
6285 (process_serial_event) <g/G handling>: If setting the current
6286 thread to the general thread fails, error out.
6287 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
6288 thread's lwp instead of the current thread's.
6289 * target.c (set_desired_thread): If the desired thread was not
6290 found, leave the current thread pointing to NULL. Return an int
6291 (boolean) indicating success.
6292 * target.h (set_desired_thread): Change return type to int.
6293
40045d91
MF
62942015-08-20 Max Filippov <jcmvbkbc@gmail.com>
6295
6296 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
6297 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
6298 #includes.
6299 (ps_get_thread_area): New function.
6300
45face3b
GB
63012015-08-19 Gary Benson <gbenson@redhat.com>
6302
6303 * hostio.c (handle_pread): Do not attempt to read more data
6304 than hostio_reply_with_data can fit in a packet.
6305
16d5f642
JB
63062015-08-18 Joel Brobecker <brobecker@adacore.com>
6307
6308 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
6309
a738da3a
MF
63102015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
6311
6312 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
6313
33ebda9d
PA
63142015-08-06 Pedro Alves <palves@redhat.com>
6315
6316 * tracepoint.c (expr_eval_result): Now an int.
6317
a44892be
PA
63182015-08-06 Pedro Alves <palves@redhat.com>
6319
6320 * gdbthread.h (struct regcache): Forward declare.
6321 (struct thread_info) <regcache_data>: Now a struct regcache
6322 pointer.
6323 * inferiors.c (inferior_regcache_data)
6324 (set_inferior_regcache_data): Now work with struct regcache
6325 pointers.
6326 * inferiors.h (struct regcache): Forward declare.
6327 (inferior_regcache_data, set_inferior_regcache_data): Now work
6328 with struct regcache pointers.
6329 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
6330 (free_register_cache_thread): Remove struct regcache pointer
6331 casts.
6332
608a1e46
PA
63332015-08-06 Pedro Alves <palves@redhat.com>
6334
6335 * server.c (captured_main): On error, print the exception message
6336 to stderr, and if run_once is set, throw a quit.
6337
f0ce0d3a
PA
63382015-08-06 Pedro Alves <palves@redhat.com>
6339
6340 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
6341 the current thread.
6342
bf47e248
PA
63432015-08-06 Pedro Alves <palves@redhat.com>
6344
6345 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
6346 reading beyond the passed in buffer length.
6347
b6b9ffcc
PL
63482015-08-06 Pierre Langlois <pierre.langlois@arm.com>
6349
6350 * tracepoint.c (symbol_list) <required>: Remove.
6351
863d01bd
PA
63522015-08-06 Pedro Alves <palves@redhat.com>
6353
6354 * linux-low.c (handle_extended_wait): Set the fork child's suspend
6355 count if stopping and suspending threads.
6356 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
6357 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
6358 (linux_detach): Complete an ongoing step-over.
6359 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
6360 throughout.
6361 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
6362 (linux_wait_1): If passing a signal to the inferior after
6363 finishing a step-over, unsuspend and re-resume all lwps. If we
6364 see a single-step event but the thread should be continuing, don't
6365 pass the trap to gdb.
6366 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
6367 internal_error instead of gdb_assert.
6368 (enqueue_pending_signal): New function.
6369 (check_ptrace_stopped_lwp_gone): Add debug output.
6370 (start_step_over): Use internal_error instead of gdb_assert.
6371 (complete_ongoing_step_over): New function.
6372 (linux_resume_one_thread): Don't resume a suspended thread.
6373 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
6374 it stepping.
6375
00db26fa
PA
63762015-08-06 Pedro Alves <palves@redhat.com>
6377
6378 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
6379 (linux_thread_alive): Use lwp_is_marked_dead.
6380 (extended_event_reported): Delete.
6381 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
6382 instead of extended_event_reported.
6383 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
6384 as well.
6385 (lwp_is_marked_dead): New function.
6386 (lwp_running): Use lwp_is_marked_dead.
6387 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
6388 comment.
6389
ad071a30
PA
63902015-08-06 Pedro Alves <palves@redhat.com>
6391
6392 * linux-low.c (linux_wait_1): Move fork event output out of the
6393 !report_to_gdb check. Pass event_child->waitstatus to
6394 target_waitstatus_to_string instead of ourstatus.
6395
524b57e6
YQ
63962015-08-04 Yao Qi <yao.qi@linaro.org>
6397
6398 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
6399 if current_thread is 32 bit.
6400
6085d6f6
YQ
64012015-08-04 Yao Qi <yao.qi@linaro.org>
6402
6403 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
6404 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
6405 * server.c (extended_protocol): Remove "static".
6406 * server.h (extended_protocol): Declare it.
6407
8a7e4587
YQ
64082015-08-04 Yao Qi <yao.qi@linaro.org>
6409
6410 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
6411 both aarch64 and aarch32.
6412 (aarch64_set_pc): Likewise.
6413
3b53ae99
YQ
64142015-08-04 Yao Qi <yao.qi@linaro.org>
6415
6416 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
6417 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
6418 arm-with-neon.xml to srv_xmlfiles.
6419 * linux-aarch64-low.c: Include linux-aarch32-low.h.
6420 (is_64bit_tdesc): New function.
6421 (aarch64_linux_read_description): New function.
6422 (aarch64_arch_setup): Call aarch64_linux_read_description.
6423 (regs_info): Rename to regs_info_aarch64.
6424 (aarch64_regs_info): Return right regs_info.
6425 (initialize_low_arch): Call initialize_low_arch_aarch32.
6426
bd9e6534
YQ
64272015-08-04 Yao Qi <yao.qi@linaro.org>
6428
6429 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
6430 * linux-aarch32-low.c: New file.
6431 * linux-aarch32-low.h: New file.
6432 * linux-arm-low.c (arm_fill_gregset): Move it to
6433 linux-aarch32-low.c.
6434 (arm_store_gregset): Likewise.
6435 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
6436 (arm_store_vfpregset): Call arm_store_vfpregset_num.
6437 (arm_arch_setup): Check if PTRACE_GETREGSET works.
6438 (regs_info): Rename to regs_info_arm.
6439 (arm_regs_info): Return regs_info_aarch32 if
6440 have_ptrace_getregset is 1 and target description is
6441 arm_with_neon or arm_with_vfpv3.
6442 (initialize_low_arch): Don't call init_registers_arm_with_neon.
6443 Call initialize_low_arch_aarch32 instead.
6444
ded48a5e
YQ
64452015-08-04 Yao Qi <yao.qi@linaro.org>
6446
6447 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
6448 * linux-low.c: ... here.
6449 * linux-low.h (have_ptrace_getregset): Declare it.
6450
96e9210f
PA
64512015-08-04 Pedro Alves <palves@redhat.com>
6452
6453 * thread-db.c (struct thread_db): Use new typedefs.
6454 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
6455 CHK calls.
6456 (disable_thread_event_reporting): Cast result of dlsym to
6457 destination function pointer type.
6458 (thread_db_mourn): Use td_ta_delete_ftype.
6459
af60a1ef
SL
64602015-08-03 Sandra Loosemore <sandra@codesourcery.com>
6461
6462 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
6463 arch variant.
6464 (CDX_BREAKPOINT): Define for R2.
6465 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
6466 (the_low_target): Add comments.
6467
e8b41681
YQ
64682015-07-30 Yao Qi <yao.qi@linaro.org>
6469
6470 * linux-arm-low.c (arm_hwcap): Remove it.
6471 (arm_read_description): New local variable arm_hwcap. Don't
6472 set arm_hwcap to zero.
6473
89abb039
YQ
64742015-07-30 Yao Qi <yao.qi@linaro.org>
6475
6476 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
6477 Use regcache->tdesc instead.
6478 (arm_store_wmmxregset): Likewise.
6479 (arm_fill_vfpregset): Likewise.
6480 (arm_store_vfpregset): Likewise.
6481
deca266c
YQ
64822015-07-30 Yao Qi <yao.qi@linaro.org>
6483
6484 * linux-arm-low.c: Include arch/arm.h.
6485 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
6486 (arm_store_gregset): Likewise.
6487
aa58a496
SM
64882015-07-29 Simon Marchi <simon.marchi@ericsson.com>
6489
6490 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
6491 ptrace's 4th parameter.
6492
50904b25
YQ
64932015-07-27 Yao Qi <yao.qi@linaro.org>
6494
6495 * configure.srv (case aarch64*-*-linux*): Don't set
6496 srv_linux_usrregs.
6497
5826e159
PA
64982015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
6499
6500 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
6501 sys/ptrace.h.
6502 * linux-arm-low.c: Likewise.
6503 * linux-cris-low.c: Likewise.
6504 * linux-crisv32-low.c: Likewise.
6505 * linux-low.c: Likewise.
6506 * linux-m68k-low.c: Likewise.
6507 * linux-mips-low.c: Likewise.
6508 * linux-nios2-low.c: Likewise.
6509 * linux-s390-low.c: Likewise.
6510 * linux-sparc-low.c: Likewise.
6511 * linux-tic6x-low.c: Likewise.
6512 * linux-tile-low.c: Likewise.
6513 * linux-x86-low.c: Likewise.
6514
54019719
PA
65152015-07-24 Pedro Alves <palves@redhat.com>
6516
6517 * config.in: Regenerate.
6518 * configure: Regenerate.
6519
eb7aa561
PA
65202015-07-24 Pedro Alves <palves@redhat.com>
6521
6522 * acinclude.m4: Include ../ptrace.m4.
6523 * configure.ac: Call GDB_AC_PTRACE.
6524 * config.in, configure: Regenerate.
6525
55d7b841
YQ
65262015-07-24 Yao Qi <yao.qi@linaro.org>
6527
6528 * linux-low.c (linux_create_inferior): Remove setting to
6529 proc->priv->new_inferior.
6530 (linux_attach): Likewise.
6531 (linux_low_filter_event): Likewise.
6532 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
6533
c06cbd92
YQ
65342015-07-24 Yao Qi <yao.qi@linaro.org>
6535
6536 * linux-low.c (linux_arch_setup): New function.
6537 (linux_low_filter_event): If proc->tdesc is NULL and
6538 proc->attached is true, call the_low_target.arch_setup.
6539 Otherwise, keep status pending, and return.
6540 (linux_resume_one_lwp_throw): Don't call get_pc if
6541 thread->while_stepping isn't NULL. Don't call
6542 get_thread_regcache if proc->tdesc is NULL.
6543 (need_step_over_p): Return 0 if proc->tdesc is NULL.
6544 (linux_target_ops): Install arch_setup.
6545 * server.c (start_inferior): Call the_target->arch_setup.
6546 * target.h (struct target_ops) <arch_setup>: New field.
6547 (target_arch_setup): New marco.
6548 * lynx-low.c (lynx_target_ops): Update.
6549 * nto-low.c (nto_target_ops): Update.
6550 * spu-low.c (spu_target_ops): Update.
6551 * win32-low.c (win32_target_ops): Update.
6552
5ae3ebba
YQ
65532015-07-24 Yao Qi <yao.qi@linaro.org>
6554
6555 * linux-low.c (linux_add_process): Don't set
6556 proc->priv->new_inferior.
6557 (linux_create_inferior): Set proc->priv->new_inferior to 1.
6558 (linux_attach): Likewise.
6559
eb97750b
YQ
65602015-07-24 Yao Qi <yao.qi@linaro.org>
6561
6562 * server.c (start_inferior): Code refactor.
6563
51aee833
YQ
65642015-07-24 Yao Qi <yao.qi@linaro.org>
6565
6566 * server.c (process_serial_event): Set general_thread.
6567
af1b22f3
YQ
65682015-07-21 Yao Qi <yao.qi@linaro.org>
6569
6570 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
6571 aarch64_linux_get_debug_reg_capacity.
6572
554717a3
YQ
65732015-07-17 Yao Qi <yao.qi@linaro.org>
6574
6575 * Makefile.in (aarch64-linux-hw-point.o): New rule.
6576 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
6577 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
6578 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
6579 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
6580 (AARCH64_HWP_ALIGNMENT): Likewise.
6581 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
6582 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
6583 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
6584 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
6585 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
6586 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
6587 (struct aarch64_debug_reg_state): Likewise.
6588 (struct arch_lwp_info): Likewise.
6589 (aarch64_align_watchpoint): Likewise.
6590 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
6591 (aarch64_watchpoint_length): Likewise.
6592 (aarch64_point_encode_ctrl_reg): Likewise
6593 (aarch64_point_is_aligned): Likewise.
6594 (aarch64_align_watchpoint): Likewise.
6595 (aarch64_linux_set_debug_regs):
6596 (aarch64_dr_state_insert_one_point): Likewise.
6597 (aarch64_dr_state_remove_one_point): Likewise.
6598 (aarch64_handle_breakpoint): Likewise.
6599 (aarch64_handle_aligned_watchpoint): Likewise.
6600 (aarch64_handle_unaligned_watchpoint): Likewise.
6601 (aarch64_handle_watchpoint): Likewise.
6602
c67ca4de
YQ
66032015-07-17 Yao Qi <yao.qi@linaro.org>
6604
6605 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
6606 and don't aarch64_get_debug_reg_state. All callers update.
6607 (aarch64_handle_aligned_watchpoint): Likewise.
6608 (aarch64_handle_unaligned_watchpoint): Likewise.
6609 (aarch64_handle_watchpoint): Likewise.
6610 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
6611 (aarch64_remove_point): Likewise.
6612
25abf979
YQ
66132015-07-17 Yao Qi <yao.qi@linaro.org>
6614
6615 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
6616 debug_printf.
6617 (aarch64_handle_unaligned_watchpoint): Likewise.
6618
db1ff28b
JK
66192015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
6620
6621 Revert the previous 3 commits:
6622 Move gdb_regex* to common/
6623 Move linux_find_memory_regions_full & co.
6624 gdbserver build-id attribute generator
6625
700ca40f
JK
66262015-07-15 Aleksandar Ristovski <aristovski@qnx.com
6627 Jan Kratochvil <jan.kratochvil@redhat.com>
6628
6629 gdbserver build-id attribute generator.
6630 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
6631 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
6632 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
6633 (find_phdr): New.
6634 (get_dynamic): Use find_pdhr to traverse program headers.
6635 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
6636 (compare_mapping_entry_range, struct find_memory_region_callback_data)
6637 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
6638 (get_hex_build_id): New.
6639 (linux_qxfer_libraries_svr4): Add optional build-id attribute
6640 to reply XML document.
6641
9904185c
JK
66422015-07-15 Aleksandar Ristovski <aristovski@qnx.com
6643 Jan Kratochvil <jan.kratochvil@redhat.com>
6644
6645 * target.c: Include target/target-utils.h and fcntl.h.
6646 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
6647 (target_fileio_read_stralloc): New functions.
6648
6e5b4429
JK
66492015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
6650
6651 * Makefile.in (OBS): Add gdb_regex.o.
6652 (gdb_regex.o): New.
6653 * config.in: Rebuilt.
6654 * configure: Rebuilt.
6655
ddc98fbf
JK
66562015-07-15 Aleksandar Ristovski <aristovski@qnx.com
6657 Jan Kratochvil <jan.kratochvil@redhat.com>
6658
6659 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
6660 * Makefile.in (OBS): Add target-utils.o.
6661 (linux-maps.o, target-utils.o): New.
6662 * configure.srv (srv_linux_obj): Add linux-maps.o.
6663
e57bb7a0
PL
66642015-07-15 Pierre Langlois <pierre.langlois@arm.com>
6665
6666 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
6667 function, return 1.
6668 (the_low_target): Install it.
6669
586b02a9
PA
66702015-07-14 Pedro Alves <palves@redhat.com>
6671
6672 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
6673 Instead, ignore ECHILD, and throw an error for other errnos.
6674
58c1b36c
PA
66752015-07-10 Pedro Alves <palves@redhat.com>
6676
6677 * event-loop.c (struct callback_event) <data>: Change type to
6678 gdb_client_data instance instead of gdb_client_data pointer.
6679 (append_callback_event): Adjust.
6680
421530db
PL
66812015-07-10 Pierre Langlois <pierre.langlois@arm.com>
6682
6683 * linux-aarch64-low.c: Add comments for each linux_target_ops
6684 method. Remove comments already covered in target_ops and
6685 linux_target_ops definitions.
6686 (the_low_target): Add comments for each unimplemented method.
6687
c2d65f38
YQ
66882015-07-09 Yao Qi <yao.qi@linaro.org>
6689
6690 * linux-aarch64-low.c (aarch64_regmap): Remove.
6691 (aarch64_usrregs_info): Remove.
6692 (regs_info): Set field usrregs to NULL.
6693
b20a6524
MM
66942015-07-02 Markus Metzger <markus.t.metzger@intel.com>
6695
6696 * linux-low.c: Include "rsp-low.h"
6697 (linux_low_encode_pt_config, linux_low_encode_raw): New.
6698 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
6699 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
6700 (handle_btrace_enable_pt): New.
6701 (handle_btrace_general_set): Support "pt".
6702 (handle_btrace_conf_general_set): Support "pt:size".
6703
96c97461
PL
67042015-06-29 Pierre Langlois <pierre.langlois@arm.com>
6705
6706 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
6707 Z_PACKET_SW_BP.
6708
37d66942
PL
67092015-06-29 Pierre Langlois <pierre.langlois@arm.com>
6710
6711 * linux-aarch64-low.c: Remove comment about endianness.
6712 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
6713 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
6714 memcmp.
6715
dc06243f
GB
67162015-06-24 Gary Benson <gbenson@redhat.com>
6717
6718 * linux-i386-ipa.c (stdint.h): Do not include.
6719 * lynx-i386-low.c (stdint.h): Likewise.
6720 * lynx-ppc-low.c (stdint.h): Likewise.
6721 * mem-break.c (stdint.h): Likewise.
6722 * thread-db.c (stdint.h): Likewise.
6723 * tracepoint.c (stdint.h): Likewise.
6724 * win32-low.c (stdint.h): Likewise.
6725
124e13d9
SM
67262015-06-18 Simon Marchi <simon.marchi@ericsson.com>
6727
6728 * server.c (write_qxfer_response): Update call to
6729 remote_escape_output.
6730
909c2cda
JK
67312015-06-15 Aleksandar Ristovski <aristovski@qnx.com
6732 Jan Kratochvil <jan.kratochvil@redhat.com>
6733
6734 Merge multiple hex conversions.
6735 * gdbreplay.c (tohex): Rename to 'fromhex'.
6736 (logchar): Use fromhex.
6737
24c05f46
JK
67382015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
6739
6740 * server.c (handle_qxfer_libraries): Set `version' attribute for
6741 <library-list>.
6742
14d2069a
GB
67432015-06-10 Gary Benson <gbenson@redhat.com>
6744
6745 * target.h (struct target_ops) <multifs_open>: New field.
6746 <multifs_unlink>: Likewise.
6747 <multifs_readlink>: Likewise.
6748 * linux-low.c (nat/linux-namespaces.h): New include.
6749 (linux_target_ops): Initialize the_target->multifs_open,
6750 the_target->multifs_unlink and the_target->multifs_readlink.
6751 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
6752 * hostio.c (hostio_fs_pid): New static variable.
6753 (hostio_handle_new_gdb_connection): New function.
6754 (handle_setfs): Likewise.
6755 (handle_open): Use the_target->multifs_open as appropriate.
6756 (handle_unlink): Use the_target->multifs_unlink as appropriate.
6757 (handle_readlink): Use the_target->multifs_readlink as
6758 appropriate.
6759 (handle_vFile): Handle vFile:setfs packets.
6760 * server.c (handle_query): Call hostio_handle_new_gdb_connection
6761 after target_handle_new_gdb_connection.
6762
4b8b5e72
GB
67632015-06-10 Gary Benson <gbenson@redhat.com>
6764
6765 * configure.ac (AC_CHECK_FUNCS): Add setns.
6766 * config.in: Regenerate.
6767 * configure: Likewise.
6768 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
6769 (linux-namespaces.o): New rule.
6770 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
6771
3ac2e371
GB
67722015-06-09 Gary Benson <gbenson@redhat.com>
6773
6774 * hostio.c (handle_open): Process mode argument with
6775 fileio_to_host_mode.
6776
ca9b78ce
YQ
67772015-06-01 Yao Qi <yao.qi@linaro.org>
6778
6779 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
6780 * linux-x86-low.c: Likewise.
6781
bfacd19d
DB
67822015-05-28 Don Breazeal <donb@codesourcery.com>
6783
6784 * linux-low.c (handle_extended_wait): Initialize
6785 thread_info.last_resume_kind for new fork children.
6786
452003ef
PA
67872015-05-15 Pedro Alves <palves@redhat.com>
6788
6789 * target.h (target_handle_new_gdb_connection): Rewrite using if
6790 wrapped in do/while.
6791
1041a03c
JB
67922015-05-14 Joel Brobecker <brobecker@adacore.com>
6793
6794 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
6795 * configure, config.in: Regenerate.
6796 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
6797 Declare typedef.
6798
c269dbdb
DB
67992015-05-12 Don Breazeal <donb@codesourcery.com>
6800
6801 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
6802 PTRACE_EVENT_VFORK_DONE.
6803 (linux_low_ptrace_options, extended_event_reported): Add vfork
6804 events.
6805 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
6806 and "vforkdone" for RSP 'T' Stop Reply Packet.
6807 * server.h (report_vfork_events): Declare
6808 global variable.
6809
3a8a0396
DB
68102015-05-12 Don Breazeal <donb@codesourcery.com>
6811
6812 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
6813 (the_low_target) <new_fork>: Initialize new member.
6814 * linux-arm-low.c (arm_new_fork): New function.
6815 (the_low_target) <new_fork>: Initialize new member.
6816 * linux-low.c (handle_extended_wait): Call new target function
6817 new_fork.
6818 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
6819 * linux-mips-low.c (mips_add_watchpoint): New function
6820 extracted from mips_insert_point.
6821 (the_low_target) <new_fork>: Initialize new member.
6822 (mips_linux_new_fork): New function.
6823 (mips_insert_point): Call mips_add_watchpoint.
6824 * linux-x86-low.c (x86_linux_new_fork): New function.
6825 (the_low_target) <new_fork>: Initialize new member.
6826
de0d863e
DB
68272015-05-12 Don Breazeal <donb@codesourcery.com>
6828
6829 * linux-low.c (handle_extended_wait): Implement return value,
6830 rename argument 'event_child' to 'event_lwp', handle
6831 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
6832 (linux_low_ptrace_options): New function.
6833 (linux_low_filter_event): Call linux_low_ptrace_options,
6834 use different argument fo linux_enable_event_reporting,
6835 use return value from handle_extended_wait.
6836 (extended_event_reported): New function.
6837 (linux_wait_1): Call extended_event_reported and set
6838 status to report fork events.
6839 (linux_write_memory): Add pid to debug message.
6840 (reset_lwp_ptrace_options_callback): New function.
6841 (linux_handle_new_gdb_connection): New function.
6842 (linux_target_ops): Initialize new structure member.
6843 * linux-low.h (struct lwp_info) <waitstatus>: New member.
6844 * lynx-low.c: Initialize new structure member.
6845 * remote-utils.c (prepare_resume_reply): Implement stop reason
6846 "fork" for "T" stop message.
6847 * server.c (handle_query): Call handle_new_gdb_connection.
6848 * server.h (report_fork_events): Declare global flag.
6849 * target.h (struct target_ops) <handle_new_gdb_connection>:
6850 New member.
6851 (target_handle_new_gdb_connection): New macro.
6852 * win32-low.c: Initialize new structure member.
6853
ddcbc397
DB
68542015-05-12 Don Breazeal <donb@codesourcery.com>
6855
6856 * mem-break.c (APPEND_TO_LIST): Define macro.
6857 (clone_agent_expr): New function.
6858 (clone_one_breakpoint): New function.
6859 (clone_all_breakpoints): New function.
6860 * mem-break.h: Declare new functions.
6861
89245bc0
DB
68622015-05-12 Don Breazeal <donb@codesourcery.com>
6863
6864 * linux-low.c (linux_supports_fork_events): New function.
6865 (linux_supports_vfork_events): New function.
6866 (linux_target_ops): Initialize new structure members.
6867 (initialize_low): Call linux_check_ptrace_features.
6868 * lynx-low.c (lynx_target_ops): Initialize new structure
6869 members.
6870 * server.c (report_fork_events, report_vfork_events):
6871 New global flags.
6872 (handle_query): Add new features to qSupported packet and
6873 response.
6874 (captured_main): Initialize new global variables.
6875 * target.h (struct target_ops) <supports_fork_events>:
6876 New member.
6877 <supports_vfork_events>: New member.
6878 (target_supports_fork_events): New macro.
6879 (target_supports_vfork_events): New macro.
6880 * win32-low.c (win32_target_ops): Initialize new structure
6881 members.
6882
835205d0
GB
68832015-05-12 Gary Benson <gbenson@redhat.com>
6884
6885 * server.c (handle_qxfer_exec_file): Use current process
6886 if annex is empty.
6887
21e94bd9
SL
68882015-05-08 Sandra Loosemore <sandra@codesourcery.com>
6889
6890 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
6891 Remove HAVE_PTRACE_GETREGS conditionals.
6892 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
6893 instead of PTRACE_GETREGS and PTRACE_SETREGS.
6894
45614f15
YQ
68952015-05-08 Yao Qi <yao.qi@linaro.org>
6896
6897 * linux-low.c (linux_supports_conditional_breakpoints): New
6898 function.
6899 (linux_target_ops): Install new target method.
6900 * lynx-low.c (lynx_target_ops): Install NULL hook for
6901 supports_conditional_breakpoints.
6902 * nto-low.c (nto_target_ops): Likewise.
6903 * spu-low.c (spu_target_ops): Likewise.
6904 * win32-low.c (win32_target_ops): Likewise.
6905 * server.c (handle_query): Check
6906 target_supports_conditional_breakpoints.
6907 * target.h (struct target_ops) <supports_conditional_breakpoints>:
6908 New field.
6909 (target_supports_conditional_breakpoints): New macro.
6910
80ad801e
PA
69112015-05-06 Pedro Alves <palves@redhat.com>
6912
6913 PR server/18081
6914 * server.c (start_inferior): If the process exits, mourn it.
6915
819843c7
GB
69162015-04-21 Gary Benson <gbenson@redhat.com>
6917
6918 * hostio.c (fileio_open_flags_to_host): Factored out to
6919 fileio_to_host_openflags in common/fileio.c. Single use
6920 updated.
6921
a2d5a9d7
MF
69222015-04-17 Max Filippov <jcmvbkbc@gmail.com>
6923
6924 * linux-xtensa-low.c (xtensa_fill_gregset)
6925 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
6926 XCHAL_HAVE_LOOP.
6927
deb44829
MF
69282015-04-17 Max Filippov <jcmvbkbc@gmail.com>
6929
6930 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
6931 (regs_info): Replace usrregs pointer with NULL.
6932
e57f1de3
GB
69332015-04-17 Gary Benson <gbenson@redhat.com>
6934
6935 * target.h (struct target_ops) <pid_to_exec_file>: New field.
6936 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
6937 * server.c (handle_qxfer_exec_file): New function.
6938 (qxfer_packets): Add exec-file entry.
6939 (handle_query): Report qXfer:exec-file:read as supported packet.
6940
62828379
RN
69412015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
6942
6943 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
6944
b88bb450
GB
69452015-04-09 Gary Benson <gbenson@redhat.com>
6946
6947 * hostio-errno.c (errno_to_fileio_error): Remove function.
6948 Update caller to use remote_fileio_to_fio_error.
6949
c8f4bfdd
YQ
69502015-04-09 Yao Qi <yao.qi@linaro.org>
6951
6952 * linux-low.c (linux_insert_point): Call
6953 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
6954 (linux_remove_point): Call remove_memory_breakpoint if type is
6955 raw_bkpt_type_sw.
6956 * linux-x86-low.c (x86_insert_point): Don't call
6957 insert_memory_breakpoint.
6958 (x86_remove_point): Don't call remove_memory_breakpoint.
6959
41f98f02
PA
69602015-04-01 Pedro Alves <palves@redhat.com>
6961 Cleber Rosa <crosa@redhat.com>
6962
6963 * server.c (gdbserver_usage): Reorganize and extend the usage
6964 message.
6965
2bf6fb9d
PA
69662015-03-24 Pedro Alves <palves@redhat.com>
6967
6968 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
6969 output. Also dump TRAP_TRACE.
6970 (linux_low_filter_event): In debug output, distinguish a
6971 resume_stop SIGSTOP from a delayed SIGSTOP.
6972
369f6daa
GB
69732015-03-24 Gary Benson <gbenson@redhat.com>
6974
6975 * linux-x86-low.c (x86_linux_new_thread): Moved to
6976 nat/x86-linux.c.
6977 (x86_linux_prepare_to_resume): Likewise.
6978
8e5d4070
GB
69792015-03-24 Gary Benson <gbenson@redhat.com>
6980
6981 * Makefile.in (x86-linux-dregs.o): New rule.
6982 * configure.srv: Add x86-linux-dregs.o to relevant targets.
6983 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
6984 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
6985 (x86_linux_dr_get): Likewise.
6986 (x86_linux_dr_set): Likewise.
6987 (update_debug_registers_callback): Likewise.
6988 (x86_linux_dr_set_addr): Likewise.
6989 (x86_linux_dr_get_addr): Likewise.
6990 (x86_linux_dr_set_control): Likewise.
6991 (x86_linux_dr_get_control): Likewise.
6992 (x86_linux_dr_get_status): Likewise.
6993 (x86_linux_update_debug_registers): Likewise.
6994
2b95d440
GB
69952015-03-24 Gary Benson <gbenson@redhat.com>
6996
6997 * linux-x86-low.c (x86_linux_update_debug_registers):
6998 New function, factored out from...
6999 (x86_linux_prepare_to_resume): ...this.
7000
14b0bc68
GB
70012015-03-24 Gary Benson <gbenson@redhat.com>
7002
7003 * linux-x86-low.c (x86_linux_dr_get): Update comments.
7004 (x86_linux_dr_set): Likewise.
7005 (update_debug_registers_callback): Likewise.
7006 (x86_linux_dr_set_addr): Likewise.
7007 (x86_linux_dr_get_addr): Likewise.
7008 (x86_linux_dr_set_control): Likewise.
7009 (x86_linux_dr_get_control): Likewise.
7010 (x86_linux_dr_get_status): Likewise.
7011 (x86_linux_prepare_to_resume): Likewise.
7012
5dfe6ca8
GB
70132015-03-24 Gary Benson <gbenson@redhat.com>
7014
7015 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
7016 Use perror_with_name. Pass string through gettext.
7017 (x86_linux_dr_set): Likewise.
7018
d33472ad
GB
70192015-03-24 Gary Benson <gbenson@redhat.com>
7020
7021 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
7022 (x86_linux_dr_set_addr): ...this.
7023 (x86_dr_low_get_addr): Rename to...
7024 (x86_linux_dr_get_addr): ...this.
7025 (x86_dr_low_set_control): Rename to...
7026 (x86_linux_dr_set_control): ...this.
7027 (x86_dr_low_get_control): Rename to...
7028 (x86_linux_dr_get_control): ...this.
7029 (x86_dr_low_get_status): Rename to...
7030 (x86_linux_dr_get_status): ...this.
7031 (x86_dr_low): Update with new function names.
7032
4b134ca1
GB
70332015-03-24 Gary Benson <gbenson@redhat.com>
7034
7035 * Makefile.in (x86-linux.o): New rule.
7036 * configure.srv: Add x86-linux.o to relevant targets.
7037 * linux-low.c (lwp_set_arch_private_info): New function.
7038 (lwp_arch_private_info): Likewise.
7039 * linux-x86-low.c: Include nat/x86-linux.h.
7040 (arch_lwp_info): Removed structure.
7041 (update_debug_registers_callback):
7042 Use lwp_set_debug_registers_changed.
7043 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
7044 and lwp_set_debug_registers_changed.
7045 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
7046
34c703da
GB
70472015-03-24 Gary Benson <gbenson@redhat.com>
7048
7049 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
7050 * linux-arm-low.c (arm_new_thread): Likewise.
7051 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
7052 * linux-mips-low.c (mips_linux_new_thread): Likewise.
7053 * linux-x86-low.c (x86_linux_new_thread): Likewise.
7054 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
7055
cff068da
GB
70562015-03-24 Gary Benson <gbenson@redhat.com>
7057
7058 * linux-low.c (ptid_of_lwp): New function.
7059 (lwp_is_stopped): Likewise.
7060 (lwp_stop_reason): Likewise.
7061 * linux-x86-low.c (update_debug_registers_callback):
7062 Use lwp_is_stopped.
7063 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
7064 lwp_stop_reason.
7065
b2f7c7e8
GB
70662015-03-24 Gary Benson <gbenson@redhat.com>
7067
7068 * linux-low.h (linux_stop_lwp): Remove declaration.
7069
6d4ee8c6
GB
70702015-03-24 Gary Benson <gbenson@redhat.com>
7071
7072 * linux-low.h: Include nat/linux-nat.h.
7073 * linux-low.c (iterate_over_lwps_args): New structure.
7074 (iterate_over_lwps_filter): New function.
7075 (iterate_over_lwps): Likewise.
7076 * linux-x86-low.c (update_debug_registers_callback):
7077 Update signature to what iterate_over_lwps expects.
7078 Remove PID check that iterate_over_lwps now performs.
7079 (x86_dr_low_set_addr): Use iterate_over_lwps.
7080 (x86_dr_low_set_control): Likewise.
7081
70a0bb6b
GB
70822015-03-24 Gary Benson <gbenson@redhat.com>
7083
7084 * linux-x86-low.c (x86_debug_reg_state): New function.
7085 (x86_linux_prepare_to_resume): Use the above.
7086
7b669087
GB
70872015-03-24 Gary Benson <gbenson@redhat.com>
7088
7089 * linux-low.c (current_lwp_ptid): New function.
7090 * linux-x86-low.c: Include nat/linux-nat.h.
7091 (x86_dr_low_get_addr): Use current_lwp_ptid.
7092 (x86_dr_low_get_control): Likewise.
7093 (x86_dr_low_get_status): Likewise.
7094
eef49a3d
PA
70952015-03-20 Pedro Alves <palves@redhat.com>
7096
7097 * tracepoint.c (cmd_qtstatus): Make "str" const.
7098
b2333d22
PA
70992015-03-20 Pedro Alves <palves@redhat.com>
7100
7101 * server.c (handle_general_set): Make "req_str" const.
7102
23f238d3
PA
71032015-03-19 Pedro Alves <palves@redhat.com>
7104
7105 * linux-low.c (linux_resume_one_lwp): Rename to ...
7106 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
7107 instead call perror_with_name.
7108 (check_ptrace_stopped_lwp_gone): New function.
7109 (linux_resume_one_lwp): Reimplement as wrapper around
7110 linux_resume_one_lwp_throw that swallows errors if the LWP is
7111 gone.
7112
91baf43f
PA
71132015-03-19 Pedro Alves <palves@redhat.com>
7114
7115 * linux-low.c (count_events_callback, select_event_lwp_callback):
7116 No longer check whether the thread has resume_stop as last resume
7117 kind.
7118
8bf3b159
PA
71192015-03-19 Pedro Alves <palves@redhat.com>
7120
7121 * linux-low.c (count_events_callback, select_event_lwp_callback):
7122 Use the lwp's status_pending_p field, not the thread's.
7123
b90fc188
PA
71242015-03-19 Pedro Alves <palves@redhat.com>
7125
7126 * linux-low.c (select_event_lwp_callback): Update comments to
7127 no longer mention SIGTRAP.
7128
464b0089
GB
71292015-03-18 Gary Benson <gbenson@redhat.com>
7130
7131 * server.c (handle_query): Do not report vFile:fstat as supported.
7132
aa9e327f
GB
71332015-03-11 Gary Benson <gbenson@redhat.com>
7134
7135 * hostio.c (sys/types.h): New include.
7136 (sys/stat.h): Likewise.
7137 (common-remote-fileio.h): Likewise.
7138 (handle_fstat): New function.
7139 (handle_vFile): Handle vFile:fstat packets.
aa9e327f 7140
791c0056
GB
71412015-03-11 Gary Benson <gbenson@redhat.com>
7142
7143 * configure.ac (AC_CHECK_MEMBERS): Add checks for
7144 struct stat.st_blocks and struct stat.st_blksize.
7145 * configure: Regenerate.
7146 * config.in: Likewise.
7147 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
7148 (OBS): Add common-remote-fileio.o.
7149 (common-remote-fileio.o): New rule.
7150
9a9df970
PA
71512015-03-09 Pedro Alves <palves@redhat.com>
7152
7153 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
7154 'struct sockaddr' pointer in 'accept' call.
7155
9eb1356e
PA
71562015-03-09 Pedro Alves <palves@redhat.com>
7157
7158 Revert:
7159 2015-03-07 Pedro Alves <palves@redhat.com>
7160 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
7161 or <winsock2.h> here. Instead include "gdb_socket.h".
7162 (remote_open): Use union gdb_sockaddr_u.
7163 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
7164 or <winsock2.h> here. Instead include "gdb_socket.h".
7165 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
7166 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
7167 or <sys/un.h>.
7168 (init_named_socket, gdb_agent_helper_thread): Use union
7169 gdb_sockaddr_u.
7170
aac331e4
PA
71712015-03-07 Pedro Alves <palves@redhat.com>
7172
7173 * configure.ac (build_warnings): Move
7174 -Wdeclaration-after-statement to the C-specific set.
7175 * configure: Regenerate.
7176
366c75fc
PA
71772015-03-07 Pedro Alves <palves@redhat.com>
7178
7179 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
7180 or <winsock2.h> here. Instead include "gdb_socket.h".
7181 (remote_open): Use union gdb_sockaddr_u.
7182 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
7183 or <winsock2.h> here. Instead include "gdb_socket.h".
7184 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
7185 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
7186 or <sys/un.h>.
7187 (init_named_socket, gdb_agent_helper_thread): Use union
7188 gdb_sockaddr_u.
7189
492d29ea
PA
71902015-03-07 Pedro Alves <palves@redhat.com>
7191
7192 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
7193 instead.
7194
60a191ed
YQ
71952015-03-06 Yao Qi <yao.qi@linaro.org>
7196
7197 * linux-aarch64-low.c (aarch64_insert_point): Use
7198 show_debug_regs as a boolean.
7199 (aarch64_remove_point): Likewise.
7200
f5771b1d
PA
72012015-03-05 Pedro Alves <palves@redhat.com>
7202
7203 * lynx-low.c (lynx_target_ops): Install NULL hooks for
7204 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
7205 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
7206 * nto-low.c (nto_target_ops): Likewise.
7207 * spu-low.c (spu_target_ops): Likewise.
7208 * win32-low.c (win32_target_ops): Likewise.
7209
3e572f71
PA
72102015-03-04 Pedro Alves <palves@redhat.com>
7211
72f4393d 7212 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
3e572f71
PA
7213 Decide whether a breakpoint triggered based on the SIGTRAP's
7214 siginfo.si_code.
72f4393d
L
7215 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
7216 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
3e572f71
PA
7217 (linux_low_filter_event): Check for breakpoints before checking
7218 watchpoints.
7219 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
7220 siginfo.si_code.
72f4393d
L
7221 (linux_stopped_by_sw_breakpoint)
7222 (linux_supports_stopped_by_sw_breakpoint)
7223 (linux_stopped_by_hw_breakpoint)
7224 (linux_supports_stopped_by_hw_breakpoint): New functions.
7225 (linux_target_ops): Install new target methods.
3e572f71 7226
1ec68e26
PA
72272015-03-04 Pedro Alves <palves@redhat.com>
7228
7229 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
7230 * server.c (swbreak_feature, hwbreak_feature): New globals.
7231 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
7232 (captured_main): Clear swbreak_feature and hwbreak_feature.
7233 * server.h (swbreak_feature, hwbreak_feature): Declare.
7234 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
7235 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
7236 supports_stopped_by_hw_breakpoint>: New fields.
7237 (target_supports_stopped_by_sw_breakpoint)
7238 (target_stopped_by_sw_breakpoint)
7239 (target_supports_stopped_by_hw_breakpoint)
7240 (target_stopped_by_hw_breakpoint): Declare.
7241
15c66dd6
PA
72422015-03-04 Pedro Alves <palves@redhat.com>
7243
7244 enum lwp_stop_reason -> enum target_stop_reason
7245 * linux-low.c (check_stopped_by_breakpoint): Adjust.
7246 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
7247 (linux_wait_1, stuck_in_jump_pad_callback)
7248 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
7249 (linux_stopped_by_watchpoint):
7250 * linux-low.h (enum lwp_stop_reason): Delete.
7251 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
7252 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
7253
98fc70d6
YQ
72542015-03-04 Yao Qi <yao.qi@linaro.org>
7255
7256 * Makefile.in (SFILES): Add linux-aarch64-low.c.
7257
dd2ac174
GB
72582015-03-03 Gary Benson <gbenson@redhat.com>
7259
7260 * hostio.c (handle_vFile): Fix prefix lengths.
7261
d68e53f4
MM
72622015-03-03 Markus Metzger <markus.t.metzger@intel.com>
7263
7264 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
7265 ptr_bits.
7266
bf2d68ab
AA
72672015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
7268
7269 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
7270 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
7271 (clean): Add "rm -f" for above C files.
7272 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
7273 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
7274 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
7275 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
7276 * linux-s390-low.c (HWCAP_S390_VX): New macro.
7277 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
7278 (init_registers_s390x_vx_linux64)
7279 (init_registers_s390x_tevx_linux64)
7280 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
7281 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
7282 declarations.
7283 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
7284 (s390_store_vxrs_high): New functions.
7285 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
7286 NT_S390_VXRS_HIGH.
7287 (s390_arch_setup): Add logic for selecting one of the new target
7288 descriptions. Activate the new vector regsets if applicable.
7289 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
7290 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
7291 and init_registers_s390x_tevx_linux64.
7292
c966a859
PA
72932015-03-01 Pedro Alves <palves@redhat.com>
7294
7295 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
7296 parameter.
7297
4180215b
PA
72982015-02-27 Pedro Alves <palves@redhat.com>
7299
7300 * linux-x86-low.c (u_debugreg_offset): New function.
7301 (x86_linux_dr_get, x86_linux_dr_set): Use it.
7302
749bab01
PA
73032015-02-27 Pedro Alves <palves@redhat.com>
7304
7305 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
7306 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
7307 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
7308 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
7309 (ps_lsetfpregs, ps_getpid)
7310 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
7311 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
7312 (ps_lsetxregs, ps_plog): Declare.
7313
3c14e5a3
PA
73142015-02-27 Pedro Alves <palves@redhat.com>
7315
7316 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
7317 IP_AGENT_EXPORT_FUNC.
7318 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
7319 IP_AGENT_EXPORT_FUNC.
7320 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
7321 (IP_AGENT_EXPORT): Delete.
7322 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
7323 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
7324 (gdb_trampoline_buffer_error, collecting, gdb_collect)
7325 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
7326 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
7327 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
7328 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
7329 (traceframe_read_count, traceframe_write_count)
7330 (traceframes_created, trace_state_variables, get_raw_reg)
7331 (get_trace_state_variable_value, set_trace_state_variable_value)
7332 (ust_loaded, helper_thread_id, cmd_buf): Use
7333 IPA_SYM_EXPORTED_NAME.
7334 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
7335 (tracepoints) Use IP_AGENT_EXPORT_VAR.
7336 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
7337 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
7338 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
7339 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
7340 EXTERN_C_PUSH/EXTERN_C_POP.
7341 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
7342 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
7343 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
7344 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
7345 (traceframe_write_count, traceframe_read_count)
7346 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
7347 (about_to_request_buffer_space, get_trace_state_variable_value)
7348 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
7349 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
7350 EXTERN_C_PUSH/EXTERN_C_POP.
7351 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
7352 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
7353 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
7354 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
7355 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
7356 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
7357 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
7358 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
7359 Define.
7360 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
7361 (IP_AGENT_EXPORT_VAR_DECL): Define.
7362 (tracing): Declare.
7363 (gdb_agent_get_raw_reg): Declare.
7364
fe978cb0
PA
73652015-02-27 Tom Tromey <tromey@redhat.com>
7366 Pedro Alves <palves@redhat.com>
7367
7368 Rename symbols whose names are reserved C++ keywords throughout.
7369
3bc3d82a
PA
73702015-02-27 Pedro Alves <palves@redhat.com>
7371
7372 * Makefile.in (COMPILER): New, get it from autoconf.
7373 (CXX): Get from autoconf instead.
7374 (COMPILE.pre): Use COMPILER.
7375 (CC-LD): Rename to ...
7376 (CC_LD): ... this. Use COMPILER.
7377 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
7378 (CXX_FOR_TARGET): Default to g++ instead of gcc.
7379 * acinclude.m4: Include build-with-cxx.m4.
7380 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
7381 Disable -Werror by default if building in C++ mode.
7382 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
7383 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
7384 the C++ compiler. Save/restore CXXFLAGS too.
7385 * configure: Regenerate.
7386
07697489
PA
73872015-02-27 Pedro Alves <palves@redhat.com>
7388
7389 * acinclude.m4: Include libiberty.m4.
7390 * configure.ac: Call libiberty_INIT.
7391 * config.in, configure: Regenerate.
7392
9beb7c4e
PA
73932015-02-26 Pedro Alves <palves@redhat.com>
7394
7395 * linux-low.c (linux_wait_1): When incrementing the PC past a
7396 program breakpoint always use the_low_target.breakpoint_len as
7397 increment, rather than the maximum between that and
7398 the_low_target.decr_pc_after_break.
7399
8090aef2
PA
74002015-02-23 Pedro Alves <palves@redhat.com>
7401
7402 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
7403 thread was doing a step-over; always adjust the PC if
7404 we stepped over a permanent breakpoint.
7405 (linux_wait_1): If we stepped over breakpoint that was on top of a
7406 permanent breakpoint, manually advance the PC past it.
7407
bc9540e8
PA
74082015-02-23 Pedro Alves <palves@redhat.com>
7409
7410 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
7411 modes.
7412 (x86_fill_gregset, x86_store_gregset): Use it when handling
7413 $orig_eax.
7414
2db9a427
PA
74152015-02-20 Pedro Alves <palves@redhat.com>
7416
7417 * thread-db.c: Include "nat/linux-procfs.h".
7418 (thread_db_init): Skip listing new threads if the kernel supports
7419 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
7420
afa8d396
PA
74212015-02-20 Pedro Alves <palves@redhat.com>
7422
7423 * linux-low.c (status_pending_p_callback): Use ptid_match.
7424
c9587f88
AT
74252015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
7426
7427 PR breakpoints/16812
7428 * linux-low.c (wstatus_maybe_breakpoint): Remove.
7429 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
7430 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
7431
b05ec7a5
AT
74322015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
7433
7434 PR breakpoints/15956
7435 * tracepoint.c (cmd_qtinit): Add check for current_thread.
7436
d33501a5
MM
74372015-02-09 Markus Metzger <markus.t.metzger@intel.com>
7438
7439 * linux-low.c (linux_low_btrace_conf): Print size.
7440 * server.c (handle_btrace_conf_general_set): New.
7441 (hanle_general_set): Call handle_btrace_conf_general_set.
7442 (handle_query): Report Qbtrace-conf:bts:size as supported.
7443
f4abbc16
MM
74442015-02-09 Markus Metzger <markus.t.metzger@intel.com>
7445
7446 * linux-low.c (linux_low_enable_btrace): Update parameters.
7447 (linux_low_btrace_conf): New.
7448 (linux_target_ops)<to_btrace_conf>: Initialize.
7449 * server.c (current_btrace_conf): New.
7450 (handle_btrace_enable): Rename to ...
7451 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
7452 to target_enable_btrace. Update comment. Update users.
7453 (handle_qxfer_btrace_conf): New.
7454 (qxfer_packets): Add btrace-conf entry.
7455 (handle_query): Report qXfer:btrace-conf:read as supported packet.
7456 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
7457 (target_ops)<read_btrace_conf>: New.
7458 (target_enable_btrace): Update parameters.
7459 (target_read_btrace_conf): New.
7460
043c3577
MM
74612015-02-09 Markus Metzger <markus.t.metzger@intel.com>
7462
7463 * server.c (handle_btrace_general_set): Remove call to
7464 target_supports_btrace.
7465 (supported_btrace_packets): New.
7466 (handle_query): Call supported_btrace_packets.
7467 * target.h: include btrace-common.h.
7468 (btrace_target_info): Removed.
7469 (supports_btrace, target_supports_btrace): Update parameters.
7470
734b0e4b
MM
74712015-02-09 Markus Metzger <markus.t.metzger@intel.com>
7472
7473 * Makefile.in (SFILES): Add common/btrace-common.c.
7474 (OBS): Add common/btrace-common.o.
7475 (btrace-common.o): Add build rules.
7476 * linux-low: Include btrace-common.h.
7477 (linux_low_read_btrace): Use struct btrace_data. Call
7478 btrace_data_init and btrace_data_fini.
7479
d6c146e9
PA
74802015-02-06 Pedro Alves <palves@redhat.com>
7481
7482 * thread-db.c (find_new_threads_callback): Add debug output.
7483
20ba1ce6
PA
74842015-02-04 Pedro Alves <palves@redhat.com>
7485
7486 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
7487 (resume_stopped_resumed_lwps): New function.
7488 (linux_wait_for_event_filtered): Use it.
7489
8cc73a39
SDJ
74902015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
7491
7492 * Makefile.in (SFILES): Add linux-personality.c.
7493 (linux-personality.o): New rule.
7494 * configure.srv (srv_linux_obj): Add linux-personality.o to the
7495 list of objects to be built.
7496 * linux-low.c: Include nat/linux-personality.h.
7497 (linux_create_inferior): Remove code to disable address space
7498 randomization (moved to ../nat/linux-personality.c). Create
7499 cleanup to disable address space randomization.
7500
fb23d554
SDJ
75012015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
7502
7503 * Makefile.in (posix-strerror.o): New rule.
7504 (mingw-strerror.o): Likewise.
7505 * configure: Regenerated.
7506 * configure.ac: Source file ../common/common.host. Initialize new
7507 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
7508
cdf43629
YQ
75092015-01-14 Yao Qi <yao@codesourcery.com>
7510
7511 * Makefile.in (SFILES): Add nat/ppc-linux.c.
7512 (ppc-linux.o): New rule.
7513 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
7514 * configure.ac: AC_CHECK_FUNCS(getauxval).
7515 * config.in: Re-generated.
7516 * configure: Re-generated.
7517 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
7518 ppc64_64bit_inferior_p
7519
514c5338
YQ
75202015-01-14 Yao Qi <yao@codesourcery.com>
7521
7522 * linux-ppc-low.c: Include "nat/ppc-linux.h".
7523 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
7524 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
7525 (PT_ORIG_R3, PT_TRAP): Likewise.
7526 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
7527 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
7528 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
7529
3368c1e5
JB
75302015-01-10 Joel Brobecker <brobecker@adacore.com>
7531
7532 * i387-fp.c (i387_cache_to_xsave): In look over
7533 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
7534 zmmh_low_space field by use of zmmh_high_space.
7535
582511be
PA
75362015-01-09 Pedro Alves <palves@redhat.com>
7537
7538 * linux-low.c (step_over_bkpt): Move higher up in the file.
7539 (handle_extended_wait): Don't store the stop_pc here.
7540 (get_stop_pc): Adjust comments and rename to ...
7541 (check_stopped_by_breakpoint): ... this. Record whether the LWP
7542 stopped for a software breakpoint or hardware breakpoint.
7543 (thread_still_has_status_pending_p): New function.
7544 (status_pending_p_callback): Use
7545 thread_still_has_status_pending_p. If the event is no longer
7546 interesting, resume the LWP.
7547 (handle_tracepoints): Add assert.
7548 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
7549 (wstatus_maybe_breakpoint): New function.
7550 (cancel_breakpoint): Delete function.
7551 (check_stopped_by_watchpoint): New function, factored out from
7552 linux_low_filter_event.
7553 (lp_status_maybe_breakpoint): Delete function.
7554 (linux_low_filter_event): Remove filter_ptid argument.
7555 Leave thread group exits pending here. Store the LWP's stop PC.
7556 Always leave events pending.
7557 (linux_wait_for_event_filtered): Pull all events out of the
7558 kernel, and leave them all pending.
7559 (count_events_callback, select_event_lwp_callback): Consider all
7560 events.
7561 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
7562 (select_event_lwp): Only give preference to the stepping LWP in
7563 all-stop mode. Adjust comments.
7564 (ignore_event): New function.
7565 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
7566 references to cancel_breakpoints. Adjust to renames. Also give
7567 equal priority to all LWPs that have had events in non-stop mode.
7568 If reporting a software breakpoint event, unadjust the LWP's PC.
7569 (linux_wait): If linux_wait_1 returned an ignored event, retry.
7570 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
7571 Adjust.
7572 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
7573 (resume_status_pending_p): Use thread_still_has_status_pending_p.
7574 (linux_stopped_by_watchpoint): Adjust.
7575 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
7576 * linux-low.h (enum lwp_stop_reason): New.
7577 (struct lwp_info) <stop_pc>: Adjust comment.
7578 <stopped_by_watchpoint>: Delete field.
7579 <stop_reason>: New field.
7580 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
7581 * mem-break.c (software_breakpoint_inserted_here)
7582 (hardware_breakpoint_inserted_here): New function.
7583 * mem-break.h (software_breakpoint_inserted_here)
7584 (hardware_breakpoint_inserted_here): Declare.
7585 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
7586 (cancel_breakpoints): Delete.
7587 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
7588 (upload_fast_traceframes): Remove references to
7589 cancel_breakpoints.
7590
a33e3959
PA
75912015-01-09 Pedro Alves <palves@redhat.com>
7592
7593 * thread-db.c (find_new_threads_callback): Ignore thread if the
7594 kernel thread ID is -1.
7595
8784d563
PA
75962015-01-09 Pedro Alves <palves@redhat.com>
7597
7598 * linux-low.c (linux_attach_fail_reason_string): Move to
7599 nat/linux-ptrace.c, and rename.
7600 (linux_attach_lwp): Update comment.
7601 (attach_proc_task_lwp_callback): New function.
7602 (linux_attach): Adjust to rename and use
7603 linux_proc_attach_tgid_threads.
7604 (linux_attach_fail_reason_string): Delete declaration.
7605
76f2b779
JB
76062015-01-01 Joel Brobecker <brobecker@adacore.com>
7607
7608 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
7609 * server.c (gdbserver_version): Likewise.
7610
fafcc06a
SDJ
76112014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
7612
7613 * remote-utils.c: Include ctype.h.
7614 (input_interrupt): Explicitly handle the case when the char
7615 received is the NUL byte. Improve the printing of non-ASCII
7616 characters.
7617
beed38b8
JB
76182014-12-16 Joel Brobecker <brobecker@adacore.com>
7619
7620 * linux-low.c (linux_low_filter_event): Update call to
7621 linux_enable_event_reporting following the addition of
7622 a new parameter to that function.
7623
bf330350
CU
76242014-12-16 Catalin Udma <catalin.udma@freescale.com>
7625
7626 PR server/17457
7627 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
7628 (AARCH64_FPCR_REGNO): Likewise.
7629 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
7630 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
7631 (aarch64_store_fpregset): Likewise.
7632
5227d625
JB
76332014-12-15 Joel Brobecker <brobecker@adacore.com>
7634
7635 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
7636 Remove FIXME comment about assumption about N.
7637
f93b65a0
JB
76382014-12-13 Joel Brobecker <brobecker@adacore.com>
7639
7640 * configure.ac: If large-file support is disabled in GDBserver,
7641 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
7642 * configure: Regenerate.
7643
e5a9158d
AA
76442014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7645
7646 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
7647 warning upon ENODATA from ptrace.
7648 * linux-s390-low.c (s390_store_tdb): New.
7649 (s390_regsets): Add regset for NT_S390_TDB.
7650
feea5f36
AA
76512014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7652
7653 * linux-low.c (regsets_store_inferior_registers): Skip regsets
7654 without a fill_function.
7655 * linux-s390-low.c (s390_fill_last_break): Remove.
7656 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
7657 (s390_arch_setup): Use regset's size instead of fill_function for
7658 loop end condition.
7659
098dbe61
AA
76602014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7661
7662 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
7663 the regset's store function when ptrace returned an error.
7664 * regcache.c (get_thread_regcache): Invalidate register cache
7665 before fetching inferior's registers.
7666
28eef672
AA
76672014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7668
7669 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
7670 while-loop as for-loop.
7671 (regsets_store_inferior_registers): Likewise.
7672
bdca27a2
YQ
76732014-11-28 Yao Qi <yao@codesourcery.com>
7674
7675 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
7676 * config.in, configure: Re-generate.
7677 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
7678 is defined.
7679
9c232dda
YQ
76802014-11-21 Yao Qi <yao@codesourcery.com>
7681
7682 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
7683 (AC_CHECK_HEADERS): Remove malloc.h.
7684 * configure: Re-generated.
7685 * config.in: Re-generated.
7686 * server.h: Don't include alloca.h and malloc.h.
7687 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
7688 Don't include malloc.h.
7689
43968415
JB
76902014-11-17 Joel Brobecker <brobecker@adacore.com>
7691
7692 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
7693 corresponding ERRNO check in same block.
7694
40e91bc7
PA
76952014-11-12 Pedro Alves <palves@redhat.com>
7696
7697 * server.c (cont_thread): Update comment.
7698 (start_inferior, attach_inferior): No longer clear cont_thread.
7699 (handle_v_cont): No longer set cont_thread.
7700 (captured_main): Clear cont_thread each time a GDB connects.
7701
c2c118cf
PA
77022014-11-12 Pedro Alves <palves@redhat.com>
7703
7704 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
7705 thread, and don't resume all threads if the Hc thread has exited.
7706
78708b7c
PA
77072014-11-12 Pedro Alves <palves@redhat.com>
7708
7709 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
7710 the process group instead of to a specific LWP.
7711
a2abc7de
PA
77122014-10-15 Pedro Alves <palves@redhat.com>
7713
7714 PR server/17487
7715 * win32-arm-low.c (arm_set_thread_context): Remove current_event
7716 parameter.
7717 (arm_set_thread_context): Delete.
7718 (the_low_target): Adjust.
7719 * win32-i386-low.c (debug_registers_changed)
7720 (debug_registers_used): Delete.
7721 (update_debug_registers_callback): New function.
7722 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
7723 needing to update their debug registers.
7724 (win32_get_current_dr): New function.
7725 (x86_dr_low_get_addr, x86_dr_low_get_control)
7726 (x86_dr_low_get_status): Fetch the debug register from the thread
7727 record's context.
7728 (i386_initial_stuff): Adjust.
7729 (i386_get_thread_context): Remove current_event parameter. Don't
7730 clear debug_registers_changed nor copy DR values to
7731 debug_reg_state.
7732 (i386_set_thread_context): Delete.
7733 (i386_prepare_to_resume): New function.
7734 (i386_thread_added): Mark the thread as needing to update irs
7735 debug registers.
7736 (the_low_target): Remove i386_set_thread_context and install
7737 i386_prepare_to_resume.
7738 * win32-low.c (win32_get_thread_context): Adjust.
7739 (win32_set_thread_context): Use SetThreadContext
7740 directly.
7741 (win32_prepare_to_resume): New function.
7742 (win32_require_context): New function, factored out from ...
7743 (thread_rec): ... this.
7744 (continue_one_thread): Call win32_prepare_to_resume on each thread
7745 we're about to continue.
7746 (win32_resume): Call win32_prepare_to_resume on the event thread.
7747 * win32-low.h (struct win32_thread_info)
7748 <debug_registers_changed>: New field.
7749 (struct win32_target_ops): Change prototype of set_thread_context,
7750 delete set_thread_context and add prepare_to_resume.
7751 (win32_require_context): New declaration.
7752
a442d071
GB
77532014-10-08 Gary Benson <gbenson@redhat.com>
7754
7755 * server.h: Do not include common-exceptions.h.
7756
6f1947e8
GB
77572014-10-08 Gary Benson <gbenson@redhat.com>
7758
7759 * server.h: Do not include cleanups.h.
7760
63b434a4
JH
77612014-09-30 James Hogan <james.hogan@imgtec.com>
7762
7763 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
7764 mips64-dsp-linux.c.
7765
c4d9ceb6
YQ
77662014-09-23 Yao Qi <yao@codesourcery.com>
7767
7768 * linux-low.c (lp_status_maybe_breakpoint): New function.
7769 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
7770 (count_events_callback): Likewise.
7771 (select_event_lwp_callback): Likewise.
7772 (cancel_breakpoints_callback): Likewise.
7773
89a5711c
DB
77742014-09-19 Don Breazeal <donb@codesourcery.com>
7775
7776 * linux-low.c (handle_extended_wait): Call
7777 linux_ptrace_get_extended_event.
7778 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
7779 linux_is_extended_waitstatus.
7780
bffc0964
JB
77812014-09-16 Joel Brobecker <brobecker@adacore.com>
7782
7783 * Makefile.in (CPPFLAGS): Define.
7784 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
7785 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
7786
0bfdf32f
GB
77872014-09-16 Gary Benson <gbenson@redhat.com>
7788
7789 * inferiors.h (current_inferior): Renamed as...
7790 (current_thread): New variable. All uses updated.
7791 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
7792 (maybe_move_out_of_jump_pad): Likewise.
7793 (cancel_breakpoint): Likewise.
7794 (linux_low_filter_event): Likewise.
7795 (wait_for_sigstop): Likewise.
7796 (linux_resume_one_lwp): Likewise.
7797 (need_step_over_p): Likewise.
7798 (start_step_over): Likewise.
7799 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
7800 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
7801 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
7802 and save_inferior as saved_thread.
7803 * regcache.c (get_thread_regcache): Renamed saved_inferior as
7804 saved_thread.
7805 (regcache_invalidate_thread): Likewise.
7806 * remote-utils.c (prepare_resume_reply): Likewise.
7807 * thread-db.c (thread_db_get_tls_address): Likewise.
7808 (disable_thread_event_reporting): Likewise.
7809 (remove_thread_event_breakpoints): Likewise.
7810 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
7811 as saved_thread.
7812 * target.h (set_desired_inferior): Renamed as...
7813 (set_desired_thread): New declaration. All uses updated.
7814 * server.c (myresume): Updated comment to reference thread instead
7815 of inferior.
7816 (handle_serial_event): Likewise.
7817 (handle_target_event): Likewise.
7818
361c8ade
GB
78192014-09-12 Tom Tromey <tromey@redhat.com>
7820 Gary Benson <gbenson@redhat.com>
7821
7822 * regcache.h: Include common-regcache.h.
7823 (regcache_read_pc): Don't declare.
7824 * regcache.c (get_thread_regcache_for_ptid): New function.
7825
bd9269f7
GB
78262014-09-11 Tom Tromey <tromey@redhat.com>
7827 Gary Benson <gbenson@redhat.com>
7828
7829 * symbol.c: New file.
7830 * Makefile.in (SFILES): Add symbol.c.
7831 (OBS): Add symbol.o.
7832
f8c1d06b
GB
78332014-09-11 Gary Benson <gbenson@redhat.com>
7834
7835 * target.c (target_stop_ptid, target_continue_ptid): New
7836 functions.
7837
721ec300
GB
78382014-09-11 Tom Tromey <tromey@redhat.com>
7839 Gary Benson <gbenson@redhat.com>
7840
7841 * target.h: Include target/target.h.
7842 * target.c (target_read_memory, target_read_uint32)
7843 (target_write_memory): New functions.
7844
c5e92cca
GB
78452014-09-11 Gary Benson <gbenson@redhat.com>
7846
7847 * server.h (debug_hw_points): Don't declare.
7848 * server.c (debug_hw_points): Don't define. Replace all uses
7849 with show_debug_regs.
7850 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
7851 all uses with show_debug_regs.
7852
2e4bb98a
EBM
78532014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
7854
7855 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
7856 endianness into account.
7857 (ppc_supply_ptrace_register): Likewise.
7858
ac740bc7
JH
78592014-09-03 James Hogan <james.hogan@imgtec.com>
7860
7861 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
7862 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
7863
97ea6506
GB
78642014-09-03 Gary Benson <gbenson@redhat.com>
7865
7866 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
7867 ALL_DEBUG_ADDRESS_REGISTERS.
7868
df7e5265
GB
78692014-09-02 Gary Benson <gbenson@redhat.com>
7870
7871 * i386-low.h: Renamed as...
7872 * x86-low.h: New file. All type, function and variable name
7873 prefixes changed from "i386_" to "x86_". All references updated.
7874 * i386-low.c: Renamed as...
7875 * x86-low.c: New file. All type, function and variable name
7876 prefixes changed from "i386_" to "x86_". All references updated.
7877
ed859da7
GB
78782014-09-02 Gary Benson <gbenson@redhat.com>
7879
7880 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
7881 (x86_linux_new_thread): Likewise.
7882
860789c7
GB
78832014-08-29 Gary Benson <gbenson@redhat.com>
7884
7885 * server.h (setjmp.h): Do not include.
7886 (toplevel): Do not declare.
7887 (common-exceptions.h): Include.
7888 (cleanups.h): Likewise.
7889 * server.c (toplevel): Do not define.
7890 (exit_code): New static global.
7891 (detach_or_kill_for_exit_cleanup): New function.
7892 (main): New function. Original main renamed to...
7893 (captured_main): New function.
7894 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
7895
ff55e1b5
GB
78962014-08-29 Gary Benson <gbenson@redhat.com>
7897
7898 * Makefile.in (SFILES): Add common/common-exceptions.c.
7899 (OBS): Add common-exceptions.o.
7900 (common-exceptions.o): New rule.
7901 * utils.c (prepare_to_throw_exception): New function.
7902
e9bcb658
GB
79032014-08-29 Gary Benson <gbenson@redhat.com>
7904
7905 * config.in: Regenerate.
7906 * configure: Likewise.
7907
e3180625
GB
79082014-08-29 Gary Benson <gbenson@redhat.com>
7909
7910 * Makefile.in (SFILES): Add common/cleanups.c.
7911 (OBS): cleanups.o.
7912 (cleanups.o): New rule.
7913
e3d6ba5d
GB
79142014-08-29 Gary Benson <gbenson@redhat.com>
7915
7916 * utils.c (internal_vwarning): New function.
7917
7096e886
GB
79182014-08-28 Gary Benson <gbenson@redhat.com>
7919
7920 * utils.h (fatal): Remove declaration.
7921 * utils.c (fatal): Remove function.
7922
14ce3192
GB
79232014-08-28 Gary Benson <gbenson@redhat.com>
7924
7925 * tracepoint.c (gdb_agent_init): Replace fatal with
7926 perror_with_name.
7927 (initialize_tracepoint): Likewise.
7928
50278d59
GB
79292014-08-28 Gary Benson <gbenson@redhat.com>
7930
7931 * remote-utils.c (remote_prepare): Replace fatal with error.
7932
aa96c426
GB
79332014-08-28 Gary Benson <gbenson@redhat.com>
7934
7935 * linux-low.c (linux_async): Replace fatal with warning.
7936 Tidy up and return.
7937 (linux_start_non_stop): Return -1 if linux_async failed.
7938
f7160e97
GB
79392014-08-28 Gary Benson <gbenson@redhat.com>
7940
7941 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
7942 gdb_assert.
7943 (i386_dr_low_get_addr): Remove vague comment.
7944 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
7945 gdb_assert.
7946
38e08fca
GB
79472014-08-28 Gary Benson <gbenson@redhat.com>
7948
7949 * inferiors.c (get_thread_process): Replace check with gdb_assert.
7950 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
7951 internal_error.
7952 (linux_resume_one_lwp): Likewise.
7953 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
7954 gdb_assert.
7955 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
7956 with internal_error.
7957 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
7958 (init_register_cache): Replace fatal with gdb_assert_not_reached.
7959 (find_register_by_name): Replace fatal with internal_error.
7960 (find_regno): Likewise.
7961 * tdesc.c (init_target_desc): Replace check with gdb_assert.
7962 * thread-db.c (thread_db_create_event): Likewise.
7963 (thread_db_load_search): Likewise.
7964 (try_thread_db_load_1): Likewise.
7965 * tracepoint.c (get_jump_space_head): Replace fatal with
7966 internal_error.
7967 (claim_trampoline_space): Likewise.
7968 (have_fast_tracepoint_trampoline_buffer): Likewise.
7969 (cmd_qtstart): Likewise.
7970 (stop_tracing): Likewise.
7971 (fast_tracepoint_collecting): Likewise.
7972 (target_malloc): Likewise.
7973 (download_tracepoint): Likewise.
7974 (download_trace_state_variables): Replace check with gdb_assert.
7975 (upload_fast_traceframes): Replace fatal with internal_error.
7976
34abf635
GB
79772014-08-19 Tom Tromey <tromey@redhat.com>
7978 Gary Benson <gbenson@redhat.com>
7979
7980 * Makefile.in (SFILES): Add common/common-debug.c.
7981 (OBS): Add common-debug.o.
7982 (common-debug.o): New rule.
7983 * debug.h (debug_printf): Don't declare.
7984 * debug.c (debug_printf): Renamed and rewritten as...
7985 (debug_vprintf): New function.
7986
f6e94d78
GB
79872014-08-19 Gary Benson <gbenson@redhat.com>
7988
7989 * utils.h: Do not include print-utils.h.
7990
9239eeab
GB
79912014-08-19 Tom Tromey <tromey@redhat.com>
7992 Gary Benson <gbenson@redhat.com>
7993
7994 * server.h: Add static assertion.
7995 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
7996
ef87c8bb
GB
79972014-08-19 Tom Tromey <tromey@redhat.com>
7998 Gary Benson <gbenson@redhat.com>
7999
8000 * Makefile.in (SFILES): Add common/errors.c.
8001 (OBS): Add errors.o.
8002 (IPA_OBS): Add errors-ipa.o.
8003 (errors.o): New rule.
8004 (errors-ipa.o): Likewise.
8005 * utils.h (perror_with_name, error, warning): Don't declare.
8006 * utils.c (warning): Renamed and rewritten as...
8007 (vwarning): New function.
8008 (error): Renamed and rewritten as...
8009 (verror): New function.
8010 (internal_error): Renamed and rewritten as...
8011 (internal_verror): New function.
8012
bb974a24
GB
80132014-08-07 Gary Benson <gbenson@redhat.com>
8014
8015 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
8016 * configure: Regenerate.
8017 * config.in: Likewise.
8018 * server.h: Do not include errno.h.
8019 * event-loop.c: Likewise.
8020 * hostio-errno.c: Likewise.
8021 * linux-low.c: Likewise.
8022 * remote-utils.c: Likewise.
8023 * spu-low.c: Likewise.
8024 * utils.c: Likewise.
8025 * gdbreplay.c: Unconditionally include errno.h.
8026
6d3d12eb
GB
80272014-08-07 Gary Benson <gbenson@redhat.com>
8028
8029 * server.h: Do not include string.h.
8030 * event-loop.c: Likewise.
8031 * linux-low.c: Likewise.
8032 * regcache.c: Likewise.
8033 * remote-utils.c: Likewise.
8034 * spu-low.c: Likewise.
8035 * utils.c: Likewise.
8036
dccbb609
GB
80372014-08-07 Gary Benson <gbenson@redhat.com>
8038
8039 * server.h: Do not include gdb_assert.h.
8040
e76df0d0
GB
80412014-08-07 Gary Benson <gbenson@redhat.com>
8042
8043 * server.h: Do not include common-utils.h.
8044
4cb9c816
GB
80452014-08-07 Gary Benson <gbenson@redhat.com>
8046
8047 * server.h: Do not include ptid.h.
8048 * notif.h: Likewise.
8049
3995eeee
GB
80502014-08-07 Gary Benson <gbenson@redhat.com>
8051
8052 * server.h: Do not include gdb_locale.h.
8053
cb9f1a9b
GB
80542014-08-07 Gary Benson <gbenson@redhat.com>
8055
8056 * server.h: Do not include gdb/signals.h.
8057 * win32-low.c: Likewise.
8058
a5fceff8
GB
80592014-08-07 Gary Benson <gbenson@redhat.com>
8060
8061 * server.h: Do not include pathmax.h.
8062
b9391142
GB
80632014-08-07 Gary Benson <gbenson@redhat.com>
8064
8065 * server.h: Do not include libiberty.h.
8066 * linux-bfin-low.c: Likewise.
8067
0e443c87
GB
80682014-08-07 Gary Benson <gbenson@redhat.com>
8069
8070 * server.h: Do not include ansidecl.h.
8071
8ebb3f56
GB
80722014-08-07 Gary Benson <gbenson@redhat.com>
8073
8074 * linux-x86-low.c: Do not include stddef.h.
8075 * lynx-ppc-low.c: Likewise.
8076 * tracepoint.c: Likewise.
8077
8980bdf6
GB
80782014-08-07 Gary Benson <gbenson@redhat.com>
8079
8080 * server.h: Do not include stdarg.h.
8081 * nto-low.c: Likewise.
8082
d7096f71
GB
80832014-08-07 Gary Benson <gbenson@redhat.com>
8084
8085 * server.h: Do not include stdlib.h.
8086 * inferiors.c: Likewise.
8087 * linux-low.c: Likewise.
8088 * regcache.c: Likewise.
8089 * spu-low.c: Likewise.
8090 * tracepoint.c: Likewise.
8091 * utils.c: Likewise.
8092
d02f550d
GB
80932014-08-07 Gary Benson <gbenson@redhat.com>
8094
8095 * server.h: Do not include stdio.h.
8096 * linux-low.c: Likewise.
8097 * remote-utils.c: Likewise.
8098 * spu-low.c: Likewise.
8099 * utils.c: Likewise.
8100 * wincecompat.c: Likewise.
8101
87f6c4e3
GB
81022014-08-06 Gary Benson <gbenson@redhat.com>
8103
8104 * regcache.c (init_register_cache): Move conditionals inside if.
8105
7089dca4
GB
81062014-08-06 Gary Benson <gbenson@redhat.com>
8107
8108 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
8109
462f517e
GB
81102014-07-31 Gary Benson <gbenson@redhat.com>
8111
8112 * ax.h: Do not include server.h.
8113 * gdbthread.h: Likewise.
8114 * lynx-low.h: Likewise.
8115 * notif.h: Likewise.
8116
976411d6
GB
81172014-07-30 Gary Benson <gbenson@redhat.com>
8118
8119 * server.h: Include common-defs.h.
8120 Do not include config.h or build-gnulib-gdbserver/config.h.
8121
d41f6d8e
GB
81222014-07-30 Gary Benson <gbenson@redhat.com>
8123
8124 * hostio-errno.c: Move server.h to top of includes list.
8125 * inferiors.c: Likewise.
8126 * linux-x86-low.c: Likewise.
8127 * notif.c: Include server.h.
8128
314c6a35
TT
81292014-07-24 Tom Tromey <tromey@redhat.com>
8130 Gary Benson <gbenson@redhat.com>
8131
8132 * server.h (CORE_ADDR): Now unsigned.
8133
69ff6be5
PA
81342014-07-16 Pedro Alves <palves@redhat.com>
8135
8136 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
8137
ce9e3fe7
PA
81382014-07-15 Pedro Alves <palves@redhat.com>
8139
8140 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
8141 copy.
8142
e76126e8
PA
81432014-07-11 Pedro Alves <palves@redhat.com>
8144
8145 * linux-low.c (kill_wait_lwp): New function, based on
8146 kill_one_lwp_callback, but use my_waitpid directly.
8147 (kill_one_lwp_callback, linux_kill): Use it.
8148
8e9db26e
PA
81492014-06-23 Pedro Alves <palves@redhat.com>
8150
8151 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
8152 before setting DR0..DR3.
8153
698b3e08
GB
81542014-06-20 Gary Benson <gbenson@redhat.com>
8155
8156 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
8157 * configure: Regenerated.
8158 * config.in: Likewise.
8159
125f8a3d
GB
81602014-06-20 Gary Benson <gbenson@redhat.com>
8161
8162 * Makefile.in (SFILES): Update locations for files moved
8163 from common to nat.
8164 (object file files): Reordered.
8165
42995dbd
GB
81662014-06-20 Gary Benson <gbenson@redhat.com>
8167
8168 * i386-low.h (i386_dr_low_can_set_addr): Removed.
8169 (i386_dr_low_set_addr): Likewise.
8170 (i386_dr_low_get_addr): Likewise.
8171 (i386_dr_low_can_set_control): Likewise.
8172 (i386_dr_low_set_control): Likewise.
8173 (i386_dr_low_get_control): Likewise.
8174 (i386_dr_low_get_status): Likewise.
8175 (i386_get_debug_register_length): Likewise.
8176 * linux-x86-low.c (i386_dr_low_set_addr):
8177 Changed signature. Made static.
8178 (i386_dr_low_get_addr): Likewise.
8179 (i386_dr_low_set_control): Likewise.
8180 (i386_dr_low_get_control): Likewise.
8181 (i386_dr_low_get_status): Likewise.
8182 (i386_dr_low): New global variable.
8183 * win32-i386-low.c (i386_dr_low_set_addr):
8184 Changed signature. Made static.
8185 (i386_dr_low_get_addr): Likewise.
8186 (i386_dr_low_set_control): Likewise.
8187 (i386_dr_low_get_control): Likewise.
8188 (i386_dr_low_get_status): Likewise.
8189 (i386_dr_low): New global variable.
8190
e1d2394b
MS
81912014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
8192
8193 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
8194 * Makefile.in (AR, AR_FLAGS): Define.
8195 * configure: Regenerate.
8196
3a8ee006
GB
81972014-06-19 Gary Benson <gbenson@redhat.com>
8198
8199 * Makefile.in (i386-dregs.o): New rule.
8200 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
8201 * i386-low.c (target.h): Remove include.
8202 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
8203 (DR_CONTROL_SHIFT): Likewise.
8204 (DR_CONTROL_SIZE): Likewise.
8205 (DR_RW_EXECUTE): Likewise.
8206 (DR_RW_WRITE): Likewise.
8207 (DR_RW_READ): Likewise.
8208 (DR_RW_IORW): Likewise.
8209 (DR_LEN_1): Likewise.
8210 (DR_LEN_2): Likewise.
8211 (DR_LEN_4): Likewise.
8212 (DR_LEN_8): Likewise.
8213 (DR_LOCAL_ENABLE_SHIFT): Likewise.
8214 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
8215 (DR_ENABLE_SIZE): Likewise.
8216 (DR_LOCAL_SLOWDOWN): Likewise.
8217 (DR_GLOBAL_SLOWDOWN): Likewise.
8218 (DR_CONTROL_RESERVED): Likewise.
8219 (I386_DR_CONTROL_MASK): Likewise.
8220 (I386_DR_VACANT): Likewise.
8221 (I386_DR_LOCAL_ENABLE): Likewise.
8222 (I386_DR_GLOBAL_ENABLE): Likewise.
8223 (I386_DR_DISABLE): Likewise.
8224 (I386_DR_SET_RW_LEN): Likewise.
8225 (I386_DR_GET_RW_LEN): Likewise.
8226 (I386_DR_WATCH_HIT): Likewise.
8227 (i386_wp_op_t): Likewise.
8228 (i386_show_dr): Likewise.
8229 (i386_length_and_rw_bits): Likewise.
8230 (i386_insert_aligned_watchpoint): Likewise.
8231 (i386_remove_aligned_watchpoint): Likewise.
8232 (i386_handle_nonaligned_watchpoint): Likewise.
8233 i386_update_inferior_debug_regs(): Likewise.
8234 (i386_dr_insert_watchpoint): Likewise.
8235 (i386_dr_remove_watchpoint): Likewise.
8236 (i386_dr_region_ok_for_watchpoint): Likewise.
8237 (i386_dr_stopped_data_address): Likewise.
8238 (i386_dr_stopped_by_watchpoint): Likewise.
8239
8f26655c
GB
82402014-06-19 Gary Benson <gbenson@redhat.com>
8241
8242 * i386-low.c (i386_dr_show): Renamed to
8243 i386_show_dr and made static. All uses updated.
8244 (i386_dr_length_and_rw_bits): Renamed to
8245 i386_length_and_rw_bits and made static.
8246 All uses updated.
8247 (i386_dr_insert_aligned_watchpoint): Renamed to
8248 i386_insert_aligned_watchpoint and made static.
8249 All uses updated.
8250 (i386_dr_remove_aligned_watchpoint): Renamed to
8251 i386_remove_aligned_watchpoint and made static.
8252 All uses updated.
8253 (i386_dr_update_inferior_debug_regs): Renamed to
8254 i386_update_inferior_debug_regs and made static.
8255 All uses updated.
8256
b9228891
GB
82572014-06-18 Gary Benson <gbenson@redhat.com>
8258
5171def3
GB
8259 * i386-low.h (i386_dr_low_can_set_addr): New macro.
8260 (i386_dr_low_can_set_control): Likewise.
8261 (i386_get_debug_register_length): Likewise.
8262 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
8263 (i386_dr_low_can_set_control): Likewise.
8264 (i386_get_debug_register_length): Likewise.
8265
82662014-06-17 Gary Benson <gbenson@redhat.com>
8267
b9228891
GB
8268 * i386-low.h (i386-dregs.h): New include.
8269 (DR_FIRSTADDR): Now in i386-dregs.h.
8270 (DR_LASTADDR): Likewise.
8271 (DR_NADDR): Likewise.
8272 (DR_STATUS): Likewise.
8273 (DR_CONTROL): Likewise.
8274 (i386_debug_reg_state): Likewise.
8275 (i386_dr_insert_watchpoint): Likewise.
8276 (i386_dr_remove_watchpoint): Likewise.
8277 (i386_dr_region_ok_for_watchpoint): Likewise.
8278 (i386_dr_stopped_data_address): Likewise.
8279 (i386_dr_stopped_by_watchpoint): Likewise.
8280 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
8281
4be83cc2
GB
82822014-06-18 Gary Benson <gbenson@redhat.com>
8283
8284 * i386-low.h (i386_low_insert_watchpoint): Renamed to
8285 i386_dr_insert_watchpoint.
8286 (i386_low_remove_watchpoint): Renamed to
8287 i386_dr_remove_watchpoint.
8288 (i386_low_region_ok_for_watchpoint): Renamed to
8289 i386_dr_region_ok_for_watchpoint.
8290 (i386_low_stopped_data_address): Renamed to
8291 i386_dr_stopped_data_address.
8292 (i386_low_stopped_by_watchpoint): Renamed to
8293 i386_dr_stopped_by_watchpoint.
8294 * i386-low.c (i386_show_dr): Renamed to
8295 i386_dr_show and made nonstatic. All uses updated.
8296 (i386_length_and_rw_bits): Renamed to
8297 i386_dr_length_and_rw_bits and made nonstatic.
8298 All uses updated.
8299 (i386_insert_aligned_watchpoint): Renamed to
8300 i386_dr_insert_aligned_watchpoint and made nonstatic.
8301 All uses updated.
8302 (i386_remove_aligned_watchpoint): Renamed to
8303 i386_dr_remove_aligned_watchpoint and made nonstatic.
8304 All uses updated.
8305 (i386_update_inferior_debug_regs): Renamed to
8306 i386_dr_update_inferior_debug_regs and made nonstatic.
8307 All uses updated.
8308 (i386_low_insert_watchpoint): Renamed to
8309 i386_dr_insert_watchpoint. All uses updated.
8310 (i386_low_remove_watchpoint): Renamed to
8311 i386_dr_remove_watchpoint. All uses updated.
8312 (i386_low_region_ok_for_watchpoint): Renamed to
8313 i386_dr_region_ok_for_watchpoint. All uses updated.
8314 (i386_low_stopped_data_address): Renamed to
8315 i386_dr_stopped_data_address. All uses updated.
8316 (i386_low_stopped_by_watchpoint): Renamed to
8317 i386_dr_stopped_by_watchpoint. All uses updated.
8318
131aa0d4
GB
83192014-06-18 Gary Benson <gbenson@redhat.com>
8320
8321 * i386-low.c (i386_dr_low_can_set_addr): New macro.
8322 (i386_dr_low_can_set_control): Likewise.
8323 (i386_insert_aligned_watchpoint): New check.
8324
d9305f7f
GB
83252014-06-18 Gary Benson <gbenson@redhat.com>
8326
8327 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
8328 Renamed to state.
8329
e927c9fc
GB
83302014-06-18 Gary Benson <gbenson@redhat.com>
8331
8332 * i386-low.c (i386_length_and_rw_bits): Use internal_error
8333 instead of fatal and error.
8334 (i386_handle_nonaligned_watchpoint): Likewise.
8335
1b6d4134
GB
83362014-06-18 Gary Benson <gbenson@redhat.com>
8337
8338 * i386-low.c (i386_get_debug_register_length): New macro.
8339 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
8340 (i386_show_dr): Use debug_printf instead of fprintf. Use
8341 phex to format values.
8342
6e62758f
GB
83432014-06-18 Gary Benson <gbenson@redhat.com>
8344
8345 * i386-low.h: Comment changes.
8346 * i386-low.c: Likewise.
8347
fc6e2f03
GB
83482014-06-18 Gary Benson <gbenson@redhat.com>
8349
8350 * i386-low.c: Whitespace changes.
8351
f9d1eeed
TT
83522014-06-12 Tom Tromey <tromey@redhat.com>
8353
8354 * utils.c (freeargv): Remove.
8355
0b04e523
TT
83562014-06-12 Tom Tromey <tromey@redhat.com>
8357
8358 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
8359 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
8360 (parse_debug_format_options): Likewise.
8361 (gdbserver_usage): Likewise.
8362 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
8363 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
8364 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
8365 against libiberty.
8366 ($(LIBGNU)): Depend on libiberty.
8367 (all-lib): Recurse into all subdirs.
8368 (install-only): Invoke "install" target in subdirs.
8369 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
8370 targets.
8371 * configure: Rebuild.
8372 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
8373 for vasprintf, vsnprintf, or gettimeofday.
8374 * configure.srv: Don't add safe-ctype.o or lbasename.o to
8375 srv_tgtobj.
8376
270c9937
JB
83772014-06-05 Joel Brobecker <brobecker@adacore.com>
8378
8379 * development.sh: Delete.
8380 * Makefile.in (config.status): Adjust dependency on development.sh.
8381 * configure.ac: Adjust development.sh source call.
8382 * configure: Regenerate.
8383
0a261ed8
PA
83842014-06-02 Pedro Alves <palves@redhat.com>
8385
8386 * ax.c (gdb_free_agent_expr): New function.
8387 * ax.h (gdb_free_agent_expr): New declaration.
8388 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
8389 list.
8390 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
8391 static.
8392 (clear_breakpoint_conditions_and_commands): New function.
8393 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
8394 (clear_breakpoint_conditions_and_commands): New declaration.
8395
e9dae05e
RR
83962014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
8397
8398 * linux-aarch64-low.c (asm/ptrace.h): Include.
8399
5876f503
JK
84002014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
8401
8402 Fix TLS access for -static -pthread.
8403 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
8404 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
8405 (thread_db_load_search, try_thread_db_load_1): Initialize it.
8406
802e8e6d
PA
84072014-05-20 Pedro Alves <palves@redhat.com>
8408
8409 * linux-aarch64-low.c (aarch64_insert_point)
8410 (aarch64_remove_point): No longer check whether the type is
8411 supported here. Adjust to new interface.
8412 (the_low_target): Install aarch64_supports_z_point_type as
8413 supports_z_point_type method.
8414 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
8415 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
8416 instead of a Z packet char. Adjust.
8417 (arm_supports_z_point_type): New function.
8418 (arm_insert_point, arm_remove_point): Adjust to new interface.
8419 (the_low_target): Install arm_supports_z_point_type.
8420 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
8421 (cris_insert_point, cris_remove_point): Adjust to new interface.
8422 Don't check whether the type is supported here.
8423 (the_low_target): Install cris_supports_z_point_type.
8424 * linux-low.c (linux_supports_z_point_type): New function.
8425 (linux_insert_point, linux_remove_point): Adjust to new interface.
8426 * linux-low.h (struct linux_target_ops) <insert_point,
8427 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
8428 raw_breakpoint pointer parameter.
8429 <supports_z_point_type>: New method.
8430 * linux-mips-low.c (mips_supports_z_point_type): New function.
8431 (mips_insert_point, mips_remove_point): Adjust to new interface.
8432 Use mips_supports_z_point_type.
8433 (the_low_target): Install mips_supports_z_point_type.
8434 * linux-ppc-low.c (the_low_target): Install NULL as
8435 supports_z_point_type method.
8436 * linux-s390-low.c (the_low_target): Install NULL as
8437 supports_z_point_type method.
8438 * linux-sparc-low.c (the_low_target): Install NULL as
8439 supports_z_point_type method.
8440 * linux-x86-low.c (x86_supports_z_point_type): New function.
8441 (x86_insert_point): Adjust to new insert_point interface. Use
8442 insert_memory_breakpoint. Adjust to new
8443 i386_low_insert_watchpoint interface.
8444 (x86_remove_point): Adjust to remove_point interface. Use
8445 remove_memory_breakpoint. Adjust to new
8446 i386_low_remove_watchpoint interface.
8447 (the_low_target): Install x86_supports_z_point_type.
8448 * lynx-low.c (lynx_target_ops): Install NULL as
8449 supports_z_point_type callback.
8450 * nto-low.c (nto_supports_z_point_type): New.
8451 (nto_insert_point, nto_remove_point): Adjust to new interface.
8452 (nto_target_ops): Install nto_supports_z_point_type.
8453 * mem-break.c: Adjust intro comment.
8454 (struct raw_breakpoint) <raw_type, size>: New fields.
8455 <inserted>: Update comment.
8456 <shlib_disabled>: Delete field.
8457 (enum bkpt_type) <gdb_breakpoint>: Delete value.
8458 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
8459 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
8460 (raw_bkpt_type_to_target_hw_bp_type): New function.
8461 (find_enabled_raw_code_breakpoint_at): New function.
8462 (find_raw_breakpoint_at): New type and size parameters. Use them.
8463 (insert_memory_breakpoint): New function, based off
8464 set_raw_breakpoint_at.
8465 (remove_memory_breakpoint): New function.
8466 (set_raw_breakpoint_at): Reimplement.
8467 (set_breakpoint): New, based on set_breakpoint_at.
8468 (set_breakpoint_at): Reimplement.
8469 (delete_raw_breakpoint): Go through the_target->remove_point
8470 instead of assuming memory breakpoints.
8471 (find_gdb_breakpoint_at): Delete.
8472 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
8473 (find_gdb_breakpoint): New function.
8474 (set_gdb_breakpoint_at): Delete.
8475 (z_type_supported): New function.
8476 (set_gdb_breakpoint_1): New function, loosely based off
8477 set_gdb_breakpoint_at.
8478 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
8479 (delete_gdb_breakpoint_at): Delete.
8480 (delete_gdb_breakpoint_1): New function, loosely based off
8481 delete_gdb_breakpoint_at.
8482 (delete_gdb_breakpoint): New function.
8483 (clear_gdb_breakpoint_conditions): Rename to ...
8484 (clear_breakpoint_conditions): ... this. Don't handle a NULL
8485 breakpoint.
8486 (add_condition_to_breakpoint): Make static.
8487 (add_breakpoint_condition): Take a struct breakpoint pointer
8488 instead of an address. Adjust.
8489 (gdb_condition_true_at_breakpoint): Rename to ...
8490 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
8491 z_type parameter.
8492 (gdb_condition_true_at_breakpoint): Reimplement.
8493 (add_breakpoint_commands): Take a struct breakpoint pointer
8494 instead of an address. Adjust.
8495 (gdb_no_commands_at_breakpoint): Rename to ...
8496 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
8497 parameter. Return true if no breakpoint was found. Change debug
8498 output.
8499 (gdb_no_commands_at_breakpoint): Reimplement.
8500 (run_breakpoint_commands): Rename to ...
8501 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
8502 and change return type to boolean.
8503 (run_breakpoint_commands): New function.
8504 (gdb_breakpoint_here): Also check for Z1 breakpoints.
8505 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
8506 breakpoint. Go through the_target->remove_point instead of
8507 assuming memory breakpoint.
8508 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
8509 software and hardware breakpoints.
8510 (reinsert_raw_breakpoint): Go through the_target->insert_point
8511 instead of assuming memory breakpoint.
8512 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
8513 software and hardware breakpoints.
8514 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
8515 Check both software and hardware breakpoints.
8516 (validate_inserted_breakpoint): Assert the breakpoint is a
8517 software breakpoint. Set the inserted flag to -1 instead of
8518 setting shlib_disabled.
8519 (delete_disabled_breakpoints): Adjust.
8520 (validate_breakpoints): Only validate software breakpoints.
8521 Adjust to inserted flag change.
8522 (check_mem_read, check_mem_write): Skip breakpoint types other
8523 than software breakpoints. Adjust to inserted flag change.
8524 * mem-break.h (enum raw_bkpt_type): New enum.
8525 (raw_breakpoint, struct process_info): Forward declare.
8526 (Z_packet_to_target_hw_bp_type): Delete declaration.
8527 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
8528 (set_gdb_breakpoint, delete_gdb_breakpoint)
8529 (clear_breakpoint_conditions): New declarations.
8530 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
8531 (breakpoint_inserted_here): Update comment.
8532 (add_breakpoint_condition, add_breakpoint_commands): Replace
8533 address parameter with a breakpoint pointer parameter.
8534 (gdb_breakpoint_here): Update comment.
8535 (delete_gdb_breakpoint_at): Delete.
8536 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
8537 * server.c (process_point_options): Take a struct breakpoint
8538 pointer instead of an address. Adjust.
8539 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
8540 delete_gdb_breakpoint.
8541 * spu-low.c (spu_target_ops): Install NULL as
8542 supports_z_point_type method.
8543 * target.h: Include mem-break.h.
8544 (struct target_ops) <prepare_to_access_memory>: Update comment.
8545 <supports_z_point_type>: New field.
8546 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
8547 instead of a char. Also take a raw breakpoint pointer.
8548 * win32-arm-low.c (the_low_target): Install NULL as
8549 supports_z_point_type.
8550 * win32-i386-low.c (i386_supports_z_point_type): New function.
8551 (i386_insert_point, i386_remove_point): Adjust to new interface.
8552 (the_low_target): Install i386_supports_z_point_type.
8553 * win32-low.c (win32_supports_z_point_type): New function.
8554 (win32_insert_point, win32_remove_point): Adjust to new interface.
8555 (win32_target_ops): Install win32_supports_z_point_type.
8556 * win32-low.h (struct win32_target_ops):
8557 <supports_z_point_type>: New method.
8558 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
8559 instead of a char. Also take a raw breakpoint pointer.
8560
932539e3
PA
85612014-05-20 Pedro Alves <palves@redhat.com>
8562
8563 * mem-break.h: Include break-common.h.
8564 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
8565 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
8566 (Z_packet_to_target_hw_bp_type): New declaration.
8567 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
8568 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
8569 (Z_PACKET_ACCESS_WP): Delete macros.
8570 (Z_packet_to_hw_type): Delete function.
8571 * i386-low.h: Don't include break-common.h here.
8572 (Z_packet_to_hw_type): Delete declaration.
8573 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
8574 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
8575 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
8576 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
8577 * linux-aarch64-low.c: Don't include break-common.h here.
8578 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
8579 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
8580 (Z_packet_to_target_hw_bp_type): Delete function.
8581 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
8582 function.
8583 (mips_insert_point, mips_remove_point): Use
8584 Z_packet_to_target_hw_bp_type.
8585
4ff0d3d8
PA
85862014-05-20 Pedro Alves <palves@redhat.com>
8587
8588 * linux-aarch64-low.c: Include break-common.h.
8589 (enum target_point_type): Delete.
8590 (Z_packet_to_point_type): Rename to ...
8591 (Z_packet_to_target_hw_bp_type): ... this, and return a
8592 target_hw_bp_type instead.
8593 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
8594 instead of an enum target_point_type.
8595 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
8596 breakpoint type.
8597 (aarch64_dr_state_insert_one_point)
8598 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
8599 (aarch64_handle_aligned_watchpoint)
8600 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
8601 Take an enum target_hw_bp_type instead of an enum
8602 target_point_type.
8603 (aarch64_supports_z_point_type): New function.
8604 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
8605 use Z_packet_to_target_hw_bp_type.
8606
786dc519
JB
86072014-05-20 Joel Brobecker <brobecker@adacore.com>
8608
8609 * configure.ac: Only use -Werror by default when DEVELOPMENT
8610 is true.
8611 * configure: Regenerate.
8612
9e0aa64f
JK
86132014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
8614
8615 Fix gdbserver qGetTLSAddr for x86_64 -m32.
8616 * linux-x86-low.c (X86_64_USER_REGS): New.
8617 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
8618
2b577b92
YQ
86192014-04-28 Yao Qi <yao@codesourcery.com>
8620
8621 * Makefile.in (i386-avx512.c): Fix the typo of generated file
8622 name.
8623
94611da2
PA
86242014-04-25 Pedro Alves <palves@redhat.com>
8625
8626 PR server/16255
8627 * linux-low.c (linux_attach_fail_reason_string): New function.
8628 (linux_attach_lwp): Delete.
8629 (linux_attach_lwp_1): Rename to ...
8630 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
8631 argument. Remove "initial" parameter. Return int instead of
8632 void. Don't error or warn here.
8633 (linux_attach): Adjust to call linux_attach_lwp. Call error on
8634 failure to attach to the tgid. Call warning when failing to
8635 attach to an lwp.
8636 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
8637 argument. Remove "initial" parameter. Return int instead of
8638 void. Don't error or warn here.
8639 (linux_attach_fail_reason_string): New declaration.
8640 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
8641 interface change. Use linux_attach_fail_reason_string.
8642
01f9f808
MS
86432014-04-24 Michael Sturm <michael.sturm@mintel.com>
8644 Walfred Tedeschi <walfred.tedeschi@intel.com>
8645
8646 * Makefile.in: Added rules to handle new files
8647 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
8648 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
8649 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
8650 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
8651 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
8652 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
8653 x32-avx512-linux.o.
8654 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
8655 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
8656 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
8657 i386/x32-avx512.xml.
8658 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
8659 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
8660 i386/x32-avx512-linux.xml.
8661 * i387-fp.c (num_avx512_k_registers): New constant for number
8662 of K registers.
8663 (num_avx512_zmmh_low_registers): New constant for number of
8664 lower ZMM registers (0-15).
8665 (num_avx512_zmmh_high_registers): New constant for number of
8666 higher ZMM registers (16-31).
8667 (num_avx512_ymmh_registers): New contant for number of higher
8668 YMM registers (ymm16-31 added by avx521 on x86_64).
8669 (num_avx512_xmm_registers): New constant for number of higher
8670 XMM registers (xmm16-31 added by AVX512 on x86_64).
8671 (struct i387_xsave): Add space for AVX512 registers.
8672 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
8673 Add code to handle AVX512 registers.
8674 (i387_xsave_to_cache): Add code to handle AVX512 registers.
8675 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
8676 prototypei from generated file.
8677 (tdesc_amd64_avx512_linux): Likewise.
8678 (init_registers_x32_avx512_linux): Likewise.
8679 (tdesc_x32_avx512_linux): Likewise.
8680 (init_registers_i386_avx512_linux): Likewise.
8681 (tdesc_i386_avx512_linux): Likewise.
8682 (x86_64_regmap): Add AVX512 registers.
8683 (x86_linux_read_description): Add code to handle AVX512 XSTATE
8684 mask.
8685 (initialize_low_arch): Add code to initialize AVX512 registers.
8686
51aa91f9
PA
86872014-04-23 Pedro Alves <palves@redhat.com>
8688
8689 * mem-break.c (find_gdb_breakpoint_at): Make static.
8690 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
8691
a4165e94
PA
86922014-04-23 Pedro Alves <palves@redhat.com>
8693
8694 * i386-low.c: Don't include break-common.h here.
8695 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
8696 prototype to take target_hw_bp_type as argument instead of a Z
8697 packet char.
8698 * i386-low.h: Include break-common.h here.
8699 (Z_packet_to_hw_type): Declare.
8700 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
8701 prototypes.
8702 * linux-x86-low.c (x86_insert_point): Convert the packet number to
8703 a target_hw_bp_type before calling i386_low_insert_watchpoint.
8704 (x86_remove_point): Convert the packet number to a
8705 target_hw_bp_type before calling i386_low_remove_watchpoint.
8706 * win32-i386-low.c (i386_insert_point): Convert the packet number
8707 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
8708 (i386_remove_point): Convert the packet number to a
8709 target_hw_bp_type before calling i386_low_remove_watchpoint.
8710
b8acf843
PA
87112014-04-23 Pedro Alves <palves@redhat.com>
8712
8713 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
8714
d708bcd1
PA
87152014-04-10 Pedro Alves <palves@redhat.com>
8716
8717 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
8718 Check if the condition or command is NULL before checking if the
8719 breakpoint is known. On success, return true.
8720 * mem-break.h (add_breakpoint_condition): Document return.
8721 (add_breakpoint_commands): Add describing comment.
8722 * server.c (skip_to_semicolon): New function.
8723 (process_point_options): Use it.
8724
2eec7d5b
PA
87252014-04-09 Pedro Alves <palves@redhat.com>
8726
8727 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
8728 to lwpid_of.
8729
fa96cb38
PA
87302014-02-27 Pedro Alves <palves@redhat.com>
8731
8732 PR 12702
8733 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
8734 macros.
8735 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
8736 output.
8737 (last_thread_of_process_p): Take a PID argument instead of a
8738 thread pointer.
8739 (linux_wait_for_lwp): Delete.
8740 (num_lwps, check_zombie_leaders, not_stopped_callback): New
8741 functions.
8742 (linux_low_filter_event): New function, party factored out from
8743 linux_wait_for_event.
8744 (linux_wait_for_event): Rename to ...
8745 (linux_wait_for_event_filtered): ... this. Add new filter ptid
8746 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
8747 sigsuspend. Check for zombie leaders.
8748 (linux_wait_for_event): Reimplement as wrapper around
8749 linux_wait_for_event_filtered.
8750 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
8751 a normal or signal exit is seen, it's the whole process exiting.
8752 (wait_for_sigstop): No longer a for_each_inferior callback.
8753 Rewrite on top of linux_wait_for_event_filtered.
8754 (stop_all_lwps): Call wait_for_sigstop directly.
8755 * server.c (resume, handle_target_event): Handle
8756 TARGET_WAITKIND_NO_RESUMED.
8757
d763de10
JB
87582014-02-26 Joel Brobecker <brobecker@adacore.com>
8759
8760 * win32-low.c (psapi_get_dll_name,
8761 * win32_CreateToolhelp32Snapshot): Delete.
8762 (win32_CreateToolhelp32Snapshot, win32_Module32First)
8763 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
8764 Delete.
8765 (handle_load_dll): Add function description.
8766 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
8767
850a0f76
JB
87682014-02-26 Joel Brobecker <brobecker@adacore.com>
8769
8770 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
8771 Add comment.
8772 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
8773 base address when calling win32_add_one_solib.
8774 (handle_load_dll): Delete local variable load_addr.
8775 Remove 0x1000 offset applied to DLL base address when calling
8776 win32_add_one_solib.
8777 (handle_unload_dll): Add comment.
8778
f25b3fc3
JB
87792014-02-26 Joel Brobecker <brobecker@adacore.com>
8780
8781 * win32-low.c (win32_add_all_dlls): Renames
8782 win32_ensure_ntdll_loaded. Rewrite function documentation.
8783 Adjust implementation to always load all DLLs.
8784 Add 0x1000 offset to DLL base address when calling
8785 win32_add_one_solib.
8786 (child_initialization_done): New static global.
8787 (do_initial_child_stuff): Set child_initialization_done to
8788 zero during child initialization, and 1 after. Replace call
8789 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
8790 Add comment.
8791 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
8792 (handle_unload_dll): Add function documentation.
8793 (get_child_debug_event): Ignore load and unload DLL events
8794 during child initialization.
8795
d86d4aaf
DE
87962014-02-20 Doug Evans <dje@google.com>
8797
3bc32da3 8798 Remove global all_lwps.
d86d4aaf
DE
8799 * inferiors.h (ptid_of): Move here from linux-low.h.
8800 (pid_of, lwpid_of): Ditto.
8801 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
8802 parameter is a struct thread_info * now.
8803 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
8804 directly. Pass &all_threads to find_inferior instead of &all_lwps.
8805 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
8806 directly.
8807 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
8808 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
8809 * linux-arm-low.c (update_registers_callback): Update, "entry"
8810 parameter is a struct thread_info * now.
8811 Fetch lwpid from current_inferior directly.
8812 (arm_insert_point): Pass &all_threads to find_inferior instead of
8813 &all_lwps.
8814 (arm_remove_point): Ditto.
8815 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
8816 (arm_prepare_to_resume): Fetch pid from thread.
8817 (arm_read_description): Fetch lwpid from current_inferior directly.
8818 * linux-low.c (all_lwps): Delete.
8819 (delete_lwp): Delete call to remove_inferior.
8820 (handle_extended_wait): Fetch lwpid from thread.
8821 (add_lwp): Don't set lwp->entry.id. Remove call to
8822 add_inferior_to_list.
8823 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
8824 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
8825 (kill_one_lwp_callback): Ditto.
8826 (linux_kill): Don't dereference NULL pointer.
8827 Fetch ptid,lwpid from thread.
8828 (get_detach_signal): Fetch ptid from thread.
8829 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
8830 Simplify call to regcache_invalidate_thread.
8831 (delete_lwp_callback): Update, "entry" parameter is a
8832 struct thread_info * now. Fetch pid from thread.
8833 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
8834 (status_pending_p_callback): Update, "entry" parameter is a
8835 struct thread_info * now. Fetch ptid from thread.
8836 (find_lwp_pid): Update, "entry" parameter is a
8837 struct thread_info * now.
8838 (linux_wait_for_lwp): Fetch pid from thread.
8839 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
8840 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
8841 (enqueue_one_deferred_signal): Fetch lwpid from thread.
8842 (dequeue_one_deferred_signal): Ditto.
8843 (cancel_breakpoint): Fetch ptid from current_inferior.
8844 (linux_wait_for_event): Pass &all_threads to find_inferior,
8845 not &all_lwps. Fetch ptid, lwpid from thread.
8846 (count_events_callback): Update, "entry" parameter is a
8847 struct thread_info * now.
8848 (select_singlestep_lwp_callback): Ditto.
8849 (select_event_lwp_callback): Ditto.
8850 (cancel_breakpoints_callback): Ditto.
8851 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
8852 not &all_lwps.
8853 (select_event_lwp): Ditto. Fetch ptid from event_thread.
8854 (unsuspend_one_lwp): Update, "entry" parameter is a
8855 struct thread_info * now.
8856 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
8857 not &all_lwps.
8858 (linux_stabilize_threads): Ditto. And for for_each_inferior.
8859 Fetch lwpid from thread, not lwp.
8860 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
8861 Pass &all_threads to find_inferior, not &all_lwps.
8862 (send_sigstop): Fetch lwpid from thread, not lwp.
8863 (send_sigstop_callback): Update, "entry" parameter is a
8864 struct thread_info * now.
8865 (suspend_and_send_sigstop_callback): Ditto.
8866 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
8867 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
8868 struct thread_info * now.
8869 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
8870 from thread, lwp.
8871 (lwp_running): Update, "entry" parameter is a
8872 struct thread_info * now.
8873 (stop_all_lwps): Fetch ptid from thread.
8874 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
8875 (linux_resume_one_lwp): Fetch lwpid from thread.
8876 (linux_set_resume_request): Update, "entry" parameter is a
8877 struct thread_info * now. Fetch pid, lwpid from thread.
8878 (resume_status_pending_p): Update, "entry" parameter is a
8879 struct thread_info * now.
8880 (need_step_over_p): Ditto. Fetch lwpid from thread.
8881 (start_step_over): Fetch lwpid from thread.
8882 (linux_resume_one_thread): Update, "entry" parameter is a
8883 struct thread_info * now. Fetch lwpid from thread.
8884 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
8885 (proceed_one_lwp): Update, "entry" parameter is a
8886 struct thread_info * now. Fetch lwpid from thread.
8887 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
8888 struct thread_info * now.
8889 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
8890 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
8891 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
8892 directly.
8893 (regsets_store_inferior_registers): Ditto.
8894 (fetch_register, store_register): Ditto.
8895 (linux_read_memory, linux_write_memory): Ditto.
8896 (linux_request_interrupt): Ditto.
8897 (linux_read_auxv): Ditto.
8898 (linux_xfer_siginfo): Ditto.
8899 (linux_qxfer_spu): Ditto.
8900 (linux_qxfer_libraries_svr4): Ditto.
8901 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
8902 moved to inferiors.h.
8903 (get_lwp): Delete.
8904 (get_thread_lwp): Update.
8905 (struct lwp_info): Delete member "entry". Simplify comment for
8906 member "thread".
8907 (all_lwps): Delete.
8908 * linux-mips-low.c (mips_read_description): Fetch lwpid from
8909 current_inferior directly.
8910 (update_watch_registers_callback): Update, "entry" parameter is a
8911 struct thread_info * now. Fetch pid from thread.
8912 (mips_linux_prepare_to_resume): Fetch ptid from thread.
8913 (mips_insert_point): Fetch lwpid from current_inferior.
8914 Pass &all_threads to find_inferior, not &all_lwps.
8915 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
8916 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
8917 directly.
8918 (mips_stopped_data_address): Ditto.
8919 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
8920 directly.
8921 * linux-tile-low.c (tile_arch_setup): Ditto.
8922 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
8923 (update_debug_registers_callback): Update, "entry" parameter is a
8924 struct thread_info * now. Fetch pid from thread.
8925 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
8926 Pass &all_threads to find_inferior, not &all_lwps.
8927 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
8928 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
8929 Pass &all_threads to find_inferior, not &all_lwps.
8930 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
8931 (i386_dr_low_get_status): Ditto.
8932 (x86_linux_prepare_to_resume): Fetch ptid from thread.
8933 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
8934 (x86_linux_read_description): Ditto.
8935 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
8936
3b8361aa
DE
89372014-02-20 Doug Evans <dje@google.com>
8938
8939 * inferiors.c (get_first_inferior): Fix buglet.
8940
f7667f0d
DE
89412014-02-19 Doug Evans <dje@google.com>
8942
8943 * gdbthread.h (add_thread): Change result type to struct thread_info *.
8944 * inferiors.c (add_thread): Change result type to struct thread_info *.
8945 All callers updated.
8946 (add_lwp): Call add_thread here instead of in callers.
8947 All callers updated.
8948 * linux-low.h (get_lwp_thread): Rewrite.
8949 (struct lwp_info): New member "thread".
8950
b3312d80
DE
89512014-02-19 Doug Evans <dje@google.com>
8952
8953 * linux-low.c (add_lwp): Change result to struct lwp_info *.
8954 All callers updated.
8955
ecc6f45c
DE
89562014-02-19 Doug Evans <dje@google.com>
8957
8958 * inferiors.c (add_thread): Fix whitespace.
8959
649ebbca
DE
89602014-02-19 Doug Evans <dje@google.com>
8961
8962 * dll.c (clear_dlls): Replace accessing list implemention details
8963 with API function.
8964 * gdbthread.h (get_first_thread): Declare.
8965 * inferiors.c (for_each_inferior_with_data): New function.
8966 (get_first_thread): New function.
8967 (find_thread_ptid): Simplify.
8968 (get_first_inferior): New function.
8969 (clear_list): Delete.
8970 (one_inferior_p): New function.
8971 (clear_inferior_list): New function.
8972 (clear_inferiors): Update.
8973 * inferiors.h (for_each_inferior_with_data): Declare.
8974 (clear_inferior_list): Declare.
8975 (one_inferior_p): Declare.
8976 (get_first_inferior): Declare.
8977 * linux-low.c (linux_wait_for_event): Replace accessing list
8978 implemention details with API function.
8979 * server.c (target_running): Ditto.
8980 (accumulate_file_name_length): New function.
8981 (emit_dll_description): New function.
8982 (handle_qxfer_libraries): Replace accessing list implemention
8983 details with API function.
8984 (handle_qxfer_threads_worker): New function.
8985 (handle_qxfer_threads_proper): Replace accessing list implemention
8986 details with API function.
8987 (handle_query): Ditto.
8988 (visit_actioned_threads_callback_ftype): New typedef.
8989 (visit_actioned_threads_data): New struct.
8990 (visit_actioned_threads): Rewrite to be find_inferior callback.
8991 (resume): Call find_inferior.
8992 (handle_status): Replace accessing list implemention
8993 details with API function.
8994 (process_serial_event): Replace accessing list implemention details
8995 with API function.
8996 * target.c (set_desired_inferior): Replace accessing list implemention
8997 details with API function.
8998 * tracepoint.c (same_process_p): New function.
8999 (gdb_agent_about_to_close): Replace accessing list implemention
9000 details with API function.
9001 * win32-low.c (child_delete_thread): Replace accessing list
9002 implemention details with API function.
9003 (match_dll_by_basename): New function.
9004 (dll_is_loaded_by_basename): New function.
9005 (win32_ensure_ntdll_loaded): Replace accessing list implemention
9006 details call to dll_is_loaded_by_basename.
9007
80894984
DE
90082014-02-19 Doug Evans <dje@google.com>
9009
9010 * dll.h (struct dll_info): Add comment.
9011 * gdbthread.h (struct thread_info): Add comment.
9012 (current_ptid): Simplify.
9013 * inferiors.c (add_process): Update.
9014 (remove_process): Update.
9015 * inferiors.h (struct process_info): Rename member "head" to "entry".
9016 * linux-low.c (delete_lwp): Update.
9017 (add_lwp): Update.
9018 (last_thread_of_process_p): Update.
9019 (kill_one_lwp_callback, linux_kill): Update.
9020 (status_pending_p_callback): Update.
9021 (wait_for_sigstop): Update. Simplify read of ptid.
9022 (start_step_over): Update.
9023 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
9024 (get_lwp_thread): Update.
9025 (struct lwp_info): Rename member "head" to "entry".
9026 * regcache.h (inferior_list_entry): Delete.
9027 * server.c (kill_inferior_callback): Update.
9028 (detach_or_kill_inferior_callback): Update.
9029 (print_started_pid): Update.
9030 (print_attached_pid): Update.
9031 (process_serial_event): Simplify read of ptid.
9032 * thread-db.c (thread_db_create_event): Update.
9033 (thread_db_get_tls_address): Update.
9034 * win32-low.c (current_inferior_ptid): Simplify.
9035
46917d26
TT
90362014-02-19 Tom Tromey <tromey@redhat.com>
9037
9038 * target.h (struct target_ops) <supports_btrace>: Add target_ops
9039 argument.
9040 (target_supports_btrace): Update.
9041
0759a81e
YQ
90422014-02-14 Yao Qi <yao@codesourcery.com>
9043
9044 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
9045 (rsp-low-ipa.o): New target.
9046
a7191e8b
TT
90472014-02-12 Tom Tromey <tromey@redhat.com>
9048
9049 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
9050 convert_ascii_to_int.
9051 * regcache.c (registers_to_string): Likewise.
9052 * remote-utils.c (decode_M_packet): Likewise.
9053 * server.c (process_serial_event): Likewise.
9054
ff0e980e
TT
90552014-02-12 Tom Tromey <tromey@redhat.com>
9056
9057 * server.c (handle_query, handle_v_run): Use hex2bin, not
9058 unhexify.
9059 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
9060
e9371aff
TT
90612014-02-12 Tom Tromey <tromey@redhat.com>
9062
9063 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
9064 convert_int_to_ascii.
9065 * regcache.c (registers_to_string, collect_register_as_string):
9066 Likewise.
9067 * remote-utils.c (look_up_one_symbol, relocate_instruction):
9068 Likewise.
9069 * server.c (process_serial_event): Likewise.
9070 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
9071 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
9072
971dc0b8
TT
90732014-02-12 Tom Tromey <tromey@redhat.com>
9074
9075 * remote-utils.c (look_up_one_symbol, monitor_output): Use
9076 bin2hex, not hexify.
9077 * tracepoint.c (cmd_qtstatus): Likewise.
9078
0a822afb
TT
90792014-02-12 Tom Tromey <tromey@redhat.com>
9080
9081 * remote-utils.c (monitor_output): Pass explicit length to
9082 hexify.
9083
9c3d6531
TT
90842014-02-12 Tom Tromey <tromey@redhat.com>
9085
9086 * tracepoint.c: Include rsp-low.h.
9087 * server.c: Include rsp-low.h.
9088 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
9089 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
9090 declare.
9091 * remote-utils.c: Include rsp-low.h.
9092 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
9093 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
9094 (convert_int_to_ascii, convert_ascii_to_int): Move to
9095 common/rsp-low.c.
9096 * regcache.c: Include rsp-low.h.
9097 * ax.c: Include rsp-low.h.
9098 * Makefile.in (SFILES): Add common/rsp-low.c.
9099 (OBS): Add rsp-low.o.
9100 (rsp-low.o): New target.
9101
01fd3ea5
TT
91022014-02-12 Tom Tromey <tromey@redhat.com>
9103
9104 * utils.h (pulongest, plongest, phex_nz): Don't declare.
9105 Include print-utils.h.
9106 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
9107 (plongest, thirty_two, phex_nz): Remove.
9108 * Makefile.in (SFILES): Add common/print-utils.c.
9109 (OBS): Add print-utils.o.
9110 (print-utils-ipa.o): New target.
9111 (print-utils.o): New target.
9112 (IPA_OBJS): Add print-utils-ipa.o.
9113
e99dc820
TT
91142014-02-06 Tom Tromey <tromey@redhat.com>
9115
9116 * Makefile.in (SFILES): Fix indentation.
9117
ee1e2d4f
DE
91182014-02-05 Doug Evans <dje@google.com>
9119
9120 * linux-low.c (linux_wait_for_event): Improve comment.
9121 (linux_wait_1): Keep current_inferior in sync with event_child.
9122
f5a02773
DE
91232014-01-22 Doug Evans <dje@google.com>
9124
9125 * gdbthread.h (gdb_id_to_thread): Delete, unused.
9126
87ce2a04
DE
91272014-01-22 Doug Evans <dje@google.com>
9128
9129 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
9130 * configure: Regenerate.
9131 * config.in: Regenerate.
9132 * Makefile.in (SFILES): Add debug.c.
9133 (OBS): Add debug.o.
9134 * debug.c: New file.
9135 * debug.h: New file.
9136 * linux-aarch64-low.c (*): Update all debugging printfs to use
9137 debug_printf instead of fprintf.
9138 * linux-arm-low.c (*): Ditto.
9139 * linux-cris-low.c (*): Ditto.
9140 * linux-crisv32-low.c (*): Ditto.
9141 * linux-m32r-low.c (*): Ditto.
9142 * linux-sparc-low.c (*): Ditto.
9143 * linux-x86.c (*): Ditto.
9144 * linux-low.c (*): Ditto.
9145 (linux_wait_1): Add calls to debug_enter, debug_exit.
9146 (linux_wait): Remove redundant debugging printf.
9147 (stop_all_lwps): Add calls to debug_enter, debug_exit.
9148 (linux_resume, unstop_all_lwps): Ditto.
9149 * mem-break.c (*): Update all debugging printfs to use
9150 debug_printf instead of fprintf.
9151 * remote-utils.c (*): Ditto.
9152 * thread-db.c (*): Ditto.
9153 * server.c #include <ctype.h>, "gdb_vecs.h".
9154 (debug_threads): Moved to debug.c.
9155 (*): Update all debugging printfs to use debug_printf instead of
9156 fprintf.
9157 (start_inferior): Replace call to fflush with call to debug_flush.
9158 (monitor_show_help): Mention set debug-format.
9159 (parse_debug_format_options): New function.
9160 (handle_monitor_command): Handle "monitor set debug-format".
9161 (gdbserver_usage): Mention --debug-format.
9162 (main): Parse --debug-format.
9163 * server.h (debug_threads): Declaration moved to debug.h.
9164 #include "debug.h".
9165 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
9166 trace_debug_1 that uses debug_printf.
9167 (tracepoint_look_up_symbols): Update all debugging printfs to use
9168 debug_printf instead of fprintf.
9169
e671835b
BS
91702014-01-20 Baruch Siach <baruch@tkos.co.il>
9171
9172 * linux-xtensa-low.c: Include asm/ptrace.h instead of
9173 sys/ptrace.h.
9174
b5737fa9
PA
91752014-01-17 Pedro Alves <palves@redhat.com>
9176
ea38d2a9 9177 PR build/16445
c7faa97a
PA
9178 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
9179 defined after including gdb_proc_service.h.
b5737fa9 9180
40ed484e
DE
91812014-01-16 Doug Evans <dje@google.com>
9182
9183 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
9184 (match_dll): Use it.
9185
969c39fb
MM
91862014-01-16 Markus Metzger <markus.t.metzger@intel.com>
9187
9188 * target.h (target_ops) <read_btrace>: Change parameters and
9189 return type to allow error reporting.
9190 * server.c (handle_qxfer_btrace): Support delta reads. Pass
9191 trace reading errors on.
9192 * linux-low.c (linux_low_read_btrace): Pass trace reading
9193 errors on.
9194 (linux_low_disable_btrace): New.
9195
ab7f45ba
DE
91962014-01-15 Doug Evans <dje@google.com>
9197
9198 * inferiors.c (thread_id_to_gdb_id): Delete.
9199 * inferiors.h (thread_id_to_gdb_id): Delete.
9200
66af0f44
EZ
92012014-01-13 Eli Zaretskii <eliz@gnu.org>
9202
9203 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
9204 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
9205 versions.
9206
9939e131
PA
92072014-01-08 Pedro Alves <palves@redhat.com>
9208
9209 * server.c (handle_status): Don't discard previous queued stop
9210 replies or thread's pending status here.
9211 (main) <disconnection>: Do it here instead.
9212
b7ea362b
PA
92132014-01-08 Pedro Alves <palves@redhat.com>
9214
9215 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
9216 * server.c (visit_actioned_threads, handle_pending_status): New
9217 function.
9218 (handle_v_cont): Factor out parts to ...
9219 (resume): ... this new function. If in all-stop, and a thread
9220 being resumed has a pending status, report it without actually
9221 resuming.
9222 (myresume): Adjust to use the new 'resume' function.
9223 (clear_pending_status_callback, set_pending_status_callback)
9224 (find_status_pending_thread_callback): New functions.
9225 (handle_status): Handle the case of multiple threads having
9226 interesting statuses to report. Report threads' real last signal
9227 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
9228 with an interesting thread to report the status for, instead of
9229 always reporting the status of the first thread.
9230
28498c42
JB
92312014-01-01 Joel Brobecker <brobecker@adacore.com>
9232
9233 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
9234 * gdbreplay.c (gdbreplay_version): Likewise.
9235
f45c82da
YZ
92362013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
9237
9238 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
9239 iov.iov_len with the real length in use.
9240
379a5e2d
JB
92412013-12-13 Joel Brobecker <brobecker@adacore.com>
9242
9243 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
9244 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
9245 for all targets that use win32-low.c.
9246 * win32-low.c (win32_ensure_ntdll_loaded): New function.
9247 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
9248
4210d83e
PA
92492013-12-13 Pedro Alves <palves@redhat.com>
9250
9251 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
9252 if equal to TARGET_WAITKIND_LOADED.
9253 * win32-low.c (cached_status): New static global.
9254 (win32_wait): Add declaration.
9255 (do_initial_child_stuff): Flush all initial pending debug events
9256 up to the initial breakpoint.
9257 (win32_wait): If CACHED_STATUS was set, return that instead
9258 of doing a real wait. Remove the code resuming the execution
9259 of the inferior after receiving a TARGET_WAITKIND_LOADED event
9260 during the initial phase. Also remove the code changing
9261 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
9262 TARGET_WAITKIND_STOPPED.
9263
e7f0d979
YQ
92642013-12-11 Yao Qi <yao@codesourcery.com>
9265
9266 * notif.c (handle_notif_ack): Return 0 if no notification
9267 matches.
9268
ebcf782c
DE
92692013-11-20 Doug Evans <dje@google.com>
9270
9271 * linux-low.c (linux_set_resume_request): Fix comment.
9272
20ad9378
DE
92732013-11-20 Doug Evans <dje@google.com>
9274
9275 * linux-low.c (resume_status_pending_p): Tweak comment.
9276
a196ebeb
WT
92772013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
9278
9279 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
9280 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
9281 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
9282 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
9283 (srv_amd64_regobj): Add amd64-mpx.o.
9284 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
9285 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
9286 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
9287 * i387-fp.c (num_pl_bnd_register) Added constant.
9288 (num_pl_bnd_cfg_registers) Added constant.
9289 (struct i387_xsave) Added reserved area and MPX fields.
9290 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
9291 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
9292 function.
9293 (tdesc_i386_mpx_linux): Add MPX amd64 target.
9294 (init_registers_amd64_mpx_linux): Declare new function.
9295 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
9296 (x86_64_regmap): Add MPX registers.
9297 (x86_linux_read_description): Add MPX case.
9298 (initialize_low_arch): Initialize MPX targets.
9299
0080a2f6
TT
93002013-11-18 Tom Tromey <tromey@redhat.com>
9301
9302 * configure: Rebuild.
9303 * configure.ac: Don't check for stdlib.h.
9304 * gdbreplay.c: Unconditionally include stdlib.h.
9305
2978b111
TT
93062013-11-18 Tom Tromey <tromey@redhat.com>
9307
9308 * config.in: Rebuild.
9309 * configure: Rebuild.
9310 * configure.ac: Don't use AC_HEADER_DIRENT.
9311
a3d08894
TT
93122013-11-18 Tom Tromey <tromey@redhat.com>
9313
9314 * server.h: Don't check HAVE_STRING_H.
9315 * gdbreplay.c: Don't check HAVE_STRING_H.
9316 * configure: Rebuild.
9317
0a5dd17d
TT
93182013-11-18 Tom Tromey <tromey@redhat.com>
9319
9320 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
9321 LIBGNU.
9322
1bd2f0ba
TT
93232013-11-08 Tom Tromey <tromey@redhat.com>
9324
9325 * configure, config.in: Rebuild.
9326 * configure.ac: Remove unused configury.
9327
3266f10b
TT
93282013-11-08 Tom Tromey <tromey@redhat.com>
9329
9330 * acinclude.m4: Include common.m4, codeset.m4.
9331 * configure, config.in: Rebuild.
9332 * configure.ac: Use GDB_AC_COMMON.
9333
6682d959
AA
93342013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
9335
9336 * linux-s390-low.c (HWCAP_S390_TE): New define.
9337 (s390_arch_setup): Consider the TE field in the HWCAP for
9338 determining 'have_regset_tdb'.
9339
fd0a4d76
SDJ
93402013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
9341
9342 PR gdb/16014
9343 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
9344 call to sizeof.
9345
1a3d890b
PA
93462013-10-02 Pedro Alves <palves@redhat.com>
9347
9348 * server.c (process_serial_event): Don't output "GDBserver
9349 exiting" if GDB is connected through stdio.
9350 * target.c (mywait): Likewise, be silent if GDB is connected
9351 through stdio.
9352
97ad4581
JB
93532013-10-01 Joel Brobecker <brobecker@adacore.com>
9354
9355 * lynx-low.c (lynx_add_threads_after_attach): New function.
9356 (lynx_attach): Remove call to add_thread. Add call to
9357 lynx_add_threads_after_attach instead.
9358
5b4e221c
MF
93592013-09-28 Mike Frysinger <vapier@gentoo.org>
9360
9361 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
9362 * config.in, configure: Regenerated.
9363
ee47b2f8
YQ
93642013-09-18 Yao Qi <yao@codesourcery.com>
9365
9366 PR server/15959
9367 * server.c (start_inferior): Clear 'resume_info'.
9368
d6707650 93692013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 9370
d6707650
JW
9371 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
9372 for each register.
9373
9243dd0e 93742013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 9375
9243dd0e
JW
9376 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
9377 linux-tile-low.o to srv_tgtobj.
9378
c623a6ef
WN
93792013-09-16 Will Newton <will.newton@linaro.org>
9380
9381 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
9382 out regs.
9383
fb71d39e
PA
93842013-09-06 Pedro Alves <palves@redhat.com>
9385
9386 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
9387 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
9388 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
9389 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
9390 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
9391 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
9392
8e7e9910
PA
93932013-09-06 Pedro Alves <palves@redhat.com>
9394
9395 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
9396 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
9397
7c3a12ca
PA
93982013-09-06 Pedro Alves <palves@redhat.com>
9399
9400 * linux-amd64-ipa.c: Include tracepoint.h.
9401 * linux-i386-ipa.c: Include tracepoint.h.
9402
8eb3d7b6
RW
94032013-09-06 Ricard Wanderlof <ricardw@axis.com>
9404
9405 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
9406 (ps_get_thread_area): New function.
9407
eddddb9d
RW
94082013-09-06 Ricard Wanderlof <ricardw@axis.com>
9409
9410 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
9411 (initialize_low_arch): Call init_registers_crisv32 rather than
9412 init_register_crisv32.
9413
533b0600
PA
94142013-09-05 Pedro Alves <palves@redhat.com>
9415
9416 * server.h (handle_vFile, hostio_last_error_from_errno): Move
9417 to ...
9418 * hostio.h: ... this new file.
9419 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
9420 win32-low.c: Include hostio.h.
9421
0ce3d3b5
PA
94222013-09-05 Pedro Alves <palves@redhat.com>
9423
9424 * server.h (gdb_client_data, handler_func, callback_handler_func)
9425 (delete_file_handler, add_file_handler, append_callback_event)
9426 (delete_callback_event, start_event_loop, initialize_event_loop):
9427 Move to event-loop.h and include it.
9428 * event-loop.h: New file.
9429
799cdc37
PA
94302013-09-05 Pedro Alves <palves@redhat.com>
9431
9432 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
9433 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
9434 (loaded_dll, unloaded_dll): Move to ...
9435 * dll.h: ... this new file.
9436 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
9437
6a6bbd9d
PA
94382013-09-05 Pedro Alves <palves@redhat.com>
9439
9440 * server.h (current_process, get_thread_process, all_processes)
9441 (add_inferior_to_list, for_each_inferior, current_inferior)
9442 (remove_inferior, add_process, remove_process, find_process_pid)
9443 (have_started_inferiors_p, have_attached_inferiors_p)
9444 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
9445 (clear_inferiors, find_inferior, find_inferior_id)
9446 (inferior_target_data, set_inferior_target_data)
9447 (inferior_regcache_data, set_inferior_regcache_data): Move to
9448 inferiors.h, and include it.
9449 * inferiors.h: New file.
9450
f699aaba
PA
94512013-09-05 Pedro Alves <palves@redhat.com>
9452
9453 * server.h (struct emit_ops, current_insn_ptr, emit_error):
9454 Move ...
72f4393d 9455 * ax.h: ... here.
f699aaba 9456
c144c7a0
PA
94572013-09-05 Pedro Alves <palves@redhat.com>
9458
9459 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
9460 tracepoint.h.
9461 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
9462 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
9463 (handle_tracepoint_general_set, handle_tracepoint_query)
9464 (tracepoint_finished_step, tracepoint_was_hit)
9465 (release_while_stepping_state_list, current_traceframe)
9466 (in_readonly_region, traceframe_read_mem)
9467 (fetch_traceframe_registers, traceframe_read_sdata)
9468 (traceframe_read_info, struct fast_tpoint_collect_status)
9469 (fast_tracepoint_collecting, force_unlock_trace_buffer)
9470 (handle_tracepoit_bkpts, initialize_low_tracepoint)
9471 (supply_fast_tracepoint_registers)
9472 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
9473 (ipa_tdesc, claim_trampoline_space)
9474 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
9475 (agent_mem_read, agent_get_trace_state_variable_value)
9476 (agent_set_trace_state_variable_value, agent_tsv_read)
9477 (agent_mem_read_string, get_raw_reg_func_addr)
9478 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
9479 * tracepoint.h: ... this new file.
9480
ff42e6ab
PA
94812013-09-05 Pedro Alves <palves@redhat.com>
9482
9483 * server.h (perror_with_name, error, fatal, warning, paddress)
9484 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
9485 include it.
9486 * utils.h: New file.
9487
541af0f4
PA
94882013-09-05 Pedro Alves <palves@redhat.com>
9489
9490 * server.h (remote_debug, noack_mode, transport_is_reliable)
9491 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
9492 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
9493 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
9494 (write_enn, initialize_async_io, enable_async_io)
9495 (disable_async_io, check_remote_input_interrupt_request)
9496 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
9497 (dead_thread_notify, prepare_resume_reply)
9498 (decode_address_to_semicolon, decode_address, decode_m_packet)
9499 (decode_M_packet, decode_X_packet, decode_xfer_write)
9500 (decode_search_memory_packet, unhexify, hexify)
9501 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
9502 (look_up_one_symbol, relocate_instruction)
9503 (monitor_output): Move to remote-utils.h, and include it.
9504 * remote-utils.h: New file.
9505
eebdf26b
PA
95062013-09-05 Pedro Alves <palves@redhat.com>
9507
9508 * server.h (_): Delete.
9509
3aafd2ff
PA
95102013-09-02 Pedro Alves <palves@redhat.com>
9511
9512 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
9513 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
9514 allocated.
9515 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
9516
cee83bcb
PM
95172013-09-02 Pierre Muller <muller@sourceware.org>
9518
9519 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
9520 or WriteProcessMemory complete successfully and handle
9521 ERROR_PARTIAL_COPY error.
9522
9a13b2fa
PA
95232013-09-02 Pedro Alves <palves@redhat.com>
9524
9525 * server.c (gdb_read_memory): Return -1 on traceframe memory read
9526 error instead of EIO.
9527
602e3198
JK
95282013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9529
9530 PR server/15604
9531 * linux-low.c: Include filestuff.h.
9532 (linux_create_inferior) <pid == 0>: Call close_most_fds.
9533 * lynx-low.c: Include filestuff.h.
9534 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
9535 * server.c: Include filestuff.h.
9536 (main): Call notice_open_fds.
9537 * spu-low.c: Include filestuff.h.
9538 (spu_create_inferior) <pid == 0>: Call close_most_fds.
9539
96d7229d
LM
95402013-08-22 Luis Machado <lgustavo@codesourcery.com>
9541
9542 * Makefile.in: Explain why ../target and ../nat are not
9543 listed as include file search paths.
9544 (linux-waitpid.o): New object file rule.
9545 * configure.srv (srv_native_linux_obj): New variable.
9546 Replace all occurrences of linux native object files with
9547 $srv_native_linux_obj.
9548 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
9549 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
9550 (linux_enable_event_reporting): Remove declaration.
9551 (my_waitpid): Moved to common/linux-waitpid.c.
9552 (linux_wait_for_event): Pass ptid when calling
9553 linux_enable_event_reporting.
9554 (linux_supports_tracefork_flag): Remove.
9555 (linux_enable_event_reporting): Likewise.
9556 (linux_tracefork_grandchild): Remove.
9557 (STACK_SIZE): Moved to common/linux-ptrace.c.
9558 (linux_tracefork_child): Remove.
9559 (linux_test_for_tracefork): Remove.
9560 (linux_look_up_symbols): Call linux_supports_traceclone.
9561 (initialize_low): Remove call to linux_test_for_tracefork.
9562 * linux-low.h (PTRACE_TYPE_ARG3): Move to
9563 common/linux-ptrace.h.
9564 (PTRACE_TYPE_ARG4): Likewise.
9565 Include linux-ptrace.h.
9566
32940073
PA
95672013-08-21 Pedro Alves <palves@redhat.com>
9568
9569 * config.in: Renegerate.
9570
33b60d58 95712013-08-19 Luis Machado <lgustavo@codesourcery.com>
a261b8f5 9572
33b60d58
LM
9573 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
9574 (SFILES): Remove $(srcdir)/common/target-common.c and
9575 add $(srcdir)/target/waitstatus.c.
9576 (OBS): Remove target-common.o and add waitstatus.o.
9577 (server_h): Remove $(srcdir)/../common/target-common.h and
9578 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
9579 and $(srcdir)/../target/waitstatus.h.
9580 (target-common.o): Remove.
9581 (waitstatus.o): New target object file.
9582 * target.h: Do not include target-common.h and
9583 include target/resume.h, target/wait.h and
9584 target/waitstatus.h.
9585
b8e1b30e
LM
95862013-08-13 Luis Machado <lgustavo@codesourcery.com>
9587
9588 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
9589 to PTRACE_TYPE_ARG3.
9590 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
9591 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
9592 PTRACE_TYPE_ARG4.
9593 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
9594 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
9595
7a60ad40
YQ
95962013-07-27 Jie Zhang <jie@codesourcery.com>
9597 Daniel Jacobowitz <dan@codesourcery.com>
9598 Yao Qi <yao@codesourcery.com>
9599
9600 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
9601 (mips-linux-watch.o): New rule.
9602 (mips_linux_watch_h): New variable.
9603 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
9604 srv_tgtobj.
9605 * linux-mips-low.c: Include mips-linux-watch.h.
9606 (struct arch_process_info, struct arch_lwp_info): New.
9607 (update_watch_registers_callback): New function.
9608 (mips_linux_new_process, mips_linux_new_thread) New functions.
9609 (mips_linux_prepare_to_resume, mips_insert_point): New
9610 functions.
9611 (mips_remove_point, mips_stopped_by_watchpoint): New
9612 functions.
9613 (rsp_bp_type_to_target_hw_bp_type): New function.
9614 (mips_stopped_data_address): New function.
9615 (the_low_target): Add watchpoint support functions.
9616
de6f69ad
YQ
96172013-07-27 Yao Qi <yao@codesourcery.com>
9618
9619 * i386-low.c: Include break-common.h.
9620 (enum target_hw_bp_type): Remove.
9621
3360c0bf
LM
96222013-07-24 Luis Machado <lgustavo@codesourcery.com>
9623
9624 * Makefile.in (SFILES): /common/target-common.c.
9625 (OBS): Add target-common.o.
9626 (server_h): Add $(srcdir)/../common/target-common.h.
9627 (target-common.o): New target.
9628 * server.c (queue_stop_reply_callback): Free
9629 status string after use.
9630 * target.c (target_waitstatus_to_string): Remove.
9631 * target.h: Include target-common.h.
9632 (resume_kind): Likewise.
9633 (target_waitkind): Likewise.
9634 (target_waitstatus): Likewise.
9635 (TARGET_WNOHANG): Likewise.
9636
bd885420
YQ
96372013-07-04 Yao Qi <yao@codesourcery.com>
9638
9639 * Makefile.in (host_alias): Use @host_noncanonical@.
9640 (target_alias): Use @target_noncanonical@.
9641 * configure.ac: Use ACX_NONCANONICAL_TARGET and
9642 ACX_NONCANONICAL_HOST.
9643 * configure: Regenerated.
9644
9645 Revert:
9646 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
9647
9648 * configure.ac (version_host, version_target): Set and AC_SUBST them.
9649 * configure: Rebuild.
9650 * Makefile.in (version_host, version_target): Get from configure.
9651 (version.c): Use $(version_host) and $(version_target).
9652
17ef446e
PA
96532013-07-03 Pedro Alves <palves@redhat.com>
9654
9655 * Makefile.in (config.status): Depend on development.sh.
9656 * acinclude.m4: Include libmcheck.m4.
9657 * configure: Regenerate.
9658
7a9a7487
MG
96592013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
9660
9661 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
9662 attribute inside the parentheses.
9663 (winapi_DebugSetProcessKillOnExit): Ditto.
9664 (winapi_DebugBreakProcess): Ditto.
9665 (winapi_GenerateConsoleCtrlEvent): Ditto.
a261b8f5 9666
49b64de6
MG
96672013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
9668
9669 * notif.h (notif_event): Add a dummy member to avoid compiler
9670 errors.
9671
d5749ee7
PA
96722013-07-01 Pedro Alves <palves@redhat.com>
9673
9674 * hostio.c (HOSTIO_PATH_MAX): Define.
9675 (require_filename, handle_open, handle_unlink, handle_readlink):
9676 Use it.
9677
d8d2a3ee
PA
96782013-07-01 Pedro Alves <palves@redhat.com>
9679
9680 * server.h: Include "pathmax.h".
9681 * linux-low.c: Don't include sys/param.h.
9682 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
9683 MAXPATHLEN.
9684 * win32-low.c: Don't include sys/param.h.
9685 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
9686
bc7dea8d
PA
96872013-07-01 Pedro Alves <palves@redhat.com>
9688
9689 * event-loop.c: Don't check HAVE_UNISTD_H before including
9690 <unistd.h>.
9691 * gdbreplay.c: Likewise.
9692 * remote-utils.c: Likewise.
9693 * server.c: Likewise.
9694 * configure.ac: Don't check for unistd.h.
9695 * configure: Regenerate.
9696
d6c2da54
TT
96972013-06-28 Tom Tromey <tromey@redhat.com>
9698
9699 * Makefile.in (version.c): Use version.in, not
9700 common/version.in.
9701
257b6bec
MG
97022013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
9703
9704 * configure.ac (version_host, version_target): Set and AC_SUBST them.
9705 * configure: Rebuild.
9706 * Makefile.in (version_host, version_target): Get from configure.
9707 (version.c): Use $(version_host) and $(version_target).
9708
86ebe149
DK
97092013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
9710
9711 Fix trace-status to output user name without trailing colon.
9712 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
9713
f30aa5af
DK
97142013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
9715
9716 Fix trace-status to output proper start-time and stop-time.
9717 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
9718 output start time and stop time in hex as gdb expects.
9719
28a93511
YQ
97202013-06-26 Pedro Alves <pedro@codesourcery.com>
9721
9722 * tracepoint.c (build_traceframe_info_xml): Output trace state
9723 variables present in the trace buffer.
9724
01208463
TT
97252013-06-24 Tom Tromey <tromey@redhat.com>
9726
9727 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
9728 create-version.sh.
9729 (version.o): Remove.
9730 * gdbreplay.c: Include version.h.
9731 (version, host_name): Don't declare.
9732 * server.h: Include version.h.
9733 (version, host_name): Don't declare.
9734
760256f9
PA
97352013-06-12 Pedro Alves <palves@redhat.com>
9736
9737 * linux-x86-low.c (linux_is_elf64): Delete global.
9738 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
9739 with local linux_pid_exe_is_elf_64_file use.
9740
030031ee
PA
97412013-06-11 Pedro Alves <palves@redhat.com>
9742
9743 * linux-low.c (regset_disabled, disable_regset): New functions.
9744 (regsets_fetch_inferior_registers)
9745 (regsets_store_inferior_registers): Use them.
9746 (initialize_regsets_info); Don't allocate the disabled_regsets
9747 array here.
9748 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
9749 comment.
9750
5da6eb0a
PA
97512013-06-11 Pedro Alves <palves@redhat.com>
9752
9753 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
9754 xmalloc.
9755
7e5aaa09
PA
97562013-06-11 Pedro Alves <palves@redhat.com>
9757
9758 * linux-x86-low.c (initialize_low_arch): Call
9759 init_registers_x32_avx_linux.
9760
d878444c
JK
97612013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
9762
9763 Fix compatibility with Android Bionic.
9764 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
9765 it is not empty.
9766
3aee8918
PA
97672013-06-07 Pedro Alves <palves@redhat.com>
9768
5f2b57b5 9769 PR server/14823
3aee8918
PA
9770 * Makefile.in (OBS): Add tdesc.o.
9771 (IPA_OBJS): Add tdesc-ipa.o.
9772 (tdesc-ipa.o): New rule.
9773 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
9774 interface.
9775 * linux-low.c (new_inferior): Delete.
9776 (disabled_regsets, num_regsets): Delete.
9777 (linux_add_process): Adjust to set the new per-process
9778 new_inferior flag.
9779 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
9780 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
9781 was a stop. When calling arch_setup, switch the current inferior
9782 to the thread that got an event.
9783 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
9784 (regsets_fetch_inferior_registers)
9785 (regsets_store_inferior_registers): New regsets_info parameter.
9786 Adjust to use it.
9787 (linux_register_in_regsets): New regs_info parameter. Adjust to
9788 use it.
9789 (register_addr, fetch_register, store_register): New usrregs_info
9790 parameter. Adjust to use it.
9791 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
9792 parameter regs_info. Adjust to use it.
9793 (linux_fetch_registers): Get the current inferior's regs_info, and
9794 adjust to use it.
9795 (linux_store_registers): Ditto.
9796 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
9797 (initialize_low): Don't initialize the target_regsets here. Call
9798 initialize_low_arch.
9799 * linux-low.h (target_regsets): Delete declaration.
9800 (struct regsets_info): New.
9801 (struct usrregs_info): New.
9802 (struct regs_info): New.
9803 (struct process_info_private) <new_inferior>: New field.
9804 (struct linux_target_ops): Delete the num_regs, regmap, and
9805 regset_bitmap fields. New field regs_info.
9806 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
9807 * i387-fp.c (num_xmm_registers): Delete.
9808 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
9809 calls to new interface.
9810 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
9811 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
9812 Infer the number of xmm registers from the regcache's target
9813 description.
9814 * i387-fp.h (num_xmm_registers): Delete.
9815 * inferiors.c (add_thread): Don't install the thread's regcache
9816 here.
9817 * proc-service.c (gregset_info): Fetch the current inferior's
9818 regs_info. Adjust to use it.
9819 * regcache.c: Include tdesc.h.
9820 (register_bytes, reg_defs, num_registers)
9821 (gdbserver_expedite_regs): Delete.
9822 (get_thread_regcache): If the thread doesn't have a regcache yet,
9823 create one, instead of aborting gdbserver.
9824 (regcache_invalidate_one): Rename to ...
9825 (regcache_invalidate_thread): ... this.
9826 (regcache_invalidate_one): New.
9827 (regcache_invalidate): Only invalidate registers of the current
9828 process.
9829 (init_register_cache): Add target_desc parameter, and use it.
9830 (new_register_cache): Ditto. Assert the target description has a
9831 non zero registers_size.
9832 (regcache_cpy): Add assertions. Adjust.
9833 (realloc_register_cache, set_register_cache): Delete.
9834 (registers_to_string, registers_from_string): Adjust.
9835 (find_register_by_name, find_regno, find_register_by_number)
9836 (register_cache_size): Add target_desc parameter, and use it.
9837 (free_register_cache_thread, free_register_cache_thread_one)
9838 (regcache_release, register_cache_size): New.
9839 (register_size): Add target_desc parameter, and use it.
9840 (register_data, supply_register, supply_register_zeroed)
9841 (supply_regblock, supply_register_by_name, collect_register)
9842 (collect_register_as_string, collect_register_by_name): Adjust.
9843 * regcache.h (struct target_desc): Forward declare.
9844 (struct regcache) <tdesc>: New field.
9845 (init_register_cache, new_register_cache): Add target_desc
9846 parameter.
9847 (regcache_invalidate_thread): Declare.
9848 (regcache_invalidate_one): Delete declaration.
9849 (regcache_release): Declare.
9850 (find_register_by_number, register_cache_size, register_size)
9851 (find_regno): Add target_desc parameter.
9852 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
9853 declarations.
9854 * remote-utils.c: Include tdesc.h.
9855 (outreg, prepare_resume_reply): Adjust.
9856 * server.c: Include tdesc.h.
9857 (gdbserver_xmltarget): Delete declaration.
9858 (get_features_xml, process_serial_event): Adjust.
9859 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
9860 declare.
9861 (struct process_info) <tdesc>: New field.
9862 (ipa_tdesc): Declare.
9863 * tdesc.c: New file.
9864 * tdesc.h: New file.
9865 * tracepoint.c: Include tdesc.h.
9866 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
9867 (get_context_regcache): Adjust to pass ipa_tdesc down.
9868 (do_action_at_tracepoint): Adjust to get the register cache size
9869 from the context regcache's description.
9870 (traceframe_walk_blocks): Adjust to get the register cache size
9871 from the current trace frame's description.
9872 (traceframe_get_pc): Adjust to get current trace frame's
9873 description and pass it down.
9874 (gdb_collect): Adjust to get the register cache size from the
9875 IPA's description.
9876 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
9877 (gdbserver_xmltarget): Delete.
9878 (initialize_low_tracepoint): Set the ipa's target description.
9879 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
9880 (initialize_low_tracepoint): Set the ipa's target description.
9881 * linux-x86-low.c: Include tdesc.h.
9882 [__x86_64__] (is_64bit_tdesc): New.
9883 (ps_get_thread_area, x86_get_thread_area): Use it.
9884 (i386_cannot_store_register): Rename to ...
9885 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
9886 (i386_cannot_fetch_register): Rename to ...
9887 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
9888 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
9889 to new interface.
9890 (target_regsets): Rename to ...
9891 (x86_regsets): ... this.
9892 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
9893 interface.
9894 (x86_siginfo_fixup): Use is_64bit_tdesc.
9895 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
9896 (tdesc_x32_avx_linux, tdesc_x32_linux)
9897 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
9898 Declare.
9899 (x86_linux_update_xmltarget): Delete.
9900 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
9901 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
9902 (AMD64_LINUX_USER64_CS): New.
9903 (x86_linux_read_description): New, based on
9904 x86_linux_update_xmltarget.
9905 (same_process_callback): New.
9906 (x86_arch_setup_process_callback): New.
9907 (x86_linux_update_xmltarget): New.
9908 (x86_regsets_info): New.
9909 (amd64_linux_regs_info): New.
9910 (i386_linux_usrregs_info): New.
9911 (i386_linux_regs_info): New.
9912 (x86_linux_regs_info): New.
9913 (x86_arch_setup): Reimplement.
9914 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
9915 (x86_emit_ops): Ditto.
9916 (the_low_target): Adjust. Install x86_linux_regs_info,
9917 x86_cannot_fetch_register, and x86_cannot_store_register.
9918 (initialize_low_arch): New.
9919 * linux-ia64-low.c (tdesc_ia64): Declare.
9920 (ia64_fetch_register): Adjust.
9921 (ia64_usrregs_info, regs_info): New globals.
9922 (ia64_regs_info): New function.
9923 (the_low_target): Adjust.
9924 (initialize_low_arch): New function.
9925 * linux-sparc-low.c (tdesc_sparc64): Declare.
9926 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
9927 Adjust.
9928 (sparc_arch_setup): New function.
9929 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
9930 (the_low_target): Adjust.
9931 (initialize_low_arch): New function.
9932 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
9933 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
9934 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
9935 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
9936 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
9937 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
9938 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
9939 (tdesc_powerpc_isa205_vsx64l): Declare.
9940 (ppc_cannot_store_register, ppc_collect_ptrace_register)
9941 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
9942 (ppc_set_pc, ppc_get_hwcap): Adjust.
9943 (ppc_usrregs_info): Forward declare.
9944 (!__powerpc64__) ppc_regmap_adjusted: New global.
9945 (ppc_arch_setup): Adjust to the current process'es target
9946 description.
9947 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
9948 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
9949 (ppc_store_evrregset): Adjust.
9950 (target_regsets): Rename to ...
9951 (ppc_regsets): ... this, and make static.
9952 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
9953 (ppc_regs_info): New function.
9954 (the_low_target): Adjust.
9955 (initialize_low_arch): New function.
9956 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
9957 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
9958 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
9959 (tdesc_s390x_linux64v2): Declare.
9960 (s390_collect_ptrace_register, s390_supply_ptrace_register)
9961 (s390_fill_gregset, s390_store_last_break): Adjust.
9962 (target_regsets): Rename to ...
9963 (s390_regsets): ... this, and make static.
9964 (s390_get_pc, s390_set_pc): Adjust.
9965 (s390_get_hwcap): New target_desc parameter, and use it.
9966 [__s390x__] (have_hwcap_s390_high_gprs): New global.
9967 (s390_arch_setup): Adjust to set the current process'es target
9968 description. Don't adjust the regmap.
9969 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
9970 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
9971 (regs_info_3264): New globals.
9972 (s390_regs_info): New function.
9973 (the_low_target): Adjust.
9974 (initialize_low_arch): New function.
9975 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
9976 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
9977 [__mips64] (init_registers_mips_linux)
9978 (init_registers_mips_dsp_linux): Delete defines.
9979 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
9980 (have_dsp): New global.
9981 (mips_read_description): New, based on mips_arch_setup.
9982 (mips_arch_setup): Reimplement.
9983 (get_usrregs_info): New function.
9984 (mips_cannot_fetch_register, mips_cannot_store_register)
9985 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
9986 (mips_fill_fpregset, mips_store_fpregset): Adjust.
9987 (target_regsets): Rename to ...
9988 (mips_regsets): ... this, and make static.
9989 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
9990 (dsp_regs_info, regs_info): New globals.
9991 (mips_regs_info): New function.
9992 (the_low_target): Adjust.
9993 (initialize_low_arch): New function.
9994 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
9995 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
9996 Declare.
9997 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
9998 (arm_read_description): New, with bits factored from
9999 arm_arch_setup.
10000 (arm_arch_setup): Reimplement.
10001 (target_regsets): Rename to ...
10002 (arm_regsets): ... this, and make static.
10003 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
10004 (arm_regs_info): New function.
10005 (the_low_target): Adjust.
10006 (initialize_low_arch): New function.
10007 * linux-m68k-low.c (tdesc_m68k): Declare.
10008 (target_regsets): Rename to ...
10009 (m68k_regsets): ... this, and make static.
10010 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
10011 (m68k_regs_info): New function.
10012 (m68k_arch_setup): New function.
10013 (the_low_target): Adjust.
10014 (initialize_low_arch): New function.
10015 * linux-sh-low.c (tdesc_sharch): Declare.
10016 (target_regsets): Rename to ...
10017 (sh_regsets): ... this, and make static.
10018 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
10019 (sh_regs_info, sh_arch_setup): New functions.
10020 (the_low_target): Adjust.
10021 (initialize_low_arch): New function.
10022 * linux-bfin-low.c (tdesc_bfin): Declare.
10023 (bfin_arch_setup): New function.
10024 (bfin_usrregs_info, regs_info): New globals.
10025 (bfin_regs_info): New function.
10026 (the_low_target): Adjust.
10027 (initialize_low_arch): New function.
10028 * linux-cris-low.c (tdesc_cris): Declare.
10029 (cris_arch_setup): New function.
10030 (cris_usrregs_info, regs_info): New globals.
10031 (cris_regs_info): New function.
10032 (the_low_target): Adjust.
10033 (initialize_low_arch): New function.
10034 * linux-cris-low.c (tdesc_crisv32): Declare.
10035 (cris_arch_setup): New function.
10036 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
10037 (cris_regs_info): New function.
10038 (the_low_target): Adjust.
10039 (initialize_low_arch): New function.
10040 * linux-m32r-low.c (tdesc_m32r): Declare.
10041 (m32r_arch_setup): New function.
10042 (m32r_usrregs_info, regs_info): New globals.
10043 (m32r_regs_info): Adjust.
10044 (initialize_low_arch): New function.
10045 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
10046 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
10047 (tic6x_usrregs_info): Forward declare.
10048 (tic6x_read_description): New function, based on ...
10049 (tic6x_arch_setup): ... this. Reimplement.
10050 (target_regsets): Rename to ...
10051 (tic6x_regsets): ... this, and make static.
10052 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
10053 (tic6x_regs_info): New function.
10054 (the_low_target): Adjust.
10055 (initialize_low_arch): New function.
10056 * linux-xtensa-low.c (tdesc_xtensa): Declare.
10057 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
10058 (target_regsets): Rename to ...
10059 (xtensa_regsets): ... this, and make static.
10060 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
10061 globals.
10062 (xtensa_arch_setup, xtensa_regs_info): New functions.
10063 (the_low_target): Adjust.
10064 (initialize_low_arch): New function.
10065 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
10066 (nios2_arch_setup): Set the current process'es tdesc.
10067 (target_regsets): Rename to ...
10068 (nios2_regsets): ... this.
10069 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
10070 (nios2_regs_info): New function.
10071 (the_low_target): Adjust.
10072 (initialize_low_arch): New function.
a261b8f5
PA
10073 * linux-aarch64-low.c (tdesc_aarch64): Declare.
10074 (aarch64_arch_setup): Set the current process'es tdesc.
10075 (target_regsets): Rename to ...
10076 (aarch64_regsets): ... this.
10077 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
10078 (aarch64_regs_info): New function.
10079 (the_low_target): Adjust.
10080 (initialize_low_arch): New function.
3aee8918
PA
10081 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
10082 globals.
10083 (target_regsets): Rename to ...
10084 (tile_regsets): ... this.
10085 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
10086 (tile_regs_info): New function.
10087 (tile_arch_setup): Set the current process'es tdesc.
10088 (the_low_target): Adjust.
10089 (initialize_low_arch): New function.
10090 * spu-low.c (tdesc_spu): Declare.
10091 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
10092 * win32-arm-low.c (tdesc_arm): Declare.
10093 (arm_arch_setup): New function.
10094 (the_low_target): Install arm_arch_setup instead of
10095 init_registers_arm.
10096 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
10097 (init_windows_x86): Rename to ...
10098 (i386_arch_setup): ... this. Set `win32_tdesc'.
10099 (the_low_target): Adjust.
10100 * win32-low.c (win32_tdesc): New global.
10101 (child_add_thread): Don't create the thread cache here.
10102 (do_initial_child_stuff): Set the new process'es tdesc.
10103 * win32-low.h (struct target_desc): Forward declare.
10104 (win32_tdesc): Declare.
10105 * lynx-i386-low.c (tdesc_i386): Declare global.
10106 (lynx_i386_arch_setup): Set `lynx_tdesc'.
10107 * lynx-low.c (lynx_tdesc): New global.
10108 (lynx_add_process): Set the new process'es tdesc.
10109 * lynx-low.h (struct target_desc): Forward declare.
10110 (lynx_tdesc): Declare global.
10111 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
10112 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
10113 * nto-low.c (nto_tdesc): New global.
10114 (do_attach): Set the new process'es tdesc.
10115 * nto-low.h (struct target_desc): Forward declare.
10116 (nto_tdesc): Declare.
10117 * nto-x86-low.c (tdesc_i386): Declare.
10118 (nto_x86_arch_setup): Set `nto_tdesc'.
10119
b1fbec62
GB
101202013-06-04 Gary Benson <gbenson@redhat.com>
10121
10122 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
10123 to qSupported response when appropriate.
10124 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
10125 with nonzero-length annex.
10126 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
10127 arguments supplied in annex.
10128
d1ec4ce7
DE
101292013-05-31 Doug Evans <dje@google.com>
10130
ac44adcb 10131 PR server/15594
d1ec4ce7
DE
10132 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
10133 64 bits in 64-cross-32 environment.
10134
9b25f2d3
PA
101352013-05-28 Pedro Alves <palves@redhat.com>
10136
10137 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
10138 (aarch64-without-fpu.c): Delete rule.
10139 * configure.srv (aarch64*-*-linux*): Remove references to
10140 aarch64-without-fpu.o and aarch64-without-fpu.xml.
10141 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
10142 declaration.
10143
6740dc9c
PA
101442013-05-24 Pedro Alves <palves@redhat.com>
10145
10146 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
10147 instead of strchr/decode_address. Error if the range isn't split
10148 with a ','. Don't assume there's be a ':' in the action.
10149
c2d6af84
PA
101502013-05-23 Yao Qi <yao@codesourcery.com>
10151 Pedro Alves <palves@redhat.com>
10152
10153 * linux-low.c (lwp_in_step_range): New function.
10154 (linux_wait_1): If the thread was range stepping and stopped
10155 outside the stepping range, report the stop to GDB. Otherwise,
10156 continue stepping. Add range stepping debug output.
10157 (linux_set_resume_request): Copy the step range from the resume
10158 request to the lwp.
10159 (linux_supports_range_stepping): New.
10160 (linux_target_ops) <supports_range_stepping>: Set to
10161 linux_supports_range_stepping.
10162 * linux-low.h (struct linux_target_ops)
10163 <supports_range_stepping>: New field.
10164 (struct lwp_info) <step_range_start, step_range_end>: New fields.
10165 * linux-x86-low.c (x86_supports_range_stepping): New.
10166 (the_low_target) <supports_range_stepping>: Set to
10167 x86_supports_range_stepping.
10168 * server.c (handle_v_cont): Handle 'r' action.
10169 (handle_v_requests): Append ";r" if the target supports range
10170 stepping.
10171 * target.h (struct thread_resume) <step_range_start,
10172 step_range_end>: New fields.
10173 (struct target_ops) <supports_range_stepping>:
10174 New field.
10175 (target_supports_range_stepping): New macro.
10176
58794e1a
JB
101772013-05-17 Joel Brobecker <brobecker@adacore.com>
10178
10179 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
10180 confusion in comment.
10181
d631c5a7
JB
101822013-05-17 Joel Brobecker <brobecker@adacore.com>
10183
10184 * lynx-low.c (struct process_info_private): New type.
10185 (lynx_add_process): New function.
10186 (lynx_create_inferior, lynx_attach): Replace calls to
10187 add_process by calls to lynx_add_process.
10188 (lynx_resume): If PTID is null, then try using
10189 current_process()->private->last_wait_event_ptid.
10190 Add comments.
10191 (lynx_clear_inferiors): Delete. The contents of that function
10192 has been inlined in lynx_mourn;
10193 (lynx_wait_1): Save the ptid in the process's private data.
10194 (lynx_mourn): Free the process' private data. Replace call
10195 to lynx_clear_inferiors by call to clear_inferiors.
10196
96f7a20f
YQ
101972013-05-17 Yao Qi <yao@codesourcery.com>
10198
10199 * i386-low.c (i386_length_and_rw_bits): Move the comment to
10200 the right place.
10201
db0dfaa0
LM
102022013-05-16 Luis Machado <lgustavo@codesourcery.com>
10203
10204 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
10205 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
10206 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
10207 PT_TEXT_END_ADDR guards. Update comments.
10208 (linux_target_op) <read_offsets>: Conditionally define to
10209 linux_read_offsets if the target is UCLIBC and if it defines
10210 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
10211
68f5f838
SL
102122013-05-06 Sandra Loosemore <sandra@codesourcery.com>
10213 Andrew Jenner <andrew@codesourcery.com>
10214
10215 * Makefile.in (SFILES): Add linux-nios2-low.c.
10216 (clean): Add action to delete nios2-linux.c.
10217 (nios2-linux.c): New rule.
10218 * configure.srv: Add nios2*-*-linux*.
10219 * linux-nios2-low.c: New.
10220
1ebff1fd
HAQ
102212013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
10222
10223 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
10224
f6150862
HZ
102252013-04-25 Hui Zhu <hui@codesourcery.com>
10226
10227 PR gdb/15186
f6150862
HZ
10228 * ax.c (ax_printf): Add fflush.
10229
614c279d
TT
102302013-04-22 Tom Tromey <tromey@redhat.com>
10231
10232 * Makefile.in (SFILES): Add filestuff.c.
10233 (OBS): Add filestuff.o.
10234 (filestuff.o): New target.
10235 * config.in, configure: Rebuild.
10236 * configure.ac: Check for fdwalk, pipe2.
10237
7d4e5717
PA
102382013-04-17 Pedro Alves <palves@redhat.com>
10239
10240 * configure.ac (USE_THREAD_DB): Delete variable.
10241 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
10242 Don't AC_SUBST USE_THREAD_DB.
10243 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
10244 * config.in, configure: Regenerate.
10245
d5c93e41
PA
102462013-04-16 Pedro Alves <palves@redhat.com>
10247
10248 * linux-low.h (struct lwp_info) <thread_known>: Move under
10249 the USE_THREAD_DB #ifdef.
10250
04f5fe89
PA
102512013-04-16 Pedro Alves <palves@redhat.com>
10252
10253 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
10254 (linux-low.o): Delete rule.
10255 * linux-low.h: Always include "gdb_thread_db.h" instead of
10256 conditionally including thread_db.h.
10257 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
10258 HAVE_THREAD_DB_H.
10259
480b27bf
JK
102602013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
10261
10262 * Makefile.in (install-only): Fix make install regression.
10263
43662968
JK
102642013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
10265
10266 Convert man pages to texinfo, new gdbinit.5 texinfo page.
10267 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
10268 installation.
10269 * gdbserver.1: Remove.
10270
3e74e146
PA
102712013-03-22 Pedro Alves <palves@redhat.com>
10272
10273 * linux-low.c (handle_extended_wait): Don't call
10274 linux_enable_event_reporting.
10275
a8347a2a
TT
102762013-03-15 Tony Theodore <tonyt@logyst.com>
10277
10278 PR build/9098:
10279 * Makefile.in (SHELL): Use @SHELL@.
10280
eeb56fa7
SDJ
102812013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
10282
10283 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
10284 compiler warning.
10285
4fa7e2ff
JB
102862013-03-13 Joel Brobecker <brobecker@adacore.com>
10287
10288 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
10289 Remove extraneous NULL element.
10290
8ddb1965
YQ
102912013-03-13 Yao Qi <yao@codesourcery.com>
10292
10293 * tracepoint.c (traceframe_read_tsv): Look for the last matched
10294 'V' block in trace frame.
10295
9accd112
MM
102962013-03-11 Markus Metzger <markus.t.metzger@intel.com>
10297
10298 * target.h (struct target_ops): Add btrace ops.
10299 (target_supports_btrace): New macro.
10300 (target_enable_btrace): New macro.
10301 (target_disable_btrace): New macro.
10302 (target_read_btrace): New macro.
10303 * gdbthread.h (struct thread_info): Add btrace field.
10304 * server.c: Include btrace-common.h.
10305 (handle_btrace_general_set): New function.
10306 (handle_btrace_enable): New function.
10307 (handle_btrace_disable): New function.
10308 (handle_general_set): Call handle_btrace_general_set.
10309 (handle_qxfer_btrace): New function.
10310 (struct qxfer qxfer_packets[]): Add btrace entry.
10311 * inferiors.c (remove_thread): Disable btrace.
10312 * linux-low: Include linux-btrace.h.
10313 (linux_low_enable_btrace): New function.
10314 (linux_low_read_btrace): New function.
10315 (linux_target_ops): Add btrace ops.
10316 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
10317 Add srv_linux_btrace=yes.
10318 (x86_64-*-linux*): Add linux-btrace.o.
10319 Add srv_linux_btrace=yes.
10320 * configure.ac: Define HAVE_LINUX_BTRACE.
10321 * config.in: Regenerated.
10322 * configure: Regenerated.
10323
5cc22e4c
MM
103242013-03-11 Markus Metzger <markus.t.metzger@intel.com>
10325
10326 * server.c (handle_qxfer): Preserve error message if -3 is
10327 returned.
10328 (qxfer): Document the -3 return value.
10329
7c97f91e
MM
103302013-03-11 Markus Metzger <markus.t.metzger@intel.com>
10331
10332 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
10333 (linux_btrace_h): New variable.
10334 (linux-btrace.o): New rule.
10335
be9a119c 103362013-03-08 Stan Shebs <stan@codesourcery.com>
f6f899bf
HAQ
10337 Hafiz Abid Qadeer <abidh@codesourcery.com>
10338
10339 * tracepoint.c (trace_buffer_size): New global.
10340 (DEFAULT_TRACE_BUFFER_SIZE): New define.
10341 (init_trace_buffer): Change to one-argument function. Allocate
10342 trace buffer memory.
10343 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
10344 handle QTBuffer:size packet.
10345 (cmd_bigqtbuffer_size): New function.
10346 (initialize_tracepoint): Call init_trace_buffer with
10347 DEFAULT_TRACE_BUFFER_SIZE.
10348 * server.c (handle_query): Add QTBuffer:size in the
10349 supported packets.
10350
e64f7499
YQ
103512013-03-07 Yao Qi <yao@codesourcery.com>
10352
10353 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
10354 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
10355 of -1.
10356 (cmd_qtsp): Adjust condition. Do post increment.
10357 Set cur_action and cur_step_action back to 0.
10358
f0ae6fc3
PA
103592013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
10360
10361 PR server/15236
10362 * linux-low.c (linux_write_memory): Return early success if LEN is
10363 zero.
10364
b5b0b0af
CV
103652013-03-05 Corinna Vinschen <vinschen@redhat.de>
10366
334ad4a8 10367 * configure.srv: Add x86_64-*-cygwin* as target.
b5b0b0af 10368
589bc927
TT
103692013-02-28 Tom Tromey <tromey@redhat.com>
10370
10371 * configure.ac: Invoke AC_SYS_LARGEFILE.
10372 * configure, config.in: Rebuild.
10373
dfe07582
CV
103742013-02-28 Corinna Vinschen <vinschen@redhat.com>
10375
10376 * win32-low.c: Throughout, fix format strings and casts of
10377 printf-like functions to avoid type related warnings on all
10378 platforms.
10379 (get_child_debug_event): Print dwDebugEventCode as hex since
10380 that's how it's usually documented.
10381
736cd585
YQ
103822013-02-28 Yao Qi <yao@codesourcery.com>
10383
10384 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
10385 pulongest.
10386
e1f58301
JW
103872013-02-27 Jiong Wang <jiwang@tilera.com>
10388
10389 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
10390 (reg-tilegx32.c): New rule.
10391 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
10392 * linux-tile-low.c (tile_arch_setup): New function. Invoke
10393 different register info initializer according to elf class.
10394 (init_registers_tilgx32): New function. The tilegx32 register info
10395 initializer.
10396 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
10397 (tile_store_gregset): Likewise.
10398
d171ca78
YQ
103992013-02-27 Yao Qi <yao@codesourcery.com>
10400
10401 * server.c (process_point_options): Print debug message when
10402 debug_threads is true.
10403
282bbdf3
YQ
104042013-02-26 Yao Qi <yao@codesourcery.com>
10405
10406 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
10407
aca22551
PA
104082013-02-19 Pedro Alves <palves@redhat.com>
10409 Kai Tietz <ktietz@redhat.com>
10410
10411 PR gdb/15161
10412
10413 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
10414 instead of strtoul to extract address from packet.
10415 (process_serial_event) <'z'>: Likewise.
10416
4f3cee1c
YQ
104172013-02-18 Yao Qi <yao@codesourcery.com>
10418
10419 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
10420
8e1d55a3
PA
104212013-02-14 Pedro Alves <palves@redhat.com>
10422
10423 Plug memory leak.
10424
10425 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
10426 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
10427
458820da
PA
104282013-02-14 Pedro Alves <palves@redhat.com>
10429
10430 * tracepoint.c (cmd_qtdpsrc): Use savestring.
10431
baea0dae
PA
104322013-02-14 Pedro Alves <palves@redhat.com>
10433
10434 * tracepoint.c (save_string): Delete.
10435 (add_tracepoint_action): Use savestring instead of save_string.
10436
0b1afbb3
PA
104372013-02-12 Pedro Alves <palves@redhat.com>
10438
10439 * linux-xtensa-low.c: Ditto.
10440 * xtensa-xtregs.c: Ditto.
10441
8a4ac37e
PA
104422013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
10443
10444 * thread-db.c (thread_db_get_tls_address): NULL pointer check
10445 thread_db.
10446
148de6bb
MS
104472013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
10448
10449 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
10450 aarch64_num_wp_regs and aarch64_num_bp_regs to
10451 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
10452
55fac6e0
MS
104532013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
10454
10455 * linux-aarch64-low.c (ps_get_thread_area): Replace
10456 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
10457
176eb98c
MS
104582013-02-04 Jim MacArthur <jim.macarthur@arm.com>
10459 Marcus Shawcroft <marcus.shawcroft@arm.com>
10460 Nigel Stephens <nigel.stephens@arm.com>
10461 Yufeng Zhang <yufeng.zhang@arm.com>
10462
10463 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
10464 (aarch64.c, aarch64-without-fpu.c): New targets.
10465 * configure.srv (aarch64*-*-linux*): New.
10466 * linux-aarch64-low.c: New file.
10467
56f7af9c
MS
104682013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
10469
43aaf8b6 10470 * linux-low.c (handle_extended_wait, linux_create_inferior)
56f7af9c
MS
10471 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
10472 (dequeue_one_deferred_signal, linux_resume_one_thread)
10473 (fetch_register, linux_write_memory, linux_enable_event_reporting)
10474 (linux_tracefork_grandchild, linux_test_for_tracefork)
10475 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
10476 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
10477 where the argument is 0.
10478
60f662b0
YQ
104792013-01-25 Yao Qi <yao@codesourcery.com>
10480
10481 * event-loop.c: Include "queue.h".
10482 (gdb_event_p): New typedef.
10483 (struct gdb_event) <next_event>: Remove.
10484 (event_queue): Change to QUEUE(gdb_event_p).
10485 (async_queue_event): Remove.
10486 (gdb_event_xfree): New.
10487 (initialize_event_loop): New.
10488 (process_event): Use API from QUEUE.
10489 (wait_for_event): Likewise.
10490 * server.c (main): Call initialize_event_loop.
10491 * server.h (initialize_event_loop): Declare.
10492
5ae4861a
YQ
104932013-01-18 Yao Qi <yao@codesourcery.com>
10494
10495 * ax.h (struct eval_agent_expr_context): New.
10496 (gdb_eval_agent_expr): Update declaration.
10497 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
10498 TFRAME. Add new argument CTX.
10499 * server.h (struct eval_agent_expr_context): Declare.
10500 (agent_mem_read, agent_tsv_read): Update declaration.
10501 (agent_mem_read_string): Likewise.
10502 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
10503 (add_traceframe_block): Add new argument TPOINT.
10504 Increase TPOINT->traceframe_usage.
10505 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
10506 eval_tracepoint_agent_expr.
10507 (condition_true_at_tracepoint): Likewise.
10508 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
10509 (agent_mem_read_string, agent_tsv_read): Likewise.
10510
85e00e85
YQ
105112013-01-16 Yao Qi <yao@codesourcery.com>
10512
10513 * linux-low.c (linux_resume_one_lwp): Don't check
10514 'lwp->bp_reinsert != 0'.
10515
4039cf45
JB
105162013-01-07 Joel Brobecker <brobecker@adacore.com>
10517 Pedro Alves <palves@redhat.com>
10518
10519 * lynx-low.c (ptrace_request_to_str): Define a temporary
10520 macro and use it to simplify this function's implementation.
10521
9044dee2
JB
105222013-01-07 Joel Brobecker <brobecker@adacore.com>
10523
10524 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
10525 sets errno.
10526
e6352c8f
JB
105272013-01-07 Joel Brobecker <brobecker@adacore.com>
10528
10529 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
10530
50681a27
JB
105312013-01-07 Joel Brobecker <brobecker@adacore.com>
10532
10533 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
10534
3f6e77ef
JB
105352013-01-07 Joel Brobecker <brobecker@adacore.com>
10536
10537 * lynx-low.c (lynx_resume): Use the resume_info parameter
10538 to determine the ptid for the lynx_ptrace call, unless
10539 it is equal to minus_one_ptid, in which case we use the
10540 ptid of the current_inferior.
10541 (lynx_wait_1): After having received a thread create/exit
10542 event, resume the inferior's execution using the signaling
10543 thread's ptid, rather than the old ptid.
10544
7fda33ae
JB
105452013-01-07 Joel Brobecker <brobecker@adacore.com>
10546
10547 * lynx-low.c (lynx_resume): Delete variable ret.
10548
b9786c74
JB
105492013-01-01 Joel Brobecker <brobecker@adacore.com>
10550
10551 * gdbreplay.c (gdbreplay_version): Update copyright year.
10552 * server.c (gdbserver_version): Likewise.
10553
8b93d60f
JB
105542012-12-17 Joel Brobecker <brobecker@adacore.com>
10555
10556 * lynx-low.c (lynx_wait_1): Add debug trace before adding
10557 new thread.
10558
037335a7
JB
105592012-12-17 Joel Brobecker <brobecker@adacore.com>
10560
10561 * lynx-low.c (ptrace_request_to_str): Add handling for
10562 PTRACE_GETTRACESIG.
10563
52d4cbd8
JB
105642012-12-17 Joel Brobecker <brobecker@adacore.com>
10565
10566 * lynx-low.c (lynx_attach): Delete variable new_process.
10567
ab8f6ca9
JB
105682012-12-17 Joel Brobecker <brobecker@adacore.com>
10569
10570 * lynx-low.c (lynx_create_inferior): Delete variable
10571 new_process.
10572
78cbc024
JB
105732012-12-17 Joel Brobecker <brobecker@adacore.com>
10574
10575 * lynx-low.c (ptrace_request_to_str): Do not handle
10576 PTRACE_GETTHREADLIST if this macro does not exist.
10577
14a00470
YQ
105782012-12-15 Yao Qi <yao@codesourcery.com>
10579
10580 * Makefile.in (OBS): Add notif.o.
10581 * notif.c, notif.h: New.
10582 * server.c: Include "notif.h".
10583 (struct vstop_notif) <next>: Remove.
10584 <base>: New field.
10585 (queue_stop_reply): Update.
10586 (push_event, send_next_stop_reply): Remove.
10587 (discard_queued_stop_replies): Update.
10588 (notif_stop): New variable.
10589 (handle_v_stopped): Remove.
10590 (handle_v_requests): Don't call handle_v_stopped. Call
10591 handle_ack_notif instead.
10592 (queue_stop_reply_callback): Call notif_event_enque instead
10593 of queue_stop_reply.
10594 (handle_status): Don't call send_next_stop_reply, call
10595 notif_write_event instead.
10596 (kill_inferior_callback): Likewise.
10597 (detach_or_kill_inferior_callback): Likewise.
10598 (main): Call initialize_notif.
10599 (process_serial_event): Call QUEUE_is_empty.
10600 (handle_target_event): Call notif_push instead of push event.
10601 * server.h (push_event): Remove declaration.
10602
61c125b9
TT
106032012-12-10 Tom Tromey <tromey@redhat.com>
10604
10605 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
10606 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
10607 macros.
10608 (.c.o): Rewrite.
10609 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
10610 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
10611 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
10612 (amd64-linux-ipa.o, ax.o): Rewrite.
10613 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
10614 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
10615 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
10616 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
10617 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
10618 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
10619 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
10620 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
10621 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
10622 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
10623 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
10624 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
10625 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
10626 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
10627 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
10628 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
10629 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
10630 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
10631 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
10632 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
10633 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
10634 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
10635 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
10636 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
10637 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
10638 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
10639 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
10640 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
10641 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
10642 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
10643 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
10644 (reg-tilegx.o): Remove.
10645 (all_object_files): New macro.
10646 Include .deps files.
10647 * aclocal.m4, configure: Rebuild.
10648 * acinclude.m4: Include depstand.m4, lead-dot.m4.
10649 * configure.ac: Invoke ZW_CREATE_DEPDIR,
10650 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
10651
e90e9ad9
TT
106522012-12-05 Tom Tromey <tromey@redhat.com>
10653
10654 PR gdb/14917:
10655 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
10656
02d403bf 106572012-11-28 Markus Metzger <markus.t.metzger@intel.com>
945bf713
MM
10658
10659 * configure.ac: Check for linux/perf_event.h.
10660 * config.in: Regenerated.
10661 * configure: Regenerated.
10662
0270a750
PA
106632012-11-26 Maxime Villard <rustyBSD@gmx.fr>
10664
10665 * hostio.c (handle_readlink): Decrease buffer size
10666 parameter passed to readlink by one byte.
10667
8c29b58e
YQ
106682012-11-26 Yao Qi <yao@codesourcery.com>
10669
10670 * configure.ac (build_warnings): Append '-Wempty-body'.
10671 * configure: Regenerated.
10672 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
10673 body.
10674
8bdce1ff
PM
106752012-11-15 Pierre Muller <muller@sourceware.org>
10676
10677 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
10678 * config.in: Regenerate.
10679 * configure: Regenerate.
10680 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
10681 Use "gdb_wait.h" header instead of <sys/wait.h> header.
10682 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
10683 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
10684 header.
10685 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
10686 instead of <sys/wait.h> header.
10687 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
10688
02d403bf 106892012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3ba6ad0f
MM
10690
10691 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
10692 (various make rules): Remove -DGDBSERVER
10693
fbd5db48
YQ
106942012-11-09 Yao Qi <yao@codesourcery.com>
10695
10696 * spu-low.c (current_ptid): Move it to ..
10697 * gdbthread.h: ... here. New.
10698 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
10699 * server.c (myresume, process_serial_event): Likewise.
10700 * thread-db.c (thread_db_find_new_threads): Likewise.
10701 * tracepoint.c (run_inferior_command): Likewise.
10702
b3dc46ff
AB
107032012-10-01 Andrew Burgess <aburgess@broadcom.com>
10704
10705 * server.c (handle_search_memory_1): Include access length in
10706 warning message.
10707
07c04788
HPN
107082012-09-05 Michael Brandt <michael.brandt@axis.com>
10709
10710 * linux-crisv32-low.c: Fix compile errors.
10711
918d227b
YQ
107122012-09-04 Yao Qi <yao@codesourcery.com>
10713
10714 * tracepoint.c (cmd_qtsv): Adjust debug message.
10715 Don't check CUR_TPOINT.
10716
18c1b81a
YQ
107172012-08-28 Yao Qi <yao@codesourcery.com>
10718
10719 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
10720 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
10721 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
10722 Remove declarations of xmalloc, xreallloc, xstrdup and
10723 freeargv.
10724 * Makefile.in (libiberty_h): New.
10725 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
10726 (linux-bfin-low.o): Append dependency 'libiberty.h'.
10727
dc82f37b
YQ
107282012-08-23 Yao Qi <yao@codesourcery.com>
10729
10730 * server.h: Remove declaration of 'xsnprintf'.
10731
406b1477
KS
107322012-08-22 Keith Seitz <keiths@redhat.com>
10733
10734 * server.h: Include build-gnulib-gbserver/config.h.
10735 * gdbreplay.c: Likewise.
10736
e6712ff1
DE
107372012-08-08 Doug Evans <dje@google.com>
10738
10739 * Makefile.in (SFILES): Add gdb_vecs.c.
10740 (OBS): Add gdb_vecs.o.
10741 (gdb_vecs_h, host_defs_h): New variables.
10742 (thread-db.o): Add $(gdb_vecs_h) dependency.
10743 (gdb_vecs.o): New rule.
10744 * thread-db.c: #include "gdb_vecs.h".
10745 (thread_db_load_search): Use a vector to iterate over path elements.
10746 Handle text appearing after "$pdir".
10747
10748 * configure.ac: Add check for strstr.
10749 * config.in: Regenerate.
10750 * configure: Regenerate.
10751
7c3270ae
UW
107522012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
10753
10754 * hostio.c (handle_pread): If pread fails, fall back to attempting
10755 lseek/read.
10756 (handle_pwrite): Likewise for pwrite.
10757
b62e2b27
UW
107582012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
10759
10760 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
10761 between unsupported TYPE and unimplementable ADDR/LEN combination.
10762 (arm_insert_point): Act on new return value.
10763
78a99e91
PA
107642012-07-31 Pedro Alves <palves@redhat.com>
10765
10766 * server.c (process_point_options): Only skip tokens if we find
10767 one that is unrecognized. Don't treat 'X' specially while
10768 skipping unrecognized tokens.
10769
fcf303ab
UW
107702012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
10771
10772 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
10773 to 4-byte-align HW breakpoint addresses for Thumb.
10774
7255706c
YQ
107752012-07-27 Yao Qi <yao@codesourcery.com>
10776
10777 PR remote/14161.
10778
10779 * server.h: Declare gdb_agent_about_to_close.
10780 * target.c (kill_inferior): Include "agent.h".
10781 New. Send command 'kill'.
10782 * target.h (kill_inferior): Removed macro.
10783 * tracepoint.c (gdb_agent_about_to_close): New.
10784 (gdb_agent_helper_thread): Handle command 'close'.
10785 Wait endlessly until the inferior stops.
10786 Install gdb_agent_remove_socket to atexit hook.
10787 (agent_socket_name): New static variable.
10788 (gdb_agent_socket_init): Replace local variable 'name' with
10789 'agent_socket_name'.
10790 (gdb_agent_remove_socket): New.
10791
5a3f286f
YQ
107922012-07-27 Yao Qi <yao@codesourcery.com>
10793
10794 * server.c (process_point_options): Stop at 'X' when parsing.
10795
961bd387
ME
107962012-07-19 Michael Eager <eager@eagercon.com>
10797
a261b8f5 10798 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
961bd387
ME
10799 to hw_execute.
10800 * linux-x86-low.c (x86_insert_point, x86_remove_point):
10801 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
10802 hardware breakpoint.
10803
aa7c7447
JK
108042012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
10805
10806 * gdbserver/linux-low.c (initialize_low): Call
10807 linux_ptrace_init_warnings.
10808
7f216e7c
DE
108092012-07-02 Doug Evans <dje@google.com>
10810
10811 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
10812 pointer to int.
10813
d3ce09f5
SS
108142012-07-02 Stan Shebs <stan@codesourcery.com>
10815
10816 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
10817 (ax.o): Add it to build rule.
10818 (ax-ipa.o): Ditto.
10819 (OBS): Add format.o.
10820 (IPA_OBS): Add format.o.
10821 * server.c (handle_query): Claim support for breakpoint commands.
10822 (process_point_options): Add command case.
10823 (process_serial_event): Leave running if there are printfs in
10824 effect.
10825 * mem-break.h (any_persistent_commands): Declare.
10826 (add_breakpoint_commands): Declare.
10827 (gdb_no_commands_at_breakpoint): Declare.
10828 (run_breakpoint_commands): Declare.
10829 * mem-break.c (struct point_command_list): New struct.
10830 (struct breakpoint): New field command_list.
10831 (any_persistent_commands): New function.
10832 (add_commands_to_breakpoint): New function.
10833 (add_breakpoint_commands): New function.
10834 (gdb_no_commands_at_breakpoint): New function.
10835 (run_breakpoint_commands): New function.
10836 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
10837 locally.
10838 * ax.c: Include format.h.
10839 (ax_printf): New function.
10840 (gdb_eval_agent_expr): Add printf opcode.
10841
2f8f6aed
YQ
108422012-06-13 Yao Qi <yao@codesourcery.com>
10843
10844 * server.c (start_inferior): Remove duplicated writes to fields
10845 'last_resume_kind' and 'last_status' of 'current_inferior'.
10846
0c9070b3
YQ
108472012-06-12 Yao Qi <yao@codesourcery.com>
10848 Pedro Alves <palves@redhat.com>
10849
10850 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
10851 comment.
10852 * server.c (handle_v_cont): Extend comment.
10853
c52daf70
YQ
108542012-06-11 Yao Qi <yao@codesourcery.com>
10855
10856 * linux-low.c (linux_attach): Add 'static'.
10857
d38bbb0a
YQ
108582012-06-06 Yao Qi <yao@codesourcery.com>
10859
10860 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
10861
89dc0afd
JK
108622012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
10863
10864 Fix gcc -flto compilation warning.
10865 * server.c (main): Make variable multi_mode and attach volatile.
10866
75f62ce7
TJB
108672012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10868
10869 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
10870 if the platform doesn't know about it.
10871
65f479b6
PA
108722012-05-30 Jeff Kenton <jkenton@tilera.com>
10873
10874 * Makefile.in (SFILES): Add linux-tile-low.c.
10875 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
10876 * configure.srv: Handle tilegx-*-linux*.
10877 * linux-tile-low.c: New file.
10878
0c5bf5a9
JK
108792012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10880
10881 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
10882
a493e3e2
PA
108832012-05-24 Pedro Alves <palves@redhat.com>
10884
10885 PR gdb/7205
10886
43aaf8b6 10887 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
a493e3e2 10888
2ea28649
PA
108892012-05-24 Pedro Alves <palves@redhat.com>
10890
10891 PR gdb/7205
10892
10893 Replace target_signal with gdb_signal throughout.
10894
8d409d16
MR
108952012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
10896
10897 * linux-low.c (linux_store_registers): Avoid the copying sequence
10898 when no data has been retrieved by ptrace.
10899
23512c01
MGD
109002012-05-22 Will Deacon <will.deacon@arm.com>
10901
10902 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
10903 Include asm/ptrace.h.
10904 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
10905 already defined.
10906
4934b29e
MR
109072012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
10908
10909 * linux-low.c (linux_store_registers): Don't re-retrieve data
10910 with ptrace that has already been obtained from /proc. Always
10911 copy any data retrieved with ptrace to the buffer supplied.
10912
bde24c0a
PA
109132012-05-11 Yao Qi <yao@codesourcery.com>
10914 Pedro Alves <palves@redhat.com>
10915
10916 * linux-low.c (enum stopping_threads_kind): New.
10917 (stopping_threads): Change type to `enum stopping_threads_kind'.
10918 (handle_extended_wait): If stopping and suspending threads, leave
10919 the new_lwp suspended too.
10920 (linux_wait_for_event): Adjust.
10921 (stop_all_lwps): Set `stopping_threads' to
10922 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
10923 whether we're suspending threads or just stopping them. Assert no
10924 recursion happens.
10925
623b6bdf
YQ
109262012-04-29 Yao Qi <yao@codesourcery.com>
10927
10928 * server.h: Move some code to ...
10929 * gdbthread.h: ... here. New.
10930 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
10931 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
10932 (nto-low.o, win32-low.o): Likewise.
10933 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
10934 * regcache.c, remote-utils.c, server.c: Likewise.
10935 * target.c, tracepoint.c, win32-low.c: Likewise.
10936
f15f9948
TJB
109372012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10938
10939 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
10940 (PTRACE_ARG4_TYPE): Likewise.
10941 (PTRACE_XFER_TYPE): Likewise.
10942 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
10943 ptrace to PTRACE_ARG3_TYPE.
10944 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
10945 (PTRACE_ARG4_TYPE): Likewise.
10946 (PTRACE_XFER_TYPE): Likewise.
10947 (linux_detach_one_lwp): Cast fourth argument of
10948 ptrace to long then PTRACE_ARG4_TYPE.
10949 (regsets_fetch_inferior_registers): Cast third argument of
10950 ptrace to long then PTRACE_ARG3_TYPE.
10951 (regsets_store_inferior_registers): Likewise.
10952
38ea300a
PA
109532012-04-20 Pedro Alves <palves@redhat.com>
10954
10955 * configure: Regenerate.
10956
c971b7fa
PA
109572012-04-19 Pedro Alves <palves@redhat.com>
10958
43aaf8b6 10959 * Makefile.in (GNULIB_BUILDDIR): New.
c971b7fa 10960 (LIBGNU, INCGNU, GNULIB_H): Adjust.
43aaf8b6
PA
10961 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
10962 (all, install-only, uninstall, clean-info, all-lib, clean): No
10963 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
10964 (maintainer-clean realclean distclean): Use subdir_do.
10965 (subdir_do): New.
10966 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
c971b7fa 10967 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
43aaf8b6
PA
10968 * acinclude.m4: Include acx_configure_dir.m4.
10969 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
10970 calls. Call AC_PROG_RANLIB. Configure gnulib using
10971 ACX_CONFIGURE_DIR.
10972 (GNULIB): New.
10973 (GNULIB_STDINT_H): Adjust.
10974 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
10975 * gdbreplay.c: Include build-gnulib/config.h.
10976 * server.h: Likewise.
10977 * aclocal.m4: Regenerate.
10978 * config.in: Regenerate.
10979 * configure: Regenerate.
c971b7fa 10980
809277f8
PA
109812012-04-19 Pedro Alves <palves@redhat.com>
10982
10983 * Makefile.in (LIBGNU, INCGNU): Adjust.
10984 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
10985 (all, install-only, uninstall, clean-info, all-lib, clean)
10986 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
10987 * configure.ac: Adjust AC_OUTPUT output.
10988 * aclocal.m4: Regenerate.
10989 * configure: Regenerate.
10990
fd9bb8b8
PA
109912012-04-19 Pedro Alves <palves@redhat.com>
10992
10993 * Makefile.in (generated_files): New.
10994 (server_h): Remove the explicit dependency on config.h, and depend
10995 on $generated_files.
10996
1c298c66
PA
109972012-04-19 Pedro Alves <palves@redhat.com>
10998
10999 * Makefile.in (INCGNU): Add -Ignulib.
11000
57c4b50b
PA
110012012-04-19 Pedro Alves <palves@redhat.com>
11002
11003 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
11004 (INCGNU): ... this, and spell out -I here.
11005 (GNULIB_LIB): Rename to ...
11006 (LIBGNU): ... this.
11007 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
11008
1030e047
PA
110092012-04-19 Pedro Alves <palves@redhat.com>
11010
11011 * config.in: Regenerate.
11012
447d4319
PA
110132012-04-19 Pedro Alves <palves@redhat.com>
11014
11015 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
11016 * server.h (memmem): Remove declaration.
11017 * config.in: Regenerate.
11018 * configure: Regenerate.
11019
aad9eab9
YQ
110202012-04-19 Yao Qi <yao@codesourcery.com>
11021
11022 * Makefile.in (SFILES): Add common/vec.c.
11023 (OBS): Add vec.o.
11024 (vec.o): New rule.
11025
3e10640f
YQ
110262012-04-19 Yao Qi <yao@codesourcery.com>
11027
11028 * remote-utils.c (prepare_resume_reply): Replace with macro
11029 target_core_of_thread.
11030 * server.c (handle_qxfer_threads_proper): Likewise.
11031 * target.h (traget_core_of_thread): New macro.
11032
71622373
PA
110332012-04-18 Pedro Alves <palves@redhat.com>
11034
11035 * aclocal.m4: Regenerate.
11036 * configure: Regenerate.
11037
80d26939
YQ
110382012-04-16 Yao Qi <yao@codesourcery.com>
11039
11040 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
11041 duplicated on address.
11042
42476b70
YQ
110432012-04-16 Yao Qi <yao@codesourcery.com>
11044
11045 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
11046 (struct tracepoint_action_ops) <send>: New field.
11047 (m_tracepoint_action_send, r_tracepoint_action_send): New.
11048 (agent_expr_send, x_tracepoint_action_send): New.
11049 (l_tracepoint_action_send): New.
11050 (cmd_qtdp): Download and install tracepoint
11051 according to `use_agent'.
11052 (run_inferior_command): Add one more parameter `len'.
11053 Update callers.
11054 (tracepoint_send_agent): New.
11055 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
11056
7bc83639
YQ
110572012-04-16 Yao Qi <yao@codesourcery.com>
11058
11059 * tracepoint.c (download_tracepoints): Moved to ...
11060 (cmd_qtstart): ... here.
11061
5f18041e
YQ
110622012-04-14 Yao Qi <yao@codesourcery.com>
11063
11064 * tracepoint.c: Include inttypes.h.
11065 (struct collect_memory_action): Use sized types.
11066 (struct tracepoint): Likewise.
11067 (cmd_qtdp, stop_tracing): Update print specifiers.
11068 (cmd_qtp, response_tracepoint): Likewise.
11069 (collect_data_at_tracepoint): Likewise.
11070 (collect_data_at_step): Likewise.
11071
55a8c076
YQ
110722012-04-14 Yao Qi <yao@codesourcery.com>
11073
11074 Import gnulib module inttypes.
11075 * aclocal.m4, config.in, configure: Regenerated.
11076
dc750257
YQ
110772012-04-14 Yao Qi <yao@codesourcery.com>
11078
11079 * Makefile.in (maintainer-clean, realclean, distclean): Remove
11080 Makefile and config.status at last.
11081
0ab5faf9
YQ
110822012-04-13 Yao Qi <yao@codesourcery.com>
11083
11084 * tracepoint.c: Include stdint.h unconditionally.
11085
18f5fd81
TJB
110862012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
11087
11088 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
11089 on BFD_HAVE_SYS_PROCFS_TYPE.
11090 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
11091 * configure: Regenerate.
11092 * config.in: Likewise.
11093
4d47af5c
L
110942012-04-13 H.J. Lu <hongjiu.lu@intel.com>
11095
11096 * Makefile.in (clean): Also remove x32.c x32-linux.c
11097 x32-avx.c x32-avx-linux.c.
11098 (x32.o): New target.
11099 (x32.c): Likewise.
11100 (x32-linux.o): Likewise.
11101 (x32-linux.c): Likewise.
11102 (x32-avx.o): Likewise.
11103 (x32-avx.c): Likewise.
11104 (x32-avx-linux.o): Likewise.
11105 (x32-avx-linux.c): Likewise.
11106
11107 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
11108 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
11109 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
11110 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
11111 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
11112 i386/x32-avx-linux.xml.
11113
11114 * linux-x86-low.c (init_registers_x32_linux): New prototype.
11115 (init_registers_x32_avx_linux): Likwise.
11116 (x86_linux_update_xmltarget): Call init_registers_x32_linux
11117 or init_registers_x32_avx_linux if linux_is_elf64 is false.
11118
ecedbe58
PA
111192012-04-13 Pedro Alves <palves@redhat.com>
11120
11121 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
11122 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
11123 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
11124 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
11125 the sub-make.
11126
c92b5177
L
111272012-04-12 H.J. Lu <hongjiu.lu@intel.com>
11128
11129 * linux-x86-low.c (compat_x32_clock_t): New.
11130 (compat_x32_siginfo_t): Likewise.
11131 (compat_x32_siginfo_from_siginfo): Likewise.
11132 (siginfo_from_compat_x32_siginfo): Likewise.
11133 (linux_is_elf64): Likewise.
11134 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
11135 and siginfo_from_compat_x32_siginfo for x32.
11136 (x86_arch_setup): Set linux_is_elf64.
11137
214d508e
L
111382012-04-12 H.J. Lu <hongjiu.lu@intel.com>
11139
11140 PR gdb/13969
11141 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
11142 e_machine field.
11143 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
11144 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
11145 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
11146 compatible with process.
11147
c9a1864a
YQ
111482012-04-12 Yao Qi <yao@codesourcery.com>
11149
11150 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
11151 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
11152 (install-only, install-info, clean): Handle sub dir gnulib.
11153 (all-lib, am--refresh): New targets.
11154 (memmem.o): Remove target.
11155 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
11156 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
11157 (AC_REPLACE_FUNCS): Remove memmem.
11158 Invoke gl_INIT and AM_INIT_AUTOMAKE.
11159 (AC_OUTPUT): Generate Makefile in gnulib/.
11160 * aclocal.m4, config.in, configure: Regenerated.
11161
367ba2c2
MR
111622012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
11163
11164 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
11165
9d236627
PA
111662012-04-05 Pedro Alves <palves@redhat.com>
11167
11168 -Werror=strict-aliasing
11169
11170 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
11171 pointer.
11172
111217b3
PA
111732012-04-04 Pedro Alves <palves@redhat.com>
11174
11175 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
11176 (sparc_store_gregset_from_stack, sparc_store_gregset)
11177 (sparc_breakpoint_at): Fix formatting.
11178
8365dcf5
TJB
111792012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
11180
11181 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
11182 are available.
11183 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
11184 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
11185 * config.in: Regenerate.
11186 * configure: Likewise.
11187
689cc2ae
PA
111882012-03-29 Pedro Alves <palves@redhat.com>
11189
11190 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
11191 Correct ptrace arguments.
11192
c14dfd32
PA
111932012-03-28 Pedro Alves <palves@redhat.com>
11194
11195 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
11196 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
11197 (IA64_FR1_REGNUM): New defines.
11198 (ia64_fetch_register): New.
11199 (the_low_target): Install it.
11200 * linux-low.h (struct linux_target_ops) <fetch_register>: New
11201 field.
11202 * linux-low.c (linux_fetch_registers): Try the
11203 the_low_target.fetch_register hook first.
11204
11205 * linux-arm-low.c (the_low_target): Adjust.
11206 * linux-bfin-low.c (the_low_target): Adjust.
11207 * linux-cris-low.c (the_low_target): Adjust.
11208 * linux-crisv32-low.c (the_low_target): Adjust.
11209 * linux-m32r-low.c (the_low_target): Adjust.
11210 * linux-m68k-low.c (the_low_target): Adjust.
11211 * linux-mips-low.c (the_low_target): Adjust.
11212 * linux-ppc-low.c (the_low_target): Adjust.
11213 * linux-s390-low.c (the_low_target): Adjust.
11214 * linux-sh-low.c (the_low_target): Adjust.
11215 * linux-sparc-low.c (the_low_target): Adjust.
11216 * linux-tic6x-low.c (the_low_target): Adjust.
11217 * linux-x86-low.c (the_low_target): Adjust.
11218 * linux-xtensa-low.c (the_low_target): Adjust.
11219
63c88e13
PA
112202012-03-26 Pedro Alves <palves@redhat.com>
11221
11222 * server.c (handle_qxfer_libraries): Don't bail early if
11223 the_target->qxfer_libraries_svr4 is not NULL.
11224
fb723180
PA
112252012-03-26 Pedro Alves <palves@redhat.com>
11226
11227 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
11228
0afae3cf
PA
112292012-03-23 Pedro Alves <palves@redhat.com>
11230
11231 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
11232 "library-list-svr4" element's start tag when the the DSO list is
11233 empty.
11234
485f1ee4
PA
112352012-03-23 Pedro Alves <palves@redhat.com>
11236
11237 * linux-low.c (read_one_ptr): Read the inferior's pointer through
11238 a variable whose type size is the same as the inferior's pointer
11239 size.
11240
a5362b9a
TS
112412012-03-21 Thomas Schwinge <thomas@codesourcery.com>
11242
11243 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
11244 struct siginfo.
11245 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
11246 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
11247 * linux-low.h: Include <signal.h>.
11248 (struct siginfo): Remove forward declaration.
11249 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
11250 struct siginfo.
11251
d226c142
MF
112522012-03-21 Mike Frysinger <vapier@gentoo.org>
11253
11254 * .gitignore: Ignore more files.
11255
122f36ef
PA
112562012-03-19 Pedro Alves <palves@redhat.com>
11257 Jan Kratochvil <jan.kratochvil@redhat.com>
11258
11259 * server.c (cont_thread, general_thread): Add describing comments.
11260 (start_inferior): Clear `cont_thread'.
11261 (handle_v_cont): Don't set `cont_thread' if resuming all threads
11262 of a process.
11263
fc3e5175
YQ
112642012-03-15 Yao Qi <yao@codesourcery.com>
11265
11266 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
11267 handling to ...
11268 (cmd_qtdp): ... here.
11269
8d0d92cd
YQ
112702012-03-15 Yao Qi <yao@codesourcery.com>
11271
11272 * tracepoint.c (struct tracepoint_action_ops): New.
11273 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
11274 (m_tracepoint_action_download): New.
11275 (r_tracepoint_action_download): New.
11276 (x_tracepoint_action_download): New.
11277 (l_tracepoint_action_download): New.
11278 (add_tracepoint_action): Install `action->ops' according type.
11279 (download_tracepoint_1): Move code `download' function pointer
11280 of various tracepoint_action_ops.
11281
87b0bb13
JK
112822012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
11283
11284 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
11285 linux_ptrace_attach_warnings.
11286
5f572dec
JK
112872012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
11288
11289 * Makefile.in (linux-ptrace.o): New.
11290 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
11291 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
11292 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
11293 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
11294 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
11295 of these targets.
11296 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
11297
f4647387
YQ
112982012-03-08 Yao Qi <yao@codesourcery.com>
11299 Pedro Alves <palves@redhat.com>
11300
11301 Fix PR server/13392.
11302 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
11303 offset of JMP insn.
11304 * tracepoint.c (remove_tracepoint): New.
11305 (cmd_qtdp): Call remove_tracepoint when failed to install.
11306
9b224c5e
PA
113072012-03-07 Pedro Alves <palves@redhat.com>
11308
11309 * linux-low.c (get_detach_signal): New.
11310 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
11311 Pass on pending signals to PTRACE_DETACH. Check the result of the
11312 ptrace call.
11313 * server.c (program_signals, program_signals_p): New.
11314 (handle_general_set): Handle QProgramSignals.
11315 * server.h (program_signals, program_signals_p): Declare.
11316
e237a7e2
JK
113172012-03-05 Pedro Alves <palves@redhat.com>
11318 Jan Kratochvil <jan.kratochvil@redhat.com>
11319
11320 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
11321 New comment why.
11322
5808517f
YQ
113232012-03-03 Yao Qi <yao@codesourcery.com>
11324
11325 * tracepoint.c (tracepoint_look_up_symbols): Update call to
11326 agent_look_up_symbols.
11327
58b4daa5
YQ
113282012-03-03 Yao Qi <yao@codesourcery.com>
11329
11330 * Makefile.in (linux-low.o): Keep dependence on agent.h.
11331 (linux-x86-low.o): Likewise.
11332 * server.h: Remove in_process_agent_loaded.
11333 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
11334 common/agent.c.
11335 Update callers.
11336
8ffcbaaf
YQ
113372012-03-03 Yao Qi <yao@codesourcery.com>
11338
11339 * tracepoint.c (gdb_agent_capability): New global.
11340 (in_process_agent_loaded_ust): Renamed to
11341 `in_process_agent_supports_ust'.
11342 Update callers.
11343 (in_process_agent_supports_ust): Call agent_capability_check.
11344 (clear_installed_tracepoints): Assert that agent supports
11345 agent.
11346
d1feda86
YQ
113472012-03-03 Yao Qi <yao@codesourcery.com>
11348
11349 * linux-low.c (linux_supports_agent): New.
11350 (linux_target_ops): Initialize field `supports_agent' with
11351 linux_supports_agent.
11352 * target.h (struct target_ops) <supports_agent>: New.
11353 (target_supports_agent): New macro.
11354 * server.c (handle_general_set): Handle packet 'QAgent'.
11355 (handle_query): Send `QAgent+'.
11356 * Makefile.in (server.o): Depends on agent.h.
11357
2fa291ac
YQ
113582012-03-03 Yao Qi <yao@codesourcery.com>
11359
11360 * Makefile.in (OBS): Add agent.o.
11361 Add new rule for agent.o.
11362 Track dependence of tracepoint.c on agent.h.
11363 * tracepoint.c (run_inferior_command_1):
11364 (run_inferior_command): Call agent_run_command.
11365 (gdb_ust_connect_sync_socket): Deleted. Move it to
11366 common/agent.c.
11367 (resume_thread, stop_thread): Likewise.
11368 (gdb_ust_socket_init): Renamed to ...
11369 (gdb_agent_socket_init): ... New.
11370 (gdb_ust_thread): Renamed to ...
11371 (gdb_agent_helper_thread): ... New.
11372 (gdb_ust_init): Move some code to ...
11373 (gdb_agent_init): ... here. New.
11374 [HAVE_UST]: Call gdb_ust_init.
11375 (initialize_tracepoint_ftlib): Call gdb_agent_init.
11376 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
11377 * config.in, configure: Regenerated.
11378
05044653
PA
113792012-03-02 Pedro Alves <palves@redhat.com>
11380
11381 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
11382 * linux-low.c (struct simple_pid_list): New.
11383 (stopped_pids): New a struct simple_pid_list pointer.
11384 (add_to_pid_list, pull_pid_from_list): New.
11385 (handle_extended_wait): Don't assume the first signal new children
11386 report is SIGSTOP. Adjust call to pull_pid_from_list.
11387 (linux_wait_for_lwp): Adjust.
11388
8d00225b
YQ
113892012-03-02 Yao Qi <yao@codesourcery.com>
11390
11391 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
11392 debug log.
11393
19560ba5
YQ
113942012-03-02 Yao Qi <yao@codesourcery.com>
11395
11396 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
11397 `stop_pc' and `tpoint'. Update caller.
11398
1faeff08
MR
113992012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
11400
11401 * linux-low.h (linux_target_ops): Add regset_bitmap member.
11402 * linux-low.c (use_linux_regsets): New macro.
11403 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
11404 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
11405 (linux_register_in_regsets): New function.
11406 (usr_fetch_inferior_registers): Skip registers covered by
11407 regsets.
11408 (usr_store_inferior_registers): Likewise.
11409 (usr_fetch_inferior_registers): New macro.
11410 (usr_store_inferior_registers): Likewise.
11411 (linux_fetch_registers): Handle mixed regset/non-regset targets.
11412 (linux_store_registers): Likewise.
11413 * linux-mips-low.c (init_registers_mips_dsp_linux): New
11414 prototype.
11415 (init_registers_mips64_dsp_linux): Likewise.
11416 (init_registers_mips_linux): New macro.
11417 (init_registers_mips_dsp_linux): Likewise.
11418 (mips_dsp_num_regs): Likewise.
11419 (DSP_BASE, DSP_CONTROL): New fallback macros.
11420 (mips_base_regs): New macro.
11421 (mips_regmap): Use it. Fix the size.
11422 (mips_dsp_regmap): New variable.
11423 (mips_dsp_regset_bitmap): Likewise.
11424 (mips_arch_setup): New function.
11425 (mips_cannot_fetch_register): Use the_low_target.regmap rather
11426 than mips_regmap.
11427 (mips_cannot_store_register): Likewise.
11428 (the_low_target): Update .arch_setup, .num_regs and .regmap
11429 initializers. Add .regset_bitmap initializer.
11430 * linux-arm-low.c (the_low_target): Add .regset_bitmap
11431 initializer.
11432 * linux-bfin-low.c (the_low_target): Likewise.
11433 * linux-cris-low.c (the_low_target): Likewise.
11434 * linux-crisv32-low.c (the_low_target): Likewise.
11435 * linux-ia64-low.c (the_low_target): Likewise.
11436 * linux-m32r-low.c (the_low_target): Likewise.
11437 * linux-m68k-low.c (the_low_target): Likewise.
11438 * linux-ppc-low.c (the_low_target): Likewise.
11439 * linux-s390-low.c (the_low_target): Likewise.
11440 * linux-sh-low.c (the_low_target): Likewise.
11441 * linux-sparc-low.c (the_low_target): Likewise.
11442 * linux-tic6x-low.c (the_low_target): Likewise.
11443 * linux-x86-low.c (the_low_target): Likewise.
11444 * linux-xtensa-low.c (the_low_target): Likewise.
11445 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
11446 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
11447 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
11448 srv_xmlfiles.
11449 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
11450 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
11451
c03e6ccc
YQ
114522012-02-29 Yao Qi <yao@codesourcery.com>
11453 Pedro Alves <palves@redhat.com>
11454
11455 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
11456 `step_over_finished' is true.
11457
644cebc9
PA
114582012-02-27 Pedro Alves <palves@redhat.com>
11459
11460 * linux-low.c (pid_is_stopped): Delete, moved to common/.
11461 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
11462
c14d7ab2
PA
114632012-02-27 Pedro Alves <palves@redhat.com>
11464
11465 PR server/9684
11466 * linux-low.c (pid_is_stopped): New.
11467 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
11468
412c89dd
LM
114692012-02-25 Luis Machado <lgustavo@codesourcery.com>
11470
11471 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
11472 of conditions.
11473
b745defe
MR
114742012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
11475
11476 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
11477
9f3a5c85
LM
114782012-02-24 Luis Machado <lgustavo@codesourcery>
11479
11480 * server.c (handle_query): Advertise support for target-side
11481 breakpoint condition evaluation.
11482 (process_point_options): New function.
11483 (process_serial_event): When inserting a breakpoint, check for
11484 a target-side condition that should be evaluated.
11485
11486 * mem-break.c: Include regcache.h and ax.h.
11487 (point_cond_list_t): New data structure.
11488 (breakpoint) <cond_list>: New field.
11489 (find_gdb_breakpoint_at): Make non-static.
11490 (delete_gdb_breakpoint_at): Clear any target-side
11491 conditions.
11492 (clear_gdb_breakpoint_conditions): New function.
11493 (add_condition_to_breakpoint): Likewise.
11494 (add_breakpoint_condition): Likewise.
11495 (gdb_condition_true_at_breakpoint): Likewise.
11496 (gdb_breakpoint_here): Return result directly instead
11497 of going through a local variable.
11498
11499 * mem-break.h (find_gdb_breakpoint_at): New prototype.
11500 (clear_gdb_breakpoint_conditions): Likewise.
11501 (add_breakpoint_condition): Likewise.
11502 (gdb_condition_true_at_breakpoint): Likewise.
11503
11504 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
11505 (need_step_over_p): Take target-side breakpoint condition into
11506 consideration.
11507
5e1dc496
LM
115082012-02-24 Luis Machado <lgustavo@codesourcery>
11509
11510 * server.h: Include tracepoint.h.
11511 (agent_mem_read, agent_get_trace_state_variable_value,
11512 agent_set_trace_state_variable_value,
11513 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
11514 get_set_tsv_func_addr): New prototypes.
11515
11516 * ax.h: New include file.
11517 * ax.c: New source file.
11518
11519 * tracepoint.c: Include ax.h.
11520 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
11521 agent_expr, eval_result_type): Move to ax.h.
11522 (parse_agent_expr): Rename to ...
11523 (gdb_parse_agent_expr): ... this, make it non-static and move
11524 to ax.h.
11525 (unparse_agent_expr) Rename to ...
11526 (gdb_unparse_agent_expr): ... this, make it non-static and move
11527 to ax.h.
11528 (eval_agent_expr): Rename to ...
11529 (eval_tracepoint_agent_expr): ... this.
11530 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
11531 forward declarations.
11532 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
11533 (agent_get_trace_state_variable_value): New function.
11534 (agent_set_trace_state_variable_value): New function.
11535 (cmd_qtdp): Call gdb_parse_agent_expr (...).
11536 (response_tracepoint): Call gdb_unparse_agent_expr (...).
11537 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
11538 (condition_true_at_tracepoint): Likewise.
11539 (parse_agent_expr): Rename to ...
11540 (gdb_parse_agent_expr): ... this and move to ax.c.
11541 (unparse_agent_expr): Rename to ...
11542 (gdb_unparse_agent_expr): ... this and move to ax.c.
11543 (gdb_agent_op_name): Move to ax.c.
11544 (eval_agent_expr): Rename to ...
11545 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
11546 and move to ax.c.
11547 (eval_tracepoint_agent_expr): New function.
11548 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
43aaf8b6 11549 non-static.
5e1dc496
LM
11550 (current_insn_ptr, emit_error, struct bytecode_address): Move to
11551 ax.c.
11552 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
11553 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
11554 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
11555 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
11556 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
11557 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
11558 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
11559 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
11560 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
11561 (compile_bytecodes): Remove forward declaration.
11562 (is_goto_target): Move to ax.c.
11563 (compile_bytecodes): Move to ax.c and call
11564 agent_get_trace_state_variable_value (...) and
11565 agent_set_trace_state_variable_value (...).
11566
11567 * Makefile.in: Update ax.c and IPA dependencies.
11568
277e4e52
PA
115692012-02-24 Pedro Alves <palves@redhat.com>
11570
11571 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
11572 (cmd_bigqtbuffer_circular): ... this. Only handle
11573 'QTBuffer:circular:'.
11574 (handle_tracepoint_general_set): Adjust.
11575
bf4c19f7
YQ
115762012-02-16 Yao Qi <yao@codesourcery.com>
11577
11578 * inferiors.c: Move code to ...
11579 * dll.c: .... here. New.
11580 * server.h: Declare clear_dlls.
11581 * Makefile.in (SFILES): Add dll.c.
11582 (OBS): Add dll.o
11583 (dll.o): New rule.
11584
d73f2619
YQ
115852012-02-11 Yao Qi <yao@codesourcery.com>
11586
11587 * server.c: (handle_monitor_command): Add a new parameter
11588 `own_buf'.
11589 (handle_query): Update caller.
11590
f8255c2a
JB
115912012-02-09 Joel Brobecker <brobecker@adacore.com>
11592
11593 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
11594 * configure, config.in: Regenerate.
11595 * hostio.c: Provide an alternate implementation if HAVE_READLINK
11596 is not defined.
11597
da84f473
PA
115982012-02-02 Pedro Alves <palves@redhat.com>
11599
11600 Try SIGKILL first, then PTRACE_KILL.
11601 * linux-low.c (linux_kill_one_lwp): New.
11602 (linux_kill_one_lwp): Rename to ...
11603 (kill_one_lwp_callback): ... this. Use the new
11604 linux_kill_one_lwp.
11605
e886a173
PA
116062012-02-02 Pedro Alves <palves@redhat.com>
11607
11608 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
11609 inferior.
11610
be07f1a2
PA
116112012-01-27 Pedro Alves <palves@redhat.com>
11612
11613 * linux-low.c (linux_child_pid_to_exec_file): Delete.
11614 (elf_64_file_p): Make static.
11615 (linux_pid_exe_is_elf_64_file): New.
11616 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
11617 Delete declarations.
11618 (linux_pid_exe_is_elf_64_file): Declare.
11619 * linux-x86-low.c (x86_arch_setup): Use
11620 linux_pid_exe_is_elf_64_file.
11621
d8301ad1
JK
116222012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
11623
11624 * linux-low.c (linux_wait_for_event_1): Rename to ...
11625 (linux_wait_for_event): ... here and merge it with former
11626 linux_wait_for_event - new variable wait_ptid, use it.
11627 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
11628
01b17894
PA
116292012-01-23 Pedro Alves <palves@redhat.com>
11630
11631 * server.c (main): Avoid yet another case of infinite loop while
11632 detaching/killing after a longjmp.
11633
e825046f
JK
116342012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
11635
11636 Code cleanup.
11637 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
11638
b9e7b9c3
UW
116392012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
11640
11641 * hostio.c (handle_readlink): New function.
11642 (handle_vFile): Call it to handle "vFile:readlink" packets.
11643
901f9912
UW
116442012-01-20 Pedro Alves <palves@redhat.com>
11645 Ulrich Weigand <ulrich.weigand@linaro.org>
11646
11647 * server.c (handle_v_requests): Only support vAttach and vRun to
11648 start multiple processes when in extended protocol mode.
11649
fc1ab1a0
PA
116502012-01-17 Pedro Alves <palves@redhat.com>
11651
11652 * tracepoint.c (initialize_tracepoint): Use mmap instead of
11653 memalign plus mprotect to allocate the scratch buffer.
11654
7d5d4e98
PA
116552012-01-13 Pedro Alves <palves@redhat.com>
11656
11657 * server.c (attach_inferior): Clear `cont_thread'.
11658
f128d5e9
PA
116592012-01-13 Pedro Alves <palves@redhat.com>
11660
11661 * server.c (main): Avoid infinite loop while detaching/killing
11662 after a longjmp.
11663
06db92f0
DE
116642012-01-09 Doug Evans <dje@google.com>
11665
11666 * server.c (start_inferior): Set last_ptid in --wrapper case.
11667
32d92999
YQ
116682012-01-06 Yao Qi <yao@codesourcery.com>
11669
11670 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
11671 defined.
11672 [IN_PROCESS_AGENT] (debug_agent): New global variable.
11673
5e0a92a9
YQ
116742012-01-04 Yao Qi <yao@codesourcery.com>
11675
11676 * tracepoint.c (cmd_qtdp): Print debug message
11677 for static tracepoint.
11678
ae639e8c
YQ
116792012-01-04 Yao Qi <yao@codesourcery.com>
11680
11681 * tracepoint.c (trace_vdebug): Differentiate debug message
11682 between gdbserver and IPA.
11683
f72429c5
YQ
116842012-01-03 Yao Qi <yao@codesourcery.com>
11685
11686 * tracepoint.c (tracepoint_was_hit): Don't collect for
11687 static tracepoint.
11688
12c3e59c
JB
116892012-01-02 Joel Brobecker <brobecker@adacore.com>
11690
11691 * terminal.h: Reformat copyright header.
11692
67827812
JB
116932012-01-02 Joel Brobecker <brobecker@adacore.com>
11694
11695 * server.c (gdbserver_version): Update copyright year.
11696 * gdbreplay.c (gdbreplay_version): Likewise.
11697
3e52c33d
JK
116982011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
11699
11700 * linux-low.c (linux_create_inferior): Put empty if clause for write.
11701
11702 Revert:
11703 2011-12-18 Hui Zhu <teawater@gmail.com>
11704 * linux-low.c (linux_create_inferior): Save return value to ret.
11705
66f1260e
HZ
117062011-12-18 Hui Zhu <teawater@gmail.com>
11707
11708 * linux-low.c (linux_create_inferior): Save return value to ret.
11709
e77616d7
DE
117102011-12-16 Doug Evans <dje@google.com>
11711
e7b06c57
DE
11712 * linux-low.c (linux_create_inferior): If stdio connection,
11713 redirect stdin from /dev/null, stdout to stderr.
11714 * remote-utils.c (remote_is_stdio): New static global.
11715 (remote_connection_is_stdio): New function.
11716 (remote_prepare): Handle stdio connection.
11717 (remote_open): Ditto.
11718 (remote_close): Don't close stdin for stdio connections.
11719 (read_prim,write_prim): New functions. Replace all calls to
11720 read/write to these.
11721 * server.c (main): Watch for "-" argument. Move call to
11722 remote_prepare before start_inferior.
11723 * server.h (STDIO_CONNECTION_NAME): New macro.
11724 (remote_connection_is_stdio): Declare.
11725
e77616d7
DE
11726 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
11727 in debugging output.
11728
82067193
YQ
117292011-12-15 Yao Qi <yao@codesourcery.com>
11730
11731 * tracepoint.c: Include sys/syscall.h.
11732 (gdb_ust_thread): Remove preprocessor conditional.
11733
82bfbe7e
PA
117342011-12-14 Pedro Alves <pedro@codesourcery.com>
11735
11736 * linux-low.c (linux_detach_one_lwp): Call
11737 the_low_target.prepare_to_resume before detaching.
11738
712c6575
YQ
117392011-12-14 Yao Qi <yao@codesourcery.com>
11740
11741 * tracepoint.c (gdb_ust_thread): Don't ignore return value
11742 of write.
11743
d54d1edf
YQ
117442011-12-14 Yao Qi <yao@codesourcery.com>
11745
11746 * i386-low.c (i386_low_stopped_data_address): Initialize local
11747 variable `control'.
11748
6210a125
PA
117492011-12-13 Pedro Alves <pedro@codesourcery.com>
11750
11751 PR remote/13492
11752
11753 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
11754 DR_CONTROL unless necessary. Extend comments.
11755 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
11756 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
11757
2ece8244
YQ
117582011-12-13 Yao Qi <yao@codesourcery.com>
11759
11760 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
11761 macros.
11762 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
11763
784867a5
JK
117642011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
11765
11766 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
11767 Print new debug message for such case.
11768
6bf36717
JK
117692011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
11770
11771 Fix overlapping memcpy.
11772 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
11773 the read_inferior_memory transfer.
11774 (delete_fast_tracepoint_jump): New variable buf. Use it for the
11775 write_inferior_memory transfer.
11776 (set_fast_tracepoint_jump): New variable buf. Use it for the
11777 read_inferior_memory and write_inferior_memory transfers.
11778 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
11779 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
11780 Use it for the write_inferior_memory transfer.
11781 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
11782 buffers.
11783
50275556
MR
117842011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
11785
11786 * linux-low.c (fetch_register, store_register): Make code
11787 consistent, fix formatting.
11788
7325beb4
MR
117892011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
11790
11791 * linux-low.c (usr_store_inferior_registers): Factor out code
11792 to handle individual registers into...
11793 (store_register): ... this new function.
11794
c642a434
UW
117952011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
11796
11797 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
11798 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
11799 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
11800 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
11801 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
11802 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
11803 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
11804 (srv_xmlfiles): Add new XML files.
11805
11806 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
11807 and <sys/uio.h>.
11808 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
11809 (init_registers_s390_linux32v1): Add prototype.
11810 (init_registers_s390_linux32v2): Likewise.
11811 (init_registers_s390_linux64v1): Likewise.
11812 (init_registers_s390_linux64v2): Likewise.
11813 (init_registers_s390x_linux64v1): Likewise.
11814 (init_registers_s390x_linux64v2): Likewise.
11815 (s390_num_regs): Increment to 52.
11816 (s390_regmap): Add orig_r2 register.
11817 (s390_num_regs_3264): Increment to 68.
11818 (s390_regmap_3264): Add orig_r2 register.
11819 (s390_collect_ptrace_register): Handle orig_r2 register.
11820 (s390_supply_ptrace_register): Likewise.
11821 (s390_fill_last_break): New function.
11822 (s390_store_last_break): Likewise.
11823 (s390_fill_system_call): New function.
11824 (s390_store_system_call): Likewise.
11825 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
11826 register sets.
11827 (s390_check_regset): New function.
11828 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
11829 NT_S390_SYSTEM_CALL regsets and use appropriate description.
11830 Update target_regsets for available register sets.
11831
2268b414
JK
118322011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
11833 Jan Kratochvil <jan.kratochvil@redhat.com>
11834
11835 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
11836 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
11837 New.
11838 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
11839 * linux-low.h (struct process_info_private): New member r_debug.
11840 * server.c (handle_qxfer_libraries): Call
11841 the_target->qxfer_libraries_svr4.
11842 (handle_qxfer_libraries_svr4): New function.
11843 (qxfer_packets): New entry "libraries-svr4".
11844 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
11845 * target.h (struct target_ops): New member qxfer_libraries_svr4.
11846 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
11847 PACKET_qXfer_libraries_svr4.
11848
d6db1fab
UW
118492011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
11850
11851 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
11852 PSW address/mask between 8-byte and 16-byte formats.
11853 (s390_supply_ptrace_register): Likewise.
11854 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
11855 basic addressing mode bit.
11856
242f5f1c
SS
118572011-11-24 Stan Shebs <stan@codesourcery.com>
11858
11859 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
11860
f196051f
SS
118612011-11-17 Stan Shebs <stan@codesourcery.com>
11862
11863 * tracepoint.c (struct tracepoint): New field traceframe_usage.
11864 (tracing_start_time): New global.
11865 (tracing_stop_time): New global.
11866 (tracing_user_name): New global.
11867 (tracing_notes): New global.
11868 (tracing_stop_note): New global.
11869 (cmd_qtstart): Set traceframe_usage, start_time.
11870 (stop_tracing): Set stop_time.
11871 (cmd_qtstatus): Report additional status.
11872 (cmd_qtp): New function.
11873 (handle_tracepoint_query): Call it.
11874 (cmd_qtnotes): New function.
11875 (handle_tracepoint_general_set): Call it.
11876 (get_timestamp): Rename from tsv_get_timestamp.
11877
405f8e94
SS
118782011-11-14 Stan Shebs <stan@codesourcery.com>
11879 Kwok Cheung Yeung <kcy@codesourcery.com>
11880
11881 * linux-x86-low.c (small_jump_insn): New.
11882 (i386_install_fast_tracepoint_jump_pad): Add arguments for
11883 trampoline and error message, build a trampoline and issue a small
11884 jump instruction to it.
11885 (x86_install_fast_tracepoint_jump_pad): Add arguments for
11886 trampoline and error message.
11887 (x86_get_min_fast_tracepoint_insn_len): New.
11888 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
11889 * linux-low.h (struct linux_target_ops): Add arguments to
11890 install_fast_tracepoint_jump_pad operation, add new operation.
11891 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
11892 arguments.
11893 (linux_get_min_fast_tracepoint_insn_len): New function.
11894 (linux_target_op): Add new operation.
11895 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
11896 (gdb_trampoline_buffer_end): Ditto.
11897 (gdb_trampoline_buffer_error): Ditto.
11898 (struct ipa_sym_addresses): Add fields for new IPA variables.
11899 (symbol_list): Add entries for new IPA variables.
11900 (struct tracepoint): Add fields to hold the address range of the
11901 trampoline used by the tracepoint.
11902 (trampoline_buffer_head): New static variable.
11903 (trampoline_buffer_tail): Ditto.
11904 (claim_trampoline_space): New function.
11905 (have_fast_tracepoint_trampoline_buffer): New function.
11906 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
11907 structure.
11908 (install_fast_tracepoint): Ditto, also add error buffer argument.
11909 (cmd_qtminftpilen): New function.
11910 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
11911 (fast_tracepoint_from_trampoline_address): New function.
11912 (fast_tracepoint_collecting): Handle trampoline as part of jump
11913 pad space.
11914 (set_trampoline_buffer_space): New function.
11915 (initialize_tracepoint): Initialize new IPA variables.
11916 * target.h (struct target_ops): Add arguments to
11917 install_fast_tracepoint_jump_pad operation, add new
11918 get_min_fast_tracepoint_insn_len operation.
11919 (target_get_min_fast_tracepoint_insn_len): New.
11920 (install_fast_tracepoint_jump_pad): Add arguments.
11921 * server.h (IPA_BUFSIZ): Define.
11922 * linux-i386-ipa.c: Include extra header files.
11923 (initialize_fast_tracepoint_trampoline_buffer): New function.
11924 (initialize_low_tracepoint): Call it.
11925 * server.h (set_trampoline_buffer_space): Declare.
11926 (claim_trampoline_space): Ditto.
11927 (have_fast_tracepoint_trampoline_buffer): Ditto.
11928
1e4d1764
YQ
119292011-11-14 Yao Qi <yao@codesourcery.com>
11930
11931 * server.c (handle_query): Handle InstallInTrace for qSupported.
11932 * tracepoint.c (add_tracepoint): Sort list.
11933 (install_tracepoint, download_tracepoint): New.
11934 (cmd_qtdp): Call them to install and download tracepoints.
11935 (sort_tracepoints): Removed.
11936 (cmd_qtstart): Update.
11937
5c73ff4e
YQ
119382011-11-14 Yao Qi <yao@codesourcery.com>
11939
11940 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
11941 * mem-break.h: Declare.
11942 * tracepoint.c (cmd_qtstart): Move some code to ...
11943 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
11944 New.
11945 (download_tracepoints): Move some code to ...
11946 (download_tracepoint_1): ... here. New.
11947
86a30030
YQ
119482011-11-08 Yao Qi <yao@codesourcery.com>
11949
11950 * remote-utils.c (relocate_instruction): A comment fix.
11951
8d26e50c
JB
119522011-11-07 Joel Brobecker <brobecker@adacore.com>
11953
11954 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
11955 (i386_dr_low_get_control, i386_dr_low_get_status): Use
11956 dr_status_mirror and dr_control_mirror from debug_reg_state.
11957 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
11958 (i386_initial_stuff): Remove use of deleted globals.
11959 (i386_get_thread_context, i386_set_thread_context,
11960 i386_thread_added): Use dr_status_mirror and dr_control_mirror
11961 from debug_reg_state.
11962
a59306a3
YQ
119632011-11-05 Yao Qi <yao@codesourcery.com>
11964
11965 * tracepoint.c (gdb_collect): Loop over tracepoints of same
11966 address as TPOINT's.
11967
3065dfb6
SS
119682011-11-02 Stan Shebs <stan@codesourcery.com>
11969
11970 * tracepoint.c (agent_mem_read_string): New function.
11971 (eval_agent_expr): Call it for tracenz.
11972 * server.c (handle_query): Report support for tracenz.
11973
fd0d8c7c
YQ
119742011-11-02 Yao Qi <yao@codesourcery.com>
11975
11976 * tracepoint.c (cmd_qtstart): Remove unused local variables.
11977
609086b1
YQ
119782011-11-02 Yao Qi <yao@codesourcery.com>
11979
11980 * target.h: Fix a typo in comment.
11981
b9fd1791
PA
119822011-10-31 Pedro Alves <pedro@codesourcery.com>
11983
11984 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
11985 clobber the breakpoints' shadows with fast tracepoint jumps.
11986 * mem-break.h (check_mem_write): Add `myaddr' parameter.
11987 * target.c (write_inferior_memory): Also pass MYADDR down to
11988 check_mem_write.
11989
03583c20
UW
119902011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
11991
11992 * configure.ac: Check support for personality routine.
11993 * configure: Regenerate.
11994 * config.in: Likewise.
11995 * linux-low.c: Include <sys/personality.h>.
11996 Define ADDR_NO_RANDOMIZE if necessary.
11997 (linux_create_inferior): Disable address space randomization when
11998 forking inferior, if requested.
11999 (linux_supports_disable_randomization): New function.
12000 (linux_target_ops): Install it.
12001 * server.h (disable_randomization): Declare.
12002 * server.c (disable_randomization): New global variable.
12003 (handle_general_set): Handle QDisableRandomization.
12004 (handle_query): Likewise for qSupported.
12005 (main): Support --disable-randomization and --no-disable-randomization
12006 command line arguments.
12007 * target.h (struct target_ops): Add supports_disable_randomization.
12008 (target_supports_disable_randomization): New macro.
12009
723b724b
MF
120102011-09-29 Mike Frysinger <vapier@gentoo.org>
12011
12012 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
12013 ifdef check.
12014 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
12015 [!PT_GETDSBT] (target_loadmap): New definition.
12016 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
12017 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
12018 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
12019 and PT_GETDSBT to LINUX_LOADMAP.
12020 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
12021 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
12022
55329a5c 120232011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
12024
12025 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
12026 (arm_linux_hwbp_cap): New static variable.
12027 (arm_linux_get_hwbp_cap): Replace by ...
12028 (arm_linux_init_hwbp_cap): ... this new function.
12029 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
12030 (arm_linux_get_hw_watchpoint_count): Likewise.
12031 (arm_linux_get_hw_watchpoint_max_length): Likewise.
12032 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
12033 (arm_prepare_to_resume): Use perror_with_name instead of error.
12034
55329a5c 120352011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
12036
12037 * linux-arm-low.c: Include <signal.h>.
12038 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
12039 (struct arm_linux_hwbp_cap): New data type.
12040 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
12041 (struct arm_linux_hw_breakpoint): New data type.
12042 (MAX_BPTS, MAX_WPTS): Define.
12043 (struct arch_process_info, struct arch_lwp_info): New data types.
12044 (arm_linux_get_hwbp_cap): New function.
12045 (arm_linux_get_hw_breakpoint_count): Likewise.
12046 (arm_linux_get_hw_watchpoint_count): Likewise.
12047 (arm_linux_get_hw_watchpoint_max_length): Likewise.
12048 (arm_hwbp_control_initialize): Likewise.
12049 (arm_hwbp_control_is_enabled): Likewise.
12050 (arm_hwbp_control_is_initialized): Likewise.
12051 (arm_hwbp_control_disable): Likewise.
12052 (arm_linux_hw_breakpoint_equal): Likewise.
12053 (arm_linux_hw_point_initialize): Likewise.
12054 (struct update_registers_data): New data structure.
12055 (update_registers_callback: New function.
12056 (arm_insert_point): Likewise.
12057 (arm_remove_point): Likewise.
12058 (arm_stopped_by_watchpoint): Likewise.
12059 (arm_stopped_data_address): Likewise.
12060 (arm_new_process): Likewise.
12061 (arm_new_thread): Likewise.
12062 (arm_prepare_to_resume): Likewise.
12063 (the_low_target): Register arm_insert_point, arm_remove_point,
12064 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
12065 arm_new_thread, and arm_prepare_to_resume.
12066
6b9801d4
SS
120672011-09-15 Stan Shebs <stan@codesourcery.com>
12068
12069 * server.h (struct emit_ops): Add compare-goto fields.
12070 * tracepoint.c (gdb_agent_op_sizes): New table.
12071 (emit_eq_goto): New function.
12072 (emit_ne_goto): New function.
12073 (emit_lt_goto): New function.
12074 (emit_le_goto): New function.
12075 (emit_gt_goto): New function.
12076 (emit_ge_goto): New function.
12077 (is_goto_target): New function.
12078 (compile_bytecodes): Recognize special cases of compare-goto
12079 combinations and call specialized emitters for them.
12080 * linux-x86-low.c (amd64_emit_eq_goto): New function.
12081 (amd64_emit_ne_goto): New function.
12082 (amd64_emit_lt_goto): New function.
12083 (amd64_emit_le_goto): New function.
12084 (amd64_emit_gt_goto): New function.
12085 (amd64_emit_ge_goto): New function.
12086 (amd64_emit_ops): Add the new functions.
12087 (i386_emit_eq_goto): New function.
12088 (i386_emit_ne_goto): New function.
12089 (i386_emit_lt_goto): New function.
12090 (i386_emit_le_goto): New function.
12091 (i386_emit_gt_goto): New function.
12092 (i386_emit_ge_goto): New function.
12093 (i386_emit_ops): Add the new functions.
12094
bf15cbda
SS
120952011-09-08 Stan Shebs <stan@codesourcery.com>
12096
12097 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
12098 (i386_emit_epilogue): Restore %ebx.
12099
943ca1dd
JZ
121002011-08-31 Jie Zhang <jzhang918@gmail.com>
12101
12102 * server.c (step_thread): Remove definition.
12103 (process_serial_event): Don't handle Hs.
12104 * server.h (step_thread): Remove declaration.
12105 * target.c (set_desired_inferior): Remove use of step_thread.
12106
e3deef73
LM
121072011-08-24 Luis Machado <lgustavo@codesourcery.com>
12108
12109 * linux-low.c: Include linux-procfs.h.
12110 (linux_attach_lwp_1): Update comments.
12111 (linux_attach): Scan for existing threads when attaching to a
12112 process that is the tgid.
12113 * Makefile.in: Update dependencies.
12114
13da1c97
LM
121152011-08-24 Luis Machado <lgustavo@codesourcery.com>
12116
12117 * configure.srv: Add linux-procfs.o dependencies.
12118
881127c9
YQ
121192011-08-14 Yao Qi <yao@codesourcery.com>
12120
12121 * target.h (struct target_ops): Fix indent.
12122 * win32-low.c (win32_target_ops): Fix comment.
12123
58dbd541
YQ
121242011-08-14 Andrew Jenner <andrew@codesourcery.com>
12125 Yao Qi <yao@codesourcery.com>
12126
12127 * Makefile.in (clean): Remove tic6x-*.c files.
12128 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
12129 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
12130 (tic6x-c64xp-linux.c): Likewise.
12131 * configure.srv: Add support for tic6x-*-uclinux.
12132 * linux-tic6x-low.c: New.
12133 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
12134
78d85199
YQ
121352011-08-14 Andrew Stubbs <ams@codesourcery.com>
12136 Yao Qi <yao@codesourcery.com>
12137
12138 * target.h (struct target_ops): Add read_loadmap.
12139 * linux-low.c (struct target_loadseg): New type.
12140 (struct target_loadmap): New type.
12141 (linux_read_loadmap): New function.
12142 (linux_target_ops): Add linux_read_loadmap.
12143 * server.c (handle_query): Support qXfer:fdpic:read packet.
43aaf8b6
PA
12144 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
12145 to NULL.
78d85199 12146
a959a88d
EZ
121472011-08-05 Eli Zaretskii <eliz@gnu.org>
12148
12149 * win32-low.c: Include <stdint.h>.
12150
1ced966e
PA
121512011-07-22 Pedro Alves <pedro@codesourcery.com>
12152
12153 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
12154 to the inferior here.
12155 (i386_remove_aligned_watchpoint): Ditto.
12156 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
12157 fit part of the watchpoint in the debug registers.
12158 (i386_update_inferior_debug_regs): New.
12159 (i386_low_insert_watchpoint): Work on a local mirror of the debug
12160 registers, and only update the inferior on success.
12161 (i386_low_remove_watchpoint): Ditto.
12162
d26e3629
KY
121632011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
12164
12165 * linux-low.c (compare_ints, unique, list_threads, show_process,
12166 linux_core_of_thread): Delete.
12167 (linux_target_ops): Change linux_core_of_thread to
12168 linux_common_core_of_thread.
12169 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
12170 * utils.c (malloc_failure): Change type of argument.
12171 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
12172 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
12173 common/linux-osdata.c, common/ptid.c and common/buffer.c.
12174 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
12175 (IPA_OBJS): Add common-utils-ipa.o.
12176 (ptid_h, linux_osdata_h): New macros.
12177 (server_h): Add common/common-utils.h, common/xml-utils.h,
12178 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
12179 common/ptid.h.
12180 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
12181 ptid.o, buffer.o): New rules.
12182 (linux-low.o): Add common/linux-osdata.h as a dependency.
12183 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
12184 * configure.ac: Add AC_HEADER_DIRENT check.
12185 * config.in: Regenerate.
12186 * configure: Regenerate.
12187 * remote-utils.c (xml_escape_text): Delete.
12188 (buffer_grow, buffer_free, buffer_init, buffer_finish,
12189 buffer_xml_printf): Move to common/buffer.c.
12190 * server.c (main): Remove call to initialize_inferiors.
12191 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
12192 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
12193 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
12194 internal_error, gdb_assert, gdb_assert_fail): Delete.
12195 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
12196 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
12197 common/buffer.h.
12198 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
12199 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
12200 initialize_inferiors): Delete.
12201
2275a1a7
PA
122022011-07-20 Pedro Alves <pedro@codesourcery.com>
12203
12204 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
12205 symbol error.
12206
0a5b1e09
PA
122072011-05-31 Pedro Alves <pedro@codesourcery.com>
12208
12209 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
12210 assertion.
12211 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
12212
6938fd34
YQ
122132011-05-26 Yao Qi <yao@codesourcery.com>
12214
12215 * Makefile.in (thread-db.o): Track dependence to
12216 common/gdb_thread_db.h.
12217 * thread-db.c: include gdb_thread_db.h from right place.
12218
b481f9e0
TT
122192011-05-16 Adrian Cornish <gnu@bluedreamer.com>
12220
12221 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
12222 __FILE__ and __LINE__ to internal_error.
12223
98a5dd13
DE
122242011-05-13 Doug Evans <dje@google.com>
12225
12226 * thread-db.c (try_thread_db_load_from_sdir): New function.
12227 (try_thread_db_load_from_dir): New function.
12228 (thread_db_load_search): Handle $sdir, ignore $pdir.
12229 Remove trying of system directories if search of
12230 libthread-db-search-path fails, that is now done via $sdir.
12231
d248b706
KY
122322011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
12233
12234 * server.c (handle_query): Add EnableDisableTracepoints to the list
12235 of supported features.
43aaf8b6 12236 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
d248b706 12237 tracepoints.
43aaf8b6
PA
12238 (cmd_qtenable_disable): New.
12239 (cmd_qtstart): Install tracepoints even if disabled.
12240 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
12241 receiving a QTEnable or QTDisable packet.
12242 (gdb_collect): Skip data collection if fast tracepoint is disabled.
12243 (ust_marker_to_static_tracepoint): Do not ignore disabled static
12244 tracepoints.
12245 (gdb_probe): Skip data collection if static tracepoint is disabled.
d248b706 12246
84e578fb
DE
122472011-05-10 Doug Evans <dje@google.com>
12248
12249 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
12250
71f55dd8
DE
122512011-05-04 Doug Evans <dje@google.com>
12252
12253 * linux-low.c (linux_join): Skip process lookup.
12254 * spu-low.c (spu_join): Ditto.
12255 * server.c (join_inferiors_callback): Delete.
12256 (process_serial_event): For 'D' packet (detach) call join_inferior
12257 directly.
12258
4d393d60
JM
122592011-05-04 Joseph Myers <joseph@codesourcery.com>
12260
12261 * README: Don't mention xscale*-*-linux*.
12262 * configure.srv (xscale*-*-linux*): Don't handle target.
12263
b00ad6ff
NF
122642011-04-27 Nathan Froyd <froydnj@codesourcery.com>
12265
12266 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
12267 casting pointers.
12268 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
12269 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
12270 (i386_emit_void_call_2): Likewise.
12271
af96c192
YQ
122722011-04-26 Yao Qi <yao@codesourcery.com>
12273
43aaf8b6
PA
12274 * linux-low.c: Move common macros to linux-ptrace.h.
12275 Include linux-ptrace.h.
af96c192
YQ
12276 * Makefile.in (linux_ptrace_h): New.
12277 (linux-low.o): Depends on linux-ptrace.h.
12278
03f2bd59
JK
122792011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
12280
12281 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
12282 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
12283 (remote_prepare): New function with most of the TCP code from ...
12284 (remote_open): ... here. Detect PORT here unconditionally. Move also
12285 setting transport_is_reliable.
12286 * server.c (run_once): New variable.
12287 (gdbserver_usage): Document it.
12288 (main): Set run_once for `--once'. Call remote_prepare. Exit after
12289 the first run if RUN_ONCE.
12290 * server.h (run_once, remote_prepare): New declarations.
12291
7a9dd1b2
TT
122922011-04-19 Tom Tromey <tromey@redhat.com>
12293
12294 * win32-low.c (handle_load_dll): Remove duplicate "the".
12295
81239425
PM
122962011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
12297
12298 Remove support for old Cygwin 1.5 versions.
12299 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
12300 function to avoid warning.
12301 (win32_add_one_solib): Use cygwin_conv_path function to avoid
12302 warning.
12303
9e0627f1
PM
123042011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
12305
12306 * gdbserver/server.h (Macro _): Define it if not available.
12307
588eebee
MS
123082011-03-14 Michael Snyder <msnyder@vmware.com>
12309
348af9f7 12310 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 12311
43f70d4c
JB
123122011-03-10 Joel Brobecker <brobecker@adacore.com>
12313
12314 * Makefile.in (maintainer-clean realclean distclean): Remove
12315 "make ... subdir_do" command.
12316
348af9f7
MS
123172011-03-10 Michael Snyder <msnyder@vmware.com>
12318
12319 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
12320
12321 * server.c (handle_v_run): Free alloced buffer on early return.
12322
e637a4f5
YQ
123232011-03-09 Yao Qi <yao@codesourcery.com>
12324
12325 Revert:
12326 2011-03-04 Yao Qi <yao@codesourcery.com>
12327
12328 * Makefile.in: Remove GNU make feature --directory.
12329
12330 2011-03-05 Yao Qi <yao@codesourcery.com>
12331
12332 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
12333 (subdir_do): New make target. Copied from gdb/Makefile.
12334 (maintainer-clean, realclean, distclean, clean): Call corresponding
12335 make targets in common/Makefile.
12336
12337 2011-02-11 Yao Qi <yao@codesourcery.com>
12338
12339 * configure.ac: Call AC_PROG_RANLIB.
12340 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
12341 * configure: Regenerate.
12342
e6edda56
JK
123432011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
12344
12345 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
12346
e5141119
JB
123472011-03-06 Yao Qi <yao@codesourcery.com>
12348
12349 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
12350
64794aa4
JB
123512011-03-05 Yao Qi <yao@codesourcery.com>
12352
12353 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
12354 (subdir_do): New make target. Copied from gdb/Makefile.
12355 (maintainer-clean, realclean, distclean, clean): Call corresponding
12356 make targets in common/Makefile.
12357
7a762829
YQ
123582011-03-04 Yao Qi <yao@codesourcery.com>
12359
12360 * Makefile.in: Remove GNU make feature --directory.
12361
348af9f7
MS
123622011-03-04 Michael Snyder <msnyder@vmware.com>
12363
12364 * server.c (queue_stop_reply): Call xmalloc not malloc.
12365
123662011-03-02 Michael Snyder <msnyder@vmware.com>
12367
12368 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
12369
9f72fee2
MS
123702011-02-28 Michael Snyder <msnyder@vmware.com>
12371
588eebee
MS
12372 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
12373 (cmd_qtframe): Ditto.
12374 (cmd_qtbuffer): Ditto.
12375 (cmd_bigqtbuffer): Ditto.
12376
9f72fee2
MS
12377 * utils.c (decimal2str): Initialize 'width' to nine, then
12378 don't mess with it.
12379
8040bd49
UW
123802011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
12381
12382 * hostio.c (require_data): Free *data, not data.
12383
7e52cbd0
JK
123842011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
12385
12386 * hostio.c (require_data): Use free, not xfree.
12387
9130f83e
MS
123882011-02-27 Michael Snyder <msnyder@vmware.com>
12389
4b812f4e
MS
12390 * server.c (handle_query): Discard unused value.
12391
9130f83e
MS
12392 * hostio.c (require_data): Free malloc memory before returning
12393 error.
12394
69d37113
MS
123952011-02-26 Michael Snyder <msnyder@vmware.com>
12396
12397 * linux-low.c (list_threads): Call closedir for dirent.
12398
35f5825a
MS
123992011-02-27 Michael Snyder <msnyder@vmware.com>
12400
2a589cef
MS
12401 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
12402 a case statement falls through.
12403
0adea5f7
MS
12404 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
12405
35f5825a
MS
12406 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
12407 in comparison.
12408
238f1c74
MS
124092011-02-26 Michael Snyder <msnyder@vmware.com>
12410
12411 * utils.c (decimal2str): Eliminate dead code and dead param.
12412 (pulongest): Drop dead param from call to decimal2str.
12413 (plongest): Ditto.
12414
633ff500
JB
124152011-02-24 Joel Brobecker <brobecker@adacore.com>
12416
12417 Revert the following patch (not approved yet):
12418 2011-02-21 Hui Zhu <teawater@gmail.com>
12419 * tracepoint.c (tp_printf): New function.
12420 (eval_agent_expr): Handle gdb_agent_op_printf.
12421
f9c6ff72
HZ
124222011-02-21 Hui Zhu <teawater@gmail.com>
12423
12424 * tracepoint.c (tp_printf): New function.
12425 (eval_agent_expr): Handle gdb_agent_op_printf.
12426
94d5e490
TT
124272011-02-18 Tom Tromey <tromey@redhat.com>
12428
12429 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
12430 (tracepoint.o): Likewise.
12431 * tracepoint.c (enum gdb_agent_op): Use ax.def.
12432 (gdb_agent_op_names): Likewise.
12433
c7f96d2b
TT
124342011-02-18 Tom Tromey <tromey@redhat.com>
12435
12436 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
12437 gdb_agent_op_rot>: New constants.
12438 (gdb_agent_op_names): Add pick and roll.
12439 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
12440 cases.
12441
0feedb2c
JK
124422011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
12443
12444 * aclocal.m4: Regenerated with aclocal-1.11.1.
12445
b3b9301e
PA
124462011-02-14 Pedro Alves <pedro@codesourcery.com>
12447
12448 * server.c (handle_qxfer_traceframe_info): New.
12449 (qxfer_packets): Register "traceframe-info".
12450 (handle_query): Report support for qXfer:traceframe-info:read+.
12451 * tracepoint.c (match_blocktype): New.
12452 (traceframe_find_block_type): Rename to ...
12453 (traceframe_walk_blocks): ... this. Add callback filter argument,
12454 and use it.
12455 (traceframe_find_block_type): New, reimplemented on top of
12456 traceframe_walk_blocks.
12457 (build_traceframe_info_xml): New.
12458 (traceframe_read_info): New.
12459 * server.h (traceframe_read_info): Declare.
12460
4f3e6fb7
YQ
124612011-02-11 Yao Qi <yao@codesourcery.com>
12462
12463 * configure.ac: Call AC_PROG_RANLIB.
12464 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
12465 * configure: Regenerate.
12466
764880b7
PA
124672011-02-07 Pedro Alves <pedro@codesourcery.com>
12468
12469 * server.c (gdb_read_memory): Change return semantics to allow
12470 partial transfers.
12471 (handle_search_memory_1): Adjust.
12472 (process_serial_event) <'m' packet>: Handle partial transfers.
12473 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
12474
1c79eb8a
PA
124752011-01-28 Pedro Alves <pedro@codesourcery.com>
12476
12477 * regcache.c (init_register_cache): Initialize
12478 regcache->register_status.
12479 (free_register_cache): Release regcache->register_status.
12480 (regcache_cpy): Copy register_status.
12481 (registers_to_string): Print 'x's for unavailable registers.
12482 (supply_register): Mark the register's status valid or
12483 unavailable, depending on whether a buffer was passed in or not.
12484 (supply_register_zeroed): New.
12485 (supply_regblock): Mark the registers' status valid or
12486 unavailable, depending on whether a buffer was passed in or not.
12487 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
12488 (struct regcache): New `register_status' field.
12489 (supply_register_zeroed): Declare.
12490 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
12491 supply_register_zeroed, rather than passing a NULL buffer to
12492 supply_register.
12493 * tracepoint.c (fetch_traceframe_registers): Update comment.
12494
85724a0e
PA
124952011-01-28 Pedro Alves <pedro@codesourcery.com>
12496
12497 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
12498 buffer explicit.
12499
d08aafef
PA
125002011-01-25 Pedro Alves <pedro@codesourcery.com>
12501
12502 * server.h (decode_xfer_write): Change prototype.
12503 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
12504 and don't extract the annex here.
12505 * server.c (decode_xfer_read): Remove `annex' parameter,
12506 and don't extract the annex here.
12507 (decode_xfer): New.
12508 (struct qxfer): New.
12509 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
12510 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
12511 (handle_qxfer_statictrace): New functions, abstracted out from
12512 handle_query, and made to use the struct qxfer interface.
12513 (handle_threads_qxfer_proper): Rename to ...
12514 (handle_qxfer_threads_proper): ... this.
12515 (handle_threads_qxfer): Rename to ...
12516 (handle_qxfer_threads): ... this. Adjust.
12517 (qxfer_packets): New array.
12518 (handle_qxfer): New function.
12519 (handle_query): Use handle_qxfer.
12520
493e2a69
MS
125212011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
12522
12523 * gdbreplay.c: Shorten lines of >= 80 columns.
12524 * linux-low.c: Ditto.
12525 * linux-ppc-low.c: Ditto.
12526 * linux-s390-low.c: Ditto.
12527 * linux-sparc-low.c: Ditto.
12528 * linux-x86-low.c: Ditto.
12529 * linux-xtensa-low.c: Ditto.
12530 * mem-break.c: Ditto.
12531 * nto-low.c: Ditto.
12532 * regcache.h: Ditto.
12533 * remote-utils.c: Ditto.
12534 * server.c: Ditto.
12535 * server.h: Ditto.
12536 * thread-db.c: Ditto.
12537 * tracepoint.c: Ditto.
12538 * utils.c: Ditto.
12539 * win32-low.h: Ditto.
12540
44944448
JB
125412011-01-05 Joel Brobecker <brobecker@adacore.com>
12542
12543 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
12544 update.
12545
71ce852c
JB
125462011-01-01 Joel Brobecker <brobecker@adacore.com>
12547
12548 * server.c (gdbserver_version): Update copyright year in version
12549 output.
12550 * gdbreplay.c (gdbreplay_version): Ditto.
12551
eb826dc6
MF
125522010-12-29 Jie Zhang <jie.zhang@analog.com>
12553
12554 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
12555 * linux-bfin-low.c: New file.
12556 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
12557 PT_DATA_ADDR for BFIN targets.
12558 * Makefile.in (SFILES): Add linux-bfin-low.c.
12559 (clean): Remove reg-bfin.c.
12560 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
12561 * README: Mention supported Blackfin targets.
12562
39ab222a
MF
125632010-12-23 Mike Frysinger <vapier@gentoo.org>
12564
12565 * .gitignore: New file.
12566
a1f2ce7d
MF
125672010-11-16 Mike Frysinger <vapier@gentoo.org>
12568
12569 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
12570
f474844c
JZ
125712010-10-22 Jie Zhang <jie@codesourcery.com>
12572
12573 * Makefile.in: Add FLAGS_TO_PASS variable.
12574 (install): Remove dependency of install-only and recursively
12575 invoke make for install-only.
12576
f1048712
DE
125772010-10-04 Doug Evans <dje@google.com>
12578
12579 * Makefile.in (uninstall): Use $(DESTDIR).
12580
b53a1623
PA
125812010-09-24 Pedro Alves <pedro@codesourcery.com>
12582
e6ee044d
PA
12583 PR gdb/11842
12584
b53a1623
PA
12585 * linux-x86-low.c (compat_siginfo_from_siginfo)
12586 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
12587 si_code is < 0. Check for si_code == SI_TIMER before checking for
12588 si_code < 0.
12589
fa1bd1e4
JB
125902010-09-13 Joel Brobecker <brobecker@adacore.com>
12591
12592 * lynx-i386-low.c: New file.
12593 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
12594
47fac8f8
JB
125952010-09-13 Joel Brobecker <brobecker@adacore.com>
12596
12597 * lynx-low.c (ptrace_request_to_str): Remove handling for
12598 request values that have been removed in LynxOS 5.x.
12599
1adfc54d
JB
126002010-09-13 Joel Brobecker <brobecker@adacore.com>
12601
12602 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
12603 <ptrace.h>
12604
c2a66c29
NS
126052010-09-09 Nathan Sidwell <nathan@codesourcery.com>
12606
12607 * configure.ac: Add --enable-inprocess-agent option.
12608 * configure: Rebuilt.
12609
32fcada3
YQ
126102010-09-06 Yao Qi <yao@codesourcery.com>
12611
12612 * linux-low.c (linux_kill): Remove unused variable.
12613 (linux_stabilize_threads): Likewise.
12614 * server.c (start_inferior): Likewise.
12615 (queue_stop_reply_callback): Likewise.
12616 * tracepoint.c (do_action_at_tracepoint): Likewise.
12617
0cccb683
YQ
126182010-09-06 Yao Qi <yao@codesourcery.com>
12619
12620 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
12621 on return.
12622
423ec54c
JK
126232010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
12624
12625 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
12626
12ac6819
PA
126272010-09-06 Pedro Alves <pedro@codesourcery.com>
12628
12629 * Makefile.in (install-only): Replace $IPA_DEPFILES with
12630 "$(IPA_DEPFILES)".
12631
8ed54b31
JB
126322010-09-01 Joel Brobecker <brobecker@adacore.com>
12633
12634 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
12635 gdbserver/lynx-ppc-low.c: New files.
12636 * Makefile.in (lynx_low_h): New variable.
12637 (lynx-low.o, lynx-ppc-low.o): New rules.
12638 * configure.ac: On LynxOS, link with -lnetinet.
12639 * configure.srv: Add handling of powerpc-*-lynxos* targets.
12640 * configure: regenerate.
12641
bb0116a4
JB
126422010-09-01 Joel Brobecker <brobecker@adacore.com>
12643
12644 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
12645 * configure.ac: Add check for vasprintf and vsnprintf.
12646 * configure, config.in: Regenerate.
12647 * server.h (vasprintf, vsnprintf): Add conditional declarations.
12648
a778ab81 126492010-09-01 Joel Brobecker <brobecker@adacore.com>
12650
12651 * gdbreplay.c: Move include of alloca.h up, next to include of
12652 malloc.h.
12653 * server.h: Add include of malloc.h.
12654 * mem-break.c: Remove include of malloc.h.
12655 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
12656
8b034a19 126572010-09-01 Joel Brobecker <brobecker@adacore.com>
12658
12659 * Makefile.in (memmem.o): Build with -Wno-error.
12660
126612010-09-01 Joel Brobecker <brobecker@adacore.com>
12662
12663 * utils.c (xsnprintf): Make non-static.
12664 * server.h: Add xsnprintf declaration.
12665 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
12666 replace calls to snprintf by calls to xsnprintf throughout.
12667
126682010-09-01 Joel Brobecker <brobecker@adacore.com>
12669
12670 * configure.ac: Add configure check for alloca.
12671 * configure, config.in: Regenerate.
12672 * server.h: Include alloca.h if it exists.
12673 * gdbreplay.c: Include alloca.h if it exists.
12674
1a981360
PA
126752010-08-28 Pedro Alves <pedro@codesourcery.com>
12676
12677 * linux-low.c (__SIGRTMIN): Define if not already defined.
12678 (linux_create_inferior): Check for __ANDROID__ rather than
12679 __SIGRTMIN.
12680 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
12681 are already deferred.
12682 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
12683 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
12684 stopped and already has a pending signal to report.
12685 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
12686 a pending signal to report or is moving out of a jump pad.
12687 (linux_init_signals): Check for __ANDROID__ rather than
12688 __SIGRTMIN.
12689
b4d51a55
PA
126902010-08-28 Pedro Alves <pedro@codesourcery.com>
12691
12692 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
12693 debug_threads check. Avoid a linear search when not doing debug
12694 output.
12695
ec48365d
PA
126962010-08-27 Pedro Alves <pedro@codesourcery.com>
12697
12698 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
12699 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
12700 (struct file_handler) <fd>: Change type to gdb_fildes_t.
12701 (process_event): Change local fd's type to gdb_fildes_t.
12702 (create_file_handler): Adjust prototype.
12703 (delete_file_handler): Adjust prototype.
12704 (handle_file_event): Adjust prototype. Use pfildes.
12705 (create_file_event): Adjsut prototype.
12706 * remote-utils.c (remote_desc, listen_desc): Change type to
12707 gdb_fildes_t.
12708 * server.h: New gdb_fildes_t typedef.
12709 [USE_WIN32API]: Include winsock2.h.
12710 (delete_file_handler, add_file_handler): Adjust prototypes.
12711 (pfildes): Declare.
12712 * utils.c (pfildes): New.
12713
854d88f0
PA
127142010-08-27 Pedro Alves <pedro@codesourcery.com>
12715
12716 * configure.ac (build_warnings): Add -Wno-char-subscripts.
12717 * configure: Regenerate.
12718
0146f85b
PA
127192010-08-27 Pedro Alves <pedro@codesourcery.com>
12720
12721 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
12722 (linux_done_accessing_memory): ... this.
12723 (linux_target_ops): Adjust.
12724 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
12725 * nto-low.c (nto_target_ops): Adjust comment.
12726 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
12727 * spu-low.c (spu_target_ops): Adjust comment.
12728 * target.h (target_ops): Rename unprepare_to_access_memory field
12729 to done_accessing_memory.
12730 (unprepare_to_access_memory): Rename to ...
12731 (done_accessing_memory): ... this.
12732
90d74c30
PA
127332010-08-26 Pedro Alves <pedro@codesourcery.com>
12734
12735 * linux-low.c (linux_prepare_to_access_memory): New.
12736 (linux_unprepare_to_access_memory): New.
12737 (linux_target_ops): Install them.
12738 * server.c (read_memory): Rename to ...
12739 (gdb_read_memory): ... this. Use
12740 prepare_to_access_memory/prepare_to_access_memory.
12741 (write_memory): Rename to ...
12742 (gdb_write_memory): ... this. Use
12743 prepare_to_access_memory/prepare_to_access_memory.
12744 (handle_search_memory_1): Adjust.
12745 (process_serial_event): Adjust.
12746 * target.h (struct target_ops): New fields
12747 prepare_to_access_memory and unprepare_to_access_memory.
12748 (prepare_to_access_memory, unprepare_to_access_memory): New.
12749 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
12750 prepare_to_access_memory/prepare_to_access_memory.
12751 * nto-low.c (nto_target_ops): Adjust.
12752 * spu-low.c (spu_target_ops): Adjust.
12753 * win32-low.c (win32_target_ops): Adjust.
12754
fd467969
PA
127552010-08-26 Pedro Alves <pedro@codesourcery.com>
12756
12757 * Makefile.in (WARN_CFLAGS): Get it from configure.
12758 (WERROR_CFLAGS): New.
12759 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
12760 * configure.ac: Introduce --enable-werror, which adds -Werror to
12761 the compiler command line. Enabled by default. Disable with
12762 --disable-werror. Add -Wdeclaration-after-statement
12763 Wpointer-arith and -Wformat-nonliteral to warning flags.
12764 * configure: Regenerate.
12765
331e2f5f
PA
127662010-08-26 Pedro Alves <pedro@codesourcery.com>
12767
12768 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
12769
e581f2b4
PA
127702010-08-26 Pedro Alves <pedro@codesourcery.com>
12771
12772 * gdbreplay.c (remote_error): New.
12773 (gdbchar): New.
12774 (expect): Use gdbchar. Check for error reading from GDB.
12775 Clarify sync error output.
12776 (play): Check for errors writing to GDB.
12777 * linux-low.c (sigchld_handler): Really ignore `write' errors.
12778 * remote-utils.c (getpkt): Check for errors writing to the remote
12779 descriptor.
12780
3c11dd79
PA
127812010-08-25 Pedro Alves <pedro@codesourcery.com>
12782
12783 * linux-low.c (linux_wait_1): Move non-debugging code out of
12784 `debug_threads' control.
12785
d20a8ad9
PA
127862010-08-25 Pedro Alves <pedro@codesourcery.com>
12787
12788 * linux-low.c (linux_wait_1): Don't set last_status here.
12789 * server.c (push_event, queue_stop_reply_callback): Assert we're
12790 not pushing a TARGET_WAITKIND_IGNORE event.
12791 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
12792 (myresume, handle_target_event): Set the thread's last_resume_kind
12793 and last_status from the target returned status.
12794
964e4306
PA
127952010-08-25 Pedro Alves <pedro@codesourcery.com>
12796
12797 PR threads/10729
12798
12799 * linux-x86-low.c (update_debug_registers_callback): New.
12800 (i386_dr_low_set_addr): Use it.
12801 (i386_dr_low_get_addr): New.
12802 (i386_dr_low_set_control): Use update_debug_registers_callback.
12803 (i386_dr_low_get_control): New.
12804 (i386_dr_low_get_status): Adjust.
12805 * linux-low.c (linux_stop_lwp): New.
12806 * linux-low.h (linux_stop_lwp): Declare.
12807
12808 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
12809 argument instead of a i386_debug_reg_state.
12810 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
12811 a i386_debug_reg_state.
12812 (i386_insert_aligned_watchpoint): Adjust.
12813 (i386_remove_aligned_watchpoint): Adjust.
12814 (i386_low_stopped_data_address): Read the debug registers from the
12815 inferior instead of from the mirrors.
12816 * i386-low.h (struct i386_debug_reg_state): Extend comment.
12817 (i386_dr_low_get_addr): Declare.
12818 (i386_dr_low_get_control): Declare.
12819 (i386_dr_low_get_status): Change prototype.
12820
12821 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
12822 (i386_dr_low_get_addr): New.
12823 (i386_dr_low_get_control): New.
12824 (i386_dr_low_get_status): Adjust prototype. Return
12825 dr_status_mirror.
12826 (i386_initial_stuff): Clear dr_status_mirror and
12827 dr_control_mirror.
12828 (i386_get_thread_context): Adjust.
12829 (i386_set_thread_context): Adjust.
12830 (i386_thread_added): Adjust.
12831
5f21a75b
PA
128322010-08-24 Pedro Alves <pedro@codesourcery.com>
12833
12834 * linux-low.h (linux_thread_area): Delete declaration.
12835
3e4c1235
TS
128362010-08-11 Thomas Schwinge <thomas@codesourcery.com>
12837
12838 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
12839 after its termination.
12840
1971b033
PA
128412010-08-09 Pedro Alves <pedro@codesourcery.com>
12842
12843 * linux-low.c (gdb_wants_lwp_stopped): Delete.
12844 (gdb_wants_all_stopped): Delete.
12845 (linux_wait_1): Don't call them.
12846 * server.c (handle_v_cont): Tag all threads as want-stopped.
12847 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
12848 stopped as "client-wants-stopped".
12849
310444ac
PA
128502010-07-31 Pedro Alves <pedro@codesourcery.com>
12851
12852 * Makefile.in (signals_h): New.
12853 (server_h): Depend on it.
12854 (server.o): Don't depend on $(signals_def).
12855 (signals.o): Depend on $(signals_def).
12856
a19cae16
JK
128572010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
12858
12859 * Makefile.in (signals_def): New.
12860 (server_h): Append include/gdb/signals.h and signals_def.
12861 (server.o): Append signals_def.
12862
30d50328
JK
128632010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
12864
12865 * server.c (handle_target_event): Use target_signal_to_host for
12866 resume_info.sig initialization.
12867 * target.h (struct thread_resume) <sig>: New comment.
12868
5c3216e2
OS
128692010-07-20 Ozkan Sezer <sezeroz@gmail.com>
12870
c6f46ca0
OS
12871 * server.c (handle_query): strcpy() the returned string from paddress()
12872 instead of sprintf().
5c3216e2
OS
12873 * utils.c (paddress): Return phex_nz().
12874
6bd31874
JB
128752010-07-07 Joel Brobecker <brobecker@adacore.com>
12876
12877 * server.c (handle_v_cont): Call mourn_inferior if process
12878 just exited.
12879 (myresume): Likewise.
12880
0fb4aa4b
PA
128812010-07-01 Pedro Alves <pedro@codesourcery.com>
12882
12883 Static tracepoints, and integration with UST.
12884
12885 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
12886 * mem-break.c (uninsert_all_breakpoints)
12887 (reinsert_all_breakpoints): New.
12888 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
12889 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
12890 (gdb_agent_ust_loaded, helper_thread_id)
12891 (gdb_agent_helper_thread_id): New macros.
12892 (struct ipa_sym_addresses): Add addr_ust_loaded,
12893 addr_helper_thread_id, addr_cmd_buf.
12894 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
12895 (in_process_agent_loaded_ust): New.
12896 (write_e_ust_not_loaded): New.
12897 (maybe_write_ipa_ust_not_loaded): New.
12898 (struct collect_static_trace_data_action): New.
12899 (enum tracepoint_type) <static_tracepoint>: New.
12900 (struct tracepoint) <handle>: Mention static tracepoints.
12901 (struct static_tracepoint_ctx): New.
12902 (CMD_BUF_SIZE): New.
12903 (add_tracepoint_action): Handle static tracepoint actions.
12904 (unprobe_marker_at): New.
12905 (clear_installed_tracepoints): Handle static tracepoints.
12906 (cmd_qtdp): Handle static tracepoints.
12907 (probe_marker_at): New.
12908 (cmd_qtstart): Handle static tracepoints.
12909 (response_tracepoint): Handle static tracepoints.
12910 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
12911 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
12912 (get_context_regcache): Handle static tracepoints.
12913 (do_action_at_tracepoint): Handle static tracepoint actions.
12914 (traceframe_find_block_type): Handle static trace data blocks.
12915 (traceframe_read_sdata): New.
12916 (download_tracepoints): Download static tracepoint actions.
12917 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
12918 (GDB_PROBE_NAME): New.
12919 (ust_ops): New.
12920 (GET_UST_SYM): New.
12921 (USTF): New.
12922 (dlsym_ust): New.
12923 (ust_marker_to_static_tracepoint): New.
12924 (gdb_probe): New.
12925 (collect_ust_data_at_tracepoint): New.
12926 (gdb_ust_probe): New.
12927 (UNIX_PATH_MAX, SOCK_DIR): New.
12928 (gdb_ust_connect_sync_socket): New.
12929 (resume_thread, stop_thread): New.
12930 (run_inferior_command): New.
12931 (init_named_socket): New.
12932 (gdb_ust_socket_init): New.
12933 (cstr_to_hexstr): New.
12934 (next_st): New.
12935 (first_marker, next_marker): New.
12936 (response_ust_marker): New.
12937 (cmd_qtfstm, cmd_qtsstm): New.
12938 (unprobe_marker_at, probe_marker_at): New.
12939 (cmd_qtstmat, gdb_ust_thread): New.
12940 (gdb_ust_init): New.
12941 (initialize_tracepoint_ftlib): Call gdb_ust_init.
12942 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
12943 (ST_REGENTRY): New.
12944 (x86_64_st_collect_regmap): New.
12945 (X86_64_NUM_ST_COLLECT_GREGS): New.
12946 (AMD64_RIP_REGNUM): New.
12947 (supply_static_tracepoint_registers): New.
12948 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
12949 (ST_REGENTRY): New.
12950 (i386_st_collect_regmap): New.
12951 (i386_NUM_ST_COLLECT_GREGS): New.
12952 (supply_static_tracepoint_registers): New.
12953 * server.c (handle_query): Handle qXfer:statictrace:read.
12954 <qSupported>: Report support for StaticTracepoints, and
12955 qXfer:statictrace:read features.
12956 * server.h (traceframe_read_sdata)
12957 (supply_static_tracepoint_registers): Declare.
12958 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
12959 (unpack_varlen_hex): Include in IPA build.
12960 * Makefile.in (ustlibs, ustinc): New.
12961 (IPA_OBJS): Add remote-utils-ipa.o.
12962 ($(IPA_LIB)): Link -ldl and -lpthread.
12963 (UST_CFLAGS): New.
12964 (IPAGENT_CFLAGS): Add UST_CFLAGS.
12965 * config.in, configure: Regenerate.
12966
9e4344e5
PA
129672010-06-20 Ian Lance Taylor <iant@google.com>
12968 Pedro Alves <pedro@codesourcery.com>
12969
12970 * linux-x86-low.c (always_true): Delete.
12971 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
12972 trying to fool the compiler with always_true.
12973
c6beb2cb
PA
129742010-06-20 Pedro Alves <pedro@codesourcery.com>
12975
12976 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
12977 conditions in gdbserver.
12978
d2ed6730
UW
129792010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
12980
12981 * spu-low.c (spu_read_memory): Wrap around local store limit.
12982 (spu_write_memory): Likewise.
12983
4e29fb54
PA
129842010-06-15 Pedro Alves <pedro@codesourcery.com>
12985
12986 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
12987 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
12988 LONGEST uses.
12989 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
12990 uses.
12991 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
12992 uses with LONGEST uses.
12993
6a271cae
PA
129942010-06-14 Stan Shebs <stan@codesourcery.com>
12995 Pedro Alves <pedro@codesourcery.com>
12996
12997 Bytecode compiler.
12998
12999 * linux-x86-low.c: Include limits.h.
13000 (add_insns): New.
13001 (always_true): New.
13002 (EMIT_ASM): New.
13003 (EMIT_ASM32): New.
13004 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
13005 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
13006 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
13007 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
13008 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
13009 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
13010 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
13011 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
13012 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
13013 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
13014 (amd64_emit_void_call_2): New.
13015 (amd64_emit_ops): New.
13016 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
13017 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
13018 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
13019 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
13020 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
13021 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
13022 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
13023 (i386_emit_call, i386_emit_reg, i386_emit_pop)
13024 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
13025 (i386_emit_stack_adjust, i386_emit_int_call_1)
13026 (i386_emit_void_call_2): New.
13027 (i386_emit_ops): New.
13028 (x86_emit_ops): New.
13029 (the_low_target): Install x86_emit_ops.
13030 * server.h (struct emit_ops): New.
13031 (get_raw_reg_func_addr): Declare.
13032 (current_insn_ptr, emit_error): Declare.
13033 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
13034 (set_trace_state_variable_value): New defines.
13035 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
13036 addr_get_trace_state_variable_value and
13037 addr_set_trace_state_variable_value.
13038 (symbol_list): New fields for get_raw_reg,
13039 get_trace_state_variable_value and set_trace_state_variable_value.
13040 (condfn): New typedef.
13041 (struct tracepoint): New field `compiled_cond'.
13042 (do_action_at_tracepoint): Clear compiled_cond.
13043 (get_trace_state_variable_value, set_trace_state_variable_value):
13044 Export in the IPA.
13045 (condition_true_at_tracepoint): If there's a compiled condition,
13046 run that.
13047 (current_insn_ptr, emit_error): New globals.
13048 (struct bytecode_address): New.
13049 (get_raw_reg_func_addr): New.
13050 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
13051 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
13052 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
13053 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
13054 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
13055 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
13056 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
13057 (compile_tracepoint_condition, compile_bytecodes): New.
13058 * target.h (emit_ops): Forward declare.
13059 (struct target_ops): New field emit_ops.
13060 (target_emit_ops): New.
13061 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
13062 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
13063 * linux-low.c (linux_emit_ops): New.
13064 (linux_target_ops): Install it.
13065 * linux-low.h (struct linux_target_ops): New field emit_ops.
13066
92b72907
UW
130672010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
13068
13069 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
13070 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
13071
fa593d66
PA
130722010-06-01 Pedro Alves <pedro@codesourcery.com>
13073 Stan Shebs <stan@codesourcery.com>
13074
13075 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
13076 (all): Depend on $(extra_libraries).
13077 (install-only): Install the IPA.
13078 (IPA_OBJS, IPA_LIB): New.
13079 (clean): Remove the IPA lib.
13080 (IPAGENT_CFLAGS): New.
13081 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
13082 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
13083 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
13084 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
13085 * configure.ac: Check for atomic builtins support in the compiler.
13086 (IPA_DEPFILES, extra_libraries): Define.
13087 * configure.srv (ipa_obj): Add description.
13088 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
13089 (i[34567]86-*-linux*): Set ipa_obj.
13090 (x86_64-*-linux*): Set ipa_obj.
13091 * linux-low.c (stabilizing_threads): New.
13092 (supports_fast_tracepoints): New.
13093 (linux_detach): Stabilize threads before detaching.
13094 (handle_tracepoints): Handle internal tracing breakpoints. Assert
13095 the lwp is either not stabilizing, or is moving out of a jump pad.
13096 (linux_fast_tracepoint_collecting): New.
13097 (maybe_move_out_of_jump_pad): New.
13098 (enqueue_one_deferred_signal): New.
13099 (dequeue_one_deferred_signal): New.
13100 (linux_wait_for_event_1): If moving out of a jump pad, defer
13101 pending signals to later.
13102 (linux_stabilize_threads): New.
13103 (linux_wait_1): Check if threads need moving out of jump pads, and
13104 do it if so.
13105 (stuck_in_jump_pad_callback): New.
13106 (move_out_of_jump_pad_callback): New.
13107 (lwp_running): New.
13108 (linux_resume_one_lwp): Handle moving out of jump pads.
13109 (linux_set_resume_request): Dequeue deferred signals.
13110 (need_step_over_p): Also step over fast tracepoint jumps.
13111 (start_step_over): Also uninsert fast tracepoint jumps.
13112 (finish_step_over): Also reinsert fast tracepoint jumps.
13113 (linux_install_fast_tracepoint_jump): New.
13114 (linux_target_ops): Install linux_stabilize_threads and
13115 linux_install_fast_tracepoint_jump_pad.
13116 * linux-low.h (linux_target_ops) <get_thread_area,
13117 install_fast_tracepoint_jump_pad>: New fields.
13118 (struct lwp_info) <collecting_fast_tracepoint,
13119 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
13120 (linux_get_thread_area): Declare.
13121 * linux-x86-low.c (jump_insn): New.
13122 (x86_get_thread_area): New.
13123 (append_insns): New.
13124 (push_opcode): New.
13125 (amd64_install_fast_tracepoint_jump_pad): New.
13126 (i386_install_fast_tracepoint_jump_pad): New.
13127 (x86_install_fast_tracepoint_jump_pad): New.
13128 (the_low_target): Install x86_get_thread_area and
13129 x86_install_fast_tracepoint_jump_pad.
13130 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
13131 (struct fast_tracepoint_jump): New.
13132 (fast_tracepoint_jump_insn): New.
13133 (fast_tracepoint_jump_shadow): New.
13134 (find_fast_tracepoint_jump_at): New.
13135 (fast_tracepoint_jump_here): New.
13136 (delete_fast_tracepoint_jump): New.
13137 (set_fast_tracepoint_jump): New.
13138 (uninsert_fast_tracepoint_jumps_at): New.
13139 (reinsert_fast_tracepoint_jumps_at): New.
13140 (set_breakpoint_at): Use write_inferior_memory.
13141 (uninsert_raw_breakpoint): Use write_inferior_memory.
13142 (check_mem_read): Mask out fast tracepoint jumps.
13143 (check_mem_write): Mask out fast tracepoint jumps.
13144 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
13145 (set_fast_tracepoint_jump): Declare.
13146 (delete_fast_tracepoint_jump)
13147 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
13148 (reinsert_fast_tracepoint_jumps_at): Declare.
13149 * regcache.c: Don't compile many functions when building the
13150 in-process agent library.
13151 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
13152 the register buffer in the heap.
13153 (free_register_cache): If the register buffer isn't owned by the
13154 regcache, don't free it.
13155 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
13156 pre-existing register caches.
13157 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
13158 type.
13159 (convert_ascii_to_int): : Constify `from' parameter type.
13160 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
13161 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
13162 the needed buffer in-place.
13163 (relocate_instruction): New.
13164 * server.c (handle_query) <qSymbols>: If the target supports
13165 tracepoints, give it a chance of looking up symbols. Report
13166 support for fast tracepoints.
13167 (handle_status): Stabilize threads.
13168 (process_serial_event): Adjust.
13169 * server.h (struct fast_tracepoint_jump): Forward declare.
13170 (struct process_info) <fast_tracepoint_jumps>: New field.
13171 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
13172 (decode_X_packet, decode_M_packet): Adjust.
13173 (relocate_instruction): Declare.
13174 (in_process_agent_loaded): Declare.
13175 (tracepoint_look_up_symbols): Declare.
13176 (struct fast_tpoint_collect_status): Declare.
13177 (fast_tracepoint_collecting): Declare.
13178 (force_unlock_trace_buffer): Declare.
13179 (handle_tracepoint_bkpts): Declare.
13180 (initialize_low_tracepoint)
13181 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
13182 * target.h (struct target_ops) <stabilize_threads,
13183 install_fast_tracepoint_jump_pad>: New fields.
13184 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
13185 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
13186 [HAVE_STDINT_H]: Include stdint.h.
13187 (trace_debug_1): Rename to ...
13188 (trace_vdebug): ... this.
13189 (trace_debug): Rename to ...
13190 (trace_debug_1): ... this. Add `level' parameter.
13191 (trace_debug): New.
13192 (ATTR_USED, ATTR_NOINLINE): New.
13193 (IP_AGENT_EXPORT): New.
13194 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
13195 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
13196 (about_to_request_buffer_space, trace_buffer_is_full)
13197 (stopping_tracepoint, expr_eval_result, error_tracepoint)
13198 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
13199 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
13200 (traceframe_write_count, traceframes_created)
13201 (trace_state_variables)
13202 New renaming defines.
13203 (struct ipa_sym_addresses): New.
13204 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
13205 (symbol_list): New.
13206 (ipa_sym_addrs): New.
13207 (all_tracepoint_symbols_looked_up): New.
13208 (in_process_agent_loaded): New.
13209 (write_e_ipa_not_loaded): New.
13210 (maybe_write_ipa_not_loaded): New.
13211 (tracepoint_look_up_symbols): New.
13212 (debug_threads) [IN_PROCESS_AGENT]: New.
13213 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
13214 (UNKNOWN_SIDE_EFFECTS): New.
13215 (stop_tracing): New.
13216 (flush_trace_buffer): New.
13217 (stop_tracing_bkpt): New.
13218 (flush_trace_buffer_bkpt): New.
13219 (read_inferior_integer): New.
13220 (read_inferior_uinteger): New.
13221 (read_inferior_data_pointer): New.
13222 (write_inferior_data_pointer): New.
13223 (write_inferior_integer): New.
13224 (write_inferior_uinteger): New.
13225 (struct collect_static_trace_data_action): Delete.
13226 (enum tracepoint_type): New.
13227 (struct tracepoint) <type>: New field `type'.
43aaf8b6
PA
13228 <actions_str, step_actions, step_actions_str>: Only include in
13229 GDBserver.
fa593d66
PA
13230 <orig_size, obj_addr_on_target, adjusted_insn_addr>
13231 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
13232 (tracepoints): Use IP_AGENT_EXPORT.
13233 (last_tracepoint): Don't include in the IPA.
13234 (stopping_tracepoint): Use IP_AGENT_EXPORT.
13235 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
13236 (alloced_trace_state_variables): New.
13237 (trace_state_variables): Use IP_AGENT_EXPORT.
13238 (traceframe_t): Delete unused variable.
13239 (circular_trace_buffer): Don't include in the IPA.
13240 (trace_buffer_start): Delete.
13241 (struct trace_buffer_control): New.
13242 (trace_buffer_free): Delete.
13243 (struct ipa_trace_buffer_control): New.
13244 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
13245 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
13246 New.
13247 (trace_buffer_ctrl): New.
13248 (TRACE_BUFFER_CTRL_CURR): New.
13249 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
13250 Reimplement as macros.
13251 (trace_buffer_wrap): Delete.
13252 (traceframe_write_count, traceframe_read_count)
13253 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
13254 (struct tracepoint_hit_ctx) <type>: New field.
13255 (struct fast_tracepoint_ctx): New.
13256 (memory_barrier): New.
13257 (cmpxchg): New.
13258 (record_tracepoint_error): Update atomically in the IPA.
13259 (clear_inferior_trace_buffer): New.
13260 (about_to_request_buffer_space): New.
13261 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
13262 updating the same buffer.
13263 (add_tracepoint): Default the tracepoint's type to trap
13264 tracepoint, and orig_size to -1.
13265 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
13266 internal variables.
13267 (create_trace_state_variable): New parameter `gdb'. Handle it.
13268 (clear_installed_tracepoints): Clear fast tracepoint jumps.
13269 (cmd_qtdp): Handle fast tracepoints.
13270 (cmd_qtdv): Adjust.
13271 (max_jump_pad_size): New.
13272 (gdb_jump_pad_head): New.
13273 (get_jump_space_head): New.
13274 (claim_jump_space): New.
13275 (sort_tracepoints): New.
13276 (MAX_JUMP_SIZE): New.
13277 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
13278 IPA.
13279 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
13280 support. Upload fast traceframes, and delete internal IPA
13281 breakpoints.
13282 (stop_tracing_handler): New.
13283 (flush_trace_buffer_handler): New.
13284 (cmd_qtstop): Upload fast tracepoints.
13285 (response_tracepoint): Handle fast tracepoints.
13286 (tracepoint_finished_step): Upload fast traceframes. Set the
13287 tracepoint hit context's tracepoint type.
13288 (handle_tracepoint_bkpts): New.
13289 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
13290 type. Add comment about fast tracepoints.
13291 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
13292 non-existing action_str field.
13293 (get_context_regcache): Handle fast tracepoints.
13294 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
13295 to the regcache.
13296 (fast_tracepoint_from_jump_pad_address): New.
13297 (fast_tracepoint_from_ipa_tpoint_address): New.
13298 (collecting_t): New.
13299 (force_unlock_trace_buffer): New.
13300 (fast_tracepoint_collecting): New.
13301 (collecting): New.
13302 (gdb_collect): New.
13303 (write_inferior_data_ptr): New.
13304 (target_tp_heap): New.
13305 (target_malloc): New.
13306 (download_agent_expr): New.
13307 (UALIGN): New.
13308 (download_tracepoints): New.
13309 (download_trace_state_variables): New.
13310 (upload_fast_traceframes): New.
13311 (IPA_FIRST_TRACEFRAME): New.
13312 (IPA_NEXT_TRACEFRAME_1): New.
13313 (IPA_NEXT_TRACEFRAME): New.
13314 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
13315 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
13316 (gdb_jump_pad_buffer_end): New.
13317 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
13318 (initialize_tracepoint): Adjust.
13319 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
13320 buffer. Initialize the low module.
13321 * utils.c (PREFIX, TOOLNAME): New.
13322 (malloc_failure): Use PREFIX.
13323 (error): In the IPA, an error causes an exit.
13324 (fatal, warning): Use PREFIX.
13325 (internal_error): Use TOOLNAME.
13326 (NUMCELLS): Increase to 10.
13327 * configure, config.in: Regenerate.
13328
d149dd1d
PA
133292010-06-01 Pedro Alves <pedro@codesourcery.com>
13330
13331 * server.c (handle_query) <qSupported>: Do two passes over the
13332 qSupported string to avoid nesting strtok.
13333
f6528abd
JK
133342010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
13335
13336 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
13337 (CDEPS): New.
13338 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
13339 -Wl,--dynamic-list.
13340 * configure: Regenerate.
13341 * proc-service.list: New.
13342
ca2a87a0
JK
133432010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
13344
13345 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
13346 New comment.
13347
363a6e9f
OS
133482010-05-26 Ozkan Sezer <sezeroz@gmail.com>
13349
13350 * gdbreplay.c (remote_open): Check error return from socket() call by
13351 its equality to -1 not by it being negative.
13352 * remote-utils.c (remote_open): Likewise.
13353
d23b6cb1
PA
133542010-05-23 Pedro Alves <pedro@codesourcery.com>
13355
13356 * config.h: Regenerate.
13357
28d3cf85
MK
133582010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
13359
13360 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
13361 doesn't provide PTRACE_GET_THREAD_AREA.
13362
fea36a59
MK
133632010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
13364
13365 * linux-m68k-low.c: Include <asm/ptrace.h>
13366 (ps_get_thread_area): Implement.
13367
24b066ba
DE
133682010-05-03 Doug Evans <dje@google.com>
13369
13370 * event-loop.c (struct callback_event): New struct.
13371 (callback_list): New global.
13372 (append_callback_event, delete_callback_event): New functions.
13373 (process_callback): New function.
13374 (start_event_loop): Call it.
13375 * remote-utils.c (NOT_SCHEDULED): Define.
13376 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
13377 moved out of readchar.
13378 (readchar): Rewrite. Call reschedule before returning.
13379 (reset_readchar): New function.
13380 (remote_close): Call it.
13381 (process_remaining, reschedule): New functions.
13382 * server.h (callback_handler_func): New typedef.
13383 (append_callback_event, delete_callback_event): Declare.
13384
9836d6ea
PA
133852010-05-03 Pedro Alves <pedro@codesourcery.com>
13386
13387 * proc-service.c (ps_pglobal_lookup): Use
13388 thread_db_look_up_one_symbol.
13389 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
13390 parameter. Use it instead of all_symbols_looked_up.
13391 * server.h (struct process_info) <all_symbols_looked_up>: Delete
13392 field.
13393 (all_symbols_looked_up): Don't declare.
13394 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
13395 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
13396 field.
13397 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
13398 Set all_symbols_looked_up here.
13399 (thread_db_look_up_one_symbol): New.
13400 (thread_db_get_tls_address): Adjust.
13401 (thread_db_load_search, try_thread_db_load_1): Always allocate the
13402 thread_db object on the heap, and tentatively set it in the
13403 process structure.
13404 (thread_db_init): Don't set all_symbols_looked_up here.
13405 * linux-low.h (thread_db_look_up_one_symbol): Declare.
13406
7984d532
PA
134072010-05-03 Pedro Alves <pedro@codesourcery.com>
13408
13409 * linux-low.c (linux_kill, linux_detach): Adjust.
13410 (status_pending_p_callback): Remove redundant statement. Check
13411 for !TARGET_WAITIKIND_IGNORE, instead of
13412 TARGET_WAITKIND_STOPPED.
13413 (handle_tracepoints): Make sure LWP is locked. Adjust.
13414 (linux_wait_for_event_1): Adjust.
13415 (linux_cancel_breakpoints): New.
13416 (unsuspend_one_lwp): New.
13417 (unsuspend_all_lwps): New.
13418 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
13419 (send_sigstop_callback): Change return type to int, add new
13420 `except' parameter and handle it.
13421 (suspend_and_send_sigstop_callback): New.
13422 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
13423 pass them down. If SUSPEND, also increment the lwp's suspend
13424 count.
13425 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
13426 (need_step_over_p): Don't consider suspended LWPs.
13427 (start_step_over): Adjust.
13428 (proceed_one_lwp): Change return type to int, add new `except'
13429 parameter and handle it.
13430 (unsuspend_and_proceed_one_lwp): New.
13431 (proceed_all_lwps): Use find_inferior instead of
13432 for_each_inferior.
13433 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
13434 also decrement the suspend count of LWPs. Pass `except' down,
13435 instead of hacking its suspend count.
13436 (linux_pause_all): Add `freeze' parameter. Adjust.
13437 (linux_unpause_all): New.
13438 (linux_target_ops): Install linux_unpause_all.
13439 * server.c (handle_status): Adjust.
13440 * target.h (struct target_ops): New fields `unpause_all' and
13441 `cancel_breakpoints'. Add new parameter to `pause_all'.
13442 (pause_all): Add new `freeze' parameter.
13443 (unpause_all): New.
13444 (cancel_breakpoints): New.
13445 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
13446 cancel breakpoints.
13447 (cmd_qtstart): Pause threads.
13448 (stop_tracing): Pause threads, and cancel breakpoints.
13449 * win32-low.c (win32_target_ops): Adjust.
13450
e471f25b
PA
134512010-05-03 Pedro Alves <pedro@codesourcery.com>
13452
13453 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
13454 the inferior right away from here...
13455 (linux_wait_1): ... to here, and adjust to check the thread's
13456 last_resume_kind instead of the lwp's step or stop_expected flags.
13457
1915ef4f
PA
134582010-05-02 Pedro Alves <pedro@codesourcery.com>
13459
13460 * README: Use consistent `GDB' and `GDBserver' spellings.
13461
f9e39928
PA
134622010-05-02 Pedro Alves <pedro@codesourcery.com>
13463
13464 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
13465 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
13466 (linux_detach_one_lwp): Assume the lwp is stopped.
13467 (any_thread_of): Delete.
13468 (linux_detach): Stop all lwps here. Don't blindly delete all
13469 breakpoints.
13470 (delete_lwp_callback): New.
13471 (linux_mourn): Delete all lwps of the process that is gone.
13472 (linux_wait_1): Don't delete the last lwp of the process here.
13473 * mem-break.h (mark_breakpoints_out): Declare.
13474 * mem-break.c (mark_breakpoints_out): New.
13475 (free_all_breakpoints): Use it.
13476 * server.c (handle_target_event): If the process is gone, mark
13477 breakpoints out.
13478 * thread-db.c (struct thread_db) <create_bp>: New field.
13479 (thread_db_enable_reporting): Fix prototype. Store a thread event
13480 breakpoint reference in the thread_db struct.
13481 (thread_db_load_search): Clear the thread_db object.
13482 (try_thread_db_load_1): Ditto.
13483 (switch_to_process): New.
13484 (disable_thread_event_reporting): Use it.
13485 (remove_thread_event_breakpoints): New.
13486 (thread_db_detach, thread_db_mourn): Use it.
13487
1e7fc18c
PA
134882010-05-01 Pedro Alves <pedro@codesourcery.com>
13489
13490 * linux-low.c (linux_enable_event_reporting): New.
13491 (linux_wait_for_event_1, handle_extended_wait): Use it.
13492
02fc4de7
PA
134932010-04-30 Pedro Alves <pedro@codesourcery.com>
13494
13495 * linux-low.c (linux_kill_one_lwp, linux_kill)
13496 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
13497 (send_sigstop): Take an lwp_info as parameter instead. Queue a
13498 SIGSTOP even if the LWP is stopped.
13499 (send_sigstop_callback): New.
13500 (stop_all_lwps): Use send_sigstop_callback instead.
13501 (linux_resume_one_thread): Adjust.
13502 (proceed_one_lwp): Still proceed an LWP that the client has
13503 requested to stop, if we haven't reported it as stopped yet. Make
13504 sure that LWPs the client want stopped, have a pending SIGSTOP.
13505
bc3b5632
DE
135062010-04-26 Doug Evans <dje@google.com>
13507
ae1ada35
DE
13508 * server.c (handle_general_set): Make static.
13509
bc3b5632
DE
13510 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
13511 Print received char after testing for error/eof instead of before.
13512 (input_interrupt): Tweak comment.
13513
65730243
DE
135142010-04-23 Doug Evans <dje@google.com>
13515
13516 * server.c (start_inferior): Print inferior argv if --debug.
13517
a8ae7dc0
AR
135182010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
13519
13520 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
13521 * nto-x86-low.c: Include server.h
13522
1c07cc19
PM
135232010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
13524
13525 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
13526 be consistent with other sources of this directory.
13527 (init_registers_amd64): Correct name of source file of this function
13528 in the comment.
13529
e0a61e09
PM
135302010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
13531
13532 * configure.srv (x86_64-*-mingw*): New configuration for Windows
13533 64-bit executables.
13534
54709339
PM
135352010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
13536
13537 * win32-i386-low.c: Add 64-bit support.
13538 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
13539 (init_registers_amd64): Declare.
13540 (mappings): Add 64-bit version of array.
13541 (init_windows_x86): New function.
13542 (the_low_target): Change init_arch field to init_windows_x86.
13543
e8f0053d
PM
135442010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
13545
13546 * win32-low.c: Adapt to support also 64-bit architecture.
13547 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
13548 (get_image_name): Use SIZE_T type for local variable `done'.
13549 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
13550 (toolhelp_get_dll_name): Idem.
13551 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
13552 Use uintptr_t typecast to avoid warning.
13553 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
13554 (handle_exception): Use phex_nz to avoid warning.
13555 (win32_wait): Remove unused local variable `process'.
13556
c481e77e
PM
135572010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
13558
13559 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
13560 `amd64-avx.o'.
13561
12ea4b69
PM
135622010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
13563
13564 * configure.ac: Use `ws2_32' library for srv_mingw.
13565 * configure: Regenerate.
13566 * gdbreplay.c: Include winsock2.h instead of winsock.h.
13567 * remote-utils.c: Likewise.
13568
f6d1620c
L
135692010-04-17 H.J. Lu <hongjiu.lu@intel.com>
13570
13571 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
13572 if __x86_64__ is defined.
13573
8e642873
PM
135742010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
13575
13576 * configure: Regenerate.
13577
711e434b
PM
135782010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
13579
13580 * server.c (handle_query): Handle 'qGetTIBAddr' query.
13581 * target.h (target_ops): New get_tib_address field.
13582 * win32-low.h (win32_thread_info): Add thread_local_base field.
13583 * win32-low.c (child_add_thread): Add tlb argument.
13584 Set thread_local_base field to TLB.
13585 (get_child_debug_event): Adapt to child_add_thread change.
13586 (win32_get_tib_address): New function.
13587 (win32_target_ops): Set get_tib_address field to
13588 win32_get_tib_address.
13589 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
13590
505106cd
PA
135912010-04-12 Pedro Alves <pedro@codesourcery.com>
13592
505106cd
PA
13593 * linux-low.c (linux_mourn): Also remove the process.
13594 * server.c (handle_target_event): Don't remove the process here.
13595 * nto-low.c (nto_mourn): New.
13596 (nto_target_ops): Install it.
13597 * spu-low.c (spu_mourn): New.
13598 (spu_target_ops): Install it.
13599 * win32-low.c (win32_mourn): New.
13600 (win32_target_ops): Install it.
13601
e8470a06
PA
136022010-04-12 Pedro Alves <pedro@codesourcery.com>
13603
13604 * server.h (buffer_xml_printf): Remove redundant `;'.
13605
45ba0d02
PA
136062010-04-12 Pedro Alves <pedro@codesourcery.com>
13607
13608 * regcache.c (set_register_cache): Invalidate regcaches before
13609 changing the register cache layout.
13610 (regcache_invalidate_one): Allow a NULL regcache.
13611 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
13612 regcaches before changing the register cache layout or the target
13613 regsets.
13614
59e04013
L
136152010-04-12 H.J. Lu <hongjiu.lu@intel.com>
13616
13617 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
13618 variable warning on Linux/x86-64.
13619
8336d594
PA
136202010-04-11 Pedro Alves <pedro@codesourcery.com>
13621
13622 GDBserver disconnected tracing support.
13623
13624 * linux-low.c (linux_remove_process): Delete.
13625 (add_lwp): Don't set last_resume_kind here.
13626 (linux_kill): Use `mourn'.
13627 (linux_detach): Use `thread_db_detach', and `mourn'.
13628 (linux_mourn): New.
13629 (linux_attach_lwp_1): Adjust comment.
13630 (linux_attach): last_resume_kind moved the thread_info; adjust.
13631 (status_pending_p_callback): Adjust.
13632 (linux_wait_for_event_1): Adjust.
13633 (count_events_callback, select_singlestep_lwp_callback)
13634 (select_event_lwp_callback, cancel_breakpoints_callback)
13635 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
13636 (proceed_one_lwp): Adjust.
13637 (linux_async): Add debug output.
13638 (linux_thread_stopped): New.
13639 (linux_pause_all): New.
13640 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
13641 linux_pause_all.
13642 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
13643 (thread_db_free): Delete declaration.
13644 (thread_db_detach, thread_db_mourn): Declare.
13645 * thread-db.c (thread_db_init): Use thread_db_mourn.
13646 (thread_db_free): Delete, split in two.
13647 (disable_thread_event_reporting): New.
13648 (thread_db_detach): New.
13649 (thread_db_mourn): New.
13650
13651 * server.h (struct thread_info) <last_resume_kind>: New field.
13652 <attached>: Add comment.
13653 <gdb_detached>: New field.
13654 (handler_func): Change return type to int.
13655 (handle_serial_event, handle_target_event): Ditto.
13656 (gdb_connected): Declare.
13657 (tracing): Delete.
13658 (disconnected_tracing): Declare.
13659 (stop_tracing): Declare.
13660
13661 * server.c (handle_query) <qSupported>: Report support for
13662 disconnected tracing.
13663 (queue_stop_reply_callback): Account for running threads.
13664 (gdb_wants_thread_stopped): New.
13665 (gdb_wants_all_threads_stopped): New.
13666 (gdb_reattached_process): New.
13667 (handle_status): Clear the `gdb_detached' flag of all processes.
13668 In all-stop, stop all threads.
13669 (main): Be sure to leave tfind mode. Handle disconnected tracing.
13670 (process_serial_event): If the remote connection breaks, or if an
13671 exit was forced with "monitor exit", force an event loop exit.
13672 Handle disconnected tracing on detach.
13673 (handle_serial_event): Adjust.
13674 (handle_target_event): If GDB isn't connected, forward events back
13675 to the inferior, unless the last process exited, in which case,
13676 exit gdbserver. Adjust interface.
13677
13678 * remote-utils.c (remote_open): Don't block in accept. Instead
13679 register an event loop source on the listen socket file
13680 descriptor. Refactor bits into ...
13681 (listen_desc): ... this new global.
13682 (gdb_connected): ... this new function.
13683 (enable_async_notification): ... this new function.
13684 (handle_accept_event): ... this new function.
13685 (remote_close): Clear remote_desc.
13686
13687 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
13688
13689 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
13690 New fields.
13691 (mourn_inferior): Define.
13692 (target_process_qsupported): Avoid the dangling else problem.
13693 (thread_stopped): Define.
13694 (pause_all): Define.
13695 (target_waitstatus_to_string): Declare.
13696 * target.c (target_waitstatus_to_string): New.
13697
13698 * tracepoint.c (tracing): Make extern.
13699 (disconnected_tracing): New.
13700 (stop_tracing): Make extern. Handle tracing stops due to GDB
13701 disconnecting.
13702 (cmd_qtdisconnected): New.
13703 (cmd_qtstatus): Report disconnected tracing status in trace reply.
13704 (handle_tracepoint_general_set): Handle QTDisconnected.
13705
13706 * event-loop.c (event_handler_func): Change return type to int.
13707 (process_event): Bail out if the event handler wants the event
13708 loop to stop.
13709 (handle_file_event): Ditto.
13710 (start_event_loop): Bail out if the event handler wants the event
13711 loop to stop.
13712
13713 * nto-low.c (nto_target_ops): Adjust.
13714 * spu-low.c (spu_wait): Don't remove the process here.
13715 (spu_target_ops): Adjust.
13716 * win32-low.c (win32_wait): Don't remove the process here.
13717 (win32_target_ops): Adjust.
13718
5d267c4c
PA
137192010-04-11 Pedro Alves <pedro@codesourcery.com>
13720
13721 * regcache.c (realloc_register_cache): Invalidate inferior's
13722 regcache before recreating it.
13723
623ccd72
PA
137242010-04-09 Pedro Alves <pedro@codesourcery.com>
13725
13726 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
13727
219f2f23
PA
137282010-04-09 Stan Shebs <stan@codesourcery.com>
13729 Pedro Alves <pedro@codesourcery.com>
13730
13731 * server.h (LONGEST): New.
13732 (struct thread_info) <while_stepping>: New field.
13733 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
13734 Declare.
13735 (initialize_tracepoint, handle_tracepoint_general_set)
13736 (handle_tracepoint_query, tracepoint_finished_step)
13737 (tracepoint_was_hit, release_while_stepping_state_list):
13738 (current_traceframe): Declare.
13739 * server.c (handle_general_set): Handle tracepoint packets.
13740 (read_memory): New.
13741 (write_memory): New.
13742 (handle_search_memory_1): Use read_memory.
13743 (handle_query): Report support for conditional tracepoints, trace
13744 state variables, and tracepoint sources. Handle tracepoint
13745 queries.
13746 (main): Initialize the tracepoints module.
13747 (process_serial_event): Handle traceframe reads/writes.
13748
13749 * linux-low.c (handle_tracepoints): New.
13750 (linux_wait_1): Call it.
13751 (linux_resume_one_lwp): Handle while-stepping.
13752 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
13753 (linux_target_ops): Install them.
13754 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
13755 New field.
13756 * linux-x86-low.c (x86_supports_tracepoints): New.
13757 (the_low_target). Install it.
13758
13759 * mem-break.h (delete_breakpoint): Declare.
13760 * mem-break.c (delete_breakpoint): Make external.
13761
13762 * target.h (struct target_ops): Add `supports_tracepoints',
13763 `read_pc', and `write_pc' fields.
13764 (target_supports_tracepoints): Define.
13765 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
13766 (phex_nz): New.
13767
13768 * regcache.h (struct regcache) <registers_owned>: New field.
13769 (init_register_cache, regcache_cpy): Declare.
13770 (regcache_read_pc, regcache_write_pc): Declare.
13771 (register_cache_size): Declare.
13772 (supply_regblock): Declare.
13773 * regcache.c (init_register_cache): New.
13774 (new_register_cache): Use it.
13775 (regcache_cpy): New.
13776 (register_cache_size): New.
13777 (supply_regblock): New.
13778 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 13779
219f2f23
PA
13780 * tracepoint.c: New.
13781
13782 * Makefile.in (OBS): Add tracepoint.o.
13783 (tracepoint.o): New rule.
13784
3a13a53b
L
137852010-04-08 H.J. Lu <hongjiu.lu@intel.com>
13786
13787 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
13788 (i386-mmx.o): New.
13789 (i386-mmx.c): Likewise.
13790 (i386-mmx-linux.o): Likewise.
13791 (i386-mmx-linux.c): Likewise.
13792
13793 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
13794 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
13795 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
13796 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
13797
13798 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
13799 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
13800 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
13801
1570b33e
L
138022010-04-07 H.J. Lu <hongjiu.lu@intel.com>
13803
13804 * Makefile.in (clean): Updated.
13805 (i386-avx.o): New.
13806 (i386-avx.c): Likewise.
13807 (i386-avx-linux.o): Likewise.
13808 (i386-avx-linux.c): Likewise.
13809 (amd64-avx.o): Likewise.
13810 (amd64-avx.c): Likewise.
13811 (amd64-avx-linux.o): Likewise.
13812 (amd64-avx-linux.c): Likewise.
13813
13814 * configure.srv (srv_i386_regobj): Add i386-avx.o.
13815 (srv_i386_linux_regobj): Add i386-avx-linux.o.
13816 (srv_amd64_regobj): Add amd64-avx.o.
13817 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
13818 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
13819 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
13820 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
13821 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
13822 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
13823 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
13824
13825 * i387-fp.c: Include "i386-xstate.h".
13826 (i387_xsave): New.
13827 (i387_cache_to_xsave): Likewise.
13828 (i387_xsave_to_cache): Likewise.
13829 (x86_xcr0): Likewise.
13830
13831 * i387-fp.h (i387_cache_to_xsave): Likewise.
13832 (i387_xsave_to_cache): Likewise.
13833 (x86_xcr0): Likewise.
13834
13835 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
13836 * linux-crisv32-low.c (target_regsets): Likewise.
13837 * linux-m68k-low.c (target_regsets): Likewise.
13838 * linux-mips-low.c (target_regsets): Likewise.
13839 * linux-ppc-low.c (target_regsets): Likewise.
13840 * linux-s390-low.c (target_regsets): Likewise.
13841 * linux-sh-low.c (target_regsets): Likewise.
13842 * linux-sparc-low.c (target_regsets): Likewise.
13843 * linux-xtensa-low.c (target_regsets): Likewise.
13844
13845 * linux-low.c: Include <sys/uio.h>.
13846 (regsets_fetch_inferior_registers): Support nt_type.
13847 (regsets_store_inferior_registers): Likewise.
13848 (linux_process_qsupported): New.
13849 (linux_target_ops): Add linux_process_qsupported.
13850
13851 * linux-low.h (regset_info): Add nt_type.
13852 (linux_target_ops): Add process_qsupported.
13853
13854 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
13855 and <sys/uio.h>.
13856 (init_registers_i386_avx_linux): New.
13857 (init_registers_amd64_avx_linux): Likewise.
13858 (xmltarget_i386_linux_no_xml): Likewise.
13859 (xmltarget_amd64_linux_no_xml): Likewise.
13860 (PTRACE_GETREGSET): Likewise.
13861 (PTRACE_SETREGSET): Likewise.
13862 (x86_fill_xstateregset): Likewise.
13863 (x86_store_xstateregset): Likewise.
13864 (use_xml): Likewise.
13865 (x86_linux_update_xmltarget): Likewise.
13866 (x86_linux_process_qsupported): Likewise.
13867 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
13868 (x86_arch_setup): Don't call init_registers_amd64_linux nor
13869 init_registers_i386_linux here. Call
13870 x86_linux_update_xmltarget.
13871 (the_low_target): Add x86_linux_process_qsupported.
13872
13873 * server.c (handle_query): Call target_process_qsupported.
13874
13875 * target.h (target_ops): Add process_qsupported.
13876 (target_process_qsupported): New.
13877
fc7238bb
PA
138782010-04-03 Pedro Alves <pedro@codesourcery.com>
13879
13880 * inferiors.c (add_thread): Set last_status kind to
13881 TARGET_WAITKIND_IGNORE.
13882 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
13883 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
13884 (linux_wait_1): Move `thread' local definition to block that uses
13885 it. Don't NULL initialize `event_child'.
13886 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
13887 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
13888 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
13889
bdabb078
PA
138902010-04-01 Pedro Alves <pedro@codesourcery.com>
13891
13892 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
13893 an extended waitstatus, or by a watchpoint.
13894 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
13895 thread was stepping or has been stopped by a watchpoint.
13896
d3bbe7a0
PA
138972010-04-01 Pedro Alves <pedro@codesourcery.com>
13898
13899 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
13900 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
13901 of another, then delete the previous, and validate all
13902 breakpoints.
13903 (validate_inserted_breakpoint): New.
13904 (delete_disabled_breakpoints): New.
13905 (validate_breakpoints): New.
13906 (check_mem_read): Validate breakpoints before trusting their
13907 shadow. Delete disabled breakpoints.
13908 (check_mem_write): Validate breakpoints before trusting they
13909 should be inserted. Delete disabled breakpoints.
13910 * mem-break.h (validate_breakpoints):
13911 * server.c (handle_query): Validate breakpoints when we see a
13912 qSymbol query.
13913
8b07ae33
PA
139142010-04-01 Pedro Alves <pedro@codesourcery.com>
13915
13916 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
13917 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
13918 if we could tell there's a GDB breakpoint at stop_pc.
13919 (need_step_over_p): Don't do a step over if we find a GDB
13920 breakpoint at the resume PC.
13921
13922 * mem-break.c (struct raw_breakpoint): New.
13923 (enum bkpt_type): New type `gdb_breakpoint'.
13924 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
13925 fields. New field `raw'.
13926 (find_raw_breakpoint_at): New.
13927 (set_raw_breakpoint_at): Handle refcounting. Create a raw
13928 breakpoint instead.
13929 (set_breakpoint_at): Adjust.
13930 (delete_raw_breakpoint): New.
13931 (release_breakpoint): New.
13932 (delete_breakpoint): Rename to...
13933 (delete_breakpoint_1): ... this. Add proc parameter. Use
13934 release_breakpoint. Return ENOENT.
13935 (delete_breakpoint): Reimplement.
13936 (find_breakpoint_at): Delete.
13937 (find_gdb_breakpoint_at): New.
13938 (delete_breakpoint_at): Delete.
13939 (set_gdb_breakpoint_at): New.
13940 (delete_gdb_breakpoint_at): New.
13941 (gdb_breakpoint_here): New.
13942 (set_reinsert_breakpoint): Use release_breakpoint.
13943 (uninsert_breakpoint): Rename to ...
13944 (uninsert_raw_breakpoint): ... this.
13945 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
13946 (reinsert_raw_breakpoint): Change parameter type to
13947 raw_breakpoint.
13948 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
13949 instead.
13950 (check_breakpoints): Adjust. Use release_breakpoint.
13951 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
13952 (breakpoint_inserted_here): Ditto.
13953 (check_mem_read): Adjust to iterate over raw breakpoints instead.
13954 Don't trust the breakpoint's shadow if it is not inserted.
13955 (check_mem_write): Adjust to iterate over raw breakpoints instead.
13956 (delete_all_breakpoints): Adjust.
13957 (free_all_breakpoints): Mark all breakpoints as uninserted, and
13958 use delete_breakpoint_1.
13959
13960 * mem-break.h (breakpoints_supported): Delete declaration.
13961 (set_gdb_breakpoint_at): Declare.
13962 (gdb_breakpoint_here): Declare.
13963 (delete_breakpoint_at): Delete.
13964 (delete_gdb_breakpoint_at): Declare.
13965
13966 * server.h (struct raw_breakpoint): Forward declare.
13967 (struct process_info): New field `raw_breakpoints'.
13968
13969 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
13970 breakpoints.
13971
6bf5e0ba
PA
139722010-03-24 Pedro Alves <pedro@codesourcery.com>
13973
13974 * linux-low.c (status_pending_p_callback): Fix comment.
13975 (linux_wait_for_event_1): Move most of the internal breakpoint
13976 handling from here...
13977 (linux_wait_1): ... to here.
13978 (count_events_callback): New.
13979 (select_singlestep_lwp_callback): New.
13980 (select_event_lwp_callback): New.
13981 (cancel_breakpoints_callback): New.
13982 (select_event_lwp): New.
13983 (linux_wait_1): Simplify internal breakpoint handling. Give equal
13984 priority to all LWPs that have had events that should be reported
13985 to the client. Cancel breakpoints when about to reporting the
13986 event to the client, not while stopping lwps. No longer cancel
13987 finished single-steps here.
13988 (cancel_finished_single_step): Delete.
13989 (cancel_finished_single_steps): Delete.
13990
414a389f
PA
139912010-03-24 Pedro Alves <pedro@codesourcery.com>
13992
13993 * mem-break.c (enum bkpt_type): New.
13994 (struct breakpoint): New field `type'.
13995 (set_breakpoint_at): Change return type to struct breakpoint
13996 pointer. Set type to `other_breakpoint' by default.
13997 (delete_breakpoint): Rewrite, supporting more than one breakpoint
13998 in the breakpoint list.
13999 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
14000 (reinsert_breakpoint): Rename to ...
14001 (reinsert_raw_breakpoint): ... this.
14002 (reinsert_breakpoints_at): Adjust.
14003 * mem-break.h (struct breakpoint): Declare.
14004 (set_breakpoint_at): Change return type to struct breakpoint
14005 pointer.
14006
2280c721
PA
140072010-03-24 Pedro Alves <pedro@codesourcery.com>
14008
14009 * server.c (handle_query): Assign, not compare.
14010
d50171e4
PA
140112010-03-24 Pedro Alves <pedro@codesourcery.com>
14012
14013 Teach linux gdbserver to step-over-breakpoints.
14014
14015 * linux-low.c (can_hardware_single_step): New.
14016 (supports_breakpoints): New.
14017 (handle_extended_wait): If stopping threads, read the stop pc of
14018 the new cloned LWP.
14019 (get_pc): New.
14020 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
14021 low target doesn't support retrieving the PC.
14022 (add_lwp): Set last_resume_kind to resume_continue.
14023 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
14024 (linux_attach): Don't clear stop_expected. Set the lwp's
14025 last_resume_kind to resume_stop.
14026 (linux_detach_one_lwp): Don't check for removed breakpoints.
14027 (check_removed_breakpoint): Delete.
14028 (status_pending_p): Rename to ...
14029 (status_pending_p_callback): ... this. Don't check for removed
14030 breakpoints. Don't consider threads that are stopped from GDB's
14031 perspective.
14032 (linux_wait_for_lwp): Always read the stop_pc here.
14033 (cancel_breakpoint): New.
14034 (step_over_bkpt): New global.
14035 (linux_wait_for_event_1): Implement stepping over breakpoints.
14036 (gdb_wants_lwp_stopped): New.
14037 (gdb_wants_all_stopped): New.
14038 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
14039 single-step traps here. Store the thread's last reported target
14040 wait status.
14041 (send_sigstop): Don't clear stop_expected. Always set it,
14042 instead.
14043 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
14044 (cancel_finished_single_step): New.
14045 (cancel_finished_single_steps): New.
14046 (wait_for_sigstop): Don't cancel finished single-step traps here.
14047 (linux_resume_one_lwp): Don't check for removed breakpoints.
14048 Don't set `step' on non-hardware step archs.
14049 (linux_set_resume_request): Ignore resume_stop requests if already
14050 stopping or stopped. Set the lwp's last_resume_kind.
14051 (resume_status_pending_p): Don't check for removed breakpoints.
14052 (need_step_over_p): New.
14053 (start_step_over): New.
14054 (finish_step_over): New.
14055 (linux_resume_one_thread): Always queue a sigstop for resume_stop
14056 requests. Clear the thread's last reported target waitstatus.
14057 Don't use the `suspended' flag. Don't consider pending breakpoints.
14058 (linux_resume): Start a step-over if necessary.
14059 (proceed_one_lwp): New.
14060 (proceed_all_lwps): New.
14061 (unstop_all_lwps): New.
14062 * linux-low.h (struct lwp_info): Rewrite comment for the
14063 `suspended' flag. Add the `stop_pc' field. Delete the
14064 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
14065 Add `'last_resume_kind' and `need_step_over' fields.
14066 * inferiors.c (struct thread_info): Delete, moved elsewhere.
14067 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
14068 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
14069 (set_raw_breakpoint_at): New.
14070 (set_breakpoint_at): Rewrite to use it.
14071 (reinsert_breakpoint_handler): Delete.
14072 (set_reinsert_breakpoint): New.
14073 (reinsert_breakpoint_by_bp): Delete.
14074 (delete_reinsert_breakpoints): New.
14075 (uninsert_breakpoint): Rewrite.
14076 (uninsert_breakpoints_at): New.
14077 (reinsert_breakpoint): Rewrite.
14078 (reinsert_breakpoints_at): New.
14079 (check_breakpoints): Rewrite.
14080 (breakpoint_here): New.
14081 (breakpoint_inserted_here): New.
14082 (check_mem_read): Adjust.
14083 * mem-break.h (breakpoints_supported, breakpoint_here)
14084 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
14085 (reinsert_breakpoint_by_bp): Delete declaration.
14086 (delete_reinsert_breakpoints): Declare.
14087 (reinsert_breakpoint): Delete declaration.
14088 (reinsert_breakpoints_at): Declare.
14089 (uninsert_breakpoint): Delete declaration.
14090 (uninsert_breakpoints_at): Declare.
14091 (check_breakpoints): Adjust prototype.
14092 * server.h: Adjust include order.
14093 (struct thread_info): Declare here. Add a `last_status' field.
14094
30ba68cb
MS
140952010-03-23 Michael Snyder <msnyder@vmware.com>
14096
14097 * server.c (crc32): New function.
14098 (handle_query): Add handling for 'qCRC:' request.
14099
b9a881c2
PA
141002010-03-23 Pedro Alves <pedro@codesourcery.com>
14101
14102 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
14103 lwp had been stopped by a watchpoint.
14104
e92d13d5
PA
141052010-03-16 Pedro Alves <pedro@codesourcery.com>
14106
14107 * server.h (internal_error): Declare.
14108 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
14109 * utils.c (internal_error): New function.
14110
64daa791
AS
141112010-03-15 Andreas Schwab <schwab@redhat.com>
14112
14113 * configure.srv: Fix typo setting srv_regobj.
14114
f52cd8cd
PA
141152010-03-15 Pedro Alves <pedro@codesourcery.com>
14116
14117 * linux-low.c (fetch_register): Avoid passing a non string literal
14118 format to `error'.
14119 (usr_store_inferior_registers): Ditto.
14120
93ae6fdc
PA
141212010-03-14 Pedro Alves <pedro@codesourcery.com>
14122
14123 * linux-low.c (linux_write_memory): Bail out early if peeking
14124 memory failed.
14125
c3adc08c
PA
141262010-03-14 Pedro Alves <pedro@codesourcery.com>
14127
14128 * linux-low.h (struct lwp_info): New fields
14129 `stopped_by_watchpoint' and `stopped_data_address'.
14130 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
14131 here, and cache them in the lwp object.
14132 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
14133 directly.
14134 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
14135 field.
14136 (linux_stopped_by_watchpoint): Rewrite.
14137 (linux_stopped_data_address): Rewrite.
14138
bce522a2
PA
141392010-03-06 Simo Melenius <simo.melenius@iki.fi>
14140
14141 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
14142 switching the current inferior, not before.
14143
90884b2b
L
141442010-03-01 H.J. Lu <hongjiu.lu@intel.com>
14145
14146 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
14147 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
14148 i386-linux.c and amd64-linux.c.
14149 (reg-i386.o): Removed.
14150 (reg-i386.c): Likewise.
14151 (reg-i386-linux.o): Likewise.
14152 (reg-i386-linux.c): Likewise.
14153 (reg-x86-64.o): Likewise.
14154 (reg-x86-64.c): Likewise.
14155 (reg-x86-64-linux.o): Likewise.
14156 (reg-x86-64-linux.c): Likewise.
14157 (i386.o): New.
14158 (i386.c): Likewise.
14159 (i386-linux.o): Likewise.
14160 (i386-linux.c): Likewise.
14161 (amd64.o): Likewise.
14162 (amd64.c): Likewise.
14163 (amd64-linux.o): Likewise.
14164 (amd64-linux.c): Likewise.
14165
14166 * configure.srv (srv_i386_regobj): New.
14167 (srv_i386_linux_regobj): Likewise.
14168 (srv_amd64_regobj): Likewise.
14169 (srv_amd64_linux_regobj): Likewise.
14170 (srv_i386_32bit_xmlfiles): Likewise.
14171 (srv_i386_64bit_xmlfiles): Likewise.
14172 (srv_i386_xmlfiles): Likewise.
14173 (srv_amd64_xmlfiles): Likewise.
14174 (srv_i386_linux_xmlfiles): Likewise.
14175 (srv_amd64_linux_xmlfiles): Likewise.
14176 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
14177 srv_xmlfiles to $srv_i386_xmlfiles.
14178 (i[34567]86-*-mingw32ce*): Likewise.
14179 (i[34567]86-*-mingw*): Likewise.
14180 (i[34567]86-*-nto*): Likewise.
14181 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
14182 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
14183 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
14184 (x86_64-*-linux*): Likewise.
14185
14186 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
14187 (init_registers_amd64_linux): New.
14188 (x86_arch_setup): Replace init_registers_x86_64_linux with
14189 init_registers_amd64_linux.
14190
193f13e6
MK
141912010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
14192
14193 * configure.ac: Check for libdl. If it is not available link against
14194 static libthread_db.
14195 * configure: Regenerate.
14196
85d721b8
PA
141972010-02-22 Pedro Alves <pedro@codesourcery.com>
14198
14199 PR9605
14200
14201 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
14202 handing a read watchpoint.
14203 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
14204
6076632b
DE
142052010-02-12 Doug Evans <dje@google.com>
14206
14207 * linux-low.c (linux_supports_tracefork_flag): Document.
14208 (linux_look_up_symbols): Add comment.
14209
3327ccf7
L
142102010-02-03 H.J. Lu <hongjiu.lu@intel.com>
14211
14212 * regcache.c (supply_register): Clear regcache if buf is NULL.
14213
0718675c 142142010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 14215 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
14216
14217 * inferiors.c (find_inferior): Add function documentation.
14218 (unloaded_dll): Handle the case where the unloaded dll has not
14219 been previously registered in the dll list.
14220
177321bd
DJ
142212010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
14222
14223 * linux-arm-low.c (thumb_breakpoint_len): Delete.
14224 (thumb2_breakpoint): New.
14225 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
14226
2b009048
DJ
142272010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
14228
14229 * linux-low.c (get_stop_pc): Check for SIGTRAP.
14230 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
14231 breakpoints.
14232
3be029c7
PA
142332010-01-21 Pedro Alves <pedro@codesourcery.com>
14234
14235 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
14236
18f5de3b
JK
142372010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
14238
14239 * linux-s390-low.c (s390_collect_ptrace_register)
14240 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
14241
3743bb4f
DE
142422010-01-21 Doug Evans <dje@google.com>
14243
14ce3065
DE
14244 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
14245 (PTRACE_ARG4_TYPE): New macro.
14246 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
14247 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
14248 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
14249 (usr_store_inferior_registers): Ditto.
14250 (linux_read_memory, linux_write_memory): Ditto.
14251 (linux_test_for_tracefork): Ditto.
14252
3743bb4f
DE
14253 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
14254 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
14255
8b315be5
PA
142562010-01-21 Pedro Alves <pedro@codesourcery.com>
14257
14258 * proc-service.c (ps_lgetregs): Don't refetch registers from the
14259 target.
14260
85492558
PA
142612010-01-21 Pedro Alves <pedro@codesourcery.com>
14262
14263 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
14264 prototype to take a regcache. Adjust.
14265
442ea881
PA
142662010-01-20 Pedro Alves <pedro@codesourcery.com>
14267
14268 * regcache.h (struct thread_info): Forward declare.
14269 (struct regcache): New.
14270 (new_register_cache): Adjust prototype.
14271 (get_thread_regcache): Declare.
14272 (free_register_cache): Adjust prototype.
14273 (registers_to_string, registers_from_string): Ditto.
14274 (supply_register, supply_register_by_name, collect_register)
14275 (collect_register_as_string, collect_register_by_name): Ditto.
14276 * regcache.c (struct inferior_regcache_data): Delete.
14277 (get_regcache): Rename to ...
14278 (get_thread_regcache): ... this. Adjust. Switch inferior before
14279 fetching registers.
14280 (regcache_invalidate_one): Adjust.
14281 (regcache_invalidate): Fix prototype.
14282 (new_register_cache): Return the new register cache.
14283 (free_register_cache): Change prototype.
14284 (realloc_register_cache): Adjust.
14285 (registers_to_string): Change prototype to take a regcache. Adjust.
14286 (registers_from_string): Ditto.
14287 (register_data): Ditto.
14288 (supply_register): Ditto.
14289 (supply_register_by_name): Ditto.
14290 (collect_register): Ditto.
14291 (collect_register_as_string): Ditto.
14292 (collect_register_by_name): Ditto.
14293 * server.c (process_serial_event): Adjust.
14294 * linux-low.h (regset_fill_func, regset_store_func): Change
14295 prototype.
14296 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
14297 Change prototype.
14298 * linux-low.c (get_stop_pc): Adjust.
14299 (check_removed_breakpoint): Adjust.
14300 (linux_wait_for_event): Adjust.
14301 (linux_resume_one_lwp): Adjust.
14302 (fetch_register): Add regcache parameter. Adjust.
14303 (usr_store_inferior_registers): Ditto.
14304 (regsets_fetch_inferior_registers): Ditto.
14305 (regsets_store_inferior_registers): Ditto.
14306 (linux_fetch_registers, linux_store_registers): Ditto.
14307 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
14308 regcache. Adjust.
43aaf8b6
PA
14309 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
14310 Ditto.
442ea881
PA
14311 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
14312 prototype to take a regcache.
14313 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
14314 * remote-utils.c (convert_ascii_to_int, outreg)
14315 (prepare_resume_reply): Change prototype to take a regcache.
14316 Adjust.
14317 * target.h (struct target_ops) <fetch_registers, store_registers>:
14318 Change prototype to take a regcache.
14319 (fetch_inferior_registers, store_inferior_registers): Change
14320 prototype to take a regcache. Adjust.
14321 * proc-service.c (ps_lgetregs): Adjust.
14322 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
14323 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
14324 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
14325 take a regcache. Adjust.
14326 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
14327 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
14328 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
14329 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
14330 * linux-cris-low.c (cris_get_pc, cris_set_pc)
14331 (cris_cannot_fetch_register):
14332 (cris_breakpoint_at): Change prototype to take a regcache.
14333 Adjust.
14334 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
14335 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
14336 to take a regcache. Adjust.
14337 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
14338 Adjust.
14339 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
14340 take a regcache. Adjust.
14341 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
14342 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
14343 (m68k_set_pc): Change prototype to take a regcache. Adjust.
14344 * linux-mips-low.c (mips_get_pc):
14345 (mips_set_pc): Change prototype to take a regcache. Adjust.
14346 (mips_reinsert_addr): Adjust.
14347 (mips_collect_register): Change prototype to take a regcache.
14348 Adjust.
14349 (mips_supply_register):
14350 (mips_collect_register_32bit, mips_supply_register_32bit)
14351 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
14352 (mips_store_fpregset): Ditto.
43aaf8b6
PA
14353 * linux-ppc-low.c (ppc_supply_ptrace_register)
14354 (ppc_supply_ptrace_register): Ditto.
442ea881
PA
14355 (parse_spufs_run): Adjust.
14356 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
14357 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
14358 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
14359 take a regcache. Adjust.
14360 * linux-s390-low.c (s390_collect_ptrace_register)
14361 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
14362 (s390_set_pc): Change prototype to take a regcache. Adjust.
14363 (s390_arch_setup): Adjust.
14364 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
14365 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
14366 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
14367 (sparc_fill_gregset, sparc_store_gregset_from_stack)
14368 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
14369 regcache. Adjust.
14370 (sparc_breakpoint_at): Adjust.
14371 * linux-xtensa-low.c (xtensa_fill_gregset):
14372 (xtensa_store_gregset):
14373 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
14374 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
14375 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
14376 prototype to take a regcache. Adjust.
14377 * win32-arm-low.c (arm_fetch_inferior_register)
14378 (arm_store_inferior_register): Change prototype to take a
14379 regcache. Adjust.
14380 * win32-i386-low.c (i386_fetch_inferior_register)
14381 (i386_store_inferior_register): Change prototype to take a
14382 regcache. Adjust.
14383 * win32-low.c (child_fetch_inferior_registers)
14384 (child_store_inferior_registers): Change prototype to take a
14385 regcache. Adjust.
14386 (win32_wait): Adjust.
14387 (win32_fetch_inferior_registers): Change prototype to take a
14388 regcache. Adjust.
14389 (win32_store_inferior_registers): Adjust.
14390 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
14391 store_inferior_register>: Change prototype to take a regcache.
14392
60c3d7b0
DE
143932010-01-20 Doug Evans <dje@google.com>
14394
14395 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
14396 #ifdef.
14397 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 14398 (W_STOPCODE): Provide definition if missing.
60c3d7b0 14399
dc146f7c
VP
144002010-01-13 Vladimir Prus <vladimir@codesourcery.com>
14401
14402 * linux-low.c (linux_core_of_thread): New.
14403 (compare_ints, show_process, list_threads): New.
14404 (linux_qxfer_osdata): Report threads and cores.
14405 (linux_target_op): Register linux_core_of_thread.
14406 * remote-utils.c (prepare_resume_reply): Report the core.
14407 (buffer_xml_printf): Support %d specifier.
14408 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
14409 New.
14410 (handle_query): Handle qXfer:threads. Announce availability
14411 thereof.
14412 * target.h (struct target_ops): New field core_of_thread.
14413
7803799a
UW
144142010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
14415
14416 * Makefile.in (clean): Remove new generated files.
14417 (reg-s390.o, reg-s390.c): Remove rules.
14418 (reg-s390x.o, reg-s390x.c): Likewise.
14419 (s390-linux32.o, s390-linux32.c): Add rules.
14420 (s390-linux64.o, s390-linux64.c): Likewise.
14421 (s390x-linux64.o, s390x-linux64.c): Likewise.
14422 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
14423 * linux-s390-low.c: Include <elf.h>.
14424 (HWCAP_S390_HIGH_GPRS): Define if undefined.
14425 (init_registers_s390): Remove prototype.
14426 (init_registers_s390x): Likewise.
14427 (init_registers_s390_linux32): Add prototype.
14428 (init_registers_s390_linux64): Likewise.
14429 (init_registers_s390x_linux64): Likewise.
14430 (s390_num_regs_3264): New define.
14431 (s390_regmap_3264): New global variable.
14432 (s390_cannot_fetch_register): Remove obsolete check.
14433 (s390_cannot_store_register): Likewise.
14434 (s390_collect_ptrace_register): Handle upper/lower register halves.
14435 (s390_supply_ptrace_register): Likewise.
14436 (s390_fill_gregset): Update to register number changes.
14437 (s390_get_hwcap): New routine.
14438 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
14439 Install appropriate regmap and register set.
14440
6e7ffa39
JB
144412010-01-01 Joel Brobecker <brobecker@adacore.com>
14442
14443 * server.c (gdbserver_version): Update copyright year to 2010.
14444 * gdbreplay.c (gdbreplay_version): Likewise.
14445
957f3f49
DE
144462009-12-28 Doug Evans <dje@google.com>
14447
14448 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
14449 elf/external.h. Include <elf.h> instead but only if necessary.
14450
ca5c370d
PA
144512009-12-28 Pedro Alves <pedro@codesourcery.com>
14452
14453 * linux-low.c (linux_remove_process): Remove `detaching'
14454 parameter. Don't release/detach from thread_db here.
14455 (linux_kill): Release/detach from thread_db here, ...
14456 (linux_detach): ... and here, before actually detaching.
14457 (linux_wait_1): ... and here, when a process exits.
14458 * thread-db.c (any_thread_of): New.
14459 (thread_db_free): Switch the current inferior to a thread of the
14460 passed in process.
14461
4ee62156
DE
144622009-12-21 Doug Evans <dje@google.com>
14463
d90e6a88
DE
14464 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
14465
c5f62d5f
DE
14466 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
14467 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
14468 warning ifndef __NR_tkill. Move setting of errno there too.
14469 Delete unnecessary resetting of errno after syscall.
14470 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
14471
10e86dd7
DE
14472 * configure.ac: Check for dladdr.
14473 * config.in: Regenerate.
14474 * configure: Regenerate.
14475 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
14476 (try_thread_db_load): Update.
14477
4ee62156
DE
14478 * linux-low.c (my_waitpid): Delete unnecessary prototype.
14479
00f515da
DE
144802009-12-18 Doug Evans <dje@google.com>
14481
e9464885
DE
14482 * event-loop.c: Include unistd.h if it exists.
14483
07d4f67e
DE
14484 * linux-low.c (my_waitpid): Move definition away from being in
14485 between linux_tracefork_child/linux_test_for_tracefork.
14486
00f515da
DE
14487 * gdb_proc_service.h (psaddr_t): Fix type.
14488 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
14489 signature to match glibc.
14490
1de1badb
DE
144912009-12-16 Doug Evans <dje@google.com>
14492
14493 * linux-low.c (linux_read_memory): Fix argument to read.
14494
aeeb81d1
PA
144952009-11-26 Pedro Alves <pedro@codesourcery.com>
14496
14497 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
14498 events, don't leave current_inferior pointing at null.
14499
10357975
PA
145002009-11-26 Pedro Alves <pedro@codesourcery.com>
14501
14502 * win32-low.c (LOG): Delete.
14503 (OUTMSG): Output to stderr.
14504 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
14505 on compile time LOG macro.
14506 (win32_wait): Fix debug output.
14507
cf6e3471
PA
145082009-11-26 Pedro Alves <pedro@codesourcery.com>
14509
14510 * win32-low.c (win32_add_one_solib): If the dll name is
14511 "ntdll.dll", prepend the system directory to the dll path.
14512
0c85e18e
MK
145132009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
14514
14515 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
14516
9ac544ce 145172009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 14518 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
14519
14520 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
14521 * configure.ac: Check for __mcoldfire__ and set
14522 gdb_cv_m68k_is_coldfire.
14523 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
14524 reg-cf.o and reg-m68k.o.
14525 * configure: Regenerated.
14526
fd7dd3e6
PA
145272009-11-16 Pedro Alves <pedro@codesourcery.com>
14528
14529 * linux-low.c (linux_remove_process): Add `detaching' parameter.
14530 Pass it to thread_db_free.
14531 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
14532 proper `detaching' argument to linux_remove_process.
14533 * linux-low.h (thread_db_free): Add `detaching' parameter.
14534 * thread-db.c (thread_db_init): Pass false as `detaching' argument
14535 to thread_db_free.
14536 (thread_db_free): Add `detaching' parameter. Only
14537 call td_ta_clear_event if detaching from process.
14538
75aa492e
MK
145392009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
14540
14541 * thread-db.c (thread_db_free): Fix typo.
14542
21e1bee4
PP
145432009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
14544
14545 PR gdb/10838
14546 * thread-db.c (thread_db_free): Call td_ta_clear_event.
14547
8838b45e
NS
145482009-11-03 Nathan Sidwell <nathan@codesourcery.com>
14549
14550 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
14551 with an i686 compiler.
14552 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
14553 needed.
14554 * configure: Rebuilt.
14555
8a35fb51
SL
145562009-10-29 Sandra Loosemore <sandra@codesourcery.com>
14557
14558 PR gdb/10783
14559
14560 * server.c (handle_search_memory_1): Correct read_addr initialization
14561 in loop for searching subsequent chunks.
14562
96f15937
PP
145632009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
14564
14565 * configure.ac: New --with-libthread-db option.
14566 * thread-db.c: Allow direct dependence on libthread_db.
14567 (thread_db_free): Adjust.
14568 * config.in: Regenerate.
14569 * configure: Likewise.
889bf7c5 14570
5f7d1694
PP
145712009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
14572
14573 PR gdb/10757
14574 * thread-db.c (attach_thread): New function.
14575 (maybe_attach_thread): Return success/failure.
14576 (find_new_threads_callback): Adjust.
889bf7c5
PA
14577 (thread_db_find_new_threads): Loop until no new threads.
14578
88e3b899
PA
145792009-10-13 Pedro Alves <pedro@codesourcery.com>
14580
14581 * proc-service.c (ps_lgetregs): Formatting.
14582
cdbfd419
PP
145832009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
14584
14585 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
14586 * configure.ac: Adjust.
14587 * linux-low.h (struct process_info_private): Move members to struct
14588 thread_db.
14589 (thread_db_free, thread_db_handle_monitor_command): New prototype.
14590 * linux-low.c (linux_remove_process): Adjust.
14591 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
14592 * server.c (handle_query): Move code ...
14593 (handle_monitor_command): ... here. New function.
14594 * target.h (struct target_ops): New member.
14595 * thread-db.c (struct thread_db): New.
14596 (libthread_db_search_path): New variable.
14597 (thread_db_create_event, thread_db_enable_reporting)
14598 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
14599 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
14600 (try_thread_db_load_1, dladdr_to_soname): New functions.
14601 (try_thread_db_load, thread_db_load_search): New functions.
14602 (thread_db_init): Search for libthread_db.
14603 (thread_db_free): New function.
14604 (thread_db_handle_monitor_command): Likewise.
14605 * config.in: Regenerate.
14606 * configure: Regenerate.
889bf7c5 14607
4168d2d6
UW
146082009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
14609
14610 * spu-low.c (spu_kill): Wait for inferior to terminate.
14611 Call clear_inferiors.
14612 (spu_detach): Call clear_inferiors.
14613
81ecdfbb
RW
146142009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
14615
14616 * aclocal.m4: Regenerate.
14617 * config.in: Likewise.
14618 * configure: Likewise.
14619
0b9ff2c0
UW
146202009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
14621
14622 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
14623 (parse_spufs_run): New function.
14624 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
14625 (ppc_breakpoint_at): Handle SPU breakpoints.
14626
efcbbd14
UW
146272009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
14628
14629 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
14630 (SPUFS_MAGIC): Define.
14631 (spu_enumerate_spu_ids): New function.
14632 (linux_qxfer_spu): New function.
14633 (linux_target_ops): Install linux_qxfer_spu.
14634
f4d9bade
UW
146352009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
14636
14637 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
14638 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
14639 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
14640 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
14641 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
14642 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
14643 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
14644 (init_registers_powerpc_cell32l): Add prototype.
14645 (init_registers_powerpc_cell64l): Likewise.
14646 (ppc_arch_setup): Detect Cell/B.E. architecture.
14647
96e946ca
RW
146482009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
14649
14650 * Makefile.in (datarootdir): New variable.
14651
58d6951d
DJ
146522009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
14653
14654 * linux-low.c (linux_write_memory): Update debugging output.
14655 * Makefile.in (clean): Add new descriptions.
14656 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
14657 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
14658 * configure.srv: Add new files for arm*-*-linux*.
14659 * linux-arm-low.c: Add new declarations.
14660 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
14661 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
14662 (HWCAP_VFPv3D16): New.
14663 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
14664 instead of __IWMMXT__.
14665 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
14666 (arm_arch_setup): New.
14667 (target_regsets): Remove #ifdef. Add VFP regset.
14668 (the_low_target): Use arm_arch_setup.
14669
12b42a12
DJ
146702009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
14671
14672 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
14673 the main thread again.
14674
ac8c974e
AR
146752009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
14676
14677 Adding Neutrino gdbserver.
14678 * configure: Regenerated.
14679 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
14680 * configure.srv (i[34567]86-*-nto*): New target.
14681 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
14682 * remote-utils.c [__QNX__]: Include sys/iomgr.h
14683 (nto_comctrl) [__QNX__]: New function.
14684 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
14685
4424e0c3 146862009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
14687
14688 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
14689 srv_tgtobj.
14690
912cf4ba
PA
146912009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
14692 Pedro Alves <pedro@codesourcery.com>
14693
14694 * win32-i386-low.c (i386_get_thread_context): Handle systems that
14695 don't support CONTEXT_EXTENDED_REGISTERS.
14696 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
14697 (the_low_target): Install them.
14698 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
14699 failing with ERROR_PIPE_NOT_CONNECTED.
14700
aa5ca48f
DE
147012009-06-30 Doug Evans <dje@google.com>
14702 Pierre Muller <muller@ics.u-strasbg.fr>
14703
14704 Add h/w watchpoint support to x86-linux, win32-i386.
14705 * Makefile.in (SFILES): Add i386-low.c
14706 (i386_low_h): Define.
14707 (i386-low.o): Add dependencies.
14708 (linux-x86-low.o): Add i386-low.h dependency.
14709 (win32-i386-low.o): Ditto.
14710 * i386-low.c: New file.
14711 * i386-low.h: New file.
14712 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
14713 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
14714 * linux-low.c (linux_add_process): Initialize arch_private.
14715 (linux_remove_process): Free arch_private.
14716 (add_lwp): Initialize arch_private.
14717 (delete_lwp): Free arch_private.
14718 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
14719 provided.
14720 * linux-low.h (process_info_private): New member arch_private.
14721 (lwp_info): New member arch_private.
14722 (linux_target_ops): New members new_process, new_thread,
14723 prepare_to_resume.
14724 (ptid_of): New macro.
14725 * linux-x86-low.c: Include stddef.h, i386-low.h.
14726 (arch_process_info): New struct.
14727 (arch_lwp_info): New struct.
14728 (x86_linux_dr_get, x86_linux_dr_set): New functions.
14729 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
14730 (i386_dr_low_get_status): New function.
14731 (x86_insert_point, x86_remove_point): New functions.
14732 (x86_stopped_by_watchpoint): New function.
14733 (x86_stopped_data_address): New function.
14734 (x86_linux_new_process, x86_linux_new_thread): New functions.
14735 (x86_linux_prepare_to_resume): New function.
14736 (the_low_target): Add entries for insert_point, remove_point,
14737 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
14738 prepare_to_resume.
14739 * server.c (debug_hw_points): New global.
14740 (monitor_show_help): Document set debug-hw-points.
14741 (handle_query): Process "set debug-hw-points".
14742 * server.h (debug_hw_points): Declare.
14743 (paddress): Declare.
14744 * utils.c (NUMCELLS, CELLSIZE): New macros.
14745 (get_sell, xsnprintf, paddress): New functions.
14746 * win32-arm-low.c (the_low_target): Add entries for insert_point,
14747 remove_point, stopped_by_watchpoint, stopped_data_address.
14748 * win32-i386-low.c: Include i386-low.h.
14749 (debug_reg_state): Replaces dr.
14750 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
14751 (i386_dr_low_get_status): New function.
14752 (i386_insert_point, i386_remove_point): New functions.
14753 (i386_stopped_by_watchpoint): New function.
14754 (i386_stopped_data_address): New function.
14755 (i386_initial_stuff): Update.
14756 (get_thread_context,set_thread_context,i386_thread_added): Update.
14757 (the_low_target): Add entries for insert_point,
14758 remove_point, stopped_by_watchpoint, stopped_data_address.
14759 * win32-low.c (win32_insert_watchpoint): New function.
14760 (win32_remove_watchpoint): New function.
14761 (win32_stopped_by_watchpoint): New function.
14762 (win32_stopped_data_address): New function.
14763 (win32_target_ops): Add entries for insert_watchpoint,
14764 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
14765 * win32-low.h (win32_target_ops): New members insert_point,
14766 remove_point, stopped_by_watchpoint, stopped_data_address.
14767
d993e290
PA
147682009-06-25 Pedro Alves <pedro@codesourcery.com>
14769
14770 * server.c (process_serial_event): Re-return unsupported, not
14771 error, if the type isn't recognized. Re-allow supporting only
14772 insert or remove packets. Also call require_running for
14773 breakpoints. Add missing break statement to default case. Tidy.
14774 * target.h (struct target_ops): Rename insert_watchpoint to
14775 insert_point, and remove_watchpoint to remove_point.
14776
14777 * linux-low.h (struct linux_target_ops): Likewise.
14778 * linux-low.c (linux_insert_watchpoint): Rename to ...
14779 (linux_insert_point): ... this. Adjust.
14780 (linux_remove_watchpoint): Rename to ...
14781 (linux_remove_point): ... this. Adjust.
14782 (linux_target_ops): Adjust.
14783 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
14784 (cris_insert_point): ... this.
14785 (cris_remove_watchpoint): Rename to ...
14786 (cris_remove_point): ... this.
14787 (the_low_target): Adjust.
14788
0f54c268
PM
147892009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
14790
14791 * server.c (handle_v_kill): Pass signal_pid to
14792 kill_inferior if multi_process is zero.
14793
c6314022
AR
147942009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
14795
14796 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
14797 * target.h (target_ops): Comment for *_watchpoint to make it clear
14798 the functions can get types '0' and '1'.
14799
4463ce24
AR
148002009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
14801
14802 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
14803 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
14804 * regcache.c (get_regcache): Likewise.
14805 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
14806 * win32-low.c (child_fetch_inferior_registers): Remove check for
14807 regno 0.
14808
cf8fd78b
PA
148092009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
14810 Pedro Alves <pedro@codesourcery.com>
14811
14812 * target.h (struct target_ops) <supports_multi_process>: New
14813 callback.
14814 (target_supports_multi_process): New.
14815 * server.c (handle_query): Even if GDB reports support, only
14816 enable multi-process if the target also supports it. Report
14817 multi-process support only if the target backend supports it.
14818 * linux-low.c (linux_supports_multi_process): New function.
14819 (linux_target_ops): Install it as target_supports_multi_process
14820 callback.
14821
47c0c975
DE
148222009-05-24 Doug Evans <dje@google.com>
14823
e09875d4
DE
14824 Global renaming of find_thread_pid to find_thread_ptid.
14825 * server.h (find_thread_ptid): Renamed from find_thread_pid.
14826 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
14827 All callers updated.
14828
e27d73f6
DE
14829 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
14830 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
14831 directly.
14832
47c0c975
DE
14833 * linux-low.c (get_stop_pc): Print pc if debug_threads.
14834 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
14835 (linux_resume_one_lwp): Ditto.
14836
2acc282a
DE
148372009-05-23 Doug Evans <dje@google.com>
14838
14839 * linux-low.c (linux_resume_one_lwp): Change type of first arg
14840 from struct inferior_list_entry * to struct lwp_info *.
14841 All callers updated.
14842
9f1036c1
DE
148432009-05-13 Doug Evans <dje@google.com>
14844
14845 * linux-x86-low.c: Don't include assert.h.
14846 (x86_siginfo_fixup): Use fatal, not assert.
14847 (x86_arch_setup): Fix comment.
14848
d0722149
DE
148492009-05-12 Doug Evans <dje@google.com>
14850
14851 Biarch support for i386/amd64 gdbserver.
14852 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
14853 Add linux-x86-low.c.
14854 (linux-i386-low.o, linux-x86-64-low.o): Delete.
14855 (linux-x86-low.o): Add.
14856 * linux-x86-64-low.c: Delete.
14857 * linux-i386-low.c: Delete.
14858 * linux-x86-low.c: New file.
14859 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
14860 linux-x86-low.o.
14861 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
14862 linux-x86-low.o.
14863 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
14864 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
14865 (linux_child_pid_to_exec_file): New function.
14866 (elf_64_header_p, elf_64_file_p): New functions.
14867 (siginfo_fixup): New function.
14868 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
14869 give target a chance to convert layout.
14870 * linux-low.h (linux_target_ops): New member siginfo_fixup.
14871 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
14872
fdeb2a12
DE
148732009-05-07 Doug Evans <dje@google.com>
14874
14875 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
14876 (regsets_store_inferior_registers): Ditto.
14877
a6dbe5df
PA
148782009-05-06 Pedro Alves <pedro@codesourcery.com>
14879
14880 PR server/10048
14881
14882 * linux-low.c (must_set_ptrace_flags): Delete.
14883 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
14884 of the global.
14885 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
14886 `lwp->must_set_ptrace_flags' instead.
ba42693b 14887 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
14888 (linux_wait_1): ... not here.
14889
5091eb23
DE
148902009-04-30 Doug Evans <dje@google.com>
14891
9f767825
DE
14892 * inferiors.c (started_inferior_callback): New function.
14893 (attached_inferior_callback): New function.
14894 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
14895 * server.c (print_started_pid, print_attached_pid): New functions.
14896 (detach_or_kill_for_exit): New function.
14897 (main): Call it instead of for_each_inferior (kill_inferior_callback).
14898 * server.h (have_started_inferiors_p): Declare.
14899 (have_attached_inferiors_p): Declare.
14900
5091eb23
DE
14901 * inferiors.c (remove_process): Fix memory leak, free process.
14902 * linux-low.c (linux_remove_process): New function.
14903 (linux_kill): Call it instead of remove_process.
14904 (linux_detach, linux_wait_1): Ditto.
14905
155c8968
PA
149062009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
14907
14908 * configure.srv: Add x86 Windows CE target.
14909
7fe519cb
UW
149102009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
14911
14912 * inferiors.c (get_thread_process): Make global.
14913 * server.h (get_thread_process): Add prototype.
14914 * thread-db.c (find_one_thread): Use get_thread_process
14915 instead of current_process.
14916 (thread_db_get_tls_address): Do not crash if called when
14917 thread layer is not yet initialized.
14918
5472f405
UW
149192009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
14920
14921 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
14922 * spu-low.c (current_tid): Rename to ...
14923 (current_ptid): ... this.
14924 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
14925 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
14926 ptid_get_lwp (current_ptid) instead of current_tid.
14927 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
14928 instead of current_tid. Use find_process_pid to verify pid
14929 argument is valid. Pass proper argument to remove_process.
14930 (spu_thread_alive): Compare current_ptid instead of current_tid.
14931 (spu_resume): Likewise.
14932
55ac2b99
PA
149332009-04-02 Pedro Alves <pedro@codesourcery.com>
14934
14935 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
14936 variable.
14937
95954743
PA
149382009-04-01 Pedro Alves <pedro@codesourcery.com>
14939
14940 Implement the multiprocess extensions, and add linux multiprocess
14941 support.
14942
14943 * server.h (ULONGEST): Declare.
14944 (struct ptid, ptid_t): New.
14945 (minus_one_ptid, null_ptid): Declare.
14946 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
14947 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
14948 (struct inferior_list_entry): Change `id' type from unsigned from
14949 to ptid_t.
14950 (struct sym_cache, struct breakpoint, struct
14951 process_info_private): Forward declare.
14952 (struct process_info): Declare.
14953 (current_process): Declare.
14954 (all_processes): Declare.
14955 (initialize_inferiors): Declare.
14956 (add_thread): Adjust to use ptid_t.
14957 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
14958 (add_process, remove_process, find_thread_pid): Declare.
14959 (find_inferior_id): Adjust to use ptid_t.
14960 (cont_thread, general_thread, step_thread): Change type to ptid_t.
14961 (multi_process): Declare.
14962 (push_event): Adjust to use ptid_t.
14963 (read_ptid, write_ptid): Declare.
14964 (prepare_resume_reply): Adjust to use ptid_t.
14965 (clear_symbol_cache): Declare.
14966 * inferiors.c (all_processes): New.
14967 (null_ptid, minus_one_ptid): New.
14968 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
14969 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
14970 (add_thread): Change unsigned long to ptid. Remove gdb_id
14971 parameter. Adjust.
14972 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
14973 (gdb_id_to_thread): Rename to ...
14974 (find_thread_pid): ... this. Change unsigned long to ptid.
14975 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
14976 (loaded_dll, pull_pid_from_list): Adjust.
14977 (add_process, remove_process, find_process_pid)
14978 (get_thread_process, current_process, initialize_inferiors): New.
14979 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
14980 (struct target_waitstatus) <related_pid>: Ditto.
14981 (struct target_ops) <kill, detach>: Add `pid' argument. Change
14982 return type to int.
14983 (struct target_ops) <join>: Add `pid' argument.
14984 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
14985 (struct target_ops) <wait>: Add `ptid' field. Change return type
14986 to ptid.
14987 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
14988 (mywait): Add `ptid' argument. Change return type to ptid_t.
14989 (target_pid_to_str): Declare.
14990 * target.c (set_desired_inferior): Adjust to use ptids.
14991 (mywait): Add new `ptid' argument. Adjust.
14992 (target_pid_to_str): New.
14993 * mem-break.h (free_all_breakpoints): Declare.
14994 * mem-break.c (breakpoints): Delelete.
14995 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
14996 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
14997 to use per-process breakpoint list.
14998 (free_all_breakpoints): New.
14999 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
15000 (symbol_cache, all_symbols_looked_up): Delete.
15001 (hexchars): New.
15002 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
15003 read_ptid): New.
15004 (prepare_resume_reply): Change ptid argument's type from unsigned
15005 long to ptid_t. Adjust. Implement W;process and X;process.
15006 (free_sym_cache, clear_symbol_cache): New.
15007 (look_up_one_symbol): Adjust to per-process symbol cache. *
15008 * server.c (cont_thread, general_thread, step_thread): Change type
15009 to ptid_t.
15010 (attached): Delete.
15011 (multi_process): New.
15012 (last_ptid): Change type to ptid_t.
15013 (struct vstop_notif) <ptid>: Change type to ptid_t.
15014 (queue_stop_reply, push_event): Change `ptid' argument's type to
15015 ptid_t.
15016 (discard_queued_stop_replies): Add `pid' argument.
15017 (start_inferior): Adjust to use ptids. Adjust to mywait interface
15018 changes. Don't reference the `attached' global.
15019 (attach_inferior): Adjust to mywait interface changes.
15020 (handle_query): Adjust to use ptids. Parse GDB's qSupported
15021 features. Handle and report "multiprocess+". Handle
15022 "qAttached:PID".
15023 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
15024 changes.
15025 (handle_v_kill): New.
15026 (handle_v_stopped): Adjust to use target_pid_to_str.
15027 (handle_v_requests): Allow multiple attaches and runs when
15028 multiprocess extensions are in effect. Handle "vKill".
15029 (myresume): Adjust to use ptids.
15030 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
15031 (handle_status): Adjust to discard_queued_stop_replies interface
15032 change.
15033 (first_thread_of, kill_inferior_callback)
15034 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
15035 (main): Call initialize_inferiors. Adjust to use ptids, killing
15036 and detaching from all inferiors. Handle multiprocess packet
15037 variants.
15038 * linux-low.h: Include gdb_proc_service.h.
15039 (struct process_info_private): New.
15040 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
15041 <lwpid_of>: Use ptid_get_lwp.
15042 (get_lwp_thread): Adjust.
15043 (struct lwp_info): Add `dead' member.
15044 (find_lwp_pid): Declare.
15045 * linux-low.c (thread_db_active): Delete.
15046 (new_inferior): Adjust comment.
15047 (inferior_pid): Delete.
15048 (linux_add_process): New.
15049 (handle_extended_wait): Adjust.
15050 (add_lwp): Change unsigned long to ptid.
15051 (linux_create_inferior): Add process to processes table. Adjust
15052 to use ptids. Don't set new_inferior here.
15053 (linux_attach_lwp): Rename to ...
15054 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
15055 it. Adjust to use ptids.
15056 (linux_attach_lwp): New.
15057 (linux_attach): Add process to processes table. Don't set
15058 new_inferior here.
15059 (struct counter): New.
15060 (second_thread_of_pid_p, last_thread_of_process_p): New.
15061 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
15062 multiple processes.
15063 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
15064 processes. Remove process from process table.
15065 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
15066 to multiple processes.
15067 (any_thread_of): New.
15068 (linux_detach): Add `pid' argument, and handle it. Remove process
15069 from processes table.
15070 (linux_join): Add `pid' argument. Handle it.
15071 (linux_thread_alive): Change unsighed long argument to ptid_t.
15072 Consider dead lwps as not being alive.
15073 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
15074 threads we're not interested in.
15075 (same_lwp, find_lwp_pid): New.
15076 (linux_wait_for_lwp): Change `pid' argument's type from int to
15077 ptid_t. Adjust.
15078 (linux_wait_for_event): Rename to ...
15079 (linux_wait_for_event_1): ... this. Change `pid' argument's type
15080 from int to ptid_t. Adjust.
15081 (linux_wait_for_event): New.
15082 (linux_wait_1): Add `ptid' argument. Change return type to
15083 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
15084 that exit from the process table.
15085 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
15086 Adjust.
15087 (mark_lwp_dead): New.
15088 (wait_for_sigstop): Adjust to use ptids. If a process exits while
15089 stopping all threads, mark its main lwp as dead.
15090 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
15091 ptids.
15092 (fetch_register, usr_store_inferior_registers)
15093 (regsets_fetch_inferior_registers)
15094 (regsets_store_inferior_registers, linux_read_memory)
15095 (linux_write_memory): Inline `inferior_pid'.
15096 (linux_look_up_symbols): Adjust to use per-process
15097 `thread_db_active'.
15098 (linux_request_interrupt): Adjust to use ptids.
15099 (linux_read_auxv): Inline `inferior_pid'.
15100 (initialize_low): Don't reference thread_db_active.
15101 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
15102 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
15103 (ps_getpid): Return the pid of the current inferior.
15104 * thread-db.c (proc_handle, thread_agent): Delete.
15105 (thread_db_create_event, thread_db_enable_reporting): Adjust to
15106 per-process data.
15107 (find_one_thread): Change argument type to ptid_t. Adjust to
15108 per-process data.
15109 (maybe_attach_thread): Adjust to per-process data and ptids.
15110 (thread_db_find_new_threads): Ditto.
15111 (thread_db_init): Ditto.
15112 * spu-low.c (spu_create_inferior, spu_attach): Add process to
15113 processes table. Adjust to use ptids.
15114 (spu_kill, spu_detach): Adjust interface. Remove process from
15115 processes table.
15116 (spu_join, spu_thread_alive): Adjust interface.
15117 (spu_wait): Adjust interface. Remove process from processes
15118 table. Adjust to use ptids.
15119 * win32-low.c (current_inferior_tid): Delete.
15120 (current_inferior_ptid): New.
15121 (debug_event_ptid): New.
15122 (thread_rec): Take a ptid. Adjust.
15123 (child_add_thread): Add `pid' argument. Adjust to use ptids.
15124 (child_delete_thread): Ditto.
15125 (do_initial_child_stuff): Add `attached' argument. Add process to
15126 processes table.
15127 (child_fetch_inferior_registers, child_store_inferior_registers):
15128 Adjust.
15129 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
15130 (win32_attach): Pass 1 to do_initial_child_stuff.
15131 (win32_kill): Adjust interface. Remove process from processes
15132 table.
15133 (win32_detach): Ditto.
15134 (win32_join): Adjust interface.
15135 (win32_thread_alive): Take a ptid.
15136 (win32_resume): Adjust to use ptids.
15137 (get_child_debug_event): Ditto.
15138 (win32_wait): Adjust interface. Remove exiting process from
15139 processes table.
15140
bd99dc85
PA
151412009-04-01 Pedro Alves <pedro@codesourcery.com>
15142
15143 Non-stop mode support.
15144
15145 * server.h (non_stop): Declare.
15146 (gdb_client_data, handler_func): Declare.
15147 (delete_file_handler, add_file_handler, start_event_loop):
15148 Declare.
15149 (handle_serial_event, handle_target_event, push_event)
15150 (putpkt_notif): Declare.
15151 * target.h (enum resume_kind): New.
15152 (struct thread_resume): Replace `step' field by `kind' field.
15153 (TARGET_WNOHANG): Define.
15154 (struct target_ops) <wait>: Add `options' argument.
15155 <supports_non_stop, async, start_non_stop>: New fields.
15156 (target_supports_non_stop, target_async): New.
15157 (start_non_stop): Declare.
15158 (mywait): Add `options' argument.
15159 * target.c (mywait): Add `options' argument. Print child exit
15160 notifications here.
15161 (start_non_stop): New.
15162 * server.c (non_stop, own_buf, mem_buf): New globals.
15163 (struct vstop_notif): New.
15164 (notif_queue): New global.
15165 (queue_stop_reply, push_event, discard_queued_stop_replies)
15166 (send_next_stop_reply): New.
15167 (start_inferior): Adjust to use resume_kind. Adjust to mywait
15168 interface changes.
15169 (attach_inferior): In non-stop mode, don't wait for the target
15170 here.
15171 (handle_general_set): Handle QNonStop.
15172 (handle_query): When handling qC, return the current general
15173 thread, instead of the first thread of the list.
15174 (handle_query): If the backend supports non-stop mode, include
15175 QNonStop+ in the qSupported query response.
15176 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
15177 and non-stop mode.
15178 (handle_v_attach, handle_v_run): Handle non-stop mode.
15179 (handle_v_stopped): New.
15180 (handle_v_requests): Report support for vCont;t. Handle vStopped.
15181 (myresume): Adjust to use resume_kind. Handle non-stop.
15182 (queue_stop_reply_callback): New.
15183 (handle_status): Handle non-stop mode.
15184 (main): Clear non_stop flag on reconnection. Use the event-loop.
15185 Refactor serial protocol handling from here ...
15186 (process_serial_event): ... to this new function. When GDB
15187 selects any thread, select one here. In non-stop mode, wait until
15188 GDB acks all pending events before exiting.
15189 (handle_serial_event, handle_target_event): New.
15190 * remote-utils.c (remote_open): Install remote_desc in the event
15191 loop.
15192 (remote_close): Remove remote_desc from the event loop.
15193 (putpkt_binary): Rename to...
15194 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
15195 (putpkt_binary): New as wrapper around putpkt_binary_1.
15196 (putpkt_notif): New.
15197 (prepare_resume_reply): In non-stop mode, don't change the
15198 general_thread.
15199 * event-loop.c: New.
15200 * Makefile.in (OBJ): Add event-loop.o.
15201 (event-loop.o): New rule.
15202
15203 * linux-low.h (pid_of): Moved here.
15204 (lwpid_of): New.
15205 (get_lwp_thread): Use lwpid_of.
15206 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
15207 * linux-low.c (pid_of): Delete.
15208 (inferior_pid): Use lwpid_of.
15209 (linux_event_pipe): New.
15210 (target_is_async_p): New.
15211 (delete_lwp): New.
15212 (handle_extended_wait): Use lwpid_of.
15213 (add_lwp): Don't set lwpid field.
15214 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
15215 (linux_kill_one_lwp): If killing a running lwp, stop it first.
15216 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
15217 (linux_detach_one_lwp): If detaching from a running lwp, stop it
15218 first. Adjust to linux_wait_for_event interface changes. Use
15219 lwpid_of.
15220 (linux_detach): Don't delete the main lwp here.
15221 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
15222 (status_pending_p): Don't consider explicitly suspended lwps.
15223 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
15224 pointer. Add OPTIONS argument. Change return type to int. Use
15225 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
15226 (linux_wait_for_event): Take an integer pid instead of a lwp_info
15227 pointer. Add status pointer argument. Return a pid instead of a
15228 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
15229 changes. In non-stop mode, don't switch to a random thread.
15230 (linux_wait): Rename to...
15231 (linux_wait_1): ... this. Add target_options argument, and handle
15232 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
15233 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
15234 clean exit and signal exit code. Don't stop all threads in
15235 non-stop mode. In all-stop mode, only stop all threads when
15236 reporting a stop to GDB. Handle explicit thread stop requests.
15237 (async_file_flush, async_file_mark): New.
15238 (linux_wait): New.
15239 (send_sigstop): Use lwpid_of.
15240 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
15241 interface changes. In non-stop mode, don't switch to a random
15242 thread.
15243 (linux_resume_one_lwp): Use lwpid_of.
15244 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
15245 (linux_resume_one_thread): ... this. Handle resume_stop. In
15246 non-stop mode, don't look for pending flag in all threads.
15247 (resume_status_pending_p): Don't consider explicitly suspended
15248 threads.
15249 (my_waitpid): Reimplement. Emulate __WALL.
15250 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
15251 Use lwpid_of.
15252 (sigchld_handler, linux_supports_non_stop, linux_async)
15253 (linux_start_non_stop): New.
15254 (linux_target_ops): Register linux_supports_non_stop, linux_async
15255 and linux_start_non_stop.
15256 (initialize_low): Install SIGCHLD handler.
15257 * thread-db.c (thread_db_create_event, find_one_thread)
15258 (thread_db_get_tls_address): Use lwpid_of.
15259 * win32-low.c (win32_detach): Adjust to use resume_kind.
15260 (win32_wait): Add `options' argument.
15261 * spu-low.c (spu_resume): Adjust to use resume_kind.
15262 (spu_wait): Add `options' argument.
15263
5b1c542e
PA
152642009-04-01 Pedro Alves <pedro@codesourcery.com>
15265
15266 Decouple target code from remote protocol.
15267
15268 * target.h (enum target_waitkind): New.
15269 (struct target_waitstatus): New.
15270 (struct target_ops) <wait>: Return an unsigned long. Take a
15271 target_waitstatus pointer instead of a char pointer.
15272 (mywait): Likewise.
15273 * target.c (mywait): Change prototype to return an unsigned long.
15274 Take a target_waitstatus pointer instead of a char pointer. Adjust.
15275 * server.h (thread_from_wait, old_thread_from_wait): Delete
15276 declarations.
15277 (prepare_resume_reply): Change prototype to take a
15278 target_waitstatus.
15279 * server.c (thread_from_wait, old_thread_from_wait): Delete.
15280 (last_status, last_ptid): New.
15281 (start_inferior): Remove "statusptr" argument. Adjust. Return a
15282 pid instead of a signal.
15283 (attach_inferior): Remove "status" and "signal" parameters.
15284 Adjust.
15285 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
15286 not as an address.
15287 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
15288 (handle_v_requests, myresume): Remove "status" and "signal"
15289 parameters. Adjust.
15290 (handle_status): New.
15291 (main): Delete local `status'. Adjust.
15292 * remote-utils.c: Include target.h.
15293 (prepare_resume_reply): Change prototype to take a
15294 target_waitstatus. Adjust.
15295
15296 * linux-low.c (linux_wait): Adjust to new target_ops->wait
15297 interface.
15298 * spu-low.c (spu_wait): Adjust.
15299 * win32-low.c (enum target_waitkind, struct target_waitstatus):
15300 Delete.
15301 (win32_wait): Adjust.
15302
2bd7c093
PA
153032009-04-01 Pedro Alves <pedro@codesourcery.com>
15304
15305 * target.h (struct thread_resume): Delete leave_stopped member.
15306 (struct target_ops): Add a `n' argument to the `resume' callback.
15307 * server.c (start_inferior): Adjust.
15308 (handle_v_cont, myresume): Adjust.
15309 * linux-low.c (check_removed_breakpoint): Adjust to resume
15310 interface change, and to removed leave_stopped field.
15311 (resume_ptr): Delete.
15312 (struct thread_resume_array): New.
15313 (linux_set_resume_request): Add new `arg' parameter. Adjust to
15314 resume interface change.
15315 (linux_continue_one_thread, linux_queue_one_thread)
15316 (resume_status_pending_p): Check if the resume field is NULL
15317 instead of checking the leave_stopped member.
15318 (linux_resume): Adjust to the target resume interface change.
15319 * spu-low.c (spu_resume): Adjust to the target resume interface
15320 change.
15321 * win32-low.c (win32_detach, win32_resume): Ditto.
15322
c35fafde
PA
153232009-04-01 Pedro Alves <pedro@codesourcery.com>
15324
15325 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
15326 flag.
15327 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
15328 pending.
15329 (linux_continue_one_thread): Only preserve the stepping flag if
15330 there's a pending breakpoint.
15331
0a59d50b
PA
153322009-03-31 Pedro Alves <pedro@codesourcery.com>
15333
15334 * server.c (main): After the inferior having exited, call
15335 remote_close before exiting gdbserver.
15336
f04c6d38
TJB
153372009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
15338
15339 Fix size of FPSCR in Power 7 processors.
15340 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
15341 (PPC_FEATURE_HAS_DFP): New #define.
15342 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
15343 size of the FPSCR.
15344
78e5cee6
PA
153452009-03-23 Pedro Alves <pedro@codesourcery.com>
15346
15347 * server.c (handle_query) Whitespace and formatting.
15348
1b3f6016
PA
153492009-03-22 Pedro Alves <pedro@codesourcery.com>
15350
15351 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
15352 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
15353 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
15354 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
15355 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
15356 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
15357 Makefile.in, configure.ac: Fix whitespace throughout.
15358 * configure: Regenerate.
15359
a07b2135
PA
153602009-03-22 Pedro Alves <pedro@codesourcery.com>
15361
15362 * inferiors.c (find_inferior): Make it safe for the callback
15363 function to delete the currently iterated inferior.
15364
67cc2626
PA
153652009-03-22 Pedro Alves <pedro@codesourcery.com>
15366
15367 * Makefile.in (linuw_low_h): Move higher.
15368 (thread-db.o): Depend on $(linux_low_h).
15369
54a0b537
PA
153702009-03-17 Pedro Alves <pedro@codesourcery.com>
15371
15372 Rename "process" to "lwp" throughout.
15373
15374 * linux-low.c (all_processes): Rename to...
15375 (all_lwps): ... this.
15376 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
15377 (add_process): Rename to ...
15378 (add_lwp): ... this. Adjust.
15379 (linux_create_inferior): Adjust.
15380 (linux_attach_lwp): Adjust.
15381 (linux_attach): Adjust.
15382 (linux_kill_one_process): Rename to ...
15383 (linux_kill_one_lwp): ... this. Adjust.
15384 (linux_kill): Adjust.
15385 (linux_detach_one_process): Rename to ...
15386 (linux_detach_one_lwp): ... this. Adjust.
15387 (linux_detach): Adjust.
15388 (check_removed_breakpoint): Adjust.
15389 (status_pending_p): Adjust.
15390 (linux_wait_for_process): Rename to ...
15391 (linux_wait_for_lwp): ... this. Adjust.
15392 (linux_wait_for_event): Adjust.
15393 (send_sigstop): Adjust.
15394 (wait_for_sigstop): Adjust.
15395 (stop_all_processes): Rename to ...
15396 (stop_all_lwps): ... this.
15397 (linux_resume_one_process): Rename to ...
15398 (linux_resume_one_lwp): ... this. Adjust.
15399 (linux_set_resume_request, linux_continue_one_thread)
15400 (linux_queue_one_thread, resume_status_pending_p)
15401 (usr_store_inferior_registers, regsets_store_inferior_registers)
15402 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
15403 Adjust.
15404 * linux-low.h (get_process): Rename to ...
15405 (get_lwp): ... this. Adjust.
15406 (get_thread_process): Rename to ...
15407 (get_thread_lwp): ... this. Adjust.
15408 (get_process_thread): Rename to ...
15409 (get_lwp_thread): ... this. Adjust.
15410 (struct process_info): Rename to ...
15411 (struct lwp_info): ... this.
15412 (all_processes): Rename to ...
15413 (all_lwps): ... this.
15414 * proc-service.c (ps_lgetregs): Adjust.
15415 * thread-db.c (thread_db_create_event, find_one_thread)
15416 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
15417
0b16c5cf
PA
154182009-03-14 Pedro Alves <pedro@codesourcery.com>
15419
15420 * server.c (handle_query): Handle "qAttached".
15421
32de4b9d
NS
154222009-03-13 Nathan Sidwell <nathan@codesourcery.com>
15423
15424 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
15425 GPLv3, update license URL.
15426
2aecd87f
DE
154272009-03-01 Doug Evans <dje@google.com>
15428
93efd302 15429 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
15430 (server_h): Add gdb_signals.h.
15431 (signals.o): Update.
15432 * server.h (target_signal_from_host,target_signal_to_host_p)
15433 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
15434
86b1f9c5
PM
154352009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
15436
15437 * remote-utils.c (getpkt): Also generate remote-debug
15438 information if noack_mode is set.
15439
4aa995e1
PA
154402009-02-06 Pedro Alves <pedro@codesourcery.com>
15441
15442 * server.c (handle_query): Report qXfer:siginfo:read and
15443 qXfer:siginfo:write as supported and handle them.
15444 * target.h (struct target_ops) <qxfer_siginfo>: New field.
15445 * linux-low.c (linux_xfer_siginfo): New.
15446 (linux_target_ops): Set it.
15447
62709adf
PA
154482009-01-26 Pedro Alves <pedro@codesourcery.com>
15449
15450 * server.c (gdbserver_usage): Mention --remote-debug.
15451 (main): Accept '--remote-debug' switch.
15452
aef93bd7
DE
154532009-01-18 Doug Evans <dje@google.com>
15454
15455 * regcache.c (new_register_cache): No need to check result of xcalloc.
15456 * server.c (handle_search_memory): Back out calls to xmalloc,
15457 result is checked and error is returned to user upon failure.
15458 (handle_query): Ditto. Add more checks for result of malloc.
15459 (handle_v_cont): Check result of malloc, report error back to
15460 user upon failure.
15461 (handle_v_run): Ditto. Call freeargv.
15462 * server.h (freeargv): Declare.
15463 * utils.c (freeargv): New fn.
15464
54363045
DE
154652009-01-15 Doug Evans <dje@google.com>
15466
f626972c
DE
15467 * gdbreplay.c (perror_with_name): Make arg const char *.
15468 * server.h (target_signal_to_name): Make return type const char *.
0842e787 15469 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 15470 * utils.c (perror_with_name): Make arg const char *.
54363045 15471
18aae699
PA
154722009-01-14 Pedro Alves <pedro@codesourcery.com>
15473
15474 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
15475 when handling a EXIT_PROCESS_DEBUG_EVENT.
15476
ff703abe
JB
154772009-01-06 Joel Brobecker <brobecker@adacore.com>
15478
15479 * gdbreplay.c (gdbreplay_version): Update copyright year.
15480 * server.c (gdbserver_version): Likewise.
15481
f21cc1a2 154822009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
15483
15484 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 15485 (handle_extended_wait): Improve comment.
0e21c1ec 15486
bca929d3
DE
154872008-12-13 Doug Evans <dje@google.com>
15488
15489 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
15490 * server.h (ATTR_MALLOC): New macro.
15491 (xmalloc,xcalloc,xstrdup): Declare.
15492 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
15493 * inferiors.c: Ditto.
15494 * linux-low.c: Ditto.
15495 * mem-break.c: Ditto.
15496 * regcache.c: Ditto.
15497 * remote-utils.c: Ditto.
15498 * server.c: Ditto.
15499 * target.c: Ditto.
15500 * win32-low.c: Ditto.
15501
97438e3f
DE
155022008-12-12 Doug Evans <dje@google.com>
15503
896c7fbb
DE
15504 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
15505 in debugging printf.
15506
97438e3f
DE
15507 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
15508
e3b886f8
DE
155092008-12-09 Doug Evans <dje@google.com>
15510
15511 * linux-low.h (struct process_info): Delete member tid, unused.
15512 * thread-db.c (find_one_thread): Update.
15513 (maybe_attach_thread): Update.
15514
07e059b5
VP
155152008-12-02 Pedro Alves <pedro@codesourcery.com>
15516
889bf7c5
PA
15517 * target.h (struct target_ops): Add qxfer_osdata member.
15518 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
15519 and dirent.h.
15520 (linux_qxfer_osdata): New functions.
15521 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
15522 callback.
15523 * server.c (handle_query): Handle "qXfer:osdata:read:".
15524 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
15525 (buffer_xml_printf): New functions.
15526 * server.h (struct buffer): New.
15527 (buffer_grow_str, buffer_grow_str0): New macros.
15528 (buffer_grow, buffer_free, buffer_init, buffer_finish)
15529 (buffer_xml_printf): Declare.
07e059b5 15530
4cab47ab
DE
155312008-11-24 Doug Evans <dje@google.com>
15532
15533 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
15534
f142445f
DJ
155352008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
15536
15537 * server.c (handle_v_run): Always use the supplied argument list.
15538
d0107bb6 155392008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 15540
d0107bb6
BW
15541 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
15542 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 15543
2c4ad781
TJB
155442008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
15545
15546 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
15547 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
15548 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
15549 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
15550 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
15551 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
15552 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
15553 XML target descriptions.
15554 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
15555 when inferior is running on an ISA 2.05 or later processor. Add
15556 special case to return offset for full 64-bit slot of FPSCR when
15557 in 32-bits.
15558
dfb64f85
DJ
155592008-11-14 Daniel Gutson <dgutson@codesourcery.com>
15560
15561 * Makefile.in (SFILES, clean): Added sparc64 files.
15562 (reg-sparc64.o, reg-sparc64.c): New.
15563 * configure.srv (sparc*-*-linux*): New configuration.
15564 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
15565 syscall arguments for SPARC.
15566 (regsets_store_inferior_registers): Likewise.
15567 * linux-sparc-low.c: New file.
15568
66b6e1dd
DE
155692008-10-21 Doug Evans <dje@google.com>
15570
15571 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
15572 (READLINE_DIR,READLINE_DEP): Delete.
15573 (INTERNAL_CFLAGS): Update.
15574 (LINTFLAGS): Update.
15575
9b710a42
PA
155762008-10-10 Pedro Alves <pedro@codesourcery.com>
15577
15578 * server.c (handle_v_run): If GDB didn't specify an argv, use the
15579 whole argv from the last run, not just argv[0].
15580
5822d809
PA
155812008-09-08 Pedro Alves <pedro@codesourcery.com>
15582
15583 * regcache.c (new_register_cache): Return NULL if the register
15584 cache size isn't known yet.
15585 (free_register_cache): Avoid dereferencing a NULL regcache.
15586
74aac56f
DJ
155872008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
15588
15589 * configure.srv: Merge MIPS and MIPS64.
15590
400b20f5
MR
155912008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
15592
15593 * Makefile.in (uninstall): Apply $(EXEEXT) too.
15594
677c5bb1
LM
155952008-08-18 Luis Machado <luisgpm@br.ibm.com>
15596
15597 * Makefile.in: Add required vsx dependencies.
15598
15599 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
15600 Declare init_registers_powerpc_vsx32l.
15601 Declare init_registers_powerpc_vsx64l.
15602 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
15603 (ppc_arch_setup): Check for VSX in hwcap.
15604 (ppc_fill_vsxregset): New function.
15605 (ppc_store_vsxregset): New function.
15606 Add new VSX entry in regset_info target_regsets.
15607
15608 * configure.srv: Add new VSX dependencies.
15609
a6f3e723
SL
156102008-08-12 Pedro Alves <pedro@codesourcery.com>
15611
15612 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
15613 (remote_open): Set or clear transport_is_reliable.
15614 (putpkt_binary): Don't expect acks in noack mode.
15615 (getpkt): Don't send ack/nac in noack mode.
15616 * server.c (handle_general_set): Handle QStartNoAckMode.
15617 (handle_query): If connected by tcp pass QStartNoAckMode+ in
15618 qSupported.
15619 (main): Reset noack_mode on every connection.
15620 * server.h (noack_mode): Declare.
15621
a417dc56
RW
156222008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
15623
15624 * Makefile.in (GDBREPLAY_OBS): New variable.
15625 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
15626
3221518c
UW
156272008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
15628 Daniel Jacobowitz <dan@codesourcery.com>
15629
15630 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
15631 (usr_store_inferior_registers): Likewise.
15632 (regsets_store_inferior_registers): Likewise.
15633
ec56be1b
PA
156342008-07-31 Rolf Jansen <rj@surtec.com>
15635 Pedro Alves <pedro@codesourcery.com>
15636
15637 * configure.ac: Check for memmem declaration.
15638 * server.c [HAVE_MALLOC_H]: Include malloc.h.
15639 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
15640 (disable_packet_qfThreadInfo): Unconditionally compile.
15641 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
15642 * configure, config.in: Regenerate.
15643
2fe5e3ff
DE
156442008-07-28 Doug Kwan <dougkwan@google.com>
15645
15646 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
15647 (linux_write_memory): Remove declaration of errno.
15648
836acd6d
UW
156492008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
15650
15651 * linux-low.c (handle_extended_wait): Do not use "status"
15652 variable uninitialized.
15653
aeba519e
PA
156542008-07-07 Pedro Alves <pedro@codesourcery.com>
15655
15656 * server.c (handle_v_attach): Inhibit reporting dll changes.
15657
db42f210
PA
156582008-06-27 Pedro Alves <pedro@codesourcery.com>
15659
15660 * remote-utils.c (prepare_resume_reply): If requested, don't
15661 output "thread:TID" in the T stop reply.
15662
15663 * server.c (disable_packet_vCont, disable_packet_Tthread)
15664 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
15665 (handle_query): If requested, disable support for qC, qfThreadInfo
15666 and qsThreadInfo.
15667 (handle_v_requests): If requested, disable support for vCont.
15668 (gdbserver_show_disableable): New.
15669 (main): Handle --disable-packet and --disable-packet=LIST.
15670
15671 * server.h (disable_packet_vCont, disable_packet_Tthread)
15672 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
15673
8e4c5421
CD
156742008-06-20 Carlos O'Donell <carlos@codesourcery.com>
15675
15676 * server.c (gdbserver_usage): Mention --version.
15677
6e23a804
DJ
156782008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
15679
15680 * Makefile.in (gdbreplay.o): New rule.
15681
90aa6a40
JM
156822008-06-06 Joseph Myers <joseph@codesourcery.com>
15683
15684 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
15685 message, not gdbserver.
15686
c16158bc 156872008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
15688 Nathan Sidwell <nathan@codesourcery.com>
15689 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
15690
15691 * acinclude.m4: Include ../../config/acx.m4.
15692 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
15693 * configure, config.in: Regenerate.
15694 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
15695 * server.c (gdbserver_version): Print PKGVERSION.
15696 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
15697 (main): Adjust gdbserver_usage calls.
15698 * gdbreplay.c (version, host_name): Add declarations.
15699 (gdbreplay_version, gdbreplay_usage): New.
15700 (main): Accept --version and --help options.
15701
aeb75bf5
DJ
157022008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
15703
15704 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
15705 (arm_breakpoint_at): Handle Thumb.
15706 (the_low_target): Add comment.
15707
76b233dd
UW
157082008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
15709
15710 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
15711
08388c79
DE
157122008-05-09 Doug Evans <dje@google.com>
15713
a3c83fae
DE
15714 * server.h (decode_search_memory_packet): Declare.
15715 * remote-utils.c (decode_search_memory_packet): New fn.
15716 * server.c (handle_search_memory_1): New fn.
08388c79
DE
15717 (handle_search_memory): New fn.
15718 (handle_query): Process qSearch:memory packets.
15719
bb9c3d36
UW
157202008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
15721
15722 * regcache.c (registers_length): Remove.
15723 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
15724 full register packet.
15725 * regcache.h (registers_length): Remove prototype.
15726 * server.h (PBUFSIZ): Define to 16384.
15727
7284e1be
UW
157282008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
15729
15730 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
15731 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
15732 powerpc-64l.o, and powerpc-altivec64l.o.
15733 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
15734 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
15735 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
15736 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
15737 rs6000/power-linux.xml, and rs6000/power64-linux.xml
15738 to srv_xmlfiles.
15739
15740 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
15741 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
15742 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
15743 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
15744 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
15745 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
15746 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
15747 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
15748 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
15749 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
15750 (clean): Update.
15751
15752 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
15753 (init_registers_powerpc_32l): ... this new prototype.
15754 (init_registers_powerpc_32): Remove, replace by ...
15755 (init_registers_powerpc_altivec32l): ... this new prototype.
15756 (init_registers_powerpc_e500): Remove, replace by ...
15757 (init_registers_powerpc_e500l): ... this new prototype.
15758 (init_registers_ppc64): Remove, replace by ...
15759 (init_registers_powerpc_64l): ... this new prototype.
15760 (init_registers_powerpc_64): Remove, replace by ...
15761 (init_registers_powerpc_altivec64l): ... this new prototype.
15762 (ppc_num_regs): Set to 73.
15763 (PT_ORIG_R3, PT_TRAP): Define if necessary.
15764 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
15765 (ppc_cannot_store_register): Handle orig_r3 and trap.
15766 (ppc_arch_setup): Update init_registers_... calls.
15767 (ppc_fill_gregset): Handle orig_r3 and trap.
15768
15769 * inferiors.c (clear_inferiors): Reset current_inferior.
15770
fdc59709
PB
157712008-04-23 Paolo Bonzini <bonzini@gnu.org>
15772
889bf7c5
PA
15773 * acinclude.m4: Add override.m4.
15774 * configure: Regenerate.
fdc59709 15775
c9b2f845
UW
157762008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
15777
15778 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
15779 initial call to init_register_ppc64.
15780
550512b8
UW
157812008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
15782
43aaf8b6
PA
15783 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
15784 single powerpc*-*-linux* case.
550512b8
UW
15785 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
15786
b6430ec3
UW
157872008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
15788
15789 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 15790 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
15791 from reg_xmlfiles.
15792 * linux-ppc-low.c: Include <elf.h>.
15793 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
15794 (ppc_hwcap): New global variable.
15795 (ppc_regmap): Remove __SPE__ #ifdef sections.
15796 (ppc_regmap_e500): New global variable.
15797 (ppc_cannot_store_register): Update __SPE__ special case.
15798 (ppc_get_hwcap): New function.
15799 (ppc_arch_setup): Use it to determine whether inferior supports
15800 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
15801 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
15802 Do not access registers if target does not support AltiVec.
15803 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
15804 Do not access registers if target does not support SPE.
15805 (target_regsets): Unconditionally include AltiVec and SPE regsets.
15806
52fa2412
UW
158072008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
15808
15809 * linux-low.c (disabled_regsets, num_regsets): New.
15810 (use_regsets_p): Delete.
15811 (linux_wait_for_process): Clear disabled_regsets.
15812 (regsets_fetch_inferior_registers): Check and set it.
15813 (regsets_store_inferior_registers): Likewise.
15814 (linux_fetch_registers, linux_store_registers): Do not use
15815 use_regsets_p.
15816 (initialize_low): Allocate disabled_regsets.
15817
e28b3332
DJ
158182008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
15819
15820 * Makefile.in (LIBOBJS): New.
15821 (OBS): Use LIBOBJS.
15822 (memmem.o): New rule.
15823 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
15824 * configure: Regenerated.
15825
4536995d
UW
158262008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
15827
15828 * server.c (handle_query): Never return "unsupported" for
15829 qXfer:features:read queries.
15830
221c031f
UW
158312008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
15832
15833 * server.c (get_features_xml): Fix inverted condition.
15834 (handle_query): Always support qXfer:feature:read.
15835
ccd213ac
DJ
158362008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
15837
15838 * server.c (wrapper_argv): New.
15839 (start_inferior): Handle wrapper_argv. If set, expect an extra
15840 trap.
15841 (gdbserver_usage): Document --wrapper.
15842 (main): Parse --wrapper.
15843
6fe305f7
UW
158442008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
15845
15846 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
15847 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
15848 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
15849 (ppc_set_pc): Likewise.
15850 (ppc_arch_setup): New function.
15851 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
15852 of collect_register.
889bf7c5 15853 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 15854
5b0a002e
UW
158552008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
15856
15857 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
15858 instead of linux-ppc64-low.o.
15859 * linux-ppc64-low.c: Remove file.
15860 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
15861 (linux-ppc64-low.o): Remove rule.
15862
15863 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
15864 (init_registers_powerpc_64): Likewise.
15865 (ppc_regmap): Conditionally define depending on __powerpc64__.
15866 (ppc_cannot_store_register): Do not special-case "fpscr" when
15867 compiled on __powerpc64__.
15868 (ppc_collect_ptrace_register): New function.
15869 (ppc_supply_ptrace_register): New function.
15870 (ppc_breakpoint): Change type to "unsigned int".
15871 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
15872 (the_low_target): Conditionally provide initializers for the
889bf7c5 15873 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
15874 collect_ptrace_register and supply_ptrace_register members.
15875
9b4b61c8
UW
158762008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
15877
15878 * regcache.h (gdbserver_xmltarget): Add extern declaration.
15879 * server.c (gdbserver_xmltarget): Define.
15880 (get_features_xml): Use it to replace "target.xml" and arch_string.
15881
15882 * configure.srv: Remove srv_xmltarget. Add XML files that were
15883 mentioned there to srv_xmlfiles instead. Remove conditional tests
15884 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
15885 srv_xmlfiles and srv_regobj to include all possible choices.
15886 * configure.ac (srv_xmltarget): Remove.
15887 (srv_xmlfiles): Do not add "target.xml".
15888 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
15889 checks for supplementary target information.
15890 * configure: Regenerate.
15891 * Makefile.in (XML_TARGET): Remove.
15892 (target.xml): Remove rule.
15893 (clean): Do not clean up target.xml.
15894 (.PRECIOUS): Do not mention target.xml.
15895
15896 * target.h (struct target_ops): Remove arch_string member.
15897 * linux-low.c (linux_arch_string): Remove.
15898 (linux_target_ops): Remove arch_string initializer.
15899 * linux-low.h (struct linux_target_ops): Remove arch_string member.
15900 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
15901 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
15902 * spu-low.c (spu_arch_string): Remove.
15903 (spu_target_ops): Remove arch_string initializer.
15904 * win32-low.c (win32_arch_string): Remove.
15905 (win32_target_ops): Remove arch_string initializer.
15906 * win32-low.h (struct win32_target_ops): Remove arch_string member.
15907 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
15908 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
15909
ee1a7ae4
UW
159102008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
15911
15912 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
15913 by collect_ptrace_register and supply_ptrace_register hooks.
15914 * linux-low.c (fetch_register): Use supply_ptrace_register callback
15915 instead of checking for the_low_target.left_pad_xfer.
15916 (usr_store_inferior_registers): Use collect_ptrace_register callback
15917 instead of checking for the_low_target.left_pad_xfer.
15918
15919 * linux-s390-low.c (s390_collect_ptrace_register): New function.
15920 (s390_supply_ptrace_register): Likewise.
15921 (s390_fill_gregset): Call s390_collect_ptrace_register.
15922 (the_low_target): Update.
15923
15924 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
15925 (ppc_supply_ptrace_register): Likewise.
15926 (the_low_target): Update.
15927
15928 * linux-i386-low.c (the_low_target): Update.
15929 * linux-x86-64-low.c (the_low_target): Update.
15930
d61ddec4
UW
159312008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
15932
15933 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
15934 reg-s390.o and reg-s390x.o.
15935
15936 * linux-low.c (new_inferior): New global variable.
15937 (linux_create_inferior, linux_attach): Set it.
15938 (linux_wait_for_process): Call the_low_target.arch_setup after the
15939 target has stopped for the first time.
15940 (initialize_low): Do not call the_low_target.arch_setup.
15941
15942 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
15943 (s390_set_pc): Likewise.
15944 (s390_arch_setup): New function.
15945 (the_low_target): Use s390_arch_setup as arch_setup routine.
15946
15947 * regcache.c (realloc_register_cache): New function.
15948 (set_register_cache): Call it for each existing regcache.
15949
d05b4ac3
UW
159502008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
15951
15952 * server.h (init_registers): Remove prototype.
15953
15954 * linux-low.h (struct linux_target_ops): Add arch_setup field.
15955 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
15956 instead of init_registers ().
15957 * linux-arm-low.c (init_registers_arm): Add prototype.
15958 (init_registers_arm_with_iwmmxt): Likewise.
15959 (the_low_target): Add initializer for arch_setup field.
15960 * linux-cris-low.c (init_registers_cris): Add prototype.
15961 (the_low_target): Add initializer for arch_setup field.
15962 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
15963 (the_low_target): Add initializer for arch_setup field.
15964 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
15965 (the_low_target): Add initializer for arch_setup field.
15966 * linux-ia64-low.c (init_registers_ia64): Add prototype.
15967 (the_low_target): Add initializer for arch_setup field.
15968 * linux-m32r-low.c (init_registers_m32r): Add prototype.
15969 (the_low_target): Add initializer for arch_setup field.
15970 * linux-m68k-low.c (init_registers_m68k): Add prototype.
15971 (the_low_target): Add initializer for arch_setup field.
15972 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
15973 (init_registers_mips64_linux): Likewise.
15974 (the_low_target): Add initializer for arch_setup field.
15975 * linux-ppc-low.c (init_registers_ppc): Add prototype.
15976 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
15977 (the_low_target): Add initializer for arch_setup field.
15978 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
15979 (init_registers_powerpc_64): Likewise.
15980 (the_low_target): Add initializer for arch_setup field.
15981 * linux-s390-low.c (init_registers_s390): Add prototype.
15982 (init_registers_s390x): Likewise.
15983 (the_low_target): Add initializer for arch_setup field.
15984 * linux-sh-low.c (init_registers_sh): Add prototype.
15985 (the_low_target): Add initializer for arch_setup field.
15986 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
15987 (the_low_target): Add initializer for arch_setup field.
15988 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
15989 (the_low_target): Add initializer for arch_setup field.
15990
15991 * win32-low.h (struct win32_target_ops): Add arch_setup field.
15992 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
15993 instead of init_registers ().
15994 * win32-arm-low.c (init_registers_arm): Add prototype.
15995 (the_low_target): Add initializer for arch_setup field.
15996 * win32-i386-low.c (init_registers_i386): Add prototype.
15997 (the_low_target): Add initializer for arch_setup field.
15998
15999 * spu-low.c (init_registers_spu): Add prototype.
16000 (initialize_low): Call initialie_registers_spu () instead of
16001 initialize_registers ().
16002
fd96d250
PA
160032008-02-19 Pedro Alves <pedro@codesourcery.com>
16004
16005 * server.c (handle_v_requests): When handling the vRun and vAttach
16006 packets, if already debugging a process, don't kill it. Return an
16007 error instead.
16008
d41b6bb4
DJ
160092008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
16010
16011 * server.c (handle_query): Correct length check.
16012
5ac588cf
PA
160132008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
16014
16015 * win32-low.c (do_initial_child_stuff): Add process handle
16016 parameter. Set current_process_handle and current_process_id from the
16017 parameters. Clear globals.
16018 (win32_create_inferior): Don't set current_process_handle and
16019 current_process_id here. Instead pass them on the call to
16020 do_initial_child_stuff.
16021 (win32_attach): Likewise.
16022 (win32_clear_inferiors): New.
16023 (win32_kill): Don't close the current process handle or the
16024 current thread handle here. Instead call win32_clear_inferiors.
16025 (win32_detach): Don't open a new handle to the process. Call
16026 win32_clear_inferiors.
16027 (win32_join): Don't rely on current_process_handle; open a new
16028 handle using the process id.
16029 (win32_wait): Call win32_clear_inferiors when the inferior process
16030 has exited.
16031
ecd7ecbc
DJ
160322008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
16033
16034 * server.c (monitor_show_help): Add "exit".
16035
1525d545
MG
160362008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
16037
ecd7ecbc 16038 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
16039 (clean): Add reg-xtensa.c.
16040 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
16041 * configure.srv (xtensa*-*-linux*) New target.
16042 * linux-xtensa-low.c: New.
16043 * xtensa-xtregs.c: New.
1525d545 16044
59a016f0
PA
160452008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
16046
16047 * hostio.c: Don't include errno.h.
16048 (errno_to_fileio_errno): Move to hostio-errno.
16049 * hostio.c: (hostio_error): Remove the error parameter. Defer the
16050 error number outputting to the target->hostio_last_error callback.
16051 (hostio_packet_error): Use FILEIO_EINVAL directly.
16052 (handle_open, handle_pread, hostio_error, handle_unlink): Update
16053 calls to hostio_error.
16054 * hostio-errno.c: New.
16055 * server.h (hostio_last_error_from_errno): Declare.
16056 * target.h (target_ops): Add hostio_last_error member.
16057 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
16058 as hostio_last_error handler.
889bf7c5 16059 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
16060 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
16061 (wince_hostio_last_error): New functions.
16062 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
16063 as hostio_last_error handler.
16064 (win32_target_ops) [!_WIN32_WCE]: Register
16065 hostio_last_error_from_errno as hostio_last_error handler.
16066 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
16067 (hostio-errno.o): New rule.
16068 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
16069 * configure.srv (srv_hostio_err_objs): New variable. Default to
16070 hostio-errno.o.
16071 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
16072 * configure: Regenerate.
16073
2d717e4f
DJ
160742008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
16075
16076 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
16077 (linux_kill, linux_detach): Clean up the process list.
16078 * remote-utils.c (remote_open): Improve port number parsing.
16079 (putpkt_binary, input_interrupt): Only send interrupts if the target
16080 is running.
16081 * server.c (extended_protocol): Make static.
16082 (attached): Define earlier.
16083 (exit_requested, response_needed, program_argv): New variables.
16084 (target_running): New.
16085 (start_inferior): Clear attached here.
16086 (attach_inferior): Set attached here.
16087 (require_running): Define.
16088 (handle_query): Use require_running and target_running. Implement
16089 "monitor exit".
16090 (handle_v_attach, handle_v_run): New.
16091 (handle_v_requests): Use require_running. Handle vAttach and vRun.
16092 (gdbserver_usage): Update.
16093 (main): Redo argument parsing. Handle --debug and --multi. Handle
16094 --attach along with other options or after the port. Save
16095 program_argv. Support no initial program. Resynchronize
16096 communication with GDB after an error. Handle "monitor exit".
16097 Use require_running and target_running. Always allow the extended
16098 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
16099 restart in extended mode.
16100 * README: Refer to the GDB manual. Update --attach usage.
16101
7407e2de
AS
161022007-12-20 Andreas Schwab <schwab@suse.de>
16103
16104 * linux-low.c (STACK_SIZE): Define.
16105 (linux_tracefork_child): Use it. Use __clone2 on ia64.
16106 (linux_test_for_tracefork): Likewise.
16107
b65d95c5
DJ
161082007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
16109
16110 * linux-low.c (linux_wait_for_event): Update messages. Do not
16111 reinsert auto-delete breakpoints.
16112 * mem-break.c (struct breakpoint): Change return type of handler to
16113 int.
16114 (set_breakpoint_at): Update handler type.
16115 (reinsert_breakpoint_handler): Return 1 instead of calling
16116 delete_breakpoint.
16117 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
16118 setting a new one.
16119 (check_breakpoints): Delete auto-delete breakpoints and return 2.
16120 * mem-break.h (set_breakpoint_at): Update handler type.
16121 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
16122 * win32-low.c (auto_delete_breakpoint): New.
16123 (get_child_debug_event): Use it.
16124
4e799345
DJ
161252007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
16126
16127 * configure.ac: Check for pread and pwrite.
16128 * hostio.c (handle_pread): Fall back to lseek and read.
16129 (handle_pwrite): Fall back to lseek and write.
16130 * config.in, configure: Regenerated.
16131
27524b67
DJ
161322007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
16133
16134 * server.c (myresume): Add own_buf argument.
16135 (main): Update calls.
16136
a20d5e98
DJ
161372007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
16138
16139 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
16140 * remote-utils.c (remote_open): Do not call disable_async_io.
16141 (block_async_io): Delete.
16142 (unblock_async_io): Make static.
16143 (initialize_async_io): New.
16144 * server.c (handle_v_cont): Handle async I/O here.
16145 (myresume): Likewise. Move other common resume tasks here...
16146 (main): ... from here. Call initialize_async_io. Disable async
16147 I/O before the main loop.
16148 * server.h (initialize_async_io): Declare.
16149 (block_async_io, unblock_async_io): Delete prototypes.
16150 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
16151
b79d787e
DJ
161522007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
16153
16154 * remote-utils.c (readchar): Allow binary data in received messages.
16155
d97903b2
PA
161562007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
16157
16158 * win32-low.c (attaching): New global.
16159 (win32_create_inferior): Clear the `attaching' global.
16160 (win32_attach): Set the `attaching' global.
16161 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
16162 attaching. Only set a breakpoint at the entry point if not
16163 attaching.
16164
311de423
PA
161652007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
16166
16167 * server.c (main): Don't report dll events on the initial
16168 connection on attaches.
16169
6c2d16d2
PA
161702007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
16171
16172 * server.c (main): Relax numerical bases supported for the pid of
16173 the --attach command line argument.
16174
5ca906e6
PA
161752007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
16176
16177 * win32-low.c (win32_attach): Call OpenProcess before
16178 DebugActiveProcess, not after. Add last error output to error
16179 call.
16180
9c6c8194
PA
161812007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
16182
16183 * win32-low.c (win32_get_thread_context)
16184 (win32_set_thread_context): New functions.
16185 (thread_rec): Use win32_get_thread_context.
16186 (continue_one_thread, win32_resume): Use win32_set_thread_context.
16187 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
16188 field.
16189
4d5d1aaa
PA
161902007-12-03 Leo Zayas
16191 Pedro Alves <pedro_alves@portugalmail.pt>
16192
16193 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
16194 global variables.
16195 (child_add_thread): Minor cleanup.
16196 (child_continue): Resume artificially suspended threads before
16197 calling ContinueDebugEvent.
16198 (suspend_one_thread): New.
16199 (fake_breakpoint_event): New.
16200 (get_child_debug_event): Change return type to int. Check here if
16201 gdb sent an interrupt request. If a soft interrupt was requested,
16202 fake a breakpoint event. Return 0 if there is no event to handle,
16203 and 1 otherwise.
16204 (win32_wait): Don't check here if gdb sent an interrupt request.
16205 Ensure there is a valid event to handle.
16206 (win32_request_interrupt): Add soft interruption method as last
16207 resort.
16208
c436e841
PA
162092007-12-03 Leo Zayas
16210 Pedro Alves <pedro_alves@portugalmail.pt>
16211
16212 * win32-low.h (win32_thread_info): Add descriptions to the
16213 structure members. Replace `suspend_count' counter by a
16214 `suspended' flag.
16215 * win32-low.c (thread_rec): Update condition of when to get the
16216 context from the inferior. Rely on ContextFlags being set if it
16217 has already been retrieved. Only suspend the inferior thread if
16218 we haven't already. Warn if that fails.
16219 (continue_one_thread): s/suspend_count/suspended/. Only call
16220 ResumeThread once. Warn if that fails.
16221
e7b5fa67
PA
162222007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
16223
16224 * win32-low.c (win32_wait): Don't read from the inferior when it
16225 has already exited.
16226
a385171d
PA
162272007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
16228
16229 * Makefile.in (win32_low_h): New variable.
16230 (win32-low.o): Add dependency on $(win32_low_h).
16231 (win32-arm-low.o, win32-i386-low.o): New rules.
16232
f80c84b3
DJ
162332007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
16234
16235 * hostio.c: Correct copyright year.
16236
a6b151f1
DJ
162372007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
16238
16239 * Makefile.in (OBS): Add hostio.o.
16240 (hostio.o): New rule.
16241 * server.h (handle_vFile): Declare.
16242 * hostio.c: New file.
16243 * server.c (handle_v_requests): Take packet_len and new_packet_len
16244 for binary packets. Call handle_vFile.
16245 (main): Update call to handle_v_requests.
16246
f9387fc3
DJ
162472007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
16248
16249 * linux-low.c: Include <sched.h>.
16250
51c2684e
DJ
162512007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
16252
16253 * linux-low.c (linux_tracefork_grandchild): New.
16254 (linux_tracefork_child): Use clone.
16255 (linux_test_for_tracefork): Use clone; allocate and free a stack.
16256
75f83163
JB
162572007-10-31 Joel Brobecker <brobecker@adacore.com>
16258
16259 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
16260
da5898ce
DJ
162612007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
16262
16263 * linux-low.c (handle_extended_wait): Handle unexpected signals.
16264
24a09b5f
DJ
162652007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
16266
16267 * inferiors.c (change_inferior_id): Delete.
16268 (add_pid_to_list, pull_pid_from_list): New.
16269 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
16270 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
16271 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
16272 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
16273 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
16274 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
16275 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
16276 (using_threads): Always set to 1.
16277 (handle_extended_wait): New.
16278 (add_process): Do not set TID.
16279 (linux_create_inferior): Set must_set_ptrace_flags.
16280 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
16281 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
16282 (linux_thread_alive): Rename TID argument to LWPID.
16283 (linux_wait_for_process): Handle unknown processes. Do not use TID.
16284 (linux_wait_for_event): Do not use TID or check using_threads. Update
16285 call to dead_thread_notify. Call handle_extended_wait.
16286 (linux_create_inferior): Use PTRACE_SETOPTIONS.
16287 (send_sigstop): Delete sigstop_sent.
16288 (wait_for_sigstop): Avoid TID.
16289 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
16290 (linux_test_for_tracefork): New.
16291 (linux_lookup_signals): Use thread_db_active and
16292 linux_supports_tracefork_flag.
16293 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
16294 * linux-low.h (get_process_thread): Avoid TID.
16295 (struct process_ifo): Move thread_known and tid to the end. Remove
16296 sigstop_sent.
16297 (linux_attach_lwp, thread_db_init): Update prototypes.
16298 * server.h (change_inferior_id): Delete prototype.
16299 (add_pid_to_list, pull_pid_from_list): New prototypes.
16300 * thread-db.c (thread_db_use_events): New.
16301 (find_first_thread): Rename to...
16302 (find_one_thread): ...this. Update callers and messages. Do not
16303 call fatal. Check thread_db_use_events. Do not call
16304 change_inferior_id or new_thread_notify.
16305 (maybe_attach_thread): Update. Do not call new_thread_notify.
16306 (thread_db_init): Set thread_db_use_events. Check use_events.
16307 * utils.c (fatal, warning): Correct message prefix.
16308
30ed0a8f
DJ
163092007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
16310
16311 * Makefile.in (clean): Remove new files.
16312 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
16313 (powerpc-64.o, powerpc-64.c): New rules.
16314 * configure.srv: Use alternate register sets for powerpc64-*-linux*
16315 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
16316 with SPE.
16317 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
16318 SPE targets.
16319 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
16320 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
16321 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
16322 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
16323 (target_regsets): Add AltiVec and SPE register sets.
16324 * configure.ac: Check for AltiVec and SPE.
16325 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
16326 (ppc_fill_vrregset, ppc_store_vrregset): New.
16327 (target_regsets): Add AltiVec register set.
16328 * configure: Regenerated.
16329
fd462a61
DJ
163302007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
16331
16332 * linux-low.c (O_LARGEFILE): Define.
16333 (linux_read_memory): Use /proc/PID/mem.
16334 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
16335 * configure, config.in: Regenerated.
16336
69f223ed
DJ
163372007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
16338
16339 * linux-low.c (linux_wait_for_event): Do not pass signals while
16340 single-stepping.
16341
aec18585
PA
163422007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
16343
16344 * win32-low.c (create_process): New.
16345 (win32_create_inferior): Use create_process instead of
16346 CreateProcess. If create_process failed retry appending an ".exe"
16347 suffix. Store the GetLastError result immediatelly after
16348 create_process calls and use it on the call to error.
16349
34d86ddd
PA
163502007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
16351
16352 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
16353
5a0e3bd0
JB
163542007-08-23 Joel Brobecker <brobecker@adacore.com>
16355
16356 * configure.ac: Switch license to GPLv3.
16357
f88c79e6
MS
163582007-08-01 Michael Snyder <msnyder@access-company.com>
16359
16360 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
16361
6b3d9b83
PA
163622007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
16363
16364 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
16365 typedef.
16366 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
16367 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
16368 CloseToolhelp32Snapshot.
16369 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
16370 CloseToolhelp32Snapshot.
16371
c588c53c
MS
163722007-07-27 Michael Snyder <michael.snyder@access-company.com>
16373
16374 * server.c (main): Check for inferior exit before main loop.
16375
aa0403d9
PA
163762007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
16377
16378 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
16379 instead of on tmp_desc.
16380
255e7678
DJ
163812007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
16382 Daniel Jacobowitz <dan@codesourcery.com>
16383
16384 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
16385 (add_thread): Minor cleanups.
16386 (clear_inferiors): Move lower in the file. Clear the DLL
16387 list.
16388 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
16389 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
16390 (xml_escape_text): New.
16391 * server.c (handle_query): Handle qXfer:libraries:read. Report it
16392 for qSupported.
16393 (handle_v_cont): Report errors.
16394 (gdbserver_version): Update.
16395 (main): Correct size of own_buf. Do not report initial DLL events.
16396 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
16397 (unloaded_dll, xml_escape_text): New.
16398 * win32-low.c (enum target_waitkind): Update comments.
16399 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
16400 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
16401 (win32_EnumProcessModules, win32_GetModuleInformation)
16402 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
16403 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
16404 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
16405 (win32_Module32First, win32_Module32Next, load_toolhelp)
16406 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
16407 (get_child_debug_event): Handle DLL events.
16408 (win32_wait): Likewise.
16409
0d37add9
DJ
164102007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
16411
16412 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
16413 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
16414
45e2715e
PA
164152007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
16416
16417 * win32-low.c (handle_output_debug_string): Ignore event if not
16418 waiting.
16419
c5674cf1
PA
164202007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
16421
16422 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
16423
2bbe3cc1
DJ
164242007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
16425
16426 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
16427
ae13219e
DJ
164282007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
16429
16430 * inferiors.c (change_inferior_id): Add comment.
16431 * linux-low.c (check_removed_breakpoint): Add an early
16432 prototype. Improve debug output.
16433 (linux_attach): Doc update.
16434 (linux_detach_one_process, linux_detach): Clean up before releasing
16435 each process.
16436 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
16437 * linux-low.h (struct process_info): Doc improvement.
16438 * mem-break.c (delete_all_breakpoints): New.
16439 * mem-break.h (delete_all_breakpoints): New prototype.
16440 * thread-db.c (find_first_thread): New.
16441 (thread_db_create_event): Call it instead of
16442 thread_db_find_new_threads. Clean up unused variables.
16443 (maybe_attach_thread): Remove first thread handling.
16444 (thread_db_find_new_threads): Use find_first_thread.
16445 (thread_db_get_tls_address): Likewise.
16446
4105de34
DJ
164472007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
16448
16449 * thread-db.c (thread_db_find_new_threads): Add prototype.
16450 (thread_db_create_event): Check for the main thread before adding
16451 a new thread.
16452 (maybe_attach_thread): Only enable event reporting if TID == 0.
16453 (thread_db_get_tls_address): Check for new threads.
16454
2b876972
DJ
164552007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
16456
16457 * linux-low.c (linux_create_inferior): Try execv before execvp.
16458 * spu-low.c (spu_create_inferior): Likewise.
16459
7a245884
DJ
164602007-06-13 Mike Frysinger <vapier@gentoo.org>
16461
16462 * linux-low.c (linux_create_inferior): Change execv to execvp.
16463 * spu-low.c (spu_create_inferior): Likewies.
16464
117ce543
DJ
164652007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
16466
16467 * Makefile.in (clean): Clean new files instead of deleted ones.
16468 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
16469 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
16470 rules.
16471 * configure.srv: Specify XML files and new regformats for MIPS and
16472 MIPS64 GNU/Linux.
16473 * linux-mips-low.c (mips_num_regs): Set to only used registers.
16474 (mips_regmap): Do not fetch $0. Remove unused registers. Add
16475 an entry for the restart register.
16476 (mips_cannot_fetch_register, mips_cannot_store_register)
16477 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
16478 register names to match the XML descriptions.
16479 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
16480 restart register instead of $0.
16481
0e7f50da
UW
164822007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
16483 Markus Deuling <deuling@de.ibm.com>
16484
16485 * remote-utils.c (decode_xfer_write): New function.
16486 * server.h (decode_xfer_write): Add prototype.
16487 * server.c (handle_query): Add PACKET_LEN argument. Support
16488 qXfer:spu:read and qXfer:spu:write packets.
16489 (main): Pass packet_len to handle_query.
16490 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
16491 * target.h (target_ops): Add qxfer_spu.
16492
374c1d38
UW
164932007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
16494
16495 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
16496 accessing non-seekable spufs files.
16497
bb63802a
UW
164982007-05-16 Markus Deuling <deuling@de.ibm.com>
16499
889bf7c5 16500 * server.c (handle_query): Add reply for qC packet.
bb63802a 16501
7390519e
PA
165022007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16503 Leo Zayas <lerele@champenstudios@com>
16504
16505 * server.h (check_remote_input_interrupt_request): New function.
16506 * remote_utils.c (INVALID_DESCRIPTOR): New define.
16507 (remote_desc): Initialize with INVALID_DESCRIPTOR.
16508 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
16509 (check_remote_input_interrupt_request): New function.
16510 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 16511 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
16512 winapi_GenerateConsoleCtrlEvent): New typedefs.
16513 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
16514 to 250 ms.
16515 (win32_wait): Check for remote interrupt request
16516 with check_remote_input_interrupt_request.
16517 (win32_request_interrupt): New function.
16518 (win32_target_op): Set request_interrupt to win32_request_interrupt.
16519
34b34921
PA
165202007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16521
16522 * win32-low.c (debug_registers_changed,
16523 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
16524 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
16525 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
16526 (thread_rec): Get context using the low target.
16527 (child_add_thread): Call thread_added on the low target,
16528 which does the same thing.
16529 (regptr): Delete.
16530 (do_initial_child_stuff): Remove debug registers references.
16531 Set context using the low target. Resume threads after
16532 setting the contexts.
16533 (child_continue): Remove dead variable. Remove debug
16534 registers references.
16535 (child_fetch_inferior_registers): Go through the low target.
16536 (do_child_store_inferior_registers): Remove.
16537 (child_store_inferior_registers): Go through the low target.
16538 (win32_resume): Remove debug registers references.
16539 Set context using the low target.
16540 (handle_exception): Change return type to void. Don't record
16541 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
16542 first chance exception.
889bf7c5 16543 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
16544 goto loop. Always return after waiting for debug event.
16545 (win32_wait): Convert to switch statement. Handle spurious
16546 events.
16547
16548 * win32-i386-low.c (debug_registers_changed,
16549 debug_registers_used): New.
16550 (initial_stuff): Rename to ...
16551 (i386_initial_stuff): ... this. Clear debug registers
16552 state variables.
16553 (store_debug_registers): Delete.
16554 (i386_get_thread_context): New.
16555 (load_debug_registers): Delete.
16556 (i386_set_thread_context): New.
16557 (i386_thread_added): New.
16558 (single_step): Rename to ...
16559 (i386_single_step): ... this.
16560 (do_fetch_inferior_registers): Rename to ...
16561 (i386_fetch_inferior_register): ... this.
16562 (i386_store_inferior_register): New.
16563 (the_low_target): Adapt to new interface.
16564
16565 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
16566 (arm_get_thread_context): New.
16567 (arm_set_thread_context): New.
16568 (regptr): New.
16569 (do_fetch_inferior_registers): Rename to ...
16570 (arm_fetch_inferior_register): ... this.
16571 (arm_store_inferior_register): New.
16572 (arm_wince_breakpoint): Reimplement as unsigned long.
16573 (arm_wince_breakpoint_len): Define.
16574 (the_low_target): Adapt to new interface.
16575
16576 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
16577 load_debug_registers. Add get_thread_context, set_thread_context,
16578 thread_added and store_inferior_register. Rename
16579 fetch_inferior_registers to fetch_inferior_register.
16580 (regptr): Remove declaration.
16581
dd6953e1
PA
165822007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16583
16584 * linux-low.c (linux_detach): Change return type to int. Return 0.
16585 * spu-low.c (spu_detach): Likewise.
16586
444d6139
PA
165872007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16588
16589 * target.h (target_ops): Change return type of detach to int.
16590 Add join.
16591 (join_inferior): New.
16592 * server.c (main): Don't skip detach support on mingw32.
16593 If the inferior doesn't support detaching return error.
16594 Call join_inferior instead of using waitpid.
16595 * linux-low.c (linux_join): New.
16596 (linux_target_op): Add linux_join.
16597 * spu-low.c (spu_join): New.
16598 (spu_target_ops): Add spu_join.
16599 * win32-low.c (win32_detach): Adapt to new interface.
16600 Reopen current_process_handle before detaching. Issue a child
16601 resume before detaching.
16602 (win32_join): New.
16603 (win32_target_op): Add win32_join.
16604
1d5315fe
PA
166052007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16606
16607 * win32-low.c (win32-attach): Fix return value.
16608 * target.h (target_ops): Describe ATTACH return values.
16609
bf914831
PA
166102007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16611
16612 * win32-low.c (GETPROCADDRESS): Define.
16613 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
16614 (winapi_DebugSetProcessKillOnExit): Likewise.
16615 (win32_create_inferior): Force usage of ansi CreateProcessA.
16616 (win32_attach): Use GETPROCADDRESS.
16617 (win32_detach): Likewise.
16618
f72f3e60
PA
166192007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16620
16621 * win32-low.c (win32_wait): Don't use WSTOPSIG.
16622
ed50f18f
PA
166232007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
16624
16625 * win32-low.c: Commit leftover changes from 2007-03-29.
16626
0c2ead7e
DJ
166272007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
16628
16629 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
16630 fields short instead of int. Add explicit padding.
16631 (i387_cache_to_fsave): Remove unnecessary casts.
16632 (i387_fsave_to_cache): Doc fix.
16633 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
16634
73725ff3
DJ
166352007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
16636
16637 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
16638 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
16639
d99f33d8
PA
166402007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
16641
16642 * configure.srv (arm*-*-mingw32ce*): Move near the other
16643 arm targets.
16644
68070c10
PA
166452007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
16646
2482afc6 16647 * configure.ac: Add errno checking.
68070c10
PA
16648 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
16649 sys/file.h and malloc.h.
16650 (AC_CHECK_DECLS): Add perror.
16651 (srv_mingwce): Handle.
2482afc6 16652 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
16653 win32-i386-low.o to srv_tgtobj.
16654 (i[34567]86-*-mingw*): Likewise.
16655 (arm*-*-mingw32ce*): Add case.
16656 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
16657 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
16658 [__MINGW32CE__] (strerror): New function.
16659 [__MINGW32CE__] (errno): Define to GetLastError.
16660 [__MINGW32CE__] (COUNTOF): New macro.
16661 (remote_open): Remove extra close call.
16662 * mem-break.c (delete_breakpoint_at): New function.
16663 * mem-break.h (delete_breakpoint_at): Declare.
16664 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
16665 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
16666 [USE_WIN32API] (read, write): Add char* casts.
16667 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
16668 * server.h: Include wincecompat.h on Windows CE.
16669 [HAVE_ERRNO_H]: Check.
16670 (perror): Declare if not declared.
16671 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
16672 (perror_with_name): Remove errno declaration.
16673 * wincecompat.h: New.
16674 * wincecompat.c: New.
16675 * win32-low.h: New.
16676 * win32-arm-low.c: New.
16677 * win32-i386-low.c: New.
16678 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
16679 (OUTMSG2): Make it safe.
16680 (_T): New macro.
16681 (COUNTOF): New macro.
16682 (NUM_REGS): Get it from the low target.
16683 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
16684 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
16685 (thread_rec): Let low target handle debug registers.
16686 (child_add_thread): Likewise.
16687 (child_init_thread_list): Likewise.
16688 (continue_one_thread): Likewise.
16689 (regptr): New.
16690 (do_child_fetch_inferior_registers): Move to ...
16691 * win32-i386-low.c: ... here, and rename to ...
16692 (do_fetch_inferior_registers): ... this.
889bf7c5 16693 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
16694 Go through the low target.
16695 (do_child_store_inferior_registers): Use regptr.
16696 (strwinerror): New function.
16697 (win32_create_inferior): Handle Windows CE.
16698 Use strwinerror instead of strerror on Windows error
16699 codes. Add program to the error output.
16700 Don't close the main thread handle on Windows CE.
16701 (win32_attach): Use coredll.dll on Windows CE.
16702 (win32_kill): Close current process and current
16703 thread handles.
16704 (win32_detach): Use coredll.dll on Windows CE.
16705 (win32_resume): Let low target handle debug registers, and
16706 step request.
16707 (handle_exception): Add/Remove initial breakpoint. Avoid
16708 non-existant WSTOPSIG on Windows CE.
16709 (win32_read_inferior_memory): Cast to remove warning.
16710 (win32_arch_string): Go through the low target.
16711 (initialize_low): Call set_breakpoint_data with the low
16712 target's breakpoint.
16713 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
16714 FOP_REGNUM, mappings): Move to ...
16715 * win32-i386-low.c: ... here.
16716 * win32-low.c (win32_thread_info): Move to ...
16717 * win32-low.h: ... here.
16718 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
16719 win32-arm-low.c and wincecompat.c.
16720 (all:): Add $EXEEXT.
16721 (install-only:): Likewise.
16722 (gdbserver:): Likewise.
16723 (gdbreplay:): Likewise.
16724 * config.in: Regenerate.
16725 * configure: Regenerate.
16726
41093d81
PA
167272007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
16728
16729 * win32-low.c: Rename typedef thread_info to
16730 win32_thread_info throughout.
16731
544afa54
PA
167322007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
16733
16734 * win32-i386-low.c: Rename to ...
16735 * win32-low.c: ... this.
16736 * configure.srv: Replace win32-i386-low.o with win32-low.o.
16737 * Makefile.in: Likewise.
16738
bce7165d
PA
167392007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
16740
16741 * remote-utils.c (monitor_output): Constify msg parameter.
16742 * server.h (monitor_output): Likewise.
16743 * win32-i386-low.c (handle_output_debug_string): New.
16744 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
16745 handle_output_debug_string.
16746 (get_child_debug_event): Likewise.
16747
506c7aa0
DJ
167482007-03-27 Mat Hostetter <mat@lcs.mit.edu>
16749
16750 * server.c (main): Correct strtoul check.
16751
42c81e2a
DJ
167522007-03-27 Jon Ringle <jon@ringle.org>
16753
16754 * linux-low.c: Check __ARCH_HAS_MMU__ also.
16755
9453113a
DJ
167562007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
16757
16758 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
16759
64a69107
DJ
167602007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
16761
16762 * terminal.h: Check HAVE_SGTTY_H.
16763
167642007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
16765
16766 * remote-utils.c (remote_open): Print out the assigned port number.
16767
c74d0ad8
DJ
167682007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
16769
16770 * remote-utils.c (monitor_output): New function.
16771 * server.c (debug_threads): Define here.
16772 (monitor_show_help): New function.
16773 (handle_query): Handle qRcmd.
16774 (main): Do not handle 'd' packet.
16775 * server.h (debug_threads, remote_debug, monitor_output): Declare.
16776 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
16777 of debug_threads.
16778
de7c3b4a
PA
167792007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
16780
16781 * Makefile.in (EXEEXT): New.
16782 (clean): Use $(EXEEXT).
16783
ef57601b
PA
167842007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
16785
16786 * target.h (target_ops): Rename send_signal to request_interrupt,
16787 and remove enum target_signal parameter.
16788 * linux-low.c (linux_request_interrupt): Rename from
16789 linux_send_signal, and always send SIGINT.
16790 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
16791 and always send SIGINT.
16792 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
16793 of send_signal.
16794 (input_interrupt): Likewise.
16795
820f2bda
PA
167962007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
16797
16798 * server.c (get_features_xml): Check if target implemented
16799 arch_string.
16800 * win32-i386-low.c (win32_arch_string): New.
16801 (win32_target_ops): Add win32_arch_string as arch_string member.
16802
ab39bf24
UW
168032007-02-22 Markus Deuling <deuling@de.ibm.com>
16804
16805 * spu-low.c (spu_arch_string): New.
16806 (spu_target_ops): Add spu_arch_string.
16807
61ff6e04
DJ
168082007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
16809
16810 * remote-utils.c: Remove HAVE_TERMINAL_H check.
16811 * configure.ac: Do not check for terminal.h.
16812 * configure, config.in: Regenerated.
16813
fb1e4ffc
DJ
168142007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
16815
16816 * Makefile.in (OBS): Add $(XML_BUILTIN).
16817 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
16818 (clean): Update.
16819 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
16820 (arm-with-iwmmxt.c): New.
16821 * config.in, configure: Regenerate.
16822 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
16823 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
16824 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
16825 (arm*-*-linux*): Add iWMMXt and regset support.
16826 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
16827 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
16828 (arm_store_wmmxregset, target_regsets): New.
16829 * server.c (get_features_xml): Take annex argument. Check builtin
16830 XML documents.
16831 (handle_query): Handle multiple annexes.
16832
0f48aa01
DJ
168332007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
16834
16835 * remote-utils.c [USE_WIN32API] (read, write): Define.
16836 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
16837 write.
16838
23181151
DJ
168392007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
16840
16841 * linux-i386-low.c (the_low_target): Set arch_string.
16842 * linux-x86-64-low.c (the_low_target): Likewise.
16843 * linux-low.c (linux_arch_string): New.
16844 (linux_target_ops): Add it.
16845 * linux-low.h (struct linux_target_ops): Add arch_string.
16846 * server.c (write_qxfer_response): Use const void * for DATA.
16847 (get_features_xml): New.
16848 (handle_query): Handle qXfer:features:read. Report it for qSupported.
16849 * target.h (struct target_ops): Add arch_string method.
16850
9d606399
DJ
168512007-01-03 Denis Pilat <denis.pilat@st.com>
16852 Daniel Jacobowitz <dan@codesourcery.com>
16853
16854 * linux-low.c (linux_kill): Handle being called with no threads.
16855 * win32-i386-low.c (win32_kill): Likewise.
16856 (get_child_debug_event): Clear current_process_handle.
16857
168582006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
16859 Daniel Jacobowitz <dan@codesourcery.com>
16860
16861 * remote-utils.c (remote_open): Check the type of specified
16862 serial port devices before opening them.
16863 * server.c (main): Kill the inferior if an error occurs during
16864 the first remote_open.
16865
a5e13d24
DJ
168662006-12-05 Markus Deuling <deuling@de.ibm.com>
16867
16868 * README: Update supported targets.
16869
186947f7
DJ
168702006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
16871
16872 * Makefile.in (clean): Remove reg-mips64.c.
16873 (reg-mips64.c, reg-mips64.o): New rules.
16874 * configure.srv: Handle mips64. Include regset support for mips.
16875 * linux-mips-low.c (union mips_register): New.
16876 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
16877 (mips_breakpoint, mips_breakpoint_at): Use int.
16878 (mips_collect_register, mips_supply_register)
16879 (mips_collect_register_32bit, mips_supply_register_32bit)
16880 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
16881 (mips_store_fpregset, target_regsets): New.
16882 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
16883
a13e2c95
UW
168842006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
16885
16886 * configure.srv: Add target "spu*-*-*".
16887 * Makefile.in (clean): Remove reg-spu.c.
16888 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
16889 * spu-low.c: New file.
16890
cb7283db
DJ
168912006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
16892
16893 * configure.ac: Correct td_thr_tls_get_addr test.
16894 * configure: Regenerated.
16895
89be2091
DJ
168962006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
16897
16898 * linux-low.c (linux_wait_for_event): Reformat. Use the
16899 pass_signals array.
16900 * remote-utils.c (decode_address_to_semicolon): New.
16901 * server.c (pass_signals, handle_general_set): New.
16902 (handle_query): Mention QPassSignals for qSupported.
16903 (main): Call handle_general_set.
16904 * server.h (pass_signals, decode_address_to_semicolon): New.
16905
000ef4f0
DJ
169062006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
16907
16908 * server.c (handle_query): Correct error handling for read_auxv.
16909
b7149293
UW
169102005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
16911
16912 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
16913 and srv_linux_thread_db to yes.
16914 * linux-s390-low.c (s390_fill_gregset): New function.
16915 (target_regsets): Define data structure.
16916
dae5f5cf
DJ
169172006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
16918
16919 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
16920 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
16921 * config.in, configure: Regenerated.
16922 * inferiors.c (gdb_id_to_thread): New function.
16923 (gdb_id_to_thread_id): Use it.
16924 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
16925 * linux-low.h (struct process_info): Add th member.
16926 (thread_db_get_tls_address): New prototype.
16927 * remote-utils.c (decode_address): Make non-static.
16928 * server.c (handle_query): Handle qGetTLSAddr.
16929 * server.h (gdb_id_to_thread, decode_address): New prototypes.
16930 * target.h (struct target_ops): Add get_tls_address.
16931 * thread-db.c (maybe_attach_thread): Save the thread handle.
16932 (thread_db_get_tls_address): New.
16933
32ca6d61
DJ
169342006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
16935
16936 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
16937 (linux_resume_one_process): Take a siginfo_t *. Update all
16938 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
16939 (struct pending_signals): Add a siginfo_t.
16940 (linux_wait_for_process): Always set last_status.
16941 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
16942 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
16943 * linux-low.h (struct process_info): Add last_status.
16944
5ffff7c1
DJ
169452006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
16946
16947 * remote-utils.c (try_rle): New function.
16948 (putpkt_binary): Use it.
16949
8695c747
DJ
169502006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
16951
16952 * Makefile.in (clean): Clean reg-x86-64-linux.c.
16953 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
16954 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
16955 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
16956 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
16957 point registers.
16958
290fadea
RS
169592006-08-08 Richard Sandiford <richard@codesourcery.com>
16960
16961 * server.c (terminal_fd): New variable.
16962 (old_foreground_pgrp): Likewise.
16963 (restore_old_foreground_pgrp): New function.
16964 (start_inferior): Record the terminal file descriptor in terminal_fd
16965 and its original foreground group in old_foreground_pgrp. Register
16966 restore_old_foreground_pgrp with atexit().
16967
9f2e1e63
DJ
169682006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
16969
16970 * server.c (handle_query): Correct qPart to qXfer.
16971
b80864fb
DJ
169722006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
16973
16974 * configure.ac: Check for more headers which are missing on
16975 Windows. Automatically supply -lwsock32 and USE_WIN32API.
16976 * configure.srv: Add Cygwin and mingw32.
16977 * remote-utils.c: Don't include headers unconditionally which
16978 are missing on mingw32. Include <winsock.h> for mingw32.
16979 (remote_open): Adjust for mingw32 support. Flush
16980 standard error after writing to it.
16981 (remote_close, putpkt_binary, input_interrupt, block_async_io)
16982 (unblock_async_io, enable_async_io, disable_async_io)
16983 (readchar, getpkt): Update for Winsock support.
16984 (prepare_resume_reply): Expect a protocol signal number.
16985 * server.c: Disable <sys/wait.h> on mingw32.
16986 (start_inferior): Adjust for mingw32 support. Flush
16987 standard error after writing to it.
16988 (attach_inferior): Likewise. Use protocol signal
16989 numbers.
16990 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
16991 and names.
16992 * win32-i386-low.c: New file.
16993 * Makefile.in (XM_CLIBS): Set.
16994 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
16995 (win32-i386-low.o): New dependency rule.
16996 * linux-low.c (linux_wait): Use target signal numbers.
16997 * target.h (struct target_ops): Doc fix.
16998 * server.h (target_signal_to_name): New prototype.
16999 * gdbreplay.c: Don't include headers unconditionally which
17000 are missing on mingw32. Include <winsock.h> for mingw32.
17001 (remote_close, remote_open): Adjust for Winsock support.
17002 * configure, config.in: Regenerated.
17003
0876f84a
DJ
170042006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
17005
17006 * server.c (decode_xfer_read, write_qxfer_response): New.
17007 (handle_query): Take a packet length argument. Handle
17008 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
17009 the qSupported response.
17010 (main): Update call to handle_query.
17011
01f9e8fa
DJ
170122006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
17013
17014 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
17015 (putpkt_binary): Renamed from putpkt and adjusted for binary
17016 data.
17017 (putpkt): New wrapper for putpkt_binary.
17018 (readchar): Don't mask off the high bit.
17019 (decode_X_packet): New function.
17020 * server.c (main): Call putpkt_binary if a handler sets the packet
17021 length. Save the length of the incoming packet. Handle 'X'.
17022 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
17023
be2a5f71
DJ
170242006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
17025
17026 * server.c (handle_query): Handle qSupported.
17027
ea025f5f
DJ
170282006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
17029
17030 * remote-utils.c (all_symbols_looked_up): New variable.
17031 (look_up_one_symbol): Check it.
17032 * server.h (look_up_one_symbol): New declaration.
17033 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
17034
9308fc88
DJ
170352006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
17036
17037 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 17038 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
17039 (PTRACE_GET_THREAD_AREA): Define.
17040 (ps_get_thread_area): New function.
17041
52fb6437
NS
170422006-05-09 Nathan Sidwell <nathan@codesourcery.com>
17043
17044 * configure.srv (m68k*-*-uclinux*): New target.
17045 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
17046 (linux_resume_one_process): Remove extraneous cast.
17047 (linux_read_offsets): New.
17048 (linux_target_op): Add linux_read_offsets on mmuless systems.
17049 * server.c (handle_query): Add qOffsets logic.
17050 * target.h (struct target_ops): Add read_offsets.
17051
21b0f40c
DJ
170522006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
17053
17054 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
17055 (PTRACE_GET_THREAD_AREA): Define.
17056 (ps_get_thread_area): New function.
17057 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
17058 (linux-x86-64-low.o): Update.
17059
0050a760
DJ
170602006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
17061
17062 * configure.ac: Remove checks for prfpregset_t.
17063 * gdb_proc_service.h: New file.
17064 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
17065 new "gdb_proc_service.h".
17066 * proc-service.c: Likewise.
17067 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
17068 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
17069 * Makefile.in (gdb_proc_service_h): Updated.
17070 * configure, config.in: Regenerated.
17071
b92a518e
DJ
170722006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
17073
17074 * remote-utils.c (prepare_resume_reply): Move declaration
17075 of gdb_id_from_wait to the top of the block.
17076
545587ee
DJ
170772006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
17078
17079 * linux-low.c (regsets_store_inferior_registers): Read the regset
17080 from the target before filling it.
17081
9db87ebd
DJ
170822006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
17083
17084 * server.c (attach_inferior): Return SIGTRAP for a successful
17085 attach.
17086
dd24457d
DJ
170872006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
17088
17089 * Makefile.in (OBS): Add version.o.
17090 (STAGESTUFF): Delete.
17091 (version.o): Add dependencies.
17092 (version.c): Replace rule.
17093 (clean): Remove version.c.
17094 * server.c (gdbserver_version): New.
17095 (gdbserver_usage): Use printf.
17096 (main): Handle --version and --help.
17097 * server.h (version, host_name): Add declarations.
17098
6f0f660e
EZ
170992005-12-23 Eli Zaretskii <eliz@gnu.org>
17100
889bf7c5
PA
17101 * linux-arm-low.c:
17102 * linux-arm-low.c:
17103 * inferiors.c:
17104 * i387-fp.h:
17105 * i387-fp.c:
17106 * gdbreplay.c:
17107 * regcache.c:
17108 * proc-service.c:
17109 * mem-break.h:
17110 * mem-break.c:
17111 * linux-x86-64-low.c:
17112 * linux-sh-low.c:
17113 * linux-s390-low.c:
17114 * linux-ppc64-low.c:
17115 * linux-ppc-low.c:
17116 * linux-mips-low.c:
17117 * linux-m68k-low.c:
17118 * linux-m32r-low.c:
17119 * linux-low.h:
17120 * linux-low.c:
17121 * linux-ia64-low.c:
17122 * linux-i386-low.c:
17123 * linux-crisv32-low.c:
17124 * thread-db.c:
17125 * terminal.h:
17126 * target.h:
17127 * target.c:
17128 * server.h:
17129 * server.c:
17130 * remote-utils.c:
17131 * regcache.h:
17132 * utils.c:
17133 * Makefile.in:
17134 * configure.ac:
6f0f660e
EZ
17135 * gdbserver.1: Add (C) after Copyright. Update the FSF
17136 address.
17137
9d1fb177
DJ
171382005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
17139
17140 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
17141 (arm_breakpoint_at): Recognize both breakpoints.
17142 (the_low_target): Use the correct breakpoint instruction.
17143
011a70c2
DJ
171442005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
17145
17146 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
17147 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
17148 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
17149 (the_low_target): Update.
17150
7fb85e41
AS
171512005-10-25 Andreas Schwab <schwab@suse.de>
17152
17153 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
17154
17155 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
17156 (ia64_num_regs): Reduce to 462.
17157
3db0444b
DJ
171582005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
17159
17160 * acinclude.m4: Correct quoting.
17161 * aclocal.m4: Regenerated.
17162
17163 Suggested by SZOKOVACS Robert <szo@ies.hu>:
17164 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
17165 (thread_db_init): Call thread_db_err_str.
17166 * configure.ac: Check for TD_VERSION.
17167 * config.in, configure: Regenerated.
17168
bee0189a
DJ
171692005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
17170
17171 * server.h (error, fatal, warning): Add ATTR_FORMAT.
17172
e9d25b98
DJ
171732005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
17174
17175 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
17176 is not available. Define HAVE_PTRACE_GETREGS if it is.
17177 * config.in, configure: Regenerated.
17178 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
17179 * linux-i386-low.c, linux-m68k-low.c: Update to use
17180 HAVE_PTRACE_GETREGS.
17181 * linux-low.c (regsets_fetch_inferior_registers)
17182 (regsets_store_inferior_registers): Only return 0 if we processed
17183 GENERAL_REGS.
17184 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
17185 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
17186
a06660f7
DJ
171872005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
17188
17189 * inferiors.c (struct thread_info): Add gdb_id.
17190 (add_thread): Add gdb_id argument.
17191 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
17192 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
17193 calls to add_thread.
17194 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
17195 * server.c (handle_query): Use thread_to_gdb_id.
17196 (handle_v_cont, main): Use gdb_id_to_thread_id.
17197 * server.h (add_thread): Update prototype.
17198 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
17199 prototypes.
17200
5a1f5858
DJ
172012005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
17202
17203 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
17204 left-padded registers.
17205 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
17206 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
17207
e122f1f5
SE
172082005-07-01 Steve Ellcey <sje@cup.hp.com>
17209
17210 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
17211 * configure: Regenerate.
17212 * config.in: Regenerate.
17213 * server.h (NEED_DECLARATION_STRERROR):
17214 Replace with !HAVE_DECL_STRERROR.
17215
d592fa2f
DJ
172162005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
17217
17218 * linux-low.c (linux_wait, linux_send_signal): Don't test
17219 an unsigned long variable for > 0 if it could be MAX_ULONG.
17220 * server.c (myresume): Likewise.
17221 * target.c (set_desired_inferior): Likewise.
17222
ccbd4912
MK
172232005-06-13 Mark Kettenis <kettenis@gnu.org>
17224
17225 * configure.ac: Simplify and improve check for socklen_t.
17226 * configure, config.in: Regenerate.
17227
f450004a
DJ
172282005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
17229
17230 * acconfig.h: Remove.
17231 * configure.ac: Add a test for socklen_t. Use three-argument
17232 AC_DEFINE throughout.
17233 * config.in: Regenerated using autoheader 2.59.
17234 * configure: Regenerated.
17235
17236 * gdbreplay.c (socklen_t): Provide a default.
17237 (remote_open): Use socklen_t.
17238 * remote-utils.c (socklen_t): Provide a default.
17239 (remote_open): Use socklen_t.
17240 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
17241 unsigned char.
17242
17243 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
17244 char for buffers.
17245 * linux-low.c (linux_read_memory, linux_write_memory)
17246 (linux_read_auxv): Likewise.
17247 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
17248 (check_mem_write): Likewise.
17249 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
17250 Likewise.
17251 * regcache.c (struct inferior_rgcache_data, registers_to_string)
17252 (registers_from_string, register_data): Likewise.
17253 * server.c (handle_query, main): Likewise.
17254 * server.h (convert_ascii_to_int, convert_int_to_ascii)
17255 (decode_M_packet): Likewise.
17256 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
17257 * target.h (struct target_ops): Update read_memory, write_memory,
17258 and read_auxv.
17259 (read_inferior_memory, write_inferior_memory): Update.
17260 * linux-low.h (struct linux_target_ops): Change type of breakpoint
17261 to unsigned char *.
17262 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
17263 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
17264 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
17265 linux-s390-low.c, linux-sh-low.c: Update for changes in
17266 read_inferior_memory and the_low_target->breakpoint.
17267
eee84df1
DJ
172682005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
17269
17270 * Makefile.in (SFILES): Add linux-ppc64-low.c.
17271 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
17272 * configure.srv: Add powerpc64-*-linux*.
17273 * linux-ppc64-low.c: New file.
17274
45b134e5
OF
172752005-05-23 Orjan Friberg <orjanf@axis.com>
17276
17277 * linux-cris-low.c: New file with support for CRIS.
17278 * linux-crisv32-low.c: Ditto for CRISv32.
17279 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
17280 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 17281 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
17282 reg-crisv32.o, and reg-crisv32.c to make rules.
17283 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
17284 recognized targets.
17285
48d93c75
UW
172862005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
17287
17288 * linux-low.c (fetch_register): Ensure buffer size is a multiple
17289 of sizeof (PTRACE_XFER_TYPE).
17290 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
17291
e013ee27
OF
172922005-05-12 Orjan Friberg <orjanf@axis.com>
17293
889bf7c5 17294 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
17295 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
17296 pointers for hardware watchpoint support.
17297 * linux-low.h (struct linux_target_ops): Ditto.
17298 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
17299 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
17300 to linux_target_ops.
17301 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
17302 reply packet.
17303 * server.c (main): Recognize 'Z' and 'z' packets.
17304
b0ded00b
UW
173052005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
17306
17307 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
17308 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
17309 (the_low_target): Add new members.
17310
8643e2ad
DJ
173112005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
17312
17313 * proc-service.c (ps_lgetregs): Search all_processes instead of
17314 all_threads.
17315
fc620387
DJ
173162005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
17317
17318 * server.c (start_inferior): Change return type to int.
17319 (attach_inferior): Change sigptr to int *.
17320 (handle_v_cont, handle_v_requests): Change signal to int *.
17321 (main): Change signal to int.
17322
173232005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
17324
17325 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
17326 * configure.srv: Add m32r*-*-linux*.
17327 * linux-m32r-low.c: New file.
17328
e0e76420
DJ
173292005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
17330
17331 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
17332
a1928bad
DJ
173332005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
17334
17335 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
17336 Take unsigned long arguments for PIDs.
17337 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
17338 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
17339 (wait_for_sigstop, linux_resume_one_process)
17340 (regsets_fetch_inferior_registers, linux_send_signal)
17341 (linux_read_auxv): Likewise. Update the types of variables holding
17342 PIDs. Update format string specifiers.
17343 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
17344 * remote-utils.c (prepare_resume_reply): Likewise.
17345 * server.c (cont_thread, general_thread, step_thread)
17346 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
17347 unsigned long.
17348 (handle_query): Update format specifiers.
17349 (handle_v_cont, main): Use strtoul for thread IDs.
17350 * server.h (struct inferior_list_entry): Use unsigned long for ID.
17351 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
17352 (general_thread, step_thread, thread_from_wait)
17353 (old_thread_from_wait): Update.
17354 * target.h (struct thread_resume): Use unsigned long for THREAD.
17355 (struct target_ops): Use unsigned long for arguments to attach and
17356 thread_alive.
17357
dcdb98d2
DJ
173582005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
17359
17360 * acinclude.m4: Include bfd/bfd.m4 directly.
17361 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
17362 <agriffis@toolchain.org>.
17363 * aclocal.m4, configure: Regenerated.
17364
bec39cab
AC
173652005-01-07 Andrew Cagney <cagney@gnu.org>
17366
17367 * configure.ac: Rename configure.in, require autoconf 2.59.
17368 * configure: Re-generate.
17369
434c4c77
DJ
173702004-12-08 Daniel Jacobowitz <dan@debian.org>
17371
17372 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
17373 LIBS when finished.
17374 * aclocal.m4: Regenerated.
17375 * configure: Regenerated.
17376
db1d3e1b
AS
173772004-11-21 Andreas Schwab <schwab@suse.de>
17378
17379 * linux-m68k-low.c (m68k_num_gregs): Define.
17380 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
17381 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
17382 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
17383 (m68k_breakpoint_at): New. Add to the_low_target.
17384
17385 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
17386 srv_linux_thread_db to yes.
17387
43360365
JB
173882004-10-20 Joel Brobecker <brobecker@gnat.com>
17389
17390 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
17391 (ARCH_SET_FS): Likewise.
17392 (ARCH_GET_FS): Likewise.
17393 (ARCH_GET_GS): Likewise.
17394
fd500816
DJ
173952004-10-16 Daniel Jacobowitz <dan@debian.org>
17396
17397 * linux-i386-low.c (ps_get_thread_area): New.
17398 * linux-x86-64-low.c (ps_get_thread_area): New.
17399 * linux-low.c: Include <sys/syscall.h>.
17400 (linux_kill_one_process): Don't kill the first thread here.
17401 (linux_kill): Kill the first thread here.
17402 (kill_lwp): New function.
17403 (send_sigstop, linux_send_signal): Use it.
17404 * proc-service.c: Clean up #ifdefs.
17405 (fpregset_info): Delete.
17406 (ps_lgetregs): Update and enable implementation.
17407 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
17408 implementations.
17409 * remote-utils.c (struct sym_cache, symbol_cache): New.
17410 (input_interrupt): Print a clearer message.
17411 (async_io_enabled): New variable.
17412 (enable_async_io, disable_async_io): Use it. Update comments.
17413 (look_up_one_symbol): Use the symbol cache.
17414 * thread-db.c (thread_db_look_up_symbols): New function.
17415 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
17416
f6de3c42
DJ
174172004-10-16 Daniel Jacobowitz <dan@debian.org>
17418
17419 * configure.in: Test for -rdynamic.
17420 * configure: Regenerated.
17421 * Makefile (INTERNAL_LDFLAGS): New.
17422 (gdbserver, gdbreplay): Use it.
17423
2c0fc042
AC
174242004-09-02 Andrew Cagney <cagney@gnu.org>
17425
17426 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
17427
075b3282
DJ
174282004-03-23 Daniel Jacobowitz <drow@mvista.com>
17429
17430 * linux-low.c (linux_wait): Clear all_processes list also.
17431
fa6a77dc
DJ
174322004-03-12 Daniel Jacobowitz <drow@mvista.com>
17433
17434 * linux-low.c: Include <errno.h>. Remove extern declaration of
17435 errno.
17436
6d782a97
DJ
174372004-03-12 Daniel Jacobowitz <drow@mvista.com>
17438
17439 * gdbreplay.c, server.h, utils.c: Update copyright years.
17440
3a7fb99b
DJ
174412004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
17442
17443 * server.c (main): Print child status or termination signal from
17444 variable 'signal', not 'sig'.
17445
c3e735a6
DJ
174462004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
17447
17448 * linux-low.c (linux_read_memory): Change return type to
17449 int. Check for and return error from ptrace().
17450 * target.c (read_inferior_memory): Change return type to int. Pass
17451 back return status from the_target->read_memory().
17452 * target.h (struct target_ops): Adapt *read_memory() prototype.
17453 Update comment.
17454 (read_inferior_memory): Adapt prototype.
17455 * server.c (main): Return an error packet if
17456 read_inferior_memory() returns an error.
17457
a59d1c82
DJ
174582004-03-04 Daniel Jacobowitz <drow@mvista.com>
17459
17460 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
17461 Unify with other clean targets.
17462
dc3f8883
DJ
174632004-02-29 Daniel Jacobowitz <drow@mvista.com>
17464
17465 * server.c (handle_v_cont): Call set_desired_inferior.
17466
89a208da
DJ
174672004-02-29 Daniel Jacobowitz <drow@mvista.com>
17468
17469 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
17470
62ea82f5
DJ
174712004-02-29 Daniel Jacobowitz <drow@mvista.com>
17472
17473 * linux-low.c (linux_wait): Unblock async I/O.
17474 (linux_resume): Block and enable async I/O.
17475 * remote-utils.c (block_async_io, unblock_async_io): New functions.
17476 * server.h (block_async_io, unblock_async_io): Add prototypes.
17477
6910d122
DJ
174782004-02-29 Daniel Jacobowitz <drow@mvista.com>
17479
17480 * remote-utils.c (remote_open): Print a status notice after
17481 opening a TCP port.
17482 * server.c (attach_inferior): Print a status notice after
17483 attaching.
17484
174852004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
17486
17487 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
17488
c89dc5d4
DJ
174892004-02-26 Daniel Jacobowitz <drow@mvista.com>
17490
17491 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
17492 error packet.
17493 * server.c, target.h: Update copyright years.
17494
4b8dad4a
RM
174952004-02-25 Roland McGrath <roland@redhat.com>
17496
17497 * target.h (struct target_ops): New member `read_auxv'.
17498 * server.c (handle_query): Handle qPart:auxv:read: query using that.
17499 * linux-low.c (linux_read_auxv): New function.
17500 (linux_target_ops): Initialize `read_auxv' member to that.
17501
d7446758
JB
175022004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
17503
17504 Committed by Jim Blandy <jimb@redhat.com>.
17505
17506 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 17507 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
17508 instead of GPR_SIZE to distiguish s390 and s390x targets.
17509
5544ad89
DJ
175102004-01-31 Daniel Jacobowitz <drow@mvista.com>
17511
17512 * linux-low.c: Update copyright year.
17513 (check_removed_breakpoint): Clear pending_is_breakpoint.
17514 (linux_set_resume_request, linux_queue_one_thread)
17515 (resume_status_pending_p): New functions.
17516 (linux_continue_one_thread): Use process->resume.
17517 (linux_resume): Only resume threads if there are no pending events.
17518 * linux-low.h (struct process_info): Add resume request
17519 pointer.
17520
2a68b70e
DJ
175212004-01-30 Daniel Jacobowitz <drow@mvista.com>
17522
17523 * regcache.c (new_register_cache): Clear the allocated register
17524 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
17525
64386c31
DJ
175262003-10-13 Daniel Jacobowitz <drow@mvista.com>
17527
17528 * linux-low.c (linux_resume): Take a struct thread_resume *
17529 argument.
17530 (linux_wait): Update call.
17531 (resume_ptr): New static variable.
17532 (linux_continue_one_thread): Renamed from
17533 linux_continue_one_process. Use resume_ptr.
17534 (linux_resume): Use linux_continue_one_thread.
17535 * server.c (handle_v_cont, handle_v_requests): New functions.
17536 (myresume): New function.
17537 (main): Handle 'v' case.
17538 * target.h (struct thread_resume): New type.
17539 (struct target_ops): Change argument of "resume" to struct
17540 thread_resume *.
17541 (myresume): Delete macro.
17542
c938e9b0
L
175432003-08-08 H.J. Lu <hongjiu.lu@intel.com>
17544
17545 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
17546 (uninstall): Support DESTDIR.
17547
7f313d07
BC
17548Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
17549
17550 * configure.srv: Add xscale*linux copy of arm*linux entry.
17551
3b2fc2ea
DJ
175522003-07-24 Daniel Jacobowitz <drow@mvista.com>
17553
17554 * linux-arm-low.c (arm_reinsert_addr): New function.
17555 (the_low_target): Add arm_reinsert_addr.
17556
1c0a559e
MK
175572003-07-08 Mark Kettenis <kettenis@gnu.org>
17558
17559 * mem-break.c: Remove whitespace at end of file.
17560
43d5792c
DJ
175612003-06-28 Daniel Jacobowitz <drow@mvista.com>
17562
17563 * configure.in: Check whether we need to prototype strerror.
17564 * server.h: Optionally prototype strerror.
17565 * gdbreplay.c (perror_with_name): Use strerror.
17566 * linux-low.c (linux_attach_lwp): Use strerror.
17567 * utils.c (perror_with_name): Use strerror.
17568 * config.in, configure: Regenerated.
17569
c8a86edf
DJ
175702003-06-28 Daniel Jacobowitz <drow@mvista.com>
17571
17572 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
17573 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
17574
73d37363
DJ
175752003-06-20 Daniel Jacobowitz <drow@mvista.com>
17576
17577 * Makefile.in (SFILES): Update.
17578 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
17579 low-sun3.c: Remove files.
17580
6ad8ae5c
DJ
175812003-06-17 Daniel Jacobowitz <drow@mvista.com>
17582
17583 * linux-low.c: Move comment to linux_thread_alive where it belonged.
17584 (linux_detach_one_process, linux_detach): New functions.
17585 (linux_target_ops): Add linux_detach.
17586 * server.c (main): Handle 'D' packet.
17587 * target.h (struct target_ops): Add "detach" member.
17588 (detach_inferior): Define.
17589
1581182a
MK
175902003-06-13 Mark Kettenis <kettenis@gnu.org>
17591
17592 From Kelley Cook <kelleycook@wideopenwest.com>:
17593 * configure.srv: Accept i[34567]86 variants.
17594
e5379b03
DJ
175952003-06-05 Daniel Jacobowitz <drow@mvista.com>
17596
17597 * linux-low.c (linux_wait_for_event): Correct comment typos.
17598 (linux_resume_one_process): Call check_removed_breakpoint.
17599 (linux_send_signal): New function.
17600 (linux_target_ops): Add linux_send_signal.
17601 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
17602 of kill.
17603 * target.h (struct target_ops): Add send_signal.
17604
2ff29de4
JB
176052003-05-29 Jim Blandy <jimb@redhat.com>
17606
17607 * linux-low.c (usr_store_inferior_registers): Transfer buf in
17608 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
17609 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
17610 away part of the register's value.
17611
254787d4
DJ
176122003-03-26 Daniel Jacobowitz <drow@mvista.com>
17613
17614 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
17615 (linux_wait_for_event, linux_init_signals): Likewise.
17616
94e10508
DJ
176172003-03-17 Daniel Jacobowitz <drow@mvista.com>
17618
17619 * configure.in: Check for stdlib.h.
17620 * configure: Regenerated.
17621 * config.in: Regenerated.
17622
4c0711e0
DJ
176232003-01-04 Andreas Schwab <schwab@suse.de>
17624
17625 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
17626
ef66e766
AC
176272003-01-02 Andrew Cagney <ac131313@redhat.com>
17628
17629 * Makefile.in: Remove obsolete code.
17630
a1358604
DJ
176312002-11-20 Daniel Jacobowitz <drow@mvista.com>
17632
17633 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
17634 defined(PT_FPR0_HI).
17635
23ce3b1c
DJ
176362002-11-17 Stuart Hughes <seh@zee2.com>
17637
17638 * linux-arm-low.c (arm_num_regs): Increase.
17639 (arm_regmap): Include status register.
17640
176412002-11-17 Daniel Jacobowitz <drow@mvista.com>
17642
17643 * linux-low.c (register_addr): Remove incorrect -1 check.
17644
a9fa9f7d
DJ
176452002-08-29 Daniel Jacobowitz <drow@mvista.com>
17646
17647 * linux-low.c (linux_create_inferior): Call setpgid. Return
17648 the new PID.
17649 (unstopped_p, linux_signal_pid): Remove.
17650 (linux_target_ops): Remove linux_signal_pid.
17651 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
17652 global instead of target method.
17653 * target.h (struct target_ops): Remove signal_pid. Update comment
17654 for create_inferior.
17655 * server.c (signal_pid): New variable.
17656 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 17657 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
17658 (attach_inferior): Set signal_pid.
17659
17574093
DJ
176602002-08-23 Daniel Jacobowitz <drow@mvista.com>
17661
17662 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
17663
176642002-08-20 Jim Blandy <jimb@redhat.com>
17665
17666 * Makefile.in (LDFLAGS): Allow the configure script to establish a
17667 default for this.
17668
176692002-08-01 Andrew Cagney <cagney@redhat.com>
17670
17671 * Makefile.in: Make chill references obsolete.
17672
176732002-07-24 Kevin Buettner <kevinb@redhat.com>
17674
17675 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
17676 * configure: Regenerate.
17677 * config.in: Regenerate.
17678
176792002-07-09 David O'Brien <obrien@FreeBSD.org>
17680
17681 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
17682 (perror_with_name, remote_close, remote_open, expect, play): Static.
17683
176842002-07-04 Michal Ludvig <mludvig@suse.cz>
17685
4b8dad4a 17686 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
17687 byte offsets instead of an array of indexes.
17688 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
17689
176902002-06-13 Daniel Jacobowitz <drow@mvista.com>
17691
17692 * regcache.c: Add comment.
17693
176942002-06-11 Daniel Jacobowitz <drow@mvista.com>
17695
17696 * thread-db.c: New file.
17697 * proc-service.c: New file.
17698 * acinclude.m4: New file.
17699 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
17700 proc-service.o, and thread-db.o.
17701 (linux-low.o): Add USE_THREAD_DB.
17702 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
17703 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
17704 * aclocal.m4: Regenerated.
17705 * config.in: Regenerated.
17706 * configure: Regenerated.
17707 * configure.in: Check for proc_service.h, sys/procfs.h,
17708 thread_db.h, and linux/elf.h headrs.
17709 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
17710 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
17711 Check for -lthread_db and thread support.
17712 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
17713 PowerPC, and SuperH.
17714 * i387-fp.c: Constify arguments.
17715 * i387-fp.h: Likewise.
17716 * inferiors.c: (struct thread_info): Renamed from
17717 `struct inferior_info'. Remove PID member. Use generic inferior
17718 list header. All uses updated.
17719 (inferiors, signal_pid): Removed.
17720 (all_threads): New variable.
17721 (get_thread): Define.
17722 (add_inferior_to_list): New function.
17723 (for_each_inferior): New function.
17724 (change_inferior_id): New function.
17725 (add_inferior): Removed.
17726 (remove_inferior): New function.
17727 (add_thread): New function.
17728 (free_one_thread): New function.
17729 (remove_thread): New function.
17730 (clear_inferiors): Use for_each_inferior and free_one_thread.
17731 (find_inferior): New function.
17732 (find_inferior_id): New function.
17733 (inferior_target_data): Update argument type.
17734 (set_inferior_target_data): Likewise.
17735 (inferior_regcache_data): Likewise.
17736 (set_inferior_regcache_data): Likewise.
17737 * linux-low.c (linux_bp_reinsert): Remove.
17738 (all_processes, stopping_threads, using_thrads)
17739 (struct pending_signals, debug_threads, pid_of): New.
17740 (inferior_pid): Replace with macro.
17741 (struct inferior_linux_data): Remove.
17742 (get_stop_pc, add_process): New functions.
17743 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
17744 Use add_process and add_thread.
17745 (linux_attach_lwp): New function, based on old linux_attach. Use
17746 add_process and add_thread. Set stop_expected for new threads.
17747 (linux_attach): New function.
17748 (linux_kill_one_process): New function.
17749 (linux_kill): Kill all LWPs.
17750 (linux_thread_alive): Use find_inferior_id.
17751 (check_removed_breakpoints, status_pending_p): New functions.
17752 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
17753 Update. Use WNOHANG. Wait for cloned processes also. Update process
17754 struct for the found process.
17755 (linux_wait_for_event): New function.
17756 (linux_wait): Use it. Support LWPs.
17757 (send_sigstop, wait_for_sigstop, stop_all_processes)
17758 (linux_resume_one_process, linux_continue_one_process): New functions.
17759 (linux_resume): Support LWPs.
17760 (REGISTER_RAW_SIZE): Remove.
17761 (fetch_register): Use register_size instead. Call supply_register.
17762 (usr_store_inferior_registers): Likewise. Call collect_register.
17763 Fix recursive case.
17764 (regsets_fetch_inferior_registers): Improve error message.
17765 (regsets_store_inferior_registers): Add debugging.
17766 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
17767 (unstopped_p, linux_signal_pid): New functions.
17768 (linux_target_ops): Add linux_signal_pid.
17769 (linux_init_signals): New function.
17770 (initialize_low): Call it. Initialize using_threads.
17771 * regcache.c (inferior_regcache_data): Add valid
17772 flag.
17773 (get_regcache): Fetch registers lazily. Add fetch argument
17774 and update all callers.
17775 (regcache_invalidate_one, regcache_invalidate): New
17776 functions.
17777 (new_register_cache): Renamed from create_register_cache.
17778 Return the new regcache.
17779 (free_register_cache): Change argument to a void *.
17780 (registers_to_string, registers_from_string): Call get_regcache
17781 with fetch flag set.
17782 (register_data): Make static. Pass fetch flag to get_regcache.
17783 (supply_register): Call get_regcache with fetch flag clear.
17784 (collect_register): Call get_regcache with fetch flag set.
17785 (collect_register_as_string): New function.
17786 * regcache.h: Update.
17787 * remote-utils.c (putpkt): Flush after debug output and use
17788 stderr.
17789 Handle input interrupts while waiting for an ACK.
17790 (input_interrupt): Use signal_pid method.
17791 (getpkt): Flush after debug output and use stderr.
17792 (outreg): Use collect_register_as_string.
17793 (new_thread_notify, dead_thread_notify): New functions.
17794 (prepare_resume_reply): Check using_threads. Set thread_from_wait
17795 and general_thread.
17796 (look_up_one_symbol): Flush after debug output.
17797 * server.c (step_thread, server_waiting): New variables.
17798 (start_inferior): Don't use signal_pid. Update call to mywait.
17799 (attach_inferior): Update call to mywait.
17800 (handle_query): Handle qfThreadInfo and qsThreadInfo.
17801 (main): Don't fetch/store registers explicitly. Use
17802 set_desired_inferior. Support proposed ``Hs'' packet. Update
17803 calls to mywait.
17804 * server.h: Update.
17805 (struct inferior_list, struct_inferior_list_entry): New.
17806 * target.c (set_desired_inferior): New.
17807 (write_inferior_memory): Constify.
17808 (mywait): New function.
17809 * target.h: Update.
17810 (struct target_ops): New signal_pid method.
17811 (mywait): Removed macro, added prototype.
17812
17813 * linux-low.h (regset_func): Removed.
17814 (regset_fill_func, regset_store_func): New.
17815 (enum regset_type): New.
17816 (struct regset_info): Add type field. Use new operation types.
17817 (struct linux_target_ops): stop_pc renamed to get_pc.
17818 Add decr_pc_after_break and breakpoint_at.
17819 (get_process, get_thread_proess, get_process_thread)
17820 (strut process_info, all_processes, linux_attach_lwp)
17821 (thread_db_init): New.
17822
17823 * linux-arm-low.c (arm_get_pc, arm_set_pc,
17824 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
17825 (the_low_target): Add new members.
17826 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
17827 (i386_store_fpxregset): Constify.
17828 (target_regsets): Add new kind identifier.
17829 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
17830 (i386_set_pc): Add debugging.
17831 (i386_breakpoint_at): New function.
17832 (the_low_target): Add new members.
17833 * linux-mips-low.c (mips_get_pc, mips_set_pc)
17834 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
17835 (mips_breakpoint_at): New.
17836 (the_low_target): Add new members.
17837 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
17838 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
17839 (the_low_target): Add new members.
17840 * linux-sh-low.c (sh_get_pc, sh_set_pc)
17841 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
17842 (the_low_target): Add new members.
17843 * linux-x86-64-low.c (target_regsets): Add new kind
17844 identifier.
17845
178462002-05-15 Daniel Jacobowitz <drow@mvista.com>
17847
17848 From Martin Pool <mbp@samba.org>:
17849 * server.c (gdbserver_usage): New function.
17850 (main): Call it.
17851
178522002-05-14 Daniel Jacobowitz <drow@mvista.com>
17853
17854 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
17855 stop_at -> stop_pc.
17856
178572002-05-04 Andrew Cagney <ac131313@redhat.com>
17858
17859 * Makefile.in: Remove obsolete code.
17860
178612002-04-24 Michal Ludvig <mludvig@suse.cz>
17862
17863 * linux-low.c (regsets_fetch_inferior_registers),
17864 (regsets_store_inferior_registers): Removed cast to int from
17865 ptrace() calls.
17866 * regcache.h: Added declaration of struct inferior_info.
17867
178682002-04-20 Daniel Jacobowitz <drow@mvista.com>
17869
17870 * inferiors.c (struct inferior_info): Add regcache_data.
17871 (add_inferior): Call create_register_cache.
17872 (clear_inferiors): Call free_register_cache.
17873 (inferior_regcache_data, set_inferior_regcache_data): New functions.
17874 * regcache.c (struct inferior_regcache_data): New.
17875 (registers): Remove.
17876 (get_regcache): New function.
17877 (create_register_cache, free_register_cache): New functions.
17878 (set_register_cache): Don't initialize the register cache here.
17879 (registers_to_string, registers_from_string, register_data): Call
17880 get_regcache.
17881 * regcache.h: Add prototypes.
17882 * server.h: Likewise.
17883
178842002-04-20 Daniel Jacobowitz <drow@mvista.com>
17885
17886 * mem-break.c: New file.
17887 * mem-break.h: New file.
17888 * Makefile.in: Add mem-break.o rule; update server.h
17889 dependencies.
17890 * inferiors.c (struct inferior_info): Add target_data
17891 member.
17892 (clear_inferiors): Free target_data member if set.
17893 (inferior_target_data, set_inferior_target_data): New functions.
17894 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
17895 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
17896 * linux-low.c (linux_bp_reinsert): New variable.
17897 (struct inferior_linux_data): New.
17898 (linux_create_inferior): Use set_inferior_target_data.
17899 (linux_attach): Likewise. Call add_inferior.
17900 (linux_wait_for_one_inferior): New function.
17901 (linux_wait): Call it.
17902 (linux_write_memory): Add const.
17903 (initialize_low): Call set_breakpoint_data.
17904 * linux-low.h (struct linux_target_ops): Add breakpoint
17905 handling members.
17906 * server.c (attach_inferior): Remove extra add_inferior
17907 call.
17908 * server.h: Include mem-break.h. Update inferior.c
17909 prototypes.
17910 * target.c (read_inferior_memory)
17911 (write_inferior_memory): New functions.
17912 * target.h (read_inferior_memory)
17913 (write_inferior_memory): Change macros to prototypes.
17914 (struct target_ops): Update comments. Add const to write_memory
17915 definition.
17916
179172002-04-11 Daniel Jacobowitz <drow@mvista.com>
17918
17919 * linux-low.c (usr_store_inferior_registers): Support
17920 registers which are allowed to fail to store.
17921 * linux-low.h (linux_target_ops): Likewise.
17922 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
17923 (ppc_cannot_store_register): FPSCR may not be storable.
17924
179252002-04-09 Daniel Jacobowitz <drow@mvista.com>
17926
17927 * server.h: Include <string.h> if HAVE_STRING_H.
17928 * ChangeLog: Correct paths in last ChangeLog entry.
17929
179302002-04-09 Daniel Jacobowitz <drow@mvista.com>
17931
17932 * linux-low.h: Remove obsolete prototypes.
17933 (struct linux_target_ops): New.
17934 (extern the_low_target): New.
17935 * linux-low.c (num_regs, regmap): Remove declarations.
17936 (register_addr): Use the_low_target explicitly.
17937 (fetch_register): Likewise.
17938 (usr_fetch_inferior_registers): Likewise.
17939 (usr_store_inferior_registers): Likewise.
17940 * linux-arm-low.c (num_regs): Remove.
17941 (arm_num_regs): Define.
17942 (arm_regmap): Renamed from regmap, made static.
17943 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
17944 made static.
17945 (arm_cannot_store_register): Renamed from cannot_store_register,
17946 made static.
17947 (the_low_target): New.
17948 * linux-i386-low.c (num_regs): Remove.
17949 (i386_num_regs): Define.
17950 (i386_regmap): Renamed from regmap, made static.
17951 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
17952 made static.
17953 (i386_cannot_store_register): Renamed from cannot_store_register,
17954 made static.
17955 (the_low_target): New.
17956 * linux-ia64-low.c (num_regs): Remove.
17957 (ia64_num_regs): Define.
17958 (ia64_regmap): Renamed from regmap, made static.
17959 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
17960 made static.
17961 (ia64_cannot_store_register): Renamed from cannot_store_register,
17962 made static.
17963 (the_low_target): New.
17964 * linux-m68k-low.c (num_regs): Remove.
17965 (m68k_num_regs): Define.
17966 (m68k_regmap): Renamed from regmap, made static.
17967 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
17968 made static.
17969 (m68k_cannot_store_register): Renamed from cannot_store_register,
17970 made static.
17971 (the_low_target): New.
17972 * linux-mips-low.c (num_regs): Remove.
17973 (mips_num_regs): Define.
17974 (mips_regmap): Renamed from regmap, made static.
17975 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
17976 made static.
17977 (mips_cannot_store_register): Renamed from cannot_store_register,
17978 made static.
17979 (the_low_target): New.
17980 * linux-ppc-low.c (num_regs): Remove.
17981 (ppc_num_regs): Define.
17982 (ppc_regmap): Renamed from regmap, made static.
17983 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
17984 made static.
17985 (ppc_cannot_store_register): Renamed from cannot_store_register,
17986 made static.
17987 (the_low_target): New.
17988 * linux-s390-low.c (num_regs): Remove.
17989 (s390_num_regs): Define.
17990 (s390_regmap): Renamed from regmap, made static.
17991 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
17992 made static.
17993 (s390_cannot_store_register): Renamed from cannot_store_register,
17994 made static.
17995 (the_low_target): New.
17996 * linux-sh-low.c (num_regs): Remove.
17997 (sh_num_regs): Define.
17998 (sh_regmap): Renamed from regmap, made static.
17999 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
18000 made static.
18001 (sh_cannot_store_register): Renamed from cannot_store_register,
18002 made static.
18003 (the_low_target): New.
18004 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
18005 (the_low_target): New.
18006
180072002-04-09 Daniel Jacobowitz <drow@mvista.com>
18008
18009 * Makefile.in: Add stamp-h target.
18010 * configure.in: Create stamp-h.
18011 * configure: Regenerated.
18012
180132002-04-09 Daniel Jacobowitz <drow@mvista.com>
18014
18015 * inferiors.c: New file.
18016 * target.c: New file.
18017 * target.h: New file.
18018 * Makefile.in: Add target.o and inferiors.o. Update
18019 dependencies.
18020 * linux-low.c (inferior_pid): New static variable,
18021 moved from server.c.
18022 (linux_create_inferior): Renamed from create_inferior.
18023 Call add_inferior. Return 0 on success instead of a PID.
18024 (linux_attach): Renamed from myattach.
18025 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
18026 (linux_thread_alive): Renamed from mythread_alive.
18027 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
18028 child dies.
18029 (linux_resume): Renamed from myresume. Add missing ``return 0''.
18030 (regsets_store_inferior_registers): Correct error message.
18031 Add missing ``return 0''.
18032 (linux_fetch_registers): Renamed from fetch_inferior_registers.
18033 (linux_store_registers): Renamed from store_inferior_registers.
18034 (linux_read_memory): Renamed from read_inferior_memory.
18035 (linux_write_memory): Renamed from write_inferior_memory.
18036 (linux_target_ops): New structure.
18037 (initialize_low): Call set_target_ops ().
18038 * remote-utils.c (unhexify): New function.
18039 (hexify): New function.
18040 (input_interrupt): Send signals to ``signal_pid''.
18041 * server.c (inferior_pid): Remove.
18042 (start_inferior): Update create_inferior call.
18043 (attach_inferior): Call add_inferior.
18044 (handle_query): New function.
18045 (main): Call handle_query for `q' packets.
18046 * server.h: Include "target.h". Remove obsolete prototypes.
18047 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
18048
180492002-04-09 Daniel Jacobowitz <drow@mvista.com>
18050
18051 * Makefile.in: Add WARN_CFLAGS. Update configury
18052 dependencies.
18053 * configure.in: Check for <string.h>
18054 * configure: Regenerate.
18055 * config.in: Regenerate.
18056 * gdbreplay.c: Include needed system headers.
18057 (remote_open): Remove strchr prototype.
18058 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
18059 * regcache.c (supply_register): Change buf argument to const void *.
18060 (supply_register_by_name): Likewise.
18061 (collect_register): Change buf argument to void *.
18062 (collect_register_by_name): Likewise.
18063 * regcache.h: Add missing prototypes.
18064 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
18065 * server.c (handle_query): New function.
18066 (attached): New static variable, moved out of main.
18067 (main): Quiet longjmp clobber warnings.
18068 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
18069 * utils.c (error): Remove NORETURN.
18070 (fatal): Likewise.